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);
reserve pD for FinSequence of D,
  M for Matrix of n,m,D,
  pK,qK for FinSequence of K,
  A for Matrix of n,K;

theorem Th44:
  for perm ex P be Permutation of Permutations(n) st for p be
  Element of Permutations(n) holds P.p = p*perm
proof
  let perm;
  set P=Permutations(n);
  defpred g[object,object] means
   for p be Element of Permutations(n) st $1=p holds
  $2=p*perm;
A1: card P=card P;
A2: for x being object st x in P ex y be object st y in P & g[x,y]
  proof
    let x be object;
    assume x in P;
    then reconsider p=x as Element of P;
    reconsider pp=p*perm as Element of P by MATRIX_9:39;
    take pp;
    thus thesis;
  end;
  consider G be Function of P,P such that
A3: for x being object st x in P holds g[x,G.x] from FUNCT_2:sch 1(A2);
  for x1,x2 be object st x1 in P & x2 in P & G.x1 = G.x2 holds x1 = x2
  proof
    let x1,x2 be object such that
A4: x1 in P and
A5: x2 in P and
A6: G.x1=G.x2;
    reconsider p1=x1,p2=x2 as Element of P by A4,A5;
    p2 is Permutation of Seg n by MATRIX_1:def 12;
    then
A7: dom p2=Seg n by FUNCT_2:52;
A8: G.p2=p2*perm by A3;
A9: G.p1=p1*perm by A3;
    perm is Permutation of Seg n by MATRIX_1:def 12;
    then
A10: rng perm=Seg n by FUNCT_2:def 3;
    p1 is Permutation of Seg n by MATRIX_1:def 12;
    then dom p1=Seg n by FUNCT_2:52;
    then p1=p1*(id rng perm) by A10,RELAT_1:52
      .= p1*(perm*perm") by FUNCT_1:39
      .= p2*perm*perm" by A6,A9,A8,RELAT_1:36
      .= p2*(perm*perm") by RELAT_1:36
      .=p2*(id rng perm) by FUNCT_1:39
      .=p2 by A10,A7,RELAT_1:52;
    hence thesis;
  end;
  then
A11: G is one-to-one by FUNCT_2:19;
  G is onto by A11,A1,FINSEQ_4:63;
  then reconsider G as Permutation of P by A11;
  take G;
  thus thesis by A3;
end;
