Skip to content
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions Mathlib/Algebra/Category/ModuleCat/ProjectiveDimension.lean
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ public import Mathlib.CategoryTheory.Abelian.Projective.Dimension

universe v v' u u'

variable {R : Type u} [CommRing R] [Small.{v} R]
variable {R : Type u} [CommRing R]

open CategoryTheory Abelian Module

namespace CategoryTheory

section

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

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

Expand Down Expand Up @@ -81,7 +81,7 @@ end

section

variable [Small.{v'} R] {M : ModuleCat.{v} R} {N : ModuleCat.{v'} R}
variable [Small.{v} R] [Small.{v'} R] {M : ModuleCat.{v} R} {N : ModuleCat.{v'} R}

lemma hasProjectiveDimensionLE_of_linearEquiv (e : M ≃ₗ[R] N)
(n : ℕ) [HasProjectiveDimensionLE M n] : HasProjectiveDimensionLE N n :=
Expand All @@ -94,3 +94,8 @@ lemma projectiveDimension_eq_of_linearEquiv (e : M ≃ₗ[R] N) :
end

end CategoryTheory

lemma projectiveDimension_eq_zero_of_projective (M : ModuleCat.{v} R) [Nontrivial M]
[Projective M] : projectiveDimension M = 0 := by
simpa [projectiveDimension_eq_zero_iff, ModuleCat.isZero_iff_subsingleton,
not_subsingleton_iff_nontrivial] using ⟨‹_›, ‹_›⟩
9 changes: 9 additions & 0 deletions Mathlib/CategoryTheory/Abelian/Projective/Dimension.lean
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ lemma projective_iff_hasProjectiveDimensionLT_one :
exact ⟨fun _ ↦ inferInstance, fun _ ↦ projective_iff_subsingleton_ext_one.2
(HasProjectiveDimensionLT.subsingleton X 1 1 (by rfl))⟩

lemma projective_iff_hasProjectiveDimensionLE_zero : Projective X ↔ HasProjectiveDimensionLE X 0 :=
projective_iff_hasProjectiveDimensionLT_one

instance (priority := low) [HasProjectiveDimensionLT X 1] : Projective X :=
projective_iff_hasProjectiveDimensionLT_one.mpr ‹_›

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

lemma projectiveDimension_eq_zero_iff (X : C) :
projectiveDimension X = 0 ↔ Projective X ∧ ¬ Limits.IsZero X := by
rw [← projectiveDimension_eq_bot_iff, projective_iff_hasProjectiveDimensionLE_zero,
← projectiveDimension_le_iff, ← WithBot.lt_zero_iff_eq_bot, not_lt, Nat.cast_zero,
le_antisymm_iff]

end CategoryTheory

end ProjectiveDimension
Loading