reserve x,y for set,
  i,j,k,l,m,n for Nat,
  K for Field,
  N for without_zero finite Subset of NAT,
  a,b for Element of K,
  A,B,B1,B2,X,X1,X2 for (Matrix of K),
  A9 for (Matrix of m,n,K),
  B9 for (Matrix of m,k,K);

theorem Th3:
  for K be non empty addLoopStr, f,g,h,w be FinSequence of K st
  len f = len g & len h = len w holds (f^h) + (g^w)= (f+g) ^ (h+w)
proof
  let K be non empty addLoopStr, f,g,h,w be FinSequence of K such that
A1: len f=len g and
A2: len h = len w;
  set KK=the carrier of K;
  reconsider H=h,W=w as Element of (len h)-tuples_on KK by A2,FINSEQ_2:92;
  reconsider F=f,G=g as Element of (len f)-tuples_on KK by A1,FINSEQ_2:92;
  reconsider FH=F^H,GW=G^W,Th36W=(F+G)^(H+W) as Tuple of len f+len h, KK;
  reconsider FH,GW,Th36W as Element of (len f+len h) -tuples_on KK
              by FINSEQ_2:131;
  now
    let i such that
A3: i in Seg (len f+len h);
A4: i in dom FH by A3,FINSEQ_2:124;
    now
      per cases by A4,FINSEQ_1:25;
      suppose
A5:     i in dom f;
A6:     rng f c= KK & rng g c= KK by RELAT_1:def 19;
A7:     dom (F+G)=Seg len f by FINSEQ_2:124;
A8:     f.i in rng f by A5,FUNCT_1:def 3;
A9:     dom F=Seg len f by FINSEQ_2:124;
A10:    dom G=Seg len f by FINSEQ_2:124;
        then g.i in rng g by A5,A9,FUNCT_1:def 3;
        then reconsider fi=f.i,gi=g.i as Element of K by A8,A6;
A11:    FH.i=fi by A5,FINSEQ_1:def 7;
        GW.i=gi by A5,A9,A10,FINSEQ_1:def 7;
        hence (FH+GW).i = fi+gi by A3,A11,FVSUM_1:18
          .= (F+G).i by A5,A9,FVSUM_1:18
          .= Th36W.i by A5,A9,A7,FINSEQ_1:def 7;
      end;
      suppose
        ex n st n in dom h & i=len f + n;
        then consider n such that
A12:    n in dom h and
A13:    i=len f + n;
A14:    h.n in rng h by A12,FUNCT_1:def 3;
A15:    rng h c= KK & rng w c= KK by RELAT_1:def 19;
A16:    dom H=Seg len h by FINSEQ_2:124;
A17:    dom W=Seg len h by FINSEQ_2:124;
        then w.n in rng w by A12,A16,FUNCT_1:def 3;
        then reconsider hn=h.n,wn=w.n as Element of K by A14,A15;
A18:    FH.i=hn by A12,A13,FINSEQ_1:def 7;
A19:    dom (H+W)=Seg len h & len (F+G)=len f by CARD_1:def 7,FINSEQ_2:124;
        GW.i=wn by A1,A12,A13,A16,A17,FINSEQ_1:def 7;
        hence (FH+GW).i = hn+wn by A3,A18,FVSUM_1:18
          .= (H+W).n by A12,A16,FVSUM_1:18
          .= Th36W.i by A12,A13,A16,A19,FINSEQ_1:def 7;
      end;
    end;
    hence (FH+GW).i=Th36W.i;
  end;
  hence thesis by FINSEQ_2:119;
end;
