reserve i,i1,i2,i3,i4,i5,j,r,a,b,x,y for Integer,
  d,e,k,n for Nat,
  fp,fk for FinSequence of INT,
  f,f1,f2 for FinSequence of REAL,
  p for Prime;
reserve fr for FinSequence of REAL;
reserve fr,f for FinSequence of INT;
reserve b,m for Nat;
reserve b for Integer;
reserve m for Integer;
reserve fp for FinSequence of NAT;

theorem Th39:
  for D being non empty set,f being FinSequence of D, i,j being
  Nat holds f is one-to-one iff Swap(f,i,j) is one-to-one
proof
  let D be non empty set,f be FinSequence of D,i,j be Nat;
  thus f is one-to-one implies Swap(f,i,j) is one-to-one
  proof
    set ff = Swap(f,i,j);
A1: rng ff = rng f by FINSEQ_7:22;
    assume f is one-to-one;
    then
A2: card(rng f) = len f by FINSEQ_4:62;
    len ff = len f by FINSEQ_7:18;
    hence thesis by A2,A1,FINSEQ_4:62;
  end;
  assume Swap(f,i,j) is one-to-one;
  then card(rng Swap(f,i,j)) = len Swap(f,i,j) by FINSEQ_4:62;
  then card(rng f) = len Swap(f,i,j) by FINSEQ_7:22;
  then card(rng f) = len f by FINSEQ_7:18;
  hence thesis by FINSEQ_4:62;
end;
