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 Th13:
  for p2,q2,pq2 st pq2 = p2*q2 & q2 is being_transposition holds
  sgn(pq2,K) = -sgn(p2,K)
proof
  set n2=n+2;
  set 2SS=2Set Seg n2;
  let p, q, pq be Element of Permutations n2 such that
A1: pq = p*q and
A2: q is being_transposition;
  2SS in Fin 2SS by FINSUB_1:def 5; then
  In(2SS,Fin 2SS)=2SS by SUBSET_1:def 8;
  then reconsider 2S=2SS as Element of Fin 2SS;
A4: for i,j st i < j & q.i=j holds sgn(pq,K)=-sgn(p,K)
  proof
    let i,j such that
A5: i < j and
A6: q.i=j;
    now
      per cases;
      suppose
A7:     1_K=-1_K;
        then sgn(pq,K)=-1_K by Th11;
        hence thesis by A7,Th11;
      end;
      suppose
A8:     1_K<>-1_K;
        set P2=Part_sgn(p,K);
        set P1=Part_sgn(pq,K);
A9:     P1.{i,j}<>P2.{i,j} by A1,A2,A5,A6,A8,Th10;
        defpred P[object,object] means
          ex D1 being set st D1 = $1 &
          for k st k in D1 & k<>i holds (k<>j implies
        $2={j,k}) &(k=j implies $2={i,j});
        set D={s:s in 2S & Part_sgn(pq,K).s<>Part_sgn(p,K).s};
        D c= 2S
        proof
          let x be object;
          assume x in D;
          then ex s st x=s & s in 2S & P1.s<>P2.s;
          hence thesis;
        end;
        then reconsider D as finite set;
        set D1={s:s in 2S & P1.s<>P2.s & i in s};
        set D2={s:s in 2S & P1.s<>P2.s & j in s};
A10:    D1 c= D
        proof
          let x be object;
          assume x in D1;
          then ex s st x=s & s in 2S & P1.s<>P2.s & i in s;
          hence thesis;
        end;
A11:    D2 c= D
        proof
          let x be object;
          assume x in D2;
          then ex s st x=s & s in 2S & P1.s<>P2.s & j in s;
          hence thesis;
        end;
        then reconsider D1,D2 as finite set by A10;
A12:    j in dom q by A2,A5,A6,Th8;
A13:    D c= D1\/D2
        proof
          let x be object;
          assume x in D;
          then consider s such that
A14:      x=s and
          s in 2S and
A15:      P1.s<>P2.s;
          i in s or j in s by A1,A2,A5,A6,A15,Th9;
          then x in D1 or x in D2 by A14,A15;
          hence thesis by XBOOLE_0:def 3;
        end;
        D1\/D2 c= D by A10,A11,XBOOLE_1:8;
        then
A16:    D1\/D2=D by A13;
A17:    D1/\D2 c= {{i,j}}
        proof
          let x be object;
          assume
A18:      x in D1/\D2;
          then x in D1 by XBOOLE_0:def 4;
          then
A19:      ex s1 be Element of 2SS st x=s1 & s1 in 2S & P1.s1<>P2. s1 & i in s1;
          then consider i9,j9 be Nat such that
          i9 in Seg n2 and
          j9 in Seg n2 and
          i9<j9 and
A20:      {i9,j9}=x by Th1;
          x in D2 by A18,XBOOLE_0:def 4;
          then
          ex s2 be Element of 2SS st x=s2 & s2 in 2S & P1.s2<>P2. s2 & j in s2;
          then
A21:      j=i9 or j=j9 by A20,TARSKI:def 2;
          i=i9 or i=j9 by A19,A20,TARSKI:def 2;
          hence thesis by A5,A20,A21,TARSKI:def 1;
        end;
        q is Permutation of Seg n2 by MATRIX_1:def 12;
        then
A22:    dom q=Seg n2 by FUNCT_2:52;
A23:    i in dom q by A2,A5,A6,Th8;
        then
A24:    {i,j} in 2S by A5,A12,A22,Th1;
A25:    i in {i,j} by TARSKI:def 2;
        then {i,j} in D1 by A24,A9;
        then card D1>0;
        then reconsider c1=card D1-1 as Nat by NAT_1:20;
A26:    j in {i,j} by TARSKI:def 2;
        then
A27:    {i,j} in D2 by A24,A9;
A28:    for x being object st x in D1 ex y be object st y in D2 & P[x,y]
        proof
          let x be object;
          assume x in D1;
          then consider s such that
A29:      x=s and
          s in 2S and
A30:      P1.s<>P2.s and
A31:      i in s;
          consider j9 be Nat such that
A32:      j9 in Seg n2 and
A33:      j9<>i and
A34:      s={i,j9} by A31,Lm2;
          now
            per cases;
            suppose
A35:          j9=j;
              take X={i,j};
              thus X in D2 by A26,A24,A9;
              reconsider xx=x as set by TARSKI:1;
              take xx;
              thus xx = x;
              let k such that
A36:          k in xx and
              k<>i;
              thus (k<>j implies X={j,k}) &(k=j implies X={i,j}) by A29,A34,A35
,A36,TARSKI:def 2;
            end;
            suppose
A37:          j9<>j;
              take X={j,j9};
              j<j9 or j>j9 by A37,XXREAL_0:1;
              then
A38:          X in 2SS by A12,A22,A32,Th1;
A39:          j in X by TARSKI:def 2;
              P1.X<>P2.X by A1,A2,A5,A6,A8,A30,A32,A33,A34,A37,Th10;
              hence X in D2 by A39,A38;
              reconsider xx=x as set by TARSKI:1;
              take xx;
              thus xx = x;
              let k such that
