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 Th32:
  not x in X implies swap({X},x,y) = { X\/{x} }
proof
  assume
A1: not x in X;
  thus swap({X},x,y) c= { X\/{x} }
  proof
    let a be object;
    assume a in swap({X},x,y);
    then per cases by XBOOLE_0:def 3;
    suppose a in {(A\{x}) \/{y} where A is Element of {X}: x in A};
      then ex A be Element of {X} st a=(A\{x}) \/{y} & x in A;
      hence thesis by A1,TARSKI:def 1;
    end;
    suppose a 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
A2:     a=A\/{x} & not x in A & A in {X};
      A=X by TARSKI:def 1;
      hence thesis by A2,TARSKI:def 1;
    end;
  end;
  let a be object;
  assume a in { X\/{x} };
  then a=X\/{x} & X in {X} by TARSKI:def 1;
  then a in {A\/{x} where A is Element of {X}: not x in A & A in {X}} by A1;
  hence thesis by XBOOLE_0:def 3;
end;
