
theorem Th1:
for L being add-associative right_zeroed right_complementable
            right-distributive non empty doubleLoopStr
for a being Element of L
for p,q being FinSequence of L
st len p = len q &
   for i being Element of NAT st i in dom p holds q/.i = a * (p/.i)
holds Sum q = a * Sum p
proof
let L be add-associative right_zeroed right_complementable
         right-distributive non empty doubleLoopStr,
    a be Element of L,
    p,q be FinSequence of L;
assume A1: len p = len q &
           for i being Element of NAT st i in dom p
           holds q/.i = a * (p/.i);
consider fq being sequence of the carrier of L such that
A2: Sum q = fq.(len q) and
A3: fq.0 = 0.L and
A4: for j being Nat, v being Element of L
    st j < len q & v = q.(j + 1)
    holds fq.(j + 1) = fq.j + v by RLVECT_1:def 12;
consider fp being sequence of the carrier of L such that
A5: Sum p = fp.(len p) and
A6: fp.0 = 0.L and
A7: for j being Nat, v being Element of L
     st j < len p & v = p.(j + 1)
     holds fp.(j + 1) = fp.j + v by RLVECT_1:def 12;
defpred P[Element of NAT] means fq.($1) = a * fp.($1);
A8: P[0] by A6,A3;
A9: for j being Element of NAT st 0 <= j & j < len p
    holds P[j] implies P[j+1]
    proof
    let j be Element of NAT;
    assume A10: 0 <= j & j < len p;
    assume A11: P[j];
    A12: 1 <= j + 1 by NAT_1:11;
    A13: j + 1 <= len p by A10,NAT_1:13;
    then j+1 in Seg(len q) by A12,A1;
    then A14: j+1 in dom q by FINSEQ_1:def 3;
    j+1 in Seg(len p) by A12,A13;
    then A15: j+1 in dom p by FINSEQ_1:def 3;
    set vq = q/.(j+1), vp = p/.(j+1);
    A16: vq = q.(j+1) by A14,PARTFUN1:def 6;
    A17: vp = p.(j+1) by A15,PARTFUN1:def 6;
    fq.(j+1) = (a * fp.j) + vq by A11,A1,A16,A10,A4
            .= (a * fp.j) + (a * vp) by A1,A15
            .= a * (fp.j + vp) by VECTSP_1:def 2
            .= a * fp.(j+1) by A17,A10,A7;
    hence P[j+1];
    end;
for j being Element of NAT st 0 <= j & j <= len p
  holds P[j] from INT_1:sch 7(A8,A9);
hence thesis by A1,A5,A2;
end;
