reserve L for Abelian left_zeroed add-associative associative right_zeroed
              right_complementable distributive non empty doubleLoopStr;
reserve a,b,c for Element of L;
reserve R for non degenerated comRing;
reserve n,m,i,j,k for Nat;
 reserve D for Function of R, R;
 reserve x,y,z for Element of R;
reserve D for Derivation of R;
reserve s for FinSequence of the carrier of R;
reserve h for Function of R,R;

theorem Th11:
   for h,s st h is additive holds h.(Sum s) = Sum(h*s)
   proof
     let h,s;
     assume
A1:  h is additive;
     defpred P[Nat] means
     for h,s holds
     len s = $1 & h is additive implies h.(Sum s) = Sum (h*s);
A2:  P[0]
     proof
      let h,s;
      assume that
A3:   len s = 0 and
A4:   h is additive;
      Sum s = 0.R by A3,RLVECT_1:75; then
A6:   h.(Sum s) = 0.R by A4,RING_2:6;
      dom h = the carrier of R by FUNCT_2:def 1; then
      rng s c= dom h; then
      dom(h*s) = dom s by RELAT_1:27 .= Seg len s by FINSEQ_1:def 3; then
      h*s = <*>the carrier of R by A3;
      hence thesis by A6,RLVECT_1:43;
     end;
A9: for n be Nat st P[n] holds P[n+1]
     proof
      let n;
      assume
A10:   P[n];
      for h,s holds
      len s = n+1 & h is additive implies h.(Sum s) = Sum (h*s)
      proof
        let h,s;
        assume that
A11:    len s = n+1 and
A12:    h is additive;
        set s0=s|n;
        dom s = Seg(n+1) by A11,FINSEQ_1:def 3; then
        s.(n+1) in rng s by FUNCT_1:3,FINSEQ_1:4; then
        reconsider v=s.(n+1) as Element of R;
A13:    n = len s0 by A11,FINSEQ_1:59,NAT_1:11;
        1 <= n+1 <= len s by A11,NAT_1:11; then
A15:    s/.len s = s.(n+1) by A11,FINSEQ_4:15; then
A16:    s = (s|n)^<*v*> by A11,FINSEQ_5:21;
A17:    h*s = h*((s|n)^<*v*>) by A15,A11,FINSEQ_5:21
        .= (h*s0)^<*h.v*> by FINSEQOP:8;
        h.(Sum s) = h.(Sum s0 + Sum<*v*>) by A16,RLVECT_1:41
        .= h.(Sum s0 + v) by RLVECT_1:44
        .= h.(Sum s0) + h.v by A12
        .= Sum(h*s0) + h.v by A10,A12,A13
        .= Sum(h*s0) + Sum <*h.v*> by RLVECT_1:44
        .= Sum(h*s) by A17,RLVECT_1:41;
        hence thesis;
        end;
        hence thesis;
      end;
A18:  for n be Nat holds P[n] from NAT_1:sch 2(A2,A9);
      len s is Nat;
      hence thesis by A1,A18;
    end;
