reserve X for RealUnitarySpace;
reserve x, y, y1, y2 for Point of X;

theorem Th3:
  for X st the addF of X is commutative associative & the addF of X
is having_a_unity for S be finite OrthogonalFamily of X st S is non empty for H
be Functional of X st S c= dom H & (for x st x in S holds H.x = (x.|.x)) holds
  (setsum(S)).|.(setsum(S)) = setopfunc(S, the carrier of X, REAL, H, addreal)
proof
  let X such that
A1: the addF of X is commutative associative & the addF of X is having_a_unity;
  reconsider I = id the carrier of X as Function of the carrier of X, the
  carrier of X;
  let S be finite OrthogonalFamily of X such that
A2: S is non empty;
  let H be Functional of X such that
A3: S c= dom H & for x st x in S holds H.x = (x.|.x);
A4: for x st x in S holds I.x = x;
A5: dom I = the carrier of X by FUNCT_2:def 1;
  for x be set st x in the carrier of X holds I.x = x by FUNCT_1:18;
  then
  setsum(S) = setopfunc(S, the carrier of X, the carrier of X, I, the addF
  of X) by A1,A5,BHSP_6:1;
  hence thesis by A1,A2,A3,A5,A4,Th2;
end;
