let X be RealUnitarySpace; :: thesis: for p being FinSequence of the carrier of X st len p >= 1 & ( for i, j being Element of NAT st i in dom p & j in dom p & i <> j holds
the scalar of X . [(p . i),(p . j)] = 0 ) holds
for q being FinSequence of REAL st dom p = dom q & ( for i being Element of NAT st i in dom q holds
q . i = the scalar of X . [(p . i),(p . i)] ) holds
( the addF of X "**" p) .|. ( the addF of X "**" p) = addreal "**" q

let p be FinSequence of the carrier of X; :: thesis: ( len p >= 1 & ( for i, j being Element of NAT st i in dom p & j in dom p & i <> j holds
the scalar of X . [(p . i),(p . j)] = 0 ) implies for q being FinSequence of REAL st dom p = dom q & ( for i being Element of NAT st i in dom q holds
q . i = the scalar of X . [(p . i),(p . i)] ) holds
( the addF of X "**" p) .|. ( the addF of X "**" p) = addreal "**" q )

assume that
A1: len p >= 1 and
A2: for i, j being Element of NAT st i in dom p & j in dom p & i <> j holds
the scalar of X . [(p . i),(p . j)] = 0 ; :: thesis: for q being FinSequence of REAL st dom p = dom q & ( for i being Element of NAT st i in dom q holds
q . i = the scalar of X . [(p . i),(p . i)] ) holds
( the addF of X "**" p) .|. ( the addF of X "**" p) = addreal "**" q

A3: 1 in dom p by A1, FINSEQ_3:25;
let q be FinSequence of REAL ; :: thesis: ( dom p = dom q & ( for i being Element of NAT st i in dom q holds
q . i = the scalar of X . [(p . i),(p . i)] ) implies ( the addF of X "**" p) .|. ( the addF of X "**" p) = addreal "**" q )

