File: Mathlib/Analysis/InnerProductSpace/Projection.lean

full_name: «_aux_Mathlib_Analysis_InnerProductSpace_Projection___macroRules_term⟪_,_⟫_1»
code: local notation "⟪" x ", " y "⟫" => @inner 𝕜 _ _ x y
goal: Lean.Macro

full_name: _aux_Mathlib_Analysis_InnerProductSpace_Projection___unexpand_abs_1
code: local notation "absR" => abs
goal: Lean.PrettyPrinter.Unexpander

full_name: _aux_Mathlib_Analysis_InnerProductSpace_Projection___macroRules_termAbsR_1
code: local notation "absR" => abs
goal: Lean.Macro

full_name: exists_norm_eq_iInf_of_complete_convex
code: /-- 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 exists_norm_eq_iInf_of_complete_convex {K : Set F} (ne : K.Nonempty) (h₁ : IsComplete K)
    (h₂ : Convex ℝ K) : ∀ u : F, ∃ v ∈ K, ‖u - v‖ = ⨅ w : K, ‖u - w‖ 
goal: ∃ v ∈ K, ‖u - v‖ = ⨅ w, ‖u - ↑w‖

full_name: norm_eq_iInf_iff_real_inner_le_zero
code: /-- Characterization of minimizers for the projection on a convex set in a real inner product
space. -/
theorem norm_eq_iInf_iff_real_inner_le_zero {K : Set F} (h : Convex ℝ K) {u : F} {v : F}
    (hv : v ∈ K) : (‖u - v‖ = ⨅ w : K, ‖u - w‖) ↔ ∀ w ∈ K, ⟪u - v, w - v⟫_ℝ ≤ 0 
goal: ‖u - v‖ = ⨅ w, ‖u - ↑w‖ ↔ ∀ w ∈ K, ⟪u - v, w - v⟫_ℝ ≤ 0

full_name: exists_norm_eq_iInf_of_complete_subspace
code: /-- 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 exists_norm_eq_iInf_of_complete_subspace (h : IsComplete (↑K : Set E)) :
    ∀ u : E, ∃ v ∈ K, ‖u - v‖ = ⨅ w : (K : Set E), ‖u - w‖ 
goal: ∃ v ∈ K, ‖u - v‖ = ⨅ w, ‖u - ↑w‖

full_name: norm_eq_iInf_iff_real_inner_eq_zero
code: /-- 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_iInf_iff_inner_eq_zero` that gives the same conclusion over
any `RCLike` field.
-/
theorem norm_eq_iInf_iff_real_inner_eq_zero (K : Submodule ℝ F) {u : F} {v : F} (hv : v ∈ K) :
    (‖u - v‖ = ⨅ w : (↑K : Set F), ‖u - w‖) ↔ ∀ w ∈ K, ⟪u - v, w⟫_ℝ = 0 
goal: ‖u - v‖ = ⨅ w, ‖u - ↑w‖ ↔ ∀ w ∈ K, ⟪u - v, w⟫_ℝ = 0

full_name: norm_eq_iInf_iff_inner_eq_zero
code: /-- 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`)
-/
theorem norm_eq_iInf_iff_inner_eq_zero {u : E} {v : E} (hv : v ∈ K) :
    (‖u - v‖ = ⨅ w : K, ‖u - w‖) ↔ ∀ w ∈ K, ⟪u - v, w⟫ = 0 
goal: ‖u - v‖ = ⨅ w, ‖u - ↑w‖ ↔ ∀ w ∈ K, ⟪u - v, w⟫_𝕜 = 0

full_name: HasOrthogonalProjection
code: /-- A subspace `K : Submodule 𝕜 E` has an orthogonal projection if evey vector `v : E` admits an
orthogonal projection to `K`. -/
class HasOrthogonalProjection (K : Submodule 𝕜 E) : Prop where
  exists_orthogonal (v : E) : ∃ w ∈ K, v - w ∈ Kᗮ
goal: Prop

full_name: HasOrthogonalProjection.exists_orthogonal
code: /-- A subspace `K : Submodule 𝕜 E` has an orthogonal projection if evey vector `v : E` admits an
orthogonal projection to `K`. -/
class HasOrthogonalProjection (K : Submodule 𝕜 E) : Prop where
  exists_orthogonal (v : E) : ∃ w ∈ K, v - w ∈ Kᗮ
goal: ∃ w ∈ K, v - w ∈ Kᗮ

full_name: HasOrthogonalProjection.ofCompleteSpace
code: instance (priority := 100) HasOrthogonalProjection.ofCompleteSpace [CompleteSpace K] :
    HasOrthogonalProjection K 
goal: HasOrthogonalProjection K

full_name: instHasOrthogonalProjectionOrthogonal
code: instance [HasOrthogonalProjection K] : HasOrthogonalProjection Kᗮ 
goal: HasOrthogonalProjection Kᗮ

