:: Introduction to Banach and Hilbert spaces - Part I
:: by Jan Popio{\l}ek
::
:: Received July 19, 1991
:: Copyright (c) 1991-2021 Association of Mizar Users


definition
attr c1 is strict ;
struct UNITSTR -> RLSStruct ;
aggr UNITSTR(# carrier, ZeroF, addF, Mult, scalar #) -> UNITSTR ;
sel scalar c1 -> Function of [: the carrier of c1, the carrier of c1:],REAL;
end;

registration
cluster non empty strict for UNITSTR ;
existence
ex b1 being UNITSTR st
( not b1 is empty & b1 is strict )
proof end;
end;

registration
let D be non empty set ;
let Z be Element of D;
let a be BinOp of D;
let m be Function of [:REAL,D:],D;
let s be Function of [:D,D:],REAL;
cluster UNITSTR(# D,Z,a,m,s #) -> non empty ;
coherence
not UNITSTR(# D,Z,a,m,s #) is empty
;
end;

deffunc H1( UNITSTR ) -> Element of the carrier of $1 = 0. $1;

definition
let X be non empty UNITSTR ;
let x, y be Point of X;
func x .|. y -> Real equals :: BHSP_1:def 1
the scalar of X . [x,y];
correctness
coherence
the scalar of X . [x,y] is Real
;
;
end;

:: deftheorem defines .|. BHSP_1:def 1 :
for X being non empty UNITSTR
for x, y being Point of X holds x .|. y = the scalar of X . [x,y];

set V0 = the RealLinearSpace;

Lm1: the carrier of ((0). the RealLinearSpace) = {(0. the RealLinearSpace)}
by RLSUB_1:def 3;

reconsider nilfunc = [: the carrier of ((0). the RealLinearSpace), the carrier of ((0). the RealLinearSpace):] --> (In (0,REAL)) as Function of [: the carrier of ((0). the RealLinearSpace), the carrier of ((0). the RealLinearSpace):],REAL ;

( ( for x, y being VECTOR of ((0). the RealLinearSpace) holds nilfunc . [x,y] = 0 ) & 0. the RealLinearSpace in the carrier of ((0). the RealLinearSpace) )
by Lm1, FUNCOP_1:7, TARSKI:def 1;

then Lm2: nilfunc . [(0. the RealLinearSpace),(0. the RealLinearSpace)] = 0
;

Lm3: for u, v being VECTOR of ((0). the RealLinearSpace) holds nilfunc . [u,v] = nilfunc . [v,u]
proof end;

Lm4: for u, v, w being VECTOR of ((0). the RealLinearSpace) holds nilfunc . [(u + v),w] = (nilfunc . [u,w]) + (nilfunc . [v,w])
proof end;

Lm5: for u, v being VECTOR of ((0). the RealLinearSpace)
for a being Real holds nilfunc . [(a * u),v] = a * (nilfunc . [u,v])

proof end;

set X0 = UNITSTR(# the carrier of ((0). the RealLinearSpace),(0. ((0). the RealLinearSpace)), the addF of ((0). the RealLinearSpace), the Mult of ((0). the RealLinearSpace),nilfunc #);

Lm6: now :: thesis: for x, y, z being Point of UNITSTR(# the carrier of ((0). the RealLinearSpace),(0. ((0). the RealLinearSpace)), the addF of ((0). the RealLinearSpace), the Mult of ((0). the RealLinearSpace),nilfunc #)
for a being Real holds
( ( x .|. x = In (0,REAL) implies x = H1( UNITSTR(# the carrier of ((0). the RealLinearSpace),(0. ((0). the RealLinearSpace)), the addF of ((0). the RealLinearSpace), the Mult of ((0). the RealLinearSpace),nilfunc #)) ) & ( x = H1( UNITSTR(# the carrier of ((0). the RealLinearSpace),(0. ((0). the RealLinearSpace)), the addF of ((0). the RealLinearSpace), the Mult of ((0). the RealLinearSpace),nilfunc #)) implies x .|. x = In (0,REAL) ) & 0 <= x .|. x & x .|. y = y .|. x & (x + y) .|. z = (x .|. z) + (y .|. z) & (a * x) .|. y = a * (x .|. y) )
let x, y, z be Point of UNITSTR(# the carrier of ((0). the RealLinearSpace),(0. ((0). the RealLinearSpace)), the addF of ((0). the RealLinearSpace), the Mult of ((0). the RealLinearSpace),nilfunc #); :: thesis: for a being Real holds
( ( x .|. x = In (0,REAL) implies x = H1( UNITSTR(# the carrier of ((0). the RealLinearSpace),(0. ((0). the RealLinearSpace)), the addF of ((0). the RealLinearSpace), the Mult of ((0). the RealLinearSpace),nilfunc #)) ) & ( x = H1( UNITSTR(# the carrier of ((0). the RealLinearSpace),(0. ((0). the RealLinearSpace)), the addF of ((0). the RealLinearSpace), the Mult of ((0). the RealLinearSpace),nilfunc #)) implies x .|. x = In (0,REAL) ) & 0 <= x .|. x & x .|. y = y .|. x & (x + y) .|. z = (x .|. z) + (y .|. z) & (a * x) .|. y = a * (x .|. y) )

let a be Real; :: thesis: ( ( x .|. x = In (0,REAL) implies x = H1( UNITSTR(# the carrier of ((0). the RealLinearSpace),(0. ((0). the RealLinearSpace)), the addF of ((0). the RealLinearSpace), the Mult of ((0). the RealLinearSpace),nilfunc #)) ) & ( x = H1( UNITSTR(# the carrier of ((0). the RealLinearSpace),(0. ((0). the RealLinearSpace)), the addF of ((0). the RealLinearSpace), the Mult of ((0). the RealLinearSpace),nilfunc #)) implies x .|. x = In (0,REAL) ) & 0 <= x .|. x & x .|. y = y .|. x & (x + y) .|. z = (x .|. z) + (y .|. z) & (a * x) .|. y = a * (x .|. y) )
H1( UNITSTR(# the carrier of ((0). the RealLinearSpace),(0. ((0). the RealLinearSpace)), the addF of ((0). the RealLinearSpace), the Mult of ((0). the RealLinearSpace),nilfunc #)) = 0. the RealLinearSpace by RLSUB_1:11;
hence ( x .|. x = In (0,REAL) iff x = H1( UNITSTR(# the carrier of ((0). the RealLinearSpace),(0. ((0). the RealLinearSpace)), the addF of ((0). the RealLinearSpace), the Mult of ((0). the RealLinearSpace),nilfunc #)) ) by Lm1, FUNCOP_1:7, TARSKI:def 1; :: thesis: ( 0 <= x .|. x & x .|. y = y .|. x & (x + y) .|. z = (x .|. z) + (y .|. z) & (a * x) .|. y = a * (x .|. y) )
thus 0 <= x .|. x by FUNCOP_1:7; :: thesis: ( x .|. y = y .|. x & (x + y) .|. z = (x .|. z) + (y .|. z) & (a * x) .|. y = a * (x .|. y) )
thus x .|. y = y .|. x by Lm3; :: thesis: ( (x + y) .|. z = (x .|. z) + (y .|. z) & (a * x) .|. y = a * (x .|. y) )
thus (x + y) .|. z = (x .|. z) + (y .|. z) :: thesis: (a * x) .|. y = a * (x .|. y)
proof
reconsider u = x, v = y, w = z as VECTOR of ((0). the RealLinearSpace) ;
(x + y) .|. z = nilfunc . [(u + v),w] ;
hence (x + y) .|. z = (x .|. z) + (y .|. z) by Lm4; :: thesis: verum
end;
thus (a * x) .|. y = a * (x .|. y) :: thesis: verum
proof
reconsider u = x, v = y as VECTOR of ((0). the RealLinearSpace) ;
(a * x) .|. y = nilfunc . [(a * u),v] ;
hence (a * x) .|. y = a * (x .|. y) by Lm5; :: thesis: verum
end;
end;

definition
let IT be non empty UNITSTR ;
attr IT is RealUnitarySpace-like means :Def2: :: BHSP_1:def 2
for x, y, z being Point of IT
for a being Real holds
( ( x .|. x = 0 implies x = 0. IT ) & ( x = 0. IT implies x .|. x = 0 ) & 0 <= x .|. x & x .|. y = y .|. x & (x + y) .|. z = (x .|. z) + (y .|. z) & (a * x) .|. y = a * (x .|. y) );
end;

:: deftheorem Def2 defines RealUnitarySpace-like BHSP_1:def 2 :
for IT being non empty UNITSTR holds
( IT is RealUnitarySpace-like iff for x, y, z being Point of IT
for a being Real holds
( ( x .|. x = 0 implies x = 0. IT ) & ( x = 0. IT implies x .|. x = 0 ) & 0 <= x .|. x & x .|. y = y .|. x & (x + y) .|. z = (x .|. z) + (y .|. z) & (a * x) .|. y = a * (x .|. y) ) );

registration
cluster non empty right_complementable Abelian add-associative right_zeroed vector-distributive scalar-distributive scalar-associative scalar-unital strict RealUnitarySpace-like for UNITSTR ;
existence
ex b1 being non empty UNITSTR st
( b1 is RealUnitarySpace-like & b1 is vector-distributive & b1 is scalar-distributive & b1 is scalar-associative & b1 is scalar-unital & b1 is Abelian & b1 is add-associative & b1 is right_zeroed & b1 is right_complementable & b1 is strict )
proof end;
end;

definition
mode RealUnitarySpace is non empty right_complementable Abelian add-associative right_zeroed vector-distributive scalar-distributive scalar-associative scalar-unital RealUnitarySpace-like UNITSTR ;
end;

definition
let X be RealUnitarySpace;
let x, y be Point of X;
:: original: .|.
redefine func x .|. y -> Real;
commutativity
for x, y being Point of X holds x .|. y = y .|. x
by Def2;
end;

theorem :: BHSP_1:1
for X being RealUnitarySpace holds (0. X) .|. (0. X) = 0 by Def2;

theorem :: BHSP_1:2
for X being RealUnitarySpace
for x, y, z being Point of X holds x .|. (y + z) = (x .|. y) + (x .|. z) by Def2;

theorem :: BHSP_1:3
for a being Real
for X being RealUnitarySpace
for x, y being Point of X holds x .|. (a * y) = a * (x .|. y) by Def2;

theorem :: BHSP_1:4
for a being Real
for X being RealUnitarySpace
for x, y being Point of X holds (a * x) .|. y = x .|. (a * y)
proof end;

theorem Th5: :: BHSP_1:5
for a, b being Real
for X being RealUnitarySpace
for x, y, z being Point of X holds ((a * x) + (b * y)) .|. z = (a * (x .|. z)) + (b * (y .|. z))
proof end;

theorem :: BHSP_1:6
for a, b being Real
for X being RealUnitarySpace
for x, y, z being Point of X holds x .|. ((a * y) + (b * z)) = (a * (x .|. y)) + (b * (x .|. z)) by Th5;

theorem :: BHSP_1:7
for X being RealUnitarySpace
for x, y being Point of X holds (- x) .|. y = x .|. (- y)
proof end;

theorem Th8: :: BHSP_1:8
for X being RealUnitarySpace
for x, y being Point of X holds (- x) .|. y = - (x .|. y)
proof end;

theorem :: BHSP_1:9
for X being RealUnitarySpace
for x, y being Point of X holds x .|. (- y) = - (x .|. y) by Th8;

theorem Th10: :: BHSP_1:10
for X being RealUnitarySpace
for x, y being Point of X holds (- x) .|. (- y) = x .|. y
proof end;

theorem Th11: :: BHSP_1:11
for X being RealUnitarySpace
for x, y, z being Point of X holds (x - y) .|. z = (x .|. z) - (y .|. z)
proof end;

theorem Th12: :: BHSP_1:12
for X being RealUnitarySpace
for x, y, z being Point of X holds x .|. (y - z) = (x .|. y) - (x .|. z)
proof end;

theorem :: BHSP_1:13
for X being RealUnitarySpace
for x, y, u, v being Point of X holds (x - y) .|. (u - v) = (((x .|. u) - (x .|. v)) - (y .|. u)) + (y .|. v)
proof end;

theorem Th14: :: BHSP_1:14
for X being RealUnitarySpace
for x being Point of X holds (0. X) .|. x = 0
proof end;

theorem :: BHSP_1:15
for X being RealUnitarySpace
for x being Point of X holds x .|. (0. X) = 0 by Th14;

theorem Th16: :: BHSP_1:16
for X being RealUnitarySpace
for x, y being Point of X holds (x + y) .|. (x + y) = ((x .|. x) + (2 * (x .|. y))) + (y .|. y)
proof end;

theorem :: BHSP_1:17
for X being RealUnitarySpace
for x, y being Point of X holds (x + y) .|. (x - y) = (x .|. x) - (y .|. y)
proof end;

theorem Th18: :: BHSP_1:18
for X being RealUnitarySpace
for x, y being Point of X holds (x - y) .|. (x - y) = ((x .|. x) - (2 * (x .|. y))) + (y .|. y)
proof end;

theorem Th19: :: BHSP_1:19
for X being RealUnitarySpace
for x, y being Point of X holds |.(x .|. y).| <= (sqrt (x .|. x)) * (sqrt (y .|. y))
proof end;

definition
let X be RealUnitarySpace;
let x, y be Point of X;
pred x,y are_orthogonal means :: BHSP_1:def 3
x .|. y = 0 ;
symmetry
for x, y being Point of X st x .|. y = 0 holds
y .|. x = 0
;
end;

:: deftheorem defines are_orthogonal BHSP_1:def 3 :
for X being RealUnitarySpace
for x, y being Point of X holds
( x,y are_orthogonal iff x .|. y = 0 );

theorem :: BHSP_1:20
for X being RealUnitarySpace
for x, y being Point of X st x,y are_orthogonal holds
x, - y are_orthogonal
proof end;

theorem :: BHSP_1:21
for X being RealUnitarySpace
for x, y being Point of X st x,y are_orthogonal holds
- x,y are_orthogonal
proof end;

theorem :: BHSP_1:22
for X being RealUnitarySpace
for x, y being Point of X st x,y are_orthogonal holds
- x, - y are_orthogonal by Th10;

theorem :: BHSP_1:23
for X being RealUnitarySpace
for x being Point of X holds x, 0. X are_orthogonal by Th14;

theorem :: BHSP_1:24
for X being RealUnitarySpace
for x, y being Point of X st x,y are_orthogonal holds
(x + y) .|. (x + y) = (x .|. x) + (y .|. y)
proof end;

theorem :: BHSP_1:25
for X being RealUnitarySpace
for x, y being Point of X st x,y are_orthogonal holds
(x - y) .|. (x - y) = (x .|. x) + (y .|. y)
proof end;

definition
let X be RealUnitarySpace;
let x be Point of X;
func ||.x.|| -> Real equals :: BHSP_1:def 4
sqrt (x .|. x);
correctness
coherence
sqrt (x .|. x) is Real
;
;
end;

:: deftheorem defines ||. BHSP_1:def 4 :
for X being RealUnitarySpace
for x being Point of X holds ||.x.|| = sqrt (x .|. x);

theorem Th26: :: BHSP_1:26
for X being RealUnitarySpace
for x being Point of X holds
( ||.x.|| = 0 iff x = 0. X )
proof end;

theorem Th27: :: BHSP_1:27
for a being Real
for X being RealUnitarySpace
for x being Point of X holds ||.(a * x).|| = |.a.| * ||.x.||
proof end;

theorem Th28: :: BHSP_1:28
for X being RealUnitarySpace
for x being Point of X holds 0 <= ||.x.||
proof end;

theorem :: BHSP_1:29
for X being RealUnitarySpace
for x, y being Point of X holds |.(x .|. y).| <= ||.x.|| * ||.y.|| by Th19;

theorem Th30: :: BHSP_1:30
for X being RealUnitarySpace
for x, y being Point of X holds ||.(x + y).|| <= ||.x.|| + ||.y.||
proof end;

theorem Th31: :: BHSP_1:31
for X being RealUnitarySpace
for x being Point of X holds ||.(- x).|| = ||.x.||
proof end;

theorem Th32: :: BHSP_1:32
for X being RealUnitarySpace
for x, y being Point of X holds ||.x.|| - ||.y.|| <= ||.(x - y).||
proof end;

theorem :: BHSP_1:33
for X being RealUnitarySpace
for x, y being Point of X holds |.(||.x.|| - ||.y.||).| <= ||.(x - y).||
proof end;

definition
let X be RealUnitarySpace;
let x, y be Point of X;
func dist (x,y) -> Real equals :: BHSP_1:def 5
||.(x - y).||;
correctness
coherence
||.(x - y).|| is Real
;
;
commutativity
for b1 being Real
for x, y being Point of X st b1 = ||.(x - y).|| holds
b1 = ||.(y - x).||
proof end;
end;

:: deftheorem defines dist BHSP_1:def 5 :
for X being RealUnitarySpace
for x, y being Point of X holds dist (x,y) = ||.(x - y).||;

theorem Th34: :: BHSP_1:34
for X being RealUnitarySpace
for x being Point of X holds dist (x,x) = 0
proof end;

theorem :: BHSP_1:35
for X being RealUnitarySpace
for x, y, z being Point of X holds dist (x,z) <= (dist (x,y)) + (dist (y,z))
proof end;

theorem Th36: :: BHSP_1:36
for X being RealUnitarySpace
for x, y being Point of X holds
( x <> y iff dist (x,y) <> 0 )
proof end;

theorem :: BHSP_1:37
for X being RealUnitarySpace
for x, y being Point of X holds dist (x,y) >= 0 by Th28;

theorem :: BHSP_1:38
for X being RealUnitarySpace
for x, y being Point of X holds
( x <> y iff dist (x,y) > 0 )
proof end;

theorem :: BHSP_1:39
for X being RealUnitarySpace
for x, y being Point of X holds dist (x,y) = sqrt ((x - y) .|. (x - y)) ;

theorem :: BHSP_1:40
for X being RealUnitarySpace
for x, y, u, v being Point of X holds dist ((x + y),(u + v)) <= (dist (x,u)) + (dist (y,v))
proof end;

theorem :: BHSP_1:41
for X being RealUnitarySpace
for x, y, u, v being Point of X holds dist ((x - y),(u - v)) <= (dist (x,u)) + (dist (y,v))
proof end;

theorem :: BHSP_1:42
for X being RealUnitarySpace
for x, y, z being Point of X holds dist ((x - z),(y - z)) = dist (x,y)
proof end;

theorem :: BHSP_1:43
for X being RealUnitarySpace
for x, y, z being Point of X holds dist ((x - z),(y - z)) <= (dist (z,x)) + (dist (z,y))
proof end;

definition
let X be non empty addLoopStr ;
let seq be sequence of X;
let x be Point of X;
func seq + x -> sequence of X means :Def6: :: BHSP_1:def 6
for n being Nat holds it . n = (seq . n) + x;
existence
ex b1 being sequence of X st
for n being Nat holds b1 . n = (seq . n) + x
proof end;
uniqueness
for b1, b2 being sequence of X st ( for n being Nat holds b1 . n = (seq . n) + x ) & ( for n being Nat holds b2 . n = (seq . n) + x ) holds
b1 = b2
proof end;
end;

:: deftheorem Def6 defines + BHSP_1:def 6 :
for X being non empty addLoopStr
for seq being sequence of X
for x being Point of X
for b4 being sequence of X holds
( b4 = seq + x iff for n being Nat holds b4 . n = (seq . n) + x );

theorem Th44: :: BHSP_1:44
for n being Nat
for X being non empty addLoopStr
for seq being sequence of X holds (- seq) . n = - (seq . n)
proof end;

definition
let X be RealUnitarySpace;
let seq1, seq2 be sequence of X;
:: original: +
redefine func seq1 + seq2 -> Element of bool [:NAT, the carrier of X:];
commutativity
for seq1, seq2 being sequence of X holds seq1 + seq2 = seq2 + seq1
proof end;
end;

theorem :: BHSP_1:45
for X being RealUnitarySpace
for seq1, seq2, seq3 being sequence of X holds seq1 + (seq2 + seq3) = (seq1 + seq2) + seq3
proof end;

theorem :: BHSP_1:46
for X being RealUnitarySpace
for seq1, seq2 being sequence of X st seq1 is constant & seq2 is constant holds
seq1 + seq2 is constant
proof end;

theorem :: BHSP_1:47
for X being RealUnitarySpace
for seq1, seq2 being sequence of X st seq1 is constant & seq2 is constant holds
seq1 - seq2 is constant
proof end;

theorem :: BHSP_1:48
for a being Real
for X being RealUnitarySpace
for seq1 being sequence of X st seq1 is constant holds
a * seq1 is constant
proof end;

theorem :: BHSP_1:49
for X being RealUnitarySpace
for seq1, seq2 being sequence of X holds seq1 - seq2 = seq1 + (- seq2)
proof end;

theorem :: BHSP_1:50
for X being RealUnitarySpace
for seq being sequence of X holds seq = seq + (0. X)
proof end;

theorem :: BHSP_1:51
for a being Real
for X being RealUnitarySpace
for seq1, seq2 being sequence of X holds a * (seq1 + seq2) = (a * seq1) + (a * seq2)
proof end;

theorem :: BHSP_1:52
for a, b being Real
for X being RealUnitarySpace
for seq being sequence of X holds (a + b) * seq = (a * seq) + (b * seq)
proof end;

theorem :: BHSP_1:53
for a, b being Real
for X being RealUnitarySpace
for seq being sequence of X holds (a * b) * seq = a * (b * seq)
proof end;

theorem :: BHSP_1:54
for X being RealUnitarySpace
for seq being sequence of X holds 1 * seq = seq
proof end;

theorem :: BHSP_1:55
for X being RealUnitarySpace
for seq being sequence of X holds (- 1) * seq = - seq
proof end;

theorem :: BHSP_1:56
for X being RealUnitarySpace
for x being Point of X
for seq being sequence of X holds seq - x = seq + (- x)
proof end;

theorem :: BHSP_1:57
for X being RealUnitarySpace
for seq1, seq2 being sequence of X holds seq1 - seq2 = - (seq2 - seq1)
proof end;

theorem :: BHSP_1:58
for X being RealUnitarySpace
for seq being sequence of X holds seq = seq - (0. X)
proof end;

theorem :: BHSP_1:59
for X being RealUnitarySpace
for seq being sequence of X holds seq = - (- seq)
proof end;

theorem :: BHSP_1:60
for X being RealUnitarySpace
for seq1, seq2, seq3 being sequence of X holds seq1 - (seq2 + seq3) = (seq1 - seq2) - seq3
proof end;

theorem :: BHSP_1:61
for X being RealUnitarySpace
for seq1, seq2, seq3 being sequence of X holds (seq1 + seq2) - seq3 = seq1 + (seq2 - seq3)
proof end;

theorem :: BHSP_1:62
for X being RealUnitarySpace
for seq1, seq2, seq3 being sequence of X holds seq1 - (seq2 - seq3) = (seq1 - seq2) + seq3
proof end;

theorem :: BHSP_1:63
for a being Real
for X being RealUnitarySpace
for seq1, seq2 being sequence of X holds a * (seq1 - seq2) = (a * seq1) - (a * seq2)
proof end;