reserve i,j,n,k,m for Nat,
     a,b,x,y,z for object,
     F,G for FinSequence-yielding FinSequence,
     f,g,p,q for FinSequence,
     X,Y for set,
     D for non empty set;

theorem Th10:
  not y in union Y implies
        card Y = card Ext(Y,x,y)
proof
  assume
A1: not y in union Y;
  set P ={X where X is Element of Y: x in X};
  set Py = {X\/{y} where X is Element of Y: x in X};
  set N ={X where X is Element of Y: not x in X & X in Y};
  deffunc F(set)=$1\/{y};
  consider f be Function such that
A2: dom f=P & for A be set st A in P holds f.A = F(A) from FUNCT_1:sch 5;
A3: rng f c= Py
  proof
    let a be object;
    assume a in rng f;
    then consider b such that
A4:   b in dom f & f.b=a by FUNCT_1:def 3;
    reconsider b as set by TARSKI:1;
    a = b\/{y} &ex X be Element of Y st b=X & x in X by A4,A2;
    hence thesis;
  end;
  Py c= rng f
  proof
    let a be object;
    assume a in Py;
    then consider X be Element of Y such that
A5:   a=X\/{y} & x in X;
A6:   X in P by A5;
    then f.X = a by A5,A2;
    hence thesis by A2,A6,FUNCT_1:def 3;
  end;
  then
A7: rng f = Py by A3;
  f is one-to-one
  proof
    let a,b be object such that
A8:   a in dom f & b in dom f & f.a=f.b;
    reconsider a,b as set by TARSKI:1;
A9:   f.a = a\/{y} & f.b = b\/{y} by A2,A8;
A10: (ex X be Element of Y st a=X & x in X)&
      ex X be Element of Y st b=X & x in X by A8,A2;
    then Y<>{} by SUBSET_1:def 1;
    then a c= union Y & b c= union Y by A10,ZFMISC_1:74;
    then {y} misses a & {y} misses b by A1,ZFMISC_1:50;
    hence thesis by A8,A9,XBOOLE_1:71;
  end;
  then
A11: P,Py are_equipotent by A2,A7,WELLORD2:def 4;
A12: P c= Y
  proof
    let a be object;
    assume a in P;
    then
A13:  ex X be Element of Y st a=X & x in X;
    then Y<>{} by SUBSET_1:def 1;
    hence thesis by A13;
  end;
A14: N c= Y
  proof
    let a be object;
    assume a in N;
    then ex X be Element of Y st a=X & not x in X & X in Y;
    hence thesis;
  end;
  Y c= N \/ P
  proof
    let a be object;
    assume
A15:  a in Y;
    then reconsider a as Element of Y;
    x in a or not x in a;
    then a in P or a in N by A15;
    hence thesis by XBOOLE_0:def 3;
  end;
  then
A16: Y = N \/P by A12,A14,XBOOLE_1:8;
A17: N misses Py
  proof
    assume N meets Py;
    then consider a be object such that
A18:  a in N/\Py by XBOOLE_0:4;
    a in N by A18,XBOOLE_0:def 4;
    then consider A be Element of Y such that
A19:  a=A & not x in A & A in Y;
    a in Py by A18,XBOOLE_0:def 4;
    then ex B be Element of Y st a=B\/{y} & x in B;
    hence thesis by A19,XBOOLE_0:def 3;
  end;
  N misses P
  proof
    assume N meets P;
    then consider a be object such that
A20:  a in N/\P by XBOOLE_0:4;
    a in N by A20,XBOOLE_0:def 4;
    then consider A be Element of Y such that
A21:  a=A & not x in A & A in Y;
    a in P by A20,XBOOLE_0:def 4;
    then ex B be Element of Y st a=B & x in B;
    hence thesis by A21;
  end;
  hence thesis by CARD_1:5,A17,A11,CARD_1:31,A16;
end;
