# L² inner product space structure on finite products of inner product spaces #

The L² norm on a finite product of inner product spaces is compatible with an inner product $$\langle x, y\rangle = \sum \langle x_i, y_i \rangle.$$ This is recorded in this file as an inner product space instance on PiLp 2.

This file develops the notion of a finite dimensional Hilbert space over 𝕜 = ℂ, ℝ, referred to as E. We define an OrthonormalBasis 𝕜 ι E as a linear isometric equivalence between E and EuclideanSpace 𝕜 ι. Then stdOrthonormalBasis shows that such an equivalence always exists if E is finite dimensional. We provide language for converting between a basis that is orthonormal and an orthonormal basis (e.g. Basis.toOrthonormalBasis). We show that orthonormal bases for each summand in a direct sum of spaces can be combined into an orthonormal basis for the whole sum in DirectSum.IsInternal.subordinateOrthonormalBasis. In the last section, various properties of matrices are explored.

## Main definitions #

• EuclideanSpace 𝕜 n: defined to be PiLp 2 (n → 𝕜) for any Fintype n, i.e., the space from functions to n to 𝕜 with the L² norm. We register several instances on it (notably that it is a finite-dimensional inner product space).

• OrthonormalBasis 𝕜 ι: defined to be an isometry to Euclidean space from a given finite-dimensional inner product space, E ≃ₗᵢ[𝕜] EuclideanSpace 𝕜 ι.

• Basis.toOrthonormalBasis: constructs an OrthonormalBasis for a finite-dimensional Euclidean space from a Basis which is Orthonormal.

• Orthonormal.exists_orthonormalBasis_extension: provides an existential result of an OrthonormalBasis extending a given orthonormal set

• exists_orthonormalBasis: provides an orthonormal basis on a finite dimensional vector space

• stdOrthonormalBasis: provides an arbitrarily-chosen OrthonormalBasis of a given finite dimensional inner product space

For consequences in infinite dimension (Hilbert bases, etc.), see the file Analysis.InnerProductSpace.L2Space.

instance PiLp.innerProductSpace {𝕜 : Type u_3} [] {ι : Type u_8} [] (f : ιType u_9) [(i : ι) → NormedAddCommGroup (f i)] [(i : ι) → InnerProductSpace 𝕜 (f i)] :
Equations
@[simp]
theorem PiLp.inner_apply {𝕜 : Type u_3} [] {ι : Type u_8} [] {f : ιType u_9} [(i : ι) → NormedAddCommGroup (f i)] [(i : ι) → InnerProductSpace 𝕜 (f i)] (x : PiLp 2 f) (y : PiLp 2 f) :
inner x y = i : ι, inner (x i) (y i)
@[reducible, inline]
abbrev EuclideanSpace (𝕜 : Type u_8) (n : Type u_9) :
Type (max u_8 u_9)

The standard real/complex Euclidean space, functions on a finite type. For an n-dimensional space use EuclideanSpace 𝕜 (Fin n).