A40:          k in xx and
A41:          k<>i;
              thus (k<>j implies X={j,k}) &(k=j implies X={i,j}) by A29,A34,A37
,A40,A41,TARSKI:def 2;
            end;
          end;
          hence thesis;
        end;
        consider f be Function of D1,D2 such that
A42:    for x being object st x in D1 holds P[x,f.x] from FUNCT_2:sch 1(A28);
A43:    {i,j} in D2 by A26,A24,A9;
        then
A44:    dom f=D1 by FUNCT_2:def 1;
        for y be object st y in D2 ex x being object st x in D1 & y = f.x
        proof
          let y be object;
          assume y in D2;
          then consider s such that
A45:      s=y and
          s in 2S and
A46:      P1.s<>P2.s and
A47:      j in s;
          consider i1 be Nat such that
A48:      i1 in Seg n2 and
A49:      i1<>j and
A50:      s={j,i1} by A47,Lm2;
          now
            per cases;
            suppose
A51:          i1=i;
A52:          {i,j} in D1 by A25,A24,A9;
              then P[s,f.s] by A42,A50,A51;
              then f.s=y by A5,A26,A45,A50,A51;
              hence thesis by A50,A51,A52;
            end;
            suppose
A53:          i1<>i;
              then i<i1 or i>i1 by XXREAL_0:1;
              then
A54:          {i,i1} in 2SS by A23,A22,A48,Th1;
A55:          i in {i,i1} by TARSKI:def 2;
              P1.{i,i1}<>P2.{i,i1} by A1,A2,A5,A6,A8,A46,A48,A49,A50,A53,Th10;
              then
A56:          {i,i1} in D1 by A54,A55;
A57:           i1 in {i,i1} by TARSKI:def 2;
              P[{i,i1},f.{i,i1}] by A42,A56;
              then f.{i,i1}={j,i1} by A49,A53,A57;
              hence thesis by A45,A50,A56;
            end;
          end;
          hence thesis;
        end;
        then
A58:    rng f=D2 by FUNCT_2:10;
        for x1,x2 be object st x1 in D1 & x2 in D1 & f.x1 = f.x2 holds x1 = x2
        proof
          let x1,x2 be object such that
A59:      x1 in D1 and
A60:      x2 in D1 and
A61:      f.x1 = f.x2;
          consider s1 be Element of 2SS such that
A62:      x1=s1 and
          s1 in 2S and
          P1.s1<>P2.s1 and
A63:      i in s1 by A59;
          consider j1 be Nat such that
          j1 in Seg n2 and
A64:      i<>j1 and
A65:      {i,j1}=s1 by A63,Lm2;
          consider s2 be Element of 2SS such that
A66:      x2=s2 and
          s2 in 2S and
          P1.s2<>P2.s2 and
A67:      i in s2 by A60;
          consider j2 be Nat such that
          j2 in Seg n2 and
A68:      i<>j2 and
A69:      {i,j2}=s2 by A67,Lm2;
A70:      j2 in s2 by A69,TARSKI:def 2;
A71:      j1 in s1 by A65,TARSKI:def 2;
          now
            per cases;
            case
              j=j1 & j=j2;
              hence thesis by A62,A65,A66,A69;
            end;
            case
A72:          j<>j1 & j=j2;
              P[x2,f.x2] by A42,A60;
              then
A73:          f.x2={i,j} by A66,A68,A70,A72;
              P[x1,f.x1] by A42,A59;
              then f.x1={j,j1} by A62,A64,A71,A72;
              hence thesis by A5,A61,A64,A67,A69,A72,A73,TARSKI:def 2;
            end;
            case
A74:          j=j1 & j<>j2;
              P[x2,f.x2] by A42,A60;
              then
A75:          f.x2={j,j2} by A66,A68,A70,A74;
              P[x1,f.x1] by A42,A59;
              then f.x1={i,j} by A62,A64,A71,A74;
              hence thesis by A5,A61,A63,A65,A68,A74,A75,TARSKI:def 2;
            end;
            case
A76:          j<>j1 & j<>j2;
              P[x2,f.x2] by A42,A60;
              then
A77:          f.x2={j,j2} by A66,A68,A70,A76;
A78:          j1 in {j,j1} by TARSKI:def 2;
              P[x1,f.x1] by A42,A59;
              then f.x1={j,j1} by A62,A64,A71,A76;
              hence thesis by A61,A62,A65,A66,A69,A76,A77,A78,TARSKI:def 2;
            end;
          end;
          hence thesis;
        end;
        then f is one-to-one by A43,FUNCT_2:19;
        then D1,D2 are_equipotent by A58,A44,WELLORD2:def 4;
        then
A79:    card D1=card D2 by CARD_1:5;
        {i,j} in D1 by A25,A24,A9;
        then {i,j} in D1/\D2 by A27,XBOOLE_0:def 4;
        then { {i,j}} c= D1/\D2 by ZFMISC_1:31;
        then D1/\D2 ={{i,j}} by A17;
        then card D=card D1+card D1-card{{i,j}} by A79,A16,CARD_2:45
          .=(c1+1)+(c1+1)-1 by CARD_1:30
          .=2*c1+1;
        then card D mod 2=1 mod 2 by NAT_D:21;
        hence thesis by Th7,NAT_D:14;
      end;
    end;
    hence thesis;
  end;
  consider i,j such that
  i in dom q and
  j in dom q and
A80: i<>j and
A81: q.i=j and
A82: q.j=i and
  for k st k <>i & k<>j & k in dom q holds q.k=k by A2;
  i<j or j<i by A80,XXREAL_0:1;
  hence thesis by A4,A81,A82;
end;
