# mathlibdocumentation

category_theory.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 a finite products, kernels and cokernels, and if every monomorphism and epimorphism is normal.

It should be noted that if we also assume coproducts, then preadditivity is actually a consequence of the other properties, as we show in non_preadditive_abelian.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 preadditive structure the specific category they are working with has natively.

## Main definitions

• abelian is the type class indicating that a category is abelian. It extends preadditive.
• abelian.image f is kernel (cokernel.π f), and
• abelian.coimage f is cokernel (kernel.ι f).

## Main results

• In an abelian category, mono + epi = iso.
• If f : X ⟶ Y, then the map factor_thru_image f : X ⟶ image f is an epimorphism, and the map factor_thru_coimage f : coimage f ⟶ Y is a monomorphism.
• Factoring through the image and coimage is a strong epi-mono factorisation. This means that
• every abelian category has images. We instantiated this in such a way that abelian.image f is definitionally equal to limits.image f, and
• there is a canonical isomorphism coimage_iso_image : coimage f ≅ image f such that coimage.π f ≫ (coimage_iso_image f).hom ≫ image.ι f = f. The lemma stating this is called full_image_factorisation.
• Every epimorphism is a cokernel of its kernel. Every monomorphism is a kernel of its cokernel.
• The pullback of an epimorphism is an epimorphism. The pushout of a monomorphism is a monomorphism. (This is not to be confused with the fact that the pullback of a monomorphism is a monomorphism, which is true in any category).

## Implementation notes

The typeclass abelian does not extend non_preadditive_abelian, to avoid having to deal with comparing the two has_zero_morphisms instances (one from preadditive in abelian, and the other a field of non_preadditive_abelian). As a consequence, at the beginning of this file we trivially build a non_preadditive_abelian instance from an abelian instance, and use this to restate a number of theorems, in each case just reusing the proof from non_preadditive_abelian.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:

• If the statement of a theorem involves limits, the existence of these limits should be made an explicit typeclass parameter.
• If a limit only appears in a proof, but not in the statement of a theorem, the limit should not be a typeclass parameter, but instead be created using abelian.has_pullbacks or a similar definition.

## References

