Skip to content

Commit e7670e5

Browse files
committed
chore(Analysis/InnerProductSpace/Projection): deprecating subtypeL ∘ orthogonalProjection in favor of starProjection (#26877)
This deprecates all `U.subtypeL ∘L U.orthogonalProjection` and `(U.orthogonalProjection v : E)` in favor of `U.starProjection` and `U.starProjection v` respectively in `Analysis/InnerProductSpace/Projection` and other files. Co-authored-by: themathqueen <23701951+themathqueen@users.noreply.github.com>
1 parent 78257c2 commit e7670e5

File tree

6 files changed

+219
-131
lines changed

6 files changed

+219
-131
lines changed

Mathlib/Analysis/InnerProductSpace/Adjoint.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ theorem _root_.LinearMap.IsSymmetric.isSelfAdjoint {A : E →L[𝕜] E}
295295
theorem _root_.isSelfAdjoint_starProjection
296296
(U : Submodule 𝕜 E) [U.HasOrthogonalProjection] :
297297
IsSelfAdjoint U.starProjection :=
298-
U.orthogonalProjection_isSymmetric.isSelfAdjoint
298+
U.starProjection_isSymmetric.isSelfAdjoint
299299

300300
@[deprecated (since := "2025-07-05")] alias _root_.orthogonalProjection_isSelfAdjoint :=
301301
isSelfAdjoint_starProjection
@@ -343,7 +343,7 @@ end ContinuousLinearMap
343343

344344
/-- `U.starProjection` is a star projection. -/
345345
@[simp]
346-
theorem isStarProjection_starProjection [CompleteSpace E] (U : Submodule 𝕜 E)
346+
theorem isStarProjection_starProjection [CompleteSpace E] {U : Submodule 𝕜 E}
347347
[U.HasOrthogonalProjection] : IsStarProjection U.starProjection :=
348348
⟨U.isIdempotentElem_starProjection, isSelfAdjoint_starProjection U⟩
349349

@@ -352,11 +352,11 @@ open ContinuousLinearMap in
352352
theorem isStarProjection_iff_eq_starProjection_range [CompleteSpace E] {p : E →L[𝕜] E} :
353353
IsStarProjection p ↔ ∃ (_ : (LinearMap.range p).HasOrthogonalProjection),
354354
p = (LinearMap.range p).starProjection := by
355-
refine ⟨fun hp ↦ ?_, fun ⟨h, hp⟩ ↦ hp ▸ isStarProjection_starProjection _
355+
refine ⟨fun hp ↦ ?_, fun ⟨h, hp⟩ ↦ hp ▸ isStarProjection_starProjection⟩
356356
have := IsIdempotentElem.hasOrthogonalProjection_range hp.isIdempotentElem
357357
refine ⟨this, Eq.symm ?_⟩
358358
ext x
359-
refine Submodule.eq_orthogonalProjection_of_mem_orthogonal (by simp) ?_
359+
refine Submodule.eq_starProjection_of_mem_orthogonal (by simp) ?_
360360
simpa [p.orthogonal_range, hp.isSelfAdjoint.isSymmetric]
361361
using congr($(hp.isIdempotentElem.mul_one_sub_self) x)
362362

Mathlib/Analysis/InnerProductSpace/GramSchmidtOrtho.lean

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,12 @@ theorem gramSchmidt_def' (f : ι → E) (n : ι) :
5959
f n = gramSchmidt 𝕜 f n + ∑ i ∈ Iio n, (𝕜 ∙ gramSchmidt 𝕜 f i).orthogonalProjection (f n) := by
6060
rw [gramSchmidt_def, sub_add_cancel]
6161

62+
-- changing the definition to use `starProjection` makes the proof of this not work
6263
theorem gramSchmidt_def'' (f : ι → E) (n : ι) :
6364
f n = gramSchmidt 𝕜 f n + ∑ i ∈ Iio n,
6465
(⟪gramSchmidt 𝕜 f i, f n⟫ / (‖gramSchmidt 𝕜 f i‖ : 𝕜) ^ 2) • gramSchmidt 𝕜 f i := by
6566
convert gramSchmidt_def' 𝕜 f n
66-
rw [orthogonalProjection_singleton, RCLike.ofReal_pow]
67+
rw [← starProjection_apply, starProjection_singleton, RCLike.ofReal_pow]
6768

6869
@[simp]
6970
theorem gramSchmidt_zero {ι : Type*} [LinearOrder ι] [LocallyFiniteOrder ι] [OrderBot ι]
@@ -84,8 +85,8 @@ theorem gramSchmidt_orthogonal (f : ι → E) {a b : ι} (h₀ : a ≠ b) :
8485
revert a
8586
apply wellFounded_lt.induction b
8687
intro b ih a h₀
87-
simp only [gramSchmidt_def 𝕜 f b, inner_sub_right, inner_sum, orthogonalProjection_singleton,
88-
inner_smul_right]
88+
simp only [gramSchmidt_def 𝕜 f b, inner_sub_right, inner_sum, ← starProjection_apply,
89+
starProjection_singleton, inner_smul_right]
8990
rw [Finset.sum_eq_single_of_mem a (Finset.mem_Iio.mpr h₀)]
9091
· by_cases h : gramSchmidt 𝕜 f a = 0
9192
· simp only [h, inner_zero_left, zero_div, zero_mul, sub_zero]
@@ -122,7 +123,7 @@ open Submodule Set Order
122123
theorem mem_span_gramSchmidt (f : ι → E) {i j : ι} (hij : i ≤ j) :
123124
f i ∈ span 𝕜 (gramSchmidt 𝕜 f '' Set.Iic j) := by
124125
rw [gramSchmidt_def' 𝕜 f i]
125-
simp_rw [orthogonalProjection_singleton]
126+
simp_rw [← starProjection_apply, starProjection_singleton]
126127
exact Submodule.add_mem _ (subset_span <| mem_image_of_mem _ hij)
127128
(Submodule.sum_mem _ fun k hk => smul_mem (span 𝕜 (gramSchmidt 𝕜 f '' Set.Iic j)) _ <|
128129
subset_span <| mem_image_of_mem (gramSchmidt 𝕜 f) <| (Finset.mem_Iio.1 hk).le.trans hij)
@@ -131,7 +132,7 @@ theorem gramSchmidt_mem_span (f : ι → E) :
131132
∀ {j i}, i ≤ j → gramSchmidt 𝕜 f i ∈ span 𝕜 (f '' Set.Iic j) := by
132133
intro j i hij
133134
rw [gramSchmidt_def 𝕜 f i]
134-
simp_rw [orthogonalProjection_singleton]
135+
simp_rw [← starProjection_apply, starProjection_singleton]
135136
refine Submodule.sub_mem _ (subset_span (mem_image_of_mem _ hij))
136137
(Submodule.sum_mem _ fun k hk => ?_)
137138
let hkj : k < j := (Finset.mem_Iio.1 hk).trans_le hij
@@ -186,7 +187,7 @@ theorem gramSchmidt_ne_zero_coe {f : ι → E} (n : ι)
186187
rw [← span_gramSchmidt_Iio 𝕜 f n, gramSchmidt_def' 𝕜 f, h, zero_add]
187188
apply Submodule.sum_mem _ _
188189
intro a ha
189-
simp only [orthogonalProjection_singleton]
190+
simp only [← starProjection_apply, starProjection_singleton]
190191
apply Submodule.smul_mem _ _ _
191192
rw [Finset.mem_Iio] at ha
192193
exact subset_span ⟨a, ha, by rfl⟩

0 commit comments

Comments
 (0)