reserve X for RealUnitarySpace;
reserve x for Point of X;
reserve i, n for Nat;

theorem Th5:
  for X st the addF of X is commutative associative & the addF of X
  is having_a_unity for S be finite Subset of X st S is non empty for L be
linear-Functional of X holds L.(setsum(S)) = setopfunc(S,the carrier of X,REAL,
  L, addreal)
proof
  let X such that
A1: the addF of X is commutative associative & the addF of X is having_a_unity;
  let S be finite Subset of X;
  assume S is non empty;
  then
A2: 0+1 <= card S by INT_1:7;
  let L be linear-Functional of X;
  consider p be FinSequence of the carrier of X such that
A3: p is one-to-one & rng p = S and
A4: setsum(S) = (the addF of X) "**" p by A1,Def1;
  reconsider q1 = Func_Seq(L,p) as FinSequence of REAL;
A5: for i st i in dom p holds q1.i = L.(p.i)
  proof
    let i such that
A6: i in dom p;
    q1.i = (L*p).i by BHSP_5:def 4
      .= L.(p.i) by A6,FUNCT_1:13;
    hence thesis;
  end;
A7: dom L = the carrier of X by FUNCT_2:def 1;
  now
    let xd be object;
A8: xd in dom p implies p.xd in rng(p) by FUNCT_1:3;
    xd in dom(Func_Seq(L,p)) iff xd in dom(L*p) by BHSP_5:def 4;
    hence xd in dom(Func_Seq(L,p)) iff xd in dom p by A7,A8,FUNCT_1:11;
  end;
  then
A9: dom Func_Seq(L,p)=dom p by TARSKI:2;
  len p >=1 by A3,A2,FINSEQ_4:62;
  then L.((the addF of X) "**" p) = addreal "**" q1 by A9,A5,Th4;
  hence thesis by A3,A4,BHSP_5:def 5;
end;
