reserve a,a1,a2,b,c,d for Ordinal,
  n,m,k for Nat,
  x,y,z,t,X,Y,Z for set;
reserve f,g for Function;
reserve A,B,C for array;

theorem Th43:
  x in dom A & y in dom A implies
  Swap(A,x,y) is permutation of A & A is permutation of Swap(A,x,y)
  proof set X = dom A;
    assume
A1: x in X & y in X;
    thus Swap(A,x,y) is permutation of A
    proof
      reconsider X as non empty set by A1;
      reconsider x,y as Element of X by A1;
      reconsider f = Swap(id X,x,y) as Permutation of dom A;
      take f;
      thus thesis by Th42;
    end;
    hence A is permutation of Swap(A,x,y) by Th39;
  end;
