Skip to content

Commit 471223d

Browse files
committed
feat(Algebra/ModuleCat): lemma for projective dimension eq zero (#37351)
Projective dimension of nontrivial projective module is zero. And fix namespace for related lemmas.
1 parent 6e9a872 commit 471223d

File tree

2 files changed

+35
-5
lines changed

2 files changed

+35
-5
lines changed

Mathlib/Algebra/Category/ModuleCat/ProjectiveDimension.lean

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ public import Mathlib.CategoryTheory.Abelian.Projective.Dimension
2020

2121
universe v v' u u'
2222

23-
variable {R : Type u} [CommRing R] [Small.{v} R]
23+
variable {R : Type u} [CommRing R]
2424

2525
open CategoryTheory Abelian Module
2626

27-
namespace CategoryTheory
27+
namespace ModuleCat
2828

2929
section
3030

31-
variable {R' : Type u'} [CommRing R'] [Small.{v'} R'] (e : R ≃+* R')
31+
variable [Small.{v} R] {R' : Type u'} [CommRing R'] [Small.{v'} R'] (e : R ≃+* R')
3232

3333
variable {M : ModuleCat.{v} R} {N : ModuleCat.{v'} R'}
3434

@@ -61,6 +61,10 @@ lemma hasProjectiveDimensionLE_of_semiLinearEquiv (e' : M ≃ₛₗ[RingHomClass
6161
have := (S_exact.hasProjectiveDimensionLT_X₃_iff n inferInstance).mp ‹_›
6262
exact (S'_exact.hasProjectiveDimensionLT_X₃_iff n inferInstance).mpr (ih eker)
6363

64+
@[deprecated (since := "2026-04-04")]
65+
alias _root_.CategoryTheory.hasProjectiveDimensionLE_of_semiLinearEquiv :=
66+
hasProjectiveDimensionLE_of_semiLinearEquiv
67+
6468
attribute [local instance] RingHomInvPair.of_ringEquiv in
6569
lemma projectiveDimension_eq_of_semiLinearEquiv (e' : M ≃ₛₗ[RingHomClass.toRingHom e] N) :
6670
projectiveDimension M = projectiveDimension N := by
@@ -77,20 +81,37 @@ lemma projectiveDimension_eq_of_semiLinearEquiv (e' : M ≃ₛₗ[RingHomClass.t
7781
exact ⟨fun h ↦ hasProjectiveDimensionLE_of_semiLinearEquiv e e' n,
7882
fun h ↦ hasProjectiveDimensionLE_of_semiLinearEquiv e.symm e'.symm n⟩
7983

84+
@[deprecated (since := "2026-04-04")]
85+
alias _root_.CategoryTheory.projectiveDimension_eq_of_semiLinearEquiv :=
86+
projectiveDimension_eq_of_semiLinearEquiv
87+
8088
end
8189

8290
section
8391

84-
variable [Small.{v'} R] {M : ModuleCat.{v} R} {N : ModuleCat.{v'} R}
92+
variable [Small.{v} R] [Small.{v'} R] {M : ModuleCat.{v} R} {N : ModuleCat.{v'} R}
8593

8694
lemma hasProjectiveDimensionLE_of_linearEquiv (e : M ≃ₗ[R] N)
8795
(n : ℕ) [HasProjectiveDimensionLE M n] : HasProjectiveDimensionLE N n :=
8896
hasProjectiveDimensionLE_of_semiLinearEquiv (RingEquiv.refl R) e n
8997

98+
@[deprecated (since := "2026-04-04")]
99+
alias _root_.CategoryTheory.hasProjectiveDimensionLE_of_linearEquiv :=
100+
hasProjectiveDimensionLE_of_linearEquiv
101+
90102
lemma projectiveDimension_eq_of_linearEquiv (e : M ≃ₗ[R] N) :
91103
projectiveDimension M = projectiveDimension N :=
92104
projectiveDimension_eq_of_semiLinearEquiv (M := M) (N := N) (RingEquiv.refl R) e
93105

106+
@[deprecated (since := "2026-04-04")]
107+
alias _root_.CategoryTheory.projectiveDimension_eq_of_linearEquiv :=
108+
projectiveDimension_eq_of_linearEquiv
109+
94110
end
95111

96-
end CategoryTheory
112+
lemma projectiveDimension_eq_zero_of_projective (M : ModuleCat.{v} R) [Nontrivial M]
113+
[Projective M] : projectiveDimension M = 0 := by
114+
simpa [projectiveDimension_eq_zero_iff, ModuleCat.isZero_iff_subsingleton,
115+
not_subsingleton_iff_nontrivial] using ⟨‹_›, ‹_›⟩
116+
117+
end ModuleCat

Mathlib/CategoryTheory/Abelian/Projective/Dimension.lean

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ lemma projective_iff_hasProjectiveDimensionLT_one :
154154
exact ⟨fun _ ↦ inferInstance, fun _ ↦ projective_iff_subsingleton_ext_one.2
155155
(HasProjectiveDimensionLT.subsingleton X 1 1 (by rfl))⟩
156156

157+
lemma projective_iff_hasProjectiveDimensionLE_zero : Projective X ↔ HasProjectiveDimensionLE X 0 :=
158+
projective_iff_hasProjectiveDimensionLT_one
159+
157160
instance (priority := low) [HasProjectiveDimensionLT X 1] : Projective X :=
158161
projective_iff_hasProjectiveDimensionLT_one.mpr ‹_›
159162

@@ -321,6 +324,12 @@ lemma projectiveDimension_ne_top_iff (X : C) :
321324
simp only [ne_eq, WithBot.coe_eq_top, ENat.coe_ne_top, not_false_eq_true, true_iff]
322325
exact ⟨d, by simpa only [← projectiveDimension_le_iff] using hd.le⟩
323326

327+
lemma projectiveDimension_eq_zero_iff (X : C) :
328+
projectiveDimension X = 0 ↔ Projective X ∧ ¬ Limits.IsZero X := by
329+
rw [← projectiveDimension_eq_bot_iff, projective_iff_hasProjectiveDimensionLE_zero,
330+
← projectiveDimension_le_iff, ← WithBot.lt_zero_iff_eq_bot, not_lt, Nat.cast_zero,
331+
le_antisymm_iff]
332+
324333
end CategoryTheory
325334

326335
end ProjectiveDimension

0 commit comments

Comments
 (0)