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

theorem Th1:
  for X st the addF of X is commutative associative & the addF of X
is having_a_unity for Y be finite Subset of X for I be Function of the carrier
of X,the carrier of X st Y c= dom I & for x be set st x in dom I holds I.x = x
holds setsum(Y) = setopfunc(Y, the carrier of X, the carrier of X, I, the addF
  of X)
proof
  let X such that
A1: the addF of X is commutative associative & the addF of X is having_a_unity;
  let Y be finite Subset of X;
  consider p being FinSequence of the carrier of X such that
A2: p is one-to-one and
A3: rng p = Y and
A4: setsum(Y) = (the addF of X) "**" p by A1,Def1;
  let I be Function of the carrier of X,the carrier of X such that
A5: Y c= dom I and
A6: for x be set st x in dom I holds I.x = x;
  now
    let xd be object;
A7: xd in dom p implies p.xd in rng(p) by FUNCT_1:3;
    xd in dom(Func_Seq(I,p)) iff xd in dom(I*p) by BHSP_5:def 4;
    hence xd in dom(Func_Seq(I,p)) iff xd in dom p by A5,A3,A7,FUNCT_1:11;
  end;
  then
A8: dom Func_Seq(I,p)=dom p by TARSKI:2;
  now
    let s be object;
    assume
A9: s in dom Func_Seq(I,p);
    then reconsider i = s as Nat;
A10: p.i in rng(p) by A8,A9,FUNCT_1:3;
    Func_Seq(I,p).s = (I*p).i by BHSP_5:def 4
      .= I.(p.i) by A8,A9,FUNCT_1:13
      .= p.i by A5,A6,A3,A10;
    hence Func_Seq(I,p).s = p.s;
  end;
  then Func_Seq(I,p) =p by A8,FUNCT_1:2;
  hence thesis by A1,A2,A3,A4,BHSP_5:def 5;
end;
