Documentation

Mathlib.CategoryTheory.Abelian.Basic

Abelian categories #

This file contains the definition and basic properties of abelian categories.

There are many definitions of abelian category. Our definition is as follows: A category is called abelian if it is preadditive, has finite products, kernels, and cokernels, and if every monomorphism and epimorphism is normal.

It should be noted that if we also assume finite coproducts, then preadditivity is actually a consequence of the other properties, as we show in Mathlib/CategoryTheory/Abelian/NonPreadditive.lean. However, this fact is of little practical relevance, since essentially all interesting abelian categories come with a preadditive structure. In this way, by requiring preadditivity, we allow the user to pass in the "native" preadditive structure for the specific category they are working with.

Main definitions #

Main results #

Implementation notes #

The typeclass Abelian does not extend NonPreadditiveAbelian, to avoid having to deal with comparing the two HasZeroMorphisms instances (one from Preadditive in Abelian, and the other a field of NonPreadditiveAbelian). As a consequence, at the beginning of this file we trivially build a NonPreadditiveAbelian instance from an Abelian instance, and use this to restate a number of theorems, in each case just reusing the proof from Mathlib/CategoryTheory/Abelian/NonPreadditive.lean.

We don't show this yet, but abelian categories are finitely complete and finitely cocomplete. However, the limits we can construct at this level of generality will most likely be less nice than the ones that can be created in specific applications. For this reason, we adopt the following convention:

References #

A (preadditive) category C is called abelian if it has all finite products, all kernels and cokernels, and if every monomorphism is the kernel of some morphism and every epimorphism is the cokernel of some morphism.

(This definition implies the existence of zero objects: finite products give a terminal object, and in a preadditive category any terminal object is a zero object.)

