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

theorem Th2:
  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 I
  be Function of the carrier of X, the carrier of X st S c= dom I & (for y st y
in S holds I.y = y) for H be Function of the carrier of X, REAL st S c= dom H &
  (for y st y in S holds H.y= (y.|.y)) holds setopfunc(S, the carrier of X, the
carrier of X, I, the addF of X) .|. setopfunc(S, the carrier of X, the carrier
  of X, I, the addF of X) = 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;
  let S be finite OrthogonalFamily of X such that
A2: S is non empty;
  let I be Function of the carrier of X, the carrier of X such that
A3: S c= dom I and
A4: for y st y in S holds I.y = y;
  consider p be FinSequence of the carrier of X such that
A5: p is one-to-one & rng p = S and
A6: setopfunc(S, (the carrier of X), (the carrier of X), I, (the addF of
  X)) = (the addF of X) "**" Func_Seq(I, p) by A1,BHSP_5:def 5;
  let H be Function of the carrier of X, REAL such that
A7: S c= dom H and
A8: for y st y in S holds H.y= y.|.y;
A9: setopfunc(S, the carrier of X, REAL, H, addreal) = addreal "**" Func_Seq
  (H, p) by A5,BHSP_5:def 5;
A10: for y1, y2 st y1 in S & y2 in S & y1 <> y2 holds (the scalar of X).[I.
  y1, I.y2] = 0
  proof
    let y1, y2;
    assume that
A11: y1 in S & y2 in S and
A12: y1 <> y2;
A13: y1.|.y2 = 0 by A11,A12,BHSP_5:def 8;
    I.y1 = y1 & I.y2 = y2 by A4,A11;
    hence thesis by A13,BHSP_1:def 1;
  end;
  for y st y in S holds H.y = (the scalar of X).[I.y, I.y]
  proof
    let y;
    assume
A14: y in S;
    then
A15: I.y = y by A4;
    H.y = (y.|.y) by A8,A14
      .= (the scalar of X).[I.y, I.y] by A15,BHSP_1:def 1;
    hence thesis;
  end;
  then
  (the scalar of X).[(the addF of X) "**" Func_Seq(I, p), (the addF of X)
  "**" Func_Seq(I, p)] = addreal "**" Func_Seq(H, p) by A2,A3,A7,A5,A10,
BHSP_5:9;
  hence thesis by A6,A9,BHSP_1:def 1;
end;
