The areas / V16. Normed spaces and functional analysis
Mathlib.Analysis.InnerProductSpace.GramMatrix
16 declarations. Mathlib docs ยท Source
Gram Matrices
This file defines Gram matrices and proves their positive semidefiniteness.
Results require RCLike ๐.
Main definition
Matrix.gram: theMatrix n n ๐withโชv i, v jโซati j : n, wherev : n โ Efor anInner ๐ E.
Main results
Matrix.posSemidef_gram: Gram matrices are positive semidefinite.Matrix.posDef_gram_iff_linearIndependent: Linear independence ofvis equivalent to positive definiteness ofgram ๐ v.
def Matrix.gram E3 #
{E : Type u_1} โ {n : Type u_2} โ (๐ : Type u_5) โ [Inner ๐ E] โ (n โ E) โ Matrix n n ๐
The entries of a Gram matrix are inner products of vectors in an inner product space.
theorem Matrix.gram_apply E0 #
โ {E : Type u_1} {n : Type u_2} {๐ : Type u_4} [inst : Inner ๐ E] (v : n โ E) (i j : n),
Matrix.gram ๐ v i j = inner ๐ (v i) (v j)
theorem Matrix.gram_zero E0 #
โ {E : Type u_1} {n : Type u_2} {๐ : Type u_4} [inst : RCLike ๐] [inst_1 : SeminormedAddCommGroup E]
[inst_2 : InnerProductSpace ๐ E], Matrix.gram ๐ 0 = 0
theorem Matrix.gram_single E0 #
โ {E : Type u_1} {n : Type u_2} {๐ : Type u_4} [inst : RCLike ๐] [inst_1 : SeminormedAddCommGroup E]
[inst_2 : InnerProductSpace ๐ E] [inst_3 : DecidableEq n] (i : n) (x : E),
Matrix.gram ๐ (Pi.single i x) = Matrix.single i i (inner ๐ x x)
theorem Matrix.submatrix_gram E1 #
โ {E : Type u_1} {n : Type u_2} {๐ : Type u_4} [inst : RCLike ๐] [inst_1 : SeminormedAddCommGroup E]
[inst_2 : InnerProductSpace ๐ E] (v : n โ E) {m : Type u_5} (f : m โ n),
(Matrix.gram ๐ v).submatrix f f = Matrix.gram ๐ (v โ f)
theorem Matrix.isHermitian_gram E1 #
โ {E : Type u_1} {n : Type u_2} (๐ : Type u_4) [inst : RCLike ๐] [inst_1 : SeminormedAddCommGroup E]
[inst_2 : InnerProductSpace ๐ E] (v : n โ E), (Matrix.gram ๐ v).IsHermitian
A Gram matrix is Hermitian.
theorem Matrix.star_dotProduct_gram_mulVec E1 #
โ {E : Type u_1} {n : Type u_2} {๐ : Type u_4} [inst : RCLike ๐] [inst_1 : SeminormedAddCommGroup E]
[inst_2 : InnerProductSpace ๐ E] [inst_3 : Fintype n] (v : n โ E) (x y : n โ ๐),
star x โฌแตฅ (Matrix.gram ๐ v).mulVec y = inner ๐ (โ i, x i โข v i) (โ i, y i โข v i)
theorem Matrix.posSemidef_gram E3 #
โ {E : Type u_1} {n : Type u_2} (๐ : Type u_4) [inst : RCLike ๐] [inst_1 : SeminormedAddCommGroup E]
[inst_2 : InnerProductSpace ๐ E] (v : n โ E), (Matrix.gram ๐ v).PosSemidef
A Gram matrix is positive semidefinite.
theorem Matrix.linearIndependent_of_posDef_gram E1 #
โ {E : Type u_1} {n : Type u_2} {๐ : Type u_4} [inst : RCLike ๐] [inst_1 : SeminormedAddCommGroup E]
[inst_2 : InnerProductSpace ๐ E] {v : n โ E}, (Matrix.gram ๐ v).PosDef โ LinearIndependent ๐ v
In a normed space, positive definiteness of gram ๐ v implies linear independence of v.
theorem Matrix.linearIndependent_of_det_gram_ne_zero E1 #
โ {E : Type u_1} {n : Type u_2} {๐ : Type u_4} [inst : RCLike ๐] [inst_1 : SeminormedAddCommGroup E]
[inst_2 : InnerProductSpace ๐ E] [inst_3 : Fintype n] [inst_4 : DecidableEq n] {v : n โ E},
(Matrix.gram ๐ v).det โ 0 โ LinearIndependent ๐ v
theorem Matrix.posDef_gram_of_linearIndependent E1 #
โ {E : Type u_1} {n : Type u_2} {๐ : Type u_4} [inst : RCLike ๐] [inst_1 : NormedAddCommGroup E]
[inst_2 : InnerProductSpace ๐ E] {v : n โ E}, LinearIndependent ๐ v โ (Matrix.gram ๐ v).PosDef
In a normed space, linear independence of v implies positive definiteness of gram ๐ v.
theorem Matrix.posDef_gram_iff_linearIndependent E3 #
โ {E : Type u_1} {n : Type u_2} {๐ : Type u_4} [inst : RCLike ๐] [inst_1 : NormedAddCommGroup E]
[inst_2 : InnerProductSpace ๐ E] {v : n โ E}, (Matrix.gram ๐ v).PosDef โ LinearIndependent ๐ v
In a normed space, linear independence of v is equivalent to positive definiteness of
gram ๐ v.
theorem Matrix.det_gram_ne_zero_iff_linearIndependent E1 #
โ {E : Type u_1} {n : Type u_2} {๐ : Type u_4} [inst : RCLike ๐] [inst_1 : NormedAddCommGroup E]
[inst_2 : InnerProductSpace ๐ E] [inst_3 : Fintype n] [inst_4 : DecidableEq n] {v : n โ E},
(Matrix.gram ๐ v).det โ 0 โ LinearIndependent ๐ v
theorem Matrix.gram_eq_conjTranspose_mul E1 #
โ {E : Type u_1} {n : Type u_2} {๐ : Type u_4} [inst : RCLike ๐] [inst_1 : NormedAddCommGroup E]
[inst_2 : InnerProductSpace ๐ E] {ฮน : Type u_5} [inst_3 : Fintype ฮน] (b : OrthonormalBasis ฮน ๐ E) (v : n โ E),
Matrix.gram ๐ v =
(Matrix.of fun i j โฆ (b.repr (v j)).ofLp i).conjTranspose * Matrix.of fun i j โฆ (b.repr (v j)).ofLp i
theorem Matrix.gram_eq_one_iff_orthonormal E0 #
โ {E : Type u_1} {n : Type u_2} {๐ : Type u_4} [inst : RCLike ๐] [inst_1 : NormedAddCommGroup E]
[inst_2 : InnerProductSpace ๐ E] [inst_3 : DecidableEq n] {v : n โ E}, Matrix.gram ๐ v = 1 โ Orthonormal ๐ v
theorem Matrix.posSemidef_opNorm_smul_gram_sub_gram E1 #
โ {E : Type u_1} {n : Type u_2} {๐ : Type u_4} [inst : RCLike ๐] [inst_1 : NormedAddCommGroup E]
[inst_2 : InnerProductSpace ๐ E] {F : Type u_5} [inst_3 : NormedAddCommGroup F] [inst_4 : InnerProductSpace ๐ F]
(v : n โ E) (f : E โL[๐] F), (โfโ ^ 2 โข Matrix.gram ๐ v - Matrix.gram ๐ (โf โ v)).PosSemidef
Inequality โf xโ โค โfโ * โxโ lifted to Gram matrices.