
theorem LM87:
  for V be RealLinearSpace,
      f be Functional of V,
      s be FinSequence of V
    st f is additive
  holds f.(Sum s) = Sum(f*s)
proof
  let V be RealLinearSpace,
      f be Functional of V,
      s be FinSequence of V;
  assume A1: f is additive;
  defpred P[Nat] means
    for V be RealLinearSpace,
        f be Functional of V,
        s be FinSequence of V
     st len s = $1 & f is additive
    holds f.(Sum s) = Sum (f*s);
A2: P[0]
  proof
    let V be RealLinearSpace,
        f be Functional of V,
        s be FinSequence of V;
    assume that
A3: len s = 0 and
A4: f is additive;
B5: Sum s = 0.V by A3,RLVECT_1:75;
    dom f = the carrier of V by FUNCT_2:def 1; then
    rng s c= dom f; then
    dom(f*s) = dom s by RELAT_1:27
            .= Seg len s by FINSEQ_1:def 3; then
    len (f*s) = 0 by A3,FINSEQ_1:def 3; then
    f*s = <*>REAL;
    hence thesis by B5,A4,HAHNBAN:20,RVSUM_1:72;
  end;
A6: for n be Nat st P[n] holds P[n+1]
  proof
    let n be Nat;
    assume A7: P[n];
      let V be RealLinearSpace,
          f be Functional of V,
          s be FinSequence of V;
      assume that
A8:   len s = n+1 and
A9:   f is additive;
      set s0=s|n, p=f*s;
B10:  dom s = Seg(n+1) by A8,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 Point of V;
A11:  n = len s0 by A8,FINSEQ_1:59,NAT_1:11; then
B12:  s0 = s | dom s0 by FINSEQ_1:def 3;
A13:  f.(s.(n+1)) = (f*s).(n+1) by B10,FINSEQ_1:4,FUNCT_1:13;
A15:  f.(Sum s) = f.(Sum s0 + v) by B12,A8,A11,RLVECT_1:38
               .= f.(Sum s0) + f.(s.(n+1)) by A9,HAHNBAN:def 2
               .= Sum(f*s0) + p.(n+1) by A13,A7,A9,A11;
      dom f = the carrier of V by FUNCT_2:def 1; then
      rng s c= dom f; then
B18:  dom(f*s) = dom s by RELAT_1:27
              .= Seg len s by FINSEQ_1:def 3; then
A17:  len (f*s) = n+1 by A8,FINSEQ_1:def 3;
A18:  1 <= n+1 <= len p by NAT_1:11,B18,A8,FINSEQ_1:def 3;
      p = (p|n)^<*p/.(n+1)*> by A17,FINSEQ_5:21; then
      p = (p|n)^<*p.(n+1)*> by A18,FINSEQ_4:15; then
      Sum p = Sum(p|n) + p.(n+1) by RVSUM_1:74;
      hence thesis by A15,RELAT_1:83;
  end;
A19: for n be Nat holds P[n] from NAT_1:sch 2(A2,A6);
  len s is Nat;
  hence thesis by A1,A19;
end;