Instances

    We begin by providing an alternative constructor: a preadditive category with kernels, cokernels, and finite products, in which the coimage-image comparison morphism is always an isomorphism, is an abelian category.

    The factorisation of a morphism through its abelian image.

    Equations
      Instances For

        If the coimage-image comparison morphism for a morphism f is an isomorphism, we obtain an image factorisation of f.

        Equations
          Instances For

            A category in which coimage-image comparisons are all isomorphisms has images.

            A category with finite products in which coimage-image comparisons are all isomorphisms is a normal mono category.

            A category with finite products in which coimage-image comparisons are all isomorphisms is a normal epi category.

            A preadditive category with kernels, cokernels, and finite products, in which the coimage-image comparison morphism is always an isomorphism, is an abelian category.

            Equations
              Instances For

                Every abelian category is, in particular, NonPreadditiveAbelian.

                Equations
                  Instances For

                    We now promote some instances that were constructed using nonPreadditiveAbelian.

                    The map p : P ⟶ image f is an epimorphism

                    The canonical morphism i : coimage f ⟶ Q is a monomorphism

                    Factoring through the image is a strong epi-mono factorisation.

                    Equations
                      Instances For

                        Factoring through the coimage is a strong epi-mono factorisation.

                        Equations
                          Instances For
                            @[instance 100]

                            An abelian category has strong epi-mono factorisations.

                            The coimage-image comparison morphism is always an isomorphism in an abelian category. See CategoryTheory.Abelian.ofCoimageImageComparisonIsIso for the converse.

                            @[reducible, inline]

                            There is a canonical isomorphism between the abelian coimage and the abelian image of a morphism.

                            Equations
                              Instances For
                                @[reducible, inline]

                                There is a canonical isomorphism between the abelian coimage and the categorical image of a morphism.

                                Equations
                                  Instances For
                                    @[simp]
                                    theorem CategoryTheory.Abelian.image.ι_comp_eq_zero {C : Type u} [Category.{v, u} C] [Abelian C] {X Y : C} (f : X Y) {Z : C} (g : Y Z) :

                                    Abelian.image as a functor from the arrow category.

                                    Equations
                                      Instances For
                                        @[deprecated CategoryTheory.Abelian.im (since := "2025-10-31")]

                                        Alias of CategoryTheory.Abelian.im.


                                        Abelian.image as a functor from the arrow category.

                                        Equations
                                          Instances For

                                            Abelian.coimage as a functor from the arrow category.

                                            Equations
                                              Instances For
                                                @[deprecated CategoryTheory.Abelian.coim (since := "2025-10-31")]

                                                Alias of CategoryTheory.Abelian.coim.


                                                Abelian.coimage as a functor from the arrow category.

                                                Equations
                                                  Instances For

                                                    The image and coimage of an arrow are naturally isomorphic.

                                                    Equations
                                                      Instances For
                                                        @[deprecated CategoryTheory.Abelian.coimIsoIm (since := "2025-10-31")]

                                                        Alias of CategoryTheory.Abelian.coimIsoIm.


                                                        The image and coimage of an arrow are naturally isomorphic.

                                                        Equations
                                                          Instances For
                                                            @[reducible, inline]

                                                            There is a canonical isomorphism between the abelian image and the categorical image of a morphism.

                                                            Equations
                                                              Instances For

                                                                In an abelian category, an epi is the cokernel of its kernel. More precisely: If f is an epimorphism and s is some limit kernel cone on f, then f is a cokernel of fork.ι s.

                                                                Equations
                                                                  Instances For

                                                                    In an abelian category, a mono is the kernel of its cokernel. More precisely: If f is a monomorphism and s is some colimit cokernel cocone on f, then f is a kernel of cofork.π s.

                                                                    Equations
                                                                      Instances For
                                                                        def CategoryTheory.Abelian.epiDesc {C : Type u} [Category.{v, u} C] [Abelian C] {X Y : C} (f : X Y) [Epi f] {T : C} (g : X T) (hg : CategoryStruct.comp (Limits.kernel.ι f) g = 0) :
                                                                        Y T

                                                                        In an abelian category, any morphism that turns to zero when precomposed with the kernel of an epimorphism factors through that epimorphism.

                                                                        Equations
                                                                          Instances For
                                                                            @[simp]
                                                                            theorem CategoryTheory.Abelian.comp_epiDesc {C : Type u} [Category.{v, u} C] [Abelian C] {X Y : C} (f : X Y) [Epi f] {T : C} (g : X T) (hg : CategoryStruct.comp (Limits.kernel.ι f) g = 0) :
                                                                            @[simp]
                                                                            theorem CategoryTheory.Abelian.comp_epiDesc_assoc {C : Type u} [Category.{v, u} C] [Abelian C] {X Y : C} (f : X Y) [Epi f] {T : C} (g : X T) (hg : CategoryStruct.comp (Limits.kernel.ι f) g = 0) {Z : C} (h : T Z) :
                                                                            def CategoryTheory.Abelian.monoLift {C : Type u} [Category.{v, u} C] [Abelian C] {X Y : C} (f : X Y) [Mono f] {T : C} (g : T Y) (hg : CategoryStruct.comp g (Limits.cokernel.π f) = 0) :
                                                                            T X

                                                                            In an abelian category, any morphism that turns to zero when postcomposed with the cokernel of a monomorphism factors through that monomorphism.

                                                                            Equations
                                                                              Instances For
                                                                                @[simp]
                                                                                theorem CategoryTheory.Abelian.monoLift_comp {C : Type u} [Category.{v, u} C] [Abelian C] {X Y : C} (f : X Y) [Mono f] {T : C} (g : T Y) (hg : CategoryStruct.comp g (Limits.cokernel.π f) = 0) :
                                                                                @[simp]
                                                                                theorem CategoryTheory.Abelian.monoLift_comp_assoc {C : Type u} [Category.{v, u} C] [Abelian C] {X Y : C} (f : X Y) [Mono f] {T : C} (g : T Y) (hg : CategoryStruct.comp g (Limits.cokernel.π f) = 0) {Z : C} (h : Y Z) :

                                                                                If F : D ⥤ C is a functor to an abelian category, i : X ⟶ Y is a morphism admitting a cokernel such that F preserves this cokernel and F.map i is a mono, then F.map X identifies to the kernel of F.map (cokernel.π i).

                                                                                Equations
                                                                                  Instances For

                                                                                    If F : D ⥤ C is a functor to an abelian category, p : X ⟶ Y is a morphism admitting a kernel such that F preserves this kernel and F.map p is an epi, then F.map Y identifies to the cokernel of F.map (kernel.ι p).

                                                                                    Equations
                                                                                      Instances For
                                                                                        @[instance 100]

                                                                                        Any abelian category has pullbacks

                                                                                        @[instance 100]

                                                                                        Any abelian category has pushouts

                                                                                        This section contains a slightly technical result about pullbacks and biproducts. We will need it in the proof that the pullback of an epimorphism is an epimorphism.

                                                                                        @[reducible, inline]

                                                                                        The canonical map pullback f g ⟶ X ⊞ Y

                                                                                        Equations
                                                                                          Instances For
                                                                                            @[reducible, inline]

                                                                                            The canonical map pullback f g ⟶ X ⊞ Y induces a kernel cone on the map biproduct X Y ⟶ Z induced by f and g. A slightly more intuitive way to think of this may be that it induces an equalizer fork on the maps induced by (f, 0) and (0, g).

                                                                                            Equations
                                                                                              Instances For

                                                                                                The canonical map pullback f g ⟶ X ⊞ Y is a kernel of the map induced by (f, -g).

                                                                                                Equations
                                                                                                  Instances For
                                                                                                    @[reducible, inline]

                                                                                                    The canonical map Y ⊞ Z ⟶ pushout f g

                                                                                                    Equations
                                                                                                      Instances For
                                                                                                        @[reducible, inline]

                                                                                                        The canonical map Y ⊞ Z ⟶ pushout f g induces a cokernel cofork on the map X ⟶ Y ⊞ Z induced by f and -g.

                                                                                                        Equations
                                                                                                          Instances For

                                                                                                            The cofork induced by the canonical map Y ⊞ Z ⟶ pushout f g is in fact a colimit cokernel cofork.

                                                                                                            Equations
                                                                                                              Instances For
                                                                                                                instance CategoryTheory.Abelian.epi_pullback_of_epi_f {C : Type u} [Category.{v, u} C] [Abelian C] [Limits.HasPullbacks C] {X Y Z : C} (f : X Z) (g : Y Z) [Epi f] :

                                                                                                                In an abelian category, the pullback of an epimorphism is an epimorphism. Proof from [aluffi2016, IX.2.3], cf. [borceux-vol2, 1.7.6]

                                                                                                                instance CategoryTheory.Abelian.epi_pullback_of_epi_g {C : Type u} [Category.{v, u} C] [Abelian C] [Limits.HasPullbacks C] {X Y Z : C} (f : X Z) (g : Y Z) [Epi g] :

                                                                                                                In an abelian category, the pullback of an epimorphism is an epimorphism.

                                                                                                                theorem CategoryTheory.Abelian.epi_fst_of_factor_thru_epi_mono_factorization {C : Type u} [Category.{v, u} C] [Abelian C] [Limits.HasPullbacks C] {W X Y Z : C} (f : X Z) (g : Y Z) (g₁ : Y W) [Epi g₁] (g₂ : W Z) [Mono g₂] (hg : CategoryStruct.comp g₁ g₂ = g) (f' : X W) (hf : CategoryStruct.comp f' g₂ = f) (t : Limits.PullbackCone f g) (ht : Limits.IsLimit t) :

                                                                                                                Suppose f and g are two morphisms with a common codomain and suppose we have written g as an epimorphism followed by a monomorphism. If f factors through the mono part of this factorization, then any pullback of g along f is an epimorphism.

                                                                                                                theorem CategoryTheory.Abelian.mono_inl_of_factor_thru_epi_mono_factorization {C : Type u} [Category.{v, u} C] [Abelian C] [Limits.HasPushouts C] {W X Y Z : C} (f : X Y) (g : X Z) (g₁ : X W) [Epi g₁] (g₂ : W Z) [Mono g₂] (hg : CategoryStruct.comp g₁ g₂ = g) (f' : W Y) (hf : CategoryStruct.comp g₁ f' = f) (t : Limits.PushoutCocone f g) (ht : Limits.IsColimit t) :

                                                                                                                Suppose f and g are two morphisms with a common domain and suppose we have written g as an epimorphism followed by a monomorphism. If f factors through the epi part of this factorization, then any pushout of g along f is a monomorphism.

                                                                                                                Every NonPreadditiveAbelian category can be promoted to an abelian category.

                                                                                                                Equations
                                                                                                                  Instances For