Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - feat: UnivLE version of EnoughInjectives in ModuleCat #8734

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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
10 changes: 10 additions & 0 deletions Mathlib/Algebra/Category/ModuleCat/ChangeOfRings.lean
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,16 @@ abbrev restrictScalarsComp := restrictScalarsComp'.{v} f g _ rfl

end

instance restrictScalarsIsEquivalenceOfRingEquiv {R S} [Ring R] [Ring S] (e : R ≃+* S) :
IsEquivalence (ModuleCat.restrictScalars e.toRingHom) where
inverse := ModuleCat.restrictScalars e.symm
unitIso := NatIso.ofComponents fun M ↦ LinearEquiv.toModuleIso'
{ __ := AddEquiv.refl M
map_smul' := fun s m ↦ congr_arg (· • m) (e.right_inv s).symm }
counitIso := NatIso.ofComponents fun M ↦ LinearEquiv.toModuleIso'
{ __ := AddEquiv.refl M
map_smul' := fun r m ↦ congr_arg (· • (_ : M)) (e.left_inv r) }

open TensorProduct

variable {R : Type u₁} {S : Type u₂} [CommRing R] [CommRing S] (f : R →+* S)
Expand Down
8 changes: 7 additions & 1 deletion Mathlib/Algebra/Category/ModuleCat/Injective.lean
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,17 @@ abelian groups.

open CategoryTheory

universe u v
universe v u
variable (R : Type u) [Ring R]

instance : EnoughInjectives (ModuleCat.{v} ℤ) :=
EnoughInjectives.of_equivalence (forget₂ (ModuleCat ℤ) AddCommGroupCat)

lemma ModuleCat.enoughInjectives : EnoughInjectives (ModuleCat.{max v u} R) :=
EnoughInjectives.of_adjunction (ModuleCat.restrictCoextendScalarsAdj.{max v u} (algebraMap ℤ R))

open ModuleCat in
instance [UnivLE.{u,v}] : EnoughInjectives (ModuleCat.{v} R) :=
letI := (equivShrink.{v} R).symm.ring
letI := enoughInjectives.{v} (Shrink.{v} R)
EnoughInjectives.of_equivalence (restrictScalars (equivShrink R).symm.ringEquiv.toRingHom)
Loading