analysis.inner_product_space.projectionMathlib.Analysis.InnerProductSpace.Projection

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

(last sync)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

feat(analysis/inner_product_space/spectrum): add a decomposition instance (#14870)

This decomposition instances inherits the noncomputability of orthogonal_projection, but it is at least defeq to something useful.

Diff
@@ -3,6 +3,7 @@ Copyright (c) 2019 Zhouhang Zhou. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Zhouhang Zhou, Frédéric Dupuis, Heather Macbeth
 -/
+import algebra.direct_sum.decomposition
 import analysis.convex.basic
 import analysis.inner_product_space.orthogonal
 import analysis.inner_product_space.symmetric
@@ -1221,6 +1222,70 @@ begin
     (complete_space_coe_iff_is_complete.mp infer_instance)
 end
 
+open_locale direct_sum
+
+/-- If `x` lies within an orthogonal family `v`, it can be expressed as a sum of projections. -/
+lemma orthogonal_family.sum_projection_of_mem_supr [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) :
+  ∑ i, (orthogonal_projection (V i) x : E) = x :=
+begin
+  refine submodule.supr_induction _ hx (λ i x hx, _) _ (λ x y hx hy, _),
+  { refine (finset.sum_eq_single_of_mem i (finset.mem_univ _) $ λ j _ hij, _).trans
+      (orthogonal_projection_eq_self_iff.mpr hx),
+    rw [orthogonal_projection_mem_subspace_orthogonal_complement_eq_zero, submodule.coe_zero],
+    exact hV.is_ortho hij.symm hx },
+  { simp_rw [map_zero, submodule.coe_zero, finset.sum_const_zero] },
+  { simp_rw [map_add, submodule.coe_add, finset.sum_add_distrib],
+    exact congr_arg2 (+) hx hy },
+end
+
+/-- If a family of submodules is orthogonal, then the `orthogonal_projection` on a direct sum
+is just the coefficient of that direct sum. -/
+lemma orthogonal_family.projection_direct_sum_coe_add_hom [decidable_eq ι]
+  {V : ι → submodule 𝕜 E} (hV : orthogonal_family 𝕜 (λ i, V i) (λ i, (V i).subtypeₗᵢ))
+  (x : ⨁ i, V i) (i : ι) [complete_space ↥(V i)] :
+    orthogonal_projection (V i) (direct_sum.coe_add_monoid_hom V x) = x i :=
+begin
+  induction x using direct_sum.induction_on with j x x y hx hy,
+  { simp },
+  { simp_rw [direct_sum.coe_add_monoid_hom_of, direct_sum.of, dfinsupp.single_add_hom_apply],
+    obtain rfl | hij := decidable.eq_or_ne i j,
+    { rw [orthogonal_projection_mem_subspace_eq_self, dfinsupp.single_eq_same] },
+    { rw [orthogonal_projection_mem_subspace_orthogonal_complement_eq_zero,
+        dfinsupp.single_eq_of_ne hij.symm],
+      exact hV.is_ortho hij.symm x.prop } },
+  { simp_rw [map_add, dfinsupp.add_apply],
+    exact congr_arg2 (+) hx hy },
+end
+
+/-- 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]. -/
+@[reducible]
+def orthogonal_family.decomposition [decidable_eq ι] [fintype ι] {V : ι → submodule 𝕜 E}
+  [∀ i, complete_space ↥(V i)]
+  (hV : orthogonal_family 𝕜 (λ i, V i) (λ i, (V i).subtypeₗᵢ)) (h : supr V = ⊤) :
+  direct_sum.decomposition V :=
+{ decompose' := λ x, dfinsupp.equiv_fun_on_fintype.symm $ λ i, orthogonal_projection (V i) x,
+  left_inv := λ x, begin
+    dsimp only,
+    letI := λ i, classical.dec_eq (V i),
+    rw [direct_sum.coe_add_monoid_hom, direct_sum.to_add_monoid, dfinsupp.lift_add_hom_apply,
+      dfinsupp.sum_add_hom_apply, dfinsupp.sum_eq_sum_fintype],
+    { simp_rw [equiv.apply_symm_apply, add_submonoid_class.coe_subtype],
+      exact hV.sum_projection_of_mem_supr _ ((h.ge : _) submodule.mem_top),},
+    { intro i,
+      exact map_zero _ },
+  end,
+  right_inv := λ x, begin
+    dsimp only,
+    simp_rw [hV.projection_direct_sum_coe_add_hom, dfinsupp.equiv_fun_on_fintype_symm_coe],
+  end }
+
 end orthogonal_family
 
 section orthonormal_basis

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(first ported)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -7,8 +7,8 @@ import Algebra.DirectSum.Decomposition
 import Analysis.Convex.Basic
 import Analysis.InnerProductSpace.Orthogonal
 import Analysis.InnerProductSpace.Symmetric
-import Analysis.NormedSpace.IsROrC
-import Data.IsROrC.Lemmas
+import Analysis.NormedSpace.RCLike
+import Analysis.RCLike.Lemmas
 
 #align_import analysis.inner_product_space.projection from "leanprover-community/mathlib"@"0b7c740e25651db0ba63648fbae9f9d6f941e31b"
 
@@ -47,13 +47,13 @@ The Coq code is available at the following address: <http://www.lri.fr/~sboldo/e
 
 noncomputable section
 
-open IsROrC Real Filter
+open RCLike Real Filter
 
 open LinearMap (ker range)
 
 open scoped BigOperators Topology
 
-variable {𝕜 E F : Type _} [IsROrC 𝕜]
+variable {𝕜 E F : Type _} [RCLike 𝕜]
 
 variable [NormedAddCommGroup E] [NormedAddCommGroup F]
 
@@ -224,7 +224,7 @@ theorem norm_eq_iInf_iff_real_inner_le_zero {K : Set F} (h : Convex ℝ K) {u :
             simp only [sq]; apply mul_self_le_mul_self (norm_nonneg _)
             rw [Eq]; apply δ_le'
             apply h hw hv
-            exacts [le_of_lt hθ₁, sub_nonneg.2 hθ₂, add_sub_cancel'_right _ _]
+            exacts [le_of_lt hθ₁, sub_nonneg.2 hθ₂, add_sub_cancel _ _]
           _ = ‖u - v - θ • (w - v)‖ ^ 2 :=
             by
             have : u - (θ • w + (1 - θ) • v) = u - v - θ • (w - v) :=
@@ -266,7 +266,7 @@ theorem norm_eq_iInf_iff_real_inner_le_zero {K : Set F} (h : Convex ℝ K) {u :
         have eq₁ : θ * q ≤ p :=
           calc
             θ * q ≤ p / q * q := mul_le_mul_of_nonneg_right (min_le_right _ _) (sq_nonneg _)
-            _ = p := div_mul_cancel _ hq
+            _ = p := div_mul_cancel₀ _ hq
         have : 2 * p ≤ p :=
           calc
             2 * p ≤ θ * q := by
@@ -302,7 +302,7 @@ 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‖ :=
   by
-  letI : InnerProductSpace ℝ E := InnerProductSpace.isROrCToReal 𝕜 E
+  letI : InnerProductSpace ℝ E := InnerProductSpace.rclikeToReal 𝕜 E
   letI : Module ℝ E := RestrictScalars.module ℝ 𝕜 E
   let K' : Submodule ℝ E := Submodule.restrictScalars ℝ K
   exact exists_norm_eq_iInf_of_complete_convex ⟨0, K'.zero_mem⟩ h K'.convex
@@ -361,7 +361,7 @@ for all `w ∈ K`, `⟪u - v, w⟫ = 0` (i.e., `u - v` is orthogonal to the subs
 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 :=
   by
-  letI : InnerProductSpace ℝ E := InnerProductSpace.isROrCToReal 𝕜 E
+  letI : InnerProductSpace ℝ E := InnerProductSpace.rclikeToReal 𝕜 E
   letI : Module ℝ E := RestrictScalars.module ℝ 𝕜 E
   let K' : Submodule ℝ E := K.restrict_scalars ℝ
   constructor
@@ -707,7 +707,7 @@ def reflection : E ≃ₗᵢ[𝕜] E :=
           ContinuousLinearMap.toLinearMap_eq_coe, ContinuousLinearMap.coe_coe]
         dsimp [w, v]
         abel
-      · simp only [add_sub_cancel'_right, eq_self_iff_true] }
+      · simp only [add_sub_cancel, eq_self_iff_true] }
 #align reflection reflection
 -/
 
@@ -830,7 +830,7 @@ theorem Submodule.sup_orthogonal_inf_of_completeSpace {K₁ K₂ : Submodule 
   constructor
   · rintro ⟨y, hy, z, hz, rfl⟩
     exact K₂.add_mem (h hy) hz.2
-  · exact fun hx => ⟨v, v.prop, x - v, ⟨hvm, K₂.sub_mem hx (h v.prop)⟩, add_sub_cancel'_right _ _⟩
+  · exact fun hx => ⟨v, v.prop, x - v, ⟨hvm, K₂.sub_mem hx (h v.prop)⟩, add_sub_cancel _ _⟩
 #align submodule.sup_orthogonal_inf_of_complete_space Submodule.sup_orthogonal_inf_of_completeSpace
 -/
 
@@ -1222,7 +1222,7 @@ theorem inner_orthogonalProjection_eq_of_mem_right [CompleteSpace K] (u : K) (v
     ⟪orthogonalProjection K v, u⟫ = ⟪(orthogonalProjection K v : E), u⟫ := K.coe_inner _ _
     _ = ⟪(orthogonalProjection K v : E), u⟫ + ⟪v - orthogonalProjection K v, u⟫ := by
       rw [orthogonalProjection_inner_eq_zero _ _ (Submodule.coe_mem _), add_zero]
-    _ = ⟪v, u⟫ := by rw [← inner_add_left, add_sub_cancel'_right]
+    _ = ⟪v, u⟫ := by rw [← inner_add_left, add_sub_cancel]
 #align inner_orthogonal_projection_eq_of_mem_right inner_orthogonalProjection_eq_of_mem_right
 -/
 
@@ -1451,7 +1451,7 @@ 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)ᗮ = ⊥ :=
-  haveI h := FiniteDimensional.proper_isROrC 𝕜 ↥(iSup V)
+  haveI h := FiniteDimensional.proper_rclike 𝕜 ↥(iSup V)
   hV.is_internal_iff_of_is_complete (complete_space_coe_iff_is_complete.mp inferInstance)
 #align orthogonal_family.is_internal_iff OrthogonalFamily.isInternal_iff
 -/
@@ -1532,7 +1532,7 @@ variable {𝕜 E} {v : Set E}
 
 open FiniteDimensional Submodule Set
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (u «expr ⊇ » v) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:642:2: warning: expanding binder collection (u «expr ⊇ » v) -/
 #print maximal_orthonormal_iff_orthogonalComplement_eq_bot /-
 /-- An orthonormal set in an `inner_product_space` is maximal, if and only if the orthogonal
 complement of its span is empty. -/
@@ -1603,7 +1603,7 @@ theorem maximal_orthonormal_iff_orthogonalComplement_eq_bot (hv : Orthonormal 
 
 variable [FiniteDimensional 𝕜 E]
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (u «expr ⊇ » v) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:642:2: warning: expanding binder collection (u «expr ⊇ » v) -/
 #print maximal_orthonormal_iff_basis_of_finiteDimensional /-
 /-- An orthonormal set in a finite-dimensional `inner_product_space` is maximal, if and only if it
 is a basis. -/
Diff
@@ -80,7 +80,7 @@ theorem exists_norm_eq_iInf_of_complete_convex {K : Set F} (ne : K.Nonempty) (h
   let δ := ⨅ w : K, ‖u - w‖
   letI : Nonempty K := ne.to_subtype
   have zero_le_δ : 0 ≤ δ := le_ciInf fun _ => norm_nonneg _
-  have δ_le : ∀ w : K, δ ≤ ‖u - w‖ := ciInf_le ⟨0, Set.forall_range_iff.2 fun _ => norm_nonneg _⟩
+  have δ_le : ∀ w : K, δ ≤ ‖u - w‖ := ciInf_le ⟨0, Set.forall_mem_range.2 fun _ => norm_nonneg _⟩
   have δ_le' : ∀ w ∈ K, δ ≤ ‖u - w‖ := fun w hw => δ_le ⟨w, hw⟩
   -- Step 1: since `δ` is the infimum, can find a sequence `w : ℕ → K` in `K`
   -- such that `‖u - w n‖ < δ + 1 / (n + 1)` (which implies `‖u - w n‖ --> δ`);
@@ -245,23 +245,23 @@ theorem norm_eq_iInf_iff_real_inner_le_zero {K : Set F} (h : Convex ℝ K) {u :
         ‖u - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v) + θ * θ * ‖w - v‖ ^ 2 =
           ‖u - v‖ ^ 2 + (θ * θ * ‖w - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v)) :=
         by abel
-      rw [eq₁, le_add_iff_nonneg_right] at this 
+      rw [eq₁, le_add_iff_nonneg_right] at this
       have eq₂ :
         θ * θ * ‖w - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v) =
           θ * (θ * ‖w - v‖ ^ 2 - 2 * inner (u - v) (w - v));
       ring
-      rw [eq₂] at this 
+      rw [eq₂] at this
       have := le_of_sub_nonneg (nonneg_of_mul_nonneg_right this hθ₁)
       exact this
       by_cases hq : q = 0
-      · rw [hq] at this 
+      · rw [hq] at this
         have : p ≤ 0
         have := this (1 : ℝ) (by norm_num) (by norm_num)
         linarith
         exact this
       · have q_pos : 0 < q
         apply lt_of_le_of_ne; exact sq_nonneg _; intro h; exact hq h.symm
-        by_contra hp; rw [not_le] at hp 
+        by_contra hp; rw [not_le] at hp
         let θ := min (1 : ℝ) (p / q)
         have eq₁ : θ * q ≤ p :=
           calc
@@ -322,7 +322,7 @@ theorem norm_eq_iInf_iff_real_inner_eq_zero (K : Submodule ℝ F) {u : F} {v : F
   Iff.intro
     (by
       intro h
-      have h : ∀ w ∈ K, ⟪u - v, w - v⟫_ℝ ≤ 0 := by rwa [norm_eq_iInf_iff_real_inner_le_zero] at h ;
+      have h : ∀ w ∈ K, ⟪u - v, w - v⟫_ℝ ≤ 0 := by rwa [norm_eq_iInf_iff_real_inner_le_zero] at h;
         exacts [K.convex, hv]
       intro w hw
       have le : ⟪u - v, w⟫_ℝ ≤ 0
@@ -330,13 +330,13 @@ theorem norm_eq_iInf_iff_real_inner_eq_zero (K : Submodule ℝ F) {u : F} {v : F
       have : w' ∈ K := Submodule.add_mem _ hw hv
       have h₁ := h w' this
       have h₂ : w' - v = w; simp only [add_neg_cancel_right, sub_eq_add_neg]
-      rw [h₂] at h₁ ; exact h₁
+      rw [h₂] at h₁; exact h₁
       have ge : ⟪u - v, w⟫_ℝ ≥ 0
       let w'' := -w + v
       have : w'' ∈ K := Submodule.add_mem _ (Submodule.neg_mem _ hw) hv
       have h₁ := h w'' this
       have h₂ : w'' - v = -w; simp only [neg_inj, add_neg_cancel_right, sub_eq_add_neg]
-      rw [h₂, inner_neg_right] at h₁ 
+      rw [h₂, inner_neg_right] at h₁
       linarith
       exact le_antisymm le GE.ge)
     (by
@@ -441,7 +441,7 @@ theorem eq_orthogonalProjectionFn_of_mem_of_inner_eq_zero {u v : E} (hvm : v ∈
   have huv : ⟪u - v, orthogonalProjectionFn K u - v⟫ = 0 := hvo _ hvs
   have houv : ⟪u - v - (u - orthogonalProjectionFn K u), orthogonalProjectionFn K u - v⟫ = 0 := by
     rw [inner_sub_left, huo, huv, sub_zero]
-  rwa [sub_sub_sub_cancel_left] at houv 
+  rwa [sub_sub_sub_cancel_left] at houv
 #align eq_orthogonal_projection_fn_of_mem_of_inner_eq_zero eq_orthogonalProjectionFn_of_mem_of_inner_eq_zero
 -/
 
@@ -906,7 +906,7 @@ theorem Submodule.orthogonal_eq_bot_iff [CompleteSpace (K : Set E)] : Kᗮ = ⊥
   refine' ⟨_, fun h => by rw [h, Submodule.top_orthogonal_eq_bot]⟩
   intro h
   have : K ⊔ Kᗮ = ⊤ := Submodule.sup_orthogonal_of_completeSpace
-  rwa [h, sup_comm, bot_sup_eq] at this 
+  rwa [h, sup_comm, bot_sup_eq] at this
 #align submodule.orthogonal_eq_bot_iff Submodule.orthogonal_eq_bot_iff
 -/
 
@@ -1026,10 +1026,10 @@ theorem orthogonalProjection_tendsto_closure_iSup [CompleteSpace E] {ι : Type _
   obtain ⟨a, ha, hay⟩ : ∃ a ∈ ⨆ i, U i, dist y a < ε :=
     by
     have y_mem : y ∈ (⨆ i, U i).topologicalClosure := Submodule.coe_mem _
-    rw [← SetLike.mem_coe, Submodule.topologicalClosure_coe, Metric.mem_closure_iff] at y_mem 
+    rw [← SetLike.mem_coe, Submodule.topologicalClosure_coe, Metric.mem_closure_iff] at y_mem
     exact y_mem ε hε
-  rw [dist_eq_norm] at hay 
-  obtain ⟨I, hI⟩ : ∃ I, a ∈ U I := by rwa [Submodule.mem_iSup_of_directed _ hU.directed_le] at ha 
+  rw [dist_eq_norm] at hay
+  obtain ⟨I, hI⟩ : ∃ I, a ∈ U I := by rwa [Submodule.mem_iSup_of_directed _ hU.directed_le] at ha
   refine' ⟨I, fun i (hi : I ≤ i) => _⟩
   rw [norm_sub_rev, orthogonalProjection_minimal]
   refine' lt_of_le_of_lt _ hay
@@ -1046,7 +1046,7 @@ theorem orthogonalProjection_tendsto_self [CompleteSpace E] {ι : Type _} [Semil
     (hU' : ⊤ ≤ (⨆ t, U t).topologicalClosure) :
     Filter.Tendsto (fun t => (orthogonalProjection (U t) x : E)) atTop (𝓝 x) :=
   by
-  rw [← eq_top_iff] at hU' 
+  rw [← eq_top_iff] at hU'
   convert orthogonalProjection_tendsto_closure_iSup U hU x
   rw [orthogonal_projection_eq_self_iff.mpr _]
   rw [hU']
@@ -1085,8 +1085,8 @@ variable {x y : E} [CompleteSpace E]
 /-- 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 :=
   by
-  rw [dense_iff_topological_closure_eq_top, topological_closure_eq_top_iff] at hK 
-  rwa [hK, Submodule.mem_bot, sub_eq_zero] at h 
+  rw [dense_iff_topological_closure_eq_top, topological_closure_eq_top_iff] at hK
+  rwa [hK, Submodule.mem_bot, sub_eq_zero] at h
 #align dense.eq_of_sub_mem_orthogonal Dense.eq_of_sub_mem_orthogonal
 -/
 
@@ -1180,7 +1180,7 @@ theorem orthogonalProjection_add_orthogonalProjection_orthogonal [CompleteSpace
   obtain ⟨y, hy, z, hz, hwyz⟩ := K.exists_sum_mem_mem_orthogonal w
   convert hwyz
   · exact eq_orthogonalProjection_of_mem_orthogonal' hy hz hwyz
-  · rw [add_comm] at hwyz 
+  · rw [add_comm] at hwyz
     refine' eq_orthogonalProjection_of_mem_orthogonal' hz _ hwyz
     simp [hy]
 #align eq_sum_orthogonal_projection_self_orthogonal_complement orthogonalProjection_add_orthogonalProjection_orthogonalₓ
@@ -1264,8 +1264,8 @@ theorem Submodule.finrank_add_inf_finrank_orthogonal {K₁ K₂ : Submodule 𝕜
   haveI := proper_is_R_or_C 𝕜 K₁
   have hd := Submodule.finrank_sup_add_finrank_inf_eq K₁ (K₁ᗮ ⊓ K₂)
   rw [← inf_assoc, (Submodule.orthogonal_disjoint K₁).eq_bot, bot_inf_eq, finrank_bot,
-    Submodule.sup_orthogonal_inf_of_completeSpace h] at hd 
-  rw [add_zero] at hd 
+    Submodule.sup_orthogonal_inf_of_completeSpace h] at hd
+  rw [add_zero] at hd
   exact hd.symm
 #align submodule.finrank_add_inf_finrank_orthogonal Submodule.finrank_add_inf_finrank_orthogonal
 -/
@@ -1331,7 +1331,7 @@ theorem LinearIsometryEquiv.reflections_generate_dim_aux [FiniteDimensional ℝ
   · -- Base case: `n = 0`, the fixed subspace is the whole space, so `φ = id`
     refine' ⟨[], rfl.le, show φ = 1 from _⟩
     have : ker (ContinuousLinearMap.id ℝ F - φ) = ⊤ := by
-      rwa [le_zero_iff, Submodule.finrank_eq_zero, Submodule.orthogonal_eq_bot_iff] at hn 
+      rwa [le_zero_iff, Submodule.finrank_eq_zero, Submodule.orthogonal_eq_bot_iff] at hn
     symm
     ext x
     have := LinearMap.congr_fun (linear_map.ker_eq_top.mp this) x
@@ -1380,7 +1380,7 @@ theorem LinearIsometryEquiv.reflections_generate_dim_aux [FiniteDimensional ℝ
     -- By dimension-counting, the complement of the fixed subspace of `φ.trans ρ` has dimension at
     -- most `n`
     have : finrank ℝ Vᗮ ≤ n := by
-      change finrank ℝ Wᗮ ≤ n + 1 at hn 
+      change finrank ℝ Wᗮ ≤ n + 1 at hn
       have : finrank ℝ W + 1 ≤ finrank ℝ V :=
         Submodule.finrank_lt_finrank_of_lt (SetLike.lt_iff_le_and_exists.2 ⟨H₂V, v, H₁V, hv'⟩)
       have : finrank ℝ V + finrank ℝ Vᗮ = finrank ℝ F := V.finrank_add_finrank_orthogonal
@@ -1393,7 +1393,7 @@ theorem LinearIsometryEquiv.reflections_generate_dim_aux [FiniteDimensional ℝ
     refine' ⟨x::l, Nat.succ_le_succ hl, _⟩
     rw [List.map_cons, List.prod_cons]
     have := congr_arg ((· * ·) ρ) hφl
-    rwa [← mul_assoc, reflection_mul_reflection, one_mul] at this 
+    rwa [← mul_assoc, reflection_mul_reflection, one_mul] at this
 #align linear_isometry_equiv.reflections_generate_dim_aux LinearIsometryEquiv.reflections_generate_dim_aux
 -/
 
Diff
@@ -97,7 +97,7 @@ theorem exists_norm_eq_iInf_of_complete_convex {K : Set F} (ne : K.Nonempty) (h
     by
     have h : tendsto (fun n : ℕ => δ) at_top (nhds δ) := tendsto_const_nhds
     have h' : tendsto (fun n : ℕ => δ + 1 / (n + 1)) at_top (nhds δ) := by
-      convert h.add tendsto_one_div_add_atTop_nhds_0_nat; simp only [add_zero]
+      convert h.add tendsto_one_div_add_atTop_nhds_zero_nat; simp only [add_zero]
     exact tendsto_of_tendsto_of_tendsto_of_le_of_le h h' (fun x => δ_le _) fun x => le_of_lt (hw _)
   -- Step 2: Prove that the sequence `w : ℕ → K` is a Cauchy sequence
   have seq_is_cauchy : CauchySeq fun n => (w n : F) :=
@@ -175,16 +175,16 @@ theorem exists_norm_eq_iInf_of_complete_convex {K : Set F} (ne : K.Nonempty) (h
     · convert continuous_sqrt.continuous_at; exact sqrt_zero.symm
     have eq₁ : tendsto (fun n : ℕ => 8 * δ * (1 / (n + 1))) at_top (nhds (0 : ℝ)) :=
       by
-      convert (@tendsto_const_nhds _ _ _ (8 * δ) _).mul tendsto_one_div_add_atTop_nhds_0_nat
+      convert (@tendsto_const_nhds _ _ _ (8 * δ) _).mul tendsto_one_div_add_atTop_nhds_zero_nat
       simp only [MulZeroClass.mul_zero]
     have : tendsto (fun n : ℕ => (4 : ℝ) * (1 / (n + 1))) at_top (nhds (0 : ℝ)) :=
       by
-      convert (@tendsto_const_nhds _ _ _ (4 : ℝ) _).mul tendsto_one_div_add_atTop_nhds_0_nat
+      convert (@tendsto_const_nhds _ _ _ (4 : ℝ) _).mul tendsto_one_div_add_atTop_nhds_zero_nat
       simp only [MulZeroClass.mul_zero]
     have eq₂ :
       tendsto (fun n : ℕ => (4 : ℝ) * (1 / (n + 1)) * (1 / (n + 1))) at_top (nhds (0 : ℝ)) :=
       by
-      convert this.mul tendsto_one_div_add_atTop_nhds_0_nat
+      convert this.mul tendsto_one_div_add_atTop_nhds_zero_nat
       simp only [MulZeroClass.mul_zero]
     convert eq₁.add eq₂; simp only [add_zero]
   -- Step 3: By completeness of `K`, let `w : ℕ → K` converge to some `v : K`.
Diff
@@ -951,7 +951,7 @@ theorem orthogonalProjection_comp_subtypeL_eq_zero_iff {U V : Submodule 𝕜 E}
     orthogonalProjection U ∘L V.subtypeL = 0 ↔ U ⟂ V :=
   ⟨fun h u hu v hv => by
     convert orthogonalProjection_inner_eq_zero v u hu using 2
-    have : orthogonalProjection U v = 0 := FunLike.congr_fun h ⟨_, hv⟩
+    have : orthogonalProjection U v = 0 := DFunLike.congr_fun h ⟨_, hv⟩
     rw [this, Submodule.coe_zero, sub_zero], Submodule.IsOrtho.orthogonalProjection_comp_subtypeL⟩
 #align orthogonal_projection_comp_subtypeL_eq_zero_iff orthogonalProjection_comp_subtypeL_eq_zero_iff
 -/
Diff
@@ -61,7 +61,7 @@ variable [InnerProductSpace 𝕜 E] [InnerProductSpace ℝ F]
 
 local notation "⟪" x ", " y "⟫" => @inner 𝕜 _ _ x y
 
-local notation "absR" => Abs.abs
+local notation "absR" => abs
 
 /-! ### Orthogonal projection in inner product spaces -/
 
Diff
@@ -490,7 +490,7 @@ def orthogonalProjection : E →L[𝕜] K :=
         simp [eq_orthogonalProjectionFn_of_mem_of_inner_eq_zero hm ho] }
     1 fun x => by
     simp only [one_mul, LinearMap.coe_mk]
-    refine' le_of_pow_le_pow 2 (norm_nonneg _) (by norm_num) _
+    refine' le_of_pow_le_pow_left 2 (norm_nonneg _) (by norm_num) _
     change ‖orthogonalProjectionFn K x‖ ^ 2 ≤ ‖x‖ ^ 2
     nlinarith [orthogonalProjectionFn_norm_sq K x]
 #align orthogonal_projection orthogonalProjection
@@ -1331,7 +1331,7 @@ theorem LinearIsometryEquiv.reflections_generate_dim_aux [FiniteDimensional ℝ
   · -- Base case: `n = 0`, the fixed subspace is the whole space, so `φ = id`
     refine' ⟨[], rfl.le, show φ = 1 from _⟩
     have : ker (ContinuousLinearMap.id ℝ F - φ) = ⊤ := by
-      rwa [le_zero_iff, finrank_eq_zero, Submodule.orthogonal_eq_bot_iff] at hn 
+      rwa [le_zero_iff, Submodule.finrank_eq_zero, Submodule.orthogonal_eq_bot_iff] at hn 
     symm
     ext x
     have := LinearMap.congr_fun (linear_map.ker_eq_top.mp this) x
Diff
@@ -3,12 +3,12 @@ Copyright (c) 2019 Zhouhang Zhou. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Zhouhang Zhou, Frédéric Dupuis, Heather Macbeth
 -/
-import Mathbin.Algebra.DirectSum.Decomposition
-import Mathbin.Analysis.Convex.Basic
-import Mathbin.Analysis.InnerProductSpace.Orthogonal
-import Mathbin.Analysis.InnerProductSpace.Symmetric
-import Mathbin.Analysis.NormedSpace.IsROrC
-import Mathbin.Data.IsROrC.Lemmas
+import Algebra.DirectSum.Decomposition
+import Analysis.Convex.Basic
+import Analysis.InnerProductSpace.Orthogonal
+import Analysis.InnerProductSpace.Symmetric
+import Analysis.NormedSpace.IsROrC
+import Data.IsROrC.Lemmas
 
 #align_import analysis.inner_product_space.projection from "leanprover-community/mathlib"@"0b7c740e25651db0ba63648fbae9f9d6f941e31b"
 
@@ -1532,7 +1532,7 @@ variable {𝕜 E} {v : Set E}
 
 open FiniteDimensional Submodule Set
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (u «expr ⊇ » v) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (u «expr ⊇ » v) -/
 #print maximal_orthonormal_iff_orthogonalComplement_eq_bot /-
 /-- An orthonormal set in an `inner_product_space` is maximal, if and only if the orthogonal
 complement of its span is empty. -/
@@ -1603,7 +1603,7 @@ theorem maximal_orthonormal_iff_orthogonalComplement_eq_bot (hv : Orthonormal 
 
 variable [FiniteDimensional 𝕜 E]
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (u «expr ⊇ » v) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (u «expr ⊇ » v) -/
 #print maximal_orthonormal_iff_basis_of_finiteDimensional /-
 /-- An orthonormal set in a finite-dimensional `inner_product_space` is maximal, if and only if it
 is a basis. -/
Diff
@@ -213,7 +213,7 @@ theorem norm_eq_iInf_iff_real_inner_le_zero {K : Set F} (h : Convex ℝ K) {u :
       have zero_le_δ : 0 ≤ δ
       apply le_ciInf; intro; exact norm_nonneg _
       have δ_le : ∀ w : K, δ ≤ ‖u - w‖
-      intro w; apply ciInf_le; use (0 : ℝ); rintro _ ⟨_, rfl⟩; exact norm_nonneg _
+      intro w; apply ciInf_le; use(0 : ℝ); rintro _ ⟨_, rfl⟩; exact norm_nonneg _
       have δ_le' : ∀ w ∈ K, δ ≤ ‖u - w‖ := fun w hw => δ_le ⟨w, hw⟩
       have : ∀ θ : ℝ, 0 < θ → θ ≤ 1 → 2 * p ≤ θ * q
       intro θ hθ₁ hθ₂
@@ -639,7 +639,7 @@ theorem smul_orthogonalProjection_singleton {v : E} (w : E) :
   suffices ↑(orthogonalProjection (𝕜 ∙ v) ((‖v‖ ^ 2 : 𝕜) • w)) = ⟪v, w⟫ • v by simpa using this
   apply eq_orthogonalProjection_of_mem_of_inner_eq_zero
   · rw [Submodule.mem_span_singleton]
-    use ⟪v, w⟫
+    use⟪v, w⟫
   · intro x hx
     obtain ⟨c, rfl⟩ := submodule.mem_span_singleton.mp hx
     have hv : ↑‖v‖ ^ 2 = ⟪v, v⟫ := by norm_cast; simp [@norm_sq_eq_inner 𝕜]
Diff
@@ -2,11 +2,6 @@
 Copyright (c) 2019 Zhouhang Zhou. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Zhouhang Zhou, Frédéric Dupuis, Heather Macbeth
-
-! This file was ported from Lean 3 source module analysis.inner_product_space.projection
-! leanprover-community/mathlib commit 0b7c740e25651db0ba63648fbae9f9d6f941e31b
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Algebra.DirectSum.Decomposition
 import Mathbin.Analysis.Convex.Basic
@@ -15,6 +10,8 @@ import Mathbin.Analysis.InnerProductSpace.Symmetric
 import Mathbin.Analysis.NormedSpace.IsROrC
 import Mathbin.Data.IsROrC.Lemmas
 
+#align_import analysis.inner_product_space.projection from "leanprover-community/mathlib"@"0b7c740e25651db0ba63648fbae9f9d6f941e31b"
+
 /-!
 # The orthogonal projection
 
@@ -1535,7 +1532,7 @@ variable {𝕜 E} {v : Set E}
 
 open FiniteDimensional Submodule Set
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (u «expr ⊇ » v) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (u «expr ⊇ » v) -/
 #print maximal_orthonormal_iff_orthogonalComplement_eq_bot /-
 /-- An orthonormal set in an `inner_product_space` is maximal, if and only if the orthogonal
 complement of its span is empty. -/
@@ -1606,7 +1603,7 @@ theorem maximal_orthonormal_iff_orthogonalComplement_eq_bot (hv : Orthonormal 
 
 variable [FiniteDimensional 𝕜 E]
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (u «expr ⊇ » v) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (u «expr ⊇ » v) -/
 #print maximal_orthonormal_iff_basis_of_finiteDimensional /-
 /-- An orthonormal set in a finite-dimensional `inner_product_space` is maximal, if and only if it
 is a basis. -/
Diff
@@ -850,15 +850,15 @@ theorem Submodule.sup_orthogonal_of_completeSpace [CompleteSpace K] : K ⊔ Kᗮ
 
 variable (K)
 
-#print Submodule.exists_sum_mem_mem_orthogonal /-
+#print Submodule.exists_add_mem_mem_orthogonal /-
 /-- If `K` is complete, any `v` in `E` can be expressed as a sum of elements of `K` and `Kᗮ`. -/
-theorem Submodule.exists_sum_mem_mem_orthogonal [CompleteSpace K] (v : E) :
+theorem Submodule.exists_add_mem_mem_orthogonal [CompleteSpace K] (v : E) :
     ∃ y ∈ K, ∃ z ∈ Kᗮ, v = y + z :=
   by
   have h_mem : v ∈ K ⊔ Kᗮ := by simp [Submodule.sup_orthogonal_of_completeSpace]
   obtain ⟨y, hy, z, hz, hyz⟩ := submodule.mem_sup.mp h_mem
   exact ⟨y, hy, z, hz, hyz.symm⟩
-#align submodule.exists_sum_mem_mem_orthogonal Submodule.exists_sum_mem_mem_orthogonal
+#align submodule.exists_sum_mem_mem_orthogonal Submodule.exists_add_mem_mem_orthogonal
 -/
 
 #print Submodule.orthogonal_orthogonal /-
@@ -1175,10 +1175,9 @@ theorem reflection_sub [CompleteSpace F] {v w : F} (h : ‖v‖ = ‖w‖) :
 
 variable (K)
 
-#print eq_sum_orthogonalProjection_self_orthogonalComplement /-
 /-- 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`.-/
-theorem eq_sum_orthogonalProjection_self_orthogonalComplement [CompleteSpace E] [CompleteSpace K]
+theorem orthogonalProjection_add_orthogonalProjection_orthogonal [CompleteSpace E] [CompleteSpace K]
     (w : E) : w = (orthogonalProjection K w : E) + (orthogonalProjection Kᗮ w : E) :=
   by
   obtain ⟨y, hy, z, hz, hwyz⟩ := K.exists_sum_mem_mem_orthogonal w
@@ -1187,8 +1186,7 @@ theorem eq_sum_orthogonalProjection_self_orthogonalComplement [CompleteSpace E]
   · rw [add_comm] at hwyz 
     refine' eq_orthogonalProjection_of_mem_orthogonal' hz _ hwyz
     simp [hy]
-#align eq_sum_orthogonal_projection_self_orthogonal_complement eq_sum_orthogonalProjection_self_orthogonalComplement
--/
+#align eq_sum_orthogonal_projection_self_orthogonal_complement orthogonalProjection_add_orthogonalProjection_orthogonalₓ
 
 #print norm_sq_eq_add_norm_sq_projection /-
 /-- The Pythagorean theorem, for an orthogonal projection.-/
@@ -1198,7 +1196,7 @@ theorem norm_sq_eq_add_norm_sq_projection (x : E) (S : Submodule 𝕜 E) [Comple
   by
   let p1 := orthogonalProjection S
   let p2 := orthogonalProjection Sᗮ
-  have x_decomp : x = p1 x + p2 x := eq_sum_orthogonalProjection_self_orthogonalComplement S x
+  have x_decomp : x = p1 x + p2 x := orthogonalProjection_add_orthogonalProjection_orthogonal S x
   have x_orth : ⟪(p1 x : E), p2 x⟫ = 0 :=
     Submodule.inner_right_of_mem_orthogonal (SetLike.coe_mem (p1 x)) (SetLike.coe_mem (p2 x))
   nth_rw 1 [x_decomp]
@@ -1215,7 +1213,7 @@ theorem id_eq_sum_orthogonalProjection_self_orthogonalComplement [CompleteSpace
     [CompleteSpace K] :
     ContinuousLinearMap.id 𝕜 E =
       K.subtypeL.comp (orthogonalProjection K) + Kᗮ.subtypeL.comp (orthogonalProjection Kᗮ) :=
-  by ext w; exact eq_sum_orthogonalProjection_self_orthogonalComplement K w
+  by ext w; exact orthogonalProjection_add_orthogonalProjection_orthogonal K w
 #align id_eq_sum_orthogonal_projection_self_orthogonal_complement id_eq_sum_orthogonalProjection_self_orthogonalComplement
 -/
 
Diff
@@ -1490,13 +1490,13 @@ theorem OrthogonalFamily.projection_directSum_coeAddHom [DecidableEq ι] {V : ι
   by
   induction' x using DirectSum.induction_on with j x x y hx hy
   · simp
-  · simp_rw [DirectSum.coeAddMonoidHom_of, DirectSum.of, Dfinsupp.singleAddHom_apply]
+  · simp_rw [DirectSum.coeAddMonoidHom_of, DirectSum.of, DFinsupp.singleAddHom_apply]
     obtain rfl | hij := Decidable.eq_or_ne i j
-    · rw [orthogonalProjection_mem_subspace_eq_self, Dfinsupp.single_eq_same]
+    · rw [orthogonalProjection_mem_subspace_eq_self, DFinsupp.single_eq_same]
     · rw [orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero,
-        Dfinsupp.single_eq_of_ne hij.symm]
+        DFinsupp.single_eq_of_ne hij.symm]
       exact hV.is_ortho hij.symm x.prop
-  · simp_rw [map_add, Dfinsupp.add_apply]
+  · simp_rw [map_add, DFinsupp.add_apply]
     exact congr_arg₂ (· + ·) hx hy
 #align orthogonal_family.projection_direct_sum_coe_add_hom OrthogonalFamily.projection_directSum_coeAddHom
 -/
@@ -1513,19 +1513,19 @@ def OrthogonalFamily.decomposition [DecidableEq ι] [Fintype ι] {V : ι → Sub
     [∀ i, CompleteSpace ↥(V i)] (hV : OrthogonalFamily 𝕜 (fun i => V i) fun i => (V i).subtypeₗᵢ)
     (h : iSup V = ⊤) : DirectSum.Decomposition V
     where
-  decompose' x := Dfinsupp.equivFunOnFintype.symm fun i => orthogonalProjection (V i) x
+  decompose' x := DFinsupp.equivFunOnFintype.symm fun i => orthogonalProjection (V i) x
   left_inv x := by
     dsimp only
     letI := fun i => Classical.decEq (V i)
-    rw [DirectSum.coeAddMonoidHom, DirectSum.toAddMonoid, Dfinsupp.liftAddHom_apply,
-      Dfinsupp.sumAddHom_apply, Dfinsupp.sum_eq_sum_fintype]
+    rw [DirectSum.coeAddMonoidHom, DirectSum.toAddMonoid, DFinsupp.liftAddHom_apply,
+      DFinsupp.sumAddHom_apply, DFinsupp.sum_eq_sum_fintype]
     · simp_rw [Equiv.apply_symm_apply, AddSubmonoidClass.coe_subtype]
       exact hV.sum_projection_of_mem_supr _ ((h.ge : _) Submodule.mem_top)
     · intro i
       exact map_zero _
   right_inv x := by
     dsimp only
-    simp_rw [hV.projection_direct_sum_coe_add_hom, Dfinsupp.equivFunOnFintype_symm_coe]
+    simp_rw [hV.projection_direct_sum_coe_add_hom, DFinsupp.equivFunOnFintype_symm_coe]
 #align orthogonal_family.decomposition OrthogonalFamily.decomposition
 -/
 
Diff
@@ -1463,6 +1463,7 @@ theorem OrthogonalFamily.isInternal_iff [DecidableEq ι] [FiniteDimensional 𝕜
 
 open scoped DirectSum
 
+#print OrthogonalFamily.sum_projection_of_mem_iSup /-
 /-- 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ₗᵢ)
@@ -1478,10 +1479,12 @@ theorem OrthogonalFamily.sum_projection_of_mem_iSup [Fintype ι] {V : ι → Sub
   · simp_rw [map_add, Submodule.coe_add, Finset.sum_add_distrib]
     exact congr_arg₂ (· + ·) hx hy
 #align orthogonal_family.sum_projection_of_mem_supr OrthogonalFamily.sum_projection_of_mem_iSup
+-/
 
+#print OrthogonalFamily.projection_directSum_coeAddHom /-
 /-- If a family of submodules is orthogonal, then the `orthogonal_projection` on a direct sum
 is just the coefficient of that direct sum. -/
-theorem OrthogonalFamily.projection_directSum_coe_add_hom [DecidableEq ι] {V : ι → Submodule 𝕜 E}
+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 :=
   by
@@ -1495,8 +1498,10 @@ theorem OrthogonalFamily.projection_directSum_coe_add_hom [DecidableEq ι] {V :
       exact hV.is_ortho hij.symm x.prop
   · simp_rw [map_add, Dfinsupp.add_apply]
     exact congr_arg₂ (· + ·) hx hy
-#align orthogonal_family.projection_direct_sum_coe_add_hom OrthogonalFamily.projection_directSum_coe_add_hom
+#align orthogonal_family.projection_direct_sum_coe_add_hom OrthogonalFamily.projection_directSum_coeAddHom
+-/
 
+#print OrthogonalFamily.decomposition /-
 /-- 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.
 
@@ -1522,6 +1527,7 @@ def OrthogonalFamily.decomposition [DecidableEq ι] [Fintype ι] {V : ι → Sub
     dsimp only
     simp_rw [hV.projection_direct_sum_coe_add_hom, Dfinsupp.equivFunOnFintype_symm_coe]
 #align orthogonal_family.decomposition OrthogonalFamily.decomposition
+-/
 
 end OrthogonalFamily
 
Diff
@@ -62,15 +62,14 @@ variable [NormedAddCommGroup E] [NormedAddCommGroup F]
 
 variable [InnerProductSpace 𝕜 E] [InnerProductSpace ℝ F]
 
--- mathport name: «expr⟪ , ⟫»
 local notation "⟪" x ", " y "⟫" => @inner 𝕜 _ _ x y
 
--- mathport name: exprabsR
 local notation "absR" => Abs.abs
 
 /-! ### Orthogonal projection in inner product spaces -/
 
 
+#print exists_norm_eq_iInf_of_complete_convex /-
 -- FIXME this monolithic proof causes a deterministic timeout with `-T50000`
 -- It should be broken in a sequence of more manageable pieces,
 -- perhaps with individual statements for the three steps below.
@@ -202,7 +201,9 @@ theorem exists_norm_eq_iInf_of_complete_convex {K : Set F} (ne : K.Nonempty) (h
   exact tendsto_nhds_unique this norm_tendsto
   exact Subtype.mem _
 #align exists_norm_eq_infi_of_complete_convex exists_norm_eq_iInf_of_complete_convex
+-/
 
+#print norm_eq_iInf_iff_real_inner_le_zero /-
 /-- 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}
@@ -291,9 +292,11 @@ theorem norm_eq_iInf_iff_real_inner_le_zero {K : Set F} (h : Convex ℝ K) {u :
       · show (⨅ w : K, ‖u - w‖) ≤ (fun w : K => ‖u - w‖) ⟨v, hv⟩
         apply ciInf_le; use 0; rintro y ⟨z, rfl⟩; exact norm_nonneg _)
 #align norm_eq_infi_iff_real_inner_le_zero norm_eq_iInf_iff_real_inner_le_zero
+-/
 
 variable (K : Submodule 𝕜 E)
 
+#print exists_norm_eq_iInf_of_complete_subspace /-
 /-- 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`.
@@ -307,7 +310,9 @@ theorem exists_norm_eq_iInf_of_complete_subspace (h : IsComplete (↑K : Set E))
   let K' : Submodule ℝ E := Submodule.restrictScalars ℝ K
   exact exists_norm_eq_iInf_of_complete_convex ⟨0, K'.zero_mem⟩ h K'.convex
 #align exists_norm_eq_infi_of_complete_subspace exists_norm_eq_iInf_of_complete_subspace
+-/
 
+#print norm_eq_iInf_iff_real_inner_eq_zero /-
 /-- 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
@@ -348,7 +353,9 @@ theorem norm_eq_iInf_iff_real_inner_eq_zero (K : Submodule ℝ F) {u : F} {v : F
       rwa [norm_eq_iInf_iff_real_inner_le_zero]
       exacts [Submodule.convex _, hv])
 #align norm_eq_infi_iff_real_inner_eq_zero norm_eq_iInf_iff_real_inner_eq_zero
+-/
 
+#print norm_eq_iInf_iff_inner_eq_zero /-
 /-- 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
@@ -379,6 +386,7 @@ theorem norm_eq_iInf_iff_inner_eq_zero {u : E} {v : E} (hv : v ∈ K) :
       exact zero_re'
     exact (norm_eq_iInf_iff_real_inner_eq_zero K' hv).2 this
 #align norm_eq_infi_iff_inner_eq_zero norm_eq_iInf_iff_inner_eq_zero
+-/
 
 section orthogonalProjection
 
@@ -406,6 +414,7 @@ theorem orthogonalProjectionFn_mem (v : E) : orthogonalProjectionFn K v ∈ K :=
 #align orthogonal_projection_fn_mem orthogonalProjectionFn_mem
 -/
 
+#print orthogonalProjectionFn_inner_eq_zero /-
 /-- 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. -/
@@ -417,7 +426,9 @@ theorem orthogonalProjectionFn_inner_eq_zero (v : E) :
     (exists_norm_eq_iInf_of_complete_subspace K (complete_space_coe_iff_is_complete.mp ‹_›)
           v).choose_spec.choose_spec
 #align orthogonal_projection_fn_inner_eq_zero orthogonalProjectionFn_inner_eq_zero
+-/
 
+#print eq_orthogonalProjectionFn_of_mem_of_inner_eq_zero /-
 /-- 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
@@ -435,9 +446,11 @@ theorem eq_orthogonalProjectionFn_of_mem_of_inner_eq_zero {u v : E} (hvm : v ∈
     rw [inner_sub_left, huo, huv, sub_zero]
   rwa [sub_sub_sub_cancel_left] at houv 
 #align eq_orthogonal_projection_fn_of_mem_of_inner_eq_zero eq_orthogonalProjectionFn_of_mem_of_inner_eq_zero
+-/
 
 variable (K)
 
+#print orthogonalProjectionFn_norm_sq /-
 theorem orthogonalProjectionFn_norm_sq (v : E) :
     ‖v‖ * ‖v‖ =
       ‖v - orthogonalProjectionFn K v‖ * ‖v - orthogonalProjectionFn K v‖ +
@@ -448,6 +461,7 @@ theorem orthogonalProjectionFn_norm_sq (v : E) :
     orthogonalProjectionFn_inner_eq_zero _ _ (orthogonalProjectionFn_mem v)
   convert norm_add_sq_eq_norm_sq_add_norm_sq_of_inner_eq_zero (v - p) p h' using 2 <;> simp
 #align orthogonal_projection_fn_norm_sq orthogonalProjectionFn_norm_sq
+-/
 
 #print orthogonalProjection /-
 /-- The orthogonal projection onto a complete subspace. -/
@@ -487,19 +501,24 @@ def orthogonalProjection : E →L[𝕜] K :=
 
 variable {K}
 
+#print orthogonalProjectionFn_eq /-
 @[simp]
 theorem orthogonalProjectionFn_eq (v : E) :
     orthogonalProjectionFn K v = (orthogonalProjection K v : E) :=
   rfl
 #align orthogonal_projection_fn_eq orthogonalProjectionFn_eq
+-/
 
+#print orthogonalProjection_inner_eq_zero /-
 /-- The characterization of the orthogonal projection.  -/
 @[simp]
 theorem orthogonalProjection_inner_eq_zero (v : E) :
     ∀ w ∈ K, ⟪v - orthogonalProjection K v, w⟫ = 0 :=
   orthogonalProjectionFn_inner_eq_zero v
 #align orthogonal_projection_inner_eq_zero orthogonalProjection_inner_eq_zero
+-/
 
+#print sub_orthogonalProjection_mem_orthogonal /-
 /-- 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ᗮ :=
@@ -508,14 +527,18 @@ theorem sub_orthogonalProjection_mem_orthogonal (v : E) : v - orthogonalProjecti
   rw [inner_eq_zero_symm]
   exact orthogonalProjection_inner_eq_zero _ _ hw
 #align sub_orthogonal_projection_mem_orthogonal sub_orthogonalProjection_mem_orthogonal
+-/
 
+#print eq_orthogonalProjection_of_mem_of_inner_eq_zero /-
 /-- 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 :=
   eq_orthogonalProjectionFn_of_mem_of_inner_eq_zero hvm hvo
 #align eq_orthogonal_projection_of_mem_of_inner_eq_zero eq_orthogonalProjection_of_mem_of_inner_eq_zero
+-/
 
+#print orthogonalProjection_minimal /-
 /-- The orthogonal projection of `y` on `U` minimizes the distance `‖y - x‖` for `x ∈ U`. -/
 theorem orthogonalProjection_minimal {U : Submodule 𝕜 E} [CompleteSpace U] (y : E) :
     ‖y - orthogonalProjection U y‖ = ⨅ x : U, ‖y - x‖ :=
@@ -523,7 +546,9 @@ theorem orthogonalProjection_minimal {U : Submodule 𝕜 E} [CompleteSpace U] (y
   rw [norm_eq_iInf_iff_inner_eq_zero _ (Submodule.coe_mem _)]
   exact orthogonalProjection_inner_eq_zero _
 #align orthogonal_projection_minimal orthogonalProjection_minimal
+-/
 
+#print eq_orthogonalProjection_of_eq_submodule /-
 /-- The orthogonal projections onto equal subspaces are coerced back to the same point in `E`. -/
 theorem eq_orthogonalProjection_of_eq_submodule {K' : Submodule 𝕜 E} [CompleteSpace K'] (h : K = K')
     (u : E) : (orthogonalProjection K u : E) = (orthogonalProjection K' u : E) :=
@@ -532,13 +557,17 @@ theorem eq_orthogonalProjection_of_eq_submodule {K' : Submodule 𝕜 E} [Complet
   congr
   exact h
 #align eq_orthogonal_projection_of_eq_submodule eq_orthogonalProjection_of_eq_submodule
+-/
 
+#print orthogonalProjection_mem_subspace_eq_self /-
 /-- The orthogonal projection sends elements of `K` to themselves. -/
 @[simp]
 theorem orthogonalProjection_mem_subspace_eq_self (v : K) : orthogonalProjection K v = v := by ext;
   apply eq_orthogonalProjection_of_mem_of_inner_eq_zero <;> simp
 #align orthogonal_projection_mem_subspace_eq_self orthogonalProjection_mem_subspace_eq_self
+-/
 
+#print orthogonalProjection_eq_self_iff /-
 /-- 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 :=
   by
@@ -547,7 +576,9 @@ theorem orthogonalProjection_eq_self_iff {v : E} : (orthogonalProjection K v : E
     simp
   · simp
 #align orthogonal_projection_eq_self_iff orthogonalProjection_eq_self_iff
+-/
 
+#print LinearIsometry.map_orthogonalProjection /-
 theorem LinearIsometry.map_orthogonalProjection {E E' : Type _} [NormedAddCommGroup E]
     [NormedAddCommGroup E'] [InnerProductSpace 𝕜 E] [InnerProductSpace 𝕜 E'] (f : E →ₗᵢ[𝕜] E')
     (p : Submodule 𝕜 E) [CompleteSpace p] (x : E) :
@@ -558,7 +589,9 @@ theorem LinearIsometry.map_orthogonalProjection {E E' : Type _} [NormedAddCommGr
   rcases hy with ⟨x', hx', rfl : f x' = y⟩
   rw [← f.map_sub, f.inner_map_map, orthogonalProjection_inner_eq_zero x x' hx']
 #align linear_isometry.map_orthogonal_projection LinearIsometry.map_orthogonalProjection
+-/
 
+#print LinearIsometry.map_orthogonalProjection' /-
 theorem LinearIsometry.map_orthogonalProjection' {E E' : Type _} [NormedAddCommGroup E]
     [NormedAddCommGroup E'] [InnerProductSpace 𝕜 E] [InnerProductSpace 𝕜 E'] (f : E →ₗᵢ[𝕜] E')
     (p : Submodule 𝕜 E) [CompleteSpace p] (x : E) :
@@ -569,7 +602,9 @@ theorem LinearIsometry.map_orthogonalProjection' {E E' : Type _} [NormedAddCommG
   rcases hy with ⟨x', hx', rfl : f x' = y⟩
   rw [← f.map_sub, f.inner_map_map, orthogonalProjection_inner_eq_zero x x' hx']
 #align linear_isometry.map_orthogonal_projection' LinearIsometry.map_orthogonalProjection'
+-/
 
+#print orthogonalProjection_map_apply /-
 /-- 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')
@@ -580,21 +615,27 @@ theorem orthogonalProjection_map_apply {E E' : Type _} [NormedAddCommGroup E]
   simpa only [f.coe_to_linear_isometry, f.apply_symm_apply] using
     (f.to_linear_isometry.map_orthogonal_projection p (f.symm x)).symm
 #align orthogonal_projection_map_apply orthogonalProjection_map_apply
+-/
 
+#print orthogonalProjection_bot /-
 /-- The orthogonal projection onto the trivial submodule is the zero map. -/
 @[simp]
 theorem orthogonalProjection_bot : orthogonalProjection (⊥ : Submodule 𝕜 E) = 0 := by ext
 #align orthogonal_projection_bot orthogonalProjection_bot
+-/
 
 variable (K)
 
+#print orthogonalProjection_norm_le /-
 /-- The orthogonal projection has norm `≤ 1`. -/
 theorem orthogonalProjection_norm_le : ‖orthogonalProjection K‖ ≤ 1 :=
   LinearMap.mkContinuous_norm_le _ (by norm_num) _
 #align orthogonal_projection_norm_le orthogonalProjection_norm_le
+-/
 
 variable (𝕜)
 
+#print smul_orthogonalProjection_singleton /-
 theorem smul_orthogonalProjection_singleton {v : E} (w : E) :
     (‖v‖ ^ 2 : 𝕜) • (orthogonalProjection (𝕜 ∙ v) w : E) = ⟪v, w⟫ • v :=
   by
@@ -608,7 +649,9 @@ theorem smul_orthogonalProjection_singleton {v : E} (w : E) :
     simp [inner_sub_left, inner_smul_left, inner_smul_right, map_div₀, mul_comm, hv,
       InnerProductSpace.conj_symm, hv]
 #align smul_orthogonal_projection_singleton smul_orthogonalProjection_singleton
+-/
 
+#print orthogonalProjection_singleton /-
 /-- Formula for orthogonal projection onto a single vector. -/
 theorem orthogonalProjection_singleton {v : E} (w : E) :
     (orthogonalProjection (𝕜 ∙ v) w : E) = (⟪v, w⟫ / ‖v‖ ^ 2) • v :=
@@ -624,12 +667,15 @@ theorem orthogonalProjection_singleton {v : E} (w : E) :
     by simp [mul_smul, smul_orthogonalProjection_singleton 𝕜 w]
   convert key <;> field_simp [hv']
 #align orthogonal_projection_singleton orthogonalProjection_singleton
+-/
 
+#print orthogonalProjection_unit_singleton /-
 /-- 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 := by
   rw [← smul_orthogonalProjection_singleton 𝕜 w]; simp [hv]
 #align orthogonal_projection_unit_singleton orthogonalProjection_unit_singleton
+-/
 
 end orthogonalProjection
 
@@ -683,24 +729,30 @@ theorem reflection_symm : (reflection K).symm = reflection K :=
 #align reflection_symm reflection_symm
 -/
 
+#print reflection_inv /-
 /-- Reflection is its own inverse. -/
 @[simp]
 theorem reflection_inv : (reflection K)⁻¹ = reflection K :=
   rfl
 #align reflection_inv reflection_inv
+-/
 
 variable (K)
 
+#print reflection_reflection /-
 /-- Reflecting twice in the same subspace. -/
 @[simp]
 theorem reflection_reflection (p : E) : reflection K (reflection K p) = p :=
   (reflection K).left_inv p
 #align reflection_reflection reflection_reflection
+-/
 
+#print reflection_involutive /-
 /-- Reflection is involutive. -/
 theorem reflection_involutive : Function.Involutive (reflection K) :=
   reflection_reflection K
 #align reflection_involutive reflection_involutive
+-/
 
 #print reflection_trans_reflection /-
 /-- Reflection is involutive. -/
@@ -711,14 +763,17 @@ theorem reflection_trans_reflection :
 #align reflection_trans_reflection reflection_trans_reflection
 -/
 
+#print reflection_mul_reflection /-
 /-- Reflection is involutive. -/
 @[simp]
 theorem reflection_mul_reflection : reflection K * reflection K = 1 :=
   reflection_trans_reflection _
 #align reflection_mul_reflection reflection_mul_reflection
+-/
 
 variable {K}
 
+#print reflection_eq_self_iff /-
 /-- 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 :=
   by
@@ -727,11 +782,15 @@ theorem reflection_eq_self_iff (x : E) : reflection K x = x ↔ x ∈ K :=
   refine' (smul_right_injective E _).eq_iff
   exact two_ne_zero
 #align reflection_eq_self_iff reflection_eq_self_iff
+-/
 
+#print reflection_mem_subspace_eq_self /-
 theorem reflection_mem_subspace_eq_self {x : E} (hx : x ∈ K) : reflection K x = x :=
   (reflection_eq_self_iff x).mpr hx
 #align reflection_mem_subspace_eq_self reflection_mem_subspace_eq_self
+-/
 
+#print reflection_map_apply /-
 /-- 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)
@@ -739,7 +798,9 @@ theorem reflection_map_apply {E E' : Type _} [NormedAddCommGroup E] [NormedAddCo
     reflection (K.map (f.toLinearEquiv : E →ₗ[𝕜] E')) x = f (reflection K (f.symm x)) := by
   simp [bit0, reflection_apply, orthogonalProjection_map_apply f K x]
 #align reflection_map_apply reflection_map_apply
+-/
 
+#print reflection_map /-
 /-- 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)
@@ -747,17 +808,21 @@ theorem reflection_map {E E' : Type _} [NormedAddCommGroup E] [NormedAddCommGrou
     reflection (K.map (f.toLinearEquiv : E →ₗ[𝕜] E')) = f.symm.trans ((reflection K).trans f) :=
   LinearIsometryEquiv.ext <| reflection_map_apply f K
 #align reflection_map reflection_map
+-/
 
+#print reflection_bot /-
 /-- Reflection through the trivial subspace {0} is just negation. -/
 @[simp]
 theorem reflection_bot : reflection (⊥ : Submodule 𝕜 E) = LinearIsometryEquiv.neg 𝕜 := by
   ext <;> simp [reflection_apply]
 #align reflection_bot reflection_bot
+-/
 
 end reflection
 
 section Orthogonal
 
+#print Submodule.sup_orthogonal_inf_of_completeSpace /-
 /-- 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₂)
     [CompleteSpace K₁] : K₁ ⊔ K₁ᗮ ⊓ K₂ = K₂ := by
@@ -770,18 +835,22 @@ theorem Submodule.sup_orthogonal_inf_of_completeSpace {K₁ K₂ : Submodule 
     exact K₂.add_mem (h hy) hz.2
   · exact fun hx => ⟨v, v.prop, x - v, ⟨hvm, K₂.sub_mem hx (h v.prop)⟩, add_sub_cancel'_right _ _⟩
 #align submodule.sup_orthogonal_inf_of_complete_space Submodule.sup_orthogonal_inf_of_completeSpace
+-/
 
 variable {K}
 
+#print Submodule.sup_orthogonal_of_completeSpace /-
 /-- If `K` is complete, `K` and `Kᗮ` span the whole space. -/
 theorem Submodule.sup_orthogonal_of_completeSpace [CompleteSpace K] : K ⊔ Kᗮ = ⊤ :=
   by
   convert Submodule.sup_orthogonal_inf_of_completeSpace (le_top : K ≤ ⊤)
   simp
 #align submodule.sup_orthogonal_of_complete_space Submodule.sup_orthogonal_of_completeSpace
+-/
 
 variable (K)
 
+#print Submodule.exists_sum_mem_mem_orthogonal /-
 /-- If `K` is complete, any `v` in `E` can be expressed as a sum of elements of `K` and `Kᗮ`. -/
 theorem Submodule.exists_sum_mem_mem_orthogonal [CompleteSpace K] (v : E) :
     ∃ y ∈ K, ∃ z ∈ Kᗮ, v = y + z :=
@@ -790,6 +859,7 @@ theorem Submodule.exists_sum_mem_mem_orthogonal [CompleteSpace K] (v : E) :
   obtain ⟨y, hy, z, hz, hyz⟩ := submodule.mem_sup.mp h_mem
   exact ⟨y, hy, z, hz, hyz.symm⟩
 #align submodule.exists_sum_mem_mem_orthogonal Submodule.exists_sum_mem_mem_orthogonal
+-/
 
 #print Submodule.orthogonal_orthogonal /-
 /-- If `K` is complete, then the orthogonal complement of its orthogonal complement is itself. -/
@@ -832,6 +902,7 @@ theorem Submodule.isCompl_orthogonal_of_completeSpace [CompleteSpace K] : IsComp
 #align submodule.is_compl_orthogonal_of_complete_space Submodule.isCompl_orthogonal_of_completeSpace
 -/
 
+#print Submodule.orthogonal_eq_bot_iff /-
 @[simp]
 theorem Submodule.orthogonal_eq_bot_iff [CompleteSpace (K : Set E)] : Kᗮ = ⊥ ↔ K = ⊤ :=
   by
@@ -840,34 +911,44 @@ theorem Submodule.orthogonal_eq_bot_iff [CompleteSpace (K : Set E)] : Kᗮ = ⊥
   have : K ⊔ Kᗮ = ⊤ := Submodule.sup_orthogonal_of_completeSpace
   rwa [h, sup_comm, bot_sup_eq] at this 
 #align submodule.orthogonal_eq_bot_iff Submodule.orthogonal_eq_bot_iff
+-/
 
+#print eq_orthogonalProjection_of_mem_orthogonal /-
 /-- 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 [CompleteSpace K] {u v : E} (hv : v ∈ K)
     (hvo : u - v ∈ Kᗮ) : (orthogonalProjection K u : E) = v :=
   eq_orthogonalProjectionFn_of_mem_of_inner_eq_zero hv fun w => inner_eq_zero_symm.mp ∘ hvo w
 #align eq_orthogonal_projection_of_mem_orthogonal eq_orthogonalProjection_of_mem_orthogonal
+-/
 
+#print eq_orthogonalProjection_of_mem_orthogonal' /-
 /-- 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' [CompleteSpace K] {u v z : E} (hv : v ∈ K)
     (hz : z ∈ Kᗮ) (hu : u = v + z) : (orthogonalProjection K u : E) = v :=
   eq_orthogonalProjection_of_mem_orthogonal hv (by simpa [hu])
 #align eq_orthogonal_projection_of_mem_orthogonal' eq_orthogonalProjection_of_mem_orthogonal'
+-/
 
+#print orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero /-
 /-- The orthogonal projection onto `K` of an element of `Kᗮ` is zero. -/
 theorem orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero [CompleteSpace K] {v : E}
     (hv : v ∈ Kᗮ) : orthogonalProjection K v = 0 := by ext;
   convert eq_orthogonalProjection_of_mem_orthogonal _ _ <;> simp [hv]
 #align orthogonal_projection_mem_subspace_orthogonal_complement_eq_zero orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero
+-/
 
+#print Submodule.IsOrtho.orthogonalProjection_comp_subtypeL /-
 /-- The projection into `U` from an orthogonal submodule `V` is the zero map. -/
 theorem Submodule.IsOrtho.orthogonalProjection_comp_subtypeL {U V : Submodule 𝕜 E} [CompleteSpace U]
     (h : U ⟂ V) : orthogonalProjection U ∘L V.subtypeL = 0 :=
   ContinuousLinearMap.ext fun v =>
     orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero <| h.symm v.Prop
 #align submodule.is_ortho.orthogonal_projection_comp_subtypeL Submodule.IsOrtho.orthogonalProjection_comp_subtypeL
+-/
 
+#print orthogonalProjection_comp_subtypeL_eq_zero_iff /-
 /-- 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} [CompleteSpace U] :
     orthogonalProjection U ∘L V.subtypeL = 0 ↔ U ⟂ V :=
@@ -876,7 +957,9 @@ theorem orthogonalProjection_comp_subtypeL_eq_zero_iff {U V : Submodule 𝕜 E}
     have : orthogonalProjection U v = 0 := FunLike.congr_fun h ⟨_, hv⟩
     rw [this, Submodule.coe_zero, sub_zero], Submodule.IsOrtho.orthogonalProjection_comp_subtypeL⟩
 #align orthogonal_projection_comp_subtypeL_eq_zero_iff orthogonalProjection_comp_subtypeL_eq_zero_iff
+-/
 
+#print orthogonalProjection_eq_linear_proj /-
 theorem orthogonalProjection_eq_linear_proj [CompleteSpace K] (x : E) :
     orthogonalProjection K x =
       K.linearProjOfIsCompl _ Submodule.isCompl_orthogonal_of_completeSpace x :=
@@ -886,6 +969,7 @@ theorem orthogonalProjection_eq_linear_proj [CompleteSpace K] (x : E) :
   rw [map_add, orthogonalProjection_mem_subspace_eq_self,
     orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero (Submodule.coe_mem _), add_zero]
 #align orthogonal_projection_eq_linear_proj orthogonalProjection_eq_linear_proj
+-/
 
 #print orthogonalProjection_coe_linearMap_eq_linearProj /-
 theorem orthogonalProjection_coe_linearMap_eq_linearProj [CompleteSpace K] :
@@ -895,18 +979,23 @@ theorem orthogonalProjection_coe_linearMap_eq_linearProj [CompleteSpace K] :
 #align orthogonal_projection_coe_linear_map_eq_linear_proj orthogonalProjection_coe_linearMap_eq_linearProj
 -/
 
+#print reflection_mem_subspace_orthogonalComplement_eq_neg /-
 /-- The reflection in `K` of an element of `Kᗮ` is its negation. -/
 theorem reflection_mem_subspace_orthogonalComplement_eq_neg [CompleteSpace K] {v : E}
     (hv : v ∈ Kᗮ) : reflection K v = -v := by
   simp [reflection_apply, orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero hv]
 #align reflection_mem_subspace_orthogonal_complement_eq_neg reflection_mem_subspace_orthogonalComplement_eq_neg
+-/
 
+#print orthogonalProjection_mem_subspace_orthogonal_precomplement_eq_zero /-
 /-- The orthogonal projection onto `Kᗮ` of an element of `K` is zero. -/
 theorem orthogonalProjection_mem_subspace_orthogonal_precomplement_eq_zero [CompleteSpace E] {v : E}
     (hv : v ∈ K) : orthogonalProjection Kᗮ v = 0 :=
   orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero (K.le_orthogonal_orthogonal hv)
 #align orthogonal_projection_mem_subspace_orthogonal_precomplement_eq_zero orthogonalProjection_mem_subspace_orthogonal_precomplement_eq_zero
+-/
 
+#print orthogonalProjection_orthogonalProjection_of_le /-
 /-- 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} [CompleteSpace U]
     [CompleteSpace V] (h : U ≤ V) (x : E) :
@@ -916,7 +1005,9 @@ theorem orthogonalProjection_orthogonalProjection_of_le {U V : Submodule 𝕜 E}
       orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero
         (Submodule.orthogonal_le h (sub_orthogonalProjection_mem_orthogonal x))
 #align orthogonal_projection_orthogonal_projection_of_le orthogonalProjection_orthogonalProjection_of_le
+-/
 
+#print orthogonalProjection_tendsto_closure_iSup /-
 /-- 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`. -/
@@ -948,7 +1039,9 @@ theorem orthogonalProjection_tendsto_closure_iSup [CompleteSpace E] {ι : Type _
   change _ ≤ ‖y - (⟨a, hU hi hI⟩ : U i)‖
   exact ciInf_le ⟨0, set.forall_range_iff.mpr fun _ => norm_nonneg _⟩ _
 #align orthogonal_projection_tendsto_closure_supr orthogonalProjection_tendsto_closure_iSup
+-/
 
+#print orthogonalProjection_tendsto_self /-
 /-- 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 ι]
@@ -962,6 +1055,7 @@ theorem orthogonalProjection_tendsto_self [CompleteSpace E] {ι : Type _} [Semil
   rw [hU']
   trivial
 #align orthogonal_projection_tendsto_self orthogonalProjection_tendsto_self
+-/
 
 #print Submodule.triorthogonal_eq_orthogonal /-
 /-- The orthogonal complement satisfies `Kᗮᗮᗮ = Kᗮ`. -/
@@ -990,16 +1084,20 @@ open Submodule
 
 variable {x y : E} [CompleteSpace E]
 
+#print Dense.eq_of_sub_mem_orthogonal /-
 /-- 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 :=
   by
   rw [dense_iff_topological_closure_eq_top, topological_closure_eq_top_iff] at hK 
   rwa [hK, Submodule.mem_bot, sub_eq_zero] at h 
 #align dense.eq_of_sub_mem_orthogonal Dense.eq_of_sub_mem_orthogonal
+-/
 
+#print Dense.eq_zero_of_mem_orthogonal /-
 theorem eq_zero_of_mem_orthogonal (hK : Dense (K : Set E)) (h : x ∈ Kᗮ) : x = 0 :=
   hK.eq_of_sub_mem_orthogonal (by rwa [sub_zero])
 #align dense.eq_zero_of_mem_orthogonal Dense.eq_zero_of_mem_orthogonal
+-/
 
 #print Dense.eq_of_inner_left /-
 theorem eq_of_inner_left (hK : Dense (K : Set E)) (h : ∀ v : K, ⟪x, v⟫ = ⟪y, v⟫) : x = y :=
@@ -1007,9 +1105,11 @@ theorem eq_of_inner_left (hK : Dense (K : Set E)) (h : ∀ v : K, ⟪x, v⟫ = 
 #align dense.eq_of_inner_left Dense.eq_of_inner_left
 -/
 
+#print Dense.eq_zero_of_inner_left /-
 theorem eq_zero_of_inner_left (hK : Dense (K : Set E)) (h : ∀ v : K, ⟪x, v⟫ = 0) : x = 0 :=
   hK.eq_of_inner_left fun v => by rw [inner_zero_left, h v]
 #align dense.eq_zero_of_inner_left Dense.eq_zero_of_inner_left
+-/
 
 #print Dense.eq_of_inner_right /-
 theorem eq_of_inner_right (hK : Dense (K : Set E)) (h : ∀ v : K, ⟪(v : E), x⟫ = ⟪(v : E), y⟫) :
@@ -1018,31 +1118,40 @@ theorem eq_of_inner_right (hK : Dense (K : Set E)) (h : ∀ v : K, ⟪(v : E), x
 #align dense.eq_of_inner_right Dense.eq_of_inner_right
 -/
 
+#print Dense.eq_zero_of_inner_right /-
 theorem eq_zero_of_inner_right (hK : Dense (K : Set E)) (h : ∀ v : K, ⟪(v : E), x⟫ = 0) : x = 0 :=
   hK.eq_of_inner_right fun v => by rw [inner_zero_right, h v]
 #align dense.eq_zero_of_inner_right Dense.eq_zero_of_inner_right
+-/
 
 end Dense
 
+#print reflection_mem_subspace_orthogonal_precomplement_eq_neg /-
 /-- The reflection in `Kᗮ` of an element of `K` is its negation. -/
 theorem reflection_mem_subspace_orthogonal_precomplement_eq_neg [CompleteSpace E] {v : E}
     (hv : v ∈ K) : reflection Kᗮ v = -v :=
   reflection_mem_subspace_orthogonalComplement_eq_neg (K.le_orthogonal_orthogonal hv)
 #align reflection_mem_subspace_orthogonal_precomplement_eq_neg reflection_mem_subspace_orthogonal_precomplement_eq_neg
+-/
 
+#print orthogonalProjection_orthogonalComplement_singleton_eq_zero /-
 /-- The orthogonal projection onto `(𝕜 ∙ v)ᗮ` of `v` is zero. -/
 theorem orthogonalProjection_orthogonalComplement_singleton_eq_zero [CompleteSpace E] (v : E) :
     orthogonalProjection (𝕜 ∙ v)ᗮ v = 0 :=
   orthogonalProjection_mem_subspace_orthogonal_precomplement_eq_zero
     (Submodule.mem_span_singleton_self v)
 #align orthogonal_projection_orthogonal_complement_singleton_eq_zero orthogonalProjection_orthogonalComplement_singleton_eq_zero
+-/
 
+#print reflection_orthogonalComplement_singleton_eq_neg /-
 /-- The reflection in `(𝕜 ∙ v)ᗮ` of `v` is `-v`. -/
 theorem reflection_orthogonalComplement_singleton_eq_neg [CompleteSpace E] (v : E) :
     reflection (𝕜 ∙ v)ᗮ v = -v :=
   reflection_mem_subspace_orthogonal_precomplement_eq_neg (Submodule.mem_span_singleton_self v)
 #align reflection_orthogonal_complement_singleton_eq_neg reflection_orthogonalComplement_singleton_eq_neg
+-/
 
+#print reflection_sub /-
 theorem reflection_sub [CompleteSpace F] {v w : F} (h : ‖v‖ = ‖w‖) :
     reflection (ℝ ∙ v - w)ᗮ v = w :=
   by
@@ -1062,9 +1171,11 @@ theorem reflection_sub [CompleteSpace F] {v w : F} (h : ‖v‖ = ‖w‖) :
   · simp
   · abel
 #align reflection_sub reflection_sub
+-/
 
 variable (K)
 
+#print eq_sum_orthogonalProjection_self_orthogonalComplement /-
 /-- 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`.-/
 theorem eq_sum_orthogonalProjection_self_orthogonalComplement [CompleteSpace E] [CompleteSpace K]
@@ -1077,7 +1188,9 @@ theorem eq_sum_orthogonalProjection_self_orthogonalComplement [CompleteSpace E]
     refine' eq_orthogonalProjection_of_mem_orthogonal' hz _ hwyz
     simp [hy]
 #align eq_sum_orthogonal_projection_self_orthogonal_complement eq_sum_orthogonalProjection_self_orthogonalComplement
+-/
 
+#print norm_sq_eq_add_norm_sq_projection /-
 /-- The Pythagorean theorem, for an orthogonal projection.-/
 theorem norm_sq_eq_add_norm_sq_projection (x : E) (S : Submodule 𝕜 E) [CompleteSpace E]
     [CompleteSpace S] :
@@ -1093,6 +1206,7 @@ theorem norm_sq_eq_add_norm_sq_projection (x : E) (S : Submodule 𝕜 E) [Comple
     add_left_inj, mul_eq_mul_left_iff, norm_eq_zero, true_or_iff, eq_self_iff_true,
     Submodule.coe_norm, Submodule.coe_eq_zero]
 #align norm_sq_eq_add_norm_sq_projection norm_sq_eq_add_norm_sq_projection
+-/
 
 #print id_eq_sum_orthogonalProjection_self_orthogonalComplement /-
 /-- In a complete space `E`, the projection maps onto a complete subspace `K` and its orthogonal
@@ -1105,6 +1219,7 @@ theorem id_eq_sum_orthogonalProjection_self_orthogonalComplement [CompleteSpace
 #align id_eq_sum_orthogonal_projection_self_orthogonal_complement id_eq_sum_orthogonalProjection_self_orthogonalComplement
 -/
 
+#print inner_orthogonalProjection_eq_of_mem_right /-
 @[simp]
 theorem inner_orthogonalProjection_eq_of_mem_right [CompleteSpace K] (u : K) (v : E) :
     ⟪orthogonalProjection K v, u⟫ = ⟪v, u⟫ :=
@@ -1114,18 +1229,23 @@ theorem inner_orthogonalProjection_eq_of_mem_right [CompleteSpace K] (u : K) (v
       rw [orthogonalProjection_inner_eq_zero _ _ (Submodule.coe_mem _), add_zero]
     _ = ⟪v, u⟫ := by rw [← inner_add_left, add_sub_cancel'_right]
 #align inner_orthogonal_projection_eq_of_mem_right inner_orthogonalProjection_eq_of_mem_right
+-/
 
+#print inner_orthogonalProjection_eq_of_mem_left /-
 @[simp]
 theorem inner_orthogonalProjection_eq_of_mem_left [CompleteSpace K] (u : K) (v : E) :
     ⟪u, orthogonalProjection K v⟫ = ⟪(u : E), v⟫ := by
   rw [← inner_conj_symm, ← inner_conj_symm (u : E), inner_orthogonalProjection_eq_of_mem_right]
 #align inner_orthogonal_projection_eq_of_mem_left inner_orthogonalProjection_eq_of_mem_left
+-/
 
+#print inner_orthogonalProjection_left_eq_right /-
 /-- The orthogonal projection is self-adjoint. -/
 theorem inner_orthogonalProjection_left_eq_right [CompleteSpace K] (u v : E) :
     ⟪↑(orthogonalProjection K u), v⟫ = ⟪u, orthogonalProjection K v⟫ := by
   rw [← inner_orthogonalProjection_eq_of_mem_left, inner_orthogonalProjection_eq_of_mem_right]
 #align inner_orthogonal_projection_left_eq_right inner_orthogonalProjection_left_eq_right
+-/
 
 #print orthogonalProjection_isSymmetric /-
 /-- The orthogonal projection is symmetric. -/
@@ -1137,6 +1257,7 @@ theorem orthogonalProjection_isSymmetric [CompleteSpace K] :
 
 open FiniteDimensional
 
+#print Submodule.finrank_add_inf_finrank_orthogonal /-
 /-- 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₂`. -/
@@ -1152,7 +1273,9 @@ theorem Submodule.finrank_add_inf_finrank_orthogonal {K₁ K₂ : Submodule 𝕜
   rw [add_zero] at hd 
   exact hd.symm
 #align submodule.finrank_add_inf_finrank_orthogonal Submodule.finrank_add_inf_finrank_orthogonal
+-/
 
+#print Submodule.finrank_add_inf_finrank_orthogonal' /-
 /-- 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₂`. -/
@@ -1163,7 +1286,9 @@ theorem Submodule.finrank_add_inf_finrank_orthogonal' {K₁ K₂ : Submodule 
   rw [← add_right_inj (finrank 𝕜 K₁)]
   simp [Submodule.finrank_add_inf_finrank_orthogonal h, h_dim]
 #align submodule.finrank_add_inf_finrank_orthogonal' Submodule.finrank_add_inf_finrank_orthogonal'
+-/
 
+#print Submodule.finrank_add_finrank_orthogonal /-
 /-- 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) :
@@ -1173,16 +1298,20 @@ theorem Submodule.finrank_add_finrank_orthogonal [FiniteDimensional 𝕜 E] (K :
   · rw [inf_top_eq]
   · simp
 #align submodule.finrank_add_finrank_orthogonal Submodule.finrank_add_finrank_orthogonal
+-/
 
+#print Submodule.finrank_add_finrank_orthogonal' /-
 /-- 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 := by
   rw [← add_right_inj (finrank 𝕜 K)]; simp [Submodule.finrank_add_finrank_orthogonal, h_dim]
 #align submodule.finrank_add_finrank_orthogonal' Submodule.finrank_add_finrank_orthogonal'
+-/
 
 attribute [local instance] fact_finite_dimensional_of_finrank_eq_succ
 
+#print finrank_orthogonal_span_singleton /-
 /-- 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}
@@ -1190,8 +1319,10 @@ theorem finrank_orthogonal_span_singleton {n : ℕ} [_i : Fact (finrank 𝕜 E =
   Submodule.finrank_add_finrank_orthogonal' <| by
     simp [finrank_span_singleton hv, _i.elim, add_comm]
 #align finrank_orthogonal_span_singleton finrank_orthogonal_span_singleton
+-/
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print LinearIsometryEquiv.reflections_generate_dim_aux /-
 /-- 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 `φ`. -/
@@ -1269,7 +1400,9 @@ theorem LinearIsometryEquiv.reflections_generate_dim_aux [FiniteDimensional ℝ
     have := congr_arg ((· * ·) ρ) hφl
     rwa [← mul_assoc, reflection_mul_reflection, one_mul] at this 
 #align linear_isometry_equiv.reflections_generate_dim_aux LinearIsometryEquiv.reflections_generate_dim_aux
+-/
 
+#print LinearIsometryEquiv.reflections_generate_dim /-
 /-- 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`.
 
@@ -1279,7 +1412,9 @@ theorem LinearIsometryEquiv.reflections_generate_dim [FiniteDimensional ℝ F] (
   let ⟨l, hl₁, hl₂⟩ := φ.reflections_generate_dim_aux le_rfl
   ⟨l, hl₁.trans (Submodule.finrank_le _), hl₂⟩
 #align linear_isometry_equiv.reflections_generate_dim LinearIsometryEquiv.reflections_generate_dim
+-/
 
+#print LinearIsometryEquiv.reflections_generate /-
 /-- The orthogonal group of `F` is generated by reflections. -/
 theorem LinearIsometryEquiv.reflections_generate [FiniteDimensional ℝ F] :
     Subgroup.closure (Set.range fun v : F => reflection (ℝ ∙ v)ᗮ) = ⊤ :=
@@ -1292,6 +1427,7 @@ theorem LinearIsometryEquiv.reflections_generate [FiniteDimensional ℝ F] :
   rcases list.mem_map.mp hx with ⟨a, _, hax⟩
   exact Subgroup.subset_closure ⟨a, hax⟩
 #align linear_isometry_equiv.reflections_generate LinearIsometryEquiv.reflections_generate
+-/
 
 end Orthogonal
 
@@ -1299,6 +1435,7 @@ section OrthogonalFamily
 
 variable {ι : Type _}
 
+#print OrthogonalFamily.isInternal_iff_of_isComplete /-
 /-- 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. -/
@@ -1310,7 +1447,9 @@ theorem OrthogonalFamily.isInternal_iff_of_isComplete [DecidableEq ι] {V : ι 
   simp only [DirectSum.isInternal_submodule_iff_independent_and_iSup_eq_top, hV.independent,
     true_and_iff, Submodule.orthogonal_eq_bot_iff]
 #align orthogonal_family.is_internal_iff_of_is_complete OrthogonalFamily.isInternal_iff_of_isComplete
+-/
 
+#print OrthogonalFamily.isInternal_iff /-
 /-- 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. -/
@@ -1320,6 +1459,7 @@ theorem OrthogonalFamily.isInternal_iff [DecidableEq ι] [FiniteDimensional 𝕜
   haveI h := FiniteDimensional.proper_isROrC 𝕜 ↥(iSup V)
   hV.is_internal_iff_of_is_complete (complete_space_coe_iff_is_complete.mp inferInstance)
 #align orthogonal_family.is_internal_iff OrthogonalFamily.isInternal_iff
+-/
 
 open scoped DirectSum
 
@@ -1392,6 +1532,7 @@ variable {𝕜 E} {v : Set E}
 open FiniteDimensional Submodule Set
 
 /- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (u «expr ⊇ » v) -/
+#print maximal_orthonormal_iff_orthogonalComplement_eq_bot /-
 /-- 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_orthogonalComplement_eq_bot (hv : Orthonormal 𝕜 (coe : v → E)) :
@@ -1457,10 +1598,12 @@ theorem maximal_orthonormal_iff_orthogonalComplement_eq_bot (hv : Orthonormal 
       simp [huv, inter_eq_self_of_subset_left, hy]
     exact hu.inner_finsupp_eq_zero hxv' hl
 #align maximal_orthonormal_iff_orthogonal_complement_eq_bot maximal_orthonormal_iff_orthogonalComplement_eq_bot
+-/
 
 variable [FiniteDimensional 𝕜 E]
 
 /- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (u «expr ⊇ » v) -/
+#print maximal_orthonormal_iff_basis_of_finiteDimensional /-
 /-- An orthonormal set in a finite-dimensional `inner_product_space` is maximal, if and only if it
 is a basis. -/
 theorem maximal_orthonormal_iff_basis_of_finiteDimensional (hv : Orthonormal 𝕜 (coe : v → E)) :
@@ -1477,6 +1620,7 @@ theorem maximal_orthonormal_iff_basis_of_finiteDimensional (hv : Orthonormal 
   · rintro ⟨h, coe_h⟩
     rw [← h.span_eq, coe_h, hv_coe]
 #align maximal_orthonormal_iff_basis_of_finite_dimensional maximal_orthonormal_iff_basis_of_finiteDimensional
+-/
 
 end OrthonormalBasis
 
Diff
@@ -1326,7 +1326,7 @@ open scoped DirectSum
 /-- 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 :=
+    (x : E) (hx : x ∈ iSup V) : ∑ i, (orthogonalProjection (V i) x : E) = x :=
   by
   refine' Submodule.iSup_induction _ hx (fun i x hx => _) _ fun x y hx hy => _
   · refine'
Diff
@@ -144,7 +144,6 @@ theorem exists_norm_eq_iInf_of_complete_convex {K : Set F} (ne : K.Nonempty) (h
           have eq₂ : u + u - (wq + wp) = a + b; show u + u - (wq + wp) = u - wq + (u - wp); abel
           rw [eq₁, eq₂]
         _ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖) := parallelogram_law_with_norm ℝ _ _
-        
     have eq : δ ≤ ‖u - half • (wq + wp)‖ := by
       rw [smul_add]
       apply δ_le'; apply h₂
@@ -172,7 +171,6 @@ theorem exists_norm_eq_iInf_of_complete_convex {K : Set F} (ne : K.Nonempty) (h
       _ ≤ 2 * ((δ + div) * (δ + div) + (δ + div) * (δ + div)) - 4 * δ * δ :=
         (sub_le_sub_right (mul_le_mul_of_nonneg_left (add_le_add eq₂ eq₂') (by norm_num)) _)
       _ = 8 * δ * div + 4 * div * div := by ring
-      
     exact
       add_nonneg (mul_nonneg (mul_nonneg (by norm_num) zero_le_δ) (le_of_lt Nat.one_div_pos_of_nat))
         (mul_nonneg (mul_nonneg (by norm_num) nat.one_div_pos_of_nat.le) nat.one_div_pos_of_nat.le)
@@ -245,7 +243,6 @@ theorem norm_eq_iInf_iff_real_inner_le_zero {K : Set F} (h : Convex ℝ K) {u :
                   absR θ * ‖w - v‖ * (absR θ * ‖w - v‖) =
                 ‖u - v‖ * ‖u - v‖ - 2 * θ * inner (u - v) (w - v) + θ * θ * (‖w - v‖ * ‖w - v‖)
             rw [abs_of_pos hθ₁]; ring
-          
       have eq₁ :
         ‖u - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v) + θ * θ * ‖w - v‖ ^ 2 =
           ‖u - v‖ ^ 2 + (θ * θ * ‖w - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v)) :=
@@ -272,13 +269,11 @@ theorem norm_eq_iInf_iff_real_inner_le_zero {K : Set F} (h : Convex ℝ K) {u :
           calc
             θ * q ≤ p / q * q := mul_le_mul_of_nonneg_right (min_le_right _ _) (sq_nonneg _)
             _ = p := div_mul_cancel _ hq
-            
         have : 2 * p ≤ p :=
           calc
             2 * p ≤ θ * q := by
               refine' this θ (lt_min (by norm_num) (div_pos hp q_pos)) (by norm_num)
             _ ≤ p := eq₁
-            
         linarith)
     (by
       intro h
@@ -293,7 +288,6 @@ theorem norm_eq_iInf_iff_real_inner_le_zero {K : Set F} (h : Convex ℝ K) {u :
             refine' le_add_of_nonneg_right _; exact sq_nonneg _
           _ = ‖u - v - (w - v)‖ ^ 2 := (@norm_sub_sq ℝ _ _ _ _ _ _).symm
           _ = ‖u - w‖ * ‖u - w‖ := by have : u - v - (w - v) = u - w; abel; rw [this, sq]
-          
       · show (⨅ w : K, ‖u - w‖) ≤ (fun w : K => ‖u - w‖) ⟨v, hv⟩
         apply ciInf_le; use 0; rintro y ⟨z, rfl⟩; exact norm_nonneg _)
 #align norm_eq_infi_iff_real_inner_le_zero norm_eq_iInf_iff_real_inner_le_zero
@@ -378,7 +372,6 @@ theorem norm_eq_iInf_iff_inner_eq_zero {u : E} {v : E} (hv : v ∈ K) :
         _ = re ⟪u - v, -I • w⟫ := (A _ (K.smul_mem (-I) hw)).symm
         _ = re (-I * ⟪u - v, w⟫) := by rw [inner_smul_right]
         _ = im ⟪u - v, w⟫ := by simp
-        
   · intro H
     have : ∀ w ∈ K', ⟪u - v, w⟫_ℝ = 0 := by
       intro w hw
@@ -1120,7 +1113,6 @@ theorem inner_orthogonalProjection_eq_of_mem_right [CompleteSpace K] (u : K) (v
     _ = ⟪(orthogonalProjection K v : E), u⟫ + ⟪v - orthogonalProjection K v, u⟫ := by
       rw [orthogonalProjection_inner_eq_zero _ _ (Submodule.coe_mem _), add_zero]
     _ = ⟪v, u⟫ := by rw [← inner_add_left, add_sub_cancel'_right]
-    
 #align inner_orthogonal_projection_eq_of_mem_right inner_orthogonalProjection_eq_of_mem_right
 
 @[simp]
Diff
@@ -1399,7 +1399,7 @@ variable {𝕜 E} {v : Set E}
 
 open FiniteDimensional Submodule Set
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (u «expr ⊇ » v) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (u «expr ⊇ » 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_orthogonalComplement_eq_bot (hv : Orthonormal 𝕜 (coe : v → E)) :
@@ -1468,7 +1468,7 @@ theorem maximal_orthonormal_iff_orthogonalComplement_eq_bot (hv : Orthonormal 
 
 variable [FiniteDimensional 𝕜 E]
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (u «expr ⊇ » v) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (u «expr ⊇ » v) -/
 /-- An orthonormal set in a finite-dimensional `inner_product_space` is maximal, if and only if it
 is a basis. -/
 theorem maximal_orthonormal_iff_basis_of_finiteDimensional (hv : Orthonormal 𝕜 (coe : v → E)) :
Diff
@@ -181,11 +181,11 @@ theorem exists_norm_eq_iInf_of_complete_convex {K : Set F} (ne : K.Nonempty) (h
     · convert continuous_sqrt.continuous_at; exact sqrt_zero.symm
     have eq₁ : tendsto (fun n : ℕ => 8 * δ * (1 / (n + 1))) at_top (nhds (0 : ℝ)) :=
       by
-      convert(@tendsto_const_nhds _ _ _ (8 * δ) _).mul tendsto_one_div_add_atTop_nhds_0_nat
+      convert (@tendsto_const_nhds _ _ _ (8 * δ) _).mul tendsto_one_div_add_atTop_nhds_0_nat
       simp only [MulZeroClass.mul_zero]
     have : tendsto (fun n : ℕ => (4 : ℝ) * (1 / (n + 1))) at_top (nhds (0 : ℝ)) :=
       by
-      convert(@tendsto_const_nhds _ _ _ (4 : ℝ) _).mul tendsto_one_div_add_atTop_nhds_0_nat
+      convert (@tendsto_const_nhds _ _ _ (4 : ℝ) _).mul tendsto_one_div_add_atTop_nhds_0_nat
       simp only [MulZeroClass.mul_zero]
     have eq₂ :
       tendsto (fun n : ℕ => (4 : ℝ) * (1 / (n + 1)) * (1 / (n + 1))) at_top (nhds (0 : ℝ)) :=
Diff
@@ -215,7 +215,7 @@ theorem norm_eq_iInf_iff_real_inner_le_zero {K : Set F} (h : Convex ℝ K) {u :
       let δ := ⨅ w : K, ‖u - w‖; let p := ⟪u - v, w - v⟫_ℝ; let q := ‖w - v‖ ^ 2
       letI : Nonempty K := ⟨⟨v, hv⟩⟩
       have zero_le_δ : 0 ≤ δ
-      apply le_ciInf; intro ; exact norm_nonneg _
+      apply le_ciInf; intro; exact norm_nonneg _
       have δ_le : ∀ w : K, δ ≤ ‖u - w‖
       intro w; apply ciInf_le; use (0 : ℝ); rintro _ ⟨_, rfl⟩; exact norm_nonneg _
       have δ_le' : ∀ w ∈ K, δ ≤ ‖u - w‖ := fun w hw => δ_le ⟨w, hw⟩
@@ -228,7 +228,7 @@ theorem norm_eq_iInf_iff_real_inner_le_zero {K : Set F} (h : Convex ℝ K) {u :
             simp only [sq]; apply mul_self_le_mul_self (norm_nonneg _)
             rw [Eq]; apply δ_le'
             apply h hw hv
-            exacts[le_of_lt hθ₁, sub_nonneg.2 hθ₂, add_sub_cancel'_right _ _]
+            exacts [le_of_lt hθ₁, sub_nonneg.2 hθ₂, add_sub_cancel'_right _ _]
           _ = ‖u - v - θ • (w - v)‖ ^ 2 :=
             by
             have : u - (θ • w + (1 - θ) • v) = u - v - θ • (w - v) :=
@@ -250,23 +250,23 @@ theorem norm_eq_iInf_iff_real_inner_le_zero {K : Set F} (h : Convex ℝ K) {u :
         ‖u - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v) + θ * θ * ‖w - v‖ ^ 2 =
           ‖u - v‖ ^ 2 + (θ * θ * ‖w - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v)) :=
         by abel
-      rw [eq₁, le_add_iff_nonneg_right] at this
+      rw [eq₁, le_add_iff_nonneg_right] at this 
       have eq₂ :
         θ * θ * ‖w - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v) =
           θ * (θ * ‖w - v‖ ^ 2 - 2 * inner (u - v) (w - v));
       ring
-      rw [eq₂] at this
+      rw [eq₂] at this 
       have := le_of_sub_nonneg (nonneg_of_mul_nonneg_right this hθ₁)
       exact this
       by_cases hq : q = 0
-      · rw [hq] at this
+      · rw [hq] at this 
         have : p ≤ 0
         have := this (1 : ℝ) (by norm_num) (by norm_num)
         linarith
         exact this
       · have q_pos : 0 < q
         apply lt_of_le_of_ne; exact sq_nonneg _; intro h; exact hq h.symm
-        by_contra hp; rw [not_le] at hp
+        by_contra hp; rw [not_le] at hp 
         let θ := min (1 : ℝ) (p / q)
         have eq₁ : θ * q ≤ p :=
           calc
@@ -326,21 +326,21 @@ theorem norm_eq_iInf_iff_real_inner_eq_zero (K : Submodule ℝ F) {u : F} {v : F
   Iff.intro
     (by
       intro h
-      have h : ∀ w ∈ K, ⟪u - v, w - v⟫_ℝ ≤ 0 := by rwa [norm_eq_iInf_iff_real_inner_le_zero] at h;
-        exacts[K.convex, hv]
+      have h : ∀ w ∈ K, ⟪u - v, w - v⟫_ℝ ≤ 0 := by rwa [norm_eq_iInf_iff_real_inner_le_zero] at h ;
+        exacts [K.convex, hv]
       intro w hw
       have le : ⟪u - v, w⟫_ℝ ≤ 0
       let w' := w + v
       have : w' ∈ K := Submodule.add_mem _ hw hv
       have h₁ := h w' this
       have h₂ : w' - v = w; simp only [add_neg_cancel_right, sub_eq_add_neg]
-      rw [h₂] at h₁; exact h₁
+      rw [h₂] at h₁ ; exact h₁
       have ge : ⟪u - v, w⟫_ℝ ≥ 0
       let w'' := -w + v
       have : w'' ∈ K := Submodule.add_mem _ (Submodule.neg_mem _ hw) hv
       have h₁ := h w'' this
       have h₂ : w'' - v = -w; simp only [neg_inj, add_neg_cancel_right, sub_eq_add_neg]
-      rw [h₂, inner_neg_right] at h₁
+      rw [h₂, inner_neg_right] at h₁ 
       linarith
       exact le_antisymm le GE.ge)
     (by
@@ -352,7 +352,7 @@ theorem norm_eq_iInf_iff_real_inner_eq_zero (K : Submodule ℝ F) {u : F} {v : F
       have h₁ := h w' this
       exact le_of_eq h₁
       rwa [norm_eq_iInf_iff_real_inner_le_zero]
-      exacts[Submodule.convex _, hv])
+      exacts [Submodule.convex _, hv])
 #align norm_eq_infi_iff_real_inner_eq_zero norm_eq_iInf_iff_real_inner_eq_zero
 
 /-- Characterization of minimizers in the projection on a subspace.
@@ -440,7 +440,7 @@ theorem eq_orthogonalProjectionFn_of_mem_of_inner_eq_zero {u v : E} (hvm : v ∈
   have huv : ⟪u - v, orthogonalProjectionFn K u - v⟫ = 0 := hvo _ hvs
   have houv : ⟪u - v - (u - orthogonalProjectionFn K u), orthogonalProjectionFn K u - v⟫ = 0 := by
     rw [inner_sub_left, huo, huv, sub_zero]
-  rwa [sub_sub_sub_cancel_left] at houv
+  rwa [sub_sub_sub_cancel_left] at houv 
 #align eq_orthogonal_projection_fn_of_mem_of_inner_eq_zero eq_orthogonalProjectionFn_of_mem_of_inner_eq_zero
 
 variable (K)
@@ -845,7 +845,7 @@ theorem Submodule.orthogonal_eq_bot_iff [CompleteSpace (K : Set E)] : Kᗮ = ⊥
   refine' ⟨_, fun h => by rw [h, Submodule.top_orthogonal_eq_bot]⟩
   intro h
   have : K ⊔ Kᗮ = ⊤ := Submodule.sup_orthogonal_of_completeSpace
-  rwa [h, sup_comm, bot_sup_eq] at this
+  rwa [h, sup_comm, bot_sup_eq] at this 
 #align submodule.orthogonal_eq_bot_iff Submodule.orthogonal_eq_bot_iff
 
 /-- A point in `K` with the orthogonality property (here characterized in terms of `Kᗮ`) must be the
@@ -859,7 +859,7 @@ theorem eq_orthogonalProjection_of_mem_orthogonal [CompleteSpace K] {u v : E} (h
 orthogonal projection. -/
 theorem eq_orthogonalProjection_of_mem_orthogonal' [CompleteSpace K] {u v z : E} (hv : v ∈ K)
     (hz : z ∈ Kᗮ) (hu : u = v + z) : (orthogonalProjection K u : E) = v :=
-  eq_orthogonalProjection_of_mem_orthogonal hv (by simpa [hu] )
+  eq_orthogonalProjection_of_mem_orthogonal hv (by simpa [hu])
 #align eq_orthogonal_projection_of_mem_orthogonal' eq_orthogonalProjection_of_mem_orthogonal'
 
 /-- The orthogonal projection onto `K` of an element of `Kᗮ` is zero. -/
@@ -945,10 +945,10 @@ theorem orthogonalProjection_tendsto_closure_iSup [CompleteSpace E] {ι : Type _
   obtain ⟨a, ha, hay⟩ : ∃ a ∈ ⨆ i, U i, dist y a < ε :=
     by
     have y_mem : y ∈ (⨆ i, U i).topologicalClosure := Submodule.coe_mem _
-    rw [← SetLike.mem_coe, Submodule.topologicalClosure_coe, Metric.mem_closure_iff] at y_mem
+    rw [← SetLike.mem_coe, Submodule.topologicalClosure_coe, Metric.mem_closure_iff] at y_mem 
     exact y_mem ε hε
-  rw [dist_eq_norm] at hay
-  obtain ⟨I, hI⟩ : ∃ I, a ∈ U I := by rwa [Submodule.mem_iSup_of_directed _ hU.directed_le] at ha
+  rw [dist_eq_norm] at hay 
+  obtain ⟨I, hI⟩ : ∃ I, a ∈ U I := by rwa [Submodule.mem_iSup_of_directed _ hU.directed_le] at ha 
   refine' ⟨I, fun i (hi : I ≤ i) => _⟩
   rw [norm_sub_rev, orthogonalProjection_minimal]
   refine' lt_of_le_of_lt _ hay
@@ -963,7 +963,7 @@ theorem orthogonalProjection_tendsto_self [CompleteSpace E] {ι : Type _} [Semil
     (hU' : ⊤ ≤ (⨆ t, U t).topologicalClosure) :
     Filter.Tendsto (fun t => (orthogonalProjection (U t) x : E)) atTop (𝓝 x) :=
   by
-  rw [← eq_top_iff] at hU'
+  rw [← eq_top_iff] at hU' 
   convert orthogonalProjection_tendsto_closure_iSup U hU x
   rw [orthogonal_projection_eq_self_iff.mpr _]
   rw [hU']
@@ -1000,8 +1000,8 @@ variable {x y : E} [CompleteSpace E]
 /-- 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 :=
   by
-  rw [dense_iff_topological_closure_eq_top, topological_closure_eq_top_iff] at hK
-  rwa [hK, Submodule.mem_bot, sub_eq_zero] at h
+  rw [dense_iff_topological_closure_eq_top, topological_closure_eq_top_iff] at hK 
+  rwa [hK, Submodule.mem_bot, sub_eq_zero] at h 
 #align dense.eq_of_sub_mem_orthogonal Dense.eq_of_sub_mem_orthogonal
 
 theorem eq_zero_of_mem_orthogonal (hK : Dense (K : Set E)) (h : x ∈ Kᗮ) : x = 0 :=
@@ -1080,7 +1080,7 @@ theorem eq_sum_orthogonalProjection_self_orthogonalComplement [CompleteSpace E]
   obtain ⟨y, hy, z, hz, hwyz⟩ := K.exists_sum_mem_mem_orthogonal w
   convert hwyz
   · exact eq_orthogonalProjection_of_mem_orthogonal' hy hz hwyz
-  · rw [add_comm] at hwyz
+  · rw [add_comm] at hwyz 
     refine' eq_orthogonalProjection_of_mem_orthogonal' hz _ hwyz
     simp [hy]
 #align eq_sum_orthogonal_projection_self_orthogonal_complement eq_sum_orthogonalProjection_self_orthogonalComplement
@@ -1156,8 +1156,8 @@ theorem Submodule.finrank_add_inf_finrank_orthogonal {K₁ K₂ : Submodule 𝕜
   haveI := proper_is_R_or_C 𝕜 K₁
   have hd := Submodule.finrank_sup_add_finrank_inf_eq K₁ (K₁ᗮ ⊓ K₂)
   rw [← inf_assoc, (Submodule.orthogonal_disjoint K₁).eq_bot, bot_inf_eq, finrank_bot,
-    Submodule.sup_orthogonal_inf_of_completeSpace h] at hd
-  rw [add_zero] at hd
+    Submodule.sup_orthogonal_inf_of_completeSpace h] at hd 
+  rw [add_zero] at hd 
   exact hd.symm
 #align submodule.finrank_add_inf_finrank_orthogonal Submodule.finrank_add_inf_finrank_orthogonal
 
@@ -1213,7 +1213,7 @@ theorem LinearIsometryEquiv.reflections_generate_dim_aux [FiniteDimensional ℝ
   · -- Base case: `n = 0`, the fixed subspace is the whole space, so `φ = id`
     refine' ⟨[], rfl.le, show φ = 1 from _⟩
     have : ker (ContinuousLinearMap.id ℝ F - φ) = ⊤ := by
-      rwa [le_zero_iff, finrank_eq_zero, Submodule.orthogonal_eq_bot_iff] at hn
+      rwa [le_zero_iff, finrank_eq_zero, Submodule.orthogonal_eq_bot_iff] at hn 
     symm
     ext x
     have := LinearMap.congr_fun (linear_map.ker_eq_top.mp this) x
@@ -1262,7 +1262,7 @@ theorem LinearIsometryEquiv.reflections_generate_dim_aux [FiniteDimensional ℝ
     -- By dimension-counting, the complement of the fixed subspace of `φ.trans ρ` has dimension at
     -- most `n`
     have : finrank ℝ Vᗮ ≤ n := by
-      change finrank ℝ Wᗮ ≤ n + 1 at hn
+      change finrank ℝ Wᗮ ≤ n + 1 at hn 
       have : finrank ℝ W + 1 ≤ finrank ℝ V :=
         Submodule.finrank_lt_finrank_of_lt (SetLike.lt_iff_le_and_exists.2 ⟨H₂V, v, H₁V, hv'⟩)
       have : finrank ℝ V + finrank ℝ Vᗮ = finrank ℝ F := V.finrank_add_finrank_orthogonal
@@ -1275,7 +1275,7 @@ theorem LinearIsometryEquiv.reflections_generate_dim_aux [FiniteDimensional ℝ
     refine' ⟨x::l, Nat.succ_le_succ hl, _⟩
     rw [List.map_cons, List.prod_cons]
     have := congr_arg ((· * ·) ρ) hφl
-    rwa [← mul_assoc, reflection_mul_reflection, one_mul] at this
+    rwa [← mul_assoc, reflection_mul_reflection, one_mul] at this 
 #align linear_isometry_equiv.reflections_generate_dim_aux LinearIsometryEquiv.reflections_generate_dim_aux
 
 /-- The orthogonal group of `F` is generated by reflections; specifically each element `φ` of the
Diff
@@ -667,8 +667,8 @@ def reflection : E ≃ₗᵢ[𝕜] E :=
       convert norm_sub_eq_norm_add this using 2
       · rw [LinearEquiv.coe_mk, reflectionLinearEquiv, LinearEquiv.toFun_eq_coe,
           LinearEquiv.coe_ofInvolutive, LinearMap.sub_apply, LinearMap.id_apply, bit0,
-          LinearMap.add_apply, LinearMap.comp_apply, Submodule.subtype_apply, [anonymous],
-          ContinuousLinearMap.coe_coe]
+          LinearMap.add_apply, LinearMap.comp_apply, Submodule.subtype_apply,
+          ContinuousLinearMap.toLinearMap_eq_coe, ContinuousLinearMap.coe_coe]
         dsimp [w, v]
         abel
       · simp only [add_sub_cancel'_right, eq_self_iff_true] }
@@ -1217,8 +1217,8 @@ theorem LinearIsometryEquiv.reflections_generate_dim_aux [FiniteDimensional ℝ
     symm
     ext x
     have := LinearMap.congr_fun (linear_map.ker_eq_top.mp this) x
-    simpa only [sub_eq_zero, [anonymous], ContinuousLinearMap.coe_sub, LinearMap.sub_apply,
-      LinearMap.zero_apply] using this
+    simpa only [sub_eq_zero, ContinuousLinearMap.toLinearMap_eq_coe, ContinuousLinearMap.coe_sub,
+      LinearMap.sub_apply, LinearMap.zero_apply] using this
   · -- Inductive step.  Let `W` be the fixed subspace of `φ`.  We suppose its complement to have
     -- dimension at most n + 1.
     let W := ker (ContinuousLinearMap.id ℝ F - φ)
Diff
@@ -54,7 +54,7 @@ open IsROrC Real Filter
 
 open LinearMap (ker range)
 
-open BigOperators Topology
+open scoped BigOperators Topology
 
 variable {𝕜 E F : Type _} [IsROrC 𝕜]
 
@@ -1329,7 +1329,7 @@ theorem OrthogonalFamily.isInternal_iff [DecidableEq ι] [FiniteDimensional 𝕜
   hV.is_internal_iff_of_is_complete (complete_space_coe_iff_is_complete.mp inferInstance)
 #align orthogonal_family.is_internal_iff OrthogonalFamily.isInternal_iff
 
-open DirectSum
+open scoped DirectSum
 
 /-- 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}
Diff
@@ -71,12 +71,6 @@ local notation "absR" => Abs.abs
 /-! ### Orthogonal projection in inner product spaces -/
 
 
-/- warning: exists_norm_eq_infi_of_complete_convex -> exists_norm_eq_iInf_of_complete_convex is a dubious translation:
-lean 3 declaration is
-  forall {F : Type.{u1}} [_inst_3 : NormedAddCommGroup.{u1} F] [_inst_5 : InnerProductSpace.{0, u1} Real F Real.isROrC _inst_3] {K : Set.{u1} F}, (Set.Nonempty.{u1} F K) -> (IsComplete.{u1} F (PseudoMetricSpace.toUniformSpace.{u1} F (SeminormedAddCommGroup.toPseudoMetricSpace.{u1} F (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} F _inst_3))) K) -> (Convex.{0, u1} Real F Real.orderedSemiring (AddCommGroup.toAddCommMonoid.{u1} F (NormedAddCommGroup.toAddCommGroup.{u1} F _inst_3)) (SMulZeroClass.toHasSmul.{0, u1} Real F (AddZeroClass.toHasZero.{u1} F (AddMonoid.toAddZeroClass.{u1} F (AddCommMonoid.toAddMonoid.{u1} F (AddCommGroup.toAddCommMonoid.{u1} F (SeminormedAddCommGroup.toAddCommGroup.{u1} F (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} F _inst_3)))))) (SMulWithZero.toSmulZeroClass.{0, u1} Real F (MulZeroClass.toHasZero.{0} Real (MulZeroOneClass.toMulZeroClass.{0} Real (MonoidWithZero.toMulZeroOneClass.{0} Real (Semiring.toMonoidWithZero.{0} Real (Ring.toSemiring.{0} Real (NormedRing.toRing.{0} Real (NormedCommRing.toNormedRing.{0} Real (NormedField.toNormedCommRing.{0} Real (DenselyNormedField.toNormedField.{0} Real (IsROrC.toDenselyNormedField.{0} Real Real.isROrC)))))))))) (AddZeroClass.toHasZero.{u1} F (AddMonoid.toAddZeroClass.{u1} F (AddCommMonoid.toAddMonoid.{u1} F (AddCommGroup.toAddCommMonoid.{u1} F (SeminormedAddCommGroup.toAddCommGroup.{u1} F (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} F _inst_3)))))) (MulActionWithZero.toSMulWithZero.{0, u1} Real F (Semiring.toMonoidWithZero.{0} Real (Ring.toSemiring.{0} Real (NormedRing.toRing.{0} Real (NormedCommRing.toNormedRing.{0} Real (NormedField.toNormedCommRing.{0} Real (DenselyNormedField.toNormedField.{0} Real (IsROrC.toDenselyNormedField.{0} Real Real.isROrC))))))) (AddZeroClass.toHasZero.{u1} F (AddMonoid.toAddZeroClass.{u1} F (AddCommMonoid.toAddMonoid.{u1} F (AddCommGroup.toAddCommMonoid.{u1} F (SeminormedAddCommGroup.toAddCommGroup.{u1} F (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} F _inst_3)))))) (Module.toMulActionWithZero.{0, u1} Real F (Ring.toSemiring.{0} Real (NormedRing.toRing.{0} Real (NormedCommRing.toNormedRing.{0} Real (NormedField.toNormedCommRing.{0} Real (DenselyNormedField.toNormedField.{0} Real (IsROrC.toDenselyNormedField.{0} Real Real.isROrC)))))) (AddCommGroup.toAddCommMonoid.{u1} F (SeminormedAddCommGroup.toAddCommGroup.{u1} F (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} F _inst_3))) (NormedSpace.toModule.{0, u1} Real F (DenselyNormedField.toNormedField.{0} Real (IsROrC.toDenselyNormedField.{0} Real Real.isROrC)) (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} F _inst_3) (InnerProductSpace.toNormedSpace.{0, u1} Real F Real.isROrC _inst_3 _inst_5)))))) K) -> (forall (u : F), Exists.{succ u1} F (fun (v : F) => Exists.{0} (Membership.Mem.{u1, u1} F (Set.{u1} F) (Set.hasMem.{u1} F) v K) (fun (H : Membership.Mem.{u1, u1} F (Set.{u1} F) (Set.hasMem.{u1} F) v K) => Eq.{1} Real (Norm.norm.{u1} F (NormedAddCommGroup.toHasNorm.{u1} F _inst_3) (HSub.hSub.{u1, u1, u1} F F F (instHSub.{u1} F (SubNegMonoid.toHasSub.{u1} F (AddGroup.toSubNegMonoid.{u1} F (NormedAddGroup.toAddGroup.{u1} F (NormedAddCommGroup.toNormedAddGroup.{u1} F _inst_3))))) u v)) (iInf.{0, succ u1} Real Real.hasInf (coeSort.{succ u1, succ (succ u1)} (Set.{u1} F) Type.{u1} (Set.hasCoeToSort.{u1} F) K) (fun (w : coeSort.{succ u1, succ (succ u1)} (Set.{u1} F) Type.{u1} (Set.hasCoeToSort.{u1} F) K) => Norm.norm.{u1} F (NormedAddCommGroup.toHasNorm.{u1} F _inst_3) (HSub.hSub.{u1, u1, u1} F F F (instHSub.{u1} F (SubNegMonoid.toHasSub.{u1} F (AddGroup.toSubNegMonoid.{u1} F (NormedAddGroup.toAddGroup.{u1} F (NormedAddCommGroup.toNormedAddGroup.{u1} F _inst_3))))) u ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (coeSort.{succ u1, succ (succ u1)} (Set.{u1} F) Type.{u1} (Set.hasCoeToSort.{u1} F) K) F (HasLiftT.mk.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} F) Type.{u1} (Set.hasCoeToSort.{u1} F) K) F (CoeTCₓ.coe.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} F) Type.{u1} (Set.hasCoeToSort.{u1} F) K) F (coeBase.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} F) Type.{u1} (Set.hasCoeToSort.{u1} F) K) F (coeSubtype.{succ u1} F (fun (x : F) => Membership.Mem.{u1, u1} F (Set.{u1} F) (Set.hasMem.{u1} F) x K))))) w)))))))
-but is expected to have type
-  forall {F : Type.{u1}} [_inst_3 : NormedAddCommGroup.{u1} F] [_inst_5 : InnerProductSpace.{0, u1} Real F Real.isROrC _inst_3] {K : Set.{u1} F}, (Set.Nonempty.{u1} F K) -> (IsComplete.{u1} F (PseudoMetricSpace.toUniformSpace.{u1} F (SeminormedAddCommGroup.toPseudoMetricSpace.{u1} F (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} F _inst_3))) K) -> (Convex.{0, u1} Real F Real.orderedSemiring (AddCommGroup.toAddCommMonoid.{u1} F (NormedAddCommGroup.toAddCommGroup.{u1} F _inst_3)) (SMulZeroClass.toSMul.{0, u1} Real F (NegZeroClass.toZero.{u1} F (SubNegZeroMonoid.toNegZeroClass.{u1} F (SubtractionMonoid.toSubNegZeroMonoid.{u1} F (SubtractionCommMonoid.toSubtractionMonoid.{u1} F (AddCommGroup.toDivisionAddCommMonoid.{u1} F (NormedAddCommGroup.toAddCommGroup.{u1} F _inst_3)))))) (SMulWithZero.toSMulZeroClass.{0, u1} Real F Real.instZeroReal (NegZeroClass.toZero.{u1} F (SubNegZeroMonoid.toNegZeroClass.{u1} F (SubtractionMonoid.toSubNegZeroMonoid.{u1} F (SubtractionCommMonoid.toSubtractionMonoid.{u1} F (AddCommGroup.toDivisionAddCommMonoid.{u1} F (NormedAddCommGroup.toAddCommGroup.{u1} F _inst_3)))))) (MulActionWithZero.toSMulWithZero.{0, u1} Real F Real.instMonoidWithZeroReal (NegZeroClass.toZero.{u1} F (SubNegZeroMonoid.toNegZeroClass.{u1} F (SubtractionMonoid.toSubNegZeroMonoid.{u1} F (SubtractionCommMonoid.toSubtractionMonoid.{u1} F (AddCommGroup.toDivisionAddCommMonoid.{u1} F (NormedAddCommGroup.toAddCommGroup.{u1} F _inst_3)))))) (Module.toMulActionWithZero.{0, u1} Real F Real.semiring (AddCommGroup.toAddCommMonoid.{u1} F (NormedAddCommGroup.toAddCommGroup.{u1} F _inst_3)) (NormedSpace.toModule.{0, u1} Real F Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} F _inst_3) (InnerProductSpace.toNormedSpace.{0, u1} Real F Real.isROrC _inst_3 _inst_5)))))) K) -> (forall (u : F), Exists.{succ u1} F (fun (v : F) => And (Membership.mem.{u1, u1} F (Set.{u1} F) (Set.instMembershipSet.{u1} F) v K) (Eq.{1} Real (Norm.norm.{u1} F (NormedAddCommGroup.toNorm.{u1} F _inst_3) (HSub.hSub.{u1, u1, u1} F F F (instHSub.{u1} F (SubNegMonoid.toSub.{u1} F (AddGroup.toSubNegMonoid.{u1} F (NormedAddGroup.toAddGroup.{u1} F (NormedAddCommGroup.toNormedAddGroup.{u1} F _inst_3))))) u v)) (iInf.{0, succ u1} Real Real.instInfSetReal (Set.Elem.{u1} F K) (fun (w : Set.Elem.{u1} F K) => Norm.norm.{u1} F (NormedAddCommGroup.toNorm.{u1} F _inst_3) (HSub.hSub.{u1, u1, u1} F F F (instHSub.{u1} F (SubNegMonoid.toSub.{u1} F (AddGroup.toSubNegMonoid.{u1} F (NormedAddGroup.toAddGroup.{u1} F (NormedAddCommGroup.toNormedAddGroup.{u1} F _inst_3))))) u (Subtype.val.{succ u1} F (fun (x : F) => Membership.mem.{u1, u1} F (Set.{u1} F) (Set.instMembershipSet.{u1} F) x K) w)))))))
-Case conversion may be inaccurate. Consider using '#align exists_norm_eq_infi_of_complete_convex exists_norm_eq_iInf_of_complete_convexₓ'. -/
 -- FIXME this monolithic proof causes a deterministic timeout with `-T50000`
 -- It should be broken in a sequence of more manageable pieces,
 -- perhaps with individual statements for the three steps below.
@@ -211,12 +205,6 @@ theorem exists_norm_eq_iInf_of_complete_convex {K : Set F} (ne : K.Nonempty) (h
   exact Subtype.mem _
 #align exists_norm_eq_infi_of_complete_convex exists_norm_eq_iInf_of_complete_convex
 
-/- warning: norm_eq_infi_iff_real_inner_le_zero -> norm_eq_iInf_iff_real_inner_le_zero is a dubious translation:
-lean 3 declaration is
-  forall {F : Type.{u1}} [_inst_3 : NormedAddCommGroup.{u1} F] [_inst_5 : InnerProductSpace.{0, u1} Real F Real.isROrC _inst_3] {K : Set.{u1} F}, (Convex.{0, u1} Real F Real.orderedSemiring (AddCommGroup.toAddCommMonoid.{u1} F (NormedAddCommGroup.toAddCommGroup.{u1} F _inst_3)) (SMulZeroClass.toHasSmul.{0, u1} Real F (AddZeroClass.toHasZero.{u1} F (AddMonoid.toAddZeroClass.{u1} F (AddCommMonoid.toAddMonoid.{u1} F (AddCommGroup.toAddCommMonoid.{u1} F (SeminormedAddCommGroup.toAddCommGroup.{u1} F (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} F _inst_3)))))) (SMulWithZero.toSmulZeroClass.{0, u1} Real F (MulZeroClass.toHasZero.{0} Real (MulZeroOneClass.toMulZeroClass.{0} Real (MonoidWithZero.toMulZeroOneClass.{0} Real (Semiring.toMonoidWithZero.{0} Real (Ring.toSemiring.{0} Real (NormedRing.toRing.{0} Real (NormedCommRing.toNormedRing.{0} Real (NormedField.toNormedCommRing.{0} Real (DenselyNormedField.toNormedField.{0} Real (IsROrC.toDenselyNormedField.{0} Real Real.isROrC)))))))))) (AddZeroClass.toHasZero.{u1} F (AddMonoid.toAddZeroClass.{u1} F (AddCommMonoid.toAddMonoid.{u1} F (AddCommGroup.toAddCommMonoid.{u1} F (SeminormedAddCommGroup.toAddCommGroup.{u1} F (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} F _inst_3)))))) (MulActionWithZero.toSMulWithZero.{0, u1} Real F (Semiring.toMonoidWithZero.{0} Real (Ring.toSemiring.{0} Real (NormedRing.toRing.{0} Real (NormedCommRing.toNormedRing.{0} Real (NormedField.toNormedCommRing.{0} Real (DenselyNormedField.toNormedField.{0} Real (IsROrC.toDenselyNormedField.{0} Real Real.isROrC))))))) (AddZeroClass.toHasZero.{u1} F (AddMonoid.toAddZeroClass.{u1} F (AddCommMonoid.toAddMonoid.{u1} F (AddCommGroup.toAddCommMonoid.{u1} F (SeminormedAddCommGroup.toAddCommGroup.{u1} F (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} F _inst_3)))))) (Module.toMulActionWithZero.{0, u1} Real F (Ring.toSemiring.{0} Real (NormedRing.toRing.{0} Real (NormedCommRing.toNormedRing.{0} Real (NormedField.toNormedCommRing.{0} Real (DenselyNormedField.toNormedField.{0} Real (IsROrC.toDenselyNormedField.{0} Real Real.isROrC)))))) (AddCommGroup.toAddCommMonoid.{u1} F (SeminormedAddCommGroup.toAddCommGroup.{u1} F (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} F _inst_3))) (NormedSpace.toModule.{0, u1} Real F (DenselyNormedField.toNormedField.{0} Real (IsROrC.toDenselyNormedField.{0} Real Real.isROrC)) (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} F _inst_3) (InnerProductSpace.toNormedSpace.{0, u1} Real F Real.isROrC _inst_3 _inst_5)))))) K) -> (forall {u : F} {v : F}, (Membership.Mem.{u1, u1} F (Set.{u1} F) (Set.hasMem.{u1} F) v K) -> (Iff (Eq.{1} Real (Norm.norm.{u1} F (NormedAddCommGroup.toHasNorm.{u1} F _inst_3) (HSub.hSub.{u1, u1, u1} F F F (instHSub.{u1} F (SubNegMonoid.toHasSub.{u1} F (AddGroup.toSubNegMonoid.{u1} F (NormedAddGroup.toAddGroup.{u1} F (NormedAddCommGroup.toNormedAddGroup.{u1} F _inst_3))))) u v)) (iInf.{0, succ u1} Real Real.hasInf (coeSort.{succ u1, succ (succ u1)} (Set.{u1} F) Type.{u1} (Set.hasCoeToSort.{u1} F) K) (fun (w : coeSort.{succ u1, succ (succ u1)} (Set.{u1} F) Type.{u1} (Set.hasCoeToSort.{u1} F) K) => Norm.norm.{u1} F (NormedAddCommGroup.toHasNorm.{u1} F _inst_3) (HSub.hSub.{u1, u1, u1} F F F (instHSub.{u1} F (SubNegMonoid.toHasSub.{u1} F (AddGroup.toSubNegMonoid.{u1} F (NormedAddGroup.toAddGroup.{u1} F (NormedAddCommGroup.toNormedAddGroup.{u1} F _inst_3))))) u ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (coeSort.{succ u1, succ (succ u1)} (Set.{u1} F) Type.{u1} (Set.hasCoeToSort.{u1} F) K) F (HasLiftT.mk.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} F) Type.{u1} (Set.hasCoeToSort.{u1} F) K) F (CoeTCₓ.coe.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} F) Type.{u1} (Set.hasCoeToSort.{u1} F) K) F (coeBase.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} F) Type.{u1} (Set.hasCoeToSort.{u1} F) K) F (coeSubtype.{succ u1} F (fun (x : F) => Membership.Mem.{u1, u1} F (Set.{u1} F) (Set.hasMem.{u1} F) x K))))) w))))) (forall (w : F), (Membership.Mem.{u1, u1} F (Set.{u1} F) (Set.hasMem.{u1} F) w K) -> (LE.le.{0} Real Real.hasLe (Inner.inner.{0, u1} Real F (InnerProductSpace.toHasInner.{0, u1} Real F Real.isROrC _inst_3 _inst_5) (HSub.hSub.{u1, u1, u1} F F F (instHSub.{u1} F (SubNegMonoid.toHasSub.{u1} F (AddGroup.toSubNegMonoid.{u1} F (NormedAddGroup.toAddGroup.{u1} F (NormedAddCommGroup.toNormedAddGroup.{u1} F _inst_3))))) u v) (HSub.hSub.{u1, u1, u1} F F F (instHSub.{u1} F (SubNegMonoid.toHasSub.{u1} F (AddGroup.toSubNegMonoid.{u1} F (NormedAddGroup.toAddGroup.{u1} F (NormedAddCommGroup.toNormedAddGroup.{u1} F _inst_3))))) w v)) (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero)))))))
-but is expected to have type
-  forall {F : Type.{u1}} [_inst_3 : NormedAddCommGroup.{u1} F] [_inst_5 : InnerProductSpace.{0, u1} Real F Real.isROrC _inst_3] {K : Set.{u1} F}, (Convex.{0, u1} Real F Real.orderedSemiring (AddCommGroup.toAddCommMonoid.{u1} F (NormedAddCommGroup.toAddCommGroup.{u1} F _inst_3)) (SMulZeroClass.toSMul.{0, u1} Real F (NegZeroClass.toZero.{u1} F (SubNegZeroMonoid.toNegZeroClass.{u1} F (SubtractionMonoid.toSubNegZeroMonoid.{u1} F (SubtractionCommMonoid.toSubtractionMonoid.{u1} F (AddCommGroup.toDivisionAddCommMonoid.{u1} F (NormedAddCommGroup.toAddCommGroup.{u1} F _inst_3)))))) (SMulWithZero.toSMulZeroClass.{0, u1} Real F Real.instZeroReal (NegZeroClass.toZero.{u1} F (SubNegZeroMonoid.toNegZeroClass.{u1} F (SubtractionMonoid.toSubNegZeroMonoid.{u1} F (SubtractionCommMonoid.toSubtractionMonoid.{u1} F (AddCommGroup.toDivisionAddCommMonoid.{u1} F (NormedAddCommGroup.toAddCommGroup.{u1} F _inst_3)))))) (MulActionWithZero.toSMulWithZero.{0, u1} Real F Real.instMonoidWithZeroReal (NegZeroClass.toZero.{u1} F (SubNegZeroMonoid.toNegZeroClass.{u1} F (SubtractionMonoid.toSubNegZeroMonoid.{u1} F (SubtractionCommMonoid.toSubtractionMonoid.{u1} F (AddCommGroup.toDivisionAddCommMonoid.{u1} F (NormedAddCommGroup.toAddCommGroup.{u1} F _inst_3)))))) (Module.toMulActionWithZero.{0, u1} Real F Real.semiring (AddCommGroup.toAddCommMonoid.{u1} F (NormedAddCommGroup.toAddCommGroup.{u1} F _inst_3)) (NormedSpace.toModule.{0, u1} Real F Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} F _inst_3) (InnerProductSpace.toNormedSpace.{0, u1} Real F Real.isROrC _inst_3 _inst_5)))))) K) -> (forall {u : F} {v : F}, (Membership.mem.{u1, u1} F (Set.{u1} F) (Set.instMembershipSet.{u1} F) v K) -> (Iff (Eq.{1} Real (Norm.norm.{u1} F (NormedAddCommGroup.toNorm.{u1} F _inst_3) (HSub.hSub.{u1, u1, u1} F F F (instHSub.{u1} F (SubNegMonoid.toSub.{u1} F (AddGroup.toSubNegMonoid.{u1} F (NormedAddGroup.toAddGroup.{u1} F (NormedAddCommGroup.toNormedAddGroup.{u1} F _inst_3))))) u v)) (iInf.{0, succ u1} Real Real.instInfSetReal (Set.Elem.{u1} F K) (fun (w : Set.Elem.{u1} F K) => Norm.norm.{u1} F (NormedAddCommGroup.toNorm.{u1} F _inst_3) (HSub.hSub.{u1, u1, u1} F F F (instHSub.{u1} F (SubNegMonoid.toSub.{u1} F (AddGroup.toSubNegMonoid.{u1} F (NormedAddGroup.toAddGroup.{u1} F (NormedAddCommGroup.toNormedAddGroup.{u1} F _inst_3))))) u (Subtype.val.{succ u1} F (fun (x : F) => Membership.mem.{u1, u1} F (Set.{u1} F) (Set.instMembershipSet.{u1} F) x K) w))))) (forall (w : F), (Membership.mem.{u1, u1} F (Set.{u1} F) (Set.instMembershipSet.{u1} F) w K) -> (LE.le.{0} Real Real.instLEReal (Inner.inner.{0, u1} Real F (InnerProductSpace.toInner.{0, u1} Real F Real.isROrC _inst_3 _inst_5) (HSub.hSub.{u1, u1, u1} F F F (instHSub.{u1} F (SubNegMonoid.toSub.{u1} F (AddGroup.toSubNegMonoid.{u1} F (NormedAddGroup.toAddGroup.{u1} F (NormedAddCommGroup.toNormedAddGroup.{u1} F _inst_3))))) u v) (HSub.hSub.{u1, u1, u1} F F F (instHSub.{u1} F (SubNegMonoid.toSub.{u1} F (AddGroup.toSubNegMonoid.{u1} F (NormedAddGroup.toAddGroup.{u1} F (NormedAddCommGroup.toNormedAddGroup.{u1} F _inst_3))))) w v)) (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal))))))
-Case conversion may be inaccurate. Consider using '#align norm_eq_infi_iff_real_inner_le_zero norm_eq_iInf_iff_real_inner_le_zeroₓ'. -/
 /-- 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}
@@ -312,9 +300,6 @@ theorem norm_eq_iInf_iff_real_inner_le_zero {K : Set F} (h : Convex ℝ K) {u :
 
 variable (K : Submodule 𝕜 E)
 
-/- warning: exists_norm_eq_infi_of_complete_subspace -> exists_norm_eq_iInf_of_complete_subspace is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align exists_norm_eq_infi_of_complete_subspace exists_norm_eq_iInf_of_complete_subspaceₓ'. -/
 /-- 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`.
@@ -329,9 +314,6 @@ theorem exists_norm_eq_iInf_of_complete_subspace (h : IsComplete (↑K : Set E))
   exact exists_norm_eq_iInf_of_complete_convex ⟨0, K'.zero_mem⟩ h K'.convex
 #align exists_norm_eq_infi_of_complete_subspace exists_norm_eq_iInf_of_complete_subspace
 
-/- warning: norm_eq_infi_iff_real_inner_eq_zero -> norm_eq_iInf_iff_real_inner_eq_zero is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align norm_eq_infi_iff_real_inner_eq_zero norm_eq_iInf_iff_real_inner_eq_zeroₓ'. -/
 /-- 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
@@ -373,9 +355,6 @@ theorem norm_eq_iInf_iff_real_inner_eq_zero (K : Submodule ℝ F) {u : F} {v : F
       exacts[Submodule.convex _, hv])
 #align norm_eq_infi_iff_real_inner_eq_zero norm_eq_iInf_iff_real_inner_eq_zero
 
-/- warning: norm_eq_infi_iff_inner_eq_zero -> norm_eq_iInf_iff_inner_eq_zero is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align norm_eq_infi_iff_inner_eq_zero norm_eq_iInf_iff_inner_eq_zeroₓ'. -/
 /-- 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
@@ -434,9 +413,6 @@ theorem orthogonalProjectionFn_mem (v : E) : orthogonalProjectionFn K v ∈ K :=
 #align orthogonal_projection_fn_mem orthogonalProjectionFn_mem
 -/
 
-/- warning: orthogonal_projection_fn_inner_eq_zero -> orthogonalProjectionFn_inner_eq_zero is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align orthogonal_projection_fn_inner_eq_zero orthogonalProjectionFn_inner_eq_zeroₓ'. -/
 /-- 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. -/
@@ -449,9 +425,6 @@ theorem orthogonalProjectionFn_inner_eq_zero (v : E) :
           v).choose_spec.choose_spec
 #align orthogonal_projection_fn_inner_eq_zero orthogonalProjectionFn_inner_eq_zero
 
-/- warning: eq_orthogonal_projection_fn_of_mem_of_inner_eq_zero -> eq_orthogonalProjectionFn_of_mem_of_inner_eq_zero is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align eq_orthogonal_projection_fn_of_mem_of_inner_eq_zero eq_orthogonalProjectionFn_of_mem_of_inner_eq_zeroₓ'. -/
 /-- 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
@@ -472,9 +445,6 @@ theorem eq_orthogonalProjectionFn_of_mem_of_inner_eq_zero {u v : E} (hvm : v ∈
 
 variable (K)
 
-/- warning: orthogonal_projection_fn_norm_sq -> orthogonalProjectionFn_norm_sq is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align orthogonal_projection_fn_norm_sq orthogonalProjectionFn_norm_sqₓ'. -/
 theorem orthogonalProjectionFn_norm_sq (v : E) :
     ‖v‖ * ‖v‖ =
       ‖v - orthogonalProjectionFn K v‖ * ‖v - orthogonalProjectionFn K v‖ +
@@ -524,18 +494,12 @@ def orthogonalProjection : E →L[𝕜] K :=
 
 variable {K}
 
-/- warning: orthogonal_projection_fn_eq -> orthogonalProjectionFn_eq is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align orthogonal_projection_fn_eq orthogonalProjectionFn_eqₓ'. -/
 @[simp]
 theorem orthogonalProjectionFn_eq (v : E) :
     orthogonalProjectionFn K v = (orthogonalProjection K v : E) :=
   rfl
 #align orthogonal_projection_fn_eq orthogonalProjectionFn_eq
 
-/- warning: orthogonal_projection_inner_eq_zero -> orthogonalProjection_inner_eq_zero is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align orthogonal_projection_inner_eq_zero orthogonalProjection_inner_eq_zeroₓ'. -/
 /-- The characterization of the orthogonal projection.  -/
 @[simp]
 theorem orthogonalProjection_inner_eq_zero (v : E) :
@@ -543,9 +507,6 @@ theorem orthogonalProjection_inner_eq_zero (v : E) :
   orthogonalProjectionFn_inner_eq_zero v
 #align orthogonal_projection_inner_eq_zero orthogonalProjection_inner_eq_zero
 
-/- warning: sub_orthogonal_projection_mem_orthogonal -> sub_orthogonalProjection_mem_orthogonal is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align sub_orthogonal_projection_mem_orthogonal sub_orthogonalProjection_mem_orthogonalₓ'. -/
 /-- 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ᗮ :=
@@ -555,9 +516,6 @@ theorem sub_orthogonalProjection_mem_orthogonal (v : E) : v - orthogonalProjecti
   exact orthogonalProjection_inner_eq_zero _ _ hw
 #align sub_orthogonal_projection_mem_orthogonal sub_orthogonalProjection_mem_orthogonal
 
-/- warning: eq_orthogonal_projection_of_mem_of_inner_eq_zero -> eq_orthogonalProjection_of_mem_of_inner_eq_zero is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align eq_orthogonal_projection_of_mem_of_inner_eq_zero eq_orthogonalProjection_of_mem_of_inner_eq_zeroₓ'. -/
 /-- 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)
@@ -565,9 +523,6 @@ theorem eq_orthogonalProjection_of_mem_of_inner_eq_zero {u v : E} (hvm : v ∈ K
   eq_orthogonalProjectionFn_of_mem_of_inner_eq_zero hvm hvo
 #align eq_orthogonal_projection_of_mem_of_inner_eq_zero eq_orthogonalProjection_of_mem_of_inner_eq_zero
 
-/- warning: orthogonal_projection_minimal -> orthogonalProjection_minimal is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align orthogonal_projection_minimal orthogonalProjection_minimalₓ'. -/
 /-- The orthogonal projection of `y` on `U` minimizes the distance `‖y - x‖` for `x ∈ U`. -/
 theorem orthogonalProjection_minimal {U : Submodule 𝕜 E} [CompleteSpace U] (y : E) :
     ‖y - orthogonalProjection U y‖ = ⨅ x : U, ‖y - x‖ :=
@@ -576,9 +531,6 @@ theorem orthogonalProjection_minimal {U : Submodule 𝕜 E} [CompleteSpace U] (y
   exact orthogonalProjection_inner_eq_zero _
 #align orthogonal_projection_minimal orthogonalProjection_minimal
 
-/- warning: eq_orthogonal_projection_of_eq_submodule -> eq_orthogonalProjection_of_eq_submodule is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align eq_orthogonal_projection_of_eq_submodule eq_orthogonalProjection_of_eq_submoduleₓ'. -/
 /-- The orthogonal projections onto equal subspaces are coerced back to the same point in `E`. -/
 theorem eq_orthogonalProjection_of_eq_submodule {K' : Submodule 𝕜 E} [CompleteSpace K'] (h : K = K')
     (u : E) : (orthogonalProjection K u : E) = (orthogonalProjection K' u : E) :=
@@ -588,18 +540,12 @@ theorem eq_orthogonalProjection_of_eq_submodule {K' : Submodule 𝕜 E} [Complet
   exact h
 #align eq_orthogonal_projection_of_eq_submodule eq_orthogonalProjection_of_eq_submodule
 
-/- warning: orthogonal_projection_mem_subspace_eq_self -> orthogonalProjection_mem_subspace_eq_self is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align orthogonal_projection_mem_subspace_eq_self orthogonalProjection_mem_subspace_eq_selfₓ'. -/
 /-- The orthogonal projection sends elements of `K` to themselves. -/
 @[simp]
 theorem orthogonalProjection_mem_subspace_eq_self (v : K) : orthogonalProjection K v = v := by ext;
   apply eq_orthogonalProjection_of_mem_of_inner_eq_zero <;> simp
 #align orthogonal_projection_mem_subspace_eq_self orthogonalProjection_mem_subspace_eq_self
 
-/- warning: orthogonal_projection_eq_self_iff -> orthogonalProjection_eq_self_iff is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align orthogonal_projection_eq_self_iff orthogonalProjection_eq_self_iffₓ'. -/
 /-- 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 :=
   by
@@ -609,9 +555,6 @@ theorem orthogonalProjection_eq_self_iff {v : E} : (orthogonalProjection K v : E
   · simp
 #align orthogonal_projection_eq_self_iff orthogonalProjection_eq_self_iff
 
-/- warning: linear_isometry.map_orthogonal_projection -> LinearIsometry.map_orthogonalProjection is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align linear_isometry.map_orthogonal_projection LinearIsometry.map_orthogonalProjectionₓ'. -/
 theorem LinearIsometry.map_orthogonalProjection {E E' : Type _} [NormedAddCommGroup E]
     [NormedAddCommGroup E'] [InnerProductSpace 𝕜 E] [InnerProductSpace 𝕜 E'] (f : E →ₗᵢ[𝕜] E')
     (p : Submodule 𝕜 E) [CompleteSpace p] (x : E) :
@@ -623,9 +566,6 @@ theorem LinearIsometry.map_orthogonalProjection {E E' : Type _} [NormedAddCommGr
   rw [← f.map_sub, f.inner_map_map, orthogonalProjection_inner_eq_zero x x' hx']
 #align linear_isometry.map_orthogonal_projection LinearIsometry.map_orthogonalProjection
 
-/- warning: linear_isometry.map_orthogonal_projection' -> LinearIsometry.map_orthogonalProjection' is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align linear_isometry.map_orthogonal_projection' LinearIsometry.map_orthogonalProjection'ₓ'. -/
 theorem LinearIsometry.map_orthogonalProjection' {E E' : Type _} [NormedAddCommGroup E]
     [NormedAddCommGroup E'] [InnerProductSpace 𝕜 E] [InnerProductSpace 𝕜 E'] (f : E →ₗᵢ[𝕜] E')
     (p : Submodule 𝕜 E) [CompleteSpace p] (x : E) :
@@ -637,9 +577,6 @@ theorem LinearIsometry.map_orthogonalProjection' {E E' : Type _} [NormedAddCommG
   rw [← f.map_sub, f.inner_map_map, orthogonalProjection_inner_eq_zero x x' hx']
 #align linear_isometry.map_orthogonal_projection' LinearIsometry.map_orthogonalProjection'
 
-/- warning: orthogonal_projection_map_apply -> orthogonalProjection_map_apply is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align orthogonal_projection_map_apply orthogonalProjection_map_applyₓ'. -/
 /-- 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')
@@ -651,9 +588,6 @@ theorem orthogonalProjection_map_apply {E E' : Type _} [NormedAddCommGroup E]
     (f.to_linear_isometry.map_orthogonal_projection p (f.symm x)).symm
 #align orthogonal_projection_map_apply orthogonalProjection_map_apply
 
-/- warning: orthogonal_projection_bot -> orthogonalProjection_bot is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align orthogonal_projection_bot orthogonalProjection_botₓ'. -/
 /-- The orthogonal projection onto the trivial submodule is the zero map. -/
 @[simp]
 theorem orthogonalProjection_bot : orthogonalProjection (⊥ : Submodule 𝕜 E) = 0 := by ext
@@ -661,9 +595,6 @@ theorem orthogonalProjection_bot : orthogonalProjection (⊥ : Submodule 𝕜 E)
 
 variable (K)
 
-/- warning: orthogonal_projection_norm_le -> orthogonalProjection_norm_le is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align orthogonal_projection_norm_le orthogonalProjection_norm_leₓ'. -/
 /-- The orthogonal projection has norm `≤ 1`. -/
 theorem orthogonalProjection_norm_le : ‖orthogonalProjection K‖ ≤ 1 :=
   LinearMap.mkContinuous_norm_le _ (by norm_num) _
@@ -671,9 +602,6 @@ theorem orthogonalProjection_norm_le : ‖orthogonalProjection K‖ ≤ 1 :=
 
 variable (𝕜)
 
-/- warning: smul_orthogonal_projection_singleton -> smul_orthogonalProjection_singleton is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align smul_orthogonal_projection_singleton smul_orthogonalProjection_singletonₓ'. -/
 theorem smul_orthogonalProjection_singleton {v : E} (w : E) :
     (‖v‖ ^ 2 : 𝕜) • (orthogonalProjection (𝕜 ∙ v) w : E) = ⟪v, w⟫ • v :=
   by
@@ -688,9 +616,6 @@ theorem smul_orthogonalProjection_singleton {v : E} (w : E) :
       InnerProductSpace.conj_symm, hv]
 #align smul_orthogonal_projection_singleton smul_orthogonalProjection_singleton
 
-/- warning: orthogonal_projection_singleton -> orthogonalProjection_singleton is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align orthogonal_projection_singleton orthogonalProjection_singletonₓ'. -/
 /-- Formula for orthogonal projection onto a single vector. -/
 theorem orthogonalProjection_singleton {v : E} (w : E) :
     (orthogonalProjection (𝕜 ∙ v) w : E) = (⟪v, w⟫ / ‖v‖ ^ 2) • v :=
@@ -707,9 +632,6 @@ theorem orthogonalProjection_singleton {v : E} (w : E) :
   convert key <;> field_simp [hv']
 #align orthogonal_projection_singleton orthogonalProjection_singleton
 
-/- warning: orthogonal_projection_unit_singleton -> orthogonalProjection_unit_singleton is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align orthogonal_projection_unit_singleton orthogonalProjection_unit_singletonₓ'. -/
 /-- 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 := by
@@ -768,9 +690,6 @@ theorem reflection_symm : (reflection K).symm = reflection K :=
 #align reflection_symm reflection_symm
 -/
 
-/- warning: reflection_inv -> reflection_inv is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align reflection_inv reflection_invₓ'. -/
 /-- Reflection is its own inverse. -/
 @[simp]
 theorem reflection_inv : (reflection K)⁻¹ = reflection K :=
@@ -779,18 +698,12 @@ theorem reflection_inv : (reflection K)⁻¹ = reflection K :=
 
 variable (K)
 
-/- warning: reflection_reflection -> reflection_reflection is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align reflection_reflection reflection_reflectionₓ'. -/
 /-- Reflecting twice in the same subspace. -/
 @[simp]
 theorem reflection_reflection (p : E) : reflection K (reflection K p) = p :=
   (reflection K).left_inv p
 #align reflection_reflection reflection_reflection
 
-/- warning: reflection_involutive -> reflection_involutive is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align reflection_involutive reflection_involutiveₓ'. -/
 /-- Reflection is involutive. -/
 theorem reflection_involutive : Function.Involutive (reflection K) :=
   reflection_reflection K
@@ -805,9 +718,6 @@ theorem reflection_trans_reflection :
 #align reflection_trans_reflection reflection_trans_reflection
 -/
 
-/- warning: reflection_mul_reflection -> reflection_mul_reflection is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align reflection_mul_reflection reflection_mul_reflectionₓ'. -/
 /-- Reflection is involutive. -/
 @[simp]
 theorem reflection_mul_reflection : reflection K * reflection K = 1 :=
@@ -816,9 +726,6 @@ theorem reflection_mul_reflection : reflection K * reflection K = 1 :=
 
 variable {K}
 
-/- warning: reflection_eq_self_iff -> reflection_eq_self_iff is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align reflection_eq_self_iff reflection_eq_self_iffₓ'. -/
 /-- 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 :=
   by
@@ -828,16 +735,10 @@ theorem reflection_eq_self_iff (x : E) : reflection K x = x ↔ x ∈ K :=
   exact two_ne_zero
 #align reflection_eq_self_iff reflection_eq_self_iff
 
-/- warning: reflection_mem_subspace_eq_self -> reflection_mem_subspace_eq_self is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align reflection_mem_subspace_eq_self reflection_mem_subspace_eq_selfₓ'. -/
 theorem reflection_mem_subspace_eq_self {x : E} (hx : x ∈ K) : reflection K x = x :=
   (reflection_eq_self_iff x).mpr hx
 #align reflection_mem_subspace_eq_self reflection_mem_subspace_eq_self
 
-/- warning: reflection_map_apply -> reflection_map_apply is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align reflection_map_apply reflection_map_applyₓ'. -/
 /-- 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)
@@ -846,9 +747,6 @@ theorem reflection_map_apply {E E' : Type _} [NormedAddCommGroup E] [NormedAddCo
   simp [bit0, reflection_apply, orthogonalProjection_map_apply f K x]
 #align reflection_map_apply reflection_map_apply
 
-/- warning: reflection_map -> reflection_map is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align reflection_map reflection_mapₓ'. -/
 /-- 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)
@@ -857,9 +755,6 @@ theorem reflection_map {E E' : Type _} [NormedAddCommGroup E] [NormedAddCommGrou
   LinearIsometryEquiv.ext <| reflection_map_apply f K
 #align reflection_map reflection_map
 
-/- warning: reflection_bot -> reflection_bot is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align reflection_bot reflection_botₓ'. -/
 /-- Reflection through the trivial subspace {0} is just negation. -/
 @[simp]
 theorem reflection_bot : reflection (⊥ : Submodule 𝕜 E) = LinearIsometryEquiv.neg 𝕜 := by
@@ -870,9 +765,6 @@ end reflection
 
 section Orthogonal
 
-/- warning: submodule.sup_orthogonal_inf_of_complete_space -> Submodule.sup_orthogonal_inf_of_completeSpace is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align submodule.sup_orthogonal_inf_of_complete_space Submodule.sup_orthogonal_inf_of_completeSpaceₓ'. -/
 /-- 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₂)
     [CompleteSpace K₁] : K₁ ⊔ K₁ᗮ ⊓ K₂ = K₂ := by
@@ -888,9 +780,6 @@ theorem Submodule.sup_orthogonal_inf_of_completeSpace {K₁ K₂ : Submodule 
 
 variable {K}
 
-/- warning: submodule.sup_orthogonal_of_complete_space -> Submodule.sup_orthogonal_of_completeSpace is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align submodule.sup_orthogonal_of_complete_space Submodule.sup_orthogonal_of_completeSpaceₓ'. -/
 /-- If `K` is complete, `K` and `Kᗮ` span the whole space. -/
 theorem Submodule.sup_orthogonal_of_completeSpace [CompleteSpace K] : K ⊔ Kᗮ = ⊤ :=
   by
@@ -900,9 +789,6 @@ theorem Submodule.sup_orthogonal_of_completeSpace [CompleteSpace K] : K ⊔ Kᗮ
 
 variable (K)
 
-/- warning: submodule.exists_sum_mem_mem_orthogonal -> Submodule.exists_sum_mem_mem_orthogonal is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align submodule.exists_sum_mem_mem_orthogonal Submodule.exists_sum_mem_mem_orthogonalₓ'. -/
 /-- If `K` is complete, any `v` in `E` can be expressed as a sum of elements of `K` and `Kᗮ`. -/
 theorem Submodule.exists_sum_mem_mem_orthogonal [CompleteSpace K] (v : E) :
     ∃ y ∈ K, ∃ z ∈ Kᗮ, v = y + z :=
@@ -953,9 +839,6 @@ theorem Submodule.isCompl_orthogonal_of_completeSpace [CompleteSpace K] : IsComp
 #align submodule.is_compl_orthogonal_of_complete_space Submodule.isCompl_orthogonal_of_completeSpace
 -/
 
-/- warning: submodule.orthogonal_eq_bot_iff -> Submodule.orthogonal_eq_bot_iff is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align submodule.orthogonal_eq_bot_iff Submodule.orthogonal_eq_bot_iffₓ'. -/
 @[simp]
 theorem Submodule.orthogonal_eq_bot_iff [CompleteSpace (K : Set E)] : Kᗮ = ⊥ ↔ K = ⊤ :=
   by
@@ -965,9 +848,6 @@ theorem Submodule.orthogonal_eq_bot_iff [CompleteSpace (K : Set E)] : Kᗮ = ⊥
   rwa [h, sup_comm, bot_sup_eq] at this
 #align submodule.orthogonal_eq_bot_iff Submodule.orthogonal_eq_bot_iff
 
-/- warning: eq_orthogonal_projection_of_mem_orthogonal -> eq_orthogonalProjection_of_mem_orthogonal is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align eq_orthogonal_projection_of_mem_orthogonal eq_orthogonalProjection_of_mem_orthogonalₓ'. -/
 /-- 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 [CompleteSpace K] {u v : E} (hv : v ∈ K)
@@ -975,9 +855,6 @@ theorem eq_orthogonalProjection_of_mem_orthogonal [CompleteSpace K] {u v : E} (h
   eq_orthogonalProjectionFn_of_mem_of_inner_eq_zero hv fun w => inner_eq_zero_symm.mp ∘ hvo w
 #align eq_orthogonal_projection_of_mem_orthogonal eq_orthogonalProjection_of_mem_orthogonal
 
-/- warning: eq_orthogonal_projection_of_mem_orthogonal' -> eq_orthogonalProjection_of_mem_orthogonal' is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align eq_orthogonal_projection_of_mem_orthogonal' eq_orthogonalProjection_of_mem_orthogonal'ₓ'. -/
 /-- 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' [CompleteSpace K] {u v z : E} (hv : v ∈ K)
@@ -985,18 +862,12 @@ theorem eq_orthogonalProjection_of_mem_orthogonal' [CompleteSpace K] {u v z : E}
   eq_orthogonalProjection_of_mem_orthogonal hv (by simpa [hu] )
 #align eq_orthogonal_projection_of_mem_orthogonal' eq_orthogonalProjection_of_mem_orthogonal'
 
-/- warning: orthogonal_projection_mem_subspace_orthogonal_complement_eq_zero -> orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align orthogonal_projection_mem_subspace_orthogonal_complement_eq_zero orthogonalProjection_mem_subspace_orthogonalComplement_eq_zeroₓ'. -/
 /-- The orthogonal projection onto `K` of an element of `Kᗮ` is zero. -/
 theorem orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero [CompleteSpace K] {v : E}
     (hv : v ∈ Kᗮ) : orthogonalProjection K v = 0 := by ext;
   convert eq_orthogonalProjection_of_mem_orthogonal _ _ <;> simp [hv]
 #align orthogonal_projection_mem_subspace_orthogonal_complement_eq_zero orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero
 
-/- warning: submodule.is_ortho.orthogonal_projection_comp_subtypeL -> Submodule.IsOrtho.orthogonalProjection_comp_subtypeL is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align submodule.is_ortho.orthogonal_projection_comp_subtypeL Submodule.IsOrtho.orthogonalProjection_comp_subtypeLₓ'. -/
 /-- The projection into `U` from an orthogonal submodule `V` is the zero map. -/
 theorem Submodule.IsOrtho.orthogonalProjection_comp_subtypeL {U V : Submodule 𝕜 E} [CompleteSpace U]
     (h : U ⟂ V) : orthogonalProjection U ∘L V.subtypeL = 0 :=
@@ -1004,9 +875,6 @@ theorem Submodule.IsOrtho.orthogonalProjection_comp_subtypeL {U V : Submodule 
     orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero <| h.symm v.Prop
 #align submodule.is_ortho.orthogonal_projection_comp_subtypeL Submodule.IsOrtho.orthogonalProjection_comp_subtypeL
 
-/- warning: orthogonal_projection_comp_subtypeL_eq_zero_iff -> orthogonalProjection_comp_subtypeL_eq_zero_iff is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align orthogonal_projection_comp_subtypeL_eq_zero_iff orthogonalProjection_comp_subtypeL_eq_zero_iffₓ'. -/
 /-- 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} [CompleteSpace U] :
     orthogonalProjection U ∘L V.subtypeL = 0 ↔ U ⟂ V :=
@@ -1016,9 +884,6 @@ theorem orthogonalProjection_comp_subtypeL_eq_zero_iff {U V : Submodule 𝕜 E}
     rw [this, Submodule.coe_zero, sub_zero], Submodule.IsOrtho.orthogonalProjection_comp_subtypeL⟩
 #align orthogonal_projection_comp_subtypeL_eq_zero_iff orthogonalProjection_comp_subtypeL_eq_zero_iff
 
-/- warning: orthogonal_projection_eq_linear_proj -> orthogonalProjection_eq_linear_proj is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align orthogonal_projection_eq_linear_proj orthogonalProjection_eq_linear_projₓ'. -/
 theorem orthogonalProjection_eq_linear_proj [CompleteSpace K] (x : E) :
     orthogonalProjection K x =
       K.linearProjOfIsCompl _ Submodule.isCompl_orthogonal_of_completeSpace x :=
@@ -1037,27 +902,18 @@ theorem orthogonalProjection_coe_linearMap_eq_linearProj [CompleteSpace K] :
 #align orthogonal_projection_coe_linear_map_eq_linear_proj orthogonalProjection_coe_linearMap_eq_linearProj
 -/
 
-/- warning: reflection_mem_subspace_orthogonal_complement_eq_neg -> reflection_mem_subspace_orthogonalComplement_eq_neg is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align reflection_mem_subspace_orthogonal_complement_eq_neg reflection_mem_subspace_orthogonalComplement_eq_negₓ'. -/
 /-- The reflection in `K` of an element of `Kᗮ` is its negation. -/
 theorem reflection_mem_subspace_orthogonalComplement_eq_neg [CompleteSpace K] {v : E}
     (hv : v ∈ Kᗮ) : reflection K v = -v := by
   simp [reflection_apply, orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero hv]
 #align reflection_mem_subspace_orthogonal_complement_eq_neg reflection_mem_subspace_orthogonalComplement_eq_neg
 
-/- warning: orthogonal_projection_mem_subspace_orthogonal_precomplement_eq_zero -> orthogonalProjection_mem_subspace_orthogonal_precomplement_eq_zero is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align orthogonal_projection_mem_subspace_orthogonal_precomplement_eq_zero orthogonalProjection_mem_subspace_orthogonal_precomplement_eq_zeroₓ'. -/
 /-- The orthogonal projection onto `Kᗮ` of an element of `K` is zero. -/
 theorem orthogonalProjection_mem_subspace_orthogonal_precomplement_eq_zero [CompleteSpace E] {v : E}
     (hv : v ∈ K) : orthogonalProjection Kᗮ v = 0 :=
   orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero (K.le_orthogonal_orthogonal hv)
 #align orthogonal_projection_mem_subspace_orthogonal_precomplement_eq_zero orthogonalProjection_mem_subspace_orthogonal_precomplement_eq_zero
 
-/- warning: orthogonal_projection_orthogonal_projection_of_le -> orthogonalProjection_orthogonalProjection_of_le is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align orthogonal_projection_orthogonal_projection_of_le orthogonalProjection_orthogonalProjection_of_leₓ'. -/
 /-- 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} [CompleteSpace U]
     [CompleteSpace V] (h : U ≤ V) (x : E) :
@@ -1068,9 +924,6 @@ theorem orthogonalProjection_orthogonalProjection_of_le {U V : Submodule 𝕜 E}
         (Submodule.orthogonal_le h (sub_orthogonalProjection_mem_orthogonal x))
 #align orthogonal_projection_orthogonal_projection_of_le orthogonalProjection_orthogonalProjection_of_le
 
-/- warning: orthogonal_projection_tendsto_closure_supr -> orthogonalProjection_tendsto_closure_iSup is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align orthogonal_projection_tendsto_closure_supr orthogonalProjection_tendsto_closure_iSupₓ'. -/
 /-- 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`. -/
@@ -1103,9 +956,6 @@ theorem orthogonalProjection_tendsto_closure_iSup [CompleteSpace E] {ι : Type _
   exact ciInf_le ⟨0, set.forall_range_iff.mpr fun _ => norm_nonneg _⟩ _
 #align orthogonal_projection_tendsto_closure_supr orthogonalProjection_tendsto_closure_iSup
 
-/- warning: orthogonal_projection_tendsto_self -> orthogonalProjection_tendsto_self is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align orthogonal_projection_tendsto_self orthogonalProjection_tendsto_selfₓ'. -/
 /-- 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 ι]
@@ -1147,9 +997,6 @@ open Submodule
 
 variable {x y : E} [CompleteSpace E]
 
-/- warning: dense.eq_of_sub_mem_orthogonal -> Dense.eq_of_sub_mem_orthogonal is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align dense.eq_of_sub_mem_orthogonal Dense.eq_of_sub_mem_orthogonalₓ'. -/
 /-- 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 :=
   by
@@ -1157,9 +1004,6 @@ theorem eq_of_sub_mem_orthogonal (hK : Dense (K : Set E)) (h : x - y ∈ Kᗮ) :
   rwa [hK, Submodule.mem_bot, sub_eq_zero] at h
 #align dense.eq_of_sub_mem_orthogonal Dense.eq_of_sub_mem_orthogonal
 
-/- warning: dense.eq_zero_of_mem_orthogonal -> Dense.eq_zero_of_mem_orthogonal is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align dense.eq_zero_of_mem_orthogonal Dense.eq_zero_of_mem_orthogonalₓ'. -/
 theorem eq_zero_of_mem_orthogonal (hK : Dense (K : Set E)) (h : x ∈ Kᗮ) : x = 0 :=
   hK.eq_of_sub_mem_orthogonal (by rwa [sub_zero])
 #align dense.eq_zero_of_mem_orthogonal Dense.eq_zero_of_mem_orthogonal
@@ -1170,9 +1014,6 @@ theorem eq_of_inner_left (hK : Dense (K : Set E)) (h : ∀ v : K, ⟪x, v⟫ = 
 #align dense.eq_of_inner_left Dense.eq_of_inner_left
 -/
 
-/- warning: dense.eq_zero_of_inner_left -> Dense.eq_zero_of_inner_left is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align dense.eq_zero_of_inner_left Dense.eq_zero_of_inner_leftₓ'. -/
 theorem eq_zero_of_inner_left (hK : Dense (K : Set E)) (h : ∀ v : K, ⟪x, v⟫ = 0) : x = 0 :=
   hK.eq_of_inner_left fun v => by rw [inner_zero_left, h v]
 #align dense.eq_zero_of_inner_left Dense.eq_zero_of_inner_left
@@ -1184,27 +1025,18 @@ theorem eq_of_inner_right (hK : Dense (K : Set E)) (h : ∀ v : K, ⟪(v : E), x
 #align dense.eq_of_inner_right Dense.eq_of_inner_right
 -/
 
-/- warning: dense.eq_zero_of_inner_right -> Dense.eq_zero_of_inner_right is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align dense.eq_zero_of_inner_right Dense.eq_zero_of_inner_rightₓ'. -/
 theorem eq_zero_of_inner_right (hK : Dense (K : Set E)) (h : ∀ v : K, ⟪(v : E), x⟫ = 0) : x = 0 :=
   hK.eq_of_inner_right fun v => by rw [inner_zero_right, h v]
 #align dense.eq_zero_of_inner_right Dense.eq_zero_of_inner_right
 
 end Dense
 
-/- warning: reflection_mem_subspace_orthogonal_precomplement_eq_neg -> reflection_mem_subspace_orthogonal_precomplement_eq_neg is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align reflection_mem_subspace_orthogonal_precomplement_eq_neg reflection_mem_subspace_orthogonal_precomplement_eq_negₓ'. -/
 /-- The reflection in `Kᗮ` of an element of `K` is its negation. -/
 theorem reflection_mem_subspace_orthogonal_precomplement_eq_neg [CompleteSpace E] {v : E}
     (hv : v ∈ K) : reflection Kᗮ v = -v :=
   reflection_mem_subspace_orthogonalComplement_eq_neg (K.le_orthogonal_orthogonal hv)
 #align reflection_mem_subspace_orthogonal_precomplement_eq_neg reflection_mem_subspace_orthogonal_precomplement_eq_neg
 
-/- warning: orthogonal_projection_orthogonal_complement_singleton_eq_zero -> orthogonalProjection_orthogonalComplement_singleton_eq_zero is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align orthogonal_projection_orthogonal_complement_singleton_eq_zero orthogonalProjection_orthogonalComplement_singleton_eq_zeroₓ'. -/
 /-- The orthogonal projection onto `(𝕜 ∙ v)ᗮ` of `v` is zero. -/
 theorem orthogonalProjection_orthogonalComplement_singleton_eq_zero [CompleteSpace E] (v : E) :
     orthogonalProjection (𝕜 ∙ v)ᗮ v = 0 :=
@@ -1212,18 +1044,12 @@ theorem orthogonalProjection_orthogonalComplement_singleton_eq_zero [CompleteSpa
     (Submodule.mem_span_singleton_self v)
 #align orthogonal_projection_orthogonal_complement_singleton_eq_zero orthogonalProjection_orthogonalComplement_singleton_eq_zero
 
-/- warning: reflection_orthogonal_complement_singleton_eq_neg -> reflection_orthogonalComplement_singleton_eq_neg is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align reflection_orthogonal_complement_singleton_eq_neg reflection_orthogonalComplement_singleton_eq_negₓ'. -/
 /-- The reflection in `(𝕜 ∙ v)ᗮ` of `v` is `-v`. -/
 theorem reflection_orthogonalComplement_singleton_eq_neg [CompleteSpace E] (v : E) :
     reflection (𝕜 ∙ v)ᗮ v = -v :=
   reflection_mem_subspace_orthogonal_precomplement_eq_neg (Submodule.mem_span_singleton_self v)
 #align reflection_orthogonal_complement_singleton_eq_neg reflection_orthogonalComplement_singleton_eq_neg
 
-/- warning: reflection_sub -> reflection_sub is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align reflection_sub reflection_subₓ'. -/
 theorem reflection_sub [CompleteSpace F] {v w : F} (h : ‖v‖ = ‖w‖) :
     reflection (ℝ ∙ v - w)ᗮ v = w :=
   by
@@ -1246,9 +1072,6 @@ theorem reflection_sub [CompleteSpace F] {v w : F} (h : ‖v‖ = ‖w‖) :
 
 variable (K)
 
-/- warning: eq_sum_orthogonal_projection_self_orthogonal_complement -> eq_sum_orthogonalProjection_self_orthogonalComplement is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align eq_sum_orthogonal_projection_self_orthogonal_complement eq_sum_orthogonalProjection_self_orthogonalComplementₓ'. -/
 /-- 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`.-/
 theorem eq_sum_orthogonalProjection_self_orthogonalComplement [CompleteSpace E] [CompleteSpace K]
@@ -1262,9 +1085,6 @@ theorem eq_sum_orthogonalProjection_self_orthogonalComplement [CompleteSpace E]
     simp [hy]
 #align eq_sum_orthogonal_projection_self_orthogonal_complement eq_sum_orthogonalProjection_self_orthogonalComplement
 
-/- warning: norm_sq_eq_add_norm_sq_projection -> norm_sq_eq_add_norm_sq_projection is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align norm_sq_eq_add_norm_sq_projection norm_sq_eq_add_norm_sq_projectionₓ'. -/
 /-- The Pythagorean theorem, for an orthogonal projection.-/
 theorem norm_sq_eq_add_norm_sq_projection (x : E) (S : Submodule 𝕜 E) [CompleteSpace E]
     [CompleteSpace S] :
@@ -1292,9 +1112,6 @@ theorem id_eq_sum_orthogonalProjection_self_orthogonalComplement [CompleteSpace
 #align id_eq_sum_orthogonal_projection_self_orthogonal_complement id_eq_sum_orthogonalProjection_self_orthogonalComplement
 -/
 
-/- warning: inner_orthogonal_projection_eq_of_mem_right -> inner_orthogonalProjection_eq_of_mem_right is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align inner_orthogonal_projection_eq_of_mem_right inner_orthogonalProjection_eq_of_mem_rightₓ'. -/
 @[simp]
 theorem inner_orthogonalProjection_eq_of_mem_right [CompleteSpace K] (u : K) (v : E) :
     ⟪orthogonalProjection K v, u⟫ = ⟪v, u⟫ :=
@@ -1306,18 +1123,12 @@ theorem inner_orthogonalProjection_eq_of_mem_right [CompleteSpace K] (u : K) (v
     
 #align inner_orthogonal_projection_eq_of_mem_right inner_orthogonalProjection_eq_of_mem_right
 
-/- warning: inner_orthogonal_projection_eq_of_mem_left -> inner_orthogonalProjection_eq_of_mem_left is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align inner_orthogonal_projection_eq_of_mem_left inner_orthogonalProjection_eq_of_mem_leftₓ'. -/
 @[simp]
 theorem inner_orthogonalProjection_eq_of_mem_left [CompleteSpace K] (u : K) (v : E) :
     ⟪u, orthogonalProjection K v⟫ = ⟪(u : E), v⟫ := by
   rw [← inner_conj_symm, ← inner_conj_symm (u : E), inner_orthogonalProjection_eq_of_mem_right]
 #align inner_orthogonal_projection_eq_of_mem_left inner_orthogonalProjection_eq_of_mem_left
 
-/- warning: inner_orthogonal_projection_left_eq_right -> inner_orthogonalProjection_left_eq_right is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align inner_orthogonal_projection_left_eq_right inner_orthogonalProjection_left_eq_rightₓ'. -/
 /-- The orthogonal projection is self-adjoint. -/
 theorem inner_orthogonalProjection_left_eq_right [CompleteSpace K] (u v : E) :
     ⟪↑(orthogonalProjection K u), v⟫ = ⟪u, orthogonalProjection K v⟫ := by
@@ -1334,9 +1145,6 @@ theorem orthogonalProjection_isSymmetric [CompleteSpace K] :
 
 open FiniteDimensional
 
-/- warning: submodule.finrank_add_inf_finrank_orthogonal -> Submodule.finrank_add_inf_finrank_orthogonal is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align submodule.finrank_add_inf_finrank_orthogonal Submodule.finrank_add_inf_finrank_orthogonalₓ'. -/
 /-- 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₂`. -/
@@ -1353,9 +1161,6 @@ theorem Submodule.finrank_add_inf_finrank_orthogonal {K₁ K₂ : Submodule 𝕜
   exact hd.symm
 #align submodule.finrank_add_inf_finrank_orthogonal Submodule.finrank_add_inf_finrank_orthogonal
 
-/- warning: submodule.finrank_add_inf_finrank_orthogonal' -> Submodule.finrank_add_inf_finrank_orthogonal' is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align submodule.finrank_add_inf_finrank_orthogonal' Submodule.finrank_add_inf_finrank_orthogonal'ₓ'. -/
 /-- 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₂`. -/
@@ -1367,9 +1172,6 @@ theorem Submodule.finrank_add_inf_finrank_orthogonal' {K₁ K₂ : Submodule 
   simp [Submodule.finrank_add_inf_finrank_orthogonal h, h_dim]
 #align submodule.finrank_add_inf_finrank_orthogonal' Submodule.finrank_add_inf_finrank_orthogonal'
 
-/- warning: submodule.finrank_add_finrank_orthogonal -> Submodule.finrank_add_finrank_orthogonal is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align submodule.finrank_add_finrank_orthogonal Submodule.finrank_add_finrank_orthogonalₓ'. -/
 /-- 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) :
@@ -1380,9 +1182,6 @@ theorem Submodule.finrank_add_finrank_orthogonal [FiniteDimensional 𝕜 E] (K :
   · simp
 #align submodule.finrank_add_finrank_orthogonal Submodule.finrank_add_finrank_orthogonal
 
-/- warning: submodule.finrank_add_finrank_orthogonal' -> Submodule.finrank_add_finrank_orthogonal' is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align submodule.finrank_add_finrank_orthogonal' Submodule.finrank_add_finrank_orthogonal'ₓ'. -/
 /-- 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}
@@ -1392,9 +1191,6 @@ theorem Submodule.finrank_add_finrank_orthogonal' [FiniteDimensional 𝕜 E] {K
 
 attribute [local instance] fact_finite_dimensional_of_finrank_eq_succ
 
-/- warning: finrank_orthogonal_span_singleton -> finrank_orthogonal_span_singleton is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align finrank_orthogonal_span_singleton finrank_orthogonal_span_singletonₓ'. -/
 /-- 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}
@@ -1403,9 +1199,6 @@ theorem finrank_orthogonal_span_singleton {n : ℕ} [_i : Fact (finrank 𝕜 E =
     simp [finrank_span_singleton hv, _i.elim, add_comm]
 #align finrank_orthogonal_span_singleton finrank_orthogonal_span_singleton
 
-/- warning: linear_isometry_equiv.reflections_generate_dim_aux -> LinearIsometryEquiv.reflections_generate_dim_aux is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align linear_isometry_equiv.reflections_generate_dim_aux LinearIsometryEquiv.reflections_generate_dim_auxₓ'. -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /-- 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
@@ -1485,9 +1278,6 @@ theorem LinearIsometryEquiv.reflections_generate_dim_aux [FiniteDimensional ℝ
     rwa [← mul_assoc, reflection_mul_reflection, one_mul] at this
 #align linear_isometry_equiv.reflections_generate_dim_aux LinearIsometryEquiv.reflections_generate_dim_aux
 
-/- warning: linear_isometry_equiv.reflections_generate_dim -> LinearIsometryEquiv.reflections_generate_dim is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align linear_isometry_equiv.reflections_generate_dim LinearIsometryEquiv.reflections_generate_dimₓ'. -/
 /-- 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`.
 
@@ -1498,9 +1288,6 @@ theorem LinearIsometryEquiv.reflections_generate_dim [FiniteDimensional ℝ F] (
   ⟨l, hl₁.trans (Submodule.finrank_le _), hl₂⟩
 #align linear_isometry_equiv.reflections_generate_dim LinearIsometryEquiv.reflections_generate_dim
 
-/- warning: linear_isometry_equiv.reflections_generate -> LinearIsometryEquiv.reflections_generate is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align linear_isometry_equiv.reflections_generate LinearIsometryEquiv.reflections_generateₓ'. -/
 /-- The orthogonal group of `F` is generated by reflections. -/
 theorem LinearIsometryEquiv.reflections_generate [FiniteDimensional ℝ F] :
     Subgroup.closure (Set.range fun v : F => reflection (ℝ ∙ v)ᗮ) = ⊤ :=
@@ -1520,9 +1307,6 @@ section OrthogonalFamily
 
 variable {ι : Type _}
 
-/- warning: orthogonal_family.is_internal_iff_of_is_complete -> OrthogonalFamily.isInternal_iff_of_isComplete is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align orthogonal_family.is_internal_iff_of_is_complete OrthogonalFamily.isInternal_iff_of_isCompleteₓ'. -/
 /-- 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. -/
@@ -1535,9 +1319,6 @@ theorem OrthogonalFamily.isInternal_iff_of_isComplete [DecidableEq ι] {V : ι 
     true_and_iff, Submodule.orthogonal_eq_bot_iff]
 #align orthogonal_family.is_internal_iff_of_is_complete OrthogonalFamily.isInternal_iff_of_isComplete
 
-/- warning: orthogonal_family.is_internal_iff -> OrthogonalFamily.isInternal_iff is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align orthogonal_family.is_internal_iff OrthogonalFamily.isInternal_iffₓ'. -/
 /-- 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. -/
@@ -1618,12 +1399,6 @@ variable {𝕜 E} {v : Set E}
 
 open FiniteDimensional Submodule Set
 
-/- warning: maximal_orthonormal_iff_orthogonal_complement_eq_bot -> maximal_orthonormal_iff_orthogonalComplement_eq_bot is a dubious translation:
-lean 3 declaration is
-  forall {𝕜 : Type.{u1}} {E : Type.{u2}} [_inst_1 : IsROrC.{u1} 𝕜] [_inst_2 : NormedAddCommGroup.{u2} E] [_inst_4 : InnerProductSpace.{u1, u2} 𝕜 E _inst_1 _inst_2] {v : Set.{u2} E}, (Orthonormal.{u1, u2, u2} 𝕜 E _inst_1 _inst_2 _inst_4 (coeSort.{succ u2, succ (succ u2)} (Set.{u2} E) Type.{u2} (Set.hasCoeToSort.{u2} E) v) ((fun (a : Type.{u2}) (b : Type.{u2}) [self : HasLiftT.{succ u2, succ u2} a b] => self.0) (coeSort.{succ u2, succ (succ u2)} (Set.{u2} E) Type.{u2} (Set.hasCoeToSort.{u2} E) v) E (HasLiftT.mk.{succ u2, succ u2} (coeSort.{succ u2, succ (succ u2)} (Set.{u2} E) Type.{u2} (Set.hasCoeToSort.{u2} E) v) E (CoeTCₓ.coe.{succ u2, succ u2} (coeSort.{succ u2, succ (succ u2)} (Set.{u2} E) Type.{u2} (Set.hasCoeToSort.{u2} E) v) E (coeBase.{succ u2, succ u2} (coeSort.{succ u2, succ (succ u2)} (Set.{u2} E) Type.{u2} (Set.hasCoeToSort.{u2} E) v) E (coeSubtype.{succ u2} E (fun (x : E) => Membership.Mem.{u2, u2} E (Set.{u2} E) (Set.hasMem.{u2} E) x v))))))) -> (Iff (forall (u : Set.{u2} E), (Superset.{u2} (Set.{u2} E) (Set.hasSubset.{u2} E) u v) -> (Orthonormal.{u1, u2, u2} 𝕜 E _inst_1 _inst_2 _inst_4 (coeSort.{succ u2, succ (succ u2)} (Set.{u2} E) Type.{u2} (Set.hasCoeToSort.{u2} E) u) ((fun (a : Type.{u2}) (b : Type.{u2}) [self : HasLiftT.{succ u2, succ u2} a b] => self.0) (coeSort.{succ u2, succ (succ u2)} (Set.{u2} E) Type.{u2} (Set.hasCoeToSort.{u2} E) u) E (HasLiftT.mk.{succ u2, succ u2} (coeSort.{succ u2, succ (succ u2)} (Set.{u2} E) Type.{u2} (Set.hasCoeToSort.{u2} E) u) E (CoeTCₓ.coe.{succ u2, succ u2} (coeSort.{succ u2, succ (succ u2)} (Set.{u2} E) Type.{u2} (Set.hasCoeToSort.{u2} E) u) E (coeBase.{succ u2, succ u2} (coeSort.{succ u2, succ (succ u2)} (Set.{u2} E) Type.{u2} (Set.hasCoeToSort.{u2} E) u) E (coeSubtype.{succ u2} E (fun (x : E) => Membership.Mem.{u2, u2} E (Set.{u2} E) (Set.hasMem.{u2} E) x u))))))) -> (Eq.{succ u2} (Set.{u2} E) u v)) (Eq.{succ u2} (Submodule.{u1, u2} 𝕜 E (Ring.toSemiring.{u1} 𝕜 (NormedRing.toRing.{u1} 𝕜 (NormedCommRing.toNormedRing.{u1} 𝕜 (NormedField.toNormedCommRing.{u1} 𝕜 (DenselyNormedField.toNormedField.{u1} 𝕜 (IsROrC.toDenselyNormedField.{u1} 𝕜 _inst_1)))))) (AddCommGroup.toAddCommMonoid.{u2} E (NormedAddCommGroup.toAddCommGroup.{u2} E _inst_2)) (NormedSpace.toModule.{u1, u2} 𝕜 E (DenselyNormedField.toNormedField.{u1} 𝕜 (IsROrC.toDenselyNormedField.{u1} 𝕜 _inst_1)) (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} E _inst_2) (InnerProductSpace.toNormedSpace.{u1, u2} 𝕜 E _inst_1 _inst_2 _inst_4))) (Submodule.orthogonal.{u1, u2} 𝕜 E _inst_1 _inst_2 _inst_4 (Submodule.span.{u1, u2} 𝕜 E (Ring.toSemiring.{u1} 𝕜 (NormedRing.toRing.{u1} 𝕜 (NormedCommRing.toNormedRing.{u1} 𝕜 (NormedField.toNormedCommRing.{u1} 𝕜 (DenselyNormedField.toNormedField.{u1} 𝕜 (IsROrC.toDenselyNormedField.{u1} 𝕜 _inst_1)))))) (AddCommGroup.toAddCommMonoid.{u2} E (NormedAddCommGroup.toAddCommGroup.{u2} E _inst_2)) (NormedSpace.toModule.{u1, u2} 𝕜 E (DenselyNormedField.toNormedField.{u1} 𝕜 (IsROrC.toDenselyNormedField.{u1} 𝕜 _inst_1)) (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} E _inst_2) (InnerProductSpace.toNormedSpace.{u1, u2} 𝕜 E _inst_1 _inst_2 _inst_4)) v)) (Bot.bot.{u2} (Submodule.{u1, u2} 𝕜 E (Ring.toSemiring.{u1} 𝕜 (NormedRing.toRing.{u1} 𝕜 (NormedCommRing.toNormedRing.{u1} 𝕜 (NormedField.toNormedCommRing.{u1} 𝕜 (DenselyNormedField.toNormedField.{u1} 𝕜 (IsROrC.toDenselyNormedField.{u1} 𝕜 _inst_1)))))) (AddCommGroup.toAddCommMonoid.{u2} E (NormedAddCommGroup.toAddCommGroup.{u2} E _inst_2)) (NormedSpace.toModule.{u1, u2} 𝕜 E (DenselyNormedField.toNormedField.{u1} 𝕜 (IsROrC.toDenselyNormedField.{u1} 𝕜 _inst_1)) (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} E _inst_2) (InnerProductSpace.toNormedSpace.{u1, u2} 𝕜 E _inst_1 _inst_2 _inst_4))) (Submodule.hasBot.{u1, u2} 𝕜 E (Ring.toSemiring.{u1} 𝕜 (NormedRing.toRing.{u1} 𝕜 (NormedCommRing.toNormedRing.{u1} 𝕜 (NormedField.toNormedCommRing.{u1} 𝕜 (DenselyNormedField.toNormedField.{u1} 𝕜 (IsROrC.toDenselyNormedField.{u1} 𝕜 _inst_1)))))) (AddCommGroup.toAddCommMonoid.{u2} E (NormedAddCommGroup.toAddCommGroup.{u2} E _inst_2)) (NormedSpace.toModule.{u1, u2} 𝕜 E (DenselyNormedField.toNormedField.{u1} 𝕜 (IsROrC.toDenselyNormedField.{u1} 𝕜 _inst_1)) (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} E _inst_2) (InnerProductSpace.toNormedSpace.{u1, u2} 𝕜 E _inst_1 _inst_2 _inst_4))))))
-but is expected to have type
-  forall {𝕜 : Type.{u2}} {E : Type.{u1}} [_inst_1 : IsROrC.{u2} 𝕜] [_inst_2 : NormedAddCommGroup.{u1} E] [_inst_4 : InnerProductSpace.{u2, u1} 𝕜 E _inst_1 _inst_2] {v : Set.{u1} E}, (Orthonormal.{u2, u1, u1} 𝕜 E _inst_1 _inst_2 _inst_4 (Subtype.{succ u1} E (fun (x : E) => Membership.mem.{u1, u1} E (Set.{u1} E) (Set.instMembershipSet.{u1} E) x v)) (Subtype.val.{succ u1} E (fun (x : E) => Membership.mem.{u1, u1} E (Set.{u1} E) (Set.instMembershipSet.{u1} E) x v))) -> (Iff (forall (u : Set.{u1} E), (Superset.{u1} (Set.{u1} E) (Set.instHasSubsetSet.{u1} E) u v) -> (Orthonormal.{u2, u1, u1} 𝕜 E _inst_1 _inst_2 _inst_4 (Subtype.{succ u1} E (fun (x : E) => Membership.mem.{u1, u1} E (Set.{u1} E) (Set.instMembershipSet.{u1} E) x u)) (Subtype.val.{succ u1} E (fun (x : E) => Membership.mem.{u1, u1} E (Set.{u1} E) (Set.instMembershipSet.{u1} E) x u))) -> (Eq.{succ u1} (Set.{u1} E) u v)) (Eq.{succ u1} (Submodule.{u2, u1} 𝕜 E (DivisionSemiring.toSemiring.{u2} 𝕜 (Semifield.toDivisionSemiring.{u2} 𝕜 (Field.toSemifield.{u2} 𝕜 (NormedField.toField.{u2} 𝕜 (DenselyNormedField.toNormedField.{u2} 𝕜 (IsROrC.toDenselyNormedField.{u2} 𝕜 _inst_1)))))) (AddCommGroup.toAddCommMonoid.{u1} E (NormedAddCommGroup.toAddCommGroup.{u1} E _inst_2)) (NormedSpace.toModule.{u2, u1} 𝕜 E (DenselyNormedField.toNormedField.{u2} 𝕜 (IsROrC.toDenselyNormedField.{u2} 𝕜 _inst_1)) (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} E _inst_2) (InnerProductSpace.toNormedSpace.{u2, u1} 𝕜 E _inst_1 _inst_2 _inst_4))) (Submodule.orthogonal.{u2, u1} 𝕜 E _inst_1 _inst_2 _inst_4 (Submodule.span.{u2, u1} 𝕜 E (DivisionSemiring.toSemiring.{u2} 𝕜 (Semifield.toDivisionSemiring.{u2} 𝕜 (Field.toSemifield.{u2} 𝕜 (NormedField.toField.{u2} 𝕜 (DenselyNormedField.toNormedField.{u2} 𝕜 (IsROrC.toDenselyNormedField.{u2} 𝕜 _inst_1)))))) (AddCommGroup.toAddCommMonoid.{u1} E (NormedAddCommGroup.toAddCommGroup.{u1} E _inst_2)) (NormedSpace.toModule.{u2, u1} 𝕜 E (DenselyNormedField.toNormedField.{u2} 𝕜 (IsROrC.toDenselyNormedField.{u2} 𝕜 _inst_1)) (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} E _inst_2) (InnerProductSpace.toNormedSpace.{u2, u1} 𝕜 E _inst_1 _inst_2 _inst_4)) v)) (Bot.bot.{u1} (Submodule.{u2, u1} 𝕜 E (DivisionSemiring.toSemiring.{u2} 𝕜 (Semifield.toDivisionSemiring.{u2} 𝕜 (Field.toSemifield.{u2} 𝕜 (NormedField.toField.{u2} 𝕜 (DenselyNormedField.toNormedField.{u2} 𝕜 (IsROrC.toDenselyNormedField.{u2} 𝕜 _inst_1)))))) (AddCommGroup.toAddCommMonoid.{u1} E (NormedAddCommGroup.toAddCommGroup.{u1} E _inst_2)) (NormedSpace.toModule.{u2, u1} 𝕜 E (DenselyNormedField.toNormedField.{u2} 𝕜 (IsROrC.toDenselyNormedField.{u2} 𝕜 _inst_1)) (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} E _inst_2) (InnerProductSpace.toNormedSpace.{u2, u1} 𝕜 E _inst_1 _inst_2 _inst_4))) (Submodule.instBotSubmodule.{u2, u1} 𝕜 E (DivisionSemiring.toSemiring.{u2} 𝕜 (Semifield.toDivisionSemiring.{u2} 𝕜 (Field.toSemifield.{u2} 𝕜 (NormedField.toField.{u2} 𝕜 (DenselyNormedField.toNormedField.{u2} 𝕜 (IsROrC.toDenselyNormedField.{u2} 𝕜 _inst_1)))))) (AddCommGroup.toAddCommMonoid.{u1} E (NormedAddCommGroup.toAddCommGroup.{u1} E _inst_2)) (NormedSpace.toModule.{u2, u1} 𝕜 E (DenselyNormedField.toNormedField.{u2} 𝕜 (IsROrC.toDenselyNormedField.{u2} 𝕜 _inst_1)) (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} E _inst_2) (InnerProductSpace.toNormedSpace.{u2, u1} 𝕜 E _inst_1 _inst_2 _inst_4))))))
-Case conversion may be inaccurate. Consider using '#align maximal_orthonormal_iff_orthogonal_complement_eq_bot maximal_orthonormal_iff_orthogonalComplement_eq_botₓ'. -/
 /- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (u «expr ⊇ » v) -/
 /-- An orthonormal set in an `inner_product_space` is maximal, if and only if the orthogonal
 complement of its span is empty. -/
@@ -1693,9 +1468,6 @@ theorem maximal_orthonormal_iff_orthogonalComplement_eq_bot (hv : Orthonormal 
 
 variable [FiniteDimensional 𝕜 E]
 
-/- warning: maximal_orthonormal_iff_basis_of_finite_dimensional -> maximal_orthonormal_iff_basis_of_finiteDimensional is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align maximal_orthonormal_iff_basis_of_finite_dimensional maximal_orthonormal_iff_basis_of_finiteDimensionalₓ'. -/
 /- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (u «expr ⊇ » v) -/
 /-- An orthonormal set in a finite-dimensional `inner_product_space` is maximal, if and only if it
 is a basis. -/
Diff
@@ -106,10 +106,8 @@ theorem exists_norm_eq_iInf_of_complete_convex {K : Set F} (ne : K.Nonempty) (h
   have norm_tendsto : tendsto (fun n => ‖u - w n‖) at_top (nhds δ) :=
     by
     have h : tendsto (fun n : ℕ => δ) at_top (nhds δ) := tendsto_const_nhds
-    have h' : tendsto (fun n : ℕ => δ + 1 / (n + 1)) at_top (nhds δ) :=
-      by
-      convert h.add tendsto_one_div_add_atTop_nhds_0_nat
-      simp only [add_zero]
+    have h' : tendsto (fun n : ℕ => δ + 1 / (n + 1)) at_top (nhds δ) := by
+      convert h.add tendsto_one_div_add_atTop_nhds_0_nat; simp only [add_zero]
     exact tendsto_of_tendsto_of_tendsto_of_le_of_le h h' (fun x => δ_le _) fun x => le_of_lt (hw _)
   -- Step 2: Prove that the sequence `w : ℕ → K` is a Cauchy sequence
   have seq_is_cauchy : CauchySeq fun n => (w n : F) :=
@@ -120,17 +118,14 @@ theorem exists_norm_eq_iInf_of_complete_convex {K : Set F} (ne : K.Nonempty) (h
     use fun n => sqrt (b n)
     constructor
     -- first goal :  `∀ (n : ℕ), 0 ≤ sqrt (b n)`
-    intro n
+    intro n;
     exact sqrt_nonneg _
     constructor
     -- second goal : `∀ (n m N : ℕ), N ≤ n → N ≤ m → dist ↑(w n) ↑(w m) ≤ sqrt (b N)`
     intro p q N hp hq
-    let wp := (w p : F)
-    let wq := (w q : F)
-    let a := u - wq
-    let b := u - wp
-    let half := 1 / (2 : ℝ)
-    let div := 1 / ((N : ℝ) + 1)
+    let wp := (w p : F); let wq := (w q : F)
+    let a := u - wq; let b := u - wp
+    let half := 1 / (2 : ℝ); let div := 1 / ((N : ℝ) + 1)
     have :
       4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ + ‖wp - wq‖ * ‖wp - wq‖ =
         2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖) :=
@@ -141,9 +136,7 @@ theorem exists_norm_eq_iInf_of_complete_convex {K : Set F} (ne : K.Nonempty) (h
         _ =
             absR (2 : ℝ) * ‖u - half • (wq + wp)‖ * (absR (2 : ℝ) * ‖u - half • (wq + wp)‖) +
               ‖wp - wq‖ * ‖wp - wq‖ :=
-          by
-          rw [_root_.abs_of_nonneg]
-          exact zero_le_two
+          by rw [_root_.abs_of_nonneg]; exact zero_le_two
         _ =
             ‖(2 : ℝ) • (u - half • (wq + wp))‖ * ‖(2 : ℝ) • (u - half • (wq + wp))‖ +
               ‖wp - wq‖ * ‖wp - wq‖ :=
@@ -154,16 +147,13 @@ theorem exists_norm_eq_iInf_of_complete_convex {K : Set F} (ne : K.Nonempty) (h
             one_add_one_eq_two, add_smul]
           simp only [one_smul]
           have eq₁ : wp - wq = a - b := (sub_sub_sub_cancel_left _ _ _).symm
-          have eq₂ : u + u - (wq + wp) = a + b
-          show u + u - (wq + wp) = u - wq + (u - wp)
-          abel
+          have eq₂ : u + u - (wq + wp) = a + b; show u + u - (wq + wp) = u - wq + (u - wp); abel
           rw [eq₁, eq₂]
         _ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖) := parallelogram_law_with_norm ℝ _ _
         
     have eq : δ ≤ ‖u - half • (wq + wp)‖ := by
       rw [smul_add]
-      apply δ_le'
-      apply h₂
+      apply δ_le'; apply h₂
       repeat' exact Subtype.mem _
       repeat' exact le_of_lt one_half_pos
       exact add_halves 1
@@ -178,15 +168,12 @@ theorem exists_norm_eq_iInf_of_complete_convex {K : Set F} (ne : K.Nonempty) (h
       mul_self_le_mul_self (norm_nonneg _)
         (le_trans (le_of_lt <| hw p) (add_le_add_left (Nat.one_div_le_one_div hp) _))
     rw [dist_eq_norm]
-    apply nonneg_le_nonneg_of_sq_le_sq
-    · exact sqrt_nonneg _
+    apply nonneg_le_nonneg_of_sq_le_sq; · exact sqrt_nonneg _
     rw [mul_self_sqrt]
     calc
       ‖wp - wq‖ * ‖wp - wq‖ =
           2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖) - 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ :=
-        by
-        rw [← this]
-        simp
+        by rw [← this]; simp
       _ ≤ 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖) - 4 * δ * δ := (sub_le_sub_left eq₁ _)
       _ ≤ 2 * ((δ + div) * (δ + div) + (δ + div) * (δ + div)) - 4 * δ * δ :=
         (sub_le_sub_right (mul_le_mul_of_nonneg_left (add_le_add eq₂ eq₂') (by norm_num)) _)
@@ -197,8 +184,7 @@ theorem exists_norm_eq_iInf_of_complete_convex {K : Set F} (ne : K.Nonempty) (h
         (mul_nonneg (mul_nonneg (by norm_num) nat.one_div_pos_of_nat.le) nat.one_div_pos_of_nat.le)
     -- third goal : `tendsto (λ (n : ℕ), sqrt (b n)) at_top (𝓝 0)`
     apply tendsto.comp
-    · convert continuous_sqrt.continuous_at
-      exact sqrt_zero.symm
+    · convert continuous_sqrt.continuous_at; exact sqrt_zero.symm
     have eq₁ : tendsto (fun n : ℕ => 8 * δ * (1 / (n + 1))) at_top (nhds (0 : ℝ)) :=
       by
       convert(@tendsto_const_nhds _ _ _ (8 * δ) _).mul tendsto_one_div_add_atTop_nhds_0_nat
@@ -212,13 +198,11 @@ theorem exists_norm_eq_iInf_of_complete_convex {K : Set F} (ne : K.Nonempty) (h
       by
       convert this.mul tendsto_one_div_add_atTop_nhds_0_nat
       simp only [MulZeroClass.mul_zero]
-    convert eq₁.add eq₂
-    simp only [add_zero]
+    convert eq₁.add eq₂; simp only [add_zero]
   -- Step 3: By completeness of `K`, let `w : ℕ → K` converge to some `v : K`.
   -- Prove that it satisfies all requirements.
   rcases cauchySeq_tendsto_of_isComplete h₁ (fun n => _) seq_is_cauchy with ⟨v, hv, w_tendsto⟩
-  use v
-  use hv
+  use v; use hv
   have h_cont : Continuous fun v => ‖u - v‖ :=
     Continuous.comp continuous_norm (Continuous.sub continuous_const continuous_id)
   have : tendsto (fun n => ‖u - w n‖) at_top (nhds ‖u - v‖)
@@ -240,20 +224,12 @@ theorem norm_eq_iInf_iff_real_inner_le_zero {K : Set F} (h : Convex ℝ K) {u :
   Iff.intro
     (by
       intro eq w hw
-      let δ := ⨅ w : K, ‖u - w‖
-      let p := ⟪u - v, w - v⟫_ℝ
-      let q := ‖w - v‖ ^ 2
+      let δ := ⨅ w : K, ‖u - w‖; let p := ⟪u - v, w - v⟫_ℝ; let q := ‖w - v‖ ^ 2
       letI : Nonempty K := ⟨⟨v, hv⟩⟩
       have zero_le_δ : 0 ≤ δ
-      apply le_ciInf
-      intro
-      exact norm_nonneg _
+      apply le_ciInf; intro ; exact norm_nonneg _
       have δ_le : ∀ w : K, δ ≤ ‖u - w‖
-      intro w
-      apply ciInf_le
-      use (0 : ℝ)
-      rintro _ ⟨_, rfl⟩
-      exact norm_nonneg _
+      intro w; apply ciInf_le; use (0 : ℝ); rintro _ ⟨_, rfl⟩; exact norm_nonneg _
       have δ_le' : ∀ w ∈ K, δ ≤ ‖u - w‖ := fun w hw => δ_le ⟨w, hw⟩
       have : ∀ θ : ℝ, 0 < θ → θ ≤ 1 → 2 * p ≤ θ * q
       intro θ hθ₁ hθ₂
@@ -289,7 +265,7 @@ theorem norm_eq_iInf_iff_real_inner_le_zero {K : Set F} (h : Convex ℝ K) {u :
       rw [eq₁, le_add_iff_nonneg_right] at this
       have eq₂ :
         θ * θ * ‖w - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v) =
-          θ * (θ * ‖w - v‖ ^ 2 - 2 * inner (u - v) (w - v))
+          θ * (θ * ‖w - v‖ ^ 2 - 2 * inner (u - v) (w - v));
       ring
       rw [eq₂] at this
       have := le_of_sub_nonneg (nonneg_of_mul_nonneg_right this hθ₁)
@@ -301,12 +277,8 @@ theorem norm_eq_iInf_iff_real_inner_le_zero {K : Set F} (h : Convex ℝ K) {u :
         linarith
         exact this
       · have q_pos : 0 < q
-        apply lt_of_le_of_ne
-        exact sq_nonneg _
-        intro h
-        exact hq h.symm
-        by_contra hp
-        rw [not_le] at hp
+        apply lt_of_le_of_ne; exact sq_nonneg _; intro h; exact hq h.symm
+        by_contra hp; rw [not_le] at hp
         let θ := min (1 : ℝ) (p / q)
         have eq₁ : θ * q ≤ p :=
           calc
@@ -324,28 +296,18 @@ theorem norm_eq_iInf_iff_real_inner_le_zero {K : Set F} (h : Convex ℝ K) {u :
       intro h
       letI : Nonempty K := ⟨⟨v, hv⟩⟩
       apply le_antisymm
-      · apply le_ciInf
-        intro w
+      · apply le_ciInf; intro w
         apply nonneg_le_nonneg_of_sq_le_sq (norm_nonneg _)
         have := h w w.2
         calc
           ‖u - v‖ * ‖u - v‖ ≤ ‖u - v‖ * ‖u - v‖ - 2 * inner (u - v) ((w : F) - v) := by linarith
-          _ ≤ ‖u - v‖ ^ 2 - 2 * inner (u - v) ((w : F) - v) + ‖(w : F) - v‖ ^ 2 :=
-            by
-            rw [sq]
-            refine' le_add_of_nonneg_right _
-            exact sq_nonneg _
+          _ ≤ ‖u - v‖ ^ 2 - 2 * inner (u - v) ((w : F) - v) + ‖(w : F) - v‖ ^ 2 := by rw [sq];
+            refine' le_add_of_nonneg_right _; exact sq_nonneg _
           _ = ‖u - v - (w - v)‖ ^ 2 := (@norm_sub_sq ℝ _ _ _ _ _ _).symm
-          _ = ‖u - w‖ * ‖u - w‖ := by
-            have : u - v - (w - v) = u - w
-            abel
-            rw [this, sq]
+          _ = ‖u - w‖ * ‖u - w‖ := by have : u - v - (w - v) = u - w; abel; rw [this, sq]
           
       · show (⨅ w : K, ‖u - w‖) ≤ (fun w : K => ‖u - w‖) ⟨v, hv⟩
-        apply ciInf_le
-        use 0
-        rintro y ⟨z, rfl⟩
-        exact norm_nonneg _)
+        apply ciInf_le; use 0; rintro y ⟨z, rfl⟩; exact norm_nonneg _)
 #align norm_eq_infi_iff_real_inner_le_zero norm_eq_iInf_iff_real_inner_le_zero
 
 variable (K : Submodule 𝕜 E)
@@ -382,25 +344,20 @@ theorem norm_eq_iInf_iff_real_inner_eq_zero (K : Submodule ℝ F) {u : F} {v : F
   Iff.intro
     (by
       intro h
-      have h : ∀ w ∈ K, ⟪u - v, w - v⟫_ℝ ≤ 0 :=
-        by
-        rwa [norm_eq_iInf_iff_real_inner_le_zero] at h
+      have h : ∀ w ∈ K, ⟪u - v, w - v⟫_ℝ ≤ 0 := by rwa [norm_eq_iInf_iff_real_inner_le_zero] at h;
         exacts[K.convex, hv]
       intro w hw
       have le : ⟪u - v, w⟫_ℝ ≤ 0
       let w' := w + v
       have : w' ∈ K := Submodule.add_mem _ hw hv
       have h₁ := h w' this
-      have h₂ : w' - v = w
-      simp only [add_neg_cancel_right, sub_eq_add_neg]
-      rw [h₂] at h₁
-      exact h₁
+      have h₂ : w' - v = w; simp only [add_neg_cancel_right, sub_eq_add_neg]
+      rw [h₂] at h₁; exact h₁
       have ge : ⟪u - v, w⟫_ℝ ≥ 0
       let w'' := -w + v
       have : w'' ∈ K := Submodule.add_mem _ (Submodule.neg_mem _ hw) hv
       have h₁ := h w'' this
-      have h₂ : w'' - v = -w
-      simp only [neg_inj, add_neg_cancel_right, sub_eq_add_neg]
+      have h₂ : w'' - v = -w; simp only [neg_inj, add_neg_cancel_right, sub_eq_add_neg]
       rw [h₂, inner_neg_right] at h₁
       linarith
       exact le_antisymm le GE.ge)
@@ -436,7 +393,7 @@ theorem norm_eq_iInf_iff_inner_eq_zero {u : E} {v : E} (hv : v ∈ K) :
     intro w hw
     apply ext
     · simp [A w hw]
-    · symm
+    · symm;
       calc
         im (0 : 𝕜) = 0 := im.map_zero
         _ = re ⟪u - v, -I • w⟫ := (A _ (K.smul_mem (-I) hw)).symm
@@ -636,9 +593,7 @@ theorem eq_orthogonalProjection_of_eq_submodule {K' : Submodule 𝕜 E} [Complet
 Case conversion may be inaccurate. Consider using '#align orthogonal_projection_mem_subspace_eq_self orthogonalProjection_mem_subspace_eq_selfₓ'. -/
 /-- The orthogonal projection sends elements of `K` to themselves. -/
 @[simp]
-theorem orthogonalProjection_mem_subspace_eq_self (v : K) : orthogonalProjection K v = v :=
-  by
-  ext
+theorem orthogonalProjection_mem_subspace_eq_self (v : K) : orthogonalProjection K v = v := by ext;
   apply eq_orthogonalProjection_of_mem_of_inner_eq_zero <;> simp
 #align orthogonal_projection_mem_subspace_eq_self orthogonalProjection_mem_subspace_eq_self
 
@@ -728,9 +683,7 @@ theorem smul_orthogonalProjection_singleton {v : E} (w : E) :
     use ⟪v, w⟫
   · intro x hx
     obtain ⟨c, rfl⟩ := submodule.mem_span_singleton.mp hx
-    have hv : ↑‖v‖ ^ 2 = ⟪v, v⟫ := by
-      norm_cast
-      simp [@norm_sq_eq_inner 𝕜]
+    have hv : ↑‖v‖ ^ 2 = ⟪v, v⟫ := by norm_cast; simp [@norm_sq_eq_inner 𝕜]
     simp [inner_sub_left, inner_smul_left, inner_smul_right, map_div₀, mul_comm, hv,
       InnerProductSpace.conj_symm, hv]
 #align smul_orthogonal_projection_singleton smul_orthogonalProjection_singleton
@@ -759,10 +712,8 @@ theorem orthogonalProjection_singleton {v : E} (w : E) :
 Case conversion may be inaccurate. Consider using '#align orthogonal_projection_unit_singleton orthogonalProjection_unit_singletonₓ'. -/
 /-- 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 :=
-  by
-  rw [← smul_orthogonalProjection_singleton 𝕜 w]
-  simp [hv]
+    (orthogonalProjection (𝕜 ∙ v) w : E) = ⟪v, w⟫ • v := by
+  rw [← smul_orthogonalProjection_singleton 𝕜 w]; simp [hv]
 #align orthogonal_projection_unit_singleton orthogonalProjection_unit_singleton
 
 end orthogonalProjection
@@ -1039,9 +990,7 @@ theorem eq_orthogonalProjection_of_mem_orthogonal' [CompleteSpace K] {u v z : E}
 Case conversion may be inaccurate. Consider using '#align orthogonal_projection_mem_subspace_orthogonal_complement_eq_zero orthogonalProjection_mem_subspace_orthogonalComplement_eq_zeroₓ'. -/
 /-- The orthogonal projection onto `K` of an element of `Kᗮ` is zero. -/
 theorem orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero [CompleteSpace K] {v : E}
-    (hv : v ∈ Kᗮ) : orthogonalProjection K v = 0 :=
-  by
-  ext
+    (hv : v ∈ Kᗮ) : orthogonalProjection K v = 0 := by ext;
   convert eq_orthogonalProjection_of_mem_orthogonal _ _ <;> simp [hv]
 #align orthogonal_projection_mem_subspace_orthogonal_complement_eq_zero orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero
 
@@ -1339,9 +1288,7 @@ theorem id_eq_sum_orthogonalProjection_self_orthogonalComplement [CompleteSpace
     [CompleteSpace K] :
     ContinuousLinearMap.id 𝕜 E =
       K.subtypeL.comp (orthogonalProjection K) + Kᗮ.subtypeL.comp (orthogonalProjection Kᗮ) :=
-  by
-  ext w
-  exact eq_sum_orthogonalProjection_self_orthogonalComplement K w
+  by ext w; exact eq_sum_orthogonalProjection_self_orthogonalComplement K w
 #align id_eq_sum_orthogonal_projection_self_orthogonal_complement id_eq_sum_orthogonalProjection_self_orthogonalComplement
 -/
 
@@ -1439,10 +1386,8 @@ Case conversion may be inaccurate. Consider using '#align submodule.finrank_add_
 /-- 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 :=
-  by
-  rw [← add_right_inj (finrank 𝕜 K)]
-  simp [Submodule.finrank_add_finrank_orthogonal, h_dim]
+    {n : ℕ} (h_dim : finrank 𝕜 K + n = finrank 𝕜 E) : finrank 𝕜 Kᗮ = n := by
+  rw [← add_right_inj (finrank 𝕜 K)]; simp [Submodule.finrank_add_finrank_orthogonal, h_dim]
 #align submodule.finrank_add_finrank_orthogonal' Submodule.finrank_add_finrank_orthogonal'
 
 attribute [local instance] fact_finite_dimensional_of_finrank_eq_succ
Diff
@@ -4,10 +4,11 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Zhouhang Zhou, Frédéric Dupuis, Heather Macbeth
 
 ! This file was ported from Lean 3 source module analysis.inner_product_space.projection
-! leanprover-community/mathlib commit 67e606eaea14c7854bdc556bd53d98aefdf76ec0
+! leanprover-community/mathlib commit 0b7c740e25651db0ba63648fbae9f9d6f941e31b
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
+import Mathbin.Algebra.DirectSum.Decomposition
 import Mathbin.Analysis.Convex.Basic
 import Mathbin.Analysis.InnerProductSpace.Orthogonal
 import Mathbin.Analysis.InnerProductSpace.Symmetric
@@ -17,6 +18,9 @@ import Mathbin.Data.IsROrC.Lemmas
 /-!
 # 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
@@ -67,6 +71,12 @@ local notation "absR" => Abs.abs
 /-! ### Orthogonal projection in inner product spaces -/
 
 
+/- warning: exists_norm_eq_infi_of_complete_convex -> exists_norm_eq_iInf_of_complete_convex is a dubious translation:
+lean 3 declaration is
+  forall {F : Type.{u1}} [_inst_3 : NormedAddCommGroup.{u1} F] [_inst_5 : InnerProductSpace.{0, u1} Real F Real.isROrC _inst_3] {K : Set.{u1} F}, (Set.Nonempty.{u1} F K) -> (IsComplete.{u1} F (PseudoMetricSpace.toUniformSpace.{u1} F (SeminormedAddCommGroup.toPseudoMetricSpace.{u1} F (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} F _inst_3))) K) -> (Convex.{0, u1} Real F Real.orderedSemiring (AddCommGroup.toAddCommMonoid.{u1} F (NormedAddCommGroup.toAddCommGroup.{u1} F _inst_3)) (SMulZeroClass.toHasSmul.{0, u1} Real F (AddZeroClass.toHasZero.{u1} F (AddMonoid.toAddZeroClass.{u1} F (AddCommMonoid.toAddMonoid.{u1} F (AddCommGroup.toAddCommMonoid.{u1} F (SeminormedAddCommGroup.toAddCommGroup.{u1} F (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} F _inst_3)))))) (SMulWithZero.toSmulZeroClass.{0, u1} Real F (MulZeroClass.toHasZero.{0} Real (MulZeroOneClass.toMulZeroClass.{0} Real (MonoidWithZero.toMulZeroOneClass.{0} Real (Semiring.toMonoidWithZero.{0} Real (Ring.toSemiring.{0} Real (NormedRing.toRing.{0} Real (NormedCommRing.toNormedRing.{0} Real (NormedField.toNormedCommRing.{0} Real (DenselyNormedField.toNormedField.{0} Real (IsROrC.toDenselyNormedField.{0} Real Real.isROrC)))))))))) (AddZeroClass.toHasZero.{u1} F (AddMonoid.toAddZeroClass.{u1} F (AddCommMonoid.toAddMonoid.{u1} F (AddCommGroup.toAddCommMonoid.{u1} F (SeminormedAddCommGroup.toAddCommGroup.{u1} F (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} F _inst_3)))))) (MulActionWithZero.toSMulWithZero.{0, u1} Real F (Semiring.toMonoidWithZero.{0} Real (Ring.toSemiring.{0} Real (NormedRing.toRing.{0} Real (NormedCommRing.toNormedRing.{0} Real (NormedField.toNormedCommRing.{0} Real (DenselyNormedField.toNormedField.{0} Real (IsROrC.toDenselyNormedField.{0} Real Real.isROrC))))))) (AddZeroClass.toHasZero.{u1} F (AddMonoid.toAddZeroClass.{u1} F (AddCommMonoid.toAddMonoid.{u1} F (AddCommGroup.toAddCommMonoid.{u1} F (SeminormedAddCommGroup.toAddCommGroup.{u1} F (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} F _inst_3)))))) (Module.toMulActionWithZero.{0, u1} Real F (Ring.toSemiring.{0} Real (NormedRing.toRing.{0} Real (NormedCommRing.toNormedRing.{0} Real (NormedField.toNormedCommRing.{0} Real (DenselyNormedField.toNormedField.{0} Real (IsROrC.toDenselyNormedField.{0} Real Real.isROrC)))))) (AddCommGroup.toAddCommMonoid.{u1} F (SeminormedAddCommGroup.toAddCommGroup.{u1} F (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} F _inst_3))) (NormedSpace.toModule.{0, u1} Real F (DenselyNormedField.toNormedField.{0} Real (IsROrC.toDenselyNormedField.{0} Real Real.isROrC)) (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} F _inst_3) (InnerProductSpace.toNormedSpace.{0, u1} Real F Real.isROrC _inst_3 _inst_5)))))) K) -> (forall (u : F), Exists.{succ u1} F (fun (v : F) => Exists.{0} (Membership.Mem.{u1, u1} F (Set.{u1} F) (Set.hasMem.{u1} F) v K) (fun (H : Membership.Mem.{u1, u1} F (Set.{u1} F) (Set.hasMem.{u1} F) v K) => Eq.{1} Real (Norm.norm.{u1} F (NormedAddCommGroup.toHasNorm.{u1} F _inst_3) (HSub.hSub.{u1, u1, u1} F F F (instHSub.{u1} F (SubNegMonoid.toHasSub.{u1} F (AddGroup.toSubNegMonoid.{u1} F (NormedAddGroup.toAddGroup.{u1} F (NormedAddCommGroup.toNormedAddGroup.{u1} F _inst_3))))) u v)) (iInf.{0, succ u1} Real Real.hasInf (coeSort.{succ u1, succ (succ u1)} (Set.{u1} F) Type.{u1} (Set.hasCoeToSort.{u1} F) K) (fun (w : coeSort.{succ u1, succ (succ u1)} (Set.{u1} F) Type.{u1} (Set.hasCoeToSort.{u1} F) K) => Norm.norm.{u1} F (NormedAddCommGroup.toHasNorm.{u1} F _inst_3) (HSub.hSub.{u1, u1, u1} F F F (instHSub.{u1} F (SubNegMonoid.toHasSub.{u1} F (AddGroup.toSubNegMonoid.{u1} F (NormedAddGroup.toAddGroup.{u1} F (NormedAddCommGroup.toNormedAddGroup.{u1} F _inst_3))))) u ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (coeSort.{succ u1, succ (succ u1)} (Set.{u1} F) Type.{u1} (Set.hasCoeToSort.{u1} F) K) F (HasLiftT.mk.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} F) Type.{u1} (Set.hasCoeToSort.{u1} F) K) F (CoeTCₓ.coe.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} F) Type.{u1} (Set.hasCoeToSort.{u1} F) K) F (coeBase.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} F) Type.{u1} (Set.hasCoeToSort.{u1} F) K) F (coeSubtype.{succ u1} F (fun (x : F) => Membership.Mem.{u1, u1} F (Set.{u1} F) (Set.hasMem.{u1} F) x K))))) w)))))))
+but is expected to have type
+  forall {F : Type.{u1}} [_inst_3 : NormedAddCommGroup.{u1} F] [_inst_5 : InnerProductSpace.{0, u1} Real F Real.isROrC _inst_3] {K : Set.{u1} F}, (Set.Nonempty.{u1} F K) -> (IsComplete.{u1} F (PseudoMetricSpace.toUniformSpace.{u1} F (SeminormedAddCommGroup.toPseudoMetricSpace.{u1} F (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} F _inst_3))) K) -> (Convex.{0, u1} Real F Real.orderedSemiring (AddCommGroup.toAddCommMonoid.{u1} F (NormedAddCommGroup.toAddCommGroup.{u1} F _inst_3)) (SMulZeroClass.toSMul.{0, u1} Real F (NegZeroClass.toZero.{u1} F (SubNegZeroMonoid.toNegZeroClass.{u1} F (SubtractionMonoid.toSubNegZeroMonoid.{u1} F (SubtractionCommMonoid.toSubtractionMonoid.{u1} F (AddCommGroup.toDivisionAddCommMonoid.{u1} F (NormedAddCommGroup.toAddCommGroup.{u1} F _inst_3)))))) (SMulWithZero.toSMulZeroClass.{0, u1} Real F Real.instZeroReal (NegZeroClass.toZero.{u1} F (SubNegZeroMonoid.toNegZeroClass.{u1} F (SubtractionMonoid.toSubNegZeroMonoid.{u1} F (SubtractionCommMonoid.toSubtractionMonoid.{u1} F (AddCommGroup.toDivisionAddCommMonoid.{u1} F (NormedAddCommGroup.toAddCommGroup.{u1} F _inst_3)))))) (MulActionWithZero.toSMulWithZero.{0, u1} Real F Real.instMonoidWithZeroReal (NegZeroClass.toZero.{u1} F (SubNegZeroMonoid.toNegZeroClass.{u1} F (SubtractionMonoid.toSubNegZeroMonoid.{u1} F (SubtractionCommMonoid.toSubtractionMonoid.{u1} F (AddCommGroup.toDivisionAddCommMonoid.{u1} F (NormedAddCommGroup.toAddCommGroup.{u1} F _inst_3)))))) (Module.toMulActionWithZero.{0, u1} Real F Real.semiring (AddCommGroup.toAddCommMonoid.{u1} F (NormedAddCommGroup.toAddCommGroup.{u1} F _inst_3)) (NormedSpace.toModule.{0, u1} Real F Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} F _inst_3) (InnerProductSpace.toNormedSpace.{0, u1} Real F Real.isROrC _inst_3 _inst_5)))))) K) -> (forall (u : F), Exists.{succ u1} F (fun (v : F) => And (Membership.mem.{u1, u1} F (Set.{u1} F) (Set.instMembershipSet.{u1} F) v K) (Eq.{1} Real (Norm.norm.{u1} F (NormedAddCommGroup.toNorm.{u1} F _inst_3) (HSub.hSub.{u1, u1, u1} F F F (instHSub.{u1} F (SubNegMonoid.toSub.{u1} F (AddGroup.toSubNegMonoid.{u1} F (NormedAddGroup.toAddGroup.{u1} F (NormedAddCommGroup.toNormedAddGroup.{u1} F _inst_3))))) u v)) (iInf.{0, succ u1} Real Real.instInfSetReal (Set.Elem.{u1} F K) (fun (w : Set.Elem.{u1} F K) => Norm.norm.{u1} F (NormedAddCommGroup.toNorm.{u1} F _inst_3) (HSub.hSub.{u1, u1, u1} F F F (instHSub.{u1} F (SubNegMonoid.toSub.{u1} F (AddGroup.toSubNegMonoid.{u1} F (NormedAddGroup.toAddGroup.{u1} F (NormedAddCommGroup.toNormedAddGroup.{u1} F _inst_3))))) u (Subtype.val.{succ u1} F (fun (x : F) => Membership.mem.{u1, u1} F (Set.{u1} F) (Set.instMembershipSet.{u1} F) x K) w)))))))
+Case conversion may be inaccurate. Consider using '#align exists_norm_eq_infi_of_complete_convex exists_norm_eq_iInf_of_complete_convexₓ'. -/
 -- FIXME this monolithic proof causes a deterministic timeout with `-T50000`
 -- It should be broken in a sequence of more manageable pieces,
 -- perhaps with individual statements for the three steps below.
@@ -217,6 +227,12 @@ theorem exists_norm_eq_iInf_of_complete_convex {K : Set F} (ne : K.Nonempty) (h
   exact Subtype.mem _
 #align exists_norm_eq_infi_of_complete_convex exists_norm_eq_iInf_of_complete_convex
 
+/- warning: norm_eq_infi_iff_real_inner_le_zero -> norm_eq_iInf_iff_real_inner_le_zero is a dubious translation:
+lean 3 declaration is
+  forall {F : Type.{u1}} [_inst_3 : NormedAddCommGroup.{u1} F] [_inst_5 : InnerProductSpace.{0, u1} Real F Real.isROrC _inst_3] {K : Set.{u1} F}, (Convex.{0, u1} Real F Real.orderedSemiring (AddCommGroup.toAddCommMonoid.{u1} F (NormedAddCommGroup.toAddCommGroup.{u1} F _inst_3)) (SMulZeroClass.toHasSmul.{0, u1} Real F (AddZeroClass.toHasZero.{u1} F (AddMonoid.toAddZeroClass.{u1} F (AddCommMonoid.toAddMonoid.{u1} F (AddCommGroup.toAddCommMonoid.{u1} F (SeminormedAddCommGroup.toAddCommGroup.{u1} F (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} F _inst_3)))))) (SMulWithZero.toSmulZeroClass.{0, u1} Real F (MulZeroClass.toHasZero.{0} Real (MulZeroOneClass.toMulZeroClass.{0} Real (MonoidWithZero.toMulZeroOneClass.{0} Real (Semiring.toMonoidWithZero.{0} Real (Ring.toSemiring.{0} Real (NormedRing.toRing.{0} Real (NormedCommRing.toNormedRing.{0} Real (NormedField.toNormedCommRing.{0} Real (DenselyNormedField.toNormedField.{0} Real (IsROrC.toDenselyNormedField.{0} Real Real.isROrC)))))))))) (AddZeroClass.toHasZero.{u1} F (AddMonoid.toAddZeroClass.{u1} F (AddCommMonoid.toAddMonoid.{u1} F (AddCommGroup.toAddCommMonoid.{u1} F (SeminormedAddCommGroup.toAddCommGroup.{u1} F (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} F _inst_3)))))) (MulActionWithZero.toSMulWithZero.{0, u1} Real F (Semiring.toMonoidWithZero.{0} Real (Ring.toSemiring.{0} Real (NormedRing.toRing.{0} Real (NormedCommRing.toNormedRing.{0} Real (NormedField.toNormedCommRing.{0} Real (DenselyNormedField.toNormedField.{0} Real (IsROrC.toDenselyNormedField.{0} Real Real.isROrC))))))) (AddZeroClass.toHasZero.{u1} F (AddMonoid.toAddZeroClass.{u1} F (AddCommMonoid.toAddMonoid.{u1} F (AddCommGroup.toAddCommMonoid.{u1} F (SeminormedAddCommGroup.toAddCommGroup.{u1} F (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} F _inst_3)))))) (Module.toMulActionWithZero.{0, u1} Real F (Ring.toSemiring.{0} Real (NormedRing.toRing.{0} Real (NormedCommRing.toNormedRing.{0} Real (NormedField.toNormedCommRing.{0} Real (DenselyNormedField.toNormedField.{0} Real (IsROrC.toDenselyNormedField.{0} Real Real.isROrC)))))) (AddCommGroup.toAddCommMonoid.{u1} F (SeminormedAddCommGroup.toAddCommGroup.{u1} F (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} F _inst_3))) (NormedSpace.toModule.{0, u1} Real F (DenselyNormedField.toNormedField.{0} Real (IsROrC.toDenselyNormedField.{0} Real Real.isROrC)) (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} F _inst_3) (InnerProductSpace.toNormedSpace.{0, u1} Real F Real.isROrC _inst_3 _inst_5)))))) K) -> (forall {u : F} {v : F}, (Membership.Mem.{u1, u1} F (Set.{u1} F) (Set.hasMem.{u1} F) v K) -> (Iff (Eq.{1} Real (Norm.norm.{u1} F (NormedAddCommGroup.toHasNorm.{u1} F _inst_3) (HSub.hSub.{u1, u1, u1} F F F (instHSub.{u1} F (SubNegMonoid.toHasSub.{u1} F (AddGroup.toSubNegMonoid.{u1} F (NormedAddGroup.toAddGroup.{u1} F (NormedAddCommGroup.toNormedAddGroup.{u1} F _inst_3))))) u v)) (iInf.{0, succ u1} Real Real.hasInf (coeSort.{succ u1, succ (succ u1)} (Set.{u1} F) Type.{u1} (Set.hasCoeToSort.{u1} F) K) (fun (w : coeSort.{succ u1, succ (succ u1)} (Set.{u1} F) Type.{u1} (Set.hasCoeToSort.{u1} F) K) => Norm.norm.{u1} F (NormedAddCommGroup.toHasNorm.{u1} F _inst_3) (HSub.hSub.{u1, u1, u1} F F F (instHSub.{u1} F (SubNegMonoid.toHasSub.{u1} F (AddGroup.toSubNegMonoid.{u1} F (NormedAddGroup.toAddGroup.{u1} F (NormedAddCommGroup.toNormedAddGroup.{u1} F _inst_3))))) u ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (coeSort.{succ u1, succ (succ u1)} (Set.{u1} F) Type.{u1} (Set.hasCoeToSort.{u1} F) K) F (HasLiftT.mk.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} F) Type.{u1} (Set.hasCoeToSort.{u1} F) K) F (CoeTCₓ.coe.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} F) Type.{u1} (Set.hasCoeToSort.{u1} F) K) F (coeBase.{succ u1, succ u1} (coeSort.{succ u1, succ (succ u1)} (Set.{u1} F) Type.{u1} (Set.hasCoeToSort.{u1} F) K) F (coeSubtype.{succ u1} F (fun (x : F) => Membership.Mem.{u1, u1} F (Set.{u1} F) (Set.hasMem.{u1} F) x K))))) w))))) (forall (w : F), (Membership.Mem.{u1, u1} F (Set.{u1} F) (Set.hasMem.{u1} F) w K) -> (LE.le.{0} Real Real.hasLe (Inner.inner.{0, u1} Real F (InnerProductSpace.toHasInner.{0, u1} Real F Real.isROrC _inst_3 _inst_5) (HSub.hSub.{u1, u1, u1} F F F (instHSub.{u1} F (SubNegMonoid.toHasSub.{u1} F (AddGroup.toSubNegMonoid.{u1} F (NormedAddGroup.toAddGroup.{u1} F (NormedAddCommGroup.toNormedAddGroup.{u1} F _inst_3))))) u v) (HSub.hSub.{u1, u1, u1} F F F (instHSub.{u1} F (SubNegMonoid.toHasSub.{u1} F (AddGroup.toSubNegMonoid.{u1} F (NormedAddGroup.toAddGroup.{u1} F (NormedAddCommGroup.toNormedAddGroup.{u1} F _inst_3))))) w v)) (OfNat.ofNat.{0} Real 0 (OfNat.mk.{0} Real 0 (Zero.zero.{0} Real Real.hasZero)))))))
+but is expected to have type
+  forall {F : Type.{u1}} [_inst_3 : NormedAddCommGroup.{u1} F] [_inst_5 : InnerProductSpace.{0, u1} Real F Real.isROrC _inst_3] {K : Set.{u1} F}, (Convex.{0, u1} Real F Real.orderedSemiring (AddCommGroup.toAddCommMonoid.{u1} F (NormedAddCommGroup.toAddCommGroup.{u1} F _inst_3)) (SMulZeroClass.toSMul.{0, u1} Real F (NegZeroClass.toZero.{u1} F (SubNegZeroMonoid.toNegZeroClass.{u1} F (SubtractionMonoid.toSubNegZeroMonoid.{u1} F (SubtractionCommMonoid.toSubtractionMonoid.{u1} F (AddCommGroup.toDivisionAddCommMonoid.{u1} F (NormedAddCommGroup.toAddCommGroup.{u1} F _inst_3)))))) (SMulWithZero.toSMulZeroClass.{0, u1} Real F Real.instZeroReal (NegZeroClass.toZero.{u1} F (SubNegZeroMonoid.toNegZeroClass.{u1} F (SubtractionMonoid.toSubNegZeroMonoid.{u1} F (SubtractionCommMonoid.toSubtractionMonoid.{u1} F (AddCommGroup.toDivisionAddCommMonoid.{u1} F (NormedAddCommGroup.toAddCommGroup.{u1} F _inst_3)))))) (MulActionWithZero.toSMulWithZero.{0, u1} Real F Real.instMonoidWithZeroReal (NegZeroClass.toZero.{u1} F (SubNegZeroMonoid.toNegZeroClass.{u1} F (SubtractionMonoid.toSubNegZeroMonoid.{u1} F (SubtractionCommMonoid.toSubtractionMonoid.{u1} F (AddCommGroup.toDivisionAddCommMonoid.{u1} F (NormedAddCommGroup.toAddCommGroup.{u1} F _inst_3)))))) (Module.toMulActionWithZero.{0, u1} Real F Real.semiring (AddCommGroup.toAddCommMonoid.{u1} F (NormedAddCommGroup.toAddCommGroup.{u1} F _inst_3)) (NormedSpace.toModule.{0, u1} Real F Real.normedField (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} F _inst_3) (InnerProductSpace.toNormedSpace.{0, u1} Real F Real.isROrC _inst_3 _inst_5)))))) K) -> (forall {u : F} {v : F}, (Membership.mem.{u1, u1} F (Set.{u1} F) (Set.instMembershipSet.{u1} F) v K) -> (Iff (Eq.{1} Real (Norm.norm.{u1} F (NormedAddCommGroup.toNorm.{u1} F _inst_3) (HSub.hSub.{u1, u1, u1} F F F (instHSub.{u1} F (SubNegMonoid.toSub.{u1} F (AddGroup.toSubNegMonoid.{u1} F (NormedAddGroup.toAddGroup.{u1} F (NormedAddCommGroup.toNormedAddGroup.{u1} F _inst_3))))) u v)) (iInf.{0, succ u1} Real Real.instInfSetReal (Set.Elem.{u1} F K) (fun (w : Set.Elem.{u1} F K) => Norm.norm.{u1} F (NormedAddCommGroup.toNorm.{u1} F _inst_3) (HSub.hSub.{u1, u1, u1} F F F (instHSub.{u1} F (SubNegMonoid.toSub.{u1} F (AddGroup.toSubNegMonoid.{u1} F (NormedAddGroup.toAddGroup.{u1} F (NormedAddCommGroup.toNormedAddGroup.{u1} F _inst_3))))) u (Subtype.val.{succ u1} F (fun (x : F) => Membership.mem.{u1, u1} F (Set.{u1} F) (Set.instMembershipSet.{u1} F) x K) w))))) (forall (w : F), (Membership.mem.{u1, u1} F (Set.{u1} F) (Set.instMembershipSet.{u1} F) w K) -> (LE.le.{0} Real Real.instLEReal (Inner.inner.{0, u1} Real F (InnerProductSpace.toInner.{0, u1} Real F Real.isROrC _inst_3 _inst_5) (HSub.hSub.{u1, u1, u1} F F F (instHSub.{u1} F (SubNegMonoid.toSub.{u1} F (AddGroup.toSubNegMonoid.{u1} F (NormedAddGroup.toAddGroup.{u1} F (NormedAddCommGroup.toNormedAddGroup.{u1} F _inst_3))))) u v) (HSub.hSub.{u1, u1, u1} F F F (instHSub.{u1} F (SubNegMonoid.toSub.{u1} F (AddGroup.toSubNegMonoid.{u1} F (NormedAddGroup.toAddGroup.{u1} F (NormedAddCommGroup.toNormedAddGroup.{u1} F _inst_3))))) w v)) (OfNat.ofNat.{0} Real 0 (Zero.toOfNat0.{0} Real Real.instZeroReal))))))
+Case conversion may be inaccurate. Consider using '#align norm_eq_infi_iff_real_inner_le_zero norm_eq_iInf_iff_real_inner_le_zeroₓ'. -/
 /-- 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}
@@ -334,6 +350,9 @@ theorem norm_eq_iInf_iff_real_inner_le_zero {K : Set F} (h : Convex ℝ K) {u :
 
 variable (K : Submodule 𝕜 E)
 
+/- warning: exists_norm_eq_infi_of_complete_subspace -> exists_norm_eq_iInf_of_complete_subspace is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align exists_norm_eq_infi_of_complete_subspace exists_norm_eq_iInf_of_complete_subspaceₓ'. -/
 /-- 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`.
@@ -348,6 +367,9 @@ theorem exists_norm_eq_iInf_of_complete_subspace (h : IsComplete (↑K : Set E))
   exact exists_norm_eq_iInf_of_complete_convex ⟨0, K'.zero_mem⟩ h K'.convex
 #align exists_norm_eq_infi_of_complete_subspace exists_norm_eq_iInf_of_complete_subspace
 
+/- warning: norm_eq_infi_iff_real_inner_eq_zero -> norm_eq_iInf_iff_real_inner_eq_zero is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align norm_eq_infi_iff_real_inner_eq_zero norm_eq_iInf_iff_real_inner_eq_zeroₓ'. -/
 /-- 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
@@ -394,6 +416,9 @@ theorem norm_eq_iInf_iff_real_inner_eq_zero (K : Submodule ℝ F) {u : F} {v : F
       exacts[Submodule.convex _, hv])
 #align norm_eq_infi_iff_real_inner_eq_zero norm_eq_iInf_iff_real_inner_eq_zero
 
+/- warning: norm_eq_infi_iff_inner_eq_zero -> norm_eq_iInf_iff_inner_eq_zero is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align norm_eq_infi_iff_inner_eq_zero norm_eq_iInf_iff_inner_eq_zeroₓ'. -/
 /-- 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
@@ -430,6 +455,7 @@ section orthogonalProjection
 
 variable [CompleteSpace K]
 
+#print orthogonalProjectionFn /-
 /-- 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
@@ -437,9 +463,11 @@ be used once that is defined. -/
 def orthogonalProjectionFn (v : E) :=
   (exists_norm_eq_iInf_of_complete_subspace K (completeSpace_coe_iff_isComplete.mp ‹_›) v).some
 #align orthogonal_projection_fn orthogonalProjectionFn
+-/
 
 variable {K}
 
+#print orthogonalProjectionFn_mem /-
 /-- 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. -/
@@ -447,7 +475,11 @@ theorem orthogonalProjectionFn_mem (v : E) : orthogonalProjectionFn K v ∈ K :=
   (exists_norm_eq_iInf_of_complete_subspace K (completeSpace_coe_iff_isComplete.mp ‹_›)
         v).choose_spec.some
 #align orthogonal_projection_fn_mem orthogonalProjectionFn_mem
+-/
 
+/- warning: orthogonal_projection_fn_inner_eq_zero -> orthogonalProjectionFn_inner_eq_zero is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align orthogonal_projection_fn_inner_eq_zero orthogonalProjectionFn_inner_eq_zeroₓ'. -/
 /-- 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. -/
@@ -460,6 +492,9 @@ theorem orthogonalProjectionFn_inner_eq_zero (v : E) :
           v).choose_spec.choose_spec
 #align orthogonal_projection_fn_inner_eq_zero orthogonalProjectionFn_inner_eq_zero
 
+/- warning: eq_orthogonal_projection_fn_of_mem_of_inner_eq_zero -> eq_orthogonalProjectionFn_of_mem_of_inner_eq_zero is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align eq_orthogonal_projection_fn_of_mem_of_inner_eq_zero eq_orthogonalProjectionFn_of_mem_of_inner_eq_zeroₓ'. -/
 /-- 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
@@ -480,6 +515,9 @@ theorem eq_orthogonalProjectionFn_of_mem_of_inner_eq_zero {u v : E} (hvm : v ∈
 
 variable (K)
 
+/- warning: orthogonal_projection_fn_norm_sq -> orthogonalProjectionFn_norm_sq is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align orthogonal_projection_fn_norm_sq orthogonalProjectionFn_norm_sqₓ'. -/
 theorem orthogonalProjectionFn_norm_sq (v : E) :
     ‖v‖ * ‖v‖ =
       ‖v - orthogonalProjectionFn K v‖ * ‖v - orthogonalProjectionFn K v‖ +
@@ -491,6 +529,7 @@ theorem orthogonalProjectionFn_norm_sq (v : E) :
   convert norm_add_sq_eq_norm_sq_add_norm_sq_of_inner_eq_zero (v - p) p h' using 2 <;> simp
 #align orthogonal_projection_fn_norm_sq orthogonalProjectionFn_norm_sq
 
+#print orthogonalProjection /-
 /-- The orthogonal projection onto a complete subspace. -/
 def orthogonalProjection : E →L[𝕜] K :=
   LinearMap.mkContinuous
@@ -524,15 +563,22 @@ def orthogonalProjection : E →L[𝕜] K :=
     change ‖orthogonalProjectionFn K x‖ ^ 2 ≤ ‖x‖ ^ 2
     nlinarith [orthogonalProjectionFn_norm_sq K x]
 #align orthogonal_projection orthogonalProjection
+-/
 
 variable {K}
 
+/- warning: orthogonal_projection_fn_eq -> orthogonalProjectionFn_eq is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align orthogonal_projection_fn_eq orthogonalProjectionFn_eqₓ'. -/
 @[simp]
 theorem orthogonalProjectionFn_eq (v : E) :
     orthogonalProjectionFn K v = (orthogonalProjection K v : E) :=
   rfl
 #align orthogonal_projection_fn_eq orthogonalProjectionFn_eq
 
+/- warning: orthogonal_projection_inner_eq_zero -> orthogonalProjection_inner_eq_zero is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align orthogonal_projection_inner_eq_zero orthogonalProjection_inner_eq_zeroₓ'. -/
 /-- The characterization of the orthogonal projection.  -/
 @[simp]
 theorem orthogonalProjection_inner_eq_zero (v : E) :
@@ -540,6 +586,9 @@ theorem orthogonalProjection_inner_eq_zero (v : E) :
   orthogonalProjectionFn_inner_eq_zero v
 #align orthogonal_projection_inner_eq_zero orthogonalProjection_inner_eq_zero
 
+/- warning: sub_orthogonal_projection_mem_orthogonal -> sub_orthogonalProjection_mem_orthogonal is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align sub_orthogonal_projection_mem_orthogonal sub_orthogonalProjection_mem_orthogonalₓ'. -/
 /-- 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ᗮ :=
@@ -549,6 +598,9 @@ theorem sub_orthogonalProjection_mem_orthogonal (v : E) : v - orthogonalProjecti
   exact orthogonalProjection_inner_eq_zero _ _ hw
 #align sub_orthogonal_projection_mem_orthogonal sub_orthogonalProjection_mem_orthogonal
 
+/- warning: eq_orthogonal_projection_of_mem_of_inner_eq_zero -> eq_orthogonalProjection_of_mem_of_inner_eq_zero is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align eq_orthogonal_projection_of_mem_of_inner_eq_zero eq_orthogonalProjection_of_mem_of_inner_eq_zeroₓ'. -/
 /-- 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)
@@ -556,6 +608,9 @@ theorem eq_orthogonalProjection_of_mem_of_inner_eq_zero {u v : E} (hvm : v ∈ K
   eq_orthogonalProjectionFn_of_mem_of_inner_eq_zero hvm hvo
 #align eq_orthogonal_projection_of_mem_of_inner_eq_zero eq_orthogonalProjection_of_mem_of_inner_eq_zero
 
+/- warning: orthogonal_projection_minimal -> orthogonalProjection_minimal is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align orthogonal_projection_minimal orthogonalProjection_minimalₓ'. -/
 /-- The orthogonal projection of `y` on `U` minimizes the distance `‖y - x‖` for `x ∈ U`. -/
 theorem orthogonalProjection_minimal {U : Submodule 𝕜 E} [CompleteSpace U] (y : E) :
     ‖y - orthogonalProjection U y‖ = ⨅ x : U, ‖y - x‖ :=
@@ -564,6 +619,9 @@ theorem orthogonalProjection_minimal {U : Submodule 𝕜 E} [CompleteSpace U] (y
   exact orthogonalProjection_inner_eq_zero _
 #align orthogonal_projection_minimal orthogonalProjection_minimal
 
+/- warning: eq_orthogonal_projection_of_eq_submodule -> eq_orthogonalProjection_of_eq_submodule is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align eq_orthogonal_projection_of_eq_submodule eq_orthogonalProjection_of_eq_submoduleₓ'. -/
 /-- The orthogonal projections onto equal subspaces are coerced back to the same point in `E`. -/
 theorem eq_orthogonalProjection_of_eq_submodule {K' : Submodule 𝕜 E} [CompleteSpace K'] (h : K = K')
     (u : E) : (orthogonalProjection K u : E) = (orthogonalProjection K' u : E) :=
@@ -573,6 +631,9 @@ theorem eq_orthogonalProjection_of_eq_submodule {K' : Submodule 𝕜 E} [Complet
   exact h
 #align eq_orthogonal_projection_of_eq_submodule eq_orthogonalProjection_of_eq_submodule
 
+/- warning: orthogonal_projection_mem_subspace_eq_self -> orthogonalProjection_mem_subspace_eq_self is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align orthogonal_projection_mem_subspace_eq_self orthogonalProjection_mem_subspace_eq_selfₓ'. -/
 /-- The orthogonal projection sends elements of `K` to themselves. -/
 @[simp]
 theorem orthogonalProjection_mem_subspace_eq_self (v : K) : orthogonalProjection K v = v :=
@@ -581,6 +642,9 @@ theorem orthogonalProjection_mem_subspace_eq_self (v : K) : orthogonalProjection
   apply eq_orthogonalProjection_of_mem_of_inner_eq_zero <;> simp
 #align orthogonal_projection_mem_subspace_eq_self orthogonalProjection_mem_subspace_eq_self
 
+/- warning: orthogonal_projection_eq_self_iff -> orthogonalProjection_eq_self_iff is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align orthogonal_projection_eq_self_iff orthogonalProjection_eq_self_iffₓ'. -/
 /-- 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 :=
   by
@@ -590,6 +654,9 @@ theorem orthogonalProjection_eq_self_iff {v : E} : (orthogonalProjection K v : E
   · simp
 #align orthogonal_projection_eq_self_iff orthogonalProjection_eq_self_iff
 
+/- warning: linear_isometry.map_orthogonal_projection -> LinearIsometry.map_orthogonalProjection is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align linear_isometry.map_orthogonal_projection LinearIsometry.map_orthogonalProjectionₓ'. -/
 theorem LinearIsometry.map_orthogonalProjection {E E' : Type _} [NormedAddCommGroup E]
     [NormedAddCommGroup E'] [InnerProductSpace 𝕜 E] [InnerProductSpace 𝕜 E'] (f : E →ₗᵢ[𝕜] E')
     (p : Submodule 𝕜 E) [CompleteSpace p] (x : E) :
@@ -601,7 +668,10 @@ theorem LinearIsometry.map_orthogonalProjection {E E' : Type _} [NormedAddCommGr
   rw [← f.map_sub, f.inner_map_map, orthogonalProjection_inner_eq_zero x x' hx']
 #align linear_isometry.map_orthogonal_projection LinearIsometry.map_orthogonalProjection
 
-theorem LinearIsometry.map_orthogonal_projection' {E E' : Type _} [NormedAddCommGroup E]
+/- warning: linear_isometry.map_orthogonal_projection' -> LinearIsometry.map_orthogonalProjection' is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align linear_isometry.map_orthogonal_projection' LinearIsometry.map_orthogonalProjection'ₓ'. -/
+theorem LinearIsometry.map_orthogonalProjection' {E E' : Type _} [NormedAddCommGroup E]
     [NormedAddCommGroup E'] [InnerProductSpace 𝕜 E] [InnerProductSpace 𝕜 E'] (f : E →ₗᵢ[𝕜] E')
     (p : Submodule 𝕜 E) [CompleteSpace p] (x : E) :
     f (orthogonalProjection p x) = orthogonalProjection (p.map f) (f x) :=
@@ -610,8 +680,11 @@ theorem LinearIsometry.map_orthogonal_projection' {E E' : Type _} [NormedAddComm
   refine' Submodule.apply_coe_mem_map _ _
   rcases hy with ⟨x', hx', rfl : f x' = y⟩
   rw [← f.map_sub, f.inner_map_map, orthogonalProjection_inner_eq_zero x x' hx']
-#align linear_isometry.map_orthogonal_projection' LinearIsometry.map_orthogonal_projection'
+#align linear_isometry.map_orthogonal_projection' LinearIsometry.map_orthogonalProjection'
 
+/- warning: orthogonal_projection_map_apply -> orthogonalProjection_map_apply is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align orthogonal_projection_map_apply orthogonalProjection_map_applyₓ'. -/
 /-- 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')
@@ -623,6 +696,9 @@ theorem orthogonalProjection_map_apply {E E' : Type _} [NormedAddCommGroup E]
     (f.to_linear_isometry.map_orthogonal_projection p (f.symm x)).symm
 #align orthogonal_projection_map_apply orthogonalProjection_map_apply
 
+/- warning: orthogonal_projection_bot -> orthogonalProjection_bot is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align orthogonal_projection_bot orthogonalProjection_botₓ'. -/
 /-- The orthogonal projection onto the trivial submodule is the zero map. -/
 @[simp]
 theorem orthogonalProjection_bot : orthogonalProjection (⊥ : Submodule 𝕜 E) = 0 := by ext
@@ -630,6 +706,9 @@ theorem orthogonalProjection_bot : orthogonalProjection (⊥ : Submodule 𝕜 E)
 
 variable (K)
 
+/- warning: orthogonal_projection_norm_le -> orthogonalProjection_norm_le is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align orthogonal_projection_norm_le orthogonalProjection_norm_leₓ'. -/
 /-- The orthogonal projection has norm `≤ 1`. -/
 theorem orthogonalProjection_norm_le : ‖orthogonalProjection K‖ ≤ 1 :=
   LinearMap.mkContinuous_norm_le _ (by norm_num) _
@@ -637,6 +716,9 @@ theorem orthogonalProjection_norm_le : ‖orthogonalProjection K‖ ≤ 1 :=
 
 variable (𝕜)
 
+/- warning: smul_orthogonal_projection_singleton -> smul_orthogonalProjection_singleton is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align smul_orthogonal_projection_singleton smul_orthogonalProjection_singletonₓ'. -/
 theorem smul_orthogonalProjection_singleton {v : E} (w : E) :
     (‖v‖ ^ 2 : 𝕜) • (orthogonalProjection (𝕜 ∙ v) w : E) = ⟪v, w⟫ • v :=
   by
@@ -653,6 +735,9 @@ theorem smul_orthogonalProjection_singleton {v : E} (w : E) :
       InnerProductSpace.conj_symm, hv]
 #align smul_orthogonal_projection_singleton smul_orthogonalProjection_singleton
 
+/- warning: orthogonal_projection_singleton -> orthogonalProjection_singleton is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align orthogonal_projection_singleton orthogonalProjection_singletonₓ'. -/
 /-- Formula for orthogonal projection onto a single vector. -/
 theorem orthogonalProjection_singleton {v : E} (w : E) :
     (orthogonalProjection (𝕜 ∙ v) w : E) = (⟪v, w⟫ / ‖v‖ ^ 2) • v :=
@@ -669,6 +754,9 @@ theorem orthogonalProjection_singleton {v : E} (w : E) :
   convert key <;> field_simp [hv']
 #align orthogonal_projection_singleton orthogonalProjection_singleton
 
+/- warning: orthogonal_projection_unit_singleton -> orthogonalProjection_unit_singleton is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align orthogonal_projection_unit_singleton orthogonalProjection_unit_singletonₓ'. -/
 /-- 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 :=
@@ -688,8 +776,9 @@ def reflectionLinearEquiv : E ≃ₗ[𝕜] E :=
   LinearEquiv.ofInvolutive
     (bit0 (K.Subtype.comp (orthogonalProjection K).toLinearMap) - LinearMap.id) fun x => by
     simp [bit0]
-#align reflection_linear_equiv reflectionLinearEquiv
+#align reflection_linear_equiv reflectionLinearEquivₓ
 
+#print reflection /-
 /-- 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
@@ -711,20 +800,26 @@ def reflection : E ≃ₗᵢ[𝕜] E :=
         abel
       · simp only [add_sub_cancel'_right, eq_self_iff_true] }
 #align reflection reflection
+-/
 
 variable {K}
 
 /-- The result of reflecting. -/
 theorem reflection_apply (p : E) : reflection K p = bit0 ↑(orthogonalProjection K p) - p :=
   rfl
-#align reflection_apply reflection_apply
+#align reflection_apply reflection_applyₓ
 
+#print reflection_symm /-
 /-- Reflection is its own inverse. -/
 @[simp]
 theorem reflection_symm : (reflection K).symm = reflection K :=
   rfl
 #align reflection_symm reflection_symm
+-/
 
+/- warning: reflection_inv -> reflection_inv is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align reflection_inv reflection_invₓ'. -/
 /-- Reflection is its own inverse. -/
 @[simp]
 theorem reflection_inv : (reflection K)⁻¹ = reflection K :=
@@ -733,24 +828,35 @@ theorem reflection_inv : (reflection K)⁻¹ = reflection K :=
 
 variable (K)
 
+/- warning: reflection_reflection -> reflection_reflection is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align reflection_reflection reflection_reflectionₓ'. -/
 /-- Reflecting twice in the same subspace. -/
 @[simp]
 theorem reflection_reflection (p : E) : reflection K (reflection K p) = p :=
   (reflection K).left_inv p
 #align reflection_reflection reflection_reflection
 
+/- warning: reflection_involutive -> reflection_involutive is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align reflection_involutive reflection_involutiveₓ'. -/
 /-- Reflection is involutive. -/
 theorem reflection_involutive : Function.Involutive (reflection K) :=
   reflection_reflection K
 #align reflection_involutive reflection_involutive
 
+#print reflection_trans_reflection /-
 /-- Reflection is involutive. -/
 @[simp]
 theorem reflection_trans_reflection :
     (reflection K).trans (reflection K) = LinearIsometryEquiv.refl 𝕜 E :=
   LinearIsometryEquiv.ext <| reflection_involutive K
 #align reflection_trans_reflection reflection_trans_reflection
+-/
 
+/- warning: reflection_mul_reflection -> reflection_mul_reflection is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align reflection_mul_reflection reflection_mul_reflectionₓ'. -/
 /-- Reflection is involutive. -/
 @[simp]
 theorem reflection_mul_reflection : reflection K * reflection K = 1 :=
@@ -759,6 +865,9 @@ theorem reflection_mul_reflection : reflection K * reflection K = 1 :=
 
 variable {K}
 
+/- warning: reflection_eq_self_iff -> reflection_eq_self_iff is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align reflection_eq_self_iff reflection_eq_self_iffₓ'. -/
 /-- 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 :=
   by
@@ -768,10 +877,16 @@ theorem reflection_eq_self_iff (x : E) : reflection K x = x ↔ x ∈ K :=
   exact two_ne_zero
 #align reflection_eq_self_iff reflection_eq_self_iff
 
+/- warning: reflection_mem_subspace_eq_self -> reflection_mem_subspace_eq_self is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align reflection_mem_subspace_eq_self reflection_mem_subspace_eq_selfₓ'. -/
 theorem reflection_mem_subspace_eq_self {x : E} (hx : x ∈ K) : reflection K x = x :=
   (reflection_eq_self_iff x).mpr hx
 #align reflection_mem_subspace_eq_self reflection_mem_subspace_eq_self
 
+/- warning: reflection_map_apply -> reflection_map_apply is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align reflection_map_apply reflection_map_applyₓ'. -/
 /-- 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)
@@ -780,6 +895,9 @@ theorem reflection_map_apply {E E' : Type _} [NormedAddCommGroup E] [NormedAddCo
   simp [bit0, reflection_apply, orthogonalProjection_map_apply f K x]
 #align reflection_map_apply reflection_map_apply
 
+/- warning: reflection_map -> reflection_map is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align reflection_map reflection_mapₓ'. -/
 /-- 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)
@@ -788,6 +906,9 @@ theorem reflection_map {E E' : Type _} [NormedAddCommGroup E] [NormedAddCommGrou
   LinearIsometryEquiv.ext <| reflection_map_apply f K
 #align reflection_map reflection_map
 
+/- warning: reflection_bot -> reflection_bot is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align reflection_bot reflection_botₓ'. -/
 /-- Reflection through the trivial subspace {0} is just negation. -/
 @[simp]
 theorem reflection_bot : reflection (⊥ : Submodule 𝕜 E) = LinearIsometryEquiv.neg 𝕜 := by
@@ -798,6 +919,9 @@ end reflection
 
 section Orthogonal
 
+/- warning: submodule.sup_orthogonal_inf_of_complete_space -> Submodule.sup_orthogonal_inf_of_completeSpace is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align submodule.sup_orthogonal_inf_of_complete_space Submodule.sup_orthogonal_inf_of_completeSpaceₓ'. -/
 /-- 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₂)
     [CompleteSpace K₁] : K₁ ⊔ K₁ᗮ ⊓ K₂ = K₂ := by
@@ -813,6 +937,9 @@ theorem Submodule.sup_orthogonal_inf_of_completeSpace {K₁ K₂ : Submodule 
 
 variable {K}
 
+/- warning: submodule.sup_orthogonal_of_complete_space -> Submodule.sup_orthogonal_of_completeSpace is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align submodule.sup_orthogonal_of_complete_space Submodule.sup_orthogonal_of_completeSpaceₓ'. -/
 /-- If `K` is complete, `K` and `Kᗮ` span the whole space. -/
 theorem Submodule.sup_orthogonal_of_completeSpace [CompleteSpace K] : K ⊔ Kᗮ = ⊤ :=
   by
@@ -822,6 +949,9 @@ theorem Submodule.sup_orthogonal_of_completeSpace [CompleteSpace K] : K ⊔ Kᗮ
 
 variable (K)
 
+/- warning: submodule.exists_sum_mem_mem_orthogonal -> Submodule.exists_sum_mem_mem_orthogonal is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align submodule.exists_sum_mem_mem_orthogonal Submodule.exists_sum_mem_mem_orthogonalₓ'. -/
 /-- If `K` is complete, any `v` in `E` can be expressed as a sum of elements of `K` and `Kᗮ`. -/
 theorem Submodule.exists_sum_mem_mem_orthogonal [CompleteSpace K] (v : E) :
     ∃ y ∈ K, ∃ z ∈ Kᗮ, v = y + z :=
@@ -831,6 +961,7 @@ theorem Submodule.exists_sum_mem_mem_orthogonal [CompleteSpace K] (v : E) :
   exact ⟨y, hy, z, hz, hyz.symm⟩
 #align submodule.exists_sum_mem_mem_orthogonal Submodule.exists_sum_mem_mem_orthogonal
 
+#print Submodule.orthogonal_orthogonal /-
 /-- If `K` is complete, then the orthogonal complement of its orthogonal complement is itself. -/
 @[simp]
 theorem Submodule.orthogonal_orthogonal [CompleteSpace K] : Kᗮᗮ = K :=
@@ -848,7 +979,9 @@ theorem Submodule.orthogonal_orthogonal [CompleteSpace K] : Kᗮᗮ = K :=
     rw [inner_eq_zero_symm]
     exact hw v hv
 #align submodule.orthogonal_orthogonal Submodule.orthogonal_orthogonal
+-/
 
+#print Submodule.orthogonal_orthogonal_eq_closure /-
 theorem Submodule.orthogonal_orthogonal_eq_closure [CompleteSpace E] : Kᗮᗮ = K.topologicalClosure :=
   by
   refine' le_antisymm _ _
@@ -858,14 +991,20 @@ theorem Submodule.orthogonal_orthogonal_eq_closure [CompleteSpace E] : Kᗮᗮ =
     rw [K.topological_closure.orthogonal_orthogonal]
   · exact K.topological_closure_minimal K.le_orthogonal_orthogonal Kᗮ.isClosed_orthogonal
 #align submodule.orthogonal_orthogonal_eq_closure Submodule.orthogonal_orthogonal_eq_closure
+-/
 
 variable {K}
 
+#print Submodule.isCompl_orthogonal_of_completeSpace /-
 /-- If `K` is complete, `K` and `Kᗮ` are complements of each other. -/
 theorem Submodule.isCompl_orthogonal_of_completeSpace [CompleteSpace K] : IsCompl K Kᗮ :=
   ⟨K.orthogonal_disjoint, codisjoint_iff.2 Submodule.sup_orthogonal_of_completeSpace⟩
 #align submodule.is_compl_orthogonal_of_complete_space Submodule.isCompl_orthogonal_of_completeSpace
+-/
 
+/- warning: submodule.orthogonal_eq_bot_iff -> Submodule.orthogonal_eq_bot_iff is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align submodule.orthogonal_eq_bot_iff Submodule.orthogonal_eq_bot_iffₓ'. -/
 @[simp]
 theorem Submodule.orthogonal_eq_bot_iff [CompleteSpace (K : Set E)] : Kᗮ = ⊥ ↔ K = ⊤ :=
   by
@@ -875,6 +1014,9 @@ theorem Submodule.orthogonal_eq_bot_iff [CompleteSpace (K : Set E)] : Kᗮ = ⊥
   rwa [h, sup_comm, bot_sup_eq] at this
 #align submodule.orthogonal_eq_bot_iff Submodule.orthogonal_eq_bot_iff
 
+/- warning: eq_orthogonal_projection_of_mem_orthogonal -> eq_orthogonalProjection_of_mem_orthogonal is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align eq_orthogonal_projection_of_mem_orthogonal eq_orthogonalProjection_of_mem_orthogonalₓ'. -/
 /-- 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 [CompleteSpace K] {u v : E} (hv : v ∈ K)
@@ -882,6 +1024,9 @@ theorem eq_orthogonalProjection_of_mem_orthogonal [CompleteSpace K] {u v : E} (h
   eq_orthogonalProjectionFn_of_mem_of_inner_eq_zero hv fun w => inner_eq_zero_symm.mp ∘ hvo w
 #align eq_orthogonal_projection_of_mem_orthogonal eq_orthogonalProjection_of_mem_orthogonal
 
+/- warning: eq_orthogonal_projection_of_mem_orthogonal' -> eq_orthogonalProjection_of_mem_orthogonal' is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align eq_orthogonal_projection_of_mem_orthogonal' eq_orthogonalProjection_of_mem_orthogonal'ₓ'. -/
 /-- 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' [CompleteSpace K] {u v z : E} (hv : v ∈ K)
@@ -889,21 +1034,30 @@ theorem eq_orthogonalProjection_of_mem_orthogonal' [CompleteSpace K] {u v z : E}
   eq_orthogonalProjection_of_mem_orthogonal hv (by simpa [hu] )
 #align eq_orthogonal_projection_of_mem_orthogonal' eq_orthogonalProjection_of_mem_orthogonal'
 
+/- warning: orthogonal_projection_mem_subspace_orthogonal_complement_eq_zero -> orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align orthogonal_projection_mem_subspace_orthogonal_complement_eq_zero orthogonalProjection_mem_subspace_orthogonalComplement_eq_zeroₓ'. -/
 /-- The orthogonal projection onto `K` of an element of `Kᗮ` is zero. -/
-theorem orthogonalProjection_mem_subspace_orthogonal_complement_eq_zero [CompleteSpace K] {v : E}
+theorem orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero [CompleteSpace K] {v : E}
     (hv : v ∈ Kᗮ) : orthogonalProjection K v = 0 :=
   by
   ext
   convert eq_orthogonalProjection_of_mem_orthogonal _ _ <;> simp [hv]
-#align orthogonal_projection_mem_subspace_orthogonal_complement_eq_zero orthogonalProjection_mem_subspace_orthogonal_complement_eq_zero
+#align orthogonal_projection_mem_subspace_orthogonal_complement_eq_zero orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero
 
+/- warning: submodule.is_ortho.orthogonal_projection_comp_subtypeL -> Submodule.IsOrtho.orthogonalProjection_comp_subtypeL is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align submodule.is_ortho.orthogonal_projection_comp_subtypeL Submodule.IsOrtho.orthogonalProjection_comp_subtypeLₓ'. -/
 /-- The projection into `U` from an orthogonal submodule `V` is the zero map. -/
 theorem Submodule.IsOrtho.orthogonalProjection_comp_subtypeL {U V : Submodule 𝕜 E} [CompleteSpace U]
     (h : U ⟂ V) : orthogonalProjection U ∘L V.subtypeL = 0 :=
   ContinuousLinearMap.ext fun v =>
-    orthogonalProjection_mem_subspace_orthogonal_complement_eq_zero <| h.symm v.Prop
+    orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero <| h.symm v.Prop
 #align submodule.is_ortho.orthogonal_projection_comp_subtypeL Submodule.IsOrtho.orthogonalProjection_comp_subtypeL
 
+/- warning: orthogonal_projection_comp_subtypeL_eq_zero_iff -> orthogonalProjection_comp_subtypeL_eq_zero_iff is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align orthogonal_projection_comp_subtypeL_eq_zero_iff orthogonalProjection_comp_subtypeL_eq_zero_iffₓ'. -/
 /-- 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} [CompleteSpace U] :
     orthogonalProjection U ∘L V.subtypeL = 0 ↔ U ⟂ V :=
@@ -913,6 +1067,9 @@ theorem orthogonalProjection_comp_subtypeL_eq_zero_iff {U V : Submodule 𝕜 E}
     rw [this, Submodule.coe_zero, sub_zero], Submodule.IsOrtho.orthogonalProjection_comp_subtypeL⟩
 #align orthogonal_projection_comp_subtypeL_eq_zero_iff orthogonalProjection_comp_subtypeL_eq_zero_iff
 
+/- warning: orthogonal_projection_eq_linear_proj -> orthogonalProjection_eq_linear_proj is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align orthogonal_projection_eq_linear_proj orthogonalProjection_eq_linear_projₓ'. -/
 theorem orthogonalProjection_eq_linear_proj [CompleteSpace K] (x : E) :
     orthogonalProjection K x =
       K.linearProjOfIsCompl _ Submodule.isCompl_orthogonal_of_completeSpace x :=
@@ -920,37 +1077,51 @@ theorem orthogonalProjection_eq_linear_proj [CompleteSpace K] (x : E) :
   have : IsCompl K Kᗮ := Submodule.isCompl_orthogonal_of_completeSpace
   nth_rw 1 [← Submodule.linear_proj_add_linearProjOfIsCompl_eq_self this x]
   rw [map_add, orthogonalProjection_mem_subspace_eq_self,
-    orthogonalProjection_mem_subspace_orthogonal_complement_eq_zero (Submodule.coe_mem _), add_zero]
+    orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero (Submodule.coe_mem _), add_zero]
 #align orthogonal_projection_eq_linear_proj orthogonalProjection_eq_linear_proj
 
-theorem orthogonalProjection_coe_linearMap_eq_linear_proj [CompleteSpace K] :
+#print orthogonalProjection_coe_linearMap_eq_linearProj /-
+theorem orthogonalProjection_coe_linearMap_eq_linearProj [CompleteSpace K] :
     (orthogonalProjection K : E →ₗ[𝕜] K) =
       K.linearProjOfIsCompl _ Submodule.isCompl_orthogonal_of_completeSpace :=
   LinearMap.ext <| orthogonalProjection_eq_linear_proj
-#align orthogonal_projection_coe_linear_map_eq_linear_proj orthogonalProjection_coe_linearMap_eq_linear_proj
+#align orthogonal_projection_coe_linear_map_eq_linear_proj orthogonalProjection_coe_linearMap_eq_linearProj
+-/
 
+/- warning: reflection_mem_subspace_orthogonal_complement_eq_neg -> reflection_mem_subspace_orthogonalComplement_eq_neg is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align reflection_mem_subspace_orthogonal_complement_eq_neg reflection_mem_subspace_orthogonalComplement_eq_negₓ'. -/
 /-- The reflection in `K` of an element of `Kᗮ` is its negation. -/
-theorem reflection_mem_subspace_orthogonal_complement_eq_neg [CompleteSpace K] {v : E}
+theorem reflection_mem_subspace_orthogonalComplement_eq_neg [CompleteSpace K] {v : E}
     (hv : v ∈ Kᗮ) : reflection K v = -v := by
-  simp [reflection_apply, orthogonalProjection_mem_subspace_orthogonal_complement_eq_zero hv]
-#align reflection_mem_subspace_orthogonal_complement_eq_neg reflection_mem_subspace_orthogonal_complement_eq_neg
+  simp [reflection_apply, orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero hv]
+#align reflection_mem_subspace_orthogonal_complement_eq_neg reflection_mem_subspace_orthogonalComplement_eq_neg
 
+/- warning: orthogonal_projection_mem_subspace_orthogonal_precomplement_eq_zero -> orthogonalProjection_mem_subspace_orthogonal_precomplement_eq_zero is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align orthogonal_projection_mem_subspace_orthogonal_precomplement_eq_zero orthogonalProjection_mem_subspace_orthogonal_precomplement_eq_zeroₓ'. -/
 /-- The orthogonal projection onto `Kᗮ` of an element of `K` is zero. -/
 theorem orthogonalProjection_mem_subspace_orthogonal_precomplement_eq_zero [CompleteSpace E] {v : E}
     (hv : v ∈ K) : orthogonalProjection Kᗮ v = 0 :=
-  orthogonalProjection_mem_subspace_orthogonal_complement_eq_zero (K.le_orthogonal_orthogonal hv)
+  orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero (K.le_orthogonal_orthogonal hv)
 #align orthogonal_projection_mem_subspace_orthogonal_precomplement_eq_zero orthogonalProjection_mem_subspace_orthogonal_precomplement_eq_zero
 
+/- warning: orthogonal_projection_orthogonal_projection_of_le -> orthogonalProjection_orthogonalProjection_of_le is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align orthogonal_projection_orthogonal_projection_of_le orthogonalProjection_orthogonalProjection_of_leₓ'. -/
 /-- 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} [CompleteSpace U]
     [CompleteSpace V] (h : U ≤ V) (x : E) :
     orthogonalProjection U (orthogonalProjection V x) = orthogonalProjection U x :=
   Eq.symm <| by
     simpa only [sub_eq_zero, map_sub] using
-      orthogonalProjection_mem_subspace_orthogonal_complement_eq_zero
+      orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero
         (Submodule.orthogonal_le h (sub_orthogonalProjection_mem_orthogonal x))
 #align orthogonal_projection_orthogonal_projection_of_le orthogonalProjection_orthogonalProjection_of_le
 
+/- warning: orthogonal_projection_tendsto_closure_supr -> orthogonalProjection_tendsto_closure_iSup is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align orthogonal_projection_tendsto_closure_supr orthogonalProjection_tendsto_closure_iSupₓ'. -/
 /-- 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`. -/
@@ -983,6 +1154,9 @@ theorem orthogonalProjection_tendsto_closure_iSup [CompleteSpace E] {ι : Type _
   exact ciInf_le ⟨0, set.forall_range_iff.mpr fun _ => norm_nonneg _⟩ _
 #align orthogonal_projection_tendsto_closure_supr orthogonalProjection_tendsto_closure_iSup
 
+/- warning: orthogonal_projection_tendsto_self -> orthogonalProjection_tendsto_self is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align orthogonal_projection_tendsto_self orthogonalProjection_tendsto_selfₓ'. -/
 /-- 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 ι]
@@ -997,13 +1171,16 @@ theorem orthogonalProjection_tendsto_self [CompleteSpace E] {ι : Type _} [Semil
   trivial
 #align orthogonal_projection_tendsto_self orthogonalProjection_tendsto_self
 
+#print Submodule.triorthogonal_eq_orthogonal /-
 /-- The orthogonal complement satisfies `Kᗮᗮᗮ = Kᗮ`. -/
 theorem Submodule.triorthogonal_eq_orthogonal [CompleteSpace E] : Kᗮᗮᗮ = Kᗮ :=
   by
   rw [Kᗮ.orthogonal_orthogonal_eq_closure]
   exact K.is_closed_orthogonal.submodule_topological_closure_eq
 #align submodule.triorthogonal_eq_orthogonal Submodule.triorthogonal_eq_orthogonal
+-/
 
+#print Submodule.topologicalClosure_eq_top_iff /-
 /-- The closure of `K` is the full space iff `Kᗮ` is trivial. -/
 theorem Submodule.topologicalClosure_eq_top_iff [CompleteSpace E] :
     K.topologicalClosure = ⊤ ↔ Kᗮ = ⊥ :=
@@ -1013,6 +1190,7 @@ theorem Submodule.topologicalClosure_eq_top_iff [CompleteSpace E] :
   · rw [← Submodule.triorthogonal_eq_orthogonal, h, Submodule.top_orthogonal_eq_bot]
   · rw [h, Submodule.bot_orthogonal_eq_top]
 #align submodule.topological_closure_eq_top_iff Submodule.topologicalClosure_eq_top_iff
+-/
 
 namespace Dense
 
@@ -1020,6 +1198,9 @@ open Submodule
 
 variable {x y : E} [CompleteSpace E]
 
+/- warning: dense.eq_of_sub_mem_orthogonal -> Dense.eq_of_sub_mem_orthogonal is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align dense.eq_of_sub_mem_orthogonal Dense.eq_of_sub_mem_orthogonalₓ'. -/
 /-- 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 :=
   by
@@ -1027,48 +1208,73 @@ theorem eq_of_sub_mem_orthogonal (hK : Dense (K : Set E)) (h : x - y ∈ Kᗮ) :
   rwa [hK, Submodule.mem_bot, sub_eq_zero] at h
 #align dense.eq_of_sub_mem_orthogonal Dense.eq_of_sub_mem_orthogonal
 
+/- warning: dense.eq_zero_of_mem_orthogonal -> Dense.eq_zero_of_mem_orthogonal is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align dense.eq_zero_of_mem_orthogonal Dense.eq_zero_of_mem_orthogonalₓ'. -/
 theorem eq_zero_of_mem_orthogonal (hK : Dense (K : Set E)) (h : x ∈ Kᗮ) : x = 0 :=
   hK.eq_of_sub_mem_orthogonal (by rwa [sub_zero])
 #align dense.eq_zero_of_mem_orthogonal Dense.eq_zero_of_mem_orthogonal
 
+#print Dense.eq_of_inner_left /-
 theorem eq_of_inner_left (hK : Dense (K : Set E)) (h : ∀ v : K, ⟪x, v⟫ = ⟪y, v⟫) : x = y :=
   hK.eq_of_sub_mem_orthogonal (Submodule.sub_mem_orthogonal_of_inner_left h)
 #align dense.eq_of_inner_left Dense.eq_of_inner_left
+-/
 
+/- warning: dense.eq_zero_of_inner_left -> Dense.eq_zero_of_inner_left is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align dense.eq_zero_of_inner_left Dense.eq_zero_of_inner_leftₓ'. -/
 theorem eq_zero_of_inner_left (hK : Dense (K : Set E)) (h : ∀ v : K, ⟪x, v⟫ = 0) : x = 0 :=
   hK.eq_of_inner_left fun v => by rw [inner_zero_left, h v]
 #align dense.eq_zero_of_inner_left Dense.eq_zero_of_inner_left
 
+#print Dense.eq_of_inner_right /-
 theorem eq_of_inner_right (hK : Dense (K : Set E)) (h : ∀ v : K, ⟪(v : E), x⟫ = ⟪(v : E), y⟫) :
     x = y :=
   hK.eq_of_sub_mem_orthogonal (Submodule.sub_mem_orthogonal_of_inner_right h)
 #align dense.eq_of_inner_right Dense.eq_of_inner_right
+-/
 
+/- warning: dense.eq_zero_of_inner_right -> Dense.eq_zero_of_inner_right is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align dense.eq_zero_of_inner_right Dense.eq_zero_of_inner_rightₓ'. -/
 theorem eq_zero_of_inner_right (hK : Dense (K : Set E)) (h : ∀ v : K, ⟪(v : E), x⟫ = 0) : x = 0 :=
   hK.eq_of_inner_right fun v => by rw [inner_zero_right, h v]
 #align dense.eq_zero_of_inner_right Dense.eq_zero_of_inner_right
 
 end Dense
 
+/- warning: reflection_mem_subspace_orthogonal_precomplement_eq_neg -> reflection_mem_subspace_orthogonal_precomplement_eq_neg is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align reflection_mem_subspace_orthogonal_precomplement_eq_neg reflection_mem_subspace_orthogonal_precomplement_eq_negₓ'. -/
 /-- The reflection in `Kᗮ` of an element of `K` is its negation. -/
 theorem reflection_mem_subspace_orthogonal_precomplement_eq_neg [CompleteSpace E] {v : E}
     (hv : v ∈ K) : reflection Kᗮ v = -v :=
-  reflection_mem_subspace_orthogonal_complement_eq_neg (K.le_orthogonal_orthogonal hv)
+  reflection_mem_subspace_orthogonalComplement_eq_neg (K.le_orthogonal_orthogonal hv)
 #align reflection_mem_subspace_orthogonal_precomplement_eq_neg reflection_mem_subspace_orthogonal_precomplement_eq_neg
 
+/- warning: orthogonal_projection_orthogonal_complement_singleton_eq_zero -> orthogonalProjection_orthogonalComplement_singleton_eq_zero is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align orthogonal_projection_orthogonal_complement_singleton_eq_zero orthogonalProjection_orthogonalComplement_singleton_eq_zeroₓ'. -/
 /-- The orthogonal projection onto `(𝕜 ∙ v)ᗮ` of `v` is zero. -/
-theorem orthogonalProjection_orthogonal_complement_singleton_eq_zero [CompleteSpace E] (v : E) :
+theorem orthogonalProjection_orthogonalComplement_singleton_eq_zero [CompleteSpace E] (v : E) :
     orthogonalProjection (𝕜 ∙ v)ᗮ v = 0 :=
   orthogonalProjection_mem_subspace_orthogonal_precomplement_eq_zero
     (Submodule.mem_span_singleton_self v)
-#align orthogonal_projection_orthogonal_complement_singleton_eq_zero orthogonalProjection_orthogonal_complement_singleton_eq_zero
+#align orthogonal_projection_orthogonal_complement_singleton_eq_zero orthogonalProjection_orthogonalComplement_singleton_eq_zero
 
+/- warning: reflection_orthogonal_complement_singleton_eq_neg -> reflection_orthogonalComplement_singleton_eq_neg is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align reflection_orthogonal_complement_singleton_eq_neg reflection_orthogonalComplement_singleton_eq_negₓ'. -/
 /-- The reflection in `(𝕜 ∙ v)ᗮ` of `v` is `-v`. -/
-theorem reflection_orthogonal_complement_singleton_eq_neg [CompleteSpace E] (v : E) :
+theorem reflection_orthogonalComplement_singleton_eq_neg [CompleteSpace E] (v : E) :
     reflection (𝕜 ∙ v)ᗮ v = -v :=
   reflection_mem_subspace_orthogonal_precomplement_eq_neg (Submodule.mem_span_singleton_self v)
-#align reflection_orthogonal_complement_singleton_eq_neg reflection_orthogonal_complement_singleton_eq_neg
+#align reflection_orthogonal_complement_singleton_eq_neg reflection_orthogonalComplement_singleton_eq_neg
 
+/- warning: reflection_sub -> reflection_sub is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align reflection_sub reflection_subₓ'. -/
 theorem reflection_sub [CompleteSpace F] {v w : F} (h : ‖v‖ = ‖w‖) :
     reflection (ℝ ∙ v - w)ᗮ v = w :=
   by
@@ -1077,7 +1283,7 @@ theorem reflection_sub [CompleteSpace F] {v w : F} (h : ‖v‖ = ‖w‖) :
     by
     apply smul_right_injective F (by norm_num : (2 : ℝ) ≠ 0)
     simpa [two_smul] using this
-  have h₁ : R (v - w) = -(v - w) := reflection_orthogonal_complement_singleton_eq_neg (v - w)
+  have h₁ : R (v - w) = -(v - w) := reflection_orthogonalComplement_singleton_eq_neg (v - w)
   have h₂ : R (v + w) = v + w :=
     by
     apply reflection_mem_subspace_eq_self
@@ -1091,9 +1297,12 @@ theorem reflection_sub [CompleteSpace F] {v w : F} (h : ‖v‖ = ‖w‖) :
 
 variable (K)
 
+/- warning: eq_sum_orthogonal_projection_self_orthogonal_complement -> eq_sum_orthogonalProjection_self_orthogonalComplement is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align eq_sum_orthogonal_projection_self_orthogonal_complement eq_sum_orthogonalProjection_self_orthogonalComplementₓ'. -/
 /-- 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`.-/
-theorem eq_sum_orthogonalProjection_self_orthogonal_complement [CompleteSpace E] [CompleteSpace K]
+theorem eq_sum_orthogonalProjection_self_orthogonalComplement [CompleteSpace E] [CompleteSpace K]
     (w : E) : w = (orthogonalProjection K w : E) + (orthogonalProjection Kᗮ w : E) :=
   by
   obtain ⟨y, hy, z, hz, hwyz⟩ := K.exists_sum_mem_mem_orthogonal w
@@ -1102,8 +1311,11 @@ theorem eq_sum_orthogonalProjection_self_orthogonal_complement [CompleteSpace E]
   · rw [add_comm] at hwyz
     refine' eq_orthogonalProjection_of_mem_orthogonal' hz _ hwyz
     simp [hy]
-#align eq_sum_orthogonal_projection_self_orthogonal_complement eq_sum_orthogonalProjection_self_orthogonal_complement
+#align eq_sum_orthogonal_projection_self_orthogonal_complement eq_sum_orthogonalProjection_self_orthogonalComplement
 
+/- warning: norm_sq_eq_add_norm_sq_projection -> norm_sq_eq_add_norm_sq_projection is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align norm_sq_eq_add_norm_sq_projection norm_sq_eq_add_norm_sq_projectionₓ'. -/
 /-- The Pythagorean theorem, for an orthogonal projection.-/
 theorem norm_sq_eq_add_norm_sq_projection (x : E) (S : Submodule 𝕜 E) [CompleteSpace E]
     [CompleteSpace S] :
@@ -1111,7 +1323,7 @@ theorem norm_sq_eq_add_norm_sq_projection (x : E) (S : Submodule 𝕜 E) [Comple
   by
   let p1 := orthogonalProjection S
   let p2 := orthogonalProjection Sᗮ
-  have x_decomp : x = p1 x + p2 x := eq_sum_orthogonalProjection_self_orthogonal_complement S x
+  have x_decomp : x = p1 x + p2 x := eq_sum_orthogonalProjection_self_orthogonalComplement S x
   have x_orth : ⟪(p1 x : E), p2 x⟫ = 0 :=
     Submodule.inner_right_of_mem_orthogonal (SetLike.coe_mem (p1 x)) (SetLike.coe_mem (p2 x))
   nth_rw 1 [x_decomp]
@@ -1120,17 +1332,22 @@ theorem norm_sq_eq_add_norm_sq_projection (x : E) (S : Submodule 𝕜 E) [Comple
     Submodule.coe_norm, Submodule.coe_eq_zero]
 #align norm_sq_eq_add_norm_sq_projection norm_sq_eq_add_norm_sq_projection
 
+#print id_eq_sum_orthogonalProjection_self_orthogonalComplement /-
 /-- 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_orthogonal_complement [CompleteSpace E]
+theorem id_eq_sum_orthogonalProjection_self_orthogonalComplement [CompleteSpace E]
     [CompleteSpace K] :
     ContinuousLinearMap.id 𝕜 E =
       K.subtypeL.comp (orthogonalProjection K) + Kᗮ.subtypeL.comp (orthogonalProjection Kᗮ) :=
   by
   ext w
-  exact eq_sum_orthogonalProjection_self_orthogonal_complement K w
-#align id_eq_sum_orthogonal_projection_self_orthogonal_complement id_eq_sum_orthogonalProjection_self_orthogonal_complement
+  exact eq_sum_orthogonalProjection_self_orthogonalComplement K w
+#align id_eq_sum_orthogonal_projection_self_orthogonal_complement id_eq_sum_orthogonalProjection_self_orthogonalComplement
+-/
 
+/- warning: inner_orthogonal_projection_eq_of_mem_right -> inner_orthogonalProjection_eq_of_mem_right is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align inner_orthogonal_projection_eq_of_mem_right inner_orthogonalProjection_eq_of_mem_rightₓ'. -/
 @[simp]
 theorem inner_orthogonalProjection_eq_of_mem_right [CompleteSpace K] (u : K) (v : E) :
     ⟪orthogonalProjection K v, u⟫ = ⟪v, u⟫ :=
@@ -1142,26 +1359,37 @@ theorem inner_orthogonalProjection_eq_of_mem_right [CompleteSpace K] (u : K) (v
     
 #align inner_orthogonal_projection_eq_of_mem_right inner_orthogonalProjection_eq_of_mem_right
 
+/- warning: inner_orthogonal_projection_eq_of_mem_left -> inner_orthogonalProjection_eq_of_mem_left is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align inner_orthogonal_projection_eq_of_mem_left inner_orthogonalProjection_eq_of_mem_leftₓ'. -/
 @[simp]
 theorem inner_orthogonalProjection_eq_of_mem_left [CompleteSpace K] (u : K) (v : E) :
     ⟪u, orthogonalProjection K v⟫ = ⟪(u : E), v⟫ := by
   rw [← inner_conj_symm, ← inner_conj_symm (u : E), inner_orthogonalProjection_eq_of_mem_right]
 #align inner_orthogonal_projection_eq_of_mem_left inner_orthogonalProjection_eq_of_mem_left
 
+/- warning: inner_orthogonal_projection_left_eq_right -> inner_orthogonalProjection_left_eq_right is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align inner_orthogonal_projection_left_eq_right inner_orthogonalProjection_left_eq_rightₓ'. -/
 /-- The orthogonal projection is self-adjoint. -/
 theorem inner_orthogonalProjection_left_eq_right [CompleteSpace K] (u v : E) :
     ⟪↑(orthogonalProjection K u), v⟫ = ⟪u, orthogonalProjection K v⟫ := by
   rw [← inner_orthogonalProjection_eq_of_mem_left, inner_orthogonalProjection_eq_of_mem_right]
 #align inner_orthogonal_projection_left_eq_right inner_orthogonalProjection_left_eq_right
 
+#print orthogonalProjection_isSymmetric /-
 /-- The orthogonal projection is symmetric. -/
 theorem orthogonalProjection_isSymmetric [CompleteSpace K] :
     (K.subtypeL ∘L orthogonalProjection K : E →ₗ[𝕜] E).IsSymmetric :=
   inner_orthogonalProjection_left_eq_right K
 #align orthogonal_projection_is_symmetric orthogonalProjection_isSymmetric
+-/
 
 open FiniteDimensional
 
+/- warning: submodule.finrank_add_inf_finrank_orthogonal -> Submodule.finrank_add_inf_finrank_orthogonal is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align submodule.finrank_add_inf_finrank_orthogonal Submodule.finrank_add_inf_finrank_orthogonalₓ'. -/
 /-- 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₂`. -/
@@ -1178,6 +1406,9 @@ theorem Submodule.finrank_add_inf_finrank_orthogonal {K₁ K₂ : Submodule 𝕜
   exact hd.symm
 #align submodule.finrank_add_inf_finrank_orthogonal Submodule.finrank_add_inf_finrank_orthogonal
 
+/- warning: submodule.finrank_add_inf_finrank_orthogonal' -> Submodule.finrank_add_inf_finrank_orthogonal' is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align submodule.finrank_add_inf_finrank_orthogonal' Submodule.finrank_add_inf_finrank_orthogonal'ₓ'. -/
 /-- 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₂`. -/
@@ -1189,6 +1420,9 @@ theorem Submodule.finrank_add_inf_finrank_orthogonal' {K₁ K₂ : Submodule 
   simp [Submodule.finrank_add_inf_finrank_orthogonal h, h_dim]
 #align submodule.finrank_add_inf_finrank_orthogonal' Submodule.finrank_add_inf_finrank_orthogonal'
 
+/- warning: submodule.finrank_add_finrank_orthogonal -> Submodule.finrank_add_finrank_orthogonal is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align submodule.finrank_add_finrank_orthogonal Submodule.finrank_add_finrank_orthogonalₓ'. -/
 /-- 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) :
@@ -1199,6 +1433,9 @@ theorem Submodule.finrank_add_finrank_orthogonal [FiniteDimensional 𝕜 E] (K :
   · simp
 #align submodule.finrank_add_finrank_orthogonal Submodule.finrank_add_finrank_orthogonal
 
+/- warning: submodule.finrank_add_finrank_orthogonal' -> Submodule.finrank_add_finrank_orthogonal' is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align submodule.finrank_add_finrank_orthogonal' Submodule.finrank_add_finrank_orthogonal'ₓ'. -/
 /-- 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}
@@ -1210,6 +1447,9 @@ theorem Submodule.finrank_add_finrank_orthogonal' [FiniteDimensional 𝕜 E] {K
 
 attribute [local instance] fact_finite_dimensional_of_finrank_eq_succ
 
+/- warning: finrank_orthogonal_span_singleton -> finrank_orthogonal_span_singleton is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align finrank_orthogonal_span_singleton finrank_orthogonal_span_singletonₓ'. -/
 /-- 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}
@@ -1218,6 +1458,9 @@ theorem finrank_orthogonal_span_singleton {n : ℕ} [_i : Fact (finrank 𝕜 E =
     simp [finrank_span_singleton hv, _i.elim, add_comm]
 #align finrank_orthogonal_span_singleton finrank_orthogonal_span_singleton
 
+/- warning: linear_isometry_equiv.reflections_generate_dim_aux -> LinearIsometryEquiv.reflections_generate_dim_aux is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align linear_isometry_equiv.reflections_generate_dim_aux LinearIsometryEquiv.reflections_generate_dim_auxₓ'. -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /-- 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
@@ -1297,6 +1540,9 @@ theorem LinearIsometryEquiv.reflections_generate_dim_aux [FiniteDimensional ℝ
     rwa [← mul_assoc, reflection_mul_reflection, one_mul] at this
 #align linear_isometry_equiv.reflections_generate_dim_aux LinearIsometryEquiv.reflections_generate_dim_aux
 
+/- warning: linear_isometry_equiv.reflections_generate_dim -> LinearIsometryEquiv.reflections_generate_dim is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align linear_isometry_equiv.reflections_generate_dim LinearIsometryEquiv.reflections_generate_dimₓ'. -/
 /-- 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`.
 
@@ -1307,6 +1553,9 @@ theorem LinearIsometryEquiv.reflections_generate_dim [FiniteDimensional ℝ F] (
   ⟨l, hl₁.trans (Submodule.finrank_le _), hl₂⟩
 #align linear_isometry_equiv.reflections_generate_dim LinearIsometryEquiv.reflections_generate_dim
 
+/- warning: linear_isometry_equiv.reflections_generate -> LinearIsometryEquiv.reflections_generate is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align linear_isometry_equiv.reflections_generate LinearIsometryEquiv.reflections_generateₓ'. -/
 /-- The orthogonal group of `F` is generated by reflections. -/
 theorem LinearIsometryEquiv.reflections_generate [FiniteDimensional ℝ F] :
     Subgroup.closure (Set.range fun v : F => reflection (ℝ ∙ v)ᗮ) = ⊤ :=
@@ -1326,6 +1575,9 @@ section OrthogonalFamily
 
 variable {ι : Type _}
 
+/- warning: orthogonal_family.is_internal_iff_of_is_complete -> OrthogonalFamily.isInternal_iff_of_isComplete is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align orthogonal_family.is_internal_iff_of_is_complete OrthogonalFamily.isInternal_iff_of_isCompleteₓ'. -/
 /-- 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. -/
@@ -1338,6 +1590,9 @@ theorem OrthogonalFamily.isInternal_iff_of_isComplete [DecidableEq ι] {V : ι 
     true_and_iff, Submodule.orthogonal_eq_bot_iff]
 #align orthogonal_family.is_internal_iff_of_is_complete OrthogonalFamily.isInternal_iff_of_isComplete
 
+/- warning: orthogonal_family.is_internal_iff -> OrthogonalFamily.isInternal_iff is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align orthogonal_family.is_internal_iff OrthogonalFamily.isInternal_iffₓ'. -/
 /-- 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. -/
@@ -1348,6 +1603,68 @@ theorem OrthogonalFamily.isInternal_iff [DecidableEq ι] [FiniteDimensional 𝕜
   hV.is_internal_iff_of_is_complete (complete_space_coe_iff_is_complete.mp inferInstance)
 #align orthogonal_family.is_internal_iff OrthogonalFamily.isInternal_iff
 
+open DirectSum
+
+/-- 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 :=
+  by
+  refine' Submodule.iSup_induction _ hx (fun i x hx => _) _ fun x y hx hy => _
+  · refine'
+      (Finset.sum_eq_single_of_mem i (Finset.mem_univ _) fun j _ hij => _).trans
+        (orthogonal_projection_eq_self_iff.mpr hx)
+    rw [orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero, Submodule.coe_zero]
+    exact hV.is_ortho hij.symm hx
+  · simp_rw [map_zero, Submodule.coe_zero, Finset.sum_const_zero]
+  · simp_rw [map_add, Submodule.coe_add, Finset.sum_add_distrib]
+    exact congr_arg₂ (· + ·) hx hy
+#align orthogonal_family.sum_projection_of_mem_supr OrthogonalFamily.sum_projection_of_mem_iSup
+
+/-- If a family of submodules is orthogonal, then the `orthogonal_projection` on a direct sum
+is just the coefficient of that direct sum. -/
+theorem OrthogonalFamily.projection_directSum_coe_add_hom [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 :=
+  by
+  induction' x using DirectSum.induction_on with j x x y hx hy
+  · simp
+  · simp_rw [DirectSum.coeAddMonoidHom_of, DirectSum.of, Dfinsupp.singleAddHom_apply]
+    obtain rfl | hij := Decidable.eq_or_ne i j
+    · rw [orthogonalProjection_mem_subspace_eq_self, Dfinsupp.single_eq_same]
+    · rw [orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero,
+        Dfinsupp.single_eq_of_ne hij.symm]
+      exact hV.is_ortho hij.symm x.prop
+  · simp_rw [map_add, Dfinsupp.add_apply]
+    exact congr_arg₂ (· + ·) hx hy
+#align orthogonal_family.projection_direct_sum_coe_add_hom OrthogonalFamily.projection_directSum_coe_add_hom
+
+/-- 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]. -/
+@[reducible]
+def 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
+    where
+  decompose' x := Dfinsupp.equivFunOnFintype.symm fun i => orthogonalProjection (V i) x
+  left_inv x := by
+    dsimp only
+    letI := fun i => Classical.decEq (V i)
+    rw [DirectSum.coeAddMonoidHom, DirectSum.toAddMonoid, Dfinsupp.liftAddHom_apply,
+      Dfinsupp.sumAddHom_apply, Dfinsupp.sum_eq_sum_fintype]
+    · simp_rw [Equiv.apply_symm_apply, AddSubmonoidClass.coe_subtype]
+      exact hV.sum_projection_of_mem_supr _ ((h.ge : _) Submodule.mem_top)
+    · intro i
+      exact map_zero _
+  right_inv x := by
+    dsimp only
+    simp_rw [hV.projection_direct_sum_coe_add_hom, Dfinsupp.equivFunOnFintype_symm_coe]
+#align orthogonal_family.decomposition OrthogonalFamily.decomposition
+
 end OrthogonalFamily
 
 section OrthonormalBasis
@@ -1356,10 +1673,16 @@ variable {𝕜 E} {v : Set E}
 
 open FiniteDimensional Submodule Set
 
+/- warning: maximal_orthonormal_iff_orthogonal_complement_eq_bot -> maximal_orthonormal_iff_orthogonalComplement_eq_bot is a dubious translation:
+lean 3 declaration is
+  forall {𝕜 : Type.{u1}} {E : Type.{u2}} [_inst_1 : IsROrC.{u1} 𝕜] [_inst_2 : NormedAddCommGroup.{u2} E] [_inst_4 : InnerProductSpace.{u1, u2} 𝕜 E _inst_1 _inst_2] {v : Set.{u2} E}, (Orthonormal.{u1, u2, u2} 𝕜 E _inst_1 _inst_2 _inst_4 (coeSort.{succ u2, succ (succ u2)} (Set.{u2} E) Type.{u2} (Set.hasCoeToSort.{u2} E) v) ((fun (a : Type.{u2}) (b : Type.{u2}) [self : HasLiftT.{succ u2, succ u2} a b] => self.0) (coeSort.{succ u2, succ (succ u2)} (Set.{u2} E) Type.{u2} (Set.hasCoeToSort.{u2} E) v) E (HasLiftT.mk.{succ u2, succ u2} (coeSort.{succ u2, succ (succ u2)} (Set.{u2} E) Type.{u2} (Set.hasCoeToSort.{u2} E) v) E (CoeTCₓ.coe.{succ u2, succ u2} (coeSort.{succ u2, succ (succ u2)} (Set.{u2} E) Type.{u2} (Set.hasCoeToSort.{u2} E) v) E (coeBase.{succ u2, succ u2} (coeSort.{succ u2, succ (succ u2)} (Set.{u2} E) Type.{u2} (Set.hasCoeToSort.{u2} E) v) E (coeSubtype.{succ u2} E (fun (x : E) => Membership.Mem.{u2, u2} E (Set.{u2} E) (Set.hasMem.{u2} E) x v))))))) -> (Iff (forall (u : Set.{u2} E), (Superset.{u2} (Set.{u2} E) (Set.hasSubset.{u2} E) u v) -> (Orthonormal.{u1, u2, u2} 𝕜 E _inst_1 _inst_2 _inst_4 (coeSort.{succ u2, succ (succ u2)} (Set.{u2} E) Type.{u2} (Set.hasCoeToSort.{u2} E) u) ((fun (a : Type.{u2}) (b : Type.{u2}) [self : HasLiftT.{succ u2, succ u2} a b] => self.0) (coeSort.{succ u2, succ (succ u2)} (Set.{u2} E) Type.{u2} (Set.hasCoeToSort.{u2} E) u) E (HasLiftT.mk.{succ u2, succ u2} (coeSort.{succ u2, succ (succ u2)} (Set.{u2} E) Type.{u2} (Set.hasCoeToSort.{u2} E) u) E (CoeTCₓ.coe.{succ u2, succ u2} (coeSort.{succ u2, succ (succ u2)} (Set.{u2} E) Type.{u2} (Set.hasCoeToSort.{u2} E) u) E (coeBase.{succ u2, succ u2} (coeSort.{succ u2, succ (succ u2)} (Set.{u2} E) Type.{u2} (Set.hasCoeToSort.{u2} E) u) E (coeSubtype.{succ u2} E (fun (x : E) => Membership.Mem.{u2, u2} E (Set.{u2} E) (Set.hasMem.{u2} E) x u))))))) -> (Eq.{succ u2} (Set.{u2} E) u v)) (Eq.{succ u2} (Submodule.{u1, u2} 𝕜 E (Ring.toSemiring.{u1} 𝕜 (NormedRing.toRing.{u1} 𝕜 (NormedCommRing.toNormedRing.{u1} 𝕜 (NormedField.toNormedCommRing.{u1} 𝕜 (DenselyNormedField.toNormedField.{u1} 𝕜 (IsROrC.toDenselyNormedField.{u1} 𝕜 _inst_1)))))) (AddCommGroup.toAddCommMonoid.{u2} E (NormedAddCommGroup.toAddCommGroup.{u2} E _inst_2)) (NormedSpace.toModule.{u1, u2} 𝕜 E (DenselyNormedField.toNormedField.{u1} 𝕜 (IsROrC.toDenselyNormedField.{u1} 𝕜 _inst_1)) (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} E _inst_2) (InnerProductSpace.toNormedSpace.{u1, u2} 𝕜 E _inst_1 _inst_2 _inst_4))) (Submodule.orthogonal.{u1, u2} 𝕜 E _inst_1 _inst_2 _inst_4 (Submodule.span.{u1, u2} 𝕜 E (Ring.toSemiring.{u1} 𝕜 (NormedRing.toRing.{u1} 𝕜 (NormedCommRing.toNormedRing.{u1} 𝕜 (NormedField.toNormedCommRing.{u1} 𝕜 (DenselyNormedField.toNormedField.{u1} 𝕜 (IsROrC.toDenselyNormedField.{u1} 𝕜 _inst_1)))))) (AddCommGroup.toAddCommMonoid.{u2} E (NormedAddCommGroup.toAddCommGroup.{u2} E _inst_2)) (NormedSpace.toModule.{u1, u2} 𝕜 E (DenselyNormedField.toNormedField.{u1} 𝕜 (IsROrC.toDenselyNormedField.{u1} 𝕜 _inst_1)) (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} E _inst_2) (InnerProductSpace.toNormedSpace.{u1, u2} 𝕜 E _inst_1 _inst_2 _inst_4)) v)) (Bot.bot.{u2} (Submodule.{u1, u2} 𝕜 E (Ring.toSemiring.{u1} 𝕜 (NormedRing.toRing.{u1} 𝕜 (NormedCommRing.toNormedRing.{u1} 𝕜 (NormedField.toNormedCommRing.{u1} 𝕜 (DenselyNormedField.toNormedField.{u1} 𝕜 (IsROrC.toDenselyNormedField.{u1} 𝕜 _inst_1)))))) (AddCommGroup.toAddCommMonoid.{u2} E (NormedAddCommGroup.toAddCommGroup.{u2} E _inst_2)) (NormedSpace.toModule.{u1, u2} 𝕜 E (DenselyNormedField.toNormedField.{u1} 𝕜 (IsROrC.toDenselyNormedField.{u1} 𝕜 _inst_1)) (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} E _inst_2) (InnerProductSpace.toNormedSpace.{u1, u2} 𝕜 E _inst_1 _inst_2 _inst_4))) (Submodule.hasBot.{u1, u2} 𝕜 E (Ring.toSemiring.{u1} 𝕜 (NormedRing.toRing.{u1} 𝕜 (NormedCommRing.toNormedRing.{u1} 𝕜 (NormedField.toNormedCommRing.{u1} 𝕜 (DenselyNormedField.toNormedField.{u1} 𝕜 (IsROrC.toDenselyNormedField.{u1} 𝕜 _inst_1)))))) (AddCommGroup.toAddCommMonoid.{u2} E (NormedAddCommGroup.toAddCommGroup.{u2} E _inst_2)) (NormedSpace.toModule.{u1, u2} 𝕜 E (DenselyNormedField.toNormedField.{u1} 𝕜 (IsROrC.toDenselyNormedField.{u1} 𝕜 _inst_1)) (NormedAddCommGroup.toSeminormedAddCommGroup.{u2} E _inst_2) (InnerProductSpace.toNormedSpace.{u1, u2} 𝕜 E _inst_1 _inst_2 _inst_4))))))
+but is expected to have type
+  forall {𝕜 : Type.{u2}} {E : Type.{u1}} [_inst_1 : IsROrC.{u2} 𝕜] [_inst_2 : NormedAddCommGroup.{u1} E] [_inst_4 : InnerProductSpace.{u2, u1} 𝕜 E _inst_1 _inst_2] {v : Set.{u1} E}, (Orthonormal.{u2, u1, u1} 𝕜 E _inst_1 _inst_2 _inst_4 (Subtype.{succ u1} E (fun (x : E) => Membership.mem.{u1, u1} E (Set.{u1} E) (Set.instMembershipSet.{u1} E) x v)) (Subtype.val.{succ u1} E (fun (x : E) => Membership.mem.{u1, u1} E (Set.{u1} E) (Set.instMembershipSet.{u1} E) x v))) -> (Iff (forall (u : Set.{u1} E), (Superset.{u1} (Set.{u1} E) (Set.instHasSubsetSet.{u1} E) u v) -> (Orthonormal.{u2, u1, u1} 𝕜 E _inst_1 _inst_2 _inst_4 (Subtype.{succ u1} E (fun (x : E) => Membership.mem.{u1, u1} E (Set.{u1} E) (Set.instMembershipSet.{u1} E) x u)) (Subtype.val.{succ u1} E (fun (x : E) => Membership.mem.{u1, u1} E (Set.{u1} E) (Set.instMembershipSet.{u1} E) x u))) -> (Eq.{succ u1} (Set.{u1} E) u v)) (Eq.{succ u1} (Submodule.{u2, u1} 𝕜 E (DivisionSemiring.toSemiring.{u2} 𝕜 (Semifield.toDivisionSemiring.{u2} 𝕜 (Field.toSemifield.{u2} 𝕜 (NormedField.toField.{u2} 𝕜 (DenselyNormedField.toNormedField.{u2} 𝕜 (IsROrC.toDenselyNormedField.{u2} 𝕜 _inst_1)))))) (AddCommGroup.toAddCommMonoid.{u1} E (NormedAddCommGroup.toAddCommGroup.{u1} E _inst_2)) (NormedSpace.toModule.{u2, u1} 𝕜 E (DenselyNormedField.toNormedField.{u2} 𝕜 (IsROrC.toDenselyNormedField.{u2} 𝕜 _inst_1)) (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} E _inst_2) (InnerProductSpace.toNormedSpace.{u2, u1} 𝕜 E _inst_1 _inst_2 _inst_4))) (Submodule.orthogonal.{u2, u1} 𝕜 E _inst_1 _inst_2 _inst_4 (Submodule.span.{u2, u1} 𝕜 E (DivisionSemiring.toSemiring.{u2} 𝕜 (Semifield.toDivisionSemiring.{u2} 𝕜 (Field.toSemifield.{u2} 𝕜 (NormedField.toField.{u2} 𝕜 (DenselyNormedField.toNormedField.{u2} 𝕜 (IsROrC.toDenselyNormedField.{u2} 𝕜 _inst_1)))))) (AddCommGroup.toAddCommMonoid.{u1} E (NormedAddCommGroup.toAddCommGroup.{u1} E _inst_2)) (NormedSpace.toModule.{u2, u1} 𝕜 E (DenselyNormedField.toNormedField.{u2} 𝕜 (IsROrC.toDenselyNormedField.{u2} 𝕜 _inst_1)) (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} E _inst_2) (InnerProductSpace.toNormedSpace.{u2, u1} 𝕜 E _inst_1 _inst_2 _inst_4)) v)) (Bot.bot.{u1} (Submodule.{u2, u1} 𝕜 E (DivisionSemiring.toSemiring.{u2} 𝕜 (Semifield.toDivisionSemiring.{u2} 𝕜 (Field.toSemifield.{u2} 𝕜 (NormedField.toField.{u2} 𝕜 (DenselyNormedField.toNormedField.{u2} 𝕜 (IsROrC.toDenselyNormedField.{u2} 𝕜 _inst_1)))))) (AddCommGroup.toAddCommMonoid.{u1} E (NormedAddCommGroup.toAddCommGroup.{u1} E _inst_2)) (NormedSpace.toModule.{u2, u1} 𝕜 E (DenselyNormedField.toNormedField.{u2} 𝕜 (IsROrC.toDenselyNormedField.{u2} 𝕜 _inst_1)) (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} E _inst_2) (InnerProductSpace.toNormedSpace.{u2, u1} 𝕜 E _inst_1 _inst_2 _inst_4))) (Submodule.instBotSubmodule.{u2, u1} 𝕜 E (DivisionSemiring.toSemiring.{u2} 𝕜 (Semifield.toDivisionSemiring.{u2} 𝕜 (Field.toSemifield.{u2} 𝕜 (NormedField.toField.{u2} 𝕜 (DenselyNormedField.toNormedField.{u2} 𝕜 (IsROrC.toDenselyNormedField.{u2} 𝕜 _inst_1)))))) (AddCommGroup.toAddCommMonoid.{u1} E (NormedAddCommGroup.toAddCommGroup.{u1} E _inst_2)) (NormedSpace.toModule.{u2, u1} 𝕜 E (DenselyNormedField.toNormedField.{u2} 𝕜 (IsROrC.toDenselyNormedField.{u2} 𝕜 _inst_1)) (NormedAddCommGroup.toSeminormedAddCommGroup.{u1} E _inst_2) (InnerProductSpace.toNormedSpace.{u2, u1} 𝕜 E _inst_1 _inst_2 _inst_4))))))
+Case conversion may be inaccurate. Consider using '#align maximal_orthonormal_iff_orthogonal_complement_eq_bot maximal_orthonormal_iff_orthogonalComplement_eq_botₓ'. -/
 /- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (u «expr ⊇ » 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_orthogonal_complement_eq_bot (hv : Orthonormal 𝕜 (coe : v → E)) :
+theorem maximal_orthonormal_iff_orthogonalComplement_eq_bot (hv : Orthonormal 𝕜 (coe : v → E)) :
     (∀ (u) (_ : u ⊇ v), Orthonormal 𝕜 (coe : u → E) → u = v) ↔ (span 𝕜 v)ᗮ = ⊥ :=
   by
   rw [Submodule.eq_bot_iff]
@@ -1421,10 +1744,13 @@ theorem maximal_orthonormal_iff_orthogonal_complement_eq_bot (hv : Orthonormal 
       rw [← Finsupp.mem_span_image_iff_total]
       simp [huv, inter_eq_self_of_subset_left, hy]
     exact hu.inner_finsupp_eq_zero hxv' hl
-#align maximal_orthonormal_iff_orthogonal_complement_eq_bot maximal_orthonormal_iff_orthogonal_complement_eq_bot
+#align maximal_orthonormal_iff_orthogonal_complement_eq_bot maximal_orthonormal_iff_orthogonalComplement_eq_bot
 
 variable [FiniteDimensional 𝕜 E]
 
+/- warning: maximal_orthonormal_iff_basis_of_finite_dimensional -> maximal_orthonormal_iff_basis_of_finiteDimensional is a dubious translation:
+<too large>
+Case conversion may be inaccurate. Consider using '#align maximal_orthonormal_iff_basis_of_finite_dimensional maximal_orthonormal_iff_basis_of_finiteDimensionalₓ'. -/
 /- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (u «expr ⊇ » v) -/
 /-- An orthonormal set in a finite-dimensional `inner_product_space` is maximal, if and only if it
 is a basis. -/
@@ -1432,7 +1758,7 @@ theorem maximal_orthonormal_iff_basis_of_finiteDimensional (hv : Orthonormal 
     (∀ (u) (_ : u ⊇ v), Orthonormal 𝕜 (coe : u → E) → u = v) ↔ ∃ b : Basis v 𝕜 E, ⇑b = coe :=
   by
   haveI := proper_is_R_or_C 𝕜 (span 𝕜 v)
-  rw [maximal_orthonormal_iff_orthogonal_complement_eq_bot hv]
+  rw [maximal_orthonormal_iff_orthogonalComplement_eq_bot hv]
   have hv_compl : IsComplete (span 𝕜 v : Set E) := (span 𝕜 v).complete_of_finiteDimensional
   rw [Submodule.orthogonal_eq_bot_iff]
   have hv_coe : range (coe : v → E) = v := by simp
Diff
@@ -1155,10 +1155,10 @@ theorem inner_orthogonalProjection_left_eq_right [CompleteSpace K] (u v : E) :
 #align inner_orthogonal_projection_left_eq_right inner_orthogonalProjection_left_eq_right
 
 /-- The orthogonal projection is symmetric. -/
-theorem orthogonalProjectionIsSymmetric [CompleteSpace K] :
+theorem orthogonalProjection_isSymmetric [CompleteSpace K] :
     (K.subtypeL ∘L orthogonalProjection K : E →ₗ[𝕜] E).IsSymmetric :=
   inner_orthogonalProjection_left_eq_right K
-#align orthogonal_projection_is_symmetric orthogonalProjectionIsSymmetric
+#align orthogonal_projection_is_symmetric orthogonalProjection_isSymmetric
 
 open FiniteDimensional
 
Diff
@@ -74,13 +74,13 @@ local notation "absR" => Abs.abs
 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_infᵢ_of_complete_convex {K : Set F} (ne : K.Nonempty) (h₁ : IsComplete K)
+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‖ := fun u =>
   by
   let δ := ⨅ w : K, ‖u - w‖
   letI : Nonempty K := ne.to_subtype
-  have zero_le_δ : 0 ≤ δ := le_cinfᵢ fun _ => norm_nonneg _
-  have δ_le : ∀ w : K, δ ≤ ‖u - w‖ := cinfᵢ_le ⟨0, Set.forall_range_iff.2 fun _ => norm_nonneg _⟩
+  have zero_le_δ : 0 ≤ δ := le_ciInf fun _ => norm_nonneg _
+  have δ_le : ∀ w : K, δ ≤ ‖u - w‖ := ciInf_le ⟨0, Set.forall_range_iff.2 fun _ => norm_nonneg _⟩
   have δ_le' : ∀ w ∈ K, δ ≤ ‖u - w‖ := fun w hw => δ_le ⟨w, hw⟩
   -- Step 1: since `δ` is the infimum, can find a sequence `w : ℕ → K` in `K`
   -- such that `‖u - w n‖ < δ + 1 / (n + 1)` (which implies `‖u - w n‖ --> δ`);
@@ -89,7 +89,7 @@ theorem exists_norm_eq_infᵢ_of_complete_convex {K : Set F} (ne : K.Nonempty) (
     by
     have hδ : ∀ n : ℕ, δ < δ + 1 / (n + 1) := fun n =>
       lt_add_of_le_of_pos le_rfl Nat.one_div_pos_of_nat
-    have h := fun n => exists_lt_of_cinfᵢ_lt (hδ n)
+    have h := fun n => exists_lt_of_ciInf_lt (hδ n)
     let w : ℕ → K := fun n => Classical.choose (h n)
     exact ⟨w, fun n => Classical.choose_spec (h n)⟩
   rcases exists_seq with ⟨w, hw⟩
@@ -215,11 +215,11 @@ theorem exists_norm_eq_infᵢ_of_complete_convex {K : Set F} (ne : K.Nonempty) (
   convert tendsto.comp h_cont.continuous_at w_tendsto
   exact tendsto_nhds_unique this norm_tendsto
   exact Subtype.mem _
-#align exists_norm_eq_infi_of_complete_convex exists_norm_eq_infᵢ_of_complete_convex
+#align exists_norm_eq_infi_of_complete_convex exists_norm_eq_iInf_of_complete_convex
 
 /-- Characterization of minimizers for the projection on a convex set in a real inner product
 space. -/
-theorem norm_eq_infᵢ_iff_real_inner_le_zero {K : Set F} (h : Convex ℝ K) {u : F} {v : F}
+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 :=
   Iff.intro
     (by
@@ -229,12 +229,12 @@ theorem norm_eq_infᵢ_iff_real_inner_le_zero {K : Set F} (h : Convex ℝ K) {u
       let q := ‖w - v‖ ^ 2
       letI : Nonempty K := ⟨⟨v, hv⟩⟩
       have zero_le_δ : 0 ≤ δ
-      apply le_cinfᵢ
+      apply le_ciInf
       intro
       exact norm_nonneg _
       have δ_le : ∀ w : K, δ ≤ ‖u - w‖
       intro w
-      apply cinfᵢ_le
+      apply ciInf_le
       use (0 : ℝ)
       rintro _ ⟨_, rfl⟩
       exact norm_nonneg _
@@ -308,7 +308,7 @@ theorem norm_eq_infᵢ_iff_real_inner_le_zero {K : Set F} (h : Convex ℝ K) {u
       intro h
       letI : Nonempty K := ⟨⟨v, hv⟩⟩
       apply le_antisymm
-      · apply le_cinfᵢ
+      · apply le_ciInf
         intro w
         apply nonneg_le_nonneg_of_sq_le_sq (norm_nonneg _)
         have := h w w.2
@@ -326,11 +326,11 @@ theorem norm_eq_infᵢ_iff_real_inner_le_zero {K : Set F} (h : Convex ℝ K) {u
             rw [this, sq]
           
       · show (⨅ w : K, ‖u - w‖) ≤ (fun w : K => ‖u - w‖) ⟨v, hv⟩
-        apply cinfᵢ_le
+        apply ciInf_le
         use 0
         rintro y ⟨z, rfl⟩
         exact norm_nonneg _)
-#align norm_eq_infi_iff_real_inner_le_zero norm_eq_infᵢ_iff_real_inner_le_zero
+#align norm_eq_infi_iff_real_inner_le_zero norm_eq_iInf_iff_real_inner_le_zero
 
 variable (K : Submodule 𝕜 E)
 
@@ -339,14 +339,14 @@ Let `u` be a point in an inner product space, and let `K` be a nonempty complete
 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_infᵢ_of_complete_subspace (h : IsComplete (↑K : Set E)) :
+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‖ :=
   by
   letI : InnerProductSpace ℝ E := InnerProductSpace.isROrCToReal 𝕜 E
   letI : Module ℝ E := RestrictScalars.module ℝ 𝕜 E
   let K' : Submodule ℝ E := Submodule.restrictScalars ℝ K
-  exact exists_norm_eq_infᵢ_of_complete_convex ⟨0, K'.zero_mem⟩ h K'.convex
-#align exists_norm_eq_infi_of_complete_subspace exists_norm_eq_infᵢ_of_complete_subspace
+  exact exists_norm_eq_iInf_of_complete_convex ⟨0, K'.zero_mem⟩ h K'.convex
+#align exists_norm_eq_infi_of_complete_subspace exists_norm_eq_iInf_of_complete_subspace
 
 /-- 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.
@@ -355,14 +355,14 @@ for all `w ∈ K`, `⟪u - v, w⟫ = 0` (i.e., `u - v` is orthogonal to the subs
 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_infᵢ_iff_real_inner_eq_zero (K : Submodule ℝ F) {u : F} {v : F} (hv : v ∈ K) :
+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 :=
   Iff.intro
     (by
       intro h
       have h : ∀ w ∈ K, ⟪u - v, w - v⟫_ℝ ≤ 0 :=
         by
-        rwa [norm_eq_infᵢ_iff_real_inner_le_zero] at h
+        rwa [norm_eq_iInf_iff_real_inner_le_zero] at h
         exacts[K.convex, hv]
       intro w hw
       have le : ⟪u - v, w⟫_ℝ ≤ 0
@@ -390,16 +390,16 @@ theorem norm_eq_infᵢ_iff_real_inner_eq_zero (K : Submodule ℝ F) {u : F} {v :
       have : w' ∈ K := Submodule.sub_mem _ hw hv
       have h₁ := h w' this
       exact le_of_eq h₁
-      rwa [norm_eq_infᵢ_iff_real_inner_le_zero]
+      rwa [norm_eq_iInf_iff_real_inner_le_zero]
       exacts[Submodule.convex _, hv])
-#align norm_eq_infi_iff_real_inner_eq_zero norm_eq_infᵢ_iff_real_inner_eq_zero
+#align norm_eq_infi_iff_real_inner_eq_zero norm_eq_iInf_iff_real_inner_eq_zero
 
 /-- 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_infᵢ_iff_inner_eq_zero {u : E} {v : E} (hv : v ∈ 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 :=
   by
   letI : InnerProductSpace ℝ E := InnerProductSpace.isROrCToReal 𝕜 E
@@ -407,7 +407,7 @@ theorem norm_eq_infᵢ_iff_inner_eq_zero {u : E} {v : E} (hv : v ∈ K) :
   let K' : Submodule ℝ E := K.restrict_scalars ℝ
   constructor
   · intro H
-    have A : ∀ w ∈ K, re ⟪u - v, w⟫ = 0 := (norm_eq_infᵢ_iff_real_inner_eq_zero K' hv).1 H
+    have A : ∀ w ∈ K, re ⟪u - v, w⟫ = 0 := (norm_eq_iInf_iff_real_inner_eq_zero K' hv).1 H
     intro w hw
     apply ext
     · simp [A w hw]
@@ -423,8 +423,8 @@ theorem norm_eq_infᵢ_iff_inner_eq_zero {u : E} {v : E} (hv : v ∈ K) :
       intro w hw
       rw [real_inner_eq_re_inner, H w hw]
       exact zero_re'
-    exact (norm_eq_infᵢ_iff_real_inner_eq_zero K' hv).2 this
-#align norm_eq_infi_iff_inner_eq_zero norm_eq_infᵢ_iff_inner_eq_zero
+    exact (norm_eq_iInf_iff_real_inner_eq_zero K' hv).2 this
+#align norm_eq_infi_iff_inner_eq_zero norm_eq_iInf_iff_inner_eq_zero
 
 section orthogonalProjection
 
@@ -435,7 +435,7 @@ 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. -/
 def orthogonalProjectionFn (v : E) :=
-  (exists_norm_eq_infᵢ_of_complete_subspace K (completeSpace_coe_iff_isComplete.mp ‹_›) v).some
+  (exists_norm_eq_iInf_of_complete_subspace K (completeSpace_coe_iff_isComplete.mp ‹_›) v).some
 #align orthogonal_projection_fn orthogonalProjectionFn
 
 variable {K}
@@ -444,7 +444,7 @@ variable {K}
 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 :=
-  (exists_norm_eq_infᵢ_of_complete_subspace K (completeSpace_coe_iff_isComplete.mp ‹_›)
+  (exists_norm_eq_iInf_of_complete_subspace K (completeSpace_coe_iff_isComplete.mp ‹_›)
         v).choose_spec.some
 #align orthogonal_projection_fn_mem orthogonalProjectionFn_mem
 
@@ -454,9 +454,9 @@ and should not be used once that is defined. -/
 theorem orthogonalProjectionFn_inner_eq_zero (v : E) :
     ∀ w ∈ K, ⟪v - orthogonalProjectionFn K v, w⟫ = 0 :=
   by
-  rw [← norm_eq_infᵢ_iff_inner_eq_zero K (orthogonalProjectionFn_mem v)]
+  rw [← norm_eq_iInf_iff_inner_eq_zero K (orthogonalProjectionFn_mem v)]
   exact
-    (exists_norm_eq_infᵢ_of_complete_subspace K (complete_space_coe_iff_is_complete.mp ‹_›)
+    (exists_norm_eq_iInf_of_complete_subspace K (complete_space_coe_iff_is_complete.mp ‹_›)
           v).choose_spec.choose_spec
 #align orthogonal_projection_fn_inner_eq_zero orthogonalProjectionFn_inner_eq_zero
 
@@ -560,7 +560,7 @@ theorem eq_orthogonalProjection_of_mem_of_inner_eq_zero {u v : E} (hvm : v ∈ K
 theorem orthogonalProjection_minimal {U : Submodule 𝕜 E} [CompleteSpace U] (y : E) :
     ‖y - orthogonalProjection U y‖ = ⨅ x : U, ‖y - x‖ :=
   by
-  rw [norm_eq_infᵢ_iff_inner_eq_zero _ (Submodule.coe_mem _)]
+  rw [norm_eq_iInf_iff_inner_eq_zero _ (Submodule.coe_mem _)]
   exact orthogonalProjection_inner_eq_zero _
 #align orthogonal_projection_minimal orthogonalProjection_minimal
 
@@ -954,7 +954,7 @@ theorem orthogonalProjection_orthogonalProjection_of_le {U V : Submodule 𝕜 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 orthogonalProjection_tendsto_closure_supᵢ [CompleteSpace E] {ι : Type _} [SemilatticeSup ι]
+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)) :=
@@ -965,7 +965,7 @@ theorem orthogonalProjection_tendsto_closure_supᵢ [CompleteSpace E] {ι : Type
   let y := (orthogonalProjection (⨆ i, U i).topologicalClosure x : E)
   have proj_x : ∀ i, orthogonalProjection (U i) x = orthogonalProjection (U i) y := fun i =>
     (orthogonalProjection_orthogonalProjection_of_le
-        ((le_supᵢ U i).trans (supᵢ U).le_topologicalClosure) _).symm
+        ((le_iSup U i).trans (iSup U).le_topologicalClosure) _).symm
   suffices ∀ ε > 0, ∃ I, ∀ i ≥ I, ‖(orthogonalProjection (U i) y : E) - y‖ < ε by
     simpa only [proj_x, NormedAddCommGroup.tendsto_atTop] using this
   intro ε hε
@@ -975,13 +975,13 @@ theorem orthogonalProjection_tendsto_closure_supᵢ [CompleteSpace E] {ι : Type
     rw [← SetLike.mem_coe, Submodule.topologicalClosure_coe, Metric.mem_closure_iff] at y_mem
     exact y_mem ε hε
   rw [dist_eq_norm] at hay
-  obtain ⟨I, hI⟩ : ∃ I, a ∈ U I := by rwa [Submodule.mem_supᵢ_of_directed _ hU.directed_le] at ha
+  obtain ⟨I, hI⟩ : ∃ I, a ∈ U I := by rwa [Submodule.mem_iSup_of_directed _ hU.directed_le] at ha
   refine' ⟨I, fun i (hi : I ≤ i) => _⟩
   rw [norm_sub_rev, orthogonalProjection_minimal]
   refine' lt_of_le_of_lt _ hay
   change _ ≤ ‖y - (⟨a, hU hi hI⟩ : U i)‖
-  exact cinfᵢ_le ⟨0, set.forall_range_iff.mpr fun _ => norm_nonneg _⟩ _
-#align orthogonal_projection_tendsto_closure_supr orthogonalProjection_tendsto_closure_supᵢ
+  exact ciInf_le ⟨0, set.forall_range_iff.mpr fun _ => norm_nonneg _⟩ _
+#align orthogonal_projection_tendsto_closure_supr orthogonalProjection_tendsto_closure_iSup
 
 /-- 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`. -/
@@ -991,7 +991,7 @@ theorem orthogonalProjection_tendsto_self [CompleteSpace E] {ι : Type _} [Semil
     Filter.Tendsto (fun t => (orthogonalProjection (U t) x : E)) atTop (𝓝 x) :=
   by
   rw [← eq_top_iff] at hU'
-  convert orthogonalProjection_tendsto_closure_supᵢ U hU x
+  convert orthogonalProjection_tendsto_closure_iSup U hU x
   rw [orthogonal_projection_eq_self_iff.mpr _]
   rw [hU']
   trivial
@@ -1331,10 +1331,10 @@ they provide an internal direct sum decomposition of `E`) if and only if their s
 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 (↑(supᵢ V) : Set E)) : DirectSum.IsInternal V ↔ (supᵢ V)ᗮ = ⊥ :=
+    (hc : IsComplete (↑(iSup V) : Set E)) : DirectSum.IsInternal V ↔ (iSup V)ᗮ = ⊥ :=
   by
-  haveI : CompleteSpace ↥(supᵢ V) := hc.complete_space_coe
-  simp only [DirectSum.isInternal_submodule_iff_independent_and_supᵢ_eq_top, hV.independent,
+  haveI : CompleteSpace ↥(iSup V) := hc.complete_space_coe
+  simp only [DirectSum.isInternal_submodule_iff_independent_and_iSup_eq_top, hV.independent,
     true_and_iff, Submodule.orthogonal_eq_bot_iff]
 #align orthogonal_family.is_internal_iff_of_is_complete OrthogonalFamily.isInternal_iff_of_isComplete
 
@@ -1343,8 +1343,8 @@ they provide an internal direct sum decomposition of `E`) if and only if their s
 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 ↔ (supᵢ V)ᗮ = ⊥ :=
-  haveI h := FiniteDimensional.proper_isROrC 𝕜 ↥(supᵢ V)
+    DirectSum.IsInternal V ↔ (iSup V)ᗮ = ⊥ :=
+  haveI h := FiniteDimensional.proper_isROrC 𝕜 ↥(iSup V)
   hV.is_internal_iff_of_is_complete (complete_space_coe_iff_is_complete.mp inferInstance)
 #align orthogonal_family.is_internal_iff OrthogonalFamily.isInternal_iff
 
Diff
@@ -1155,10 +1155,10 @@ theorem inner_orthogonalProjection_left_eq_right [CompleteSpace K] (u v : E) :
 #align inner_orthogonal_projection_left_eq_right inner_orthogonalProjection_left_eq_right
 
 /-- The orthogonal projection is symmetric. -/
-theorem orthogonalProjection_isSymmetric [CompleteSpace K] :
+theorem orthogonalProjectionIsSymmetric [CompleteSpace K] :
     (K.subtypeL ∘L orthogonalProjection K : E →ₗ[𝕜] E).IsSymmetric :=
   inner_orthogonalProjection_left_eq_right K
-#align orthogonal_projection_is_symmetric orthogonalProjection_isSymmetric
+#align orthogonal_projection_is_symmetric orthogonalProjectionIsSymmetric
 
 open FiniteDimensional
 
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Zhouhang Zhou, Frédéric Dupuis, Heather Macbeth
 
 ! This file was ported from Lean 3 source module analysis.inner_product_space.projection
-! leanprover-community/mathlib commit 039a089d2a4b93c761b234f3e5f5aeb752bac60f
+! leanprover-community/mathlib commit 67e606eaea14c7854bdc556bd53d98aefdf76ec0
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -1171,7 +1171,7 @@ theorem Submodule.finrank_add_inf_finrank_orthogonal {K₁ K₂ : Submodule 𝕜
   by
   haveI := Submodule.finiteDimensional_of_le h
   haveI := proper_is_R_or_C 𝕜 K₁
-  have hd := Submodule.rank_sup_add_rank_inf_eq K₁ (K₁ᗮ ⊓ K₂)
+  have hd := Submodule.finrank_sup_add_finrank_inf_eq K₁ (K₁ᗮ ⊓ K₂)
   rw [← inf_assoc, (Submodule.orthogonal_disjoint K₁).eq_bot, bot_inf_eq, finrank_bot,
     Submodule.sup_orthogonal_inf_of_completeSpace h] at hd
   rw [add_zero] at hd
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Zhouhang Zhou, Frédéric Dupuis, Heather Macbeth
 
 ! This file was ported from Lean 3 source module analysis.inner_product_space.projection
-! leanprover-community/mathlib commit 1a4df69ca1a9a0e5e26bfe12e2b92814216016d0
+! leanprover-community/mathlib commit 039a089d2a4b93c761b234f3e5f5aeb752bac60f
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -1171,7 +1171,7 @@ theorem Submodule.finrank_add_inf_finrank_orthogonal {K₁ K₂ : Submodule 𝕜
   by
   haveI := Submodule.finiteDimensional_of_le h
   haveI := proper_is_R_or_C 𝕜 K₁
-  have hd := Submodule.dim_sup_add_dim_inf_eq K₁ (K₁ᗮ ⊓ K₂)
+  have hd := Submodule.rank_sup_add_rank_inf_eq K₁ (K₁ᗮ ⊓ K₂)
   rw [← inf_assoc, (Submodule.orthogonal_disjoint K₁).eq_bot, bot_inf_eq, finrank_bot,
     Submodule.sup_orthogonal_inf_of_completeSpace h] at hd
   rw [add_zero] at hd
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Zhouhang Zhou, Frédéric Dupuis, Heather Macbeth
 
 ! This file was ported from Lean 3 source module analysis.inner_product_space.projection
-! leanprover-community/mathlib commit 6e272cd89fa32c72a25dbefd319394c48dce1576
+! leanprover-community/mathlib commit 1a4df69ca1a9a0e5e26bfe12e2b92814216016d0
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -897,6 +897,22 @@ theorem orthogonalProjection_mem_subspace_orthogonal_complement_eq_zero [Complet
   convert eq_orthogonalProjection_of_mem_orthogonal _ _ <;> simp [hv]
 #align orthogonal_projection_mem_subspace_orthogonal_complement_eq_zero orthogonalProjection_mem_subspace_orthogonal_complement_eq_zero
 
+/-- The projection into `U` from an orthogonal submodule `V` is the zero map. -/
+theorem Submodule.IsOrtho.orthogonalProjection_comp_subtypeL {U V : Submodule 𝕜 E} [CompleteSpace U]
+    (h : U ⟂ V) : orthogonalProjection U ∘L V.subtypeL = 0 :=
+  ContinuousLinearMap.ext fun v =>
+    orthogonalProjection_mem_subspace_orthogonal_complement_eq_zero <| h.symm v.Prop
+#align submodule.is_ortho.orthogonal_projection_comp_subtypeL Submodule.IsOrtho.orthogonalProjection_comp_subtypeL
+
+/-- 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} [CompleteSpace U] :
+    orthogonalProjection U ∘L V.subtypeL = 0 ↔ U ⟂ V :=
+  ⟨fun h u hu v hv => by
+    convert orthogonalProjection_inner_eq_zero v u hu using 2
+    have : orthogonalProjection U v = 0 := FunLike.congr_fun h ⟨_, hv⟩
+    rw [this, Submodule.coe_zero, sub_zero], Submodule.IsOrtho.orthogonalProjection_comp_subtypeL⟩
+#align orthogonal_projection_comp_subtypeL_eq_zero_iff orthogonalProjection_comp_subtypeL_eq_zero_iff
+
 theorem orthogonalProjection_eq_linear_proj [CompleteSpace K] (x : E) :
     orthogonalProjection K x =
       K.linearProjOfIsCompl _ Submodule.isCompl_orthogonal_of_completeSpace x :=
Diff
@@ -705,8 +705,8 @@ def reflection : E ≃ₗᵢ[𝕜] E :=
       convert norm_sub_eq_norm_add this using 2
       · rw [LinearEquiv.coe_mk, reflectionLinearEquiv, LinearEquiv.toFun_eq_coe,
           LinearEquiv.coe_ofInvolutive, LinearMap.sub_apply, LinearMap.id_apply, bit0,
-          LinearMap.add_apply, LinearMap.comp_apply, Submodule.subtype_apply,
-          ContinuousLinearMap.toLinearMap_eq_coe, ContinuousLinearMap.coe_coe]
+          LinearMap.add_apply, LinearMap.comp_apply, Submodule.subtype_apply, [anonymous],
+          ContinuousLinearMap.coe_coe]
         dsimp [w, v]
         abel
       · simp only [add_sub_cancel'_right, eq_self_iff_true] }
@@ -1220,8 +1220,8 @@ theorem LinearIsometryEquiv.reflections_generate_dim_aux [FiniteDimensional ℝ
     symm
     ext x
     have := LinearMap.congr_fun (linear_map.ker_eq_top.mp this) x
-    simpa only [sub_eq_zero, ContinuousLinearMap.toLinearMap_eq_coe, ContinuousLinearMap.coe_sub,
-      LinearMap.sub_apply, LinearMap.zero_apply] using this
+    simpa only [sub_eq_zero, [anonymous], ContinuousLinearMap.coe_sub, LinearMap.sub_apply,
+      LinearMap.zero_apply] using this
   · -- Inductive step.  Let `W` be the fixed subspace of `φ`.  We suppose its complement to have
     -- dimension at most n + 1.
     let W := ker (ContinuousLinearMap.id ℝ F - φ)
Diff
@@ -4,11 +4,12 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Zhouhang Zhou, Frédéric Dupuis, Heather Macbeth
 
 ! This file was ported from Lean 3 source module analysis.inner_product_space.projection
-! leanprover-community/mathlib commit 46b633fd842bef9469441c0209906f6dddd2b4f5
+! leanprover-community/mathlib commit 6e272cd89fa32c72a25dbefd319394c48dce1576
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
 import Mathbin.Analysis.Convex.Basic
+import Mathbin.Analysis.InnerProductSpace.Orthogonal
 import Mathbin.Analysis.InnerProductSpace.Symmetric
 import Mathbin.Analysis.NormedSpace.IsROrC
 import Mathbin.Data.IsROrC.Lemmas
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Zhouhang Zhou, Frédéric Dupuis, Heather Macbeth
 
 ! This file was ported from Lean 3 source module analysis.inner_product_space.projection
-! leanprover-community/mathlib commit 22f577237f96d87d9084104feba75f3deccd4dd5
+! leanprover-community/mathlib commit 46b633fd842bef9469441c0209906f6dddd2b4f5
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -53,6 +53,8 @@ open BigOperators Topology
 
 variable {𝕜 E F : Type _} [IsROrC 𝕜]
 
+variable [NormedAddCommGroup E] [NormedAddCommGroup F]
+
 variable [InnerProductSpace 𝕜 E] [InnerProductSpace ℝ F]
 
 -- mathport name: «expr⟪ , ⟫»
@@ -145,7 +147,7 @@ theorem exists_norm_eq_infᵢ_of_complete_convex {K : Set F} (ne : K.Nonempty) (
           show u + u - (wq + wp) = u - wq + (u - wp)
           abel
           rw [eq₁, eq₂]
-        _ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖) := parallelogram_law_with_norm _ _
+        _ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖) := parallelogram_law_with_norm ℝ _ _
         
     have eq : δ ≤ ‖u - half • (wq + wp)‖ := by
       rw [smul_add]
@@ -255,7 +257,7 @@ theorem norm_eq_infᵢ_iff_real_inner_le_zero {K : Set F} (h : Convex ℝ K) {u
             rw [this]
           _ = ‖u - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v) + θ * θ * ‖w - v‖ ^ 2 :=
             by
-            rw [norm_sub_sq, inner_smul_right, norm_smul]
+            rw [@norm_sub_sq ℝ, inner_smul_right, norm_smul]
             simp only [sq]
             show
               ‖u - v‖ * ‖u - v‖ - 2 * (θ * inner (u - v) (w - v)) +
@@ -316,7 +318,7 @@ theorem norm_eq_infᵢ_iff_real_inner_le_zero {K : Set F} (h : Convex ℝ K) {u
             rw [sq]
             refine' le_add_of_nonneg_right _
             exact sq_nonneg _
-          _ = ‖u - v - (w - v)‖ ^ 2 := (norm_sub_sq _ _).symm
+          _ = ‖u - v - (w - v)‖ ^ 2 := (@norm_sub_sq ℝ _ _ _ _ _ _).symm
           _ = ‖u - w‖ * ‖u - w‖ := by
             have : u - v - (w - v) = u - w
             abel
@@ -464,7 +466,7 @@ 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 :=
   by
-  rw [← sub_eq_zero, ← inner_self_eq_zero]
+  rw [← sub_eq_zero, ← @inner_self_eq_zero 𝕜]
   have hvs : orthogonalProjectionFn K u - v ∈ K :=
     Submodule.sub_mem K (orthogonalProjectionFn_mem u) hvm
   have huo : ⟪u - orthogonalProjectionFn K u, orthogonalProjectionFn K u - v⟫ = 0 :=
@@ -587,8 +589,9 @@ theorem orthogonalProjection_eq_self_iff {v : E} : (orthogonalProjection K v : E
   · simp
 #align orthogonal_projection_eq_self_iff orthogonalProjection_eq_self_iff
 
-theorem LinearIsometry.map_orthogonalProjection {E E' : Type _} [InnerProductSpace 𝕜 E]
-    [InnerProductSpace 𝕜 E'] (f : E →ₗᵢ[𝕜] E') (p : Submodule 𝕜 E) [CompleteSpace p] (x : E) :
+theorem LinearIsometry.map_orthogonalProjection {E E' : Type _} [NormedAddCommGroup E]
+    [NormedAddCommGroup E'] [InnerProductSpace 𝕜 E] [InnerProductSpace 𝕜 E'] (f : E →ₗᵢ[𝕜] E')
+    (p : Submodule 𝕜 E) [CompleteSpace p] (x : E) :
     f (orthogonalProjection p x) = orthogonalProjection (p.map f.toLinearMap) (f x) :=
   by
   refine' (eq_orthogonalProjection_of_mem_of_inner_eq_zero _ fun y hy => _).symm
@@ -597,8 +600,9 @@ theorem LinearIsometry.map_orthogonalProjection {E E' : Type _} [InnerProductSpa
   rw [← f.map_sub, f.inner_map_map, orthogonalProjection_inner_eq_zero x x' hx']
 #align linear_isometry.map_orthogonal_projection LinearIsometry.map_orthogonalProjection
 
-theorem LinearIsometry.map_orthogonal_projection' {E E' : Type _} [InnerProductSpace 𝕜 E]
-    [InnerProductSpace 𝕜 E'] (f : E →ₗᵢ[𝕜] E') (p : Submodule 𝕜 E) [CompleteSpace p] (x : E) :
+theorem LinearIsometry.map_orthogonal_projection' {E E' : Type _} [NormedAddCommGroup E]
+    [NormedAddCommGroup E'] [InnerProductSpace 𝕜 E] [InnerProductSpace 𝕜 E'] (f : E →ₗᵢ[𝕜] E')
+    (p : Submodule 𝕜 E) [CompleteSpace p] (x : E) :
     f (orthogonalProjection p x) = orthogonalProjection (p.map f) (f x) :=
   by
   refine' (eq_orthogonalProjection_of_mem_of_inner_eq_zero _ fun y hy => _).symm
@@ -608,8 +612,9 @@ theorem LinearIsometry.map_orthogonal_projection' {E E' : Type _} [InnerProductS
 #align linear_isometry.map_orthogonal_projection' LinearIsometry.map_orthogonal_projection'
 
 /-- Orthogonal projection onto the `submodule.map` of a subspace. -/
-theorem orthogonalProjection_map_apply {E E' : Type _} [InnerProductSpace 𝕜 E]
-    [InnerProductSpace 𝕜 E'] (f : E ≃ₗᵢ[𝕜] E') (p : Submodule 𝕜 E) [CompleteSpace p] (x : E') :
+theorem orthogonalProjection_map_apply {E E' : Type _} [NormedAddCommGroup E]
+    [NormedAddCommGroup E'] [InnerProductSpace 𝕜 E] [InnerProductSpace 𝕜 E'] (f : E ≃ₗᵢ[𝕜] E')
+    (p : Submodule 𝕜 E) [CompleteSpace p] (x : E') :
     (orthogonalProjection (p.map (f.toLinearEquiv : E →ₗ[𝕜] E')) x : E') =
       f (orthogonalProjection p (f.symm x)) :=
   by
@@ -642,7 +647,7 @@ theorem smul_orthogonalProjection_singleton {v : E} (w : E) :
     obtain ⟨c, rfl⟩ := submodule.mem_span_singleton.mp hx
     have hv : ↑‖v‖ ^ 2 = ⟪v, v⟫ := by
       norm_cast
-      simp [norm_sq_eq_inner]
+      simp [@norm_sq_eq_inner 𝕜]
     simp [inner_sub_left, inner_smul_left, inner_smul_right, map_div₀, mul_comm, hv,
       InnerProductSpace.conj_symm, hv]
 #align smul_orthogonal_projection_singleton smul_orthogonalProjection_singleton
@@ -767,15 +772,17 @@ theorem reflection_mem_subspace_eq_self {x : E} (hx : x ∈ K) : reflection K x
 #align reflection_mem_subspace_eq_self reflection_mem_subspace_eq_self
 
 /-- Reflection in the `submodule.map` of a subspace. -/
-theorem reflection_map_apply {E E' : Type _} [InnerProductSpace 𝕜 E] [InnerProductSpace 𝕜 E']
-    (f : E ≃ₗᵢ[𝕜] E') (K : Submodule 𝕜 E) [CompleteSpace K] (x : E') :
+theorem reflection_map_apply {E E' : Type _} [NormedAddCommGroup E] [NormedAddCommGroup E']
+    [InnerProductSpace 𝕜 E] [InnerProductSpace 𝕜 E'] (f : E ≃ₗᵢ[𝕜] E') (K : Submodule 𝕜 E)
+    [CompleteSpace K] (x : E') :
     reflection (K.map (f.toLinearEquiv : E →ₗ[𝕜] E')) x = f (reflection K (f.symm x)) := by
   simp [bit0, reflection_apply, orthogonalProjection_map_apply f K x]
 #align reflection_map_apply reflection_map_apply
 
 /-- Reflection in the `submodule.map` of a subspace. -/
-theorem reflection_map {E E' : Type _} [InnerProductSpace 𝕜 E] [InnerProductSpace 𝕜 E']
-    (f : E ≃ₗᵢ[𝕜] E') (K : Submodule 𝕜 E) [CompleteSpace K] :
+theorem reflection_map {E E' : Type _} [NormedAddCommGroup E] [NormedAddCommGroup E']
+    [InnerProductSpace 𝕜 E] [InnerProductSpace 𝕜 E'] (f : E ≃ₗᵢ[𝕜] E') (K : Submodule 𝕜 E)
+    [CompleteSpace K] :
     reflection (K.map (f.toLinearEquiv : E →ₗ[𝕜] E')) = f.symm.trans ((reflection K).trans f) :=
   LinearIsometryEquiv.ext <| reflection_map_apply f K
 #align reflection_map reflection_map
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Zhouhang Zhou, Frédéric Dupuis, Heather Macbeth
 
 ! This file was ported from Lean 3 source module analysis.inner_product_space.projection
-! leanprover-community/mathlib commit 4681620dafca6a7d710f437bd10fb69428ec2209
+! leanprover-community/mathlib commit 22f577237f96d87d9084104feba75f3deccd4dd5
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -889,6 +889,22 @@ theorem orthogonalProjection_mem_subspace_orthogonal_complement_eq_zero [Complet
   convert eq_orthogonalProjection_of_mem_orthogonal _ _ <;> simp [hv]
 #align orthogonal_projection_mem_subspace_orthogonal_complement_eq_zero orthogonalProjection_mem_subspace_orthogonal_complement_eq_zero
 
+theorem orthogonalProjection_eq_linear_proj [CompleteSpace K] (x : E) :
+    orthogonalProjection K x =
+      K.linearProjOfIsCompl _ Submodule.isCompl_orthogonal_of_completeSpace x :=
+  by
+  have : IsCompl K Kᗮ := Submodule.isCompl_orthogonal_of_completeSpace
+  nth_rw 1 [← Submodule.linear_proj_add_linearProjOfIsCompl_eq_self this x]
+  rw [map_add, orthogonalProjection_mem_subspace_eq_self,
+    orthogonalProjection_mem_subspace_orthogonal_complement_eq_zero (Submodule.coe_mem _), add_zero]
+#align orthogonal_projection_eq_linear_proj orthogonalProjection_eq_linear_proj
+
+theorem orthogonalProjection_coe_linearMap_eq_linear_proj [CompleteSpace K] :
+    (orthogonalProjection K : E →ₗ[𝕜] K) =
+      K.linearProjOfIsCompl _ Submodule.isCompl_orthogonal_of_completeSpace :=
+  LinearMap.ext <| orthogonalProjection_eq_linear_proj
+#align orthogonal_projection_coe_linear_map_eq_linear_proj orthogonalProjection_coe_linearMap_eq_linear_proj
+
 /-- The reflection in `K` of an element of `Kᗮ` is its negation. -/
 theorem reflection_mem_subspace_orthogonal_complement_eq_neg [CompleteSpace K] {v : E}
     (hv : v ∈ Kᗮ) : reflection K v = -v := by
Diff
@@ -188,11 +188,11 @@ theorem exists_norm_eq_infᵢ_of_complete_convex {K : Set F} (ne : K.Nonempty) (
       exact sqrt_zero.symm
     have eq₁ : tendsto (fun n : ℕ => 8 * δ * (1 / (n + 1))) at_top (nhds (0 : ℝ)) :=
       by
-      convert (@tendsto_const_nhds _ _ _ (8 * δ) _).mul tendsto_one_div_add_atTop_nhds_0_nat
+      convert(@tendsto_const_nhds _ _ _ (8 * δ) _).mul tendsto_one_div_add_atTop_nhds_0_nat
       simp only [MulZeroClass.mul_zero]
     have : tendsto (fun n : ℕ => (4 : ℝ) * (1 / (n + 1))) at_top (nhds (0 : ℝ)) :=
       by
-      convert (@tendsto_const_nhds _ _ _ (4 : ℝ) _).mul tendsto_one_div_add_atTop_nhds_0_nat
+      convert(@tendsto_const_nhds _ _ _ (4 : ℝ) _).mul tendsto_one_div_add_atTop_nhds_0_nat
       simp only [MulZeroClass.mul_zero]
     have eq₂ :
       tendsto (fun n : ℕ => (4 : ℝ) * (1 / (n + 1)) * (1 / (n + 1))) at_top (nhds (0 : ℝ)) :=
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Zhouhang Zhou, Frédéric Dupuis, Heather Macbeth
 
 ! This file was ported from Lean 3 source module analysis.inner_product_space.projection
-! leanprover-community/mathlib commit 3fc0b254310908f70a1a75f01147d52e53e9f8a2
+! leanprover-community/mathlib commit 4681620dafca6a7d710f437bd10fb69428ec2209
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -1290,7 +1290,7 @@ variable {ι : Type _}
 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ₗᵢ)
+    (hV : OrthogonalFamily 𝕜 (fun i => V i) fun i => (V i).subtypeₗᵢ)
     (hc : IsComplete (↑(supᵢ V) : Set E)) : DirectSum.IsInternal V ↔ (supᵢ V)ᗮ = ⊥ :=
   by
   haveI : CompleteSpace ↥(supᵢ V) := hc.complete_space_coe
@@ -1302,8 +1302,7 @@ theorem OrthogonalFamily.isInternal_iff_of_isComplete [DecidableEq ι] {V : ι 
 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ₗᵢ) :
+    {V : ι → Submodule 𝕜 E} (hV : OrthogonalFamily 𝕜 (fun i => V i) fun i => (V i).subtypeₗᵢ) :
     DirectSum.IsInternal V ↔ (supᵢ V)ᗮ = ⊥ :=
   haveI h := FiniteDimensional.proper_isROrC 𝕜 ↥(supᵢ V)
   hV.is_internal_iff_of_is_complete (complete_space_coe_iff_is_complete.mp inferInstance)
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Zhouhang Zhou, Frédéric Dupuis, Heather Macbeth
 
 ! This file was ported from Lean 3 source module analysis.inner_product_space.projection
-! leanprover-community/mathlib commit f2ce6086713c78a7f880485f7917ea547a215982
+! leanprover-community/mathlib commit 3fc0b254310908f70a1a75f01147d52e53e9f8a2
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -316,7 +316,7 @@ theorem norm_eq_infᵢ_iff_real_inner_le_zero {K : Set F} (h : Convex ℝ K) {u
             rw [sq]
             refine' le_add_of_nonneg_right _
             exact sq_nonneg _
-          _ = ‖u - v - (w - v)‖ ^ 2 := norm_sub_sq.symm
+          _ = ‖u - v - (w - v)‖ ^ 2 := (norm_sub_sq _ _).symm
           _ = ‖u - w‖ * ‖u - w‖ := by
             have : u - v - (w - v) = u - w
             abel
@@ -542,7 +542,7 @@ theorem orthogonalProjection_inner_eq_zero (v : E) :
 theorem sub_orthogonalProjection_mem_orthogonal (v : E) : v - orthogonalProjection K v ∈ Kᗮ :=
   by
   intro w hw
-  rw [inner_eq_zero_sym]
+  rw [inner_eq_zero_symm]
   exact orthogonalProjection_inner_eq_zero _ _ hw
 #align sub_orthogonal_projection_mem_orthogonal sub_orthogonalProjection_mem_orthogonal
 
@@ -644,7 +644,7 @@ theorem smul_orthogonalProjection_singleton {v : E} (w : E) :
       norm_cast
       simp [norm_sq_eq_inner]
     simp [inner_sub_left, inner_smul_left, inner_smul_right, map_div₀, mul_comm, hv,
-      InnerProductSpace.conj_sym, hv]
+      InnerProductSpace.conj_symm, hv]
 #align smul_orthogonal_projection_singleton smul_orthogonalProjection_singleton
 
 /-- Formula for orthogonal projection onto a single vector. -/
@@ -833,11 +833,11 @@ theorem Submodule.orthogonal_orthogonal [CompleteSpace K] : Kᗮᗮ = K :=
     intro hv
     have hz' : z = 0 :=
       by
-      have hyz : ⟪z, y⟫ = 0 := by simp [hz y hy, inner_eq_zero_sym]
+      have hyz : ⟪z, y⟫ = 0 := by simp [hz y hy, inner_eq_zero_symm]
       simpa [inner_add_right, hyz] using hv z hz
     simp [hy, hz']
   · intro hv w hw
-    rw [inner_eq_zero_sym]
+    rw [inner_eq_zero_symm]
     exact hw v hv
 #align submodule.orthogonal_orthogonal Submodule.orthogonal_orthogonal
 
@@ -871,7 +871,7 @@ theorem Submodule.orthogonal_eq_bot_iff [CompleteSpace (K : Set E)] : Kᗮ = ⊥
 orthogonal projection. -/
 theorem eq_orthogonalProjection_of_mem_orthogonal [CompleteSpace K] {u v : E} (hv : v ∈ K)
     (hvo : u - v ∈ Kᗮ) : (orthogonalProjection K u : E) = v :=
-  eq_orthogonalProjectionFn_of_mem_of_inner_eq_zero hv fun w => inner_eq_zero_sym.mp ∘ hvo w
+  eq_orthogonalProjectionFn_of_mem_of_inner_eq_zero hv fun w => inner_eq_zero_symm.mp ∘ hvo w
 #align eq_orthogonal_projection_of_mem_orthogonal eq_orthogonalProjection_of_mem_orthogonal
 
 /-- A point in `K` with the orthogonality property (here characterized in terms of `Kᗮ`) must be the
@@ -1105,7 +1105,7 @@ theorem inner_orthogonalProjection_eq_of_mem_right [CompleteSpace K] (u : K) (v
 @[simp]
 theorem inner_orthogonalProjection_eq_of_mem_left [CompleteSpace K] (u : K) (v : E) :
     ⟪u, orthogonalProjection K v⟫ = ⟪(u : E), v⟫ := by
-  rw [← inner_conj_sym, ← inner_conj_sym (u : E), inner_orthogonalProjection_eq_of_mem_right]
+  rw [← inner_conj_symm, ← inner_conj_symm (u : E), inner_orthogonalProjection_eq_of_mem_right]
 #align inner_orthogonal_projection_eq_of_mem_left inner_orthogonalProjection_eq_of_mem_left
 
 /-- The orthogonal projection is self-adjoint. -/
@@ -1358,7 +1358,7 @@ theorem maximal_orthonormal_iff_orthogonal_complement_eq_bot (hv : Orthonormal 
           intro hbe'
           apply hab'
           simp [ha, hbe']
-        rw [inner_eq_zero_sym]
+        rw [inner_eq_zero_symm]
         simpa [ha] using h_end b hb
       rintro ⟨b, hb'⟩ hab'
       cases' eq_or_mem_of_mem_insert hb' with hb hb
Diff
@@ -1115,10 +1115,10 @@ theorem inner_orthogonalProjection_left_eq_right [CompleteSpace K] (u v : E) :
 #align inner_orthogonal_projection_left_eq_right inner_orthogonalProjection_left_eq_right
 
 /-- The orthogonal projection is symmetric. -/
-theorem orthogonalProjectionIsSymmetric [CompleteSpace K] :
+theorem orthogonalProjection_isSymmetric [CompleteSpace K] :
     (K.subtypeL ∘L orthogonalProjection K : E →ₗ[𝕜] E).IsSymmetric :=
   inner_orthogonalProjection_left_eq_right K
-#align orthogonal_projection_is_symmetric orthogonalProjectionIsSymmetric
+#align orthogonal_projection_is_symmetric orthogonalProjection_isSymmetric
 
 open FiniteDimensional
 
Diff
@@ -189,16 +189,16 @@ theorem exists_norm_eq_infᵢ_of_complete_convex {K : Set F} (ne : K.Nonempty) (
     have eq₁ : tendsto (fun n : ℕ => 8 * δ * (1 / (n + 1))) at_top (nhds (0 : ℝ)) :=
       by
       convert (@tendsto_const_nhds _ _ _ (8 * δ) _).mul tendsto_one_div_add_atTop_nhds_0_nat
-      simp only [mul_zero]
+      simp only [MulZeroClass.mul_zero]
     have : tendsto (fun n : ℕ => (4 : ℝ) * (1 / (n + 1))) at_top (nhds (0 : ℝ)) :=
       by
       convert (@tendsto_const_nhds _ _ _ (4 : ℝ) _).mul tendsto_one_div_add_atTop_nhds_0_nat
-      simp only [mul_zero]
+      simp only [MulZeroClass.mul_zero]
     have eq₂ :
       tendsto (fun n : ℕ => (4 : ℝ) * (1 / (n + 1)) * (1 / (n + 1))) at_top (nhds (0 : ℝ)) :=
       by
       convert this.mul tendsto_one_div_add_atTop_nhds_0_nat
-      simp only [mul_zero]
+      simp only [MulZeroClass.mul_zero]
     convert eq₁.add eq₂
     simp only [add_zero]
   -- Step 3: By completeness of `K`, let `w : ℕ → K` converge to some `v : K`.
@@ -511,7 +511,8 @@ def orthogonalProjection : E →L[𝕜] K :=
         have ho : ∀ w ∈ K, ⟪c • x - c • orthogonalProjectionFn K x, w⟫ = 0 :=
           by
           intro w hw
-          rw [← smul_sub, inner_smul_left, orthogonalProjectionFn_inner_eq_zero _ w hw, mul_zero]
+          rw [← smul_sub, inner_smul_left, orthogonalProjectionFn_inner_eq_zero _ w hw,
+            MulZeroClass.mul_zero]
         ext
         simp [eq_orthogonalProjectionFn_of_mem_of_inner_eq_zero hm ho] }
     1 fun x => by
Diff
@@ -174,9 +174,9 @@ theorem exists_norm_eq_infᵢ_of_complete_convex {K : Set F} (ne : K.Nonempty) (
         by
         rw [← this]
         simp
-      _ ≤ 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖) - 4 * δ * δ := sub_le_sub_left eq₁ _
+      _ ≤ 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖) - 4 * δ * δ := (sub_le_sub_left eq₁ _)
       _ ≤ 2 * ((δ + div) * (δ + div) + (δ + div) * (δ + div)) - 4 * δ * δ :=
-        sub_le_sub_right (mul_le_mul_of_nonneg_left (add_le_add eq₂ eq₂') (by norm_num)) _
+        (sub_le_sub_right (mul_le_mul_of_nonneg_left (add_le_add eq₂ eq₂') (by norm_num)) _)
       _ = 8 * δ * div + 4 * div * div := by ring
       
     exact
@@ -1316,7 +1316,7 @@ variable {𝕜 E} {v : Set E}
 
 open FiniteDimensional Submodule Set
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:628:2: warning: expanding binder collection (u «expr ⊇ » v) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (u «expr ⊇ » 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_orthogonal_complement_eq_bot (hv : Orthonormal 𝕜 (coe : v → E)) :
@@ -1385,7 +1385,7 @@ theorem maximal_orthonormal_iff_orthogonal_complement_eq_bot (hv : Orthonormal 
 
 variable [FiniteDimensional 𝕜 E]
 
-/- ./././Mathport/Syntax/Translate/Basic.lean:628:2: warning: expanding binder collection (u «expr ⊇ » v) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (u «expr ⊇ » v) -/
 /-- An orthonormal set in a finite-dimensional `inner_product_space` is maximal, if and only if it
 is a basis. -/
 theorem maximal_orthonormal_iff_basis_of_finiteDimensional (hv : Orthonormal 𝕜 (coe : v → E)) :

Changes in mathlib4

mathlib3
mathlib4
feat: add notation for Real.sqrt (#12056)

This adds the notation √r for Real.sqrt r. The precedence is such that √x⁻¹ is parsed as √(x⁻¹); not because this is particularly desirable, but because it's the default and the choice doesn't really matter.

This is extracted from #7907, which adds a more general nth root typeclass. The idea is to perform all the boring substitutions downstream quickly, so that we can play around with custom elaborators with a much slower rate of code-rot. This PR also won't rot as quickly, as it does not forbid writing x.sqrt as that PR does.

While perhaps claiming for Real.sqrt is greedy; it:

  • Is far more common thatn NNReal.sqrt and Nat.sqrt
  • Is far more interesting to mathlib than sqrt on Float
  • Can be overloaded anyway, so this does not prevent downstream code using the notation on their own types.
  • Will be replaced by a more general typeclass in a future PR.

Zulip

Co-authored-by: Yury G. Kudryashov <urkud@urkud.name>

Diff
@@ -95,13 +95,13 @@ theorem exists_norm_eq_iInf_of_complete_convex {K : Set F} (ne : K.Nonempty) (h
     rw [cauchySeq_iff_le_tendsto_0]
     -- splits into three goals
     let b := fun n : ℕ => 8 * δ * (1 / (n + 1)) + 4 * (1 / (n + 1)) * (1 / (n + 1))
-    use fun n => sqrt (b n)
+    use fun n => √(b n)
     constructor
-    -- first goal :  `∀ (n : ℕ), 0 ≤ sqrt (b n)`
+    -- first goal :  `∀ (n : ℕ), 0 ≤ √(b n)`
     intro n
     exact sqrt_nonneg _
     constructor
-    -- second goal : `∀ (n m N : ℕ), N ≤ n → N ≤ m → dist ↑(w n) ↑(w m) ≤ sqrt (b N)`
+    -- second goal : `∀ (n m N : ℕ), N ≤ n → N ≤ m → dist ↑(w n) ↑(w m) ≤ √(b N)`
     intro p q N hp hq
     let wp := (w p : F)
     let wq := (w q : F)
@@ -162,7 +162,7 @@ theorem exists_norm_eq_iInf_of_complete_convex {K : Set F} (ne : K.Nonempty) (h
       _ = 8 * δ * div + 4 * div * div := by ring
     positivity
     -- third goal : `Tendsto (fun (n : ℕ) => √(b n)) atTop (𝓝 0)`
-    suffices Tendsto (fun x ↦ sqrt (8 * δ * x + 4 * x * x) : ℝ → ℝ) (𝓝 0) (𝓝 0)
+    suffices Tendsto (fun x ↦ √(8 * δ * x + 4 * x * x) : ℝ → ℝ) (𝓝 0) (𝓝 0)
       from this.comp tendsto_one_div_add_atTop_nhds_zero_nat
     exact Continuous.tendsto' (by continuity) _ _ (by simp)
   -- Step 3: By completeness of `K`, let `w : ℕ → K` converge to some `v : K`.
style: replace '.-/' by '. -/' (#11938)

Purely automatic replacement. If this is in any way controversial; I'm happy to just close this PR.

Diff
@@ -1050,13 +1050,13 @@ variable (K)
 
 -- Porting note: relax assumptions, swap LHS with RHS
 /-- 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`.-/
+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 := by
   simp
 #align eq_sum_orthogonal_projection_self_orthogonal_complement orthogonalProjection_add_orthogonalProjection_orthogonalₓ
 
-/-- The Pythagorean theorem, for an orthogonal projection.-/
+/-- 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 :=
   calc
chore: tidy various files (#11624)
Diff
@@ -54,10 +54,7 @@ variable {𝕜 E F : Type*} [RCLike 𝕜]
 variable [NormedAddCommGroup E] [NormedAddCommGroup F]
 variable [InnerProductSpace 𝕜 E] [InnerProductSpace ℝ F]
 
--- mathport name: «expr⟪ , ⟫»
 local notation "⟪" x ", " y "⟫" => @inner 𝕜 _ _ x y
-
--- mathport name: exprabsR
 local notation "absR" => abs
 
 /-! ### Orthogonal projection in inner product spaces -/
move(RCLike): Move out of Data (#11753)

RCLike is an analytic typeclass, hence should be under Analysis

Diff
@@ -7,7 +7,7 @@ import Mathlib.Analysis.Convex.Basic
 import Mathlib.Analysis.InnerProductSpace.Orthogonal
 import Mathlib.Analysis.InnerProductSpace.Symmetric
 import Mathlib.Analysis.NormedSpace.RCLike
-import Mathlib.Data.RCLike.Lemmas
+import Mathlib.Analysis.RCLike.Lemmas
 import Mathlib.Algebra.DirectSum.Decomposition
 
 #align_import analysis.inner_product_space.projection from "leanprover-community/mathlib"@"0b7c740e25651db0ba63648fbae9f9d6f941e31b"
chore: Reduce scope of LinearOrderedCommGroupWithZero (#11716)

Reconstitute the file Algebra.Order.Monoid.WithZero from three files:

  • Algebra.Order.Monoid.WithZero.Defs
  • Algebra.Order.Monoid.WithZero.Basic
  • Algebra.Order.WithZero

Avoid importing it in many files. Most uses were just to get le_zero_iff to work on Nat.

Before pre_11716

After post_11716

Diff
@@ -1175,7 +1175,7 @@ theorem LinearIsometryEquiv.reflections_generate_dim_aux [FiniteDimensional ℝ
   · -- Base case: `n = 0`, the fixed subspace is the whole space, so `φ = id`
     refine' ⟨[], rfl.le, show φ = 1 from _⟩
     have : ker (ContinuousLinearMap.id ℝ F - φ) = ⊤ := by
-      rwa [Nat.zero_eq, le_zero_iff, Submodule.finrank_eq_zero,
+      rwa [Nat.zero_eq, Nat.le_zero, Submodule.finrank_eq_zero,
         Submodule.orthogonal_eq_bot_iff] at hn
     symm
     ext x
chore: Rename IsROrC to RCLike (#10819)

IsROrC contains data, which goes against the expectation that classes prefixed with Is are prop-valued. People have been complaining about this on and off, so this PR renames IsROrC to RCLike.

Diff
@@ -6,8 +6,8 @@ Authors: Zhouhang Zhou, Frédéric Dupuis, Heather Macbeth
 import Mathlib.Analysis.Convex.Basic
 import Mathlib.Analysis.InnerProductSpace.Orthogonal
 import Mathlib.Analysis.InnerProductSpace.Symmetric
-import Mathlib.Analysis.NormedSpace.IsROrC
-import Mathlib.Data.IsROrC.Lemmas
+import Mathlib.Analysis.NormedSpace.RCLike
+import Mathlib.Data.RCLike.Lemmas
 import Mathlib.Algebra.DirectSum.Decomposition
 
 #align_import analysis.inner_product_space.projection from "leanprover-community/mathlib"@"0b7c740e25651db0ba63648fbae9f9d6f941e31b"
@@ -44,13 +44,13 @@ The Coq code is available at the following address: <http://www.lri.fr/~sboldo/e
 
 noncomputable section
 
-open IsROrC Real Filter
+open RCLike Real Filter
 
 open LinearMap (ker range)
 
 open BigOperators Topology
 
-variable {𝕜 E F : Type*} [IsROrC 𝕜]
+variable {𝕜 E F : Type*} [RCLike 𝕜]
 variable [NormedAddCommGroup E] [NormedAddCommGroup F]
 variable [InnerProductSpace 𝕜 E] [InnerProductSpace ℝ F]
 
@@ -278,7 +278,7 @@ 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‖ := by
-  letI : InnerProductSpace ℝ E := InnerProductSpace.isROrCToReal 𝕜 E
+  letI : InnerProductSpace ℝ E := InnerProductSpace.rclikeToReal 𝕜 E
   letI : Module ℝ E := RestrictScalars.module ℝ 𝕜 E
   let K' : Submodule ℝ E := Submodule.restrictScalars ℝ K
   exact exists_norm_eq_iInf_of_complete_convex ⟨0, K'.zero_mem⟩ h K'.convex
@@ -289,7 +289,7 @@ Let `u` be a point in a real inner product space, and let `K` be a nonempty subs
 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 `IsROrC` field.
+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 :=
@@ -336,7 +336,7 @@ for all `w ∈ K`, `⟪u - v, w⟫ = 0` (i.e., `u - v` is orthogonal to the subs
 -/
 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 := by
-  letI : InnerProductSpace ℝ E := InnerProductSpace.isROrCToReal 𝕜 E
+  letI : InnerProductSpace ℝ E := InnerProductSpace.rclikeToReal 𝕜 E
   letI : Module ℝ E := RestrictScalars.module ℝ 𝕜 E
   let K' : Submodule ℝ E := K.restrictScalars ℝ
   constructor
@@ -1119,7 +1119,7 @@ theorem Submodule.finrank_add_inf_finrank_orthogonal {K₁ K₂ : Submodule 𝕜
     [FiniteDimensional 𝕜 K₂] (h : K₁ ≤ K₂) :
     finrank 𝕜 K₁ + finrank 𝕜 (K₁ᗮ ⊓ K₂ : Submodule 𝕜 E) = finrank 𝕜 K₂ := by
   haveI : FiniteDimensional 𝕜 K₁ := Submodule.finiteDimensional_of_le h
-  haveI := proper_isROrC 𝕜 K₁
+  haveI := proper_rclike 𝕜 K₁
   have hd := Submodule.finrank_sup_add_finrank_inf_eq K₁ (K₁ᗮ ⊓ K₂)
   rw [← inf_assoc, (Submodule.orthogonal_disjoint K₁).eq_bot, bot_inf_eq, finrank_bot,
     Submodule.sup_orthogonal_inf_of_completeSpace h] at hd
@@ -1287,7 +1287,7 @@ 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)ᗮ = ⊥ :=
-  haveI h := FiniteDimensional.proper_isROrC 𝕜 (↥(iSup V))
+  haveI h := FiniteDimensional.proper_rclike 𝕜 (↥(iSup V))
   hV.isInternal_iff_of_isComplete (completeSpace_coe_iff_isComplete.mp inferInstance)
 #align orthogonal_family.is_internal_iff OrthogonalFamily.isInternal_iff
 
@@ -1439,7 +1439,7 @@ variable [FiniteDimensional 𝕜 E]
 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) := by
-  haveI := proper_isROrC 𝕜 (span 𝕜 v)
+  haveI := proper_rclike 𝕜 (span 𝕜 v)
   rw [maximal_orthonormal_iff_orthogonalComplement_eq_bot hv]
   rw [Submodule.orthogonal_eq_bot_iff]
   have hv_coe : range ((↑) : v → E) = v := by simp
style: remove redundant instance arguments (#11581)

I removed some redundant instance arguments throughout Mathlib. To do this, I used VS Code's regex search. See https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/repeating.20instances.20from.20variable.20command I closed the previous PR for this and reopened it.

Diff
@@ -514,25 +514,25 @@ theorem eq_orthogonalProjection_of_mem_of_inner_eq_zero {u v : E} (hvm : v ∈ K
 
 /-- 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 [HasOrthogonalProjection K] {u v : E} (hv : v ∈ K)
+theorem eq_orthogonalProjection_of_mem_orthogonal {u v : E} (hv : v ∈ K)
     (hvo : u - v ∈ Kᗮ) : (orthogonalProjection K u : E) = v :=
   eq_orthogonalProjectionFn_of_mem_of_inner_eq_zero hv <| (Submodule.mem_orthogonal' _ _).1 hvo
 #align eq_orthogonal_projection_of_mem_orthogonal eq_orthogonalProjection_of_mem_orthogonal
 
 /-- 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' [HasOrthogonalProjection K] {u v z : E}
+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 :=
   eq_orthogonalProjection_of_mem_orthogonal hv (by simpa [hu] )
 #align eq_orthogonal_projection_of_mem_orthogonal' eq_orthogonalProjection_of_mem_orthogonal'
 
 @[simp]
-theorem orthogonalProjection_orthogonal_val [HasOrthogonalProjection K] (u : E) :
+theorem orthogonalProjection_orthogonal_val (u : E) :
     (orthogonalProjection Kᗮ u : E) = u - orthogonalProjection K u :=
   eq_orthogonalProjection_of_mem_orthogonal' (sub_orthogonalProjection_mem_orthogonal _)
     (K.le_orthogonal_orthogonal (orthogonalProjection K u).2) <| by simp
 
-theorem orthogonalProjection_orthogonal [HasOrthogonalProjection K] (u : E) :
+theorem orthogonalProjection_orthogonal (u : E) :
     orthogonalProjection Kᗮ u =
       ⟨u - orthogonalProjection K u, sub_orthogonalProjection_mem_orthogonal _⟩ :=
   Subtype.eq <| orthogonalProjection_orthogonal_val _
chore: Rename mul-div cancellation lemmas (#11530)

Lemma names around cancellation of multiplication and division are a mess.

This PR renames a handful of them according to the following table (each big row contains the multiplicative statement, then the three rows contain the GroupWithZero lemma name, the Group lemma, the AddGroup lemma name).

| Statement | New name | Old name | |

Diff
@@ -200,7 +200,7 @@ theorem norm_eq_iInf_iff_real_inner_le_zero {K : Set F} (h : Convex ℝ K) {u :
             simp only [sq]; apply mul_self_le_mul_self (norm_nonneg _)
             rw [eq]; apply δ_le'
             apply h hw hv
-            exacts [le_of_lt hθ₁, sub_nonneg.2 hθ₂, add_sub_cancel'_right _ _]
+            exacts [le_of_lt hθ₁, sub_nonneg.2 hθ₂, add_sub_cancel _ _]
           _ = ‖u - v - θ • (w - v)‖ ^ 2 := by
             have : u - (θ • w + (1 - θ) • v) = u - v - θ • (w - v) := by
               rw [smul_sub, sub_smul, one_smul]
@@ -238,7 +238,7 @@ theorem norm_eq_iInf_iff_real_inner_le_zero {K : Set F} (h : Convex ℝ K) {u :
       have eq₁ : θ * q ≤ p :=
         calc
           θ * q ≤ p / q * q := mul_le_mul_of_nonneg_right (min_le_right _ _) (sq_nonneg _)
-          _ = p := div_mul_cancel _ hq
+          _ = p := div_mul_cancel₀ _ hq
       have : 2 * p ≤ p :=
         calc
           2 * p ≤ θ * q := by
@@ -684,7 +684,7 @@ def reflection : E ≃ₗᵢ[𝕜] E :=
           ContinuousLinearMap.coe_coe]
         dsimp [v]
         abel
-      · simp only [v, add_sub_cancel'_right, eq_self_iff_true] }
+      · simp only [v, add_sub_cancel, eq_self_iff_true] }
 #align reflection reflection
 
 variable {K}
@@ -792,7 +792,7 @@ theorem Submodule.sup_orthogonal_inf_of_completeSpace {K₁ K₂ : Submodule 
   constructor
   · rintro ⟨y, hy, z, hz, rfl⟩
     exact K₂.add_mem (h hy) hz.2
-  · exact fun hx => ⟨v, v.prop, x - v, ⟨hvm, K₂.sub_mem hx (h v.prop)⟩, add_sub_cancel'_right _ _⟩
+  · exact fun hx => ⟨v, v.prop, x - v, ⟨hvm, K₂.sub_mem hx (h v.prop)⟩, add_sub_cancel _ _⟩
 #align submodule.sup_orthogonal_inf_of_complete_space Submodule.sup_orthogonal_inf_of_completeSpace
 
 variable {K}
@@ -1088,7 +1088,7 @@ theorem inner_orthogonalProjection_eq_of_mem_right [HasOrthogonalProjection K] (
     ⟪orthogonalProjection K v, u⟫ = ⟪(orthogonalProjection K v : E), u⟫ := K.coe_inner _ _
     _ = ⟪(orthogonalProjection K v : E), u⟫ + ⟪v - orthogonalProjection K v, u⟫ := by
       rw [orthogonalProjection_inner_eq_zero _ _ (Submodule.coe_mem _), add_zero]
-    _ = ⟪v, u⟫ := by rw [← inner_add_left, add_sub_cancel'_right]
+    _ = ⟪v, u⟫ := by rw [← inner_add_left, add_sub_cancel]
 #align inner_orthogonal_projection_eq_of_mem_right inner_orthogonalProjection_eq_of_mem_right
 
 -- Porting note: The priority should be higher than `Submodule.coe_inner`.
chore(*): remove empty lines between variable statements (#11418)

Empty lines were removed by executing the following Python script twice

import os
import re


# Loop through each file in the repository
for dir_path, dirs, files in os.walk('.'):
  for filename in files:
    if filename.endswith('.lean'):
      file_path = os.path.join(dir_path, filename)

      # Open the file and read its contents
      with open(file_path, 'r') as file:
        content = file.read()

      # Use a regular expression to replace sequences of "variable" lines separated by empty lines
      # with sequences without empty lines
      modified_content = re.sub(r'(variable.*\n)\n(variable(?! .* in))', r'\1\2', content)

      # Write the modified content back to the file
      with open(file_path, 'w') as file:
        file.write(modified_content)
Diff
@@ -51,9 +51,7 @@ open LinearMap (ker range)
 open BigOperators Topology
 
 variable {𝕜 E F : Type*} [IsROrC 𝕜]
-
 variable [NormedAddCommGroup E] [NormedAddCommGroup F]
-
 variable [InnerProductSpace 𝕜 E] [InnerProductSpace ℝ F]
 
 -- mathport name: «expr⟪ , ⟫»
chore: Remove ball and bex from lemma names (#10816)

ball for "bounded forall" and bex for "bounded exists" are from experience very confusing abbreviations. This PR renames them to forall_mem and exists_mem in the few Set lemma names that mention them.

Also deprecate ball_image_of_ball, mem_image_elim, mem_image_elim_on since those lemmas are duplicates of the renamed lemmas (apart from argument order and implicitness, which I am also fixing by making the binder in the RHS of forall_mem_image semi-implicit), have obscure names and are completely unused.

Diff
@@ -77,7 +77,7 @@ theorem exists_norm_eq_iInf_of_complete_convex {K : Set F} (ne : K.Nonempty) (h
   let δ := ⨅ w : K, ‖u - w‖
   letI : Nonempty K := ne.to_subtype
   have zero_le_δ : 0 ≤ δ := le_ciInf fun _ => norm_nonneg _
-  have δ_le : ∀ w : K, δ ≤ ‖u - w‖ := ciInf_le ⟨0, Set.forall_range_iff.2 fun _ => norm_nonneg _⟩
+  have δ_le : ∀ w : K, δ ≤ ‖u - w‖ := ciInf_le ⟨0, Set.forall_mem_range.2 fun _ => norm_nonneg _⟩
   have δ_le' : ∀ w ∈ K, δ ≤ ‖u - w‖ := fun w hw => δ_le ⟨w, hw⟩
   -- Step 1: since `δ` is the infimum, can find a sequence `w : ℕ → K` in `K`
   -- such that `‖u - w n‖ < δ + 1 / (n + 1)` (which implies `‖u - w n‖ --> δ`);
@@ -386,7 +386,7 @@ instance HasOrthogonalProjection.map_linearIsometryEquiv [HasOrthogonalProjectio
     HasOrthogonalProjection (K.map (f.toLinearEquiv : E →ₗ[𝕜] E')) where
   exists_orthogonal v := by
     rcases HasOrthogonalProjection.exists_orthogonal (K := K) (f.symm v) with ⟨w, hwK, hw⟩
-    refine ⟨f w, Submodule.mem_map_of_mem hwK, Set.ball_image_iff.2 fun u hu ↦ ?_⟩
+    refine ⟨f w, Submodule.mem_map_of_mem hwK, Set.forall_mem_image.2 fun u hu ↦ ?_⟩
     erw [← f.symm.inner_map_map, f.symm_apply_apply, map_sub, f.symm_apply_apply, hw u hu]
 
 instance HasOrthogonalProjection.map_linearIsometryEquiv' [HasOrthogonalProjection K]
@@ -948,7 +948,7 @@ theorem orthogonalProjection_tendsto_closure_iSup [CompleteSpace E] {ι : Type*}
   rw [norm_sub_rev, orthogonalProjection_minimal]
   refine' lt_of_le_of_lt _ hay
   change _ ≤ ‖y - (⟨a, hU hi hI⟩ : U i)‖
-  exact ciInf_le ⟨0, Set.forall_range_iff.mpr fun _ => norm_nonneg _⟩ _
+  exact ciInf_le ⟨0, Set.forall_mem_range.mpr fun _ => norm_nonneg _⟩ _
 #align orthogonal_projection_tendsto_closure_supr orthogonalProjection_tendsto_closure_iSup
 
 /-- Given a monotone family `U` of complete submodules of `E` with dense span supremum,
chore: move Mathlib to v4.7.0-rc1 (#11162)

This is a very large PR, but it has been reviewed piecemeal already in PRs to the bump/v4.7.0 branch as we update to intermediate nightlies.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Kyle Miller <kmill31415@gmail.com> Co-authored-by: damiano <adomani@gmail.com>

Diff
@@ -244,6 +244,7 @@ theorem norm_eq_iInf_iff_real_inner_le_zero {K : Set F} (h : Convex ℝ K) {u :
       have : 2 * p ≤ p :=
         calc
           2 * p ≤ θ * q := by
+            set_option tactic.skipAssignedInstances false in
             exact this θ (lt_min (by norm_num) (div_pos hp q_pos)) (by norm_num [θ])
           _ ≤ p := eq₁
       linarith
style: homogenise porting notes (#11145)

Homogenises porting notes via capitalisation and addition of whitespace.

It makes the following changes:

  • converts "--porting note" into "-- Porting note";
  • converts "porting note" into "Porting note".
Diff
@@ -1298,7 +1298,7 @@ open DirectSum
 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 := by
-  -- porting note: switch to the better `induction _ using`. Need the primed induction principle,
+  -- Porting note: switch to the better `induction _ using`. Need the primed induction principle,
   -- the unprimed one doesn't work with `induction` (as it isn't as syntactically general)
   induction hx using Submodule.iSup_induction' with
   | mem i x hx =>
@@ -1323,7 +1323,7 @@ theorem OrthogonalFamily.projection_directSum_coeAddHom [DecidableEq ι] {V : ι
   induction' x using DirectSum.induction_on with j x x y hx hy
   · simp
   · simp_rw [DirectSum.coeAddMonoidHom_of, DirectSum.of]
-    -- porting note: was in the previous `simp_rw`, no longer works
+    -- Porting note: was in the previous `simp_rw`, no longer works
     -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
     erw [DFinsupp.singleAddHom_apply]
     obtain rfl | hij := Decidable.eq_or_ne i j
refactor: optimize proofs with omega (#11093)

I ran tryAtEachStep on all files under Mathlib to find all locations where omega succeeds. For each that was a linarith without an only, I tried replacing it with omega, and I verified that elaboration time got smaller. (In almost all cases, there was a noticeable speedup.) I also replaced some slow aesops along the way.

Diff
@@ -1191,7 +1191,7 @@ theorem LinearIsometryEquiv.reflections_generate_dim_aux [FiniteDimensional ℝ
     · obtain ⟨V, hV₁, hV₂⟩ := IH φ hn'
       exact ⟨V, hV₁.trans n.le_succ, hV₂⟩
     -- Take a nonzero element `v` of the orthogonal complement of `W`.
-    haveI : Nontrivial Wᗮ := nontrivial_of_finrank_pos (by linarith [zero_le n] : 0 < finrank ℝ Wᗮ)
+    haveI : Nontrivial Wᗮ := nontrivial_of_finrank_pos (by omega : 0 < finrank ℝ Wᗮ)
     obtain ⟨v, hv⟩ := exists_ne (0 : Wᗮ)
     have hφv : φ v ∈ Wᗮ := by
       intro w hw
@@ -1231,7 +1231,7 @@ theorem LinearIsometryEquiv.reflections_generate_dim_aux [FiniteDimensional ℝ
         Submodule.finrank_lt_finrank_of_lt (SetLike.lt_iff_le_and_exists.2 ⟨H₂V, v, H₁V, hv'⟩)
       have : finrank ℝ V + finrank ℝ Vᗮ = finrank ℝ F := V.finrank_add_finrank_orthogonal
       have : finrank ℝ W + finrank ℝ Wᗮ = finrank ℝ F := W.finrank_add_finrank_orthogonal
-      linarith
+      omega
     -- So apply the inductive hypothesis to `φ.trans ρ`
     obtain ⟨l, hl, hφl⟩ := IH (ρ * φ) this
     -- Prepend `ρ` to the factorization into reflections obtained for `φ.trans ρ`; this gives a
chore: rename induction principle arguments around CliffordAlgebra (#10908)

In order to improve the ergonomics of the induction tactic, this renames the arguments of:

  • ExteriorAlgebra.induction
  • TensorAlgebra.induction
  • CliffordAlgebra.induction
  • CliffordAlgebra.left_induction
  • CliffordAlgebra.right_induction
  • CliffordAlgebra.even_induction
  • CliffordAlgebra.odd_induction
  • Submodule.iSup_induction'
  • Submodule.pow_induction_on_left'
  • Submodule.pow_induction_on_right'

This is slightly awkward for name-resolution within these induction principles, as the argument names end up clashing with the function they are about. Thankfully, this pain is not transferred to the caller using induction _ using _.

Diff
@@ -1301,15 +1301,15 @@ theorem OrthogonalFamily.sum_projection_of_mem_iSup [Fintype ι] {V : ι → Sub
   -- porting note: switch to the better `induction _ using`. Need the primed induction principle,
   -- the unprimed one doesn't work with `induction` (as it isn't as syntactically general)
   induction hx using Submodule.iSup_induction' with
-  | hp i x hx =>
+  | mem i x hx =>
     refine'
       (Finset.sum_eq_single_of_mem i (Finset.mem_univ _) fun j _ hij => _).trans
         (orthogonalProjection_eq_self_iff.mpr hx)
     rw [orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero, Submodule.coe_zero]
     exact hV.isOrtho hij.symm hx
-  | h0 =>
+  | zero =>
     simp_rw [map_zero, Submodule.coe_zero, Finset.sum_const_zero]
-  | hadd x y _ _ hx hy =>
+  | add x y _ _ hx hy =>
     simp_rw [map_add, Submodule.coe_add, Finset.sum_add_distrib]
     exact congr_arg₂ (· + ·) hx hy
 #align orthogonal_family.sum_projection_of_mem_supr OrthogonalFamily.sum_projection_of_mem_iSup
chore: prepare Lean version bump with explicit simp (#10999)

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -244,7 +244,7 @@ theorem norm_eq_iInf_iff_real_inner_le_zero {K : Set F} (h : Convex ℝ K) {u :
       have : 2 * p ≤ p :=
         calc
           2 * p ≤ θ * q := by
-            exact this θ (lt_min (by norm_num) (div_pos hp q_pos)) (by norm_num)
+            exact this θ (lt_min (by norm_num) (div_pos hp q_pos)) (by norm_num [θ])
           _ ≤ p := eq₁
       linarith
   · intro h
@@ -306,7 +306,7 @@ theorem norm_eq_iInf_iff_real_inner_eq_zero (K : Submodule ℝ F) {u : F} {v : F
         have : w' ∈ K := Submodule.add_mem _ hw hv
         have h₁ := h w' this
         have h₂ : w' - v = w := by
-          simp only [add_neg_cancel_right, sub_eq_add_neg]
+          simp only [w', add_neg_cancel_right, sub_eq_add_neg]
         rw [h₂] at h₁
         exact h₁
       have ge : ⟪u - v, w⟫_ℝ ≥ 0 := by
@@ -314,7 +314,7 @@ theorem norm_eq_iInf_iff_real_inner_eq_zero (K : Submodule ℝ F) {u : F} {v : F
         have : w'' ∈ K := Submodule.add_mem _ (Submodule.neg_mem _ hw) hv
         have h₁ := h w'' this
         have h₂ : w'' - v = -w := by
-          simp only [neg_inj, add_neg_cancel_right, sub_eq_add_neg]
+          simp only [w'', neg_inj, add_neg_cancel_right, sub_eq_add_neg]
         rw [h₂, inner_neg_right] at h₁
         linarith
       exact le_antisymm le ge)
@@ -683,9 +683,9 @@ def reflection : E ≃ₗᵢ[𝕜] E :=
           LinearEquiv.coe_ofInvolutive, LinearMap.sub_apply, LinearMap.id_apply, two_smul,
           LinearMap.add_apply, LinearMap.comp_apply, Submodule.subtype_apply,
           ContinuousLinearMap.coe_coe]
-        dsimp
+        dsimp [v]
         abel
-      · simp only [add_sub_cancel'_right, eq_self_iff_true] }
+      · simp only [v, add_sub_cancel'_right, eq_self_iff_true] }
 #align reflection reflection
 
 variable {K}
chore: remove terminal, terminal refines (#10762)

I replaced a few "terminal" refine/refine's with exact.

The strategy was very simple-minded: essentially any refine whose following line had smaller indentation got replaced by exact and then I cleaned up the mess.

This PR certainly leaves some further terminal refines, but maybe the current change is beneficial.

Diff
@@ -244,7 +244,7 @@ theorem norm_eq_iInf_iff_real_inner_le_zero {K : Set F} (h : Convex ℝ K) {u :
       have : 2 * p ≤ p :=
         calc
           2 * p ≤ θ * q := by
-            refine' this θ (lt_min (by norm_num) (div_pos hp q_pos)) (by norm_num)
+            exact this θ (lt_min (by norm_num) (div_pos hp q_pos)) (by norm_num)
           _ ≤ p := eq₁
       linarith
   · intro h
chore: remove stream-of-consciousness uses of have, replace and suffices (#10640)

No changes to tactic file, it's just boring fixes throughout the library.

This follows on from #6964.

Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -135,9 +135,9 @@ theorem exists_norm_eq_iInf_of_complete_convex {K : Set F} (ne : K.Nonempty) (h
             one_add_one_eq_two, add_smul]
           simp only [one_smul]
           have eq₁ : wp - wq = a - b := (sub_sub_sub_cancel_left _ _ _).symm
-          have eq₂ : u + u - (wq + wp) = a + b
-          show u + u - (wq + wp) = u - wq + (u - wp)
-          abel
+          have eq₂ : u + u - (wq + wp) = a + b := by
+            show u + u - (wq + wp) = u - wq + (u - wp)
+            abel
           rw [eq₁, eq₂]
         _ = 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖) := parallelogram_law_with_norm ℝ _ _
     have eq : δ ≤ ‖u - half • (wq + wp)‖ := by
@@ -178,8 +178,8 @@ theorem exists_norm_eq_iInf_of_complete_convex {K : Set F} (ne : K.Nonempty) (h
   use hv
   have h_cont : Continuous fun v => ‖u - v‖ :=
     Continuous.comp continuous_norm (Continuous.sub continuous_const continuous_id)
-  have : Tendsto (fun n => ‖u - w n‖) atTop (𝓝 ‖u - v‖)
-  convert Tendsto.comp h_cont.continuousAt w_tendsto
+  have : Tendsto (fun n => ‖u - w n‖) atTop (𝓝 ‖u - v‖) := by
+    convert Tendsto.comp h_cont.continuousAt w_tendsto
   exact tendsto_nhds_unique this norm_tendsto
 #align exists_norm_eq_infi_of_complete_convex exists_norm_eq_iInf_of_complete_convex
 
@@ -223,8 +223,7 @@ theorem norm_eq_iInf_iff_real_inner_le_zero {K : Set F} (h : Convex ℝ K) {u :
       rw [eq₁, le_add_iff_nonneg_right] at this
       have eq₂ :
         θ * θ * ‖w - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v) =
-          θ * (θ * ‖w - v‖ ^ 2 - 2 * inner (u - v) (w - v))
-      ring
+          θ * (θ * ‖w - v‖ ^ 2 - 2 * inner (u - v) (w - v)) := by ring
       rw [eq₂] at this
       have := le_of_sub_nonneg (nonneg_of_mul_nonneg_right this hθ₁)
       exact this
@@ -302,31 +301,31 @@ theorem norm_eq_iInf_iff_real_inner_eq_zero (K : Submodule ℝ F) {u : F} {v : F
         rwa [norm_eq_iInf_iff_real_inner_le_zero] at h
         exacts [K.convex, hv]
       intro w hw
-      have le : ⟪u - v, w⟫_ℝ ≤ 0
-      let w' := w + v
-      have : w' ∈ K := Submodule.add_mem _ hw hv
-      have h₁ := h w' this
-      have h₂ : w' - v = w
-      simp only [add_neg_cancel_right, sub_eq_add_neg]
-      rw [h₂] at h₁
-      exact h₁
-      have ge : ⟪u - v, w⟫_ℝ ≥ 0
-      let w'' := -w + v
-      have : w'' ∈ K := Submodule.add_mem _ (Submodule.neg_mem _ hw) hv
-      have h₁ := h w'' this
-      have h₂ : w'' - v = -w
-      simp only [neg_inj, add_neg_cancel_right, sub_eq_add_neg]
-      rw [h₂, inner_neg_right] at h₁
-      linarith
+      have le : ⟪u - v, w⟫_ℝ ≤ 0 := by
+        let w' := w + v
+        have : w' ∈ K := Submodule.add_mem _ hw hv
+        have h₁ := h w' this
+        have h₂ : w' - v = w := by
+          simp only [add_neg_cancel_right, sub_eq_add_neg]
+        rw [h₂] at h₁
+        exact h₁
+      have ge : ⟪u - v, w⟫_ℝ ≥ 0 := by
+        let w'' := -w + v
+        have : w'' ∈ K := Submodule.add_mem _ (Submodule.neg_mem _ hw) hv
+        have h₁ := h w'' this
+        have h₂ : w'' - v = -w := by
+          simp only [neg_inj, add_neg_cancel_right, sub_eq_add_neg]
+        rw [h₂, inner_neg_right] at h₁
+        linarith
       exact le_antisymm le ge)
     (by
       intro h
-      have : ∀ w ∈ K, ⟪u - v, w - v⟫_ℝ ≤ 0
-      intro w hw
-      let w' := w - v
-      have : w' ∈ K := Submodule.sub_mem _ hw hv
-      have h₁ := h w' this
-      exact le_of_eq h₁
+      have : ∀ w ∈ K, ⟪u - v, w - v⟫_ℝ ≤ 0 := by
+        intro w hw
+        let w' := w - v
+        have : w' ∈ K := Submodule.sub_mem _ hw hv
+        have h₁ := h w' this
+        exact le_of_eq h₁
       rwa [norm_eq_iInf_iff_real_inner_le_zero]
       exacts [Submodule.convex _, hv])
 #align norm_eq_infi_iff_real_inner_eq_zero norm_eq_iInf_iff_real_inner_eq_zero
refactor: prefer s ∩ . when passing to a subset of s (#10433)

This is partial work to make s ∩ . be consistently used for passing to a subset of s. This is sort of an adjoint to (Subtype.val : s -> _) '' ., except for the fact that it does not produce a Set s.

The main API changes are to Subtype.image_preimage_val and Subtype.preimage_val_eq_preimage_val_iff in Mathlib.Data.Set.Image. Changes in other modules are all proof fixups.

Zulip discussion

Diff
@@ -1431,7 +1431,7 @@ theorem maximal_orthonormal_iff_orthogonalComplement_eq_bot (hv : Orthonormal 
     obtain ⟨l, hl, rfl⟩ :
       ∃ l ∈ Finsupp.supported 𝕜 𝕜 ((↑) ⁻¹' v : Set u), (Finsupp.total (↥u) E 𝕜 (↑)) l = y := by
       rw [← Finsupp.mem_span_image_iff_total]
-      simp [huv, inter_eq_self_of_subset_left, hy]
+      simp [huv, inter_eq_self_of_subset_right, hy]
     exact hu.inner_finsupp_eq_zero hxv' hl
 #align maximal_orthonormal_iff_orthogonal_complement_eq_bot maximal_orthonormal_iff_orthogonalComplement_eq_bot
 
chore(*): golf (#10417)
Diff
@@ -166,23 +166,10 @@ theorem exists_norm_eq_iInf_of_complete_convex {K : Set F} (ne : K.Nonempty) (h
       _ ≤ 2 * ((δ + div) * (δ + div) + (δ + div) * (δ + div)) - 4 * δ * δ := by gcongr
       _ = 8 * δ * div + 4 * div * div := by ring
     positivity
-    -- third goal : `Tendsto (fun (n : ℕ) => sqrt (b n)) atTop (𝓝 0)`
-    apply Tendsto.comp (f := b) (g := sqrt)
-    · have : Tendsto sqrt (nhds 0) (nhds (sqrt 0)) := continuous_sqrt.continuousAt
-      convert this
-      exact sqrt_zero.symm
-    have eq₁ : Tendsto (fun n : ℕ => 8 * δ * (1 / (n + 1))) atTop (nhds (0 : ℝ)) := by
-      convert (tendsto_const_nhds (x := 8 * δ)).mul tendsto_one_div_add_atTop_nhds_zero_nat
-      simp only [mul_zero]
-    have : Tendsto (fun n : ℕ => (4 : ℝ) * (1 / (n + 1))) atTop (nhds (0 : ℝ)) := by
-      convert (tendsto_const_nhds (x := 4)).mul tendsto_one_div_add_atTop_nhds_zero_nat
-      simp only [mul_zero]
-    have eq₂ :
-        Tendsto (fun n : ℕ => (4 : ℝ) * (1 / (n + 1)) * (1 / (n + 1))) atTop (nhds (0 : ℝ)) := by
-      convert this.mul tendsto_one_div_add_atTop_nhds_zero_nat
-      simp only [mul_zero]
-    convert eq₁.add eq₂
-    simp only [add_zero]
+    -- third goal : `Tendsto (fun (n : ℕ) => √(b n)) atTop (𝓝 0)`
+    suffices Tendsto (fun x ↦ sqrt (8 * δ * x + 4 * x * x) : ℝ → ℝ) (𝓝 0) (𝓝 0)
+      from this.comp tendsto_one_div_add_atTop_nhds_zero_nat
+    exact Continuous.tendsto' (by continuity) _ _ (by simp)
   -- Step 3: By completeness of `K`, let `w : ℕ → K` converge to some `v : K`.
   -- Prove that it satisfies all requirements.
   rcases cauchySeq_tendsto_of_isComplete h₁ (fun n => Subtype.mem _) seq_is_cauchy with
chore(*): use notation for nhds (#10416)

Also fix GeneralizedContinuedFraction.of_convergence: it worked for the Preorder.topology only.

Diff
@@ -89,9 +89,9 @@ theorem exists_norm_eq_iInf_of_complete_convex {K : Set F} (ne : K.Nonempty) (h
     let w : ℕ → K := fun n => Classical.choose (h n)
     exact ⟨w, fun n => Classical.choose_spec (h n)⟩
   rcases exists_seq with ⟨w, hw⟩
-  have norm_tendsto : Tendsto (fun n => ‖u - w n‖) atTop (nhds δ) := by
-    have h : Tendsto (fun _ : ℕ => δ) atTop (nhds δ) := tendsto_const_nhds
-    have h' : Tendsto (fun n : ℕ => δ + 1 / (n + 1)) atTop (nhds δ) := by
+  have norm_tendsto : Tendsto (fun n => ‖u - w n‖) atTop (𝓝 δ) := by
+    have h : Tendsto (fun _ : ℕ => δ) atTop (𝓝 δ) := tendsto_const_nhds
+    have h' : Tendsto (fun n : ℕ => δ + 1 / (n + 1)) atTop (𝓝 δ) := by
       convert h.add tendsto_one_div_add_atTop_nhds_zero_nat
       simp only [add_zero]
     exact tendsto_of_tendsto_of_tendsto_of_le_of_le h h' (fun x => δ_le _) fun x => le_of_lt (hw _)
@@ -191,7 +191,7 @@ theorem exists_norm_eq_iInf_of_complete_convex {K : Set F} (ne : K.Nonempty) (h
   use hv
   have h_cont : Continuous fun v => ‖u - v‖ :=
     Continuous.comp continuous_norm (Continuous.sub continuous_const continuous_id)
-  have : Tendsto (fun n => ‖u - w n‖) atTop (nhds ‖u - v‖)
+  have : Tendsto (fun n => ‖u - w n‖) atTop (𝓝 ‖u - v‖)
   convert Tendsto.comp h_cont.continuousAt w_tendsto
   exact tendsto_nhds_unique this norm_tendsto
 #align exists_norm_eq_infi_of_complete_convex exists_norm_eq_iInf_of_complete_convex
chore(FiniteDimensional): rename lemmas (#10188)

Rename lemmas to enable new-style dot notation or drop repeating FiniteDimensional.finiteDimensional_*. Restore old names as deprecated aliases.

Diff
@@ -1173,7 +1173,7 @@ theorem Submodule.finrank_add_finrank_orthogonal' [FiniteDimensional 𝕜 E] {K
 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 := by
-  haveI : FiniteDimensional 𝕜 E := fact_finiteDimensional_of_finrank_eq_succ n
+  haveI : FiniteDimensional 𝕜 E := .of_fact_finrank_eq_succ n
   exact Submodule.finrank_add_finrank_orthogonal' <| by
     simp [finrank_span_singleton hv, _i.elim, add_comm]
 #align finrank_orthogonal_span_singleton finrank_orthogonal_span_singleton
chore(Analysis/SpecificLimits/* and others): rename _0 -> _zero, _1 -> _one (#10077)

See here on Zulip.

This PR changes a bunch of names containing nhds_0 or/and lt_1 to nhds_zero or/and lt_one.

Diff
@@ -92,7 +92,7 @@ theorem exists_norm_eq_iInf_of_complete_convex {K : Set F} (ne : K.Nonempty) (h
   have norm_tendsto : Tendsto (fun n => ‖u - w n‖) atTop (nhds δ) := by
     have h : Tendsto (fun _ : ℕ => δ) atTop (nhds δ) := tendsto_const_nhds
     have h' : Tendsto (fun n : ℕ => δ + 1 / (n + 1)) atTop (nhds δ) := by
-      convert h.add tendsto_one_div_add_atTop_nhds_0_nat
+      convert h.add tendsto_one_div_add_atTop_nhds_zero_nat
       simp only [add_zero]
     exact tendsto_of_tendsto_of_tendsto_of_le_of_le h h' (fun x => δ_le _) fun x => le_of_lt (hw _)
   -- Step 2: Prove that the sequence `w : ℕ → K` is a Cauchy sequence
@@ -172,14 +172,14 @@ theorem exists_norm_eq_iInf_of_complete_convex {K : Set F} (ne : K.Nonempty) (h
       convert this
       exact sqrt_zero.symm
     have eq₁ : Tendsto (fun n : ℕ => 8 * δ * (1 / (n + 1))) atTop (nhds (0 : ℝ)) := by
-      convert (tendsto_const_nhds (x := 8 * δ)).mul tendsto_one_div_add_atTop_nhds_0_nat
+      convert (tendsto_const_nhds (x := 8 * δ)).mul tendsto_one_div_add_atTop_nhds_zero_nat
       simp only [mul_zero]
     have : Tendsto (fun n : ℕ => (4 : ℝ) * (1 / (n + 1))) atTop (nhds (0 : ℝ)) := by
-      convert (tendsto_const_nhds (x := 4)).mul tendsto_one_div_add_atTop_nhds_0_nat
+      convert (tendsto_const_nhds (x := 4)).mul tendsto_one_div_add_atTop_nhds_zero_nat
       simp only [mul_zero]
     have eq₂ :
         Tendsto (fun n : ℕ => (4 : ℝ) * (1 / (n + 1)) * (1 / (n + 1))) atTop (nhds (0 : ℝ)) := by
-      convert this.mul tendsto_one_div_add_atTop_nhds_0_nat
+      convert this.mul tendsto_one_div_add_atTop_nhds_zero_nat
       simp only [mul_zero]
     convert eq₁.add eq₂
     simp only [add_zero]
chore(Topology/Basic): re-use variables; rename a : X to x : X (#9993)

Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Yury G. Kudryashov <urkud@urkud.name>

Diff
@@ -172,10 +172,10 @@ theorem exists_norm_eq_iInf_of_complete_convex {K : Set F} (ne : K.Nonempty) (h
       convert this
       exact sqrt_zero.symm
     have eq₁ : Tendsto (fun n : ℕ => 8 * δ * (1 / (n + 1))) atTop (nhds (0 : ℝ)) := by
-      convert (@tendsto_const_nhds _ _ _ (8 * δ) _).mul tendsto_one_div_add_atTop_nhds_0_nat
+      convert (tendsto_const_nhds (x := 8 * δ)).mul tendsto_one_div_add_atTop_nhds_0_nat
       simp only [mul_zero]
     have : Tendsto (fun n : ℕ => (4 : ℝ) * (1 / (n + 1))) atTop (nhds (0 : ℝ)) := by
-      convert (@tendsto_const_nhds _ _ _ (4 : ℝ) _).mul tendsto_one_div_add_atTop_nhds_0_nat
+      convert (tendsto_const_nhds (x := 4)).mul tendsto_one_div_add_atTop_nhds_0_nat
       simp only [mul_zero]
     have eq₂ :
         Tendsto (fun n : ℕ => (4 : ℝ) * (1 / (n + 1)) * (1 / (n + 1))) atTop (nhds (0 : ℝ)) := by
chore(*): rename FunLike to DFunLike (#9785)

This prepares for the introduction of a non-dependent synonym of FunLike, which helps a lot with keeping #8386 readable.

This is entirely search-and-replace in 680197f combined with manual fixes in 4145626, e900597 and b8428f8. The commands that generated this change:

sed -i 's/\bFunLike\b/DFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\btoFunLike\b/toDFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/import Mathlib.Data.DFunLike/import Mathlib.Data.FunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\bHom_FunLike\b/Hom_DFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean     
sed -i 's/\binstFunLike\b/instDFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\bfunLike\b/instDFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\btoo many metavariables to apply `fun_like.has_coe_to_fun`/too many metavariables to apply `DFunLike.hasCoeToFun`/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean

Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>

Diff
@@ -893,7 +893,7 @@ theorem orthogonalProjection_comp_subtypeL_eq_zero_iff {U V : Submodule 𝕜 E}
     [HasOrthogonalProjection U] : orthogonalProjection U ∘L V.subtypeL = 0 ↔ U ⟂ V :=
   ⟨fun h u hu v hv => by
     convert orthogonalProjection_inner_eq_zero v u hu using 2
-    have : orthogonalProjection U v = 0 := FunLike.congr_fun h (⟨_, hv⟩ : V)
+    have : orthogonalProjection U v = 0 := DFunLike.congr_fun h (⟨_, hv⟩ : V)
     rw [this, Submodule.coe_zero, sub_zero], Submodule.IsOrtho.orthogonalProjection_comp_subtypeL⟩
 set_option linter.uppercaseLean3 false in
 #align orthogonal_projection_comp_subtypeL_eq_zero_iff orthogonalProjection_comp_subtypeL_eq_zero_iff
refactor: Multiplicativise abs (#9553)

The current design for abs is flawed:

  • The Abs notation typeclass has exactly two instances: one for [Neg α] [Sup α], one for [Inv α] [Sup α]. This means that:
    • We can't write a meaningful hover for Abs.abs
    • Fields have two Abs instances!
  • We have the multiplicative definition but:
    • All the lemmas in Algebra.Order.Group.Abs are about the additive version.
    • The only lemmas about the multiplicative version are in Algebra.Order.Group.PosPart, and they get additivised to duplicates of the lemmas in Algebra.Order.Group.Abs!

This PR changes the notation typeclass with two new definitions (related through to_additive): mabs and abs. abs inherits the |a| notation and mabs gets |a|ₘ instead.

The first half of Algebra.Order.Group.Abs gets multiplicativised. A later PR will multiplicativise the second half, and another one will deduplicate the lemmas in Algebra.Order.Group.PosPart.

Part of #9411.

Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com>

Diff
@@ -60,7 +60,7 @@ variable [InnerProductSpace 𝕜 E] [InnerProductSpace ℝ F]
 local notation "⟪" x ", " y "⟫" => @inner 𝕜 _ _ x y
 
 -- mathport name: exprabsR
-local notation "absR" => Abs.abs
+local notation "absR" => abs
 
 /-! ### Orthogonal projection in inner product spaces -/
 
chore(*): use ∀ s ⊆ t, _ etc (#9276)

Changes in this PR shouldn't change the public API. The only changes about ∃ x ∈ s, _ is inside a proof.

Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com>

Diff
@@ -1387,7 +1387,7 @@ open FiniteDimensional Submodule Set
 /-- 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) (_ : u ⊇ v), Orthonormal 𝕜 ((↑) : u → E) → u = v) ↔ (span 𝕜 v)ᗮ = ⊥ := by
+    (∀ u ⊇ v, Orthonormal 𝕜 ((↑) : u → E) → u = v) ↔ (span 𝕜 v)ᗮ = ⊥ := by
   rw [Submodule.eq_bot_iff]
   constructor
   · contrapose!
@@ -1453,8 +1453,7 @@ variable [FiniteDimensional 𝕜 E]
 /-- 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) (_ : u ⊇ v), Orthonormal 𝕜 ((↑) : u → E) → u = v) ↔
-      ∃ b : Basis v 𝕜 E, ⇑b = ((↑) : v → E) := by
+    (∀ u ⊇ v, Orthonormal 𝕜 ((↑) : u → E) → u = v) ↔ ∃ b : Basis v 𝕜 E, ⇑b = ((↑) : v → E) := by
   haveI := proper_isROrC 𝕜 (span 𝕜 v)
   rw [maximal_orthonormal_iff_orthogonalComplement_eq_bot hv]
   rw [Submodule.orthogonal_eq_bot_iff]
chore: Generalize results on finrank to rings. (#8912)

A portion of results in Mathlib/LinearAlgebra/FiniteDimensional.lean were generalized to rings and moved to Mathlib/LinearAlgebra/FreeModule/Finite/Rank.lean. Most API lemmas for FiniteDimensional are kept but replaced with one lemma proofs. Definitions and niche lemmas are replaced by the generalized version completely.

Co-authored-by: erd1 <the.erd.one@gmail.com> Co-authored-by: Andrew Yang <the.erd.one@gmail.com>

Diff
@@ -1190,7 +1190,8 @@ theorem LinearIsometryEquiv.reflections_generate_dim_aux [FiniteDimensional ℝ
   · -- Base case: `n = 0`, the fixed subspace is the whole space, so `φ = id`
     refine' ⟨[], rfl.le, show φ = 1 from _⟩
     have : ker (ContinuousLinearMap.id ℝ F - φ) = ⊤ := by
-      rwa [Nat.zero_eq, le_zero_iff, finrank_eq_zero, Submodule.orthogonal_eq_bot_iff] at hn
+      rwa [Nat.zero_eq, le_zero_iff, Submodule.finrank_eq_zero,
+        Submodule.orthogonal_eq_bot_iff] at hn
     symm
     ext x
     have := LinearMap.congr_fun (LinearMap.ker_eq_top.mp this) x
chore: Rename pow monotonicity lemmas (#9095)

The names for lemmas about monotonicity of (a ^ ·) and (· ^ n) were a mess. This PR tidies up everything related by following the naming convention for (a * ·) and (· * b). Namely, (a ^ ·) is pow_right and (· ^ n) is pow_left in lemma names. All lemma renames follow the corresponding multiplication lemma names closely.

Renames

Algebra.GroupPower.Order

  • pow_monopow_right_mono
  • pow_le_powpow_le_pow_right
  • pow_le_pow_of_le_leftpow_le_pow_left
  • pow_lt_pow_of_lt_leftpow_lt_pow_left
  • strictMonoOn_powpow_left_strictMonoOn
  • pow_strictMono_rightpow_right_strictMono
  • pow_lt_powpow_lt_pow_right
  • pow_lt_pow_iffpow_lt_pow_iff_right
  • pow_le_pow_iffpow_le_pow_iff_right
  • self_lt_powlt_self_pow
  • strictAnti_powpow_right_strictAnti
  • pow_lt_pow_iff_of_lt_onepow_lt_pow_iff_right_of_lt_one
  • pow_lt_pow_of_lt_onepow_lt_pow_right_of_lt_one
  • lt_of_pow_lt_powlt_of_pow_lt_pow_left
  • le_of_pow_le_powle_of_pow_le_pow_left
  • pow_lt_pow₀pow_lt_pow_right₀

Algebra.GroupPower.CovariantClass

  • pow_le_pow_of_le_left'pow_le_pow_left'
  • nsmul_le_nsmul_of_le_rightnsmul_le_nsmul_right
  • pow_lt_pow'pow_lt_pow_right'
  • nsmul_lt_nsmulnsmul_lt_nsmul_left
  • pow_strictMono_leftpow_right_strictMono'
  • nsmul_strictMono_rightnsmul_left_strictMono
  • StrictMono.pow_right'StrictMono.pow_const
  • StrictMono.nsmul_leftStrictMono.const_nsmul
  • pow_strictMono_right'pow_left_strictMono
  • nsmul_strictMono_leftnsmul_right_strictMono
  • Monotone.pow_rightMonotone.pow_const
  • Monotone.nsmul_leftMonotone.const_nsmul
  • lt_of_pow_lt_pow'lt_of_pow_lt_pow_left'
  • lt_of_nsmul_lt_nsmullt_of_nsmul_lt_nsmul_right
  • pow_le_pow'pow_le_pow_right'
  • nsmul_le_nsmulnsmul_le_nsmul_left
  • pow_le_pow_of_le_one'pow_le_pow_right_of_le_one'
  • nsmul_le_nsmul_of_nonposnsmul_le_nsmul_left_of_nonpos
  • le_of_pow_le_pow'le_of_pow_le_pow_left'
  • le_of_nsmul_le_nsmul'le_of_nsmul_le_nsmul_right'
  • pow_le_pow_iff'pow_le_pow_iff_right'
  • nsmul_le_nsmul_iffnsmul_le_nsmul_iff_left
  • pow_lt_pow_iff'pow_lt_pow_iff_right'
  • nsmul_lt_nsmul_iffnsmul_lt_nsmul_iff_left

Data.Nat.Pow

  • Nat.pow_lt_pow_of_lt_leftNat.pow_lt_pow_left
  • Nat.pow_le_iff_le_leftNat.pow_le_pow_iff_left
  • Nat.pow_lt_iff_lt_leftNat.pow_lt_pow_iff_left

Lemmas added

  • pow_le_pow_iff_left
  • pow_lt_pow_iff_left
  • pow_right_injective
  • pow_right_inj
  • Nat.pow_le_pow_left to have the correct name since Nat.pow_le_pow_of_le_left is in Std.
  • Nat.pow_le_pow_right to have the correct name since Nat.pow_le_pow_of_le_right is in Std.

Lemmas removed

  • self_le_pow was a duplicate of le_self_pow.
  • Nat.pow_lt_pow_of_lt_right is defeq to pow_lt_pow_right.
  • Nat.pow_right_strictMono is defeq to pow_right_strictMono.
  • Nat.pow_le_iff_le_right is defeq to pow_le_pow_iff_right.
  • Nat.pow_lt_iff_lt_right is defeq to pow_lt_pow_iff_right.

Other changes

  • A bunch of proofs have been golfed.
  • Some lemma assumptions have been turned from 0 < n or 1 ≤ n to n ≠ 0.
  • A few Nat lemmas have been protected.
  • One docstring has been fixed.
Diff
@@ -492,7 +492,7 @@ def orthogonalProjection : E →L[𝕜] K :=
         simp [eq_orthogonalProjectionFn_of_mem_of_inner_eq_zero hm ho] }
     1 fun x => by
     simp only [one_mul, LinearMap.coe_mk]
-    refine' le_of_pow_le_pow 2 (norm_nonneg _) (by norm_num) _
+    refine' le_of_pow_le_pow_left two_ne_zero (norm_nonneg _) _
     change ‖orthogonalProjectionFn K x‖ ^ 2 ≤ ‖x‖ ^ 2
     nlinarith [orthogonalProjectionFn_norm_sq K x]
 #align orthogonal_projection orthogonalProjection
chore: Replace (· op ·) a by (a op ·) (#8843)

I used the regex \(\(· (.) ·\) (.)\), replacing with ($2 $1 ·).

Diff
@@ -1251,7 +1251,7 @@ theorem LinearIsometryEquiv.reflections_generate_dim_aux [FiniteDimensional ℝ
     -- factorization into reflections for `φ`.
     refine' ⟨x::l, Nat.succ_le_succ hl, _⟩
     rw [List.map_cons, List.prod_cons]
-    have := congr_arg ((· * ·) ρ) hφl
+    have := congr_arg (ρ * ·) hφl
     dsimp only at this
     rwa [← mul_assoc, reflection_mul_reflection, one_mul] at this
 #align linear_isometry_equiv.reflections_generate_dim_aux LinearIsometryEquiv.reflections_generate_dim_aux
chore: missing spaces after rcases, convert and congrm (#7725)

Replace rcases( with rcases (. Same thing for convert( and congrm(. No other change.

Diff
@@ -172,10 +172,10 @@ theorem exists_norm_eq_iInf_of_complete_convex {K : Set F} (ne : K.Nonempty) (h
       convert this
       exact sqrt_zero.symm
     have eq₁ : Tendsto (fun n : ℕ => 8 * δ * (1 / (n + 1))) atTop (nhds (0 : ℝ)) := by
-      convert(@tendsto_const_nhds _ _ _ (8 * δ) _).mul tendsto_one_div_add_atTop_nhds_0_nat
+      convert (@tendsto_const_nhds _ _ _ (8 * δ) _).mul tendsto_one_div_add_atTop_nhds_0_nat
       simp only [mul_zero]
     have : Tendsto (fun n : ℕ => (4 : ℝ) * (1 / (n + 1))) atTop (nhds (0 : ℝ)) := by
-      convert(@tendsto_const_nhds _ _ _ (4 : ℝ) _).mul tendsto_one_div_add_atTop_nhds_0_nat
+      convert (@tendsto_const_nhds _ _ _ (4 : ℝ) _).mul tendsto_one_div_add_atTop_nhds_0_nat
       simp only [mul_zero]
     have eq₂ :
         Tendsto (fun n : ℕ => (4 : ℝ) * (1 / (n + 1)) * (1 / (n + 1))) atTop (nhds (0 : ℝ)) := by
Revert "chore: revert #7703 (#7710)"

This reverts commit f3695eb2.

Diff
@@ -1337,7 +1337,8 @@ theorem OrthogonalFamily.projection_directSum_coeAddHom [DecidableEq ι] {V : ι
   · simp
   · simp_rw [DirectSum.coeAddMonoidHom_of, DirectSum.of]
     -- porting note: was in the previous `simp_rw`, no longer works
-    rw [DFinsupp.singleAddHom_apply]
+    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
+    erw [DFinsupp.singleAddHom_apply]
     obtain rfl | hij := Decidable.eq_or_ne i j
     · rw [orthogonalProjection_mem_subspace_eq_self, DFinsupp.single_eq_same]
     · rw [orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero,
@@ -1362,8 +1363,9 @@ def OrthogonalFamily.decomposition [DecidableEq ι] [Fintype ι] {V : ι → Sub
   left_inv x := by
     dsimp only
     letI := fun i => Classical.decEq (V i)
-    rw [DirectSum.coeAddMonoidHom, DirectSum.toAddMonoid, DFinsupp.liftAddHom_apply,
-      DFinsupp.sumAddHom_apply, DFinsupp.sum_eq_sum_fintype]
+    rw [DirectSum.coeAddMonoidHom, DirectSum.toAddMonoid, DFinsupp.liftAddHom_apply]
+    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
+    erw [DFinsupp.sumAddHom_apply]; rw [DFinsupp.sum_eq_sum_fintype]
     · simp_rw [Equiv.apply_symm_apply, AddSubmonoidClass.coe_subtype]
       exact hV.sum_projection_of_mem_iSup _ ((h.ge : _) Submodule.mem_top)
     · intro i
chore: revert #7703 (#7710)

This reverts commit 26eb2b0a.

Diff
@@ -1337,8 +1337,7 @@ theorem OrthogonalFamily.projection_directSum_coeAddHom [DecidableEq ι] {V : ι
   · simp
   · simp_rw [DirectSum.coeAddMonoidHom_of, DirectSum.of]
     -- porting note: was in the previous `simp_rw`, no longer works
-    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
-    erw [DFinsupp.singleAddHom_apply]
+    rw [DFinsupp.singleAddHom_apply]
     obtain rfl | hij := Decidable.eq_or_ne i j
     · rw [orthogonalProjection_mem_subspace_eq_self, DFinsupp.single_eq_same]
     · rw [orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero,
@@ -1363,9 +1362,8 @@ def OrthogonalFamily.decomposition [DecidableEq ι] [Fintype ι] {V : ι → Sub
   left_inv x := by
     dsimp only
     letI := fun i => Classical.decEq (V i)
-    rw [DirectSum.coeAddMonoidHom, DirectSum.toAddMonoid, DFinsupp.liftAddHom_apply]
-    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
-    erw [DFinsupp.sumAddHom_apply]; rw [DFinsupp.sum_eq_sum_fintype]
+    rw [DirectSum.coeAddMonoidHom, DirectSum.toAddMonoid, DFinsupp.liftAddHom_apply,
+      DFinsupp.sumAddHom_apply, DFinsupp.sum_eq_sum_fintype]
     · simp_rw [Equiv.apply_symm_apply, AddSubmonoidClass.coe_subtype]
       exact hV.sum_projection_of_mem_iSup _ ((h.ge : _) Submodule.mem_top)
     · intro i
chore: bump toolchain to v4.2.0-rc2 (#7703)

This includes all the changes from #7606.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -1337,7 +1337,8 @@ theorem OrthogonalFamily.projection_directSum_coeAddHom [DecidableEq ι] {V : ι
   · simp
   · simp_rw [DirectSum.coeAddMonoidHom_of, DirectSum.of]
     -- porting note: was in the previous `simp_rw`, no longer works
-    rw [DFinsupp.singleAddHom_apply]
+    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
+    erw [DFinsupp.singleAddHom_apply]
     obtain rfl | hij := Decidable.eq_or_ne i j
     · rw [orthogonalProjection_mem_subspace_eq_self, DFinsupp.single_eq_same]
     · rw [orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero,
@@ -1362,8 +1363,9 @@ def OrthogonalFamily.decomposition [DecidableEq ι] [Fintype ι] {V : ι → Sub
   left_inv x := by
     dsimp only
     letI := fun i => Classical.decEq (V i)
-    rw [DirectSum.coeAddMonoidHom, DirectSum.toAddMonoid, DFinsupp.liftAddHom_apply,
-      DFinsupp.sumAddHom_apply, DFinsupp.sum_eq_sum_fintype]
+    rw [DirectSum.coeAddMonoidHom, DirectSum.toAddMonoid, DFinsupp.liftAddHom_apply]
+    -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
+    erw [DFinsupp.sumAddHom_apply]; rw [DFinsupp.sum_eq_sum_fintype]
     · simp_rw [Equiv.apply_symm_apply, AddSubmonoidClass.coe_subtype]
       exact hV.sum_projection_of_mem_iSup _ ((h.ge : _) Submodule.mem_top)
     · intro i
feat: kernel of orthogonalProjection K is Kᗮ (#6943)
Diff
@@ -580,6 +580,17 @@ theorem orthogonalProjection_eq_self_iff {v : E} : (orthogonalProjection K v : E
   · simp
 #align orthogonal_projection_eq_self_iff orthogonalProjection_eq_self_iff
 
+@[simp]
+theorem orthogonalProjection_eq_zero_iff {v : E} : orthogonalProjection K v = 0 ↔ v ∈ Kᗮ := by
+  refine ⟨fun h ↦ ?_, fun h ↦ Subtype.eq <| eq_orthogonalProjection_of_mem_orthogonal
+    (zero_mem _) ?_⟩
+  · simpa [h] using sub_orthogonalProjection_mem_orthogonal (K := K) v
+  · simpa
+
+@[simp]
+theorem ker_orthogonalProjection : LinearMap.ker (orthogonalProjection K) = Kᗮ := by
+  ext; exact orthogonalProjection_eq_zero_iff
+
 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)]
chore: drop MulZeroClass. in mul_zero/zero_mul (#6682)

Search&replace MulZeroClass.mul_zero -> mul_zero, MulZeroClass.zero_mul -> zero_mul.

These were introduced by Mathport, as the full name of mul_zero is actually MulZeroClass.mul_zero (it's exported with the short name).

Diff
@@ -173,14 +173,14 @@ theorem exists_norm_eq_iInf_of_complete_convex {K : Set F} (ne : K.Nonempty) (h
       exact sqrt_zero.symm
     have eq₁ : Tendsto (fun n : ℕ => 8 * δ * (1 / (n + 1))) atTop (nhds (0 : ℝ)) := by
       convert(@tendsto_const_nhds _ _ _ (8 * δ) _).mul tendsto_one_div_add_atTop_nhds_0_nat
-      simp only [MulZeroClass.mul_zero]
+      simp only [mul_zero]
     have : Tendsto (fun n : ℕ => (4 : ℝ) * (1 / (n + 1))) atTop (nhds (0 : ℝ)) := by
       convert(@tendsto_const_nhds _ _ _ (4 : ℝ) _).mul tendsto_one_div_add_atTop_nhds_0_nat
-      simp only [MulZeroClass.mul_zero]
+      simp only [mul_zero]
     have eq₂ :
         Tendsto (fun n : ℕ => (4 : ℝ) * (1 / (n + 1)) * (1 / (n + 1))) atTop (nhds (0 : ℝ)) := by
       convert this.mul tendsto_one_div_add_atTop_nhds_0_nat
-      simp only [MulZeroClass.mul_zero]
+      simp only [mul_zero]
     convert eq₁.add eq₂
     simp only [add_zero]
   -- Step 3: By completeness of `K`, let `w : ℕ → K` converge to some `v : K`.
@@ -487,7 +487,7 @@ def orthogonalProjection : E →L[𝕜] K :=
         have ho : ∀ w ∈ K, ⟪c • x - c • orthogonalProjectionFn K x, w⟫ = 0 := by
           intro w hw
           rw [← smul_sub, inner_smul_left, orthogonalProjectionFn_inner_eq_zero _ w hw,
-            MulZeroClass.mul_zero]
+            mul_zero]
         ext
         simp [eq_orthogonalProjectionFn_of_mem_of_inner_eq_zero hm ho] }
     1 fun x => by
chore: remove unused simps (#6632)

Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -1332,7 +1332,7 @@ theorem OrthogonalFamily.projection_directSum_coeAddHom [DecidableEq ι] {V : ι
     · rw [orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero,
         DFinsupp.single_eq_of_ne hij.symm]
       exact hV.isOrtho hij.symm x.prop
-  · simp_rw [map_add, DFinsupp.add_apply]
+  · simp_rw [map_add]
     exact congr_arg₂ (· + ·) hx hy
 #align orthogonal_family.projection_direct_sum_coe_add_hom OrthogonalFamily.projection_directSum_coeAddHom
 
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -50,7 +50,7 @@ open LinearMap (ker range)
 
 open BigOperators Topology
 
-variable {𝕜 E F : Type _} [IsROrC 𝕜]
+variable {𝕜 E F : Type*} [IsROrC 𝕜]
 
 variable [NormedAddCommGroup E] [NormedAddCommGroup F]
 
@@ -395,7 +395,7 @@ instance [HasOrthogonalProjection K] : HasOrthogonalProjection Kᗮ where
     exact K.le_orthogonal_orthogonal hwK
 
 instance HasOrthogonalProjection.map_linearIsometryEquiv [HasOrthogonalProjection K]
-    {E' : Type _} [NormedAddCommGroup E'] [InnerProductSpace 𝕜 E'] (f : E ≃ₗᵢ[𝕜] E') :
+    {E' : Type*} [NormedAddCommGroup E'] [InnerProductSpace 𝕜 E'] (f : E ≃ₗᵢ[𝕜] E') :
     HasOrthogonalProjection (K.map (f.toLinearEquiv : E →ₗ[𝕜] E')) where
   exists_orthogonal v := by
     rcases HasOrthogonalProjection.exists_orthogonal (K := K) (f.symm v) with ⟨w, hwK, hw⟩
@@ -403,7 +403,7 @@ instance HasOrthogonalProjection.map_linearIsometryEquiv [HasOrthogonalProjectio
     erw [← f.symm.inner_map_map, f.symm_apply_apply, map_sub, f.symm_apply_apply, hw u hu]
 
 instance HasOrthogonalProjection.map_linearIsometryEquiv' [HasOrthogonalProjection K]
-    {E' : Type _} [NormedAddCommGroup E'] [InnerProductSpace 𝕜 E'] (f : E ≃ₗᵢ[𝕜] E') :
+    {E' : Type*} [NormedAddCommGroup E'] [InnerProductSpace 𝕜 E'] (f : E ≃ₗᵢ[𝕜] E') :
     HasOrthogonalProjection (K.map f.toLinearIsometry) :=
   HasOrthogonalProjection.map_linearIsometryEquiv K f
 
@@ -580,7 +580,7 @@ theorem orthogonalProjection_eq_self_iff {v : E} : (orthogonalProjection K v : E
   · simp
 #align orthogonal_projection_eq_self_iff orthogonalProjection_eq_self_iff
 
-theorem LinearIsometry.map_orthogonalProjection {E E' : Type _} [NormedAddCommGroup E]
+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) := by
@@ -590,7 +590,7 @@ theorem LinearIsometry.map_orthogonalProjection {E E' : Type _} [NormedAddCommGr
   rw [← f.map_sub, f.inner_map_map, orthogonalProjection_inner_eq_zero x x' hx']
 #align linear_isometry.map_orthogonal_projection LinearIsometry.map_orthogonalProjection
 
-theorem LinearIsometry.map_orthogonalProjection' {E E' : Type _} [NormedAddCommGroup E]
+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) :=
@@ -599,7 +599,7 @@ theorem LinearIsometry.map_orthogonalProjection' {E E' : Type _} [NormedAddCommG
 #align linear_isometry.map_orthogonal_projection' LinearIsometry.map_orthogonalProjection'
 
 /-- Orthogonal projection onto the `Submodule.map` of a subspace. -/
-theorem orthogonalProjection_map_apply {E E' : Type _} [NormedAddCommGroup E]
+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') =
@@ -761,7 +761,7 @@ theorem reflection_mem_subspace_eq_self {x : E} (hx : x ∈ K) : reflection K x
 #align reflection_mem_subspace_eq_self reflection_mem_subspace_eq_self
 
 /-- Reflection in the `Submodule.map` of a subspace. -/
-theorem reflection_map_apply {E E' : Type _} [NormedAddCommGroup E] [NormedAddCommGroup E']
+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)) := by
@@ -769,7 +769,7 @@ theorem reflection_map_apply {E E' : Type _} [NormedAddCommGroup E] [NormedAddCo
 #align reflection_map_apply reflection_map_apply
 
 /-- Reflection in the `Submodule.map` of a subspace. -/
-theorem reflection_map {E E' : Type _} [NormedAddCommGroup E] [NormedAddCommGroup E']
+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) :=
@@ -927,7 +927,7 @@ theorem orthogonalProjection_orthogonalProjection_of_le {U V : Submodule 𝕜 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).topologicalClosure` along `atTop`. -/
-theorem orthogonalProjection_tendsto_closure_iSup [CompleteSpace E] {ι : Type _} [SemilatticeSup ι]
+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)) := by
@@ -955,7 +955,7 @@ theorem orthogonalProjection_tendsto_closure_iSup [CompleteSpace E] {ι : Type _
 
 /-- 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 ι]
+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) := by
@@ -1271,7 +1271,7 @@ end Orthogonal
 
 section OrthogonalFamily
 
-variable {ι : Type _}
+variable {ι : Type*}
 
 /-- 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
feat: derivative of the inversion (#5937)

Prove that inversion is smooth away from the center and its derivative is a scaled reflection.

Co-authored-by: Oliver Nash <github@olivernash.org>

Diff
@@ -744,6 +744,10 @@ theorem reflection_orthogonal : reflection Kᗮ = .trans (reflection K) (.neg _)
 
 variable {K}
 
+theorem reflection_singleton_apply (u v : E) :
+    reflection (𝕜 ∙ u) v = 2 • (⟪u, v⟫ / ((‖u‖ : 𝕜) ^ 2)) • u - v := by
+  rw [reflection_apply, orthogonalProjection_singleton, ofReal_pow]
+
 /-- 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 := by
   rw [← orthogonalProjection_eq_self_iff, reflection_apply, sub_eq_iff_eq_add', ← two_smul 𝕜,
chore: fix grammar mistakes (#6121)
Diff
@@ -27,7 +27,7 @@ each `u : E`, the point `reflection K u` to satisfy
 Basic API for `orthogonalProjection` 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
+orthogonal complement of complete subspaces of `E` (the orthogonal complement itself was
 defined in `Analysis.InnerProductSpace.Orthogonal`); the lemma
 `Submodule.sup_orthogonal_of_completeSpace`, stating that for a complete subspace `K` of `E` we have
 `K ⊔ Kᗮ = ⊤`, is a typical example.
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,11 +2,6 @@
 Copyright (c) 2019 Zhouhang Zhou. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Zhouhang Zhou, Frédéric Dupuis, Heather Macbeth
-
-! This file was ported from Lean 3 source module analysis.inner_product_space.projection
-! leanprover-community/mathlib commit 0b7c740e25651db0ba63648fbae9f9d6f941e31b
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Analysis.Convex.Basic
 import Mathlib.Analysis.InnerProductSpace.Orthogonal
@@ -15,6 +10,8 @@ import Mathlib.Analysis.NormedSpace.IsROrC
 import Mathlib.Data.IsROrC.Lemmas
 import Mathlib.Algebra.DirectSum.Decomposition
 
+#align_import analysis.inner_product_space.projection from "leanprover-community/mathlib"@"0b7c740e25651db0ba63648fbae9f9d6f941e31b"
+
 /-!
 # The orthogonal projection
 
chore: cleanup whitespace (#5988)

Grepping for [^ .:{-] [^ :] and reviewing the results. Once I started I couldn't stop. :-)

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -38,8 +38,8 @@ defined in `Analysis.InnerProductSpace.Orthogonal`); the lemma
 ## References
 
 The orthogonal projection construction is adapted from
-*  [Clément & Martin, *The Lax-Milgram Theorem. A detailed proof to be formalized in Coq*]
-*  [Clément & Martin, *A Coq formal proof of the Lax–Milgram theorem*]
+* [Clément & Martin, *The Lax-Milgram Theorem. A detailed proof to be formalized in Coq*]
+* [Clément & Martin, *A Coq formal proof of the Lax–Milgram theorem*]
 
 The Coq code is available at the following address: <http://www.lri.fr/~sboldo/elfic/index.html>
 -/
Generalize orthogonalProjection (#5917)

Introduce a typeclass HasOrthogonalProjection and use it instead of [CompleteSpace K] in the definitions of orthogonalProjection and reflection, as well as lemmas about these definitions.

This way we do not need a [CompleteSpace E] assumption to talk about orthogonalProjection (𝕜 ∙ v).

Fixes #5877

Diff
@@ -377,16 +377,51 @@ theorem norm_eq_iInf_iff_inner_eq_zero {u : E} {v : E} (hv : v ∈ K) :
     exact (norm_eq_iInf_iff_real_inner_eq_zero K' hv).2 this
 #align norm_eq_infi_iff_inner_eq_zero norm_eq_iInf_iff_inner_eq_zero
 
+/-- 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ᗮ
+
+instance (priority := 100) HasOrthogonalProjection.ofCompleteSpace [CompleteSpace K] :
+    HasOrthogonalProjection K where
+  exists_orthogonal v := by
+    rcases exists_norm_eq_iInf_of_complete_subspace K (completeSpace_coe_iff_isComplete.mp ‹_›) v
+      with ⟨w, hwK, hw⟩
+    refine ⟨w, hwK, (K.mem_orthogonal' _).2 ?_⟩
+    rwa [← norm_eq_iInf_iff_inner_eq_zero K hwK]
+
+instance [HasOrthogonalProjection K] : HasOrthogonalProjection Kᗮ where
+  exists_orthogonal v := by
+    rcases HasOrthogonalProjection.exists_orthogonal (K := K) v with ⟨w, hwK, hw⟩
+    refine ⟨_, hw, ?_⟩
+    rw [sub_sub_cancel]
+    exact K.le_orthogonal_orthogonal hwK
+
+instance HasOrthogonalProjection.map_linearIsometryEquiv [HasOrthogonalProjection K]
+    {E' : Type _} [NormedAddCommGroup E'] [InnerProductSpace 𝕜 E'] (f : E ≃ₗᵢ[𝕜] E') :
+    HasOrthogonalProjection (K.map (f.toLinearEquiv : E →ₗ[𝕜] E')) where
+  exists_orthogonal v := by
+    rcases HasOrthogonalProjection.exists_orthogonal (K := K) (f.symm v) with ⟨w, hwK, hw⟩
+    refine ⟨f w, Submodule.mem_map_of_mem hwK, Set.ball_image_iff.2 fun u hu ↦ ?_⟩
+    erw [← f.symm.inner_map_map, f.symm_apply_apply, map_sub, f.symm_apply_apply, hw u hu]
+
+instance HasOrthogonalProjection.map_linearIsometryEquiv' [HasOrthogonalProjection K]
+    {E' : Type _} [NormedAddCommGroup E'] [InnerProductSpace 𝕜 E'] (f : E ≃ₗᵢ[𝕜] E') :
+    HasOrthogonalProjection (K.map f.toLinearIsometry) :=
+  HasOrthogonalProjection.map_linearIsometryEquiv K f
+
+instance : HasOrthogonalProjection (⊤ : Submodule 𝕜 E) := ⟨fun v ↦ ⟨v, trivial, by simp⟩⟩
+
 section orthogonalProjection
 
-variable [CompleteSpace K]
+variable [HasOrthogonalProjection K]
 
 /-- 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) :=
-  (exists_norm_eq_iInf_of_complete_subspace K (completeSpace_coe_iff_isComplete.mp ‹_›) v).choose
+  (HasOrthogonalProjection.exists_orthogonal (K := K) v).choose
 #align orthogonal_projection_fn orthogonalProjectionFn
 
 variable {K}
@@ -395,19 +430,15 @@ variable {K}
 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 :=
-  (exists_norm_eq_iInf_of_complete_subspace K (completeSpace_coe_iff_isComplete.mp ‹_›)
-        v).choose_spec.left
+  (HasOrthogonalProjection.exists_orthogonal (K := K) v).choose_spec.left
 #align orthogonal_projection_fn_mem orthogonalProjectionFn_mem
 
 /-- 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 := by
-  rw [← norm_eq_iInf_iff_inner_eq_zero K (orthogonalProjectionFn_mem v)]
-  exact
-    (exists_norm_eq_iInf_of_complete_subspace K (completeSpace_coe_iff_isComplete.mp ‹_›)
-          v).choose_spec.right
+    ∀ w ∈ K, ⟪v - orthogonalProjectionFn K v, w⟫ = 0 :=
+  (K.mem_orthogonal' _).1 (HasOrthogonalProjection.exists_orthogonal (K := K) v).choose_spec.right
 #align orthogonal_projection_fn_inner_eq_zero orthogonalProjectionFn_inner_eq_zero
 
 /-- The unbundled orthogonal projection is the unique point in `K`
@@ -499,18 +530,42 @@ theorem eq_orthogonalProjection_of_mem_of_inner_eq_zero {u v : E} (hvm : v ∈ K
   eq_orthogonalProjectionFn_of_mem_of_inner_eq_zero hvm hvo
 #align eq_orthogonal_projection_of_mem_of_inner_eq_zero eq_orthogonalProjection_of_mem_of_inner_eq_zero
 
+/-- 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 [HasOrthogonalProjection K] {u v : E} (hv : v ∈ K)
+    (hvo : u - v ∈ Kᗮ) : (orthogonalProjection K u : E) = v :=
+  eq_orthogonalProjectionFn_of_mem_of_inner_eq_zero hv <| (Submodule.mem_orthogonal' _ _).1 hvo
+#align eq_orthogonal_projection_of_mem_orthogonal eq_orthogonalProjection_of_mem_orthogonal
+
+/-- 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' [HasOrthogonalProjection K] {u v z : E}
+    (hv : v ∈ K) (hz : z ∈ Kᗮ) (hu : u = v + z) : (orthogonalProjection K u : E) = v :=
+  eq_orthogonalProjection_of_mem_orthogonal hv (by simpa [hu] )
+#align eq_orthogonal_projection_of_mem_orthogonal' eq_orthogonalProjection_of_mem_orthogonal'
+
+@[simp]
+theorem orthogonalProjection_orthogonal_val [HasOrthogonalProjection K] (u : E) :
+    (orthogonalProjection Kᗮ u : E) = u - orthogonalProjection K u :=
+  eq_orthogonalProjection_of_mem_orthogonal' (sub_orthogonalProjection_mem_orthogonal _)
+    (K.le_orthogonal_orthogonal (orthogonalProjection K u).2) <| by simp
+
+theorem orthogonalProjection_orthogonal [HasOrthogonalProjection K] (u : E) :
+    orthogonalProjection Kᗮ u =
+      ⟨u - orthogonalProjection K u, sub_orthogonalProjection_mem_orthogonal _⟩ :=
+  Subtype.eq <| orthogonalProjection_orthogonal_val _
+
 /-- The orthogonal projection of `y` on `U` minimizes the distance `‖y - x‖` for `x ∈ U`. -/
-theorem orthogonalProjection_minimal {U : Submodule 𝕜 E} [CompleteSpace U] (y : E) :
+theorem orthogonalProjection_minimal {U : Submodule 𝕜 E} [HasOrthogonalProjection U] (y : E) :
     ‖y - orthogonalProjection U y‖ = ⨅ x : U, ‖y - x‖ := by
   rw [norm_eq_iInf_iff_inner_eq_zero _ (Submodule.coe_mem _)]
   exact orthogonalProjection_inner_eq_zero _
 #align orthogonal_projection_minimal orthogonalProjection_minimal
 
 /-- The orthogonal projections onto equal subspaces are coerced back to the same point in `E`. -/
-theorem eq_orthogonalProjection_of_eq_submodule {K' : Submodule 𝕜 E} [CompleteSpace K'] (h : K = K')
-    (u : E) : (orthogonalProjection K u : E) = (orthogonalProjection K' u : E) := by
-  change orthogonalProjectionFn K u = orthogonalProjectionFn K' u
-  congr
+theorem eq_orthogonalProjection_of_eq_submodule {K' : Submodule 𝕜 E} [HasOrthogonalProjection K']
+    (h : K = K') (u : E) : (orthogonalProjection K u : E) = (orthogonalProjection K' u : E) := by
+  subst h; rfl
 #align eq_orthogonal_projection_of_eq_submodule eq_orthogonalProjection_of_eq_submodule
 
 /-- The orthogonal projection sends elements of `K` to themselves. -/
@@ -530,8 +585,8 @@ theorem orthogonalProjection_eq_self_iff {v : E} : (orthogonalProjection K v : E
 
 theorem LinearIsometry.map_orthogonalProjection {E E' : Type _} [NormedAddCommGroup E]
     [NormedAddCommGroup E'] [InnerProductSpace 𝕜 E] [InnerProductSpace 𝕜 E'] (f : E →ₗᵢ[𝕜] E')
-    (p : Submodule 𝕜 E) [CompleteSpace p] (x : E) :
-    f (orthogonalProjection p x) = orthogonalProjection (p.map f.toLinearMap) (f x) := by
+    (p : Submodule 𝕜 E) [HasOrthogonalProjection p] [HasOrthogonalProjection (p.map f.toLinearMap)]
+    (x : E) : f (orthogonalProjection p x) = orthogonalProjection (p.map f.toLinearMap) (f x) := by
   refine' (eq_orthogonalProjection_of_mem_of_inner_eq_zero _ fun y hy => _).symm
   refine' Submodule.apply_coe_mem_map _ _
   rcases hy with ⟨x', hx', rfl : f x' = y⟩
@@ -540,22 +595,20 @@ theorem LinearIsometry.map_orthogonalProjection {E E' : Type _} [NormedAddCommGr
 
 theorem LinearIsometry.map_orthogonalProjection' {E E' : Type _} [NormedAddCommGroup E]
     [NormedAddCommGroup E'] [InnerProductSpace 𝕜 E] [InnerProductSpace 𝕜 E'] (f : E →ₗᵢ[𝕜] E')
-    (p : Submodule 𝕜 E) [CompleteSpace p] (x : E) :
-    f (orthogonalProjection p x) = orthogonalProjection (p.map f) (f x) := by
-  refine' (eq_orthogonalProjection_of_mem_of_inner_eq_zero _ fun y hy => _).symm
-  refine' Submodule.apply_coe_mem_map _ _
-  rcases hy with ⟨x', hx', rfl : f x' = y⟩
-  rw [← f.map_sub, f.inner_map_map, orthogonalProjection_inner_eq_zero x x' hx']
+    (p : Submodule 𝕜 E) [HasOrthogonalProjection p] [HasOrthogonalProjection (p.map f)] (x : E) :
+    f (orthogonalProjection p x) = orthogonalProjection (p.map f) (f x) :=
+  have : HasOrthogonalProjection (p.map f.toLinearMap) := ‹_›
+  f.map_orthogonalProjection p x
 #align linear_isometry.map_orthogonal_projection' LinearIsometry.map_orthogonalProjection'
 
 /-- 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) [CompleteSpace p] (x : E') :
+    (p : Submodule 𝕜 E) [HasOrthogonalProjection p] (x : E') :
     (orthogonalProjection (p.map (f.toLinearEquiv : E →ₗ[𝕜] E')) x : E') =
       f (orthogonalProjection p (f.symm x)) := by
   simpa only [f.coe_toLinearIsometry, f.apply_symm_apply] using
-    (f.toLinearIsometry.map_orthogonalProjection p (f.symm x)).symm
+    (f.toLinearIsometry.map_orthogonalProjection' p (f.symm x)).symm
 #align orthogonal_projection_map_apply orthogonalProjection_map_apply
 
 /-- The orthogonal projection onto the trivial submodule is the zero map. -/
@@ -574,18 +627,13 @@ variable (𝕜)
 
 theorem smul_orthogonalProjection_singleton {v : E} (w : E) :
     ((‖v‖ ^ 2 : ℝ) : 𝕜) • (orthogonalProjection (𝕜 ∙ v) w : E) = ⟪v, w⟫ • v := by
-  suffices ((orthogonalProjection (𝕜 ∙ v) (((‖v‖ ^ 2 : ℝ) : 𝕜) • w)) : E) = ⟪v, w⟫ • v by
+  suffices ((orthogonalProjection (𝕜 ∙ v) (((‖v‖ : 𝕜) ^ 2) • w)) : E) = ⟪v, w⟫ • v by
     simpa using this
   apply eq_orthogonalProjection_of_mem_of_inner_eq_zero
   · rw [Submodule.mem_span_singleton]
     use ⟪v, w⟫
-  · intro x hx
-    obtain ⟨c, rfl⟩ := Submodule.mem_span_singleton.mp hx
-    have hv : ((‖v‖ ^ 2 : ℝ) : 𝕜) = ⟪v, v⟫ := by
-      norm_cast
-      simp [@norm_sq_eq_inner 𝕜]
-    simp [inner_sub_left, inner_smul_left, inner_smul_right, map_div₀, mul_comm, hv,
-      InnerProductSpace.conj_symm, hv, -ofReal_pow]
+  · rw [← Submodule.mem_orthogonal', Submodule.mem_orthogonal_singleton_iff_inner_left]
+    simp [inner_sub_left, inner_smul_left, inner_self_eq_norm_sq_to_K, mul_comm]
 #align smul_orthogonal_projection_singleton smul_orthogonalProjection_singleton
 
 /-- Formula for orthogonal projection onto a single vector. -/
@@ -613,7 +661,7 @@ end orthogonalProjection
 
 section reflection
 
-variable [CompleteSpace K]
+variable [HasOrthogonalProjection K]
 
 -- Porting note: `bit0` is deprecated.
 /-- Auxiliary definition for `reflection`: the reflection as a linear equivalence. -/
@@ -691,6 +739,12 @@ theorem reflection_mul_reflection : reflection K * reflection K = 1 :=
   reflection_trans_reflection _
 #align reflection_mul_reflection reflection_mul_reflection
 
+theorem reflection_orthogonal_apply (v : E) : reflection Kᗮ v = -reflection K v := by
+  simp [reflection_apply]; abel
+
+theorem reflection_orthogonal : reflection Kᗮ = .trans (reflection K) (.neg _) := by
+  ext; apply reflection_orthogonal_apply
+
 variable {K}
 
 /-- A point is its own reflection if and only if it is in the subspace. -/
@@ -708,7 +762,7 @@ theorem reflection_mem_subspace_eq_self {x : E} (hx : x ∈ K) : reflection K x
 /-- 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)
-    [CompleteSpace K] (x : E') :
+    [HasOrthogonalProjection K] (x : E') :
     reflection (K.map (f.toLinearEquiv : E →ₗ[𝕜] E')) x = f (reflection K (f.symm x)) := by
   simp [two_smul, reflection_apply, orthogonalProjection_map_apply f K x]
 #align reflection_map_apply reflection_map_apply
@@ -716,7 +770,7 @@ theorem reflection_map_apply {E E' : Type _} [NormedAddCommGroup E] [NormedAddCo
 /-- 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)
-    [CompleteSpace K] :
+    [HasOrthogonalProjection K] :
     reflection (K.map (f.toLinearEquiv : E →ₗ[𝕜] E')) = f.symm.trans ((reflection K).trans f) :=
   LinearIsometryEquiv.ext <| reflection_map_apply f K
 #align reflection_map reflection_map
@@ -733,7 +787,7 @@ section Orthogonal
 
 /-- 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₂)
-    [CompleteSpace K₁] : K₁ ⊔ K₁ᗮ ⊓ K₂ = K₂ := by
+    [HasOrthogonalProjection K₁] : K₁ ⊔ K₁ᗮ ⊓ K₂ = K₂ := by
   ext x
   rw [Submodule.mem_sup]
   let v : K₁ := orthogonalProjection K₁ x
@@ -747,7 +801,7 @@ theorem Submodule.sup_orthogonal_inf_of_completeSpace {K₁ K₂ : Submodule 
 variable {K}
 
 /-- If `K` is complete, `K` and `Kᗮ` span the whole space. -/
-theorem Submodule.sup_orthogonal_of_completeSpace [CompleteSpace K] : K ⊔ Kᗮ = ⊤ := by
+theorem Submodule.sup_orthogonal_of_completeSpace [HasOrthogonalProjection K] : K ⊔ Kᗮ = ⊤ := by
   convert Submodule.sup_orthogonal_inf_of_completeSpace (le_top : K ≤ ⊤) using 2
   simp
 #align submodule.sup_orthogonal_of_complete_space Submodule.sup_orthogonal_of_completeSpace
@@ -755,19 +809,19 @@ theorem Submodule.sup_orthogonal_of_completeSpace [CompleteSpace K] : K ⊔ Kᗮ
 variable (K)
 
 /-- If `K` is complete, any `v` in `E` can be expressed as a sum of elements of `K` and `Kᗮ`. -/
-theorem Submodule.exists_sum_mem_mem_orthogonal [CompleteSpace K] (v : E) :
-    ∃ y ∈ K, ∃ z ∈ Kᗮ, v = y + z := by
-  have h_mem : v ∈ K ⊔ Kᗮ := by simp [Submodule.sup_orthogonal_of_completeSpace]
-  obtain ⟨y, hy, z, hz, hyz⟩ := Submodule.mem_sup.mp h_mem
-  exact ⟨y, hy, z, hz, hyz.symm⟩
-#align submodule.exists_sum_mem_mem_orthogonal Submodule.exists_sum_mem_mem_orthogonal
-
-/-- If `K` is complete, then the orthogonal complement of its orthogonal complement is itself. -/
+theorem Submodule.exists_add_mem_mem_orthogonal [HasOrthogonalProjection K] (v : E) :
+    ∃ y ∈ K, ∃ z ∈ Kᗮ, v = y + z :=
+  ⟨orthogonalProjection K v, Subtype.coe_prop _, v - orthogonalProjection K v,
+    sub_orthogonalProjection_mem_orthogonal _, by simp⟩
+#align submodule.exists_sum_mem_mem_orthogonal Submodule.exists_add_mem_mem_orthogonal
+
+/-- If `K` admits an orthogonal projection, then the orthogonal complement of its orthogonal
+complement is itself. -/
 @[simp]
-theorem Submodule.orthogonal_orthogonal [CompleteSpace K] : Kᗮᗮ = K := by
+theorem Submodule.orthogonal_orthogonal [HasOrthogonalProjection K] : Kᗮᗮ = K := by
   ext v
   constructor
-  · obtain ⟨y, hy, z, hz, rfl⟩ := K.exists_sum_mem_mem_orthogonal v
+  · obtain ⟨y, hy, z, hz, rfl⟩ := K.exists_add_mem_mem_orthogonal v
     intro hv
     have hz' : z = 0 := by
       have hyz : ⟪z, y⟫ = 0 := by simp [hz y hy, inner_eq_zero_symm]
@@ -778,63 +832,53 @@ theorem Submodule.orthogonal_orthogonal [CompleteSpace K] : Kᗮᗮ = K := by
     exact hw v hv
 #align submodule.orthogonal_orthogonal Submodule.orthogonal_orthogonal
 
+/-- 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 := by
   refine' le_antisymm _ _
   · convert Submodule.orthogonal_orthogonal_monotone K.le_topologicalClosure using 1
-    haveI : CompleteSpace K.topologicalClosure :=
-      K.isClosed_topologicalClosure.completeSpace_coe
     rw [K.topologicalClosure.orthogonal_orthogonal]
   · exact K.topologicalClosure_minimal K.le_orthogonal_orthogonal Kᗮ.isClosed_orthogonal
 #align submodule.orthogonal_orthogonal_eq_closure Submodule.orthogonal_orthogonal_eq_closure
 
 variable {K}
 
-/-- If `K` is complete, `K` and `Kᗮ` are complements of each other. -/
-theorem Submodule.isCompl_orthogonal_of_completeSpace [CompleteSpace K] : IsCompl K Kᗮ :=
+/-- 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ᗮ :=
   ⟨K.orthogonal_disjoint, codisjoint_iff.2 Submodule.sup_orthogonal_of_completeSpace⟩
 #align submodule.is_compl_orthogonal_of_complete_space Submodule.isCompl_orthogonal_of_completeSpace
 
 @[simp]
-theorem Submodule.orthogonal_eq_bot_iff [CompleteSpace (K : Set E)] : Kᗮ = ⊥ ↔ K = ⊤ := by
+theorem Submodule.orthogonal_eq_bot_iff [HasOrthogonalProjection K] : Kᗮ = ⊥ ↔ K = ⊤ := by
   refine' ⟨_, fun h => by rw [h, Submodule.top_orthogonal_eq_bot]⟩
   intro h
   have : K ⊔ Kᗮ = ⊤ := Submodule.sup_orthogonal_of_completeSpace
   rwa [h, sup_comm, bot_sup_eq] at this
 #align submodule.orthogonal_eq_bot_iff Submodule.orthogonal_eq_bot_iff
 
-/-- 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 [CompleteSpace K] {u v : E} (hv : v ∈ K)
-    (hvo : u - v ∈ Kᗮ) : (orthogonalProjection K u : E) = v :=
-  eq_orthogonalProjectionFn_of_mem_of_inner_eq_zero hv fun w => inner_eq_zero_symm.mp ∘ hvo w
-#align eq_orthogonal_projection_of_mem_orthogonal eq_orthogonalProjection_of_mem_orthogonal
-
-/-- 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' [CompleteSpace K] {u v z : E} (hv : v ∈ K)
-    (hz : z ∈ Kᗮ) (hu : u = v + z) : (orthogonalProjection K u : E) = v :=
-  eq_orthogonalProjection_of_mem_orthogonal hv (by simpa [hu] )
-#align eq_orthogonal_projection_of_mem_orthogonal' eq_orthogonalProjection_of_mem_orthogonal'
-
 /-- The orthogonal projection onto `K` of an element of `Kᗮ` is zero. -/
-theorem orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero [CompleteSpace K] {v : E}
-    (hv : v ∈ Kᗮ) : orthogonalProjection K v = 0 := by
+theorem orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero [HasOrthogonalProjection K]
+    {v : E} (hv : v ∈ Kᗮ) : orthogonalProjection K v = 0 := by
   ext
   convert eq_orthogonalProjection_of_mem_orthogonal (K := K) _ _ <;> simp [hv]
 #align orthogonal_projection_mem_subspace_orthogonal_complement_eq_zero orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero
 
 /-- The projection into `U` from an orthogonal submodule `V` is the zero map. -/
-theorem Submodule.IsOrtho.orthogonalProjection_comp_subtypeL {U V : Submodule 𝕜 E} [CompleteSpace U]
-    (h : U ⟂ V) : orthogonalProjection U ∘L V.subtypeL = 0 :=
+theorem Submodule.IsOrtho.orthogonalProjection_comp_subtypeL {U V : Submodule 𝕜 E}
+    [HasOrthogonalProjection U] (h : U ⟂ V) : orthogonalProjection U ∘L V.subtypeL = 0 :=
   ContinuousLinearMap.ext fun v =>
     orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero <| h.symm v.prop
 set_option linter.uppercaseLean3 false in
 #align submodule.is_ortho.orthogonal_projection_comp_subtypeL Submodule.IsOrtho.orthogonalProjection_comp_subtypeL
 
 /-- 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} [CompleteSpace U] :
-    orthogonalProjection U ∘L V.subtypeL = 0 ↔ U ⟂ V :=
+theorem orthogonalProjection_comp_subtypeL_eq_zero_iff {U V : Submodule 𝕜 E}
+    [HasOrthogonalProjection U] : orthogonalProjection U ∘L V.subtypeL = 0 ↔ U ⟂ V :=
   ⟨fun h u hu v hv => by
     convert orthogonalProjection_inner_eq_zero v u hu using 2
     have : orthogonalProjection U v = 0 := FunLike.congr_fun h (⟨_, hv⟩ : V)
@@ -842,7 +886,7 @@ theorem orthogonalProjection_comp_subtypeL_eq_zero_iff {U V : Submodule 𝕜 E}
 set_option linter.uppercaseLean3 false in
 #align orthogonal_projection_comp_subtypeL_eq_zero_iff orthogonalProjection_comp_subtypeL_eq_zero_iff
 
-theorem orthogonalProjection_eq_linear_proj [CompleteSpace K] (x : E) :
+theorem orthogonalProjection_eq_linear_proj [HasOrthogonalProjection K] (x : E) :
     orthogonalProjection K x =
       K.linearProjOfIsCompl _ Submodule.isCompl_orthogonal_of_completeSpace x := by
   have : IsCompl K Kᗮ := Submodule.isCompl_orthogonal_of_completeSpace
@@ -851,27 +895,27 @@ theorem orthogonalProjection_eq_linear_proj [CompleteSpace K] (x : E) :
     orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero (Submodule.coe_mem _), add_zero]
 #align orthogonal_projection_eq_linear_proj orthogonalProjection_eq_linear_proj
 
-theorem orthogonalProjection_coe_linearMap_eq_linearProj [CompleteSpace K] :
+theorem orthogonalProjection_coe_linearMap_eq_linearProj [HasOrthogonalProjection K] :
     (orthogonalProjection K : E →ₗ[𝕜] K) =
       K.linearProjOfIsCompl _ Submodule.isCompl_orthogonal_of_completeSpace :=
   LinearMap.ext <| orthogonalProjection_eq_linear_proj
 #align orthogonal_projection_coe_linear_map_eq_linear_proj orthogonalProjection_coe_linearMap_eq_linearProj
 
 /-- The reflection in `K` of an element of `Kᗮ` is its negation. -/
-theorem reflection_mem_subspace_orthogonalComplement_eq_neg [CompleteSpace K] {v : E}
+theorem reflection_mem_subspace_orthogonalComplement_eq_neg [HasOrthogonalProjection K] {v : E}
     (hv : v ∈ Kᗮ) : reflection K v = -v := by
   simp [reflection_apply, orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero hv]
 #align reflection_mem_subspace_orthogonal_complement_eq_neg reflection_mem_subspace_orthogonalComplement_eq_neg
 
 /-- The orthogonal projection onto `Kᗮ` of an element of `K` is zero. -/
-theorem orthogonalProjection_mem_subspace_orthogonal_precomplement_eq_zero [CompleteSpace E] {v : E}
-    (hv : v ∈ K) : orthogonalProjection Kᗮ v = 0 :=
+theorem orthogonalProjection_mem_subspace_orthogonal_precomplement_eq_zero
+    [HasOrthogonalProjection Kᗮ] {v : E} (hv : v ∈ K) : orthogonalProjection Kᗮ v = 0 :=
   orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero (K.le_orthogonal_orthogonal hv)
 #align orthogonal_projection_mem_subspace_orthogonal_precomplement_eq_zero orthogonalProjection_mem_subspace_orthogonal_precomplement_eq_zero
 
 /-- 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} [CompleteSpace U]
-    [CompleteSpace V] (h : U ≤ V) (x : E) :
+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 :=
   Eq.symm <| by
     simpa only [sub_eq_zero, map_sub] using
@@ -887,8 +931,7 @@ theorem orthogonalProjection_tendsto_closure_iSup [CompleteSpace E] {ι : Type _
     Filter.Tendsto (fun i => (orthogonalProjection (U i) x : E)) atTop
       (𝓝 (orthogonalProjection (⨆ i, U i).topologicalClosure x : E)) := by
   cases isEmpty_or_nonempty ι
-  · rw [filter_eq_bot_of_isEmpty (atTop : Filter ι)]
-    exact tendsto_bot
+  · exact tendsto_of_isEmpty
   let y := (orthogonalProjection (⨆ i, U i).topologicalClosure x : E)
   have proj_x : ∀ i, orthogonalProjection (U i) x = orthogonalProjection (U i) y := fun i =>
     (orthogonalProjection_orthogonalProjection_of_le
@@ -939,28 +982,31 @@ theorem Submodule.topologicalClosure_eq_top_iff [CompleteSpace E] :
 
 namespace Dense
 
+/- Porting note: unneeded assumption `[CompleteSpace E]` was removed from all theorems in this
+section. TODO: Move to another file? -/
 open Submodule
 
-variable {x y : E} [CompleteSpace E]
+variable {x y : E}
 
-/-- 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 := by
-  rw [dense_iff_topologicalClosure_eq_top, topologicalClosure_eq_top_iff] at hK
-  rwa [hK, Submodule.mem_bot, sub_eq_zero] at h
-#align dense.eq_of_sub_mem_orthogonal Dense.eq_of_sub_mem_orthogonal
+theorem eq_zero_of_inner_left (hK : Dense (K : Set E)) (h : ∀ v : K, ⟪x, v⟫ = 0) : x = 0 := by
+  have : (⟪x, ·⟫) = 0 := (continuous_const.inner continuous_id).ext_on
+    hK continuous_const (Subtype.forall.1 h)
+  simpa using congr_fun this x
+#align dense.eq_zero_of_inner_left Dense.eq_zero_of_inner_left
 
 theorem eq_zero_of_mem_orthogonal (hK : Dense (K : Set E)) (h : x ∈ Kᗮ) : x = 0 :=
-  hK.eq_of_sub_mem_orthogonal (by rwa [sub_zero])
+  eq_zero_of_inner_left hK fun v ↦ (mem_orthogonal' _ _).1 h _ v.2
 #align dense.eq_zero_of_mem_orthogonal Dense.eq_zero_of_mem_orthogonal
 
+/-- 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 :=
+  sub_eq_zero.1 <| eq_zero_of_mem_orthogonal hK h
+#align dense.eq_of_sub_mem_orthogonal Dense.eq_of_sub_mem_orthogonal
+
 theorem eq_of_inner_left (hK : Dense (K : Set E)) (h : ∀ v : K, ⟪x, v⟫ = ⟪y, v⟫) : x = y :=
   hK.eq_of_sub_mem_orthogonal (Submodule.sub_mem_orthogonal_of_inner_left h)
 #align dense.eq_of_inner_left Dense.eq_of_inner_left
 
-theorem eq_zero_of_inner_left (hK : Dense (K : Set E)) (h : ∀ v : K, ⟪x, v⟫ = 0) : x = 0 :=
-  hK.eq_of_inner_left fun v => by rw [inner_zero_left, h v]
-#align dense.eq_zero_of_inner_left Dense.eq_zero_of_inner_left
-
 theorem eq_of_inner_right (hK : Dense (K : Set E)) (h : ∀ v : K, ⟪(v : E), x⟫ = ⟪(v : E), y⟫) :
     x = y :=
   hK.eq_of_sub_mem_orthogonal (Submodule.sub_mem_orthogonal_of_inner_right h)
@@ -973,26 +1019,24 @@ theorem eq_zero_of_inner_right (hK : Dense (K : Set E)) (h : ∀ v : K, ⟪(v :
 end Dense
 
 /-- The reflection in `Kᗮ` of an element of `K` is its negation. -/
-theorem reflection_mem_subspace_orthogonal_precomplement_eq_neg [CompleteSpace E] {v : E}
+theorem reflection_mem_subspace_orthogonal_precomplement_eq_neg [HasOrthogonalProjection K] {v : E}
     (hv : v ∈ K) : reflection Kᗮ v = -v :=
   reflection_mem_subspace_orthogonalComplement_eq_neg (K.le_orthogonal_orthogonal hv)
 #align reflection_mem_subspace_orthogonal_precomplement_eq_neg reflection_mem_subspace_orthogonal_precomplement_eq_neg
 
 /-- The orthogonal projection onto `(𝕜 ∙ v)ᗮ` of `v` is zero. -/
-theorem orthogonalProjection_orthogonalComplement_singleton_eq_zero [CompleteSpace E] (v : E) :
+theorem orthogonalProjection_orthogonalComplement_singleton_eq_zero (v : E) :
     orthogonalProjection (𝕜 ∙ v)ᗮ v = 0 :=
   orthogonalProjection_mem_subspace_orthogonal_precomplement_eq_zero
     (Submodule.mem_span_singleton_self v)
 #align orthogonal_projection_orthogonal_complement_singleton_eq_zero orthogonalProjection_orthogonalComplement_singleton_eq_zero
 
 /-- The reflection in `(𝕜 ∙ v)ᗮ` of `v` is `-v`. -/
-theorem reflection_orthogonalComplement_singleton_eq_neg [CompleteSpace E] (v : E) :
-    reflection (𝕜 ∙ v)ᗮ v = -v :=
+theorem reflection_orthogonalComplement_singleton_eq_neg (v : E) : reflection (𝕜 ∙ v)ᗮ v = -v :=
   reflection_mem_subspace_orthogonal_precomplement_eq_neg (Submodule.mem_span_singleton_self v)
 #align reflection_orthogonal_complement_singleton_eq_neg reflection_orthogonalComplement_singleton_eq_neg
 
-theorem reflection_sub [CompleteSpace F] {v w : F} (h : ‖v‖ = ‖w‖) :
-    reflection (ℝ ∙ v - w)ᗮ v = w := by
+theorem reflection_sub {v w : F} (h : ‖v‖ = ‖w‖) : reflection (ℝ ∙ (v - w))ᗮ v = w := by
   set R : F ≃ₗᵢ[ℝ] F := reflection (ℝ ∙ v - w)ᗮ
   suffices R v + R v = w + w by
     apply smul_right_injective F (by norm_num : (2 : ℝ) ≠ 0)
@@ -1010,46 +1054,38 @@ theorem reflection_sub [CompleteSpace F] {v w : F} (h : ‖v‖ = ‖w‖) :
 
 variable (K)
 
-/-- 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`.-/
-theorem eq_sum_orthogonalProjection_self_orthogonalComplement [CompleteSpace E] [CompleteSpace K]
-    (w : E) : w = (orthogonalProjection K w : E) + (orthogonalProjection Kᗮ w : E) := by
-  obtain ⟨y, hy, z, hz, hwyz⟩ := K.exists_sum_mem_mem_orthogonal w
-  convert hwyz
-  · exact eq_orthogonalProjection_of_mem_orthogonal' hy hz hwyz
-  · rw [add_comm] at hwyz
-    refine' eq_orthogonalProjection_of_mem_orthogonal' hz _ hwyz
-    simp [hy]
-#align eq_sum_orthogonal_projection_self_orthogonal_complement eq_sum_orthogonalProjection_self_orthogonalComplement
+-- Porting note: relax assumptions, swap LHS with RHS
+/-- 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 := by
+  simp
+#align eq_sum_orthogonal_projection_self_orthogonal_complement orthogonalProjection_add_orthogonalProjection_orthogonalₓ
 
 /-- The Pythagorean theorem, for an orthogonal projection.-/
-theorem norm_sq_eq_add_norm_sq_projection (x : E) (S : Submodule 𝕜 E) [CompleteSpace E]
-    [CompleteSpace S] :
-    ‖x‖ ^ 2 = ‖orthogonalProjection S x‖ ^ 2 + ‖orthogonalProjection Sᗮ x‖ ^ 2 := by
-  let p1 := orthogonalProjection S
-  let p2 := orthogonalProjection Sᗮ
-  have x_decomp : x = p1 x + p2 x := eq_sum_orthogonalProjection_self_orthogonalComplement S x
-  have x_orth : ⟪(p1 x : E), p2 x⟫ = 0 :=
-    Submodule.inner_right_of_mem_orthogonal (SetLike.coe_mem (p1 x)) (SetLike.coe_mem (p2 x))
-  nth_rw 1 [x_decomp]
-  simp only [sq, norm_add_sq_eq_norm_sq_add_norm_sq_of_inner_eq_zero (p1 x : E) (p2 x) x_orth,
-    add_left_inj, mul_eq_mul_left_iff, norm_eq_zero, true_or_iff, eq_self_iff_true,
-    Submodule.coe_norm, Submodule.coe_eq_zero]
+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 :=
+  calc
+    ‖x‖ ^ 2 = ‖(orthogonalProjection S x : E) + orthogonalProjection Sᗮ x‖ ^ 2 := by
+      rw [orthogonalProjection_add_orthogonalProjection_orthogonal]
+    _ = ‖orthogonalProjection S x‖ ^ 2 + ‖orthogonalProjection Sᗮ x‖ ^ 2 := by
+      simp only [sq]
+      exact norm_add_sq_eq_norm_sq_add_norm_sq_of_inner_eq_zero _ _ <|
+        (S.mem_orthogonal _).1 (orthogonalProjection Sᗮ x).2 _ (orthogonalProjection S x).2
 #align norm_sq_eq_add_norm_sq_projection norm_sq_eq_add_norm_sq_projection
 
 /-- 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 [CompleteSpace E]
-    [CompleteSpace K] :
+theorem id_eq_sum_orthogonalProjection_self_orthogonalComplement [HasOrthogonalProjection K] :
     ContinuousLinearMap.id 𝕜 E =
       K.subtypeL.comp (orthogonalProjection K) + Kᗮ.subtypeL.comp (orthogonalProjection Kᗮ) := by
   ext w
-  exact eq_sum_orthogonalProjection_self_orthogonalComplement K w
+  exact (orthogonalProjection_add_orthogonalProjection_orthogonal K w).symm
 #align id_eq_sum_orthogonal_projection_self_orthogonal_complement id_eq_sum_orthogonalProjection_self_orthogonalComplement
 
 -- Porting note: The priority should be higher than `Submodule.coe_inner`.
 @[simp high]
-theorem inner_orthogonalProjection_eq_of_mem_right [CompleteSpace K] (u : K) (v : E) :
+theorem inner_orthogonalProjection_eq_of_mem_right [HasOrthogonalProjection K] (u : K) (v : E) :
     ⟪orthogonalProjection K v, u⟫ = ⟪v, u⟫ :=
   calc
     ⟪orthogonalProjection K v, u⟫ = ⟪(orthogonalProjection K v : E), u⟫ := K.coe_inner _ _
@@ -1060,19 +1096,19 @@ theorem inner_orthogonalProjection_eq_of_mem_right [CompleteSpace K] (u : K) (v
 
 -- Porting note: The priority should be higher than `Submodule.coe_inner`.
 @[simp high]
-theorem inner_orthogonalProjection_eq_of_mem_left [CompleteSpace K] (u : K) (v : E) :
+theorem inner_orthogonalProjection_eq_of_mem_left [HasOrthogonalProjection K] (u : K) (v : E) :
     ⟪u, orthogonalProjection K v⟫ = ⟪(u : E), v⟫ := by
   rw [← inner_conj_symm, ← inner_conj_symm (u : E), inner_orthogonalProjection_eq_of_mem_right]
 #align inner_orthogonal_projection_eq_of_mem_left inner_orthogonalProjection_eq_of_mem_left
 
 /-- The orthogonal projection is self-adjoint. -/
-theorem inner_orthogonalProjection_left_eq_right [CompleteSpace K] (u v : E) :
+theorem inner_orthogonalProjection_left_eq_right [HasOrthogonalProjection K] (u v : E) :
     ⟪↑(orthogonalProjection K u), v⟫ = ⟪u, orthogonalProjection K v⟫ := by
   rw [← inner_orthogonalProjection_eq_of_mem_left, inner_orthogonalProjection_eq_of_mem_right]
 #align inner_orthogonal_projection_left_eq_right inner_orthogonalProjection_left_eq_right
 
 /-- The orthogonal projection is symmetric. -/
-theorem orthogonalProjection_isSymmetric [CompleteSpace K] :
+theorem orthogonalProjection_isSymmetric [HasOrthogonalProjection K] :
     (K.subtypeL ∘L orthogonalProjection K : E →ₗ[𝕜] E).IsSymmetric :=
   inner_orthogonalProjection_left_eq_right K
 #align orthogonal_projection_is_symmetric orthogonalProjection_isSymmetric
chore: rename Dfinsupp to DFinsupp (#5822)

See #4354

Diff
@@ -1289,13 +1289,13 @@ theorem OrthogonalFamily.projection_directSum_coeAddHom [DecidableEq ι] {V : ι
   · simp
   · simp_rw [DirectSum.coeAddMonoidHom_of, DirectSum.of]
     -- porting note: was in the previous `simp_rw`, no longer works
-    rw [Dfinsupp.singleAddHom_apply]
+    rw [DFinsupp.singleAddHom_apply]
     obtain rfl | hij := Decidable.eq_or_ne i j
-    · rw [orthogonalProjection_mem_subspace_eq_self, Dfinsupp.single_eq_same]
+    · rw [orthogonalProjection_mem_subspace_eq_self, DFinsupp.single_eq_same]
     · rw [orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero,
-        Dfinsupp.single_eq_of_ne hij.symm]
+        DFinsupp.single_eq_of_ne hij.symm]
       exact hV.isOrtho hij.symm x.prop
-  · simp_rw [map_add, Dfinsupp.add_apply]
+  · simp_rw [map_add, DFinsupp.add_apply]
     exact congr_arg₂ (· + ·) hx hy
 #align orthogonal_family.projection_direct_sum_coe_add_hom OrthogonalFamily.projection_directSum_coeAddHom
 
@@ -1310,19 +1310,19 @@ def OrthogonalFamily.decomposition [DecidableEq ι] [Fintype ι] {V : ι → Sub
     [∀ i, CompleteSpace (V i)] (hV : OrthogonalFamily 𝕜 (fun i => V i) fun i => (V i).subtypeₗᵢ)
     (h : iSup V = ⊤) : DirectSum.Decomposition V
     where
-  decompose' x := Dfinsupp.equivFunOnFintype.symm fun i => orthogonalProjection (V i) x
+  decompose' x := DFinsupp.equivFunOnFintype.symm fun i => orthogonalProjection (V i) x
   left_inv x := by
     dsimp only
     letI := fun i => Classical.decEq (V i)
-    rw [DirectSum.coeAddMonoidHom, DirectSum.toAddMonoid, Dfinsupp.liftAddHom_apply,
-      Dfinsupp.sumAddHom_apply, Dfinsupp.sum_eq_sum_fintype]
+    rw [DirectSum.coeAddMonoidHom, DirectSum.toAddMonoid, DFinsupp.liftAddHom_apply,
+      DFinsupp.sumAddHom_apply, DFinsupp.sum_eq_sum_fintype]
     · simp_rw [Equiv.apply_symm_apply, AddSubmonoidClass.coe_subtype]
       exact hV.sum_projection_of_mem_iSup _ ((h.ge : _) Submodule.mem_top)
     · intro i
       exact map_zero _
   right_inv x := by
     dsimp only
-    simp_rw [hV.projection_directSum_coeAddHom, Dfinsupp.equivFunOnFintype_symm_coe]
+    simp_rw [hV.projection_directSum_coeAddHom, DFinsupp.equivFunOnFintype_symm_coe]
 #align orthogonal_family.decomposition OrthogonalFamily.decomposition
 
 end OrthogonalFamily
fix: precedences of ⨆⋃⋂⨅ (#5614)
Diff
@@ -280,7 +280,7 @@ theorem norm_eq_iInf_iff_real_inner_le_zero {K : Set F} (h : Convex ℝ K) {u :
         _ = ‖u - w‖ * ‖u - w‖ := by
           have : u - v - (w - v) = u - w := by abel
           rw [this, sq]
-    · show (⨅ w : K, ‖u - w‖) ≤ (fun w : K => ‖u - w‖) ⟨v, hv⟩
+    · show ⨅ w : K, ‖u - w‖ ≤ (fun w : K => ‖u - w‖) ⟨v, hv⟩
       apply ciInf_le
       use 0
       rintro y ⟨z, rfl⟩
chore: tidy various files (#5104)
Diff
@@ -1279,7 +1279,7 @@ theorem OrthogonalFamily.sum_projection_of_mem_iSup [Fintype ι] {V : ι → Sub
     exact congr_arg₂ (· + ·) hx hy
 #align orthogonal_family.sum_projection_of_mem_supr OrthogonalFamily.sum_projection_of_mem_iSup
 
-/-- If a family of submodules is orthogonal, then the `orthogonal_projection` on a direct sum
+/-- 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 : ι)
@@ -1302,7 +1302,7 @@ theorem OrthogonalFamily.projection_directSum_coeAddHom [DecidableEq ι] {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`.
+The projection function is `decompose V x i = orthogonalProjection (V i) x`.
 
 See note [reducible non-instances]. -/
 @[reducible]
chore: forward-port leanprover-community/mathlib#14870 (#4699)

This one needed some small changes on top of the mathport output.

Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Zhouhang Zhou, Frédéric Dupuis, Heather Macbeth
 
 ! This file was ported from Lean 3 source module analysis.inner_product_space.projection
-! leanprover-community/mathlib commit 67e606eaea14c7854bdc556bd53d98aefdf76ec0
+! leanprover-community/mathlib commit 0b7c740e25651db0ba63648fbae9f9d6f941e31b
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -13,6 +13,7 @@ import Mathlib.Analysis.InnerProductSpace.Orthogonal
 import Mathlib.Analysis.InnerProductSpace.Symmetric
 import Mathlib.Analysis.NormedSpace.IsROrC
 import Mathlib.Data.IsROrC.Lemmas
+import Mathlib.Algebra.DirectSum.Decomposition
 
 /-!
 # The orthogonal projection
@@ -1256,6 +1257,74 @@ theorem OrthogonalFamily.isInternal_iff [DecidableEq ι] [FiniteDimensional 𝕜
   hV.isInternal_iff_of_isComplete (completeSpace_coe_iff_isComplete.mp inferInstance)
 #align orthogonal_family.is_internal_iff OrthogonalFamily.isInternal_iff
 
+open DirectSum
+
+/-- 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 := by
+  -- porting note: switch to the better `induction _ using`. Need the primed induction principle,
+  -- the unprimed one doesn't work with `induction` (as it isn't as syntactically general)
+  induction hx using Submodule.iSup_induction' with
+  | hp i x hx =>
+    refine'
+      (Finset.sum_eq_single_of_mem i (Finset.mem_univ _) fun j _ hij => _).trans
+        (orthogonalProjection_eq_self_iff.mpr hx)
+    rw [orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero, Submodule.coe_zero]
+    exact hV.isOrtho hij.symm hx
+  | h0 =>
+    simp_rw [map_zero, Submodule.coe_zero, Finset.sum_const_zero]
+  | hadd x y _ _ hx hy =>
+    simp_rw [map_add, Submodule.coe_add, Finset.sum_add_distrib]
+    exact congr_arg₂ (· + ·) hx hy
+#align orthogonal_family.sum_projection_of_mem_supr OrthogonalFamily.sum_projection_of_mem_iSup
+
+/-- If a family of submodules is orthogonal, then the `orthogonal_projection` 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 := by
+  induction' x using DirectSum.induction_on with j x x y hx hy
+  · simp
+  · simp_rw [DirectSum.coeAddMonoidHom_of, DirectSum.of]
+    -- porting note: was in the previous `simp_rw`, no longer works
+    rw [Dfinsupp.singleAddHom_apply]
+    obtain rfl | hij := Decidable.eq_or_ne i j
+    · rw [orthogonalProjection_mem_subspace_eq_self, Dfinsupp.single_eq_same]
+    · rw [orthogonalProjection_mem_subspace_orthogonalComplement_eq_zero,
+        Dfinsupp.single_eq_of_ne hij.symm]
+      exact hV.isOrtho hij.symm x.prop
+  · simp_rw [map_add, Dfinsupp.add_apply]
+    exact congr_arg₂ (· + ·) hx hy
+#align orthogonal_family.projection_direct_sum_coe_add_hom OrthogonalFamily.projection_directSum_coeAddHom
+
+/-- 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]. -/
+@[reducible]
+def 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
+    where
+  decompose' x := Dfinsupp.equivFunOnFintype.symm fun i => orthogonalProjection (V i) x
+  left_inv x := by
+    dsimp only
+    letI := fun i => Classical.decEq (V i)
+    rw [DirectSum.coeAddMonoidHom, DirectSum.toAddMonoid, Dfinsupp.liftAddHom_apply,
+      Dfinsupp.sumAddHom_apply, Dfinsupp.sum_eq_sum_fintype]
+    · simp_rw [Equiv.apply_symm_apply, AddSubmonoidClass.coe_subtype]
+      exact hV.sum_projection_of_mem_iSup _ ((h.ge : _) Submodule.mem_top)
+    · intro i
+      exact map_zero _
+  right_inv x := by
+    dsimp only
+    simp_rw [hV.projection_directSum_coeAddHom, Dfinsupp.equivFunOnFintype_symm_coe]
+#align orthogonal_family.decomposition OrthogonalFamily.decomposition
+
 end OrthogonalFamily
 
 section OrthonormalBasis
chore: add space after exacts (#4945)

Too often tempted to change these during other PRs, so doing a mass edit here.

Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au>

Diff
@@ -343,7 +343,7 @@ theorem norm_eq_iInf_iff_real_inner_eq_zero (K : Submodule ℝ F) {u : F} {v : F
       have h₁ := h w' this
       exact le_of_eq h₁
       rwa [norm_eq_iInf_iff_real_inner_le_zero]
-      exacts[Submodule.convex _, hv])
+      exacts [Submodule.convex _, hv])
 #align norm_eq_infi_iff_real_inner_eq_zero norm_eq_iInf_iff_real_inner_eq_zero
 
 /-- Characterization of minimizers in the projection on a subspace.
chore: bump lean 06-07 (#4849)
Diff
@@ -201,34 +201,23 @@ theorem exists_norm_eq_iInf_of_complete_convex {K : Set F} (ne : K.Nonempty) (h
 /-- 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 :=
-  Iff.intro
-    (by
-      intro eq w hw
-      let δ := ⨅ w : K, ‖u - w‖
-      let p := ⟪u - v, w - v⟫_ℝ
-      let q := ‖w - v‖ ^ 2
-      letI : Nonempty K := ⟨⟨v, hv⟩⟩
-      have : 0 ≤ δ
-      apply le_ciInf
-      intro
-      exact norm_nonneg _
-      have δ_le : ∀ w : K, δ ≤ ‖u - w‖
-      intro w
-      apply ciInf_le
-      use (0 : ℝ)
-      rintro _ ⟨_, rfl⟩
-      exact norm_nonneg _
-      have δ_le' : ∀ w ∈ K, δ ≤ ‖u - w‖ := fun w hw => δ_le ⟨w, hw⟩
-      have : ∀ θ : ℝ, 0 < θ → θ ≤ 1 → 2 * p ≤ θ * q
-      intro θ hθ₁ hθ₂
+    (hv : v ∈ K) : (‖u - v‖ = ⨅ w : K, ‖u - w‖) ↔ ∀ w ∈ K, ⟪u - v, w - v⟫_ℝ ≤ 0 := by
+  letI : Nonempty K := ⟨⟨v, hv⟩⟩
+  constructor
+  · intro eq w hw
+    let δ := ⨅ w : K, ‖u - w‖
+    let p := ⟪u - v, w - v⟫_ℝ
+    let q := ‖w - v‖ ^ 2
+    have δ_le (w : K) : δ ≤ ‖u - w‖ := ciInf_le ⟨0, fun _ ⟨_, h⟩ => h ▸ norm_nonneg _⟩ _
+    have δ_le' (w) (hw : w ∈ K) : δ ≤ ‖u - w‖ := δ_le ⟨w, hw⟩
+    have (θ : ℝ) (hθ₁ : 0 < θ) (hθ₂ : θ ≤ 1) : 2 * p ≤ θ * q := by
       have : ‖u - v‖ ^ 2 ≤ ‖u - v‖ ^ 2 - 2 * θ * ⟪u - v, w - v⟫_ℝ + θ * θ * ‖w - v‖ ^ 2 :=
-        calc
-          ‖u - v‖ ^ 2 ≤ ‖u - (θ • w + (1 - θ) • v)‖ ^ 2 := by
+        calc ‖u - v‖ ^ 2
+          _ ≤ ‖u - (θ • w + (1 - θ) • v)‖ ^ 2 := by
             simp only [sq]; apply mul_self_le_mul_self (norm_nonneg _)
             rw [eq]; apply δ_le'
             apply h hw hv
-            exacts[le_of_lt hθ₁, sub_nonneg.2 hθ₂, add_sub_cancel'_right _ _]
+            exacts [le_of_lt hθ₁, sub_nonneg.2 hθ₂, add_sub_cancel'_right _ _]
           _ = ‖u - v - θ • (w - v)‖ ^ 2 := by
             have : u - (θ • w + (1 - θ) • v) = u - v - θ • (w - v) := by
               rw [smul_sub, sub_smul, one_smul]
@@ -239,13 +228,13 @@ theorem norm_eq_iInf_iff_real_inner_le_zero {K : Set F} (h : Convex ℝ K) {u :
             simp only [sq]
             show
               ‖u - v‖ * ‖u - v‖ - 2 * (θ * inner (u - v) (w - v)) +
-                  absR θ * ‖w - v‖ * (absR θ * ‖w - v‖) =
-                ‖u - v‖ * ‖u - v‖ - 2 * θ * inner (u - v) (w - v) + θ * θ * (‖w - v‖ * ‖w - v‖)
+                absR θ * ‖w - v‖ * (absR θ * ‖w - v‖) =
+              ‖u - v‖ * ‖u - v‖ - 2 * θ * inner (u - v) (w - v) + θ * θ * (‖w - v‖ * ‖w - v‖)
             rw [abs_of_pos hθ₁]; ring
       have eq₁ :
         ‖u - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v) + θ * θ * ‖w - v‖ ^ 2 =
-          ‖u - v‖ ^ 2 + (θ * θ * ‖w - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v)) :=
-        by abel
+          ‖u - v‖ ^ 2 + (θ * θ * ‖w - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v)) := by
+        abel
       rw [eq₁, le_add_iff_nonneg_right] at this
       have eq₂ :
         θ * θ * ‖w - v‖ ^ 2 - 2 * θ * inner (u - v) (w - v) =
@@ -254,57 +243,47 @@ theorem norm_eq_iInf_iff_real_inner_le_zero {K : Set F} (h : Convex ℝ K) {u :
       rw [eq₂] at this
       have := le_of_sub_nonneg (nonneg_of_mul_nonneg_right this hθ₁)
       exact this
-      by_cases hq : q = 0
-      · rw [hq] at this
-        have : p ≤ 0
+    by_cases hq : q = 0
+    · rw [hq] at this
+      have : p ≤ 0 := by
         have := this (1 : ℝ) (by norm_num) (by norm_num)
         linarith
-        exact this
-      · have q_pos : 0 < q
-        apply lt_of_le_of_ne
-        exact sq_nonneg _
-        intro h
-        exact hq h.symm
-        by_contra hp
-        rw [not_le] at hp
-        let θ := min (1 : ℝ) (p / q)
-        have eq₁ : θ * q ≤ p :=
-          calc
-            θ * q ≤ p / q * q := mul_le_mul_of_nonneg_right (min_le_right _ _) (sq_nonneg _)
-            _ = p := div_mul_cancel _ hq
-
-        have : 2 * p ≤ p :=
-          calc
-            2 * p ≤ θ * q := by
-              refine' this θ (lt_min (by norm_num) (div_pos hp q_pos)) (by norm_num)
-            _ ≤ p := eq₁
-
-        linarith)
-    (by
-      intro h
-      letI : Nonempty K := ⟨⟨v, hv⟩⟩
-      apply le_antisymm
-      · apply le_ciInf
-        intro w
-        apply nonneg_le_nonneg_of_sq_le_sq (norm_nonneg _)
-        have := h w w.2
+      exact this
+    · have q_pos : 0 < q := lt_of_le_of_ne (sq_nonneg _) fun h ↦ hq h.symm
+      by_contra hp
+      rw [not_le] at hp
+      let θ := min (1 : ℝ) (p / q)
+      have eq₁ : θ * q ≤ p :=
         calc
-          ‖u - v‖ * ‖u - v‖ ≤ ‖u - v‖ * ‖u - v‖ - 2 * inner (u - v) ((w : F) - v) := by linarith
-          _ ≤ ‖u - v‖ ^ 2 - 2 * inner (u - v) ((w : F) - v) + ‖(w : F) - v‖ ^ 2 := by
-            rw [sq]
-            refine' le_add_of_nonneg_right _
-            exact sq_nonneg _
-          _ = ‖u - v - (w - v)‖ ^ 2 := (@norm_sub_sq ℝ _ _ _ _ _ _).symm
-          _ = ‖u - w‖ * ‖u - w‖ := by
-            have : u - v - (w - v) = u - w
-            abel
-            rw [this, sq]
-
-      · show (⨅ w : K, ‖u - w‖) ≤ (fun w : K => ‖u - w‖) ⟨v, hv⟩
-        apply ciInf_le
-        use 0
-        rintro y ⟨z, rfl⟩
-        exact norm_nonneg _)
+          θ * q ≤ p / q * q := mul_le_mul_of_nonneg_right (min_le_right _ _) (sq_nonneg _)
+          _ = p := div_mul_cancel _ hq
+      have : 2 * p ≤ p :=
+        calc
+          2 * p ≤ θ * q := by
+            refine' this θ (lt_min (by norm_num) (div_pos hp q_pos)) (by norm_num)
+          _ ≤ p := eq₁
+      linarith
+  · intro h
+    apply le_antisymm
+    · apply le_ciInf
+      intro w
+      apply nonneg_le_nonneg_of_sq_le_sq (norm_nonneg _)
+      have := h w w.2
+      calc
+        ‖u - v‖ * ‖u - v‖ ≤ ‖u - v‖ * ‖u - v‖ - 2 * inner (u - v) ((w : F) - v) := by linarith
+        _ ≤ ‖u - v‖ ^ 2 - 2 * inner (u - v) ((w : F) - v) + ‖(w : F) - v‖ ^ 2 := by
+          rw [sq]
+          refine' le_add_of_nonneg_right _
+          exact sq_nonneg _
+        _ = ‖u - v - (w - v)‖ ^ 2 := (@norm_sub_sq ℝ _ _ _ _ _ _).symm
+        _ = ‖u - w‖ * ‖u - w‖ := by
+          have : u - v - (w - v) = u - w := by abel
+          rw [this, sq]
+    · show (⨅ w : K, ‖u - w‖) ≤ (fun w : K => ‖u - w‖) ⟨v, hv⟩
+      apply ciInf_le
+      use 0
+      rintro y ⟨z, rfl⟩
+      exact norm_nonneg _
 #align norm_eq_infi_iff_real_inner_le_zero norm_eq_iInf_iff_real_inner_le_zero
 
 variable (K : Submodule 𝕜 E)
feat: golf using gcongr throughout the library (#4784)

Following on from #4702, another hundred sample uses of the gcongr tactic.

Diff
@@ -151,13 +151,11 @@ theorem exists_norm_eq_iInf_of_complete_convex {K : Set F} (ne : K.Nonempty) (h
       exact add_halves 1
     have eq₁ : 4 * δ * δ ≤ 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ := by
       simp_rw [mul_assoc]
-      exact mul_le_mul_of_nonneg_left (mul_self_le_mul_self zero_le_δ eq) zero_le_four
-    have eq₂ : ‖a‖ * ‖a‖ ≤ (δ + div) * (δ + div) :=
-      mul_self_le_mul_self (norm_nonneg _)
-        (le_trans (le_of_lt <| hw q) (add_le_add_left (Nat.one_div_le_one_div hq) _))
-    have eq₂' : ‖b‖ * ‖b‖ ≤ (δ + div) * (δ + div) :=
-      mul_self_le_mul_self (norm_nonneg _)
-        (le_trans (le_of_lt <| hw p) (add_le_add_left (Nat.one_div_le_one_div hp) _))
+      gcongr
+    have eq₂ : ‖a‖ ≤ δ + div :=
+        le_trans (le_of_lt <| hw q) (add_le_add_left (Nat.one_div_le_one_div hq) _)
+    have eq₂' : ‖b‖ ≤ δ + div :=
+        le_trans (le_of_lt <| hw p) (add_le_add_left (Nat.one_div_le_one_div hp) _)
     rw [dist_eq_norm]
     apply nonneg_le_nonneg_of_sq_le_sq
     · exact sqrt_nonneg _
@@ -165,15 +163,11 @@ theorem exists_norm_eq_iInf_of_complete_convex {K : Set F} (ne : K.Nonempty) (h
     calc
       ‖wp - wq‖ * ‖wp - wq‖ =
           2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖) - 4 * ‖u - half • (wq + wp)‖ * ‖u - half • (wq + wp)‖ := by
-        rw [← this]
-        simp
-      _ ≤ 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖) - 4 * δ * δ := (sub_le_sub_left eq₁ _)
-      _ ≤ 2 * ((δ + div) * (δ + div) + (δ + div) * (δ + div)) - 4 * δ * δ :=
-        (sub_le_sub_right (mul_le_mul_of_nonneg_left (add_le_add eq₂ eq₂') (by norm_num)) _)
+        simp [← this]
+      _ ≤ 2 * (‖a‖ * ‖a‖ + ‖b‖ * ‖b‖) - 4 * δ * δ := by gcongr
+      _ ≤ 2 * ((δ + div) * (δ + div) + (δ + div) * (δ + div)) - 4 * δ * δ := by gcongr
       _ = 8 * δ * div + 4 * div * div := by ring
-    exact
-      add_nonneg (mul_nonneg (mul_nonneg (by norm_num) zero_le_δ) (le_of_lt Nat.one_div_pos_of_nat))
-        (mul_nonneg (mul_nonneg (by norm_num) Nat.one_div_pos_of_nat.le) Nat.one_div_pos_of_nat.le)
+    positivity
     -- third goal : `Tendsto (fun (n : ℕ) => sqrt (b n)) atTop (𝓝 0)`
     apply Tendsto.comp (f := b) (g := sqrt)
     · have : Tendsto sqrt (nhds 0) (nhds (sqrt 0)) := continuous_sqrt.continuousAt
chore: fix typos (#4518)

I ran codespell Mathlib and got tired halfway through the suggestions.

Diff
@@ -1106,7 +1106,7 @@ theorem orthogonalProjection_isSymmetric [CompleteSpace K] :
 open FiniteDimensional
 
 /-- Given a finite-dimensional subspace `K₂`, and a subspace `K₁`
-containined in it, the dimensions of `K₁` and the intersection of its
+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₂) :
@@ -1121,7 +1121,7 @@ theorem Submodule.finrank_add_inf_finrank_orthogonal {K₁ K₂ : Submodule 𝕜
 #align submodule.finrank_add_inf_finrank_orthogonal Submodule.finrank_add_inf_finrank_orthogonal
 
 /-- Given a finite-dimensional subspace `K₂`, and a subspace `K₁`
-containined in it, the dimensions of `K₁` and the intersection of its
+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₂) :
feat: port Analysis.InnerProductSpace.PiL2 (#4420)

Some theorems in Analysis.InnerProductSpace.Basic, such as Orthonormal.inner_right_finsupp, accidentally gained a new DecidableEq hypothesis during the port. This removes the hypothesis by using classical! instead of classical in their proofs.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Komyyy <pol_tta@outlook.jp>

Diff
@@ -1269,7 +1269,6 @@ theorem OrthogonalFamily.isInternal_iff_of_isComplete [DecidableEq ι] {V : ι 
     (hV : OrthogonalFamily 𝕜 (fun i => V i) fun i => (V i).subtypeₗᵢ)
     (hc : IsComplete (↑(iSup V) : Set E)) : DirectSum.IsInternal V ↔ (iSup V)ᗮ = ⊥ := by
   haveI : CompleteSpace (↥(iSup V)) := hc.completeSpace_coe
-  classical
   simp only [DirectSum.isInternal_submodule_iff_independent_and_iSup_eq_top, hV.independent,
     true_and_iff, Submodule.orthogonal_eq_bot_iff]
 #align orthogonal_family.is_internal_iff_of_is_complete OrthogonalFamily.isInternal_iff_of_isComplete
@@ -1353,7 +1352,7 @@ theorem maximal_orthonormal_iff_orthogonalComplement_eq_bot (hv : Orthonormal 
       ∃ l ∈ Finsupp.supported 𝕜 𝕜 ((↑) ⁻¹' v : Set u), (Finsupp.total (↥u) E 𝕜 (↑)) l = y := by
       rw [← Finsupp.mem_span_image_iff_total]
       simp [huv, inter_eq_self_of_subset_left, hy]
-    classical exact hu.inner_finsupp_eq_zero hxv' hl
+    exact hu.inner_finsupp_eq_zero hxv' hl
 #align maximal_orthonormal_iff_orthogonal_complement_eq_bot maximal_orthonormal_iff_orthogonalComplement_eq_bot
 
 variable [FiniteDimensional 𝕜 E]
@@ -1363,7 +1362,6 @@ is a basis. -/
 theorem maximal_orthonormal_iff_basis_of_finiteDimensional (hv : Orthonormal 𝕜 ((↑) : v → E)) :
     (∀ (u) (_ : u ⊇ v), Orthonormal 𝕜 ((↑) : u → E) → u = v) ↔
       ∃ b : Basis v 𝕜 E, ⇑b = ((↑) : v → E) := by
-  classical
   haveI := proper_isROrC 𝕜 (span 𝕜 v)
   rw [maximal_orthonormal_iff_orthogonalComplement_eq_bot hv]
   rw [Submodule.orthogonal_eq_bot_iff]
feat: port Analysis.InnerProductSpace.Projection (#4393)

This PR also increase the priority of Submodule.bot_ext.

Co-authored-by: Jireh Loreaux <loreaujy@gmail.com>

Dependencies 12 + 867

868 files ported (98.6%)
386020 lines ported (98.6%)
Show graph

The unported dependencies are

The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file