reserve X for RealUnitarySpace;
reserve x, y, y1, y2 for Point of X;
reserve xd for set;
reserve i, j, n for Nat;

theorem Th11:
  for X st the addF of X is commutative associative &
  the addF of X is having_a_unity for x
  for S be finite OrthonormalFamily of X st S is non empty
  for H be Function of the carrier of X, REAL st
  S c= dom H & (for y st y in S holds H.y= (x.|.y)^2)
  for F be Function of the carrier of X, the carrier of X st
  S c= dom F & (for y st y in S holds F.y = (x.|.y)*y) holds
  x.|.setopfunc(S, the carrier of X, the carrier of X, F, 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 and
A2: the addF of X is having_a_unity;
  let x;
  let S be finite OrthonormalFamily of X such that
A3: S is non empty;
  let H be Function of the carrier of X, REAL such that
A4: S c= dom H and
A5: for y st y in S holds H.y= (x.|.y)^2;
  let F be Function of the carrier of X, the carrier of X such that
A6: S c= dom F and
A7: for y st y in S holds F.y = (x.|.y)*y;
  consider p be FinSequence of the carrier of X such that
A8: p is one-to-one and
A9: rng p = S and
A10: setopfunc(S, the carrier of X, the carrier of X, F, the addF of X)
  = (the addF of X) "**" Func_Seq(F,p) by A1,A2,Def5;
A11: for y st y in S holds H.y = (the scalar of X).[x,(F.y)]
  proof
    let y such that
A12: y in S;
    set a = x.|.y;
    H.y = (x.|.y)^2 by A5,A12
      .= x.|.(a*y) by BHSP_1:3
      .= (the scalar of X).[x,(a*y)] by BHSP_1:def 1
      .= (the scalar of X).[x,(F.y)] by A7,A12;
    hence thesis;
  end;
A13: setopfunc(S, the carrier of X, REAL, H, addreal)
  = addreal "**" Func_Seq(H,p) by A8,A9,Def5;
  x.|.setopfunc(S, the carrier of X, the carrier of X, F, the addF of X)
  = (the scalar of X).[x,(the addF of X) "**" Func_Seq(F,p)]
  by A10,BHSP_1:def 1;
  hence thesis by A3,A4,A6,A8,A9,A11,A13,Th10;
end;