assume that
A4: dom p = dom q and
A5: for i being Element of NAT st i in dom q holds
q . i = the scalar of X . [(p . i),(p . i)] ; :: thesis: ( the addF of X "**" p) .|. ( the addF of X "**" p) = addreal "**" q
consider f being Function of NAT, the carrier of X such that
A6: f . 1 = p . 1 and
A7: for n being Element of NAT st 0 <> n & n < len p holds
f . (n + 1) = the addF of X . ((f . n),(p . (n + 1))) and
A8: the addF of X "**" p = f . (len p) by A1, FINSOP_1:1;
A9: ( the addF of X "**" p) .|. ( the addF of X "**" p) = the scalar of X . [(f . (len p)),(f . (len p))] by A8, BHSP_1:def 1;
A10: Seg (len q) = dom p by A4, FINSEQ_1:def 3
.= Seg (len p) by FINSEQ_1:def 3 ;
then A11: len q = len p by FINSEQ_1:6;
len q >= 1 by A1, A10, FINSEQ_1:6;
then consider g being Function of NAT,REAL such that
A12: g . 1 = q . 1 and
A13: for n being Element of NAT st 0 <> n & n < len q holds
g . (n + 1) = addreal . ((g . n),(q . (n + 1))) and
A14: addreal "**" q = g . (len q) by FINSOP_1:1;
defpred S1[ Element of NAT ] means ( 1 <= $1 & $1 <= len q implies g . $1 = the scalar of X . [(f . $1),(f . $1)] );
A15: S1[ 0 ] ;
now
let n be Element of NAT ; :: thesis: ( ( 1 <= n & n <= len q implies g . n = the scalar of X . [(f . n),(f . n)] ) & 1 <= n + 1 & n + 1 <= len q implies g . (n + 1) = the scalar of X . [(f . (n + 1)),(f . (n + 1))] )
assume A16: ( 1 <= n & n <= len q implies g . n = the scalar of X . [(f . n),(f . n)] ) ; :: thesis: ( 1 <= n + 1 & n + 1 <= len q implies g . (n + 1) = the scalar of X . [(f . (n + 1)),(f . (n + 1))] )
now
assume that
A17: 1 <= n + 1 and
A18: n + 1 <= len q ; :: thesis: g . (n + 1) = the scalar of X . [(f . (n + 1)),(f . (n + 1))]
A19: n <= n + 1 by NAT_1:11;
per cases ( n = 0 or n <> 0 ) ;
suppose A20: n = 0 ; :: thesis: g . (n + 1) = the scalar of X . [(f . (n + 1)),(f . (n + 1))]
1 in Seg (len p) by A1, FINSEQ_1:1;
then 1 in dom q by A4, FINSEQ_1:def 3;
hence g . (n + 1) = the scalar of X . [(f . (n + 1)),(f . (n + 1))] by A5, A6, A12, A20; :: thesis: verum
end;
suppose A21: n <> 0 ; :: thesis: g . (n + 1) = the scalar of X . [(f . (n + 1)),(f . (n + 1))]
then 0 < n by NAT_1:3;
then A22: 0 + 1 <= n by INT_1:7;
A23: n <= len p by A11, A18, A19, XXREAL_0:2;
A24: (n + 1) - 1 < (len q) - 0 by A18, XREAL_1:15;
then A25: n < len p by A10, FINSEQ_1:6;
A26: n + 1 in Seg (len q) by A17, A18, FINSEQ_1:1;
then A27: n + 1 in dom q by FINSEQ_1:def 3;
A28: n + 1 in dom p by A4, A26, FINSEQ_1:def 3;
A29: dom f = NAT by FUNCT_2:def 1;
then A30: f . n in rng f by FUNCT_1:3;
rng f c= the carrier of X by RELAT_1:def 19;
then reconsider z = f . n as Element of X by A30;
A31: p . (n + 1) in rng p by A28, FUNCT_1:3;
rng p c= the carrier of X by RELAT_1:def 19;
then reconsider y = p . (n + 1) as Element of X by A31;
for i being Element of NAT st 1 <= i & i <= n holds
the scalar of X . [(f . i),y] = 0
proof
let i be Element of NAT ; :: thesis: ( 1 <= i & i <= n implies the scalar of X . [(f . i),y] = 0 )
defpred S2[ Element of NAT ] means ( 1 <= $1 & $1 <= n implies the scalar of X . [(f . $1),y] = 0 );
A32: S2[ 0 ] ;
A33: for i being Element of NAT st S2[i] holds
S2[i + 1]
proof
let i be Element of NAT ; :: thesis: ( S2[i] implies S2[i + 1] )
assume A34: S2[i] ; :: thesis: S2[i + 1]
A35: 1 <> n + 1 by A21;
assume that
A36: 1 <= i + 1 and
A37: i + 1 <= n ; :: thesis: the scalar of X . [(f . (i + 1)),y] = 0
i + 1 <= len p by A23, A37, XXREAL_0:2;
then A38: i + 1 in dom p by A36, FINSEQ_3:25;
per cases ( i = 0 or i <> 0 ) ;
suppose i = 0 ; :: thesis: the scalar of X . [(f . (i + 1)),y] = 0
hence the scalar of X . [(f . (i + 1)),y] = 0 by A2, A3, A6, A28, A35; :: thesis: verum
end;
suppose A39: i <> 0 ; :: thesis: the scalar of X . [(f . (i + 1)),y] = 0
A40: f . i in rng f by A29, FUNCT_1:3;
rng f c= the carrier of X by RELAT_1:def 19;
then reconsider s = f . i as Element of X by A40;
A41: i + 1 <= len p by A23, A37, XXREAL_0:2;
then i + 1 in dom p by A36, FINSEQ_3:25;
then A42: p . (i + 1) in rng p by FUNCT_1:3;
rng p c= the carrier of X by RELAT_1:def 19;
then reconsider t = p . (i + 1) as Element of X by A42;
A43: (i + 1) - 1 < (len p) - 0 by A41, XREAL_1:15;
0 < i by A39, NAT_1:3;
then A44: 0 + 1 <= i by INT_1:7;
i < i + 1 by XREAL_1:29;
then A45: s .|. y = 0 by A34, A37, A44, BHSP_1:def 1, XXREAL_0:2;
A46: (i + 1) + 0 < n + 1 by A37, XREAL_1:8;
the scalar of X . [(f . (i + 1)),y] = the scalar of X . [(s + t),y] by A7, A39, A43
.= (s + t) .|. y by BHSP_1:def 1
.= 0 + (t .|. y) by A45, BHSP_1:2
.= the scalar of X . [t,y] by BHSP_1:def 1
.= 0 by A2, A28, A38, A46 ;
hence the scalar of X . [(f . (i + 1)),y] = 0 ; :: thesis: verum
end;
end;
end;
for i being Element of NAT holds S2[i] from NAT_1:sch 1(A32, A33);
hence ( 1 <= i & i <= n implies the scalar of X . [(f . i),y] = 0 ) ; :: thesis: verum
end;
then A47: 0 = the scalar of X . [z,y] by A22
.= z .|. y by BHSP_1:def 1 ;
thus g . (n + 1) = addreal . (( the scalar of X . [(f . n),(f . n)]),(q . (n + 1))) by A13, A16, A21, A22, A24
.= addreal . (( the scalar of X . [(f . n),(f . n)]),( the scalar of X . [(p . (n + 1)),(p . (n + 1))])) by A5, A27
.= addreal . (( the scalar of X . [(f . n),(f . n)]),(y .|. y)) by BHSP_1:def 1
.= addreal . ((z .|. z),(y .|. y)) by BHSP_1:def 1
.= (((z .|. z) + (z .|. y)) + (y .|. z)) + (y .|. y) by A47, BINOP_2:def 9
.= ((z .|. (z + y)) + (y .|. z)) + (y .|. y) by BHSP_1:2
.= (z .|. (z + y)) + ((y .|. z) + (y .|. y))
.= (z .|. (z + y)) + (y .|. (z + y)) by BHSP_1:2
.= (z + y) .|. (z + y) by BHSP_1:2
.= the scalar of X . [( the addF of X . ((f . n),(p . (n + 1)))),(z + y)] by BHSP_1:def 1
.= the scalar of X . [( the addF of X . ((f . n),(p . (n + 1)))),(f . (n + 1))] by A7, A21, A25
.= the scalar of X . [(f . (n + 1)),(f . (n + 1))] by A7, A21, A25 ; :: thesis: verum
end;
end;
end;
hence ( 1 <= n + 1 & n + 1 <= len q implies g . (n + 1) = the scalar of X . [(f . (n + 1)),(f . (n + 1))] ) ; :: thesis: verum
end;
then A48: for n being Element of NAT st S1[n] holds
S1[n + 1] ;
for n being Element of NAT holds S1[n] from NAT_1:sch 1(A15, A48);
hence ( the addF of X "**" p) .|. ( the addF of X "**" p) = addreal "**" q by A1, A9, A11, A14; :: thesis: verum