• [F. Borceux, Handbook of Categorical Algebra 2][borceux-vol2]
• [P. Aluffi, Algebra: Chaper 0][aluffi2016]
@[class]
structure category_theory.abelian (C : Type u)  :
Type (max u v)
• has_finite_products :
• has_kernels :
• has_cokernels :
• normal_mono : Π {X Y : C} (f : X Y) [_inst_2 : ,
• normal_epi : Π {X Y : C} (f : X Y) [_inst_2 : ,

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

An abelian category has finite biproducts.

Every abelian category is, in particular, non_preadditive_abelian.

Equations
theorem category_theory.abelian.strong_epi_of_epi {C : Type u} {P Q : C} (f : P Q)  :

In an abelian category, every epimorphism is strong.

def category_theory.abelian.is_iso_of_mono_of_epi {C : Type u} {X Y : C} (f : X Y)  :

In an abelian category, a monomorphism which is also an epimorphism is an isomorphism.

Equations
theorem category_theory.abelian.mono_of_zero_kernel {C : Type u} {P Q : C} (f : P Q) (R : C) :

theorem category_theory.abelian.mono_of_kernel_ι_eq_zero {C : Type u} {P Q : C} (f : P Q) :

theorem category_theory.abelian.epi_of_zero_cokernel {C : Type u} {P Q : C} (f : P Q) (R : C) :

theorem category_theory.abelian.epi_of_cokernel_π_eq_zero {C : Type u} {P Q : C} (f : P Q) :

def category_theory.abelian.images.image {C : Type u} {P Q : C} :
(P Q) → C

The kernel of the cokernel of f is called the image of f.

def category_theory.abelian.images.image.ι {C : Type u} {P Q : C} (f : P Q) :

The inclusion of the image into the codomain.

def category_theory.abelian.images.factor_thru_image {C : Type u} {P Q : C} (f : P Q) :

There is a canonical epimorphism p : P ⟶ image f for every f.

@[simp]
theorem category_theory.abelian.images.image.fac_assoc {C : Type u} {P Q : C} (f : P Q) {X' : C} (f' : Q X') :

@[simp]
theorem category_theory.abelian.images.image.fac {C : Type u} {P Q : C} (f : P Q) :

f factors through its image via the canonical morphism p.

@[instance]
def category_theory.abelian.images.category_theory.epi {C : Type u} {P Q : C} (f : P Q) :

The map p : P ⟶ image f is an epimorphism

theorem category_theory.abelian.images.image_ι_comp_eq_zero {C : Type u} {P Q : C} {f : P Q} {R : C} {g : Q R} :
f g = 0

@[instance]
def category_theory.abelian.images.mono_factor_thru_image {C : Type u} {P Q : C} (f : P Q)  :

@[instance]
def category_theory.abelian.images.is_iso_factor_thru_image {C : Type u} {P Q : C} (f : P Q)  :

Equations
@[simp]

@[simp]

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

Equations
@[simp]

def category_theory.abelian.coimages.coimage {C : Type u} {P Q : C} :
(P Q) → C

The cokernel of the kernel of f is called the coimage of f.

def category_theory.abelian.coimages.coimage.π {C : Type u} {P Q : C} (f : P Q) :

The projection onto the coimage.

def category_theory.abelian.coimages.factor_thru_coimage {C : Type u} {P Q : C} (f : P Q) :

There is a canonical monomorphism i : coimage f ⟶ Q.

theorem category_theory.abelian.coimages.coimage.fac {C : Type u} {P Q : C} (f : P Q) :

f factors through its coimage via the canonical morphism p.

@[instance]
def category_theory.abelian.coimages.category_theory.mono {C : Type u} {P Q : C} (f : P Q) :

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

@[instance]
def category_theory.abelian.coimages.epi_factor_thru_coimage {C : Type u} {P Q : C} (f : P Q)  :

@[instance]
def category_theory.abelian.coimages.is_iso_factor_thru_coimage {C : Type u} {P Q : C} (f : P Q)  :

Equations
@[simp]

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

Equations
@[simp]

@[simp]

@[instance]

An abelian category has strong epi-mono factorisations.

def category_theory.abelian.coimage_iso_image {C : Type u} {X Y : C} (f : X Y) :

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

def category_theory.abelian.image_iso_image {C : Type u} {X Y : C} (f : X Y) :

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

def category_theory.abelian.coimage_iso_image' {C : Type u} {X Y : C} (f : X Y) :

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

theorem category_theory.abelian.full_image_factorisation {C : Type u} {X Y : C} (f : X Y) :

def category_theory.abelian.epi_is_cokernel_of_kernel {C : Type u} {X Y : C} {f : X Y} (s : 0) :

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
def category_theory.abelian.mono_is_kernel_of_cokernel {C : Type u} {X Y : C} {f : X Y} (s : 0) :

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
theorem category_theory.abelian.has_pullbacks {C : Type u}  :

Any abelian category has pullbacks

theorem category_theory.abelian.has_pushouts {C : Type u}  :

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 epimorpism.

def category_theory.abelian.pullback_to_biproduct_is_kernel.pullback_to_biproduct {C : Type u} {X Y Z : C} (f : X Z) (g : Y Z) :

The canonical map pullback f g ⟶ X ⊞ Y

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).

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

Equations
def category_theory.abelian.biproduct_to_pushout_is_cokernel.biproduct_to_pushout {C : Type u} {X Y Z : C} (f : X Y) (g : X Z) :
Y Z

The canonical map Y ⊞ Z ⟶ pushout f g

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

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

Equations
@[instance]
def category_theory.abelian.epi_pullback_of_epi_f {C : Type u} {X Y Z : C} (f : X Z) (g : Y Z)  :

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]
def category_theory.abelian.epi_pullback_of_epi_g {C : Type u} {X Y Z : C} (f : X Z) (g : Y Z)  :

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

@[instance]
def category_theory.abelian.mono_pushout_of_mono_f {C : Type u} {X Y Z : C} (f : X Y) (g : X Z)  :

@[instance]
def category_theory.abelian.mono_pushout_of_mono_g {C : Type u} {X Y Z : C} (f : X Y) (g : X Z)  :

Every non_preadditive_abelian category can be promoted to an abelian category.

Equations