mathlib3 documentation

analysis.inner_product_space.projection

The orthogonal projection #

THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.

Given a nonempty complete subspace K of an inner product space E, this file constructs orthogonal_projection K : E →L[𝕜] K, the orthogonal projection of E onto K. This map satisfies: for any point u in E, the point v = orthogonal_projection K u in K minimizes the distance ‖u - v‖ to u.

Also a linear isometry equivalence reflection K : E ≃ₗᵢ[𝕜] E is constructed, by choosing, for each u : E, the point reflection K u to satisfy u + (reflection K u) = 2 • orthogonal_projection K u.

Basic API for orthogonal_projection and reflection is developed.

Next, the orthogonal projection is used to prove a series of more subtle lemmas about the the orthogonal complement of complete subspaces of E (the orthogonal complement itself was defined in analysis.inner_product_space.basic); the lemma submodule.sup_orthogonal_of_is_complete, stating that for a complete subspace K of E we have K ⊔ Kᗮ = ⊤, is a typical example.

References #

The orthogonal projection construction is adapted from

The Coq code is available at the following address: http://www.lri.fr/~sboldo/elfic/index.html

Orthogonal projection in inner product spaces #

theorem exists_norm_eq_infi_of_complete_convex {F : Type u_3} [normed_add_comm_group F] [inner_product_space F] {K : set F} (ne : K.nonempty) (h₁ : is_complete K) (h₂ : convex K) (u : F) :
(v : F) (H : v K), u - v = (w : K), u - w

Existence of minimizers Let u be a point in a real inner product space, and let K be a nonempty complete convex subset. Then there exists a (unique) v in K that minimizes the distance ‖u - v‖ to u.

theorem norm_eq_infi_iff_real_inner_le_zero {F : Type u_3} [normed_add_comm_group F] [inner_product_space F] {K : set F} (h : convex K) {u v : F} (hv : v K) :
(u - v = (w : K), u - w) (w : F), w K has_inner.inner (u - v) (w - v) 0

Characterization of minimizers for the projection on a convex set in a real inner product space.

theorem exists_norm_eq_infi_of_complete_subspace {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] (K : submodule 𝕜 E) (h : is_complete K) (u : E) :
(v : E) (H : v K), u - v = (w : K), u - w

Existence of projections on complete subspaces. Let u be a point in an inner product space, and let K be a nonempty complete subspace. Then there exists a (unique) v in K that minimizes the distance ‖u - v‖ to u. This point v is usually called the orthogonal projection of u onto K.

theorem norm_eq_infi_iff_real_inner_eq_zero {F : Type u_3} [normed_add_comm_group F] [inner_product_space F] (K : submodule F) {u v : F} (hv : v K) :
(u - v = (w : K), u - w) (w : F), w K has_inner.inner (u - v) w = 0

Characterization of minimizers in the projection on a subspace, in the real case. Let u be a point in a real inner product space, and let K be a nonempty subspace. Then point v minimizes the distance ‖u - v‖ over points in K if and only if for all w ∈ K, ⟪u - v, w⟫ = 0 (i.e., u - v is orthogonal to the subspace K). This is superceded by norm_eq_infi_iff_inner_eq_zero that gives the same conclusion over any is_R_or_C field.

theorem norm_eq_infi_iff_inner_eq_zero {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] (K : submodule 𝕜 E) {u v : E} (hv : v K) :
(u - v = (w : K), u - w) (w : E), w K has_inner.inner (u - v) w = 0

Characterization of minimizers in the projection on a subspace. Let u be a point in an inner product space, and let K be a nonempty subspace. Then point v minimizes the distance ‖u - v‖ over points in K if and only if for all w ∈ K, ⟪u - v, w⟫ = 0 (i.e., u - v is orthogonal to the subspace K)

noncomputable def orthogonal_projection_fn {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] (K : submodule 𝕜 E) [complete_space K] (v : E) :
E

The orthogonal projection onto a complete subspace, as an unbundled function. This definition is only intended for use in setting up the bundled version orthogonal_projection and should not be used once that is defined.

