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 Th9:
  for F be associative Group-like multMagma-Family of Seg n,
  x be Element of product F,
  s be FinSequence of product F st len s = n
  & (for k be Element of Seg n holds s.k in ProjGroup(F,k))
  & x = Product s holds
  for i be Nat st
  1<= i & i<= n holds
  ex si be Element of product F st si=s.i & x.i = si.i
  proof
    let F be associative Group-like multMagma-Family of Seg n;
    defpred P[Nat] means for x be Element of product F,
    s be FinSequence of product F st
    1 <= len s & len s <= $1 & $1 <=n
    & (for k be Element of Seg n st k in dom s holds s.k
    in ProjGroup(F,k)) & x=Product s holds
    for i be Nat st 1<= i & i<=len s holds
    ex si be Element of product F st si=s.i & x.i = si.i;
    A1: P[ 0 ];
A2: for m be Nat st P[m] holds P[m+1]
    proof
      let m be Nat;
      assume A3: P[m];
      let x be Element of product F,
      s be FinSequence of product F;
      assume A4: 1 <= len s & len s <= m+1 & m+1 <= n
      & (for k be Element of Seg n st k in dom s holds s.k
      in ProjGroup(F,k)) & x=Product s;
      per cases;
      suppose m=0; then
        A5:len s= 1 by A4,XXREAL_0:1; then
        A6: s = <* (s.1) *> by FINSEQ_1:40;
        thus for i be Nat st 1<= i & i<=len s holds
        ex si be Element of product F st si=s.i & x.i = si.i
        proof
          let i be Nat;
          assume A7: 1<= i & i<=len s;
          1 in Seg len s by A4; then
          1 in dom s by FINSEQ_1:def 3; then
          reconsider si=s.1 as Element of product F by FINSEQ_2:11;
          take si;
          thus thesis by A7,A6,A4,A5,GROUP_4:9,XXREAL_0:1;
        end;
      end;
      suppose A8: m<>0;
        now per cases;
          suppose A9: len s <=m;
            1 <= len s & len s <= m &m <= n
            proof
              (m+1)-1 <= n -0 by A4,XREAL_1:13;
              hence thesis by A4,A9;
            end;
            hence for i be Nat st 1<= i & i<=len s holds
            ex si be Element of product F
            st si=s.i & x.i = si.i by A3,A4;
          end;
          suppose A10: len s > m;
A11:     len s = m+1 by A4,A10,NAT_1:8;
A12:      len s <= n by A4,A10,NAT_1:8;
            then len s in Seg n by A4; then
            reconsider ls=len s as Element of Seg n;
            set t=s|m;
A13:     m < m+1 by NAT_1:13;
A14:          m in NAT by ORDINAL1:def 12;
            dom s= Seg (m+1) by A11,FINSEQ_1:def 3;
            then Seg m c= dom s by A13,FINSEQ_1:5;
            then dom t = Seg m by RELAT_1:62;
            then A15:len t =m by FINSEQ_1:def 3,A14;
A16:      0+1 <= m by A8,NAT_1:13;
A17:       (m+1)-1 <= n -0 by A4,XREAL_1:13;
A18:         dom s = Seg len s & dom t = Seg len t by FINSEQ_1:def 3;
A19:       now let k be Element of Seg n;
            assume A20: k in dom t; then
A21:       t.k = s.k by FUNCT_1:47;
            Seg len t c= Seg len s by A15,A10,FINSEQ_1:5;
            hence t.k in ProjGroup(F,k) by A21,A4,A20,A18;
          end;
          set y=Product t;
A22:     len s in Seg len s by A4; then
          reconsider sn=s.len s as Element of product F by A18,FINSEQ_2:11;
A23:     s=t^<* sn *> by A11,FINSEQ_3:55;
A24:     x = y*sn by A23,A4,GROUP_4:6;
          s.len s in ProjGroup(F,ls) by A18,A4,A22; 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;
          set Gn=F.ls;
          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 for i be Nat st 1<= i & i<=len s
          holds ex si be Element of product F st si=s.i & x.i = si.i
          proof
            let i be Nat;
            assume A27:1<= i & i<=len s;
            per cases;
            suppose A28: i <> len s; then
              A29: i < len s by A27,XXREAL_0:1;
              len s = len t + len (<* sn *>) by A23,FINSEQ_1:22
              .= len t + 1 by FINSEQ_1:40; then
              A30: 1<= i & i<=len t by A27,A29,NAT_1:13;
              then consider ti be Element of product F such that
              A31: ti=t.i & y.i = ti.i by A3,A17,A19,A15,A16;
              A32:t.i =s.i by A30,A23,FINSEQ_1:64;
              1<=i & i <= n by A30,A17,A15,XXREAL_0:2; then
              reconsider ii=i as Element of Seg n by FINSEQ_1:1;
A33:         sn.ii = 1_F.ii by A26,A28;
              consider Rii being 1-sorted such that
              A34: Rii = F.ii & (Carrier F).ii = the carrier of Rii
              by PRALG_1:def 15;
              A35:the carrier of product F = product Carrier F
                by GROUP_7:def 2;
              A36: dom (Carrier F) = Seg n by PARTFUN1:def 2;
              reconsider tii=ti.i as Element of F.ii by A34,A35,A36,CARD_3:9;
              x.i =tii*(1_F.ii) by A31,A33,A24,GROUP_7:1
              .=ti.i by GROUP_1:def 4;
              hence thesis by A31,A32;
            end;
            suppose A37: i = len s;
              A38: y.i = 1_Gn by A37,Th8,A19,A10,A15,A12,A27;
              x.i =(1_Gn)*gn by A37,A38,A26,A24,GROUP_7:1
              .=sn.i by A26,A37,GROUP_1:def 4;
              hence thesis by A37;
            end;
          end;
        end;
      end;
      hence for i be Nat st 1<= i & i<=len s
      holds ex si be Element of product F st si=s.i & x.i = si.i;
    end;
  end;
  A39: for m be Nat holds P[m] from NAT_1:sch 2(A1,A2);
  thus for x be Element of product F,
  s be FinSequence of product F st len s = n
  & (for k be Element of Seg n holds s.k in ProjGroup(F,k)) & x=Product s
  holds
  for i be Nat st 1<= i & i<= n holds
  ex si be Element of product F st si=s.i & x.i = si.i
  proof
    let x be Element of product F, s be FinSequence of product F;
    assume A40: len s = n
    & (for k be Element of Seg n holds s.k
    in ProjGroup(F,k)) & x=Product s;
A41: 1<=len s & len s <= n by A40,NAT_1:14;
    for k be Element of Seg n st k in dom s holds s.k in ProjGroup(F,k) by A40;
    hence thesis by A40,A41,A39;
  end;
end;
