reserve
  I for non empty set,
  F for associative Group-like multMagma-Family of I,
  i, j for Element of I;
reserve n for non zero Nat;

theorem Th8:
  for F being associative Group-like multMagma-Family of Seg n,
  J be Nat,
  GJ be Group
  st 1 <= J & J <= n & GJ = F.J holds
  for x be Element of product F,
  s be FinSequence of product F st len s < J
  & (for k be Element of Seg n st k in dom s holds s.k in ProjGroup(F,k))
  & x = Product s holds x.J = 1_GJ
  proof
    let F be associative Group-like multMagma-Family of Seg n,
    J be Nat,
    GJ be Group;
    assume A1: 1<=J & J <= n & GJ=F.J;
    defpred P[Nat] means
    for x be Element of product F,
    s be FinSequence of product F st
    len s < J & len s=$1
    & (for k be Element of Seg n st k in dom s holds s.k
    in ProjGroup(F,k)) & x=Product s holds x.J = 1_GJ;
    A2: P[0]
    proof
      let x be Element of product F,
      s be FinSequence of product F;
      assume A3: len s < J & len s=0
      & (for k be Element of Seg n st k in dom s holds s.k
      in ProjGroup(F,k)) & x=Product s;
      s= <*> the carrier of product F by A3; then
A4:  x= 1_(product F) by A3,GROUP_4:8;
      J in Seg n by A1;
      hence x.J = 1_GJ by A1,A4,GROUP_7:6;
    end;
A5: for m be Nat st P[m] holds P[m+1]
    proof
      let m be Nat;
      assume A6:P[m];
      let x be Element of product F,
      s be FinSequence of product F;
      assume A7: len s < J & len s=m+1
      & (for k be Element of Seg n st k in dom s holds s.k
      in ProjGroup(F,k)) & x=Product s;
      A8: m < m+1 by NAT_1:13;
      A9: 1<= len s by A7,NAT_1:11;
      1<= len s & len s <=n by A7,A1,NAT_1:11,XXREAL_0:2;
      then len s in Seg n; then
      reconsider ls=len s as Element of Seg n;
      set t=s|m;
A10: now let k be Element of Seg n;
      assume A11: k in dom t;
A12: t.k =s.k by A11,FUNCT_1:47;
      k in dom s by A11,RELAT_1:57;
      hence t.k in ProjGroup(F,k) by A12,A7;
    end;
    set y=Product t;
A13:  m in NAT by ORDINAL1:def 12;
    dom s= Seg (m+1) by A7,FINSEQ_1:def 3;
    then Seg m c= dom s by A8,FINSEQ_1:5;
    then A14:dom t = Seg m by RELAT_1:62;
    then A15:len t =m by FINSEQ_1:def 3,A13;
    A16: len t = (len s) -1 by A14,A7,FINSEQ_1:def 3,A13;
    A17: y.J = 1_GJ by A6,A10,A16,A7,XREAL_1:51;
    len s in Seg len s by A9; then
    A18: len s in dom s by FINSEQ_1:def 3;
    then reconsider sn=s.len s as Element of product F by FINSEQ_2:11;
    A19:len t +1 =len s by A14,A7,FINSEQ_1:def 3,A13;
    len (t^<* sn *>) = len s by A19,FINSEQ_2:16;
    then A20: dom (t^<* sn *>)=Seg len s by FINSEQ_1:def 3
    .=dom s by FINSEQ_1:def 3;
    A21: s=t^<* sn *>
    proof
      for k be Nat st k in dom s holds s.k = (t^<* sn *>).k
      proof
        let k be Nat;
        assume k in dom s;
        then A22: k in Seg (len t +1) by A19,FINSEQ_1:def 3;
        now per cases by A22,FINSEQ_2:7;
          case A23:k in Seg len t;
            then k in dom t by FINSEQ_1:def 3; then
            (t^<* sn *>).k=t.k by FINSEQ_1:def 7
            .=s.k by A23,A15,FUNCT_1:49;
            hence thesis;
          end;
          case k= len t +1;
            hence thesis by A19,FINSEQ_1:42;
          end;
        end;
        hence thesis;
      end;
      hence thesis by A20,FINSEQ_1:13;
    end;
A24: x = y*sn by A21,A7,GROUP_4:6;
    s.len s in ProjGroup(F,ls) by A7,A18; then
    s.len s in the carrier of ProjGroup(F,ls) by STRUCT_0:def 5; then
    A25:s.len s in ProjSet(F,ls) by Def2;
    consider snn be Function,gn be Element of (F.ls) such that
    A26: snn=sn & dom snn = Seg n & snn.ls = gn &
    for k be Element of Seg n st k <> ls holds snn.k = 1_F.k by A25,Th2;
    thus x.J = 1_GJ
    proof
      reconsider J0=J as Element of Seg n by A1,FINSEQ_1:1;
      A27: snn.J0 = 1_F.J0 by A26,A7;
      thus x.J =(1_F.J0)*(1_F.J0) by A17,A26,A27,A24,A1,GROUP_7:1
      .=1_GJ by A1,GROUP_1:def 4;
    end;
  end;
  for m be Nat holds P[m] from NAT_1:sch 2(A2,A5);
  hence thesis;
end;
