Skip to content

Commit 090daf0

Browse files
committed
refactor(Topology/Algebra/Module/LinearMap): rename subtypeL companion lemmas (leanprover-community#38962)
This PR renames the companion lemmas of `Submodule.subtypeL` for consistency with `Submodule.mkQL` (introduced in PR leanprover-community#38811). Specifically, `Submodule.coe_subtypeL` is renamed to `Submodule.toLinearMap_subtypeL` (to accurately reflect that it projects to the underlying LinearMap, not a function-level coercion), and `Submodule.coe_subtypeL'` is renamed to `Submodule.coe_subtypeL` (since this is the genuine function-level coercion lemma).
1 parent 1cb172e commit 090daf0

4 files changed

Lines changed: 38 additions & 32 deletions

File tree

Mathlib/Analysis/Calculus/Implicit.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,11 +428,11 @@ theorem to_implicitFunctionOfComplemented (hf : HasStrictFDerivAt f f' a) (hf' :
428428
swap
429429
· ext
430430
simp only [Classical.choose_spec hker, implicitFunctionDataOfComplemented,
431-
ContinuousLinearMap.comp_apply, Submodule.coe_subtypeL', Submodule.coe_subtype,
431+
ContinuousLinearMap.comp_apply, Submodule.coe_subtypeL, Submodule.coe_subtype,
432432
ContinuousLinearMap.id_apply]
433433
swap
434434
· ext
435-
simp only [ContinuousLinearMap.comp_apply, Submodule.coe_subtypeL', Submodule.coe_subtype,
435+
simp only [ContinuousLinearMap.comp_apply, Submodule.coe_subtypeL, Submodule.coe_subtype,
436436
ContinuousLinearMap.apply_val_ker, ContinuousLinearMap.zero_apply]
437437
simp only [implicitFunctionDataOfComplemented, map_sub, sub_self]
438438

Mathlib/Analysis/Normed/Operator/Banach.lean

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -498,10 +498,9 @@ noncomputable def coprodSubtypeLEquivOfIsCompl {F : Type*} [NormedAddCommGroup F
498498
ContinuousLinearEquiv.ofBijective (f.coprod G.subtypeL)
499499
(by
500500
rw [ker_coprod_of_disjoint_range]
501-
· rw [hker, Submodule.ker_subtypeL, Submodule.prod_bot]
502-
· rw [Submodule.range_subtypeL]
503-
exact h.disjoint)
504-
(by simp only [range_coprod, Submodule.range_subtypeL, h.sup_eq_top])
501+
· simp [hker]
502+
· simp [h.disjoint])
503+
(by simp [LinearMap.range_coprod, h.sup_eq_top])
505504

506505
theorem range_eq_map_coprodSubtypeLEquivOfIsCompl {F : Type*} [NormedAddCommGroup F]
507506
[NormedSpace 𝕜 F] [CompleteSpace F] (f : E →L[𝕜] F) {G : Submodule 𝕜 F}

Mathlib/Topology/Algebra/Module/LinearMap.lean

Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -702,31 +702,6 @@ theorem coe_rangeRestrict [RingHomSurjective σ₁₂] (f : M₁ →SL[σ₁₂]
702702
(f : M₁ →ₛₗ[σ₁₂] M₂).rangeRestrict :=
703703
rfl
704704

705-
/-- `Submodule.subtype` as a `ContinuousLinearMap`. -/
706-
def _root_.Submodule.subtypeL (p : Submodule R₁ M₁) : p →L[R₁] M₁ where
707-
cont := continuous_subtype_val
708-
toLinearMap := p.subtype
709-
710-
@[simp, norm_cast]
711-
theorem _root_.Submodule.coe_subtypeL (p : Submodule R₁ M₁) :
712-
(p.subtypeL : p →ₗ[R₁] M₁) = p.subtype :=
713-
rfl
714-
715-
@[simp]
716-
theorem _root_.Submodule.coe_subtypeL' (p : Submodule R₁ M₁) : ⇑p.subtypeL = p.subtype :=
717-
rfl
718-
719-
@[simp]
720-
theorem _root_.Submodule.subtypeL_apply (p : Submodule R₁ M₁) (x : p) : p.subtypeL x = x :=
721-
rfl
722-
723-
theorem _root_.Submodule.range_subtypeL (p : Submodule R₁ M₁) :
724-
range (p.subtypeL : p →ₗ[R₁] M₁) = p :=
725-
Submodule.range_subtype _
726-
727-
theorem _root_.Submodule.ker_subtypeL (p : Submodule R₁ M₁) : ker (p.subtypeL : p →ₗ[R₁] M₁) = ⊥ :=
728-
Submodule.ker_subtype _
729-
730705
section
731706

732707
variable {R S : Type*} [Semiring R] [Semiring S] [Module R M₁] [Module R M₂] [Module R S]
@@ -1258,6 +1233,37 @@ end ContinuousLinearMap
12581233

12591234
namespace Submodule
12601235

1236+
section Semiring
1237+
1238+
variable {R : Type*} [Semiring R] {M : Type*} [TopologicalSpace M] [AddCommMonoid M] [Module R M]
1239+
1240+
/-- `Submodule.subtype` as a `ContinuousLinearMap`. -/
1241+
def subtypeL (p : Submodule R M) : p →L[R] M where
1242+
toLinearMap := p.subtype
1243+
1244+
@[simp, norm_cast]
1245+
theorem toLinearMap_subtypeL (p : Submodule R M) : (p.subtypeL : p →ₗ[R] M) = p.subtype := rfl
1246+
1247+
@[simp]
1248+
theorem coe_subtypeL (p : Submodule R M) : ⇑p.subtypeL = p.subtype := rfl
1249+
1250+
@[deprecated (since := "2026-05-06")]
1251+
alias coe_subtypeL' := coe_subtypeL
1252+
1253+
theorem subtypeL_apply (p : Submodule R M) (x : p) : p.subtypeL x = x := by simp
1254+
1255+
@[deprecated range_subtype (since := "2026-05-06")]
1256+
theorem range_subtypeL (p : Submodule R M) : (p.subtypeL : p →ₗ[R] M).range = p :=
1257+
Submodule.range_subtype _
1258+
1259+
@[deprecated ker_subtype (since := "2026-05-06")]
1260+
theorem ker_subtypeL (p : Submodule R M) : (p.subtypeL : p →ₗ[R] M).ker = ⊥ :=
1261+
Submodule.ker_subtype _
1262+
1263+
end Semiring
1264+
1265+
section Ring
1266+
12611267
variable {R : Type*} [Ring R] {M : Type*} [TopologicalSpace M] [AddCommGroup M] [Module R M]
12621268
(S : Submodule R M)
12631269

@@ -1281,6 +1287,8 @@ theorem isQuotientMap_mkQL : IsQuotientMap S.mkQL := isQuotientMap_quot_mk
12811287
theorem isOpenQuotientMap_mkQL [ContinuousAdd M] : IsOpenQuotientMap S.mkQL :=
12821288
S.isOpenQuotientMap_mkQ
12831289

1290+
end Ring
1291+
12841292
end Submodule
12851293

12861294
namespace ContinuousLinearMap

scripts/nolints_prime_decls.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4144,7 +4144,6 @@ Sublattice.coe_inf'
41444144
SubmoduleClass.module'
41454145
Submodule.coe_continuous_linearProjOfClosedCompl'
41464146
Submodule.coe_prodEquivOfIsCompl'
4147-
Submodule.coe_subtypeL'
41484147
Submodule.comap_smul'
41494148
Submodule.disjoint_def'
41504149
Submodule.disjoint_span_singleton'

0 commit comments

Comments
 (0)