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

theorem Th10:
  for S be finite non empty Subset of X
  for F be Function of the carrier of X, the carrier of X st S c= dom F
  for H be Function of the carrier of X, REAL
  st S c= dom H & (for y st y in S holds H.y = (the scalar of X).[x,F.y])
  for p be FinSequence of the carrier of X st p is one-to-one & rng p = S
  holds (the scalar of X).[x,(the addF of X) "**" Func_Seq(F,p) ]
  = addreal "**" Func_Seq(H,p)
proof
  let S be finite non empty Subset of X;
  let F be Function of the carrier of X, the carrier of X such that
A1: S c= dom F;
  let H be Function of the carrier of X, REAL such that
A2: S c= dom H and
A3: for y st y in S holds H.y = (the scalar of X).[x,(F.y)];
  let p be FinSequence of the carrier of X such that
A4: p is one-to-one and
A5: rng p = S;
  set p1=Func_Seq(F,p);
  set q1=Func_Seq(H,p);
  now
    let xd be object;
    xd in dom p implies p.xd in rng p by FUNCT_1:3;
    hence xd in dom Func_Seq(F,p) iff xd in dom p by A1,A5,FUNCT_1:11;
  end;
  then
A6: dom Func_Seq(F,p)=dom p by TARSKI:2;
  now
    let xd be object;
    xd in dom p implies p.xd in rng p by FUNCT_1:3;
    hence xd in dom(Func_Seq(H,p)) iff xd in dom p by A2,A5,FUNCT_1:11;
  end;
  then
A7: dom Func_Seq(H,p)=dom p by TARSKI:2;
A8: for i st i in dom p1 holds q1.i = (the scalar of X).[x,(p1.i)]
  proof
    let i such that
A9: i in dom p1;
A10: p.i in S by A5,A6,A9,FUNCT_1:3;
    q1.i = H.(p.i) by A6,A9,FUNCT_1:13
      .= (the scalar of X).[x,(F.(p.i))] by A3,A10
      .= (the scalar of X).[x,(p1.i)] by A6,A9,FUNCT_1:13;
    hence thesis;
  end;
A11: Seg len p = dom(Func_Seq(F,p)) by A6,FINSEQ_1:def 3
    .= Seg len Func_Seq(F,p) by FINSEQ_1:def 3;
A12: len p = card S by A4,A5,FINSEQ_4:62;
  0 < card S;
  then 0+1 <= card S by INT_1:7;
  then len Func_Seq(F,p) >= 1 by A11,A12,FINSEQ_1:6;
  then x.|.((the addF of X) "**" p1) = addreal "**" q1 by A6,A7,A8,Th8;
  hence thesis by BHSP_1:def 1;
end;