Equations
theorem orthogonal_projection_fn_mem {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] {K : submodule 𝕜 E} [complete_space K] (v : E) :

The unbundled orthogonal projection is in the given subspace. This lemma is only intended for use in setting up the bundled version and should not be used once that is defined.

theorem orthogonal_projection_fn_inner_eq_zero {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] {K : submodule 𝕜 E} [complete_space K] (v w : E) (H : w K) :

The characterization of the unbundled orthogonal projection. This lemma is only intended for use in setting up the bundled version and should not be used once that is defined.

theorem eq_orthogonal_projection_fn_of_mem_of_inner_eq_zero {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] {K : submodule 𝕜 E} [complete_space K] {u v : E} (hvm : v K) (hvo : (w : E), w K has_inner.inner (u - v) w = 0) :

The unbundled orthogonal projection is the unique point in K with the orthogonality property. This lemma is only intended for use in setting up the bundled version and should not be used once that is defined.

noncomputable def orthogonal_projection {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] (K : submodule 𝕜 E) [complete_space K] :
E →L[𝕜] K

The orthogonal projection onto a complete subspace.

Equations
@[simp]
@[simp]
theorem orthogonal_projection_inner_eq_zero {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] {K : submodule 𝕜 E} [complete_space K] (v w : E) (H : w K) :

The characterization of the orthogonal projection.

@[simp]

The difference of v from its orthogonal projection onto K is in Kᗮ.

theorem eq_orthogonal_projection_of_mem_of_inner_eq_zero {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] {K : submodule 𝕜 E} [complete_space K] {u v : E} (hvm : v K) (hvo : (w : E), w K has_inner.inner (u - v) w = 0) :

The orthogonal projection is the unique point in K with the orthogonality property.

theorem orthogonal_projection_minimal {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] {U : submodule 𝕜 E} [complete_space U] (y : E) :

The orthogonal projection of y on U minimizes the distance ‖y - x‖ for x ∈ U.

