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 Th15:
  for P be FinSequence of Group_of_Perm(n+2), p2 be Element of
Permutations(n+2) st p2 = Product P & (for i st i in dom P ex trans be Element
of Permutations(n+2) st P.i = trans & trans is being_transposition) holds (len
  P mod 2=0 implies sgn(p2,K) = 1_K) & (len P mod 2=1 implies sgn(p2,K) = -1_K)
proof
  set n2=n+2;
  set G=Group_of_Perm(n2);
  defpred P[Nat] means for P be FinSequence of G,p2 st p2=Product P & len P=$1
  & (for i st i in dom P ex trans be Element of Permutations(n2) st P.i=trans &
  trans is being_transposition) holds (len P mod 2=0 implies sgn(p2,K)=1_K) & (
  len P mod 2=1 implies sgn(p2,K)=-1_K);
A1: for k be Nat st P[k] holds P[k+1]
  proof
    let k be Nat such that
A2: P[k];
    set k1=k+1;
    let P be FinSequence of G,p2 such that
A3: p2=Product P and
A4: len P=k1 and
A5: for i st i in dom P ex trans be Element of Permutations(n2) st P.
    i=trans & trans is being_transposition;
    consider x be object, Q be FinSequence such that
A6: P = <*x*>^Q and
A7: len P = len Q+1 by A4,RELAT_1:38,REWRITE1:5;
    reconsider X=<*x*>,Q as FinSequence of G by A6,FINSEQ_1:36;
A8: for i st i in dom Q ex trans be Element of Permutations(n2) st Q.i=
    trans & trans is being_transposition
    proof
      let i such that
A9:   i in dom Q;
      Q.i=P.(len X+i) by A6,A9,FINSEQ_1:def 7;
      hence thesis by A5,A6,A9,FINSEQ_1:28;
    end;
    1+0<=k1 by XREAL_1:7;
    then 1 in Seg k1;
    then
A10: 1 in dom P by A4,FINSEQ_1:def 3;
    P.1=x by A6,FINSEQ_1:41;
    then consider tr be Element of Permutations(n2) such that
A11: x=tr and
A12: tr is being_transposition by A5,A10;
    reconsider PQ=Product Q as Element of Permutations(n2) by MATRIX_1:def 13;
    reconsider Tr=tr as Element of G by MATRIX_1:def 13;
A13: p2=Tr*Product Q by A3,A6,A11,GROUP_4:7
      .=PQ*tr by MATRIX_1:def 13;
    then
A14: sgn(p2,K)=-sgn(PQ,K) by A12,Th13;
    now
      per cases by NAT_D:12;
      suppose
A15:    len Q mod 2=0;
        0<2-1;
        then
A16:    len P mod 2 =0 +1 by A7,A15,NAT_D:70;
        sgn(PQ,K)=1_K by A2,A4,A7,A8,A15;
        hence thesis by A12,A13,A16,Th13;
      end;
      suppose
A17:    len Q mod 2=1;
A18:    2-1=1;
        sgn(PQ,K)=-1_K by A2,A4,A7,A8,A17;
        hence thesis by A7,A14,A17,A18,NAT_D:69,RLVECT_1:17;
      end;
    end;
    hence thesis;
  end;
A19: P[0]
  proof
    let P be FinSequence of G,p2 such that
A20: p2=Product P and
A21: len P=0 and
    for i st i in dom P ex trans be Element of Permutations(n2) st P.i=
    trans & trans is being_transposition;
    P=<*>the carrier of G by A21;
    then Product P=1_G by GROUP_4:8;
    then Product P=idseq n2 by MATRIX_1:15;
    hence thesis by A20,A21,Th12,NAT_D:26;
  end;
  for k be Nat holds P[k] from NAT_1:sch 2(A19,A1);
  hence thesis;
end;
