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);

theorem Th4:
  for X be Element of Fin 2Set Seg (n+2) st for x st x in X holds
  Part_sgn(p2,K).x = 1_K holds (the multF of K) $$ (X,Part_sgn(p2,K)) = 1_K
proof
  let X be Element of Fin 2Set Seg (n+2) such that
A1: for x st x in X holds Part_sgn(p2,K).x = 1_K;
  set Path = Part_sgn(p2,K);
  set 2S = 2Set Seg (n+2);
  set KK = the carrier of K;
  set mm = the multF of K;
  consider G be Function of Fin 2S,KK such that
A2: mm $$ (X,Path) = G.X and
A3: for e being Element of KK st e is_a_unity_wrt mm holds G.{} = e and
A4: for x being Element of 2S holds G.{x} = Path.x and
A5: for B being Element of Fin 2S st B c= X & B <> {} for x being
  Element of 2S st x in X \ B holds G.(B \/ {x}) = mm.(G.B,Path.x) by
SETWISEO:def 3;
  defpred P[Nat] means for B be Element of Fin 2S st card B=$1 & B c= X holds
  G.B=1_K;
A6: for k be Nat st P[k] holds P[k+1]
  proof
    let k be Nat such that
A7: P[k];
    set k1=k+1;
    let B be Element of Fin 2S such that
A8: card B=k1 and
A9: B c= X;
    now
      per cases;
      case
        k=0;
        then consider x being object such that
A10:    B={x} by A8,CARD_2:42;
A11:    x in B by A10,TARSKI:def 1;
        B c= 2S by FINSUB_1:def 5;
        then reconsider x as Element of 2S by A11;
        G.B=Path.x by A4,A10;
        hence thesis by A1,A9,A11;
      end;
      case
A12:    k>0;
        consider x being object such that
A13:    x in B by A8,CARD_1:27,XBOOLE_0:def 1;
        B c= 2S by FINSUB_1:def 5;
        then reconsider x as Element of 2S by A13;
A14:    Path.x=1_K by A1,A9,A13;
        B c= 2S by FINSUB_1:def 5;
        then B\{x} c= 2S;
        then reconsider B9=B\{x} as Element of Fin 2S by FINSUB_1:def 5;
A15:    not x in B9 by ZFMISC_1:56;
        then
A16:    x in X\B9 by A9,A13,XBOOLE_0:def 5;
A17:    {x} \/ B9=B by A13,ZFMISC_1:116;
        then
A18:    k+1=card B9+1 by A8,A15,CARD_2:41;
        then G.B9=1_K by A7,A9,XBOOLE_1:1;
        then G.B=1_K * 1_K by A5,A9,A12,A17,A18,A16,A14,CARD_1:27,XBOOLE_1:1;
        hence thesis;
      end;
    end;
    hence thesis;
  end;
A19: P[0]
  proof
    let B be Element of Fin 2S such that
A20: card B=0 and
    B c= X;
    B={} by A20;
    hence thesis by A3,FVSUM_1:4;
  end;
  for k be Nat holds P[k] from NAT_1:sch 2(A19,A6);
  then P[card X];
  hence thesis by A2;
end;