Equations
• = PiLp 2 fun (x : n) => 𝕜
Instances For
theorem EuclideanSpace.nnnorm_eq {𝕜 : Type u_8} [] {n : Type u_9} [] (x : ) :
x‖₊ = NNReal.sqrt (∑ i : n, x i‖₊ ^ 2)
theorem EuclideanSpace.norm_eq {𝕜 : Type u_8} [] {n : Type u_9} [] (x : ) :
x = (∑ i : n, x i ^ 2)
theorem EuclideanSpace.dist_eq {𝕜 : Type u_8} [] {n : Type u_9} [] (x : ) (y : ) :
dist x y = (∑ i : n, dist (x i) (y i) ^ 2)
theorem EuclideanSpace.nndist_eq {𝕜 : Type u_8} [] {n : Type u_9} [] (x : ) (y : ) :
nndist x y = NNReal.sqrt (∑ i : n, nndist (x i) (y i) ^ 2)
theorem EuclideanSpace.edist_eq {𝕜 : Type u_8} [] {n : Type u_9} [] (x : ) (y : ) :
edist x y = (∑ i : n, edist (x i) (y i) ^ 2) ^ (1 / 2)
theorem EuclideanSpace.ball_zero_eq {n : Type u_8} [] (r : ) (hr : 0 r) :
= {x : | i : n, x i ^ 2 < r ^ 2}
theorem EuclideanSpace.closedBall_zero_eq {n : Type u_8} [] (r : ) (hr : 0 r) :
= {x : | i : n, x i ^ 2 r ^ 2}
theorem EuclideanSpace.sphere_zero_eq {n : Type u_8} [] (r : ) (hr : 0 r) :
= {x : | i : n, x i ^ 2 = r ^ 2}
@[simp]
theorem finrank_euclideanSpace {ι : Type u_1} {𝕜 : Type u_3} [] [] :
theorem finrank_euclideanSpace_fin {𝕜 : Type u_3} [] {n : } :
= n
theorem EuclideanSpace.inner_eq_star_dotProduct {ι : Type u_1} {𝕜 : Type u_3} [] [] (x : ) (y : ) :
inner x y = Matrix.dotProduct (star ((WithLp.equiv 2 (ι𝕜)) x)) ((WithLp.equiv 2 (ι𝕜)) y)
theorem EuclideanSpace.inner_piLp_equiv_symm {ι : Type u_1} {𝕜 : Type u_3} [] [] (x : ι𝕜) (y : ι𝕜) :
inner ((WithLp.equiv 2 (ι𝕜)).symm x) ((WithLp.equiv 2 (ι𝕜)).symm y) =
def DirectSum.IsInternal.isometryL2OfOrthogonalFamily {ι : Type u_1} {𝕜 : Type u_3} [] {E : Type u_4} [] [] [] {V : ι} (hV : ) (hV' : OrthogonalFamily 𝕜 (fun (i : ι) => { x : E // x V i }) fun (i : ι) => (V i).subtypeₗᵢ) :
E ≃ₗᵢ[𝕜] PiLp 2 fun (i : ι) => { x : E // x V i }

A finite, mutually orthogonal family of subspaces of E, which span E, induce an isometry from E to PiLp 2 of the subspaces equipped with the L2 inner product.

Equations
• One or more equations did not get rendered due to their size.
Instances For
@[simp]
theorem DirectSum.IsInternal.isometryL2OfOrthogonalFamily_symm_apply {ι : Type u_1} {𝕜 : Type u_3} [] {E : Type u_4} [] [] [] {V : ι} (hV : ) (hV' : OrthogonalFamily 𝕜 (fun (i : ι) => { x : E // x V i }) fun (i : ι) => (V i).subtypeₗᵢ) (w : PiLp 2 fun (i : ι) => { x : E // x V i }) :
(hV.isometryL2OfOrthogonalFamily hV').symm w = i : ι, (w i)
@[reducible, inline]
abbrev EuclideanSpace.equiv (ι : Type u_1) (𝕜 : Type u_3) [] :
≃L[𝕜] ι𝕜

A shorthand for PiLp.continuousLinearEquiv.

Equations
Instances For
@[simp]
theorem EuclideanSpace.projₗ_apply {ι : Type u_1} {𝕜 : Type u_3} [] (i : ι) :
∀ (a : WithLp 2 (ι𝕜)), a = a i
def EuclideanSpace.projₗ {ι : Type u_1} {𝕜 : Type u_3} [] (i : ι) :
→ₗ[𝕜] 𝕜

The projection on the i-th coordinate of EuclideanSpace 𝕜 ι, as a linear map.

Equations
Instances For
@[simp]
theorem EuclideanSpace.proj_apply {ι : Type u_1} {𝕜 : Type u_3} [] (i : ι) :
∀ (a : WithLp 2 (ι𝕜)), a = a i
@[simp]
theorem EuclideanSpace.proj_coe {ι : Type u_1} {𝕜 : Type u_3} [] (i : ι) :
def EuclideanSpace.proj {ι : Type u_1} {𝕜 : Type u_3} [] (i : ι) :
→L[𝕜] 𝕜

The projection on the i-th coordinate of EuclideanSpace 𝕜 ι, as a continuous linear map.

Equations
• = { toLinearMap := , cont := }
Instances For
def EuclideanSpace.single {ι : Type u_1} {𝕜 : Type u_3} [] [] (i : ι) (a : 𝕜) :

The vector given in euclidean space by being a : 𝕜 at coordinate i : ι and 0 : 𝕜 at all other coordinates.

Equations
Instances For
@[simp]
theorem WithLp.equiv_single {ι : Type u_1} {𝕜 : Type u_3} [] [] (i : ι) (a : 𝕜) :
(WithLp.equiv 2 ((i : ι) → (fun (x : ι) => 𝕜) i)) =
@[simp]
theorem WithLp.equiv_symm_single {ι : Type u_1} {𝕜 : Type u_3} [] [] (i : ι) (a : 𝕜) :
(WithLp.equiv 2 (ι𝕜)).symm (Pi.single i a) =
@[simp]
theorem EuclideanSpace.single_apply {ι : Type u_1} {𝕜 : Type u_3} [] [] (i : ι) (a : 𝕜) (j : ι) :
= if j = i then a else 0
theorem EuclideanSpace.inner_single_left {ι : Type u_1} {𝕜 : Type u_3} [] [] [] (i : ι) (a : 𝕜) (v : ) :
inner v = (starRingEnd 𝕜) a * v i
theorem EuclideanSpace.inner_single_right {ι : Type u_1} {𝕜 : Type u_3} [] [] [] (i : ι) (a : 𝕜) (v : ) :
inner v = a * (starRingEnd ((fun (x : ι) => 𝕜) i)) (v i)
@[simp]
theorem EuclideanSpace.norm_single {ι : Type u_1} {𝕜 : Type u_3} [] [] [] (i : ι) (a : 𝕜) :
@[simp]
theorem EuclideanSpace.nnnorm_single {ι : Type u_1} {𝕜 : Type u_3} [] [] [] (i : ι) (a : 𝕜) :
@[simp]
theorem EuclideanSpace.dist_single_same {ι : Type u_1} {𝕜 : Type u_3} [] [] [] (i : ι) (a : 𝕜) (b : 𝕜) :
dist = dist a b
@[simp]
theorem EuclideanSpace.nndist_single_same {ι : Type u_1} {𝕜 : Type u_3} [] [] [] (i : ι) (a : 𝕜) (b : 𝕜) :
@[simp]
theorem EuclideanSpace.edist_single_same {ι : Type u_1} {𝕜 : Type u_3} [] [] [] (i : ι) (a : 𝕜) (b : 𝕜) :
theorem EuclideanSpace.orthonormal_single {ι : Type u_1} {𝕜 : Type u_3} [] [] [] :
Orthonormal 𝕜 fun (i : ι) =>

EuclideanSpace.single forms an orthonormal family.

theorem EuclideanSpace.piLpCongrLeft_single {ι : Type u_1} {𝕜 : Type u_3} [] [] [] {ι' : Type u_8} [Fintype ι'] [] (e : ι' ι) (i' : ι') (v : 𝕜) :
structure OrthonormalBasis (ι : Type u_1) (𝕜 : Type u_3) [] (E : Type u_4) [] [] :
Type (max (max u_1 u_3) u_4)

An orthonormal basis on E is an identification of E with its dimensional-matching EuclideanSpace 𝕜 ι.

• ofRepr :: (
• repr : E ≃ₗᵢ[𝕜]

Linear isometry between E and EuclideanSpace 𝕜 ι representing the orthonormal basis.

• )
Instances For
theorem OrthonormalBasis.repr_injective {ι : Type u_1} {𝕜 : Type u_3} [] {E : Type u_4} [] [] :
Function.Injective OrthonormalBasis.repr
instance OrthonormalBasis.instFunLike {ι : Type u_1} {𝕜 : Type u_3} [] {E : Type u_4} [] [] :
FunLike (OrthonormalBasis ι 𝕜 E) ι E

b i is the ith basis vector.

Equations
• OrthonormalBasis.instFunLike = { coe := fun (b : ) (i : ι) => b.repr.symm , coe_injective' := }
@[simp]
theorem OrthonormalBasis.coe_ofRepr {ι : Type u_1} {𝕜 : Type u_3} [] {E : Type u_4} [] [] [] (e : E ≃ₗᵢ[𝕜] ) :
{ repr := e } = fun (i : ι) => e.symm
@[simp]
theorem OrthonormalBasis.repr_symm_single {ι : Type u_1} {𝕜 : Type u_3} [] {E : Type u_4} [] [] [] (b : ) (i : ι) :
b.repr.symm = b i
@[simp]
theorem OrthonormalBasis.repr_self {ι : Type u_1} {𝕜 : Type u_3} [] {E : Type u_4} [] [] [] (b : ) (i : ι) :
b.repr (b i) =
theorem OrthonormalBasis.repr_apply_apply {ι : Type u_1} {𝕜 : Type u_3} [] {E : Type u_4} [] [] (b : ) (v : E) (i : ι) :
b.repr v i = inner (b i) v
@[simp]
theorem OrthonormalBasis.orthonormal {ι : Type u_1} {𝕜 : Type u_3} [] {E : Type u_4} [] [] (b : ) :
Orthonormal 𝕜 b
def OrthonormalBasis.toBasis {ι : Type u_1} {𝕜 : Type u_3} [] {E : Type u_4} [] [] (b : ) :
Basis ι 𝕜 E

The Basis ι 𝕜 E underlying the OrthonormalBasis

Equations
Instances For
@[simp]
theorem OrthonormalBasis.coe_toBasis {ι : Type u_1} {𝕜 : Type u_3} [] {E : Type u_4} [] [] (b : ) :
b.toBasis = b
@[simp]
theorem OrthonormalBasis.coe_toBasis_repr {ι : Type u_1} {𝕜 : Type u_3} [] {E : Type u_4} [] [] (b : ) :
b.toBasis.equivFun = b.repr.toLinearEquiv
@[simp]
theorem OrthonormalBasis.coe_toBasis_repr_apply {ι : Type u_1} {𝕜 : Type u_3} [] {E : Type u_4} [] [] (b : ) (x : E) (i : ι) :
(b.toBasis.repr x) i = b.repr x i
theorem OrthonormalBasis.sum_repr {ι : Type u_1} {𝕜 : Type u_3} [] {E : Type u_4} [] [] (b : ) (x : E) :
i : ι, b.repr x i b i = x
theorem OrthonormalBasis.sum_repr' {ι : Type u_1} {𝕜 : Type u_3} [] {E : Type u_4} [] [] (b : ) (x : E) :
i : ι, inner (b i) x b i = x
theorem OrthonormalBasis.sum_repr_symm {ι : Type u_1} {𝕜 : Type u_3} [] {E : Type u_4} [] [] (b : ) (v : ) :
i : ι, v i b i = b.repr.symm v
theorem OrthonormalBasis.sum_inner_mul_inner {ι : Type u_1} {𝕜 : Type u_3} [] {E : Type u_4} [] [] (b : ) (x : E) (y : E) :
i : ι, inner x (b i) * inner (b i) y = inner x y
theorem OrthonormalBasis.orthogonalProjection_eq_sum {ι : Type u_1} {𝕜 : Type u_3} [] {E : Type u_4} [] [] {U : } [CompleteSpace { x : E // x U }] (b : OrthonormalBasis ι 𝕜 { x : E // x U }) (x : E) :
x = i : ι, inner (↑(b i)) x b i
def OrthonormalBasis.map {ι : Type u_1} {𝕜 : Type u_3} [] {E : Type u_4} [] [] {G : Type u_8} [] (b : ) (L : E ≃ₗᵢ[𝕜] G) :

Mapping an orthonormal basis along a LinearIsometryEquiv.

Equations
• b.map L = { repr := L.symm.trans b.repr }
Instances For
@[simp]
theorem OrthonormalBasis.map_apply {ι : Type u_1} {𝕜 : Type u_3} [] {E : Type u_4} [] [] {G : Type u_8} [] (b : ) (L : E ≃ₗᵢ[𝕜] G) (i : ι) :
(b.map L) i = L (b i)
@[simp]
theorem OrthonormalBasis.toBasis_map {ι : Type u_1} {𝕜 : Type u_3} [] {E : Type u_4} [] [] {G : Type u_8} [] (b : ) (L : E ≃ₗᵢ[𝕜] G) :
(b.map L).toBasis = b.toBasis.map L.toLinearEquiv
def Basis.toOrthonormalBasis {ι : Type u_1} {𝕜 : Type u_3} [] {E : Type u_4} [] [] (v : Basis ι 𝕜 E) (hv : Orthonormal 𝕜 v) :

A basis that is orthonormal is an orthonormal basis.

Equations
• v.toOrthonormalBasis hv = { repr := v.equivFun.isometryOfInner }
Instances For
@[simp]
theorem Basis.coe_toOrthonormalBasis_repr {ι : Type u_1} {𝕜 : Type u_3} [] {E : Type u_4} [] [] (v : Basis ι 𝕜 E) (hv : Orthonormal 𝕜 v) :
(v.toOrthonormalBasis hv).repr = v.equivFun
@[simp]
theorem Basis.coe_toOrthonormalBasis_repr_symm {ι : Type u_1} {𝕜 : Type u_3} [] {E : Type u_4} [] [] (v : Basis ι 𝕜 E) (hv : Orthonormal 𝕜 v) :
(v.toOrthonormalBasis hv).repr.symm = v.equivFun.symm
@[simp]
theorem Basis.toBasis_toOrthonormalBasis {ι : Type u_1} {𝕜 : Type u_3} [] {E : Type u_4} [] [] (v : Basis ι 𝕜 E) (hv : Orthonormal 𝕜 v) :
(v.toOrthonormalBasis hv).toBasis = v
@[simp]
theorem Basis.coe_toOrthonormalBasis {ι : Type u_1} {𝕜 : Type u_3} [] {E : Type u_4} [] [] (v : Basis ι 𝕜 E) (hv : Orthonormal 𝕜 v) :
(v.toOrthonormalBasis hv) = v
def Pi.orthonormalBasis {η : Type u_8} [] {ι : ηType u_9} [(i : η) → Fintype (ι i)] {𝕜 : Type u_10} [] {E : ηType u_11} [(i : η) → NormedAddCommGroup (E i)] [(i : η) → InnerProductSpace 𝕜 (E i)] (B : (i : η) → OrthonormalBasis (ι i) 𝕜 (E i)) :
OrthonormalBasis ((i : η) × ι i) 𝕜 (PiLp 2 E)

Pi.orthonormalBasis (B : ∀ i, OrthonormalBasis (ι i) 𝕜 (E i)) is the Σ i, ι i-indexed orthonormal basis on Π i, E i given by B i on each component.

Equations
Instances For
theorem Pi.orthonormalBasis.toBasis {η : Type u_8} [] {ι : ηType u_9} [(i : η) → Fintype (ι i)] {𝕜 : Type u_10} [] {E : ηType u_11} [(i : η) → NormedAddCommGroup (E i)] [(i : η) → InnerProductSpace 𝕜 (E i)] (B : (i : η) → OrthonormalBasis (ι i) 𝕜 (E i)) :
.toBasis = (Pi.basis fun (i : η) => (B i).toBasis).map (WithLp.linearEquiv 2 𝕜 ((j : η) → E j)).symm
@[simp]
theorem Pi.orthonormalBasis_apply {η : Type u_8} [] [] {ι : ηType u_9} [(i : η) → Fintype (ι i)] {𝕜 : Type u_10} [] {E : ηType u_11} [(i : η) → NormedAddCommGroup (E i)] [(i : η) → InnerProductSpace 𝕜 (E i)] (B : (i : η) → OrthonormalBasis (ι i) 𝕜 (E i)) (j : (i : η) × ι i) :
j = (WithLp.equiv 2 ((j : η) → E j)).symm (Pi.single j.fst ((B j.fst) j.snd))
@[simp]
theorem Pi.orthonormalBasis_repr {η : Type u_8} [] {ι : ηType u_9} [(i : η) → Fintype (ι i)] {𝕜 : Type u_10} [] {E : ηType u_11} [(i : η) → NormedAddCommGroup (E i)] [(i : η) → InnerProductSpace 𝕜 (E i)] (B : (i : η) → OrthonormalBasis (ι i) 𝕜 (E i)) (x : (i : η) → E i) (j : (i : η) × ι i) :
.repr x j = (B j.fst).repr (x j.fst) j.snd
def OrthonormalBasis.mk {ι : Type u_1} {𝕜 : Type u_3} [] {E : Type u_4} [] [] {v : ιE} (hon : ) (hsp : ) :

A finite orthonormal set that spans is an orthonormal basis

Equations
Instances For
@[simp]
theorem OrthonormalBasis.coe_mk {ι : Type u_1} {𝕜 : Type u_3} [] {E : Type u_4} [] [] {v : ιE} (hon : ) (hsp : ) :
(OrthonormalBasis.mk hon hsp) = v
def OrthonormalBasis.span {ι' : Type u_2} {𝕜 : Type u_3} [] {E : Type u_4} [] [] {v' : ι'E} (h : Orthonormal 𝕜 v') (s : Finset ι') :
OrthonormalBasis { x : ι' // x s } 𝕜 { x : E // x Submodule.span 𝕜 (Finset.image v' s) }

Any finite subset of an orthonormal family is an OrthonormalBasis for its span.

Equations
Instances For
@[simp]
theorem OrthonormalBasis.span_apply {ι' : Type u_2} {𝕜 : Type u_3} [] {E : Type u_4} [] [] {v' : ι'E} (h : Orthonormal 𝕜 v') (s : Finset ι') (i : { x : ι' // x s }) :
( i) = v' i
def OrthonormalBasis.mkOfOrthogonalEqBot {ι : Type u_1} {𝕜 : Type u_3} [] {E : Type u_4} [] [] {v : ιE} (hon : ) (hsp : (Submodule.span 𝕜 (Set.range v)) = ) :

A finite orthonormal family of vectors whose span has trivial orthogonal complement is an orthonormal basis.

Equations
Instances For
@[simp]
theorem OrthonormalBasis.coe_of_orthogonal_eq_bot_mk {ι : Type u_1} {𝕜 : Type u_3} [] {E : Type u_4} [] [] {v : ιE} (hon : ) (hsp : (Submodule.span 𝕜 (Set.range v)) = ) :
= v
def OrthonormalBasis.reindex {ι : Type u_1} {ι' : Type u_2} {𝕜 : Type u_3} [] {E : Type u_4} [] [] [Fintype ι'] (b : ) (e : ι ι') :
OrthonormalBasis ι' 𝕜 E

b.reindex (e : ι ≃ ι') is an OrthonormalBasis indexed by ι'

Equations
• b.reindex e = { repr := b.repr.trans }
Instances For
theorem OrthonormalBasis.reindex_apply {ι : Type u_1} {ι' : Type u_2} {𝕜 : Type u_3} [] {E : Type u_4} [] [] [Fintype ι'] (b : ) (e : ι ι') (i' : ι') :
(b.reindex e) i' = b (e.symm i')
@[simp]
theorem OrthonormalBasis.reindex_toBasis {ι : Type u_1} {ι' : Type u_2} {𝕜 : Type u_3} [] {E : Type u_4} [] [] [Fintype ι'] (b : ) (e : ι ι') :
(b.reindex e).toBasis = b.toBasis.reindex e
@[simp]
theorem OrthonormalBasis.coe_reindex {ι : Type u_1} {ι' : Type u_2} {𝕜 : Type u_3} [] {E : Type u_4} [] [] [Fintype ι'] (b : ) (e : ι ι') :
(b.reindex e) = b e.symm
@[simp]
theorem OrthonormalBasis.repr_reindex {ι : Type u_1} {ι' : Type u_2} {𝕜 : Type u_3} [] {E : Type u_4} [] [] [Fintype ι'] (b : ) (e : ι ι') (x : E) (i' : ι') :
(b.reindex e).repr x i' = b.repr x (e.symm i')
noncomputable def EuclideanSpace.basisFun (ι : Type u_1) (𝕜 : Type u_3) [] [] :

The basis Pi.basisFun, bundled as an orthornormal basis of EuclideanSpace 𝕜 ι.

Equations
• = { repr := }
Instances For
@[simp]
theorem EuclideanSpace.basisFun_apply (ι : Type u_1) (𝕜 : Type u_3) [] [] [] (i : ι) :
i =
@[simp]
theorem EuclideanSpace.basisFun_repr (ι : Type u_1) (𝕜 : Type u_3) [] [] (x : ) (i : ι) :
.repr x i = x i
theorem EuclideanSpace.basisFun_toBasis (ι : Type u_1) (𝕜 : Type u_3) [] [] :
.toBasis =
instance OrthonormalBasis.instInhabited {ι : Type u_1} {𝕜 : Type u_3} [] [] :
Equations
• OrthonormalBasis.instInhabited = { default := }

![1, I] is an orthonormal basis for ℂ considered as a real inner product space.

Equations
Instances For
@[simp]
theorem Complex.orthonormalBasisOneI_repr_apply (z : ) :
= ![z.re, z.im]
@[simp]
theorem Complex.orthonormalBasisOneI_repr_symm_apply (x : ) :
.symm x = (x 0) + (x 1) * Complex.I
@[simp]
@[simp]

The isometry between ℂ and a two-dimensional real inner product space given by a basis.

Equations
• = .trans v.repr.symm
Instances For
@[simp]
theorem Complex.map_isometryOfOrthonormal {F : Type u_6} [] {F' : Type u_7} [] [] (v : OrthonormalBasis (Fin 2) F) (f : F ≃ₗᵢ[] F') :
Complex.isometryOfOrthonormal (v.map f) = .trans f
theorem Complex.isometryOfOrthonormal_symm_apply {F : Type u_6} [] (v : OrthonormalBasis (Fin 2) F) (f : F) :
.symm f = ((v.toBasis.coord 0) f) + ((v.toBasis.coord 1) f) * Complex.I
theorem Complex.isometryOfOrthonormal_apply {F : Type u_6} [] (v : OrthonormalBasis (Fin 2) F) (z : ) :
= z.re v 0 + z.im v 1

### Matrix representation of an orthonormal basis with respect to another #

theorem OrthonormalBasis.toMatrix_orthonormalBasis_mem_unitary {ι : Type u_1} {𝕜 : Type u_3} [] {E : Type u_4} [] [] [] (a : ) (b : ) :
a.toBasis.toMatrix b

The change-of-basis matrix between two orthonormal bases a, b is a unitary matrix.

@[simp]
theorem OrthonormalBasis.det_to_matrix_orthonormalBasis {ι : Type u_1} {𝕜 : Type u_3} [] {E : Type u_4} [] [] [] (a : ) (b : ) :
a.toBasis.det b = 1

The determinant of the change-of-basis matrix between two orthonormal bases a, b has unit length.

theorem OrthonormalBasis.toMatrix_orthonormalBasis_mem_orthogonal {ι : Type u_1} {F : Type u_6} [] [] [] (a : ) (b : ) :
a.toBasis.toMatrix b

The change-of-basis matrix between two orthonormal bases a, b is an orthogonal matrix.

theorem OrthonormalBasis.det_to_matrix_orthonormalBasis_real {ι : Type u_1} {F : Type u_6} [] [] [] (a : ) (b : ) :
a.toBasis.det b = 1 a.toBasis.det b = -1

The determinant of the change-of-basis matrix between two orthonormal bases a, b is ±1.

### Existence of orthonormal basis, etc. #

noncomputable def DirectSum.IsInternal.collectedOrthonormalBasis {ι : Type u_1} {𝕜 : Type u_3} [] {E : Type u_4} [] [] {A : ι} (hV : OrthogonalFamily 𝕜 (fun (i : ι) => { x : E // x A i }) fun (i : ι) => (A i).subtypeₗᵢ) [] (hV_sum : DirectSum.IsInternal fun (i : ι) => A i) {α : ιType u_8} [(i : ι) → Fintype (α i)] (v_family : (i : ι) → OrthonormalBasis (α i) 𝕜 { x : E // x A i }) :
OrthonormalBasis ((i : ι) × α i) 𝕜 E

Given an internal direct sum decomposition of a module M, and an orthonormal basis for each of the components of the direct sum, the disjoint union of these orthonormal bases is an orthonormal basis for M.

Equations
Instances For
theorem DirectSum.IsInternal.collectedOrthonormalBasis_mem {ι : Type u_1} {𝕜 : Type u_3} [] {E : Type u_4} [] [] {A : ι} [] (h : ) {α : ιType u_8} [(i : ι) → Fintype (α i)] (hV : OrthogonalFamily 𝕜 (fun (i : ι) => { x : E // x A i }) fun (i : ι) => (A i).subtypeₗᵢ) (v : (i : ι) → OrthonormalBasis (α i) 𝕜 { x : E // x A i }) (a : (i : ι) × α i) :
A a.fst
theorem Orthonormal.exists_orthonormalBasis_extension {𝕜 : Type u_3} [] {E : Type u_4} [] {v : Set E} [] (hv : Orthonormal 𝕜 Subtype.val) :
∃ (u : ) (b : OrthonormalBasis { x : E // x u } 𝕜 E), v u b = Subtype.val

In a finite-dimensional InnerProductSpace, any orthonormal subset can be extended to an orthonormal basis.

theorem Orthonormal.exists_orthonormalBasis_extension_of_card_eq {𝕜 : Type u_3} [] {E : Type u_4} [] [] {ι : Type u_8} [] (card_ι : ) {v : ιE} {s : Set ι} (hv : Orthonormal 𝕜 (s.restrict v)) :
∃ (b : ), is, b i = v i
theorem exists_orthonormalBasis (𝕜 : Type u_3) [] (E : Type u_4) [] [] :
∃ (w : ) (b : OrthonormalBasis { x : E // x w } 𝕜 E), b = Subtype.val

A finite-dimensional inner product space admits an orthonormal basis.

@[irreducible]
def stdOrthonormalBasis (𝕜 : Type u_8) [] (E : Type u_9) [] [] :

A finite-dimensional InnerProductSpace has an orthonormal basis.

Equations
Instances For
theorem stdOrthonormalBasis_def (𝕜 : Type u_8) [] (E : Type u_9) [] [] :
= let b := ; .mpr (b.reindex )
theorem orthonormalBasis_one_dim {ι : Type u_1} [] (b : ) :
(b = fun (x : ι) => 1) b = fun (x : ι) => -1

An orthonormal basis of ℝ is made either of the vector 1, or of the vector -1.

@[irreducible]
def DirectSum.IsInternal.sigmaOrthonormalBasisIndexEquiv {ι : Type u_8} {𝕜 : Type u_9} [] {E : Type u_10} [] [] [] {n : } (hn : ) [] {V : ι} (hV : ) (hV' : OrthogonalFamily 𝕜 (fun (i : ι) => { x : E // x V i }) fun (i : ι) => (V i).subtypeₗᵢ) :
(i : ι) × Fin (FiniteDimensional.finrank 𝕜 { x : E // x V i }) Fin n

Exhibit a bijection between Fin n and the index set of a certain basis of an n-dimensional inner product space E. This should not be accessed directly, but only via the subsequent API.

Equations
Instances For
theorem DirectSum.IsInternal.sigmaOrthonormalBasisIndexEquiv_def {ι : Type u_8} {𝕜 : Type u_9} [] {E : Type u_10} [] [] [] {n : } (hn : ) [] {V : ι} (hV : ) (hV' : OrthogonalFamily 𝕜 (fun (i : ι) => { x : E // x V i }) fun (i : ι) => (V i).subtypeₗᵢ) :
= let b := DirectSum.IsInternal.collectedOrthonormalBasis hV' hV fun (i : ι) => stdOrthonormalBasis 𝕜 { x : E // x V i };
@[irreducible]
def DirectSum.IsInternal.subordinateOrthonormalBasis {ι : Type u_8} {𝕜 : Type u_9} [] {E : Type u_10} [] [] [] {n : } (hn : ) [] {V : ι} (hV : ) (hV' : OrthogonalFamily 𝕜 (fun (i : ι) => { x : E // x V i }) fun (i : ι) => (V i).subtypeₗᵢ) :

An n-dimensional InnerProductSpace equipped with a decomposition as an internal direct sum has an orthonormal basis indexed by Fin n and subordinate to that direct sum.

Equations
Instances For
theorem DirectSum.IsInternal.subordinateOrthonormalBasis_def {ι : Type u_8} {𝕜 : Type u_9} [] {E : Type u_10} [] [] [] {n : } (hn : ) [] {V : ι} (hV : ) (hV' : OrthogonalFamily 𝕜 (fun (i : ι) => { x : E // x V i }) fun (i : ι) => (V i).subtypeₗᵢ) :
= (DirectSum.IsInternal.collectedOrthonormalBasis hV' hV fun (i : ι) => stdOrthonormalBasis 𝕜 { x : E // x V i }).reindex
@[irreducible]
def DirectSum.IsInternal.subordinateOrthonormalBasisIndex {ι : Type u_8} {𝕜 : Type u_9} [] {E : Type u_10} [] [] [] {n : } (hn : ) [] {V : ι} (hV : ) (a : Fin n) (hV' : OrthogonalFamily 𝕜 (fun (i : ι) => { x : E // x V i }) fun (i : ι) => (V i).subtypeₗᵢ) :
ι

An n-dimensional InnerProductSpace equipped with a decomposition as an internal direct sum has an orthonormal basis indexed by Fin n and subordinate to that direct sum. This function provides the mapping by which it is subordinate.

Equations
Instances For
theorem DirectSum.IsInternal.subordinateOrthonormalBasisIndex_def {ι : Type u_8} {𝕜 : Type u_9} [] {E : Type u_10} [] [] [] {n : } (hn : ) [] {V : ι} (hV : ) (a : Fin n) (hV' : OrthogonalFamily 𝕜 (fun (i : ι) => { x : E // x V i }) fun (i : ι) => (V i).subtypeₗᵢ) :
= (.symm a).fst
theorem DirectSum.IsInternal.subordinateOrthonormalBasis_subordinate {ι : Type u_1} {𝕜 : Type u_3} [] {E : Type u_4} [] [] [] {n : } (hn : ) [] {V : ι} (hV : ) (a : Fin n) (hV' : OrthogonalFamily 𝕜 (fun (i : ι) => { x : E // x V i }) fun (i : ι) => (V i).subtypeₗᵢ) :
a V

The basis constructed in DirectSum.IsInternal.subordinateOrthonormalBasis is subordinate to the OrthogonalFamily in question.

def OrthonormalBasis.fromOrthogonalSpanSingleton {𝕜 : Type u_3} [] {E : Type u_4} [] (n : ) [Fact ( = n + 1)] {v : E} (hv : v 0) :
OrthonormalBasis (Fin n) 𝕜 { x : E // x (Submodule.span 𝕜 {v}) }

Given a natural number n one less than the finrank of a finite-dimensional inner product space, there exists an isometry from the orthogonal complement of a nonzero singleton to EuclideanSpace 𝕜 (Fin n).

Equations
Instances For
noncomputable def LinearIsometry.extend {𝕜 : Type u_3} [] {V : Type u_8} [] [] {S : } (L : { x : V // x S } →ₗᵢ[𝕜] V) :
V →ₗᵢ[𝕜] V

Let S be a subspace of a finite-dimensional complex inner product space V. A linear isometry mapping S into V can be extended to a full isometry of V.

TODO: The case when S is a finite-dimensional subspace of an infinite-dimensional V.

Equations
• One or more equations did not get rendered due to their size.
Instances For
theorem LinearIsometry.extend_apply {𝕜 : Type u_3} [] {V : Type u_8} [] [] {S : } (L : { x : V // x S } →ₗᵢ[𝕜] V) (s : { x : V // x S }) :
L.extend s = L s
def Matrix.toEuclideanLin {𝕜 : Type u_3} [] {m : Type u_8} {n : Type u_9} [] [] :
Matrix m n 𝕜 ≃ₗ[𝕜] →ₗ[𝕜]

Matrix.toLin' adapted for EuclideanSpace 𝕜 _.

Equations
Instances For
@[simp]
theorem Matrix.toEuclideanLin_piLp_equiv_symm {𝕜 : Type u_3} [] {m : Type u_8} {n : Type u_9} [] [] (A : Matrix m n 𝕜) (x : n𝕜) :
(Matrix.toEuclideanLin A) ((WithLp.equiv 2 ((i : n) → (fun (x : n) => 𝕜) i)).symm x) = (WithLp.equiv 2 (m𝕜)).symm ((Matrix.toLin' A) x)
@[simp]
theorem Matrix.piLp_equiv_toEuclideanLin {𝕜 : Type u_3} [] {m : Type u_8} {n : Type u_9} [] [] (A : Matrix m n 𝕜) (x : ) :
(WithLp.equiv 2 ((i : m) → (fun (x : m) => 𝕜) i)) ((Matrix.toEuclideanLin A) x) = (Matrix.toLin' A) ((WithLp.equiv 2 (n𝕜)) x)
theorem Matrix.toEuclideanLin_apply {𝕜 : Type u_3} [] {m : Type u_8} {n : Type u_9} [] [] (M : Matrix m n 𝕜) (v : ) :
(Matrix.toEuclideanLin M) v = (WithLp.equiv 2 (m𝕜)).symm (M.mulVec ((WithLp.equiv 2 (n𝕜)) v))
@[simp]
theorem Matrix.piLp_equiv_toEuclideanLin_apply {𝕜 : Type u_3} [] {m : Type u_8} {n : Type u_9} [] [] (M : Matrix m n 𝕜) (v : ) :
(WithLp.equiv 2 (m𝕜)) ((Matrix.toEuclideanLin M) v) = M.mulVec ((WithLp.equiv 2 (n𝕜)) v)
@[simp]
theorem Matrix.toEuclideanLin_apply_piLp_equiv_symm {𝕜 : Type u_3} [] {m : Type u_8} {n : Type u_9} [] [] (M : Matrix m n 𝕜) (v : n𝕜) :
(Matrix.toEuclideanLin M) ((WithLp.equiv 2 (n𝕜)).symm v) = (WithLp.equiv 2 (m𝕜)).symm (M.mulVec v)
theorem Matrix.toEuclideanLin_eq_toLin {𝕜 : Type u_3} [] {m : Type u_8} {n : Type u_9} [] [] [] :
Matrix.toEuclideanLin = Matrix.toLin (PiLp.basisFun 2 𝕜 n) (PiLp.basisFun 2 𝕜 m)
theorem Matrix.toEuclideanLin_eq_toLin_orthonormal {𝕜 : Type u_3} [] {m : Type u_8} {n : Type u_9} [] [] [] :
Matrix.toEuclideanLin = Matrix.toLin .toBasis .toBasis
theorem inner_matrix_row_row {𝕜 : Type u_3} [] {m : Type u_8} {n : Type u_9} [] (A : Matrix m n 𝕜) (B : Matrix m n 𝕜) (i : m) (j : m) :
inner ((WithLp.equiv 2 (n𝕜)).symm (A i)) ((WithLp.equiv 2 (n𝕜)).symm (B j)) = (B * A.conjTranspose) j i

The inner product of a row of A and a row of B is an entry of B * Aᴴ.

theorem inner_matrix_col_col {𝕜 : Type u_3} [] {m : Type u_8} {n : Type u_9} [] (A : Matrix m n 𝕜) (B : Matrix m n 𝕜) (i : n) (j : n) :
inner ((WithLp.equiv 2 (m𝕜)).symm (A.transpose i)) ((WithLp.equiv 2 (m𝕜)).symm (B.transpose j)) = (A.conjTranspose * B) i j

The inner product of a column of A and a column of B is an entry of Aᴴ * B.