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
  for f be Function st z in dom f holds swap({f.z},x,y) = {Swap(f,x,y).z}
proof
  let f be Function;
  assume A1: z in dom f;
  per cases;
  suppose x in f.z;
    then swap({f.z},x,y) = {((f.z)\{x})\/{y}} &Swap(f,x,y).z = ((f.z)\{x})\/{y}
      by Def4,A1,Th31;
    hence thesis;
  end;
  suppose not x in f.z;
    then swap({f.z},x,y) = {(f.z)\/{x}} & (f.z)\/{x} = Swap(f,x,y).z
      by A1,Def4,Th32;
    hence thesis;
  end;
end;
