reserve R for Ring,
  V for RightMod of R,
  a,b for Scalar of R,
  x,y for set,
  p,q ,r for FinSequence,
  i,k for Nat,
  u,v,v1,v2,v3,w for Vector of V,
  F,G,H for FinSequence of V,
  A,B for Subset of V,
  f for Function of V, R,
  S,T for finite Subset of V;

theorem Th1:
  len F = len G & (for k,v st k in dom F & v = G.k holds F.k = v *
  a) implies Sum(F) = Sum(G) * a
proof
  defpred P[Nat] means for H,I be FinSequence of V st len H = len I & len H =
$1 & (for k,v st k in dom H & v = I.k holds H.k = v * a) holds Sum(H) = Sum(I)
  * a;
  now
    let n be Nat;
    assume
A1: for H,I be FinSequence of V st len H = len I & len H = n & for k,
    v st k in dom H & v = I.k holds H.k = v * a holds Sum(H) = Sum(I) * a;
    let H,I be FinSequence of V;
    assume that
A2: len H = len I and
A3: len H = n + 1 and
A4: for k,v st k in dom H & v = I.k holds H.k = v * a;
    reconsider p = H | (Seg n),q = I | (Seg n) as FinSequence of V by
FINSEQ_1:18;
A5: n <= n + 1 by NAT_1:12;
    then
A6: len p = n by A3,FINSEQ_1:17;
A7: len q = n by A2,A3,A5,FINSEQ_1:17;
A8: now
      len p <= len H by A3,A5,FINSEQ_1:17;
      then
A9:   dom p c= dom H by FINSEQ_3:30;
      let k,v;
      assume that
A10:  k in dom p and
A11:  v = q.k;
      dom p = dom q by A6,A7,FINSEQ_3:29;
      then I.k = q.k by A10,FUNCT_1:47;
      then H.k = v * a by A4,A10,A11,A9;
      hence p.k = v * a by A10,FUNCT_1:47;
    end;
A12: n + 1 in Seg(n + 1) by FINSEQ_1:4;
    then n + 1 in dom H & n + 1 in dom I by A2,A3,FINSEQ_1:def 3;
    then reconsider v1 = H.(n + 1),v2 = I.(n + 1) as Vector of V by FINSEQ_2:11
;
    n + 1 in dom H by A3,A12,FINSEQ_1:def 3;
    then
A13: v1 = v2 * a by A4;
    thus Sum(H) = Sum(p) + v1 by A3,A6,Lm1
      .= Sum(q) * a + v2 * a by A1,A6,A7,A8,A13
      .= (Sum(q) + v2) * a by VECTSP_2:def 9
      .= Sum(I) * a by A2,A3,A7,Lm1;
  end;
  then
A14: for i be Nat st P[i] holds P[i+1];
  now
    let H,I be FinSequence of V;
    assume that
A15: len H = len I and
A16: len H = 0 and
    for k,v st k in dom H & v = I.k holds H.k = v * a;
    H = <*>(the carrier of V) by A16;
    then
A17: Sum(H) = 0.V by RLVECT_1:43;
    I = <*>(the carrier of V) by A15,A16;
    then Sum(I) = 0.V by RLVECT_1:43;
    hence Sum(H) = Sum(I) * a by A17,VECTSP_2:32;
  end;
  then
A18: P[0];
  for n being Nat holds P[n] from NAT_1:sch 2(A18,A14);
  hence thesis;
end;
