:: On the Formalization of {G}ram-Schmidt Process for Orthonormalizing a
:: Set of Vectors
:: by Hiroyuki Okazaki
::
:: Received March 31, 2023
:: Copyright (c) 2023-2026 Association of Mizar Users
:: (Stowarzyszenie Uzytkownikow Mizara, Bialystok, Poland).
:: This code can be distributed under the GNU General Public Licence
:: version 3.0 or later, or the Creative Commons Attribution-ShareAlike
:: License version 3.0 or later, subject to the binding interpretation
:: detailed in file COPYING.interpretation.
:: See COPYING.GPL and COPYING.CC-BY-SA for the full text of these
:: licenses, or see http://www.gnu.org/licenses/gpl.html and
:: http://creativecommons.org/licenses/by-sa/3.0/.
environ
vocabularies RUSUB_6, NUMBERS, BHSP_1, PRE_TOPC, ARYTM_1, ARYTM_3, XXREAL_0,
CARD_1, SUBSET_1, RELAT_1, XBOOLE_0, TARSKI, BHSP_5, STRUCT_0, FUNCT_1,
ZFMISC_1, NAT_1, PROB_2, FINSEQ_1, SQUARE_1, NORMSP_1, SUPINF_2,
RLVECT_3, RLVECT_1, RLVECT_2, RLSUB_1, CARD_3, VALUED_1, PARTFUN1,
ORDINAL4, FINSEQ_2, FUNCT_7, MONOID_0;
notations TARSKI, XBOOLE_0, ZFMISC_1, SUBSET_1, RELAT_1, FUNCT_1, RELSET_1,
ORDINAL1, PARTFUN1, FUNCT_2, BINOP_1, NUMBERS, XCMPLX_0, XXREAL_0,
SQUARE_1, FINSEQ_1, FINSEQ_2, PRE_POLY, MATRIX_0, STRUCT_0, PRE_TOPC,
RLVECT_1, RLSUB_1, RLVECT_2, RLVECT_3, RVSUM_1, BHSP_1, BHSP_5;
constructors SQUARE_1, BHSP_5, RELSET_1, RLVECT_2, RLVECT_3, REALSET1,
RVSUM_1, MATRIX_3;
registrations XBOOLE_0, FUNCT_1, ORDINAL1, RELSET_1, RLVECT_1, NUMBERS,
XREAL_0, STRUCT_0, SQUARE_1, NAT_1, RELAT_1, FINSEQ_1, FINSEQ_2, INT_1,
FUNCOP_1, CARD_1, BHSP_1;
requirements SUBSET, REAL, BOOLE, NUMERALS, ARITHM;
begin
definition
let V
be non empty RLSStruct,
r
be FinSequence
of REAL,
x
be FinSequence
of V;
func r (*) x -> FinSequence
of V means
:: RUSUB_6:def 1
len it = len x &
for i
being Nat st
1 <= i & i <= len x
holds it.i = (r/.i) * (x/.i);
end;
theorem :: RUSUB_6:1
for V
being RealLinearSpace,
A
being Subset
of V,
x
be FinSequence
of V,
r
be FinSequence
of REAL
st rng x c= A & len x = len r
holds Sum (r(*)x)
in Lin A;
theorem :: RUSUB_6:2
for V
being RealLinearSpace,
A,B
being Subset
of V
st A c= the carrier
of Lin B
holds
Lin A
is Subspace
of Lin B;
theorem :: RUSUB_6:3
for V
being RealLinearSpace,
A,B
being Subset
of V
st A c= the carrier
of Lin B
& B c= the carrier
of Lin A
holds
Lin A = Lin B;
definition
let V
be non empty UNITSTR,
u
be Point
of V,
x
be FinSequence
of V;
func u .|. x -> FinSequence
of REAL means
:: RUSUB_6:def 2
len it = len x &
for i
being Nat st
1 <= i & i <= len x
holds it.i = u .|. (x/.i);
end;
theorem :: RUSUB_6:4
for V
being non empty UNITSTR,
u
being Point
of V,
x
being FinSequence
of V,
i
being Nat st
1 <= i <= len x
holds ((u.|.x)(*)x).i = (u .|. (x/.i)) * (x/.i);
theorem :: RUSUB_6:5
for V
being RealUnitarySpace,
u
be Point
of V,
x
be FinSequence
of V
holds u .|. (Sum x) = Sum (u .|. x);
theorem :: RUSUB_6:6
for V
being RealUnitarySpace,
u
be Point
of V,
n
be Nat,
x
be FinSequence
of V
st
1 <= n & n <= len x &
for i
be Nat st
1 <= i & i <= len x & n <> i
holds u .|. (x/.i) =
0
holds u .|. (Sum x) = u .|. (x/.n);
theorem :: RUSUB_6:7
for H
being RealUnitarySpace
holds
ex F
be Function
of [:the carrier
of H,(the carrier
of H)* :],
(the carrier
of H)*
st
for x
be Point
of H, e
be FinSequence
of H
ex Fe
be FinSequence
of H
st Fe = F.(x,e) & Fe = (x.|.e) (*) e;
theorem :: RUSUB_6:8
for H
being RealUnitarySpace,
G
be OrthonormalFamily
of H
holds
G
is linearly-independent;
begin :: Gram-Schmidt process
::orthonormalizing a set of vectors
definition
let H
be RealUnitarySpace;
func ProjSeq(H) ->
Function
of [:the carrier
of H,(the carrier
of H)* :],
(the carrier
of H)* means
:: RUSUB_6:def 3
for x
be Point
of H, e
be FinSequence
of H
ex Fe
be FinSequence
of H
st Fe = it.(x,e) & Fe = (x.|.e)(*)e;
end;
theorem :: RUSUB_6:9
for H
being RealUnitarySpace
holds
for x
be FinSequence
of H
st x
is one-to-one & rng x
is linearly-independent
&
1 <= len x
holds
ex e
be FinSequence
of H
st len x = len e
&
rng e
is OrthonormalFamily
of H
&
e
is one-to-one
&
Lin rng x = Lin rng e
&
e/.
1 = (
1/||.x/.
1 .||) * (x/.
1)
&
(
for k
being Nat st
1<=k & k < len x
holds
ex g
be FinSequence
of H
st g = ( ProjSeq(H)) .[x/.(
1+ k),e|k]
& e/.(k+
1) =
1/ ||. x/.(
1+ k)-Sum g .||
* (x/.(
1+ k)-Sum g) )
&
for k
be Nat st k <= len x
holds rng (e|k)
is OrthonormalFamily
of H
&
e|k
is one-to-one
&
Lin rng (x|k) = Lin rng (e|k);
definition
let H
be RealUnitarySpace,
x
be FinSequence
of H;
assume x
is one-to-one
& rng x
is linearly-independent
&
1 <= len x;
func GramSchmidt (x) -> FinSequence
of H means
:: RUSUB_6:def 4
len x = len it &
rng it
is OrthonormalFamily
of H &
it
is one-to-one &
Lin rng x = Lin rng it
&
it/.
1 = (
1 / ||.x/.
1 .||) * (x/.
1)
&
(
for k
being Nat st
1 <= k & k < len x
holds
ex g
be FinSequence
of H
st g = ( ProjSeq(H)) .[x/.(
1+ k),it|k]
& it/.(k+
1) =
1/ ||. x/.(
1+ k)-Sum g .||
* (x/.(
1+ k)-Sum g))
&
for k
be Nat st k <= len x
holds rng (it|k)
is OrthonormalFamily
of H
&
it|k
is one-to-one
&
Lin rng (x|k) = Lin rng (it|k);
end;
theorem :: RUSUB_6:10
for H
being RealUnitarySpace,
x
be FinSequence
of H
st x
is one-to-one
& rng x
is linearly-independent
&
1 <= len x
holds
rng GramSchmidt (x)
is linearly-independent;