reserve i, j, m, n, k for Nat,
  x, y for set,
  K for Field,
  a,a1 for Element of K;
reserve V1,V2,V3 for finite-dimensional VectSp of K,
  f for Function of V1,V2,

  b1,b19 for OrdBasis of V1,
  B1 for FinSequence of V1,
  b2 for OrdBasis of V2,
  B2 for FinSequence of V2,

  B3 for FinSequence of V3,
  v1,w1 for Element of V1,
  R,R1,R2 for FinSequence of V1,
  p,p1,p2 for FinSequence of K;

theorem
  Sum lmlt(len R|->a,R) = a * Sum R
proof
  defpred P[Nat] means for R,a st len R=$1 holds Sum lmlt(len R|->a,R) = a *
  Sum R;
A1: for n st P[n] holds P[n+1]
  proof
    let n such that
A2: P[n];
    set n1=n+1;
    let R,a such that
A3: len R=n1;
A4: len (R|n)=n by A3,FINSEQ_1:59,NAT_1:11;
    then
A5: dom (R|n)=Seg n by FINSEQ_1:def 3;
    1<=n1 by NAT_1:11;
    then n1 in dom R by A3,FINSEQ_3:25;
    then
A6: R/.n1=R.n1 by PARTFUN1:def 6;
A7: lmlt(<*a*>,<*R/.n1*>) = <*a*R/.n1*> by FINSEQ_2:74;
A8: len <*a*>=1 & len <*R.n1*>=1 by FINSEQ_1:39;
A9: (n1|->a)=(n|->a)^<*a*> & len (n|->a)=n by CARD_1:def 7,FINSEQ_2:60;
    R=(R|n)^<*R.n1*> by A3,FINSEQ_3:55;
    hence
    Sum lmlt(len R|->a,R) = Sum(lmlt(n|->a,R|n)^lmlt(<*a*>,<*R/.n1*>)) by A3,A6
,A4,A9,A8,Th9
      .= Sum lmlt(n|->a,R|n) + Sum lmlt(<*a*>,<*R/.n1*>) by RLVECT_1:41
      .= a*Sum (R|n)+Sum <*a*R/.n1*> by A2,A4,A7
      .= a*Sum (R|n)+ a* R/.n1 by RLVECT_1:44
      .= a*(Sum (R|n)+R/.n1) by VECTSP_1:def 14
      .= a* Sum R by A3,A6,A4,A5,RLVECT_1:38;
  end;
A10: P[0]
  proof
    let R,a such that
A11: len R=0;
    set L=len R|->a;
    set M=lmlt(L,R);
    len L=len R by CARD_1:def 7;
    then dom L=dom R by FINSEQ_3:29;
    then dom M=dom R by MATRLIN:12;
    then len R=len M by FINSEQ_3:29;
    then M=<*>(the carrier of V1) by A11;
    then
A12: Sum M=0.V1 by RLVECT_1:43;
    R=<*>(the carrier of V1) by A11;
    then Sum R=0.V1 by RLVECT_1:43;
    hence thesis by A12,VECTSP_1:14;
  end;
  for n holds P[n] from NAT_1:sch 2(A10,A1);
  hence thesis;
end;
