reserve x, y for object, X for set,
  i, j, k, l, n, m for Nat,
  D for non empty set,
  K for commutative Ring,
  a,b for Element of K,
  perm, p, q for Element of Permutations(n),
  Perm,P for Permutation of Seg n,
  F for Function of Seg n,Seg n,
  perm2, p2, q2, pq2 for Element of Permutations(n+2),
  Perm2 for Permutation of Seg (n+2);
reserve s for Element of 2Set Seg (n+2);

theorem Th16:
  for i,j,n st i < j & i in Seg n & j in Seg n ex tr be Element of
  Permutations(n) st tr is being_transposition & tr.i = j
proof
  let i,j,n such that
A1: i<j and
A2: i in Seg n and
A3: j in Seg n;
  defpred P[object,object] means
for k st k in Seg n & k=$1 holds (k=i implies $2=j)
  & (k=j implies $2=i) & (k<>i & k<>j implies $2=k);
A4: for x being object st x in Seg n ex y be object st y in Seg n & P[x,y]
  proof
    let x be object such that
A5: x in Seg n;
    reconsider m=x as Nat by A5;
    now
      per cases;
      suppose
        m=i;
        then P[x,j];
        hence thesis by A3;
      end;
      suppose
        m=j;
        then P[x,i];
        hence thesis by A2;
      end;
      suppose
        m<>i & m<>j;
        then P[x,x];
        hence thesis by A5;
      end;
    end;
    hence thesis;
  end;
  consider f be Function of Seg n,Seg n such that
A6: for x being object st x in Seg n holds P[x,f.x] from FUNCT_2:sch 1(A4);
  for x1,x2 be object st x1 in Seg n & x2 in Seg n & f.x1 = f.x2 holds x1=x2
  proof
    let x1,x2 be object such that
A7: x1 in Seg n and
A8: x2 in Seg n and
A9: f.x1=f.x2;
    reconsider k1=x1 as Nat by A7;
    x1=i or x1=j or x1<>i & x1<>j;
    then
A10: x1=i & f.x1=j or x1=j & f.x1=i or x1<>i & x1<>j & f.x1=k1 by A6,A7;
    x2=i or x2=j or x2<>i & x2<>j;
    hence thesis by A6,A8,A9,A10;
  end;
  then
A11: f is one-to-one by A2,FUNCT_2:19;
  for y being object st y in Seg n ex x being object st x in Seg n & y = f.x
  proof
    let y being object such that
A12: y in Seg n;
    reconsider k=y as Nat by A12;
    k=i & f.j=i or k=j & f.i=j or k<>i & k<>j& f.k=k by A2,A3,A6,A12;
    hence thesis by A2,A3,A12;
  end;
  then rng f=Seg n by FUNCT_2:10;
  then f is onto by FUNCT_2:def 3;
  then reconsider P=f as Element of Permutations(n) by A11,MATRIX_1:def 12;
A13: P.j=i by A3,A6;
  dom P=Seg n by A2,FUNCT_2:def 1;
  then
A14: for k st k <>i & k<>j & k in dom P holds P.k=k by A6;
  take P;
A15: i in dom P by A2,FUNCT_2:def 1;
A16: j in dom P by A3,FUNCT_2:def 1;
  P.i=j by A2,A6;
  hence thesis by A1,A15,A16,A13,A14;
end;
