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 Th24:
  for p2,q2,pq2 st pq2 = p2*q2 holds sgn(pq2,K) = sgn(p2,K)*sgn(q2 ,K)
proof
  set n2=n+2;
  let p, q, pq be Element of Permutations(n2) such that
A1: pq=p*q;
  consider P2 be FinSequence of Group_of_Perm(n2) such that
A2: q=Product P2 and
A3: for i st i in dom P2 ex trans be Element of Permutations(n2) st P2.i
  =trans & trans is being_transposition by Th21;
  consider P1 be FinSequence of Group_of_Perm(n2) such that
A4: p=Product P1 and
A5: for i st i in dom P1 ex trans be Element of Permutations(n2) st P1.i
  =trans & trans is being_transposition by Th21;
  set PP=P2^P1;
A6: for i st i in dom PP ex trans be Element of Permutations(n2) st PP.i=
  trans & trans is being_transposition
  proof
    let i such that
A7: i in dom PP;
    now
      per cases by A7,FINSEQ_1:25;
      suppose
A8:     i in dom P2;
        then P2.i=PP.i by FINSEQ_1:def 7;
        hence thesis by A3,A8;
      end;
      suppose
        ex k be Nat st k in dom P1 & i=len P2 + k;
        then consider k be Nat such that
A9:     k in dom P1 and
A10:    i=len P2 + k;
        P1.k=PP.i by A9,A10,FINSEQ_1:def 7;
        hence thesis by A5,A9;
      end;
    end;
    hence thesis;
  end;
A11: Product PP=(Product P2)*(Product P1) by GROUP_4:5
    .=pq by A1,A4,A2,MATRIX_1:def 13;
  now
    per cases by NAT_D:12;
    suppose
A12:  len P1 mod 2=0 & len P2 mod 2=0;
      len PP mod 2=(len P2+len P1) mod 2 by FINSEQ_1:22
        .=(0+len P1+0) mod 2 by A12,NAT_D:22
        .=0 by A12;
      then
A13:  sgn(pq,K)=1_K by A11,A6,Th15;
A14:  sgn(q,K)=1_K by A2,A3,A12,Th15;
      sgn(p,K)=1_K by A4,A5,A12,Th15;
      hence thesis by A13,A14;
    end;
    suppose
A15:  len P1 mod 2=1 & len P2 mod 2=0;
      len PP mod 2=(len P2+len P1) mod 2 by FINSEQ_1:22
        .=(0+len P1+0) mod 2 by A15,NAT_D:22
        .=1 by A15;
      then
A16:  sgn(pq,K)=-1_K by A11,A6,Th15;
A17:  sgn(q,K)=1_K by A2,A3,A15,Th15;
      sgn(p,K)=-1_K by A4,A5,A15,Th15;
      hence thesis by A16,A17;
    end;
    suppose
A18:  len P1 mod 2=0 & len P2 mod 2=1;
      len PP mod 2=(len P2+len P1) mod 2 by FINSEQ_1:22
        .=(1+len P1) mod 2 by A18,NAT_D:22
        .=(1+0) mod 2 by A18,NAT_D:22
        .=1 by NAT_D:14;
      then
A19:  sgn(pq,K)=-1_K by A11,A6,Th15;
A20:  sgn(q,K)=-1_K by A2,A3,A18,Th15;
      sgn(p,K)=1_K by A4,A5,A18,Th15;
      hence thesis by A19,A20;
    end;
    suppose
A21:  len P1 mod 2=1 & len P2 mod 2=1;
      len PP mod 2=(len P2+len P1) mod 2 by FINSEQ_1:22
        .=(1+len P1) mod 2 by A21,NAT_D:22
        .=(1+1) mod 2 by A21,NAT_D:22
        .=0 by NAT_D:25;
      then
A22:  sgn(pq,K)=1_K by A11,A6,Th15;
A23:  1_K*1_K=1_K;
A24:  sgn(q,K)=-1_K by A2,A3,A21,Th15;
      sgn(p,K)=-1_K by A4,A5,A21,Th15;
      hence thesis by A22,A24,A23,VECTSP_1:10;
    end;
  end;
  hence thesis;
end;
