Skip to content

Commit

Permalink
feat(Algebra/Category/ModuleCat): the category of presheaves of modul…
Browse files Browse the repository at this point in the history
…es is abelian (#12721)
  • Loading branch information
joelriou authored and callesonne committed Jun 4, 2024
1 parent 771d61e commit 52a9e89
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
1 change: 1 addition & 0 deletions Mathlib.lean
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ import Mathlib.Algebra.Category.ModuleCat.Monoidal.Basic
import Mathlib.Algebra.Category.ModuleCat.Monoidal.Closed
import Mathlib.Algebra.Category.ModuleCat.Monoidal.Symmetric
import Mathlib.Algebra.Category.ModuleCat.Presheaf
import Mathlib.Algebra.Category.ModuleCat.Presheaf.Abelian
import Mathlib.Algebra.Category.ModuleCat.Presheaf.Colimits
import Mathlib.Algebra.Category.ModuleCat.Presheaf.Limits
import Mathlib.Algebra.Category.ModuleCat.Products
Expand Down
2 changes: 2 additions & 0 deletions Mathlib/Algebra/Category/ModuleCat/Presheaf.lean
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ def evaluation (X : Cᵒᵖ) : PresheafOfModules.{v} R ⥤ ModuleCat (R.obj X) w
obj M := M.obj X
map f := f.app X

instance (X : Cᵒᵖ) : (evaluation R X).Additive where

variable {R}

/-- Given a presheaf of modules `M` on a category `C` and `f : X ⟶ Y` in `Cᵒᵖ`, this
Expand Down
36 changes: 36 additions & 0 deletions Mathlib/Algebra/Category/ModuleCat/Presheaf/Abelian.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/-
Copyright (c) 2024 Joël Riou. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Joël Riou
-/
import Mathlib.Algebra.Category.ModuleCat.Presheaf.Colimits
import Mathlib.Algebra.Category.ModuleCat.Presheaf.Limits
import Mathlib.Algebra.Category.ModuleCat.Abelian
import Mathlib.CategoryTheory.Abelian.Basic

/-!
# The category of presheaves of modules is abelian
-/

universe v v₁ u₁ u

open CategoryTheory Category Limits

namespace PresheafOfModules

variable {C : Type u₁} [Category.{v₁} C] (R : Cᵒᵖ ⥤ RingCat.{u})

noncomputable instance : NormalEpiCategory (PresheafOfModules.{v} R) where
normalEpiOfEpi p _ := NormalEpi.mk _ (kernel.ι p) (kernel.condition _)
(evaluationJointlyReflectsColimits _ _ (fun _ =>
Abelian.isColimitMapCoconeOfCokernelCoforkOfπ _ _))

noncomputable instance : NormalMonoCategory (PresheafOfModules.{v} R) where
normalMonoOfMono i _ := NormalMono.mk _ (cokernel.π i) (cokernel.condition _)
(evaluationJointlyReflectsLimits _ _ (fun _ =>
Abelian.isLimitMapConeOfKernelForkOfι _ _))

noncomputable instance : Abelian (PresheafOfModules.{v} R) where

end PresheafOfModules

0 comments on commit 52a9e89

Please sign in to comment.