full_name: HasOrthogonalProjection.map_linearIsometryEquiv
code: instance HasOrthogonalProjection.map_linearIsometryEquiv [HasOrthogonalProjection K]
    {E' : Type*} [NormedAddCommGroup E'] [InnerProductSpace 𝕜 E'] (f : E ≃ₗᵢ[𝕜] E') :
    HasOrthogonalProjection (K.map (f.toLinearEquiv : E →ₗ[𝕜] E')) 
goal: HasOrthogonalProjection (Submodule.map (↑f.toLinearEquiv) K)

full_name: HasOrthogonalProjection.map_linearIsometryEquiv'
code: instance HasOrthogonalProjection.map_linearIsometryEquiv' [HasOrthogonalProjection K]
    {E' : Type*} [NormedAddCommGroup E'] [InnerProductSpace 𝕜 E'] (f : E ≃ₗᵢ[𝕜] E') :
    HasOrthogonalProjection (K.map f.toLinearIsometry) 
goal: HasOrthogonalProjection (Submodule.map f.toLinearIsometry K)

full_name: instHasOrthogonalProjectionTopSubmodule
code: instance : HasOrthogonalProjection (⊤ : Submodule 𝕜 E) 
goal: HasOrthogonalProjection ⊤

full_name: orthogonalProjectionFn
code: /-- The orthogonal projection onto a complete subspace, as an
unbundled function.  This definition is only intended for use in
setting up the bundled version `orthogonalProjection` and should not
be used once that is defined. -/
def orthogonalProjectionFn (v : E) 
goal: E

full_name: orthogonalProjectionFn_mem
code: /-- 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 orthogonalProjectionFn_mem (v : E) : orthogonalProjectionFn K v ∈ K 
goal: orthogonalProjectionFn K v ∈ K

full_name: orthogonalProjectionFn_inner_eq_zero
code: /-- 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 orthogonalProjectionFn_inner_eq_zero (v : E) :
    ∀ w ∈ K, ⟪v - orthogonalProjectionFn K v, w⟫ = 0 
goal: w ∈ K → ⟪v - orthogonalProjectionFn K v, w⟫_𝕜 = 0

full_name: eq_orthogonalProjectionFn_of_mem_of_inner_eq_zero
code: /-- 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. -/
theorem eq_orthogonalProjectionFn_of_mem_of_inner_eq_zero {u v : E} (hvm : v ∈ K)
    (hvo : ∀ w ∈ K, ⟪u - v, w⟫ = 0) : orthogonalProjectionFn K u = v 
goal: orthogonalProjectionFn K u = v

full_name: orthogonalProjectionFn_norm_sq
code: theorem orthogonalProjectionFn_norm_sq (v : E) :
    ‖v‖ * ‖v‖ =
      ‖v - orthogonalProjectionFn K v‖ * ‖v - orthogonalProjectionFn K v‖ +
        ‖orthogonalProjectionFn K v‖ * ‖orthogonalProjectionFn K v‖ 
goal: ‖v‖ * ‖v‖ =
  ‖v - orthogonalProjectionFn K v‖ * ‖v - orthogonalProjectionFn K v‖ +
    ‖orthogonalProjectionFn K v‖ * ‖orthogonalProjectionFn K v‖

full_name: orthogonalProjection
code: /-- The orthogonal projection onto a complete subspace. -/
def orthogonalProjection : E →L[𝕜] K 
goal: E →L[𝕜] ↥K

full_name: orthogonalProjectionFn_eq
code: @[simp]
theorem orthogonalProjectionFn_eq (v : E) :
    orthogonalProjectionFn K v = (orthogonalProjection K v : E) 
goal: orthogonalProjectionFn K v = ↑((orthogonalProjection K) v)

full_name: orthogonalProjection_inner_eq_zero
code: /-- The characterization of the orthogonal projection.  -/
@[simp]
theorem orthogonalProjection_inner_eq_zero (v : E) :
    ∀ w ∈ K, ⟪v - orthogonalProjection K v, w⟫ = 0 
goal: w ∈ K → ⟪v - ↑((orthogonalProjection K) v), w⟫_𝕜 = 0

full_name: sub_orthogonalProjection_mem_orthogonal
code: /-- The difference of `v` from its orthogonal projection onto `K` is in `Kᗮ`.  -/
@[simp]
theorem sub_orthogonalProjection_mem_orthogonal (v : E) : v - orthogonalProjection K v ∈ Kᗮ 
goal: v - ↑((orthogonalProjection K) v) ∈ Kᗮ

full_name: eq_orthogonalProjection_of_mem_of_inner_eq_zero
code: /-- The orthogonal projection is the unique point in `K` with the
orthogonality property. -/
theorem eq_orthogonalProjection_of_mem_of_inner_eq_zero {u v : E} (hvm : v ∈ K)
    (hvo : ∀ w ∈ K, ⟪u - v, w⟫ = 0) : (orthogonalProjection K u : E) = v 
goal: ↑((orthogonalProjection K) u) = v

full_name: eq_orthogonalProjection_of_mem_orthogonal
code: /-- A point in `K` with the orthogonality property (here characterized in terms of `Kᗮ`) must be the
orthogonal projection. -/
theorem eq_orthogonalProjection_of_mem_orthogonal {u v : E} (hv : v ∈ K)
    (hvo : u - v ∈ Kᗮ) : (orthogonalProjection K u : E) = v 
goal: ↑((orthogonalProjection K) u) = v

full_name: eq_orthogonalProjection_of_mem_orthogonal'
code: /-- A point in `K` with the orthogonality property (here characterized in terms of `Kᗮ`) must be the
orthogonal projection. -/
theorem eq_orthogonalProjection_of_mem_orthogonal' {u v z : E}
    (hv : v ∈ K) (hz : z ∈ Kᗮ) (hu : u = v + z) : (orthogonalProjection K u : E) = v 
goal: ↑((orthogonalProjection K) u) = v

full_name: orthogonalProjection_orthogonal_val
code: @[simp]
theorem orthogonalProjection_orthogonal_val (u : E) :
    (orthogonalProjection Kᗮ u : E) = u - orthogonalProjection K u 
goal: ↑((orthogonalProjection Kᗮ) u) = u - ↑((orthogonalProjection K) u)

full_name: orthogonalProjection_orthogonal
code: theorem orthogonalProjection_orthogonal (u : E) :
    orthogonalProjection Kᗮ u =
      ⟨u - orthogonalProjection K u, sub_orthogonalProjection_mem_orthogonal _⟩ 
goal: (orthogonalProjection Kᗮ) u = ⟨u - ↑((orthogonalProjection K) u), ⋯⟩

full_name: orthogonalProjection_minimal
code: /-- The orthogonal projection of `y` on `U` minimizes the distance `‖y - x‖` for `x ∈ U`. -/
theorem orthogonalProjection_minimal {U : Submodule 𝕜 E} [HasOrthogonalProjection U] (y : E) :
    ‖y - orthogonalProjection U y‖ = ⨅ x : U, ‖y - x‖ 
goal: ‖y - ↑((orthogonalProjection U) y)‖ = ⨅ x, ‖y - ↑x‖

full_name: eq_orthogonalProjection_of_eq_submodule
code: /-- The orthogonal projections onto equal subspaces are coerced back to the same point in `E`. -/
theorem eq_orthogonalProjection_of_eq_submodule {K' : Submodule 𝕜 E} [HasOrthogonalProjection K']
    (h : K = K') (u : E) : (orthogonalProjection K u : E) = (orthogonalProjection K' u : E) 
goal: ↑((orthogonalProjection K) u) = ↑((orthogonalProjection K') u)

full_name: orthogonalProjection_mem_subspace_eq_self
code: /-- The orthogonal projection sends elements of `K` to themselves. -/
@[simp]
theorem orthogonalProjection_mem_subspace_eq_self (v : K) : orthogonalProjection K v = v 
goal: (orthogonalProjection K) ↑v = v

full_name: orthogonalProjection_eq_self_iff
code: /-- A point equals its orthogonal projection if and only if it lies in the subspace. -/
theorem orthogonalProjection_eq_self_iff {v : E} : (orthogonalProjection K v : E) = v ↔ v ∈ K 
goal: ↑((orthogonalProjection K) v) = v ↔ v ∈ K

full_name: orthogonalProjection_eq_zero_iff
code: @[simp]
theorem orthogonalProjection_eq_zero_iff {v : E} : orthogonalProjection K v = 0 ↔ v ∈ Kᗮ 
goal: (orthogonalProjection K) v = 0 ↔ v ∈ Kᗮ

full_name: ker_orthogonalProjection
code: @[simp]
theorem ker_orthogonalProjection : LinearMap.ker (orthogonalProjection K) = Kᗮ 
goal: LinearMap.ker (orthogonalProjection K) = Kᗮ

full_name: LinearIsometry.map_orthogonalProjection
code: theorem LinearIsometry.map_orthogonalProjection {E E' : Type*} [NormedAddCommGroup E]
    [NormedAddCommGroup E'] [InnerProductSpace 𝕜 E] [InnerProductSpace 𝕜 E'] (f : E →ₗᵢ[𝕜] E')
    (p : Submodule 𝕜 E) [HasOrthogonalProjection p] [HasOrthogonalProjection (p.map f.toLinearMap)]
    (x : E) : f (orthogonalProjection p x) = orthogonalProjection (p.map f.toLinearMap) (f x) 
goal: f ↑((orthogonalProjection p) x) = ↑((orthogonalProjection (Submodule.map f.toLinearMap p)) (f x))

full_name: LinearIsometry.map_orthogonalProjection'
code: theorem LinearIsometry.map_orthogonalProjection' {E E' : Type*} [NormedAddCommGroup E]
    [NormedAddCommGroup E'] [InnerProductSpace 𝕜 E] [InnerProductSpace 𝕜 E'] (f : E →ₗᵢ[𝕜] E')
    (p : Submodule 𝕜 E) [HasOrthogonalProjection p] [HasOrthogonalProjection (p.map f)] (x : E) :
    f (orthogonalProjection p x) = orthogonalProjection (p.map f) (f x) 
goal: f ↑((orthogonalProjection p) x) = ↑((orthogonalProjection (Submodule.map f p)) (f x))

full_name: orthogonalProjection_map_apply
code: /-- Orthogonal projection onto the `Submodule.map` of a subspace. -/
theorem orthogonalProjection_map_apply {E E' : Type*} [NormedAddCommGroup E]
    [NormedAddCommGroup E'] [InnerProductSpace 𝕜 E] [InnerProductSpace 𝕜 E'] (f : E ≃ₗᵢ[𝕜] E')
    (p : Submodule 𝕜 E) [HasOrthogonalProjection p] (x : E') :
    (orthogonalProjection (p.map (f.toLinearEquiv : E →ₗ[𝕜] E')) x : E') =
      f (orthogonalProjection p (f.symm x)) 
goal: ↑((orthogonalProjection (Submodule.map (↑f.toLinearEquiv) p)) x) = f ↑((orthogonalProjection p) (f.symm x))

full_name: orthogonalProjection_bot
code: /-- The orthogonal projection onto the trivial submodule is the zero map. -/
@[simp]
theorem orthogonalProjection_bot : orthogonalProjection (⊥ : Submodule 𝕜 E) = 0 
goal: orthogonalProjection ⊥ = 0

full_name: orthogonalProjection_norm_le
code: /-- The orthogonal projection has norm `≤ 1`. -/
theorem orthogonalProjection_norm_le : ‖orthogonalProjection K‖ ≤ 1 
goal: ‖orthogonalProjection K‖ ≤ 1

full_name: smul_orthogonalProjection_singleton
code: theorem smul_orthogonalProjection_singleton {v : E} (w : E) :
    ((‖v‖ ^ 2 : ℝ) : 𝕜) • (orthogonalProjection (𝕜 ∙ v) w : E) = ⟪v, w⟫ • v 
goal: ↑(‖v‖ ^ 2) • ↑((orthogonalProjection (Submodule.span 𝕜 {v})) w) = ⟪v, w⟫_𝕜 • v

full_name: orthogonalProjection_singleton
code: /-- Formula for orthogonal projection onto a single vector. -/
theorem orthogonalProjection_singleton {v : E} (w : E) :
    (orthogonalProjection (𝕜 ∙ v) w : E) = (⟪v, w⟫ / ((‖v‖ ^ 2 : ℝ) : 𝕜)) • v 
goal: ↑((orthogonalProjection (Submodule.span 𝕜 {v})) w) = (⟪v, w⟫_𝕜 / ↑(‖v‖ ^ 2)) • v

full_name: orthogonalProjection_unit_singleton
code: /-- Formula for orthogonal projection onto a single unit vector. -/
theorem orthogonalProjection_unit_singleton {v : E} (hv : ‖v‖ = 1) (w : E) :
    (orthogonalProjection (𝕜 ∙ v) w : E) = ⟪v, w⟫ • v 
goal: ↑((orthogonalProjection (Submodule.span 𝕜 {v})) w) = ⟪v, w⟫_𝕜 • v

full_name: reflectionLinearEquiv
code: /-- Auxiliary definition for `reflection`: the reflection as a linear equivalence. -/
def reflectionLinearEquiv : E ≃ₗ[𝕜] E 
goal: E ≃ₗ[𝕜] E

full_name: reflection
code: /-- 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. -/
def reflection : E ≃ₗᵢ[𝕜] E 
goal: E ≃ₗᵢ[𝕜] E

full_name: reflection_apply
code: /-- The result of reflecting. -/
theorem reflection_apply (p : E) : reflection K p = 2 • (orthogonalProjection K p : E) - p 
goal: (reflection K) p = 2 • ↑((orthogonalProjection K) p) - p

full_name: reflection_symm
code: /-- Reflection is its own inverse. -/
@[simp]
theorem reflection_symm : (reflection K).symm = reflection K 
goal: (reflection K).symm = reflection K

full_name: reflection_inv
code: /-- Reflection is its own inverse. -/
@[simp]
theorem reflection_inv : (reflection K)⁻¹ = reflection K 
goal: (reflection K)⁻¹ = reflection K

full_name: reflection_reflection
code: /-- Reflecting twice in the same subspace. -/
@[simp]
theorem reflection_reflection (p : E) : reflection K (reflection K p) = p 
goal: (reflection K) ((reflection K) p) = p

full_name: reflection_involutive
code: /-- Reflection is involutive. -/
theorem reflection_involutive : Function.Involutive (reflection K) 
goal: Function.Involutive ⇑(reflection K)

full_name: reflection_trans_reflection
code: /-- Reflection is involutive. -/
@[simp]
theorem reflection_trans_reflection :
    (reflection K).trans (reflection K) = LinearIsometryEquiv.refl 𝕜 E 
goal: (reflection K).trans (reflection K) = LinearIsometryEquiv.refl 𝕜 E

full_name: reflection_mul_reflection
code: /-- Reflection is involutive. -/
@[simp]
theorem reflection_mul_reflection : reflection K * reflection K = 1 
goal: reflection K * reflection K = 1

full_name: reflection_orthogonal_apply
code: theorem reflection_orthogonal_apply (v : E) : reflection Kᗮ v = -reflection K v 
goal: (reflection Kᗮ) v = -(reflection K) v

full_name: reflection_orthogonal
code: theorem reflection_orthogonal : reflection Kᗮ = .trans (reflection K) (.neg _) 
goal: reflection Kᗮ = (reflection K).trans (LinearIsometryEquiv.neg 𝕜)

full_name: reflection_singleton_apply
code: theorem reflection_singleton_apply (u v : E) :
    reflection (𝕜 ∙ u) v = 2 • (⟪u, v⟫ / ((‖u‖ : 𝕜) ^ 2)) • u - v 
goal: (reflection (Submodule.span 𝕜 {u})) v = 2 • (⟪u, v⟫_𝕜 / ↑‖u‖ ^ 2) • u - v

full_name: reflection_eq_self_iff
code: /-- A point is its own reflection if and only if it is in the subspace. -/
theorem reflection_eq_self_iff (x : E) : reflection K x = x ↔ x ∈ K 
goal: (reflection K) x = x ↔ x ∈ K

full_name: reflection_mem_subspace_eq_self
code: theorem reflection_mem_subspace_eq_self {x : E} (hx : x ∈ K) : reflection K x = x 
goal: (reflection K) x = x

full_name: reflection_map_apply
code: /-- Reflection in the `Submodule.map` of a subspace. -/
theorem reflection_map_apply {E E' : Type*} [NormedAddCommGroup E] [NormedAddCommGroup E']
    [InnerProductSpace 𝕜 E] [InnerProductSpace 𝕜 E'] (f : E ≃ₗᵢ[𝕜] E') (K : Submodule 𝕜 E)
    [HasOrthogonalProjection K] (x : E') :
    reflection (K.map (f.toLinearEquiv : E →ₗ[𝕜] E')) x = f (reflection K (f.symm x)) 
goal: (reflection (Submodule.map (↑f.toLinearEquiv) K)) x = f ((reflection K) (f.symm x))

full_name: reflection_map
code: /-- Reflection in the `Submodule.map` of a subspace. -/
theorem reflection_map {E E' : Type*} [NormedAddCommGroup E] [NormedAddCommGroup E']
    [InnerProductSpace 𝕜 E] [InnerProductSpace 𝕜 E'] (f : E ≃ₗᵢ[𝕜] E') (K : Submodule 𝕜 E)
    [HasOrthogonalProjection K] :
    reflection (K.map (f.toLinearEquiv : E →ₗ[𝕜] E')) = f.symm.trans ((reflection K).trans f) 
goal: reflection (Submodule.map (↑f.toLinearEquiv) K) = f.symm.trans ((reflection K).trans f)

full_name: reflection_bot
code: /-- Reflection through the trivial subspace {0} is just negation. -/
@[simp]
theorem reflection_bot : reflection (⊥ : Submodule 𝕜 E) = LinearIsometryEquiv.neg 𝕜 
goal: reflection ⊥ = LinearIsometryEquiv.neg 𝕜

full_name: Submodule.sup_orthogonal_inf_of_completeSpace
code: /-- If `K₁` is complete and contained in `K₂`, `K₁` and `K₁ᗮ ⊓ K₂` span `K₂`. -/
theorem Submodule.sup_orthogonal_inf_of_completeSpace {K₁ K₂ : Submodule 𝕜 E} (h : K₁ ≤ K₂)
    [HasOrthogonalProjection K₁] : K₁ ⊔ K₁ᗮ ⊓ K₂ = K₂ 
goal: K₁ ⊔ K₁ᗮ ⊓ K₂ = K₂

full_name: Submodule.sup_orthogonal_of_completeSpace
code: /-- If `K` is complete, `K` and `Kᗮ` span the whole space. -/
theorem Submodule.sup_orthogonal_of_completeSpace [HasOrthogonalProjection K] : K ⊔ Kᗮ = ⊤ 
goal: K ⊔ Kᗮ = ⊤

full_name: Submodule.exists_add_mem_mem_orthogonal
code: /-- If `K` is complete, any `v` in `E` can be expressed as a sum of elements of `K` and `Kᗮ`. -/
theorem Submodule.exists_add_mem_mem_orthogonal [HasOrthogonalProjection K] (v : E) :
    ∃ y ∈ K, ∃ z ∈ Kᗮ, v = y + z 
goal: ∃ y ∈ K, ∃ z ∈ Kᗮ, v = y + z

full_name: Submodule.orthogonal_orthogonal
code: /-- If `K` admits an orthogonal projection, then the orthogonal complement of its orthogonal
complement is itself. -/
@[simp]
theorem Submodule.orthogonal_orthogonal [HasOrthogonalProjection K] : Kᗮᗮ = K 
goal: Kᗮᗮ = K

full_name: Submodule.orthogonal_orthogonal_eq_closure
code: /-- In a Hilbert space, the orthogonal complement of the orthogonal complement of a subspace `K`
is the topological closure of `K`.

Note that the completeness assumption is necessary. Let `E` be the space `ℕ →₀ ℝ` with inner space
structure inherited from `PiLp 2 (fun _ : ℕ ↦ ℝ)`. Let `K` be the subspace of sequences with the sum
of all elements equal to zero. Then `Kᗮ = ⊥`, `Kᗮᗮ = ⊤`.  -/
theorem Submodule.orthogonal_orthogonal_eq_closure [CompleteSpace E] :
    Kᗮᗮ = K.topologicalClosure 
goal: Kᗮᗮ = K.topologicalClosure

full_name: Submodule.isCompl_orthogonal_of_completeSpace
code: /-- If `K` admits an orthogonal projection, `K` and `Kᗮ` are complements of each other. -/
theorem Submodule.isCompl_orthogonal_of_completeSpace [HasOrthogonalProjection K] : IsCompl K Kᗮ 
goal: IsCompl K Kᗮ

full_name: orthogonalComplement_eq_orthogonalComplement
code: @[simp]
theorem orthogonalComplement_eq_orthogonalComplement {L : Submodule 𝕜 E} [HasOrthogonalProjection K]
    [HasOrthogonalProjection L] : Kᗮ = Lᗮ ↔ K = L 
goal: Kᗮ = Lᗮ ↔ K = L

full_name: Submodule.orthogonal_eq_bot_iff
code: @[simp]
theorem Submodule.orthogonal_eq_bot_iff [HasOrthogonalProjection K] : Kᗮ = ⊥ ↔ K = ⊤ 
goal: Kᗮ = ⊥ ↔ K = ⊤

full_name: orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero
code: /-- The orthogonal projection onto `K` of an element of `Kᗮ` is zero. -/
theorem orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero [HasOrthogonalProjection K]
    {v : E} (hv : v ∈ Kᗮ) : orthogonalProjection K v = 0 
goal: (orthogonalProjection K) v = 0

full_name: Submodule.IsOrtho.orthogonalProjection_comp_subtypeL
code: /-- The projection into `U` from an orthogonal submodule `V` is the zero map. -/
theorem Submodule.IsOrtho.orthogonalProjection_comp_subtypeL {U V : Submodule 𝕜 E}
    [HasOrthogonalProjection U] (h : U ⟂ V) : orthogonalProjection U ∘L V.subtypeL = 0 
goal: (orthogonalProjection U).comp V.subtypeL = 0

full_name: orthogonalProjection_comp_subtypeL_eq_zero_iff
code: /-- The projection into `U` from `V` is the zero map if and only if `U` and `V` are orthogonal. -/
theorem orthogonalProjection_comp_subtypeL_eq_zero_iff {U V : Submodule 𝕜 E}
    [HasOrthogonalProjection U] : orthogonalProjection U ∘L V.subtypeL = 0 ↔ U ⟂ V 
goal: (orthogonalProjection U).comp V.subtypeL = 0 ↔ U ⟂ V

full_name: orthogonalProjection_eq_linear_proj
code: theorem orthogonalProjection_eq_linear_proj [HasOrthogonalProjection K] (x : E) :
    orthogonalProjection K x =
      K.linearProjOfIsCompl _ Submodule.isCompl_orthogonal_of_completeSpace x 
goal: (orthogonalProjection K) x = (K.linearProjOfIsCompl Kᗮ ⋯) x

full_name: orthogonalProjection_coe_linearMap_eq_linearProj
code: theorem orthogonalProjection_coe_linearMap_eq_linearProj [HasOrthogonalProjection K] :
    (orthogonalProjection K : E →ₗ[𝕜] K) =
      K.linearProjOfIsCompl _ Submodule.isCompl_orthogonal_of_completeSpace 
goal: ↑(orthogonalProjection K) = K.linearProjOfIsCompl Kᗮ ⋯

full_name: reflection_mem_subspace_orthogonalComplement_eq_neg
code: /-- The reflection in `K` of an element of `Kᗮ` is its negation. -/
theorem reflection_mem_subspace_orthogonalComplement_eq_neg [HasOrthogonalProjection K] {v : E}
    (hv : v ∈ Kᗮ) : reflection K v = -v 
goal: (reflection K) v = -v

full_name: orthogonalProjection_mem_subspace_orthogonal_precomplement_eq_zero
code: /-- The orthogonal projection onto `Kᗮ` of an element of `K` is zero. -/
theorem orthogonalProjection_mem_subspace_orthogonal_precomplement_eq_zero
    [HasOrthogonalProjection Kᗮ] {v : E} (hv : v ∈ K) : orthogonalProjection Kᗮ v = 0 
goal: (orthogonalProjection Kᗮ) v = 0

full_name: orthogonalProjection_orthogonalProjection_of_le
code: /-- If `U ≤ V`, then projecting on `V` and then on `U` is the same as projecting on `U`. -/
theorem orthogonalProjection_orthogonalProjection_of_le {U V : Submodule 𝕜 E}
    [HasOrthogonalProjection U] [HasOrthogonalProjection V] (h : U ≤ V) (x : E) :
    orthogonalProjection U (orthogonalProjection V x) = orthogonalProjection U x 
goal: (orthogonalProjection U) ↑((orthogonalProjection V) x) = (orthogonalProjection U) x

full_name: orthogonalProjection_tendsto_closure_iSup
code: /-- 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).topologicalClosure` along `atTop`. -/
theorem orthogonalProjection_tendsto_closure_iSup [CompleteSpace E] {ι : Type*} [SemilatticeSup ι]
    (U : ι → Submodule 𝕜 E) [∀ i, CompleteSpace (U i)] (hU : Monotone U) (x : E) :
    Filter.Tendsto (fun i => (orthogonalProjection (U i) x : E)) atTop
      (𝓝 (orthogonalProjection (⨆ i, U i).topologicalClosure x : E)) 
goal: Filter.Tendsto (fun i => ↑((orthogonalProjection (U i)) x)) Filter.atTop
  (𝓝 ↑((orthogonalProjection (⨆ i, U i).topologicalClosure) x))

full_name: orthogonalProjection_tendsto_self
code: /-- 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`. -/
theorem orthogonalProjection_tendsto_self [CompleteSpace E] {ι : Type*} [SemilatticeSup ι]
    (U : ι → Submodule 𝕜 E) [∀ t, CompleteSpace (U t)] (hU : Monotone U) (x : E)
    (hU' : ⊤ ≤ (⨆ t, U t).topologicalClosure) :
    Filter.Tendsto (fun t => (orthogonalProjection (U t) x : E)) atTop (𝓝 x) 
goal: Filter.Tendsto (fun t => ↑((orthogonalProjection (U t)) x)) Filter.atTop (𝓝 x)

full_name: Submodule.triorthogonal_eq_orthogonal
code: /-- The orthogonal complement satisfies `Kᗮᗮᗮ = Kᗮ`. -/
theorem Submodule.triorthogonal_eq_orthogonal [CompleteSpace E] : Kᗮᗮᗮ = Kᗮ 
goal: Kᗮᗮᗮ = Kᗮ

full_name: Submodule.topologicalClosure_eq_top_iff
code: /-- The closure of `K` is the full space iff `Kᗮ` is trivial. -/
theorem Submodule.topologicalClosure_eq_top_iff [CompleteSpace E] :
    K.topologicalClosure = ⊤ ↔ Kᗮ = ⊥ 
goal: K.topologicalClosure = ⊤ ↔ Kᗮ = ⊥

full_name: Dense.eq_zero_of_inner_left
code: theorem eq_zero_of_inner_left (hK : Dense (K : Set E)) (h : ∀ v : K, ⟪x, v⟫ = 0) : x = 0 
goal: x = 0

full_name: Dense.eq_zero_of_mem_orthogonal
code: theorem eq_zero_of_mem_orthogonal (hK : Dense (K : Set E)) (h : x ∈ Kᗮ) : x = 0 
goal: x = 0

full_name: Dense.eq_of_sub_mem_orthogonal
code: /-- If `S` is dense and `x - y ∈ Kᗮ`, then `x = y`. -/
theorem eq_of_sub_mem_orthogonal (hK : Dense (K : Set E)) (h : x - y ∈ Kᗮ) : x = y 
goal: x = y

full_name: Dense.eq_of_inner_left
code: theorem eq_of_inner_left (hK : Dense (K : Set E)) (h : ∀ v : K, ⟪x, v⟫ = ⟪y, v⟫) : x = y 
goal: x = y

full_name: Dense.eq_of_inner_right
code: theorem eq_of_inner_right (hK : Dense (K : Set E)) (h : ∀ v : K, ⟪(v : E), x⟫ = ⟪(v : E), y⟫) :
    x = y 
goal: x = y

full_name: Dense.eq_zero_of_inner_right
code: theorem eq_zero_of_inner_right (hK : Dense (K : Set E)) (h : ∀ v : K, ⟪(v : E), x⟫ = 0) : x = 0 
goal: x = 0

full_name: reflection_mem_subspace_orthogonal_precomplement_eq_neg
code: /-- The reflection in `Kᗮ` of an element of `K` is its negation. -/
theorem reflection_mem_subspace_orthogonal_precomplement_eq_neg [HasOrthogonalProjection K] {v : E}
    (hv : v ∈ K) : reflection Kᗮ v = -v 
goal: (reflection Kᗮ) v = -v

full_name: orthogonalProjection_orthogonalComplement_singleton_eq_zero
code: /-- The orthogonal projection onto `(𝕜 ∙ v)ᗮ` of `v` is zero. -/
theorem orthogonalProjection_orthogonalComplement_singleton_eq_zero (v : E) :
    orthogonalProjection (𝕜 ∙ v)ᗮ v = 0 
goal: (orthogonalProjection (Submodule.span 𝕜 {v})ᗮ) v = 0

full_name: reflection_orthogonalComplement_singleton_eq_neg
code: /-- The reflection in `(𝕜 ∙ v)ᗮ` of `v` is `-v`. -/
theorem reflection_orthogonalComplement_singleton_eq_neg (v : E) : reflection (𝕜 ∙ v)ᗮ v = -v 
goal: (reflection (Submodule.span 𝕜 {v})ᗮ) v = -v

full_name: reflection_sub
code: theorem reflection_sub {v w : F} (h : ‖v‖ = ‖w‖) : reflection (ℝ ∙ (v - w))ᗮ v = w 
goal: (reflection (Submodule.span ℝ {v - w})ᗮ) v = w

full_name: orthogonalProjection_add_orthogonalProjection_orthogonal
code: /-- If the orthogonal projection to `K` is well-defined, then a vector splits as the sum of its
orthogonal projections onto a complete submodule `K` and onto the orthogonal complement of `K`. -/
theorem orthogonalProjection_add_orthogonalProjection_orthogonal [HasOrthogonalProjection K]
    (w : E) : (orthogonalProjection K w : E) + (orthogonalProjection Kᗮ w : E) = w 
goal: ↑((orthogonalProjection K) w) + ↑((orthogonalProjection Kᗮ) w) = w

full_name: norm_sq_eq_add_norm_sq_projection
code: /-- The Pythagorean theorem, for an orthogonal projection. -/
theorem norm_sq_eq_add_norm_sq_projection (x : E) (S : Submodule 𝕜 E) [HasOrthogonalProjection S] :
    ‖x‖ ^ 2 = ‖orthogonalProjection S x‖ ^ 2 + ‖orthogonalProjection Sᗮ x‖ ^ 2 
goal: ‖x‖ ^ 2 = ‖(orthogonalProjection S) x‖ ^ 2 + ‖(orthogonalProjection Sᗮ) x‖ ^ 2

full_name: id_eq_sum_orthogonalProjection_self_orthogonalComplement
code: /-- In a complete space `E`, the projection maps onto a complete subspace `K` and its orthogonal
complement sum to the identity. -/
theorem id_eq_sum_orthogonalProjection_self_orthogonalComplement [HasOrthogonalProjection K] :
    ContinuousLinearMap.id 𝕜 E =
      K.subtypeL.comp (orthogonalProjection K) + Kᗮ.subtypeL.comp (orthogonalProjection Kᗮ) 
goal: ContinuousLinearMap.id 𝕜 E = K.subtypeL.comp (orthogonalProjection K) + Kᗮ.subtypeL.comp (orthogonalProjection Kᗮ)

full_name: inner_orthogonalProjection_eq_of_mem_right
code: @[simp high]
theorem inner_orthogonalProjection_eq_of_mem_right [HasOrthogonalProjection K] (u : K) (v : E) :
    ⟪orthogonalProjection K v, u⟫ = ⟪v, u⟫ 
goal: ⟪(orthogonalProjection K) v, u⟫_𝕜 = ⟪v, ↑u⟫_𝕜

full_name: inner_orthogonalProjection_eq_of_mem_left
code: @[simp high]
theorem inner_orthogonalProjection_eq_of_mem_left [HasOrthogonalProjection K] (u : K) (v : E) :
    ⟪u, orthogonalProjection K v⟫ = ⟪(u : E), v⟫ 
goal: ⟪u, (orthogonalProjection K) v⟫_𝕜 = ⟪↑u, v⟫_𝕜

full_name: inner_orthogonalProjection_left_eq_right
code: /-- The orthogonal projection is self-adjoint. -/
theorem inner_orthogonalProjection_left_eq_right [HasOrthogonalProjection K] (u v : E) :
    ⟪↑(orthogonalProjection K u), v⟫ = ⟪u, orthogonalProjection K v⟫ 
goal: ⟪↑((orthogonalProjection K) u), v⟫_𝕜 = ⟪u, ↑((orthogonalProjection K) v)⟫_𝕜

full_name: orthogonalProjection_isSymmetric
code: /-- The orthogonal projection is symmetric. -/
theorem orthogonalProjection_isSymmetric [HasOrthogonalProjection K] :
    (K.subtypeL ∘L orthogonalProjection K : E →ₗ[𝕜] E).IsSymmetric 
goal: (↑(K.subtypeL.comp (orthogonalProjection K))).IsSymmetric

full_name: Submodule.finrank_add_inf_finrank_orthogonal
code: /-- Given a finite-dimensional subspace `K₂`, and a subspace `K₁`
contained 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 {K₁ K₂ : Submodule 𝕜 E}
    [FiniteDimensional 𝕜 K₂] (h : K₁ ≤ K₂) :
    finrank 𝕜 K₁ + finrank 𝕜 (K₁ᗮ ⊓ K₂ : Submodule 𝕜 E) = finrank 𝕜 K₂ 
goal: FiniteDimensional.finrank 𝕜 ↥K₁ + FiniteDimensional.finrank 𝕜 ↥(K₁ᗮ ⊓ K₂) = FiniteDimensional.finrank 𝕜 ↥K₂

full_name: Submodule.finrank_add_inf_finrank_orthogonal'
code: /-- Given a finite-dimensional subspace `K₂`, and a subspace `K₁`
contained 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' {K₁ K₂ : Submodule 𝕜 E}
    [FiniteDimensional 𝕜 K₂] (h : K₁ ≤ K₂) {n : ℕ} (h_dim : finrank 𝕜 K₁ + n = finrank 𝕜 K₂) :
    finrank 𝕜 (K₁ᗮ ⊓ K₂ : Submodule 𝕜 E) = n 
goal: FiniteDimensional.finrank 𝕜 ↥(K₁ᗮ ⊓ K₂) = n

full_name: Submodule.finrank_add_finrank_orthogonal
code: /-- Given a finite-dimensional space `E` and subspace `K`, the dimensions of `K` and `Kᗮ` add to
that of `E`. -/
theorem Submodule.finrank_add_finrank_orthogonal [FiniteDimensional 𝕜 E] (K : Submodule 𝕜 E) :
    finrank 𝕜 K + finrank 𝕜 Kᗮ = finrank 𝕜 E 
goal: FiniteDimensional.finrank 𝕜 ↥K + FiniteDimensional.finrank 𝕜 ↥Kᗮ = FiniteDimensional.finrank 𝕜 E

full_name: Submodule.finrank_add_finrank_orthogonal'
code: /-- Given a finite-dimensional space `E` and subspace `K`, the dimensions of `K` and `Kᗮ` add to
that of `E`. -/
theorem Submodule.finrank_add_finrank_orthogonal' [FiniteDimensional 𝕜 E] {K : Submodule 𝕜 E}
    {n : ℕ} (h_dim : finrank 𝕜 K + n = finrank 𝕜 E) : finrank 𝕜 Kᗮ = n 
goal: FiniteDimensional.finrank 𝕜 ↥Kᗮ = n

full_name: finrank_orthogonal_span_singleton
code: /-- 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. -/
theorem finrank_orthogonal_span_singleton {n : ℕ} [_i : Fact (finrank 𝕜 E = n + 1)] {v : E}
    (hv : v ≠ 0) : finrank 𝕜 (𝕜 ∙ v)ᗮ = n 
goal: FiniteDimensional.finrank 𝕜 ↥(Submodule.span 𝕜 {v})ᗮ = n

full_name: LinearIsometryEquiv.reflections_generate_dim_aux
code: /-- 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 `φ`. -/
theorem LinearIsometryEquiv.reflections_generate_dim_aux [FiniteDimensional ℝ F] {n : ℕ}
    (φ : F ≃ₗᵢ[ℝ] F) (hn : finrank ℝ (ker (ContinuousLinearMap.id ℝ F - φ))ᗮ ≤ n) :
    ∃ l : List F, l.length ≤ n ∧ φ = (l.map fun v => reflection (ℝ ∙ v)ᗮ).prod 
goal: ∃ l, l.length ≤ n ∧ φ = (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l).prod

full_name: LinearIsometryEquiv.reflections_generate_dim
code: /-- 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**. -/
theorem LinearIsometryEquiv.reflections_generate_dim [FiniteDimensional ℝ F] (φ : F ≃ₗᵢ[ℝ] F) :
    ∃ l : List F, l.length ≤ finrank ℝ F ∧ φ = (l.map fun v => reflection (ℝ ∙ v)ᗮ).prod 
goal: ∃ l, l.length ≤ FiniteDimensional.finrank ℝ F ∧ φ = (List.map (fun v => reflection (Submodule.span ℝ {v})ᗮ) l).prod

full_name: LinearIsometryEquiv.reflections_generate
code: /-- The orthogonal group of `F` is generated by reflections. -/
theorem LinearIsometryEquiv.reflections_generate [FiniteDimensional ℝ F] :
    Subgroup.closure (Set.range fun v : F => reflection (ℝ ∙ v)ᗮ) = ⊤ 
goal: Subgroup.closure (Set.range fun v => reflection (Submodule.span ℝ {v})ᗮ) = ⊤

full_name: OrthogonalFamily.isInternal_iff_of_isComplete
code: /-- An orthogonal family of subspaces of `E` satisfies `DirectSum.IsInternal` (that is,
they provide an internal direct sum decomposition of `E`) if and only if their span has trivial
orthogonal complement. -/
theorem OrthogonalFamily.isInternal_iff_of_isComplete [DecidableEq ι] {V : ι → Submodule 𝕜 E}
    (hV : OrthogonalFamily 𝕜 (fun i => V i) fun i => (V i).subtypeₗᵢ)
    (hc : IsComplete (↑(iSup V) : Set E)) : DirectSum.IsInternal V ↔ (iSup V)ᗮ = ⊥ 
goal: DirectSum.IsInternal V ↔ (iSup V)ᗮ = ⊥

full_name: OrthogonalFamily.isInternal_iff
code: /-- An orthogonal family of subspaces of `E` satisfies `DirectSum.IsInternal` (that is,
they provide an internal direct sum decomposition of `E`) if and only if their span has trivial
orthogonal complement. -/
theorem OrthogonalFamily.isInternal_iff [DecidableEq ι] [FiniteDimensional 𝕜 E]
    {V : ι → Submodule 𝕜 E} (hV : OrthogonalFamily 𝕜 (fun i => V i) fun i => (V i).subtypeₗᵢ) :
    DirectSum.IsInternal V ↔ (iSup V)ᗮ = ⊥ 
goal: DirectSum.IsInternal V ↔ (iSup V)ᗮ = ⊥

full_name: OrthogonalFamily.sum_projection_of_mem_iSup
code: /-- If `x` lies within an orthogonal family `v`, it can be expressed as a sum of projections. -/
theorem OrthogonalFamily.sum_projection_of_mem_iSup [Fintype ι] {V : ι → Submodule 𝕜 E}
    [∀ i, CompleteSpace (V i)] (hV : OrthogonalFamily 𝕜 (fun i => V i) fun i => (V i).subtypeₗᵢ)
    (x : E) (hx : x ∈ iSup V) : (∑ i, (orthogonalProjection (V i) x : E)) = x 
goal: ∑ i : ι, ↑((orthogonalProjection (V i)) x) = x

full_name: OrthogonalFamily.projection_directSum_coeAddHom
code: /-- If a family of submodules is orthogonal, then the `orthogonalProjection` on a direct sum
is just the coefficient of that direct sum. -/
theorem OrthogonalFamily.projection_directSum_coeAddHom [DecidableEq ι] {V : ι → Submodule 𝕜 E}
    (hV : OrthogonalFamily 𝕜 (fun i => V i) fun i => (V i).subtypeₗᵢ) (x : ⨁ i, V i) (i : ι)
    [CompleteSpace (V i)] :
    orthogonalProjection (V i) (DirectSum.coeAddMonoidHom V x) = x i 
goal: (orthogonalProjection (V i)) ((DirectSum.coeAddMonoidHom V) x) = x i

full_name: OrthogonalFamily.decomposition
code: /-- 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 = orthogonalProjection (V i) x`.

See note [reducible non-instances]. -/
abbrev OrthogonalFamily.decomposition [DecidableEq ι] [Fintype ι] {V : ι → Submodule 𝕜 E}
    [∀ i, CompleteSpace (V i)] (hV : OrthogonalFamily 𝕜 (fun i => V i) fun i => (V i).subtypeₗᵢ)
    (h : iSup V = ⊤) : DirectSum.Decomposition V 
goal: DirectSum.Decomposition V

full_name: maximal_orthonormal_iff_orthogonalComplement_eq_bot
code: /-- An orthonormal set in an `InnerProductSpace` is maximal, if and only if the orthogonal
complement of its span is empty. -/
theorem maximal_orthonormal_iff_orthogonalComplement_eq_bot (hv : Orthonormal 𝕜 ((↑) : v → E)) :
    (∀ u ⊇ v, Orthonormal 𝕜 ((↑) : u → E) → u = v) ↔ (span 𝕜 v)ᗮ = ⊥ 
goal: (∀ u ⊇ v, Orthonormal 𝕜 Subtype.val → u = v) ↔ (Submodule.span 𝕜 v)ᗮ = ⊥

full_name: maximal_orthonormal_iff_basis_of_finiteDimensional
code: /-- An orthonormal set in a finite-dimensional `InnerProductSpace` is maximal, if and only if it
is a basis. -/
theorem maximal_orthonormal_iff_basis_of_finiteDimensional (hv : Orthonormal 𝕜 ((↑) : v → E)) :
    (∀ u ⊇ v, Orthonormal 𝕜 ((↑) : u → E) → u = v) ↔ ∃ b : Basis v 𝕜 E, ⇑b = ((↑) : v → E) 
goal: (∀ u ⊇ v, Orthonormal 𝕜 Subtype.val → u = v) ↔ ∃ b, ⇑b = Subtype.val