reserve u,v,x,x1,x2,y,y1,y2,z,p,a for object,
        A,B,X,X1,X2,X3,X4,Y,Y1,Y2,Z,N,M for set;

theorem
  X c= [:X,Y:] or X c= [:Y,X:] implies X = {}
proof
  assume
A1: X c= [:X,Y:] or X c= [:Y,X:];
  assume
A2: X <> {};
A3: now
    defpred P[object] means ex Y st $1=Y & ex z st z in Y & z in X;
    consider Z such that
A4: for y holds y in Z iff y in union X & P[y] from XBOOLE_0:sch 1;
    consider Y2 such that
A5: Y2 in X \/ Z and
A6: X \/ Z misses Y2 by A2,XREGULAR:1;
    now
      assume
A7:   not ex Y2 st Y2 in X & for Y1 st Y1 in Y2 holds for z holds not
      z in Y1 or not z in X;
      now
        assume
A8:     Y2 in X;
        then consider Y1 such that
A9:     Y1 in Y2 and
A10:    ex z st z in Y1 & z in X by A7;
        Y1 in union X by A8,A9,TARSKI:def 4;
        then Y1 in Z by A4,A10;
        then Y1 in X \/ Z by XBOOLE_0:def 3;
        hence contradiction by A6,A9,XBOOLE_0:3;
      end;
      then Y2 in Z by A5,XBOOLE_0:def 3;
      then ex X2 st Y2=X2 & ex z st z in X2 & z in X by A4;
      then consider z such that
A11:  z in Y2 and
A12:  z in X;
      z in X \/ Z by A12,XBOOLE_0:def 3;
      hence contradiction by A6,A11,XBOOLE_0:3;
    end;
    then consider Y1 such that
A13: Y1 in X and
A14: not ex Y2 st Y2 in Y1 & ex z st z in Y2 & z in X;
A15: now
      given y,x such that
A16:  x in X and
A17:  Y1 = [y,x];
A18:  x in {y,x} by TARSKI:def 2;
      {y,x} in Y1 by A17,TARSKI:def 2;
      hence contradiction by A14,A16,A18;
    end;
    assume X c= [:Y,X:];
    then Y1 in [:Y,X:] by A13;
    then ex y,x being object st y in Y & x in X & Y1 = [y,x] by Def2;
    hence contradiction by A15;
  end;
  now
    consider z being object such that
A19: z in X by A2,XBOOLE_0:7;
    consider Y1 such that
A20: Y1 in X \/ union X and
A21: X \/ union X misses Y1 by A19,XREGULAR:1;
    assume
A22: X c= [:X,Y:];
    now
      assume
A23:  Y1 in X;
      then consider x,y such that
A24:  Y1 = [x,y] by Lm19,A22;
A25:  {x} in Y1 by A24,TARSKI:def 2;
      Y1 c= union X by A23,Lm14;
      then {x} in union X by A25;
      then {x} in X \/ union X by XBOOLE_0:def 3;
      hence contradiction by A21,A25,XBOOLE_0:3;
    end;
    then Y1 in union X by A20,XBOOLE_0:def 3;
    then consider Y2 such that
A26: Y1 in Y2 and
A27: Y2 in X by TARSKI:def 4;
    Y2 in [:X,Y:] by A22,A27;
    then consider x,y being object such that
A28: x in X and
    y in Y and
A29: Y2=[x,y] by Def2;
    Y1={x} or Y1={x,y} by A26,A29,TARSKI:def 2;
    then
A30: x in Y1 by TARSKI:def 1,def 2;
    x in X \/ union X by A28,XBOOLE_0:def 3;
    hence contradiction by A21,A30,XBOOLE_0:3;
  end;
  hence thesis by A1,A3;
end;