theorem eq_orthogonal_projection_of_eq_submodule {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] {K : submodule 𝕜 E} [complete_space K] {K' : submodule 𝕜 E} [complete_space K'] (h : K = K') (u : E) :

The orthogonal projections onto equal subspaces are coerced back to the same point in E.

@[simp]

The orthogonal projection sends elements of K to themselves.

theorem orthogonal_projection_eq_self_iff {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] {K : submodule 𝕜 E} [complete_space K] {v : E} :

A point equals its orthogonal projection if and only if it lies in the subspace.

Orthogonal projection onto the submodule.map of a subspace.

@[simp]

The orthogonal projection onto the trivial submodule is the zero map.

The orthogonal projection has norm ≤ 1.

theorem orthogonal_projection_singleton (𝕜 : Type u_1) {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] {v : E} (w : E) :

Formula for orthogonal projection onto a single vector.

theorem orthogonal_projection_unit_singleton (𝕜 : Type u_1) {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] {v : E} (hv : v = 1) (w : E) :

Formula for orthogonal projection onto a single unit vector.

noncomputable def reflection_linear_equiv {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] (K : submodule 𝕜 E) [complete_space K] :
E ≃ₗ[𝕜] E

Auxiliary definition for reflection: the reflection as a linear equivalence.

Equations
noncomputable def reflection {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] (K : submodule 𝕜 E) [complete_space K] :
E ≃ₗᵢ[𝕜] E

Reflection in a complete subspace of an inner product space. The word "reflection" is sometimes understood to mean specifically reflection in a codimension-one subspace, and sometimes more generally to cover operations such as reflection in a point. The definition here, of reflection in a subspace, is a more general sense of the word that includes both those common cases.

Equations
theorem reflection_apply {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] {K : submodule 𝕜 E} [complete_space K] (p : E) :

The result of reflecting.

@[simp]
theorem reflection_symm {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] {K : submodule 𝕜 E} [complete_space K] :

Reflection is its own inverse.

@[simp]
theorem reflection_inv {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] {K : submodule 𝕜 E} [complete_space K] :

Reflection is its own inverse.

@[simp]
theorem reflection_reflection {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] (K : submodule 𝕜 E) [complete_space K] (p : E) :

Reflecting twice in the same subspace.

Reflection is involutive.

@[simp]

Reflection is involutive.

@[simp]
theorem reflection_mul_reflection {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] (K : submodule 𝕜 E) [complete_space K] :

Reflection is involutive.

theorem reflection_eq_self_iff {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] {K : submodule 𝕜 E} [complete_space K] (x : E) :
(reflection K) x = x x K

A point is its own reflection if and only if it is in the subspace.

theorem reflection_mem_subspace_eq_self {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] {K : submodule 𝕜 E} [complete_space K] {x : E} (hx : x K) :
theorem reflection_map_apply {𝕜 : Type u_1} [is_R_or_C 𝕜] {E : Type u_2} {E' : Type u_3} [normed_add_comm_group E] [normed_add_comm_group E'] [inner_product_space 𝕜 E] [inner_product_space 𝕜 E'] (f : E ≃ₗᵢ[𝕜] E') (K : submodule 𝕜 E) [complete_space K] (x : E') :

Reflection in the submodule.map of a subspace.

theorem reflection_map {𝕜 : Type u_1} [is_R_or_C 𝕜] {E : Type u_2} {E' : Type u_3} [normed_add_comm_group E] [normed_add_comm_group E'] [inner_product_space 𝕜 E] [inner_product_space 𝕜 E'] (f : E ≃ₗᵢ[𝕜] E') (K : submodule 𝕜 E) [complete_space K] :

Reflection in the submodule.map of a subspace.

@[simp]

Reflection through the trivial subspace {0} is just negation.

theorem submodule.sup_orthogonal_inf_of_complete_space {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] {K₁ K₂ : submodule 𝕜 E} (h : K₁ K₂) [complete_space K₁] :
K₁ K₁ K₂ = K₂

If K₁ is complete and contained in K₂, K₁ and K₁ᗮ ⊓ K₂ span K₂.

If K is complete, K and Kᗮ span the whole space.

theorem submodule.exists_sum_mem_mem_orthogonal {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] (K : submodule 𝕜 E) [complete_space K] (v : E) :
(y : E) (H : y K) (z : E) (H : z K), v = y + z

If K is complete, any v in E can be expressed as a sum of elements of K and Kᗮ.

@[simp]
theorem submodule.orthogonal_orthogonal {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] (K : submodule 𝕜 E) [complete_space K] :

If K is complete, then the orthogonal complement of its orthogonal complement is itself.

If K is complete, K and Kᗮ are complements of each other.

@[simp]
theorem submodule.orthogonal_eq_bot_iff {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] {K : submodule 𝕜 E} [complete_space K] :
theorem eq_orthogonal_projection_of_mem_orthogonal {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] {K : submodule 𝕜 E} [complete_space K] {u v : E} (hv : v K) (hvo : u - v K) :

A point in K with the orthogonality property (here characterized in terms of Kᗮ) must be the orthogonal projection.

theorem eq_orthogonal_projection_of_mem_orthogonal' {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] {K : submodule 𝕜 E} [complete_space K] {u v z : E} (hv : v K) (hz : z K) (hu : u = v + z) :

A point in K with the orthogonality property (here characterized in terms of Kᗮ) must be the orthogonal projection.

The orthogonal projection onto K of an element of Kᗮ is zero.

The projection into U from an orthogonal submodule V is the zero map.

The projection into U from V is the zero map if and only if U and V are orthogonal.

theorem reflection_mem_subspace_orthogonal_complement_eq_neg {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] {K : submodule 𝕜 E} [complete_space K] {v : E} (hv : v K) :

The reflection in K of an element of Kᗮ is its negation.

The orthogonal projection onto Kᗮ of an element of K is zero.

If U ≤ V, then projecting on V and then on U is the same as projecting on U.

theorem orthogonal_projection_tendsto_closure_supr {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] [complete_space E] {ι : Type u_3} [semilattice_sup ι] (U : ι submodule 𝕜 E) [ (i : ι), complete_space (U i)] (hU : monotone U) (x : E) :

Given a monotone family U of complete submodules of E and a fixed x : E, the orthogonal projection of x on U i tends to the orthogonal projection of x on (⨆ i, U i).topological_closure along at_top.

theorem orthogonal_projection_tendsto_self {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] [complete_space E] {ι : Type u_3} [semilattice_sup ι] (U : ι submodule 𝕜 E) [ (t : ι), complete_space (U t)] (hU : monotone U) (x : E) (hU' : ( (t : ι), U t).topological_closure) :

Given a monotone family U of complete submodules of E with dense span supremum, and a fixed x : E, the orthogonal projection of x on U i tends to x along at_top.

The orthogonal complement satisfies Kᗮᗮᗮ = Kᗮ.

The closure of K is the full space iff Kᗮ is trivial.

theorem dense.eq_of_sub_mem_orthogonal {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] {K : submodule 𝕜 E} {x y : E} [complete_space E] (hK : dense K) (h : x - y K) :
x = y

If S is dense and x - y ∈ Kᗮ, then x = y.

theorem dense.eq_zero_of_mem_orthogonal {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] {K : submodule 𝕜 E} {x : E} [complete_space E] (hK : dense K) (h : x K) :
x = 0
theorem dense.eq_of_inner_left {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] {K : submodule 𝕜 E} {x y : E} [complete_space E] (hK : dense K) (h : (v : K), has_inner.inner x v = has_inner.inner y v) :
x = y
theorem dense.eq_zero_of_inner_left {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] {K : submodule 𝕜 E} {x : E} [complete_space E] (hK : dense K) (h : (v : K), has_inner.inner x v = 0) :
x = 0
theorem dense.eq_of_inner_right {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] {K : submodule 𝕜 E} {x y : E} [complete_space E] (hK : dense K) (h : (v : K), has_inner.inner v x = has_inner.inner v y) :
x = y
theorem dense.eq_zero_of_inner_right {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] {K : submodule 𝕜 E} {x : E} [complete_space E] (hK : dense K) (h : (v : K), has_inner.inner v x = 0) :
x = 0
theorem reflection_mem_subspace_orthogonal_precomplement_eq_neg {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] {K : submodule 𝕜 E} [complete_space E] {v : E} (hv : v K) :

The reflection in Kᗮ of an element of K is its negation.

The orthogonal projection onto (𝕜 ∙ v)ᗮ of v is zero.

The reflection in (𝕜 ∙ v)ᗮ of v is -v.

In a complete space E, a vector splits as the sum of its orthogonal projections onto a complete submodule K and onto the orthogonal complement of K.

The Pythagorean theorem, for an orthogonal projection.

In a complete space E, the projection maps onto a complete subspace K and its orthogonal complement sum to the identity.

The orthogonal projection is self-adjoint.

The orthogonal projection is symmetric.

theorem submodule.finrank_add_inf_finrank_orthogonal {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] {K₁ K₂ : submodule 𝕜 E} [finite_dimensional 𝕜 K₂] (h : K₁ K₂) :

Given a finite-dimensional subspace K₂, and a subspace K₁ containined in it, the dimensions of K₁ and the intersection of its orthogonal subspace with K₂ add to that of K₂.

theorem submodule.finrank_add_inf_finrank_orthogonal' {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] {K₁ K₂ : submodule 𝕜 E} [finite_dimensional 𝕜 K₂] (h : K₁ K₂) {n : } (h_dim : finite_dimensional.finrank 𝕜 K₁ + n = finite_dimensional.finrank 𝕜 K₂) :

Given a finite-dimensional subspace K₂, and a subspace K₁ containined in it, the dimensions of K₁ and the intersection of its orthogonal subspace with K₂ add to that of K₂.

Given a finite-dimensional space E and subspace K, the dimensions of K and Kᗮ add to that of E.

Given a finite-dimensional space E and subspace K, the dimensions of K and Kᗮ add to that of E.

theorem finrank_orthogonal_span_singleton {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] {n : } [fact (finite_dimensional.finrank 𝕜 E = n + 1)] {v : E} (hv : v 0) :

In a finite-dimensional inner product space, the dimension of the orthogonal complement of the span of a nonzero vector is one less than the dimension of the space.

An element φ of the orthogonal group of F can be factored as a product of reflections, and specifically at most as many reflections as the dimension of the complement of the fixed subspace of φ.

The orthogonal group of F is generated by reflections; specifically each element φ of the orthogonal group is a product of at most as many reflections as the dimension of F.

Special case of the Cartan–Dieudonné theorem.

The orthogonal group of F is generated by reflections.

theorem orthogonal_family.is_internal_iff_of_is_complete {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] {ι : Type u_4} [decidable_eq ι] {V : ι submodule 𝕜 E} (hV : orthogonal_family 𝕜 (λ (i : ι), (V i)) (λ (i : ι), (V i).subtypeₗᵢ)) (hc : is_complete (supr V)) :

An orthogonal family of subspaces of E satisfies direct_sum.is_internal (that is, they provide an internal direct sum decomposition of E) if and only if their span has trivial orthogonal complement.

theorem orthogonal_family.is_internal_iff {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] {ι : Type u_4} [decidable_eq ι] [finite_dimensional 𝕜 E] {V : ι submodule 𝕜 E} (hV : orthogonal_family 𝕜 (λ (i : ι), (V i)) (λ (i : ι), (V i).subtypeₗᵢ)) :

An orthogonal family of subspaces of E satisfies direct_sum.is_internal (that is, they provide an internal direct sum decomposition of E) if and only if their span has trivial orthogonal complement.

theorem orthogonal_family.sum_projection_of_mem_supr {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] {ι : Type u_4} [fintype ι] {V : ι submodule 𝕜 E} [ (i : ι), complete_space (V i)] (hV : orthogonal_family 𝕜 (λ (i : ι), (V i)) (λ (i : ι), (V i).subtypeₗᵢ)) (x : E) (hx : x supr V) :
finset.univ.sum (λ (i : ι), ((orthogonal_projection (V i)) x)) = x

If x lies within an orthogonal family v, it can be expressed as a sum of projections.

theorem orthogonal_family.projection_direct_sum_coe_add_hom {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] {ι : Type u_4} [decidable_eq ι] {V : ι submodule 𝕜 E} (hV : orthogonal_family 𝕜 (λ (i : ι), (V i)) (λ (i : ι), (V i).subtypeₗᵢ)) (x : direct_sum ι (λ (i : ι), (V i))) (i : ι) [complete_space (V i)] :

If a family of submodules is orthogonal, then the orthogonal_projection on a direct sum is just the coefficient of that direct sum.

@[reducible]
noncomputable def orthogonal_family.decomposition {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] {ι : Type u_4} [decidable_eq ι] [fintype ι] {V : ι submodule 𝕜 E} [ (i : ι), complete_space (V i)] (hV : orthogonal_family 𝕜 (λ (i : ι), (V i)) (λ (i : ι), (V i).subtypeₗᵢ)) (h : supr V = ) :

If a family of submodules is orthogonal and they span the whole space, then the orthogonal projection provides a means to decompose the space into its submodules.

The projection function is decompose V x i = orthogonal_projection (V i) x.

See note [reducible non-instances].

Equations
theorem maximal_orthonormal_iff_orthogonal_complement_eq_bot {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] {v : set E} (hv : orthonormal 𝕜 coe) :
( (u : set E), u v orthonormal 𝕜 coe u = v) (submodule.span 𝕜 v) =

An orthonormal set in an inner_product_space is maximal, if and only if the orthogonal complement of its span is empty.

theorem maximal_orthonormal_iff_basis_of_finite_dimensional {𝕜 : Type u_1} {E : Type u_2} [is_R_or_C 𝕜] [normed_add_comm_group E] [inner_product_space 𝕜 E] {v : set E} [finite_dimensional 𝕜 E] (hv : orthonormal 𝕜 coe) :
( (u : set E), u v orthonormal 𝕜 coe u = v) (b : basis v 𝕜 E), b = coe

An orthonormal set in a finite-dimensional inner_product_space is maximal, if and only if it is a basis.