L² inner product space structure on finite products of inner product spaces #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
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 pi_Lp 2.
This file develops the notion of a finite dimensional Hilbert space over 𝕜 = ℂ, ℝ, referred to as
E. We define an orthonormal_basis 𝕜 ι E as a linear isometric equivalence
between E and euclidean_space 𝕜 ι. Then std_orthonormal_basis 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.to_orthonormal_basis). We show that
orthonormal bases for each summand in a direct sum of spaces can be combined into an orthonormal
basis for the the whole sum in direct_sum.submodule_is_internal.subordinate_orthonormal_basis. In
the last section, various properties of matrices are explored.
Main definitions #
-
euclidean_space 𝕜 n: defined to bepi_Lp 2 (n → 𝕜)for anyfintype n, i.e., the space from functions tonto𝕜with theL²norm. We register several instances on it (notably that it is a finite-dimensional inner product space). -
orthonormal_basis 𝕜 ι: defined to be an isometry to Euclidean space from a given finite-dimensional innner product space,E ≃ₗᵢ[𝕜] euclidean_space 𝕜 ι. -
basis.to_orthonormal_basis: constructs anorthonormal_basisfor a finite-dimensional Euclidean space from abasiswhich isorthonormal. -
orthonormal.exists_orthonormal_basis_extension: provides an existential result of anorthonormal_basisextending a given orthonormal set -
exists_orthonormal_basis: provides an orthonormal basis on a finite dimensional vector space -
std_orthonormal_basis: provides an arbitrarily-chosenorthonormal_basisof a given finite dimensional inner product space
For consequences in infinite dimension (Hilbert bases, etc.), see the file
analysis.inner_product_space.l2_space.
Equations
- pi_Lp.inner_product_space f = {to_normed_space := pi_Lp.normed_space 2 𝕜 f (λ (i : ι), inner_product_space.to_normed_space), to_has_inner := {inner := λ (x y : pi_Lp 2 f), finset.univ.sum (λ (i : ι), has_inner.inner (x i) (y i))}, norm_sq_eq_inner := _, conj_symm := _, add_left := _, smul_left := _}
The standard real/complex Euclidean space, functions on a finite type. For an n-dimensional
space use euclidean_space 𝕜 (fin n).
Equations
- euclidean_space 𝕜 n = pi_Lp 2 (λ (i : n), 𝕜)
Equations
- euclidean_space.inner_product_space = pi_Lp.inner_product_space (λ (i : ι), 𝕜)
A finite, mutually orthogonal family of subspaces of E, which span E, induce an isometry
from E to pi_Lp 2 of the subspaces equipped with the L2 inner product.
Equations
- hV.isometry_L2_of_orthogonal_family hV' = let e₁ : direct_sum ι (λ (i : ι), (λ (i : ι), ↥(V i)) i) ≃ₗ[𝕜] Π (i : ι), (λ (i : ι), ↥(V i)) i := direct_sum.linear_equiv_fun_on_fintype 𝕜 ι (λ (i : ι), ↥(V i)), e₂ : direct_sum ι (λ (i : ι), ↥(V i)) ≃ₗ[𝕜] E := linear_equiv.of_bijective (direct_sum.coe_linear_map V) hV in (e₂.symm.trans e₁).isometry_of_inner _
pi_Lp.linear_equiv upgraded to a continuous linear map between euclidean_space 𝕜 ι
and ι → 𝕜.
Equations
- euclidean_space.equiv ι 𝕜 = (pi_Lp.linear_equiv 2 𝕜 (λ (i : ι), 𝕜)).to_continuous_linear_equiv
The projection on the i-th coordinate of euclidean_space 𝕜 ι, as a linear map.
Equations
- euclidean_space.projₗ i = (linear_map.proj i).comp ↑(pi_Lp.linear_equiv 2 𝕜 (λ (i : ι), 𝕜))
The projection on the i-th coordinate of euclidean_space 𝕜 ι,
as a continuous linear map.
Equations
- euclidean_space.proj i = {to_linear_map := euclidean_space.projₗ i, cont := _}
The vector given in euclidean space by being 1 : 𝕜 at coordinate i : ι and 0 : 𝕜 at
all other coordinates.
Equations
- euclidean_space.single i a = ⇑((pi_Lp.equiv 2 (λ (i : ι), 𝕜)).symm) (pi.single i a)
euclidean_space.single forms an orthonormal family.
- repr : E ≃ₗᵢ[𝕜] euclidean_space 𝕜 ι
An orthonormal basis on E is an identification of E with its dimensional-matching
euclidean_space 𝕜 ι.
Instances for orthonormal_basis
- orthonormal_basis.has_sizeof_inst
- orthonormal_basis.inhabited
- orthonormal_basis.has_coe_to_fun
Equations
b i is the ith basis vector.
Equations
- orthonormal_basis.has_coe_to_fun = {coe := λ (b : orthonormal_basis ι 𝕜 E) (i : ι), ⇑(b.repr.symm) (euclidean_space.single i 1)}
The basis ι 𝕜 E underlying the orthonormal_basis
Equations
Mapping an orthonormal basis along a linear_isometry_equiv.
A basis that is orthonormal is an orthonormal basis.
Equations
- v.to_orthonormal_basis hv = {repr := v.equiv_fun.isometry_of_inner _}
A finite orthonormal set that spans is an orthonormal basis
Equations
- orthonormal_basis.mk hon hsp = (basis.mk _ hsp).to_orthonormal_basis _
Any finite subset of a orthonormal family is an orthonormal_basis for its span.
Equations
- orthonormal_basis.span h s = let e₀' : basis ↥s 𝕜 ↥(submodule.span 𝕜 (set.range (v' ∘ coe))) := basis.span _, e₀ : orthonormal_basis ↥s 𝕜 ↥(submodule.span 𝕜 (set.range (v' ∘ coe))) := orthonormal_basis.mk _ _, φ : ↥(submodule.span 𝕜 ↑(finset.image v' s)) ≃ₗᵢ[𝕜] ↥(submodule.span 𝕜 (set.range (v' ∘ coe))) := linear_isometry_equiv.of_eq (submodule.span 𝕜 ↑(finset.image v' s)) (submodule.span 𝕜 (set.range (v' ∘ coe))) _ in e₀.map φ.symm
A finite orthonormal family of vectors whose span has trivial orthogonal complement is an orthonormal basis.
Equations
- orthonormal_basis.mk_of_orthogonal_eq_bot hon hsp = orthonormal_basis.mk hon _
b.reindex (e : ι ≃ ι') is an orthonormal_basis indexed by ι'
![1, I] is an orthonormal basis for ℂ considered as a real inner product space.
Equations
- complex.orthonormal_basis_one_I = complex.basis_one_I.to_orthonormal_basis complex.orthonormal_basis_one_I._proof_1
The isometry between ℂ and a two-dimensional real inner product space given by a basis.
Equations
Matrix representation of an orthonormal basis with respect to another #
The change-of-basis matrix between two orthonormal bases a, b is a unitary matrix.
The determinant of the change-of-basis matrix between two orthonormal bases a, b has
unit length.
The change-of-basis matrix between two orthonormal bases a, b is an orthogonal matrix.
The determinant of the change-of-basis matrix between two orthonormal bases a, b is ±1.
Existence of orthonormal basis, etc. #
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
- direct_sum.is_internal.collected_orthonormal_basis hV hV_sum v_family = (hV_sum.collected_basis (λ (i : ι), (v_family i).to_basis)).to_orthonormal_basis _
In a finite-dimensional inner_product_space, any orthonormal subset can be extended to an
orthonormal basis.
A finite-dimensional inner product space admits an orthonormal basis.
A finite-dimensional inner_product_space has an orthonormal basis.
Equations
- std_orthonormal_basis 𝕜 E = let b : orthonormal_basis ↥(classical.some _) 𝕜 E := classical.some _ in _.mpr (b.reindex (fintype.equiv_fin_of_card_eq _))
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
- direct_sum.is_internal.sigma_orthonormal_basis_index_equiv hn hV hV' = let b : orthonormal_basis (Σ (i : ι), fin (finite_dimensional.finrank 𝕜 ↥(V i))) 𝕜 E := direct_sum.is_internal.collected_orthonormal_basis hV' hV (λ (i : ι), std_orthonormal_basis 𝕜 ↥(V i)) in fintype.equiv_fin_of_card_eq _
An n-dimensional inner_product_space equipped with a decomposition as an internal direct
sum has an orthonormal basis indexed by fin n and subordinate to that direct sum.
Equations
- direct_sum.is_internal.subordinate_orthonormal_basis hn hV hV' = (direct_sum.is_internal.collected_orthonormal_basis hV' hV (λ (i : ι), std_orthonormal_basis 𝕜 ↥(V i))).reindex (direct_sum.is_internal.sigma_orthonormal_basis_index_equiv hn hV hV')
An n-dimensional inner_product_space 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
- direct_sum.is_internal.subordinate_orthonormal_basis_index hn hV a hV' = (⇑((direct_sum.is_internal.sigma_orthonormal_basis_index_equiv hn hV hV').symm) a).fst
The basis constructed in orthogonal_family.subordinate_orthonormal_basis is subordinate to
the orthogonal_family in question.
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
euclidean_space 𝕜 (fin n).
Equations
- orthonormal_basis.from_orthogonal_span_singleton n hv = (std_orthonormal_basis 𝕜 ↥(submodule.span 𝕜 {v})ᗮ).reindex (fin_congr _)
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
- L.extend = let d : ℕ := finite_dimensional.finrank 𝕜 ↥Sᗮ, LS : submodule 𝕜 V := linear_map.range L.to_linear_map, L3 : ↥Sᗮ →ₗᵢ[𝕜] V := LSᗮ.subtypeₗᵢ.comp ((std_orthonormal_basis 𝕜 ↥Sᗮ).repr.trans ((std_orthonormal_basis 𝕜 ↥LSᗮ).reindex (fin_congr _)).repr.symm).to_linear_isometry, p1 : V →ₗ[𝕜] ↥S := (orthogonal_projection S).to_linear_map, p2 : V →ₗ[𝕜] ↥Sᗮ := (orthogonal_projection Sᗮ).to_linear_map, M : V →ₗ[𝕜] V := L.to_linear_map.comp p1 + L3.to_linear_map.comp p2 in {to_linear_map := M, norm_map' := _}
matrix.to_lin' adapted for euclidean_space 𝕜 _.
Equations
- matrix.to_euclidean_lin = matrix.to_lin'.trans ((pi_Lp.linear_equiv 2 𝕜 (λ (_x : n), 𝕜)).symm.arrow_congr (pi_Lp.linear_equiv 2 𝕜 (λ (_x : m), 𝕜)).symm)
The inner product of a row of A and a row of B is an entry of B ⬝ Aᴴ.
The inner product of a column of A and a column of B is an entry of Aᴴ ⬝ B.