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 Th14:
  Y in swap(X,x,y) & x<>y & not y in union X implies (x in Y iff not y in Y)
proof
  assume
A1: Y in swap(X,x,y) & x<>y & not y in union X;
  then per cases by XBOOLE_0:def 3;
  suppose Y in {(A\{x})\/{y} where A is Element of X: x in A};
    then consider A be Element of X such that
A2:   Y =(A\{x})\/{y} & x in A;
    hereby assume x in Y;
      then x in A\{x} by A2,ZFMISC_1:136,A1;
      hence not y in Y by ZFMISC_1:56;
    end;
    thus thesis by A2,ZFMISC_1:136;
  end;
  suppose Y in {A\/{x} where A is Element of X : not x in A & A in X};
    then consider A be Element of X such that
A3:   Y =A\/{x} & not x in A & A in X;
    not y in A by A1,A3,TARSKI:def 4;
    hence thesis by A3,ZFMISC_1:136,A1;
  end;
end;
