reserve x,y for set,
        r,s for Real,
        S for non empty addLoopStr,
        LS,LS1,LS2 for Linear_Combination of S,
        G for Abelian add-associative right_zeroed right_complementable
          non empty addLoopStr,
        LG,LG1,LG2 for Linear_Combination of G,
        g,h for Element of G,
        RLS for non empty RLSStruct,
        R for vector-distributive scalar-distributive scalar-associative
        scalar-unitalnon empty RLSStruct,
        AR for Subset of R,
        LR,LR1,LR2 for Linear_Combination of R,
        V for RealLinearSpace,
        v,v1,v2,w,p for VECTOR of V,
        A,B for Subset of V,
        F1,F2 for Subset-Family of V,
        L,L1,L2 for Linear_Combination of V;

theorem Th37:
  sum LG = sum (g+LG)
  proof
    set gL=g+LG;
    deffunc F(Element of G)=$1+g;
    consider f be Function of the carrier of G,the carrier of G such that
    A1: for h holds f.h=F(h) from FUNCT_2:sch 4;
    consider F be FinSequence of G such that
    A2: F is one-to-one and
    A3: rng F=Carrier LG and
    A4: sum LG=Sum(LG*F) by Def3;
    A5: len(f*F)=len F by FINSEQ_2:33;
    A6: len(LG*F)=len F by FINSEQ_2:33;
    A7: len(gL*(f*F))=len(f*F) by FINSEQ_2:33;
    A8: now let k be Nat;
          assume A9: 1<=k & k<=len F;
          then k in dom F by FINSEQ_3:25;
          then A10: F/.k=F.k by PARTFUN1:def 6;
          k in dom(LG*F) by A6,A9,FINSEQ_3:25;
          then A11: (LG*F).k=LG.(F.k) by FUNCT_1:12;
          k in dom(gL*(f*F)) by A5,A7,A9,FINSEQ_3:25;
          then A12: (gL*(f*F)).k=gL.((f*F).k) by FUNCT_1:12;
          k in dom(f*F) by A5,A9,FINSEQ_3:25;
          then (f*F).k=f.(F.k) by FUNCT_1:12;
          then (f*F).k=F/.k+g by A1,A10;
          hence (gL*(f*F)).k = LG.(F/.k+g-g) by A12,Def1
                            .= LG.(F/.k+g+-g) by RLVECT_1:def 11
                            .= LG.(F/.k+(g+-g)) by RLVECT_1:def 3
                            .= LG.(F/.k+0.G) by RLVECT_1:def 10
                            .= (LG*F).k by A10,A11;
        end;
    now let x1,x2 be object such that
      A13: x1 in dom(f*F) and
      A14: x2 in dom(f*F) and
      A15: (f*F).x1=(f*F).x2;
      A16: f.(F/.x1)=F/.x1+g by A1;
      A17: x1 in dom F by A13,FUNCT_1:11;
      then A18: F.x1=F/.x1 by PARTFUN1:def 6;
      A19: x2 in dom F by A14,FUNCT_1:11;
      then A20: F.x2=F/.x2 by PARTFUN1:def 6;
      (f*F).x1=f.(F.x1) & (f*F).x2=f.(F.x2) by A13,A14,FUNCT_1:12;
      then F/.x1+g=F/.x2+g by A1,A15,A16,A18,A20;
      then F/.x1=F/.x2 by RLVECT_1:8;
      hence x1=x2 by A2,A17,A18,A19,A20,FUNCT_1:def 4;
    end;
    then A21: f*F is one-to-one by FUNCT_1:def 4;
    Carrier gL c=rng(f*F)
    proof
      let x be object;
      assume x in Carrier gL;
      then x in g+Carrier LG by Th16;
      then consider h such that
      A22: x=g+h and
      A23: h in Carrier LG;
      consider y being object such that
      A24: y in dom F and
      A25: F.y=h by A3,A23,FUNCT_1:def 3;
      A26: f.(F.y)=x by A1,A22,A25;
      dom f=the carrier of G by FUNCT_2:def 1;
      then A27: y in dom(f*F) by A24,A25,FUNCT_1:11;
      then (f*F).y in rng(f*F) by FUNCT_1:def 3;
      hence thesis by A26,A27,FUNCT_1:12;
    end;
    then sum gL=Sum(gL*(f*F)) by A21,Th30;
    hence thesis by A4,A5,A6,A7,A8,FINSEQ_1:14;
  end;
