# 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 "native" preadditive structure for the specific category they are working with.

## 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 provide the isomorphism image_iso_image : abelian.image f ≅ limits.image f.
• the canonical morphism coimage_image_comparison : coimage f ⟶ image f is an isomorphism.
• We provide the alternate characterisation of an abelian category as a category with (co)kernels and finite products, and in which the canonical coimage-image comparison morphism is always an isomorphism.
• 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 #

@[class]
structure category_theory.abelian (C : Type u)  :
Type (max u v)
• to_normal_mono_category :
• to_normal_epi_category :
• has_finite_products :
• has_kernels :
• has_cokernels :

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 of this typeclass
Instances of other typeclasses for category_theory.abelian
• category_theory.abelian.has_sizeof_inst

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.

@[simp]
@[simp]
@[simp]

The factorisation of a morphism through its abelian image.

Equations

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

Equations
@[protected, instance]
@[protected, instance]

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.

Equations

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

Equations
noncomputable def category_theory.abelian.of_coimage_image_comparison_is_iso {C : Type u} [∀ {X Y : C} (f : X Y), ]  :

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 Stacks project uses this characterisation at the definition of an abelian category. See https://stacks.math.columbia.edu/tag/0109.

Equations
@[protected, instance]

An abelian category has finite biproducts.

@[protected, instance]
@[protected, instance]

Every abelian category is, in particular, non_preadditive_abelian.

Equations

We now promote some instances that were constructed using non_preadditive_abelian.

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

The map p : P ⟶ image f is an epimorphism

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

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

@[protected, instance]
def category_theory.abelian.is_iso_factor_thru_coimage {C : Type u} {P Q : C} (f : P Q)  :
theorem category_theory.abelian.mono_of_kernel_ι_eq_zero {C : Type u} {P Q : C} (f : P Q) (h : = 0) :
theorem category_theory.abelian.epi_of_cokernel_π_eq_zero {C : Type u} {P Q : C} (f : P Q)  :
theorem category_theory.abelian.image_ι_comp_eq_zero {C : Type u} {P Q : C} {f : P Q} {R : C} {g : Q R} (h : f g = 0) :
theorem category_theory.abelian.comp_coimage_π_eq_zero {C : Type u} {P Q : C} {f : P Q} {R : C} {g : Q R} (h : f g = 0) :
@[simp]
@[simp]
noncomputable def category_theory.abelian.image_strong_epi_mono_factorisation {C : Type u} {P Q : C} (f : P Q) :

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

Equations
@[simp]
@[simp]
@[simp]
@[simp]
noncomputable def category_theory.abelian.coimage_strong_epi_mono_factorisation {C : Type u} {P Q : C} (f : P Q) :

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

Equations
@[protected, instance]

An abelian category has strong epi-mono factorisations.

@[protected, instance]

The coimage-image comparison morphism is always an isomorphism in an abelian category. See category_theory.abelian.of_coimage_image_comparison_is_iso for the converse.

@[reducible]
noncomputable 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 abelian image of a morphism.

@[reducible]
noncomputable 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.

@[reducible]
noncomputable 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.

noncomputable 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
noncomputable 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
noncomputable def category_theory.abelian.epi_desc {C : Type u} {X Y : C} (f : X Y) {T : C} (g : X T) (hg : = 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
@[simp]
theorem category_theory.abelian.comp_epi_desc_assoc {C : Type u} {X Y : C} (f : X Y) {T : C} (g : X T) (hg : = 0) {X' : C} (f' : T X') :
f f' = g f'
@[simp]
theorem category_theory.abelian.comp_epi_desc {C : Type u} {X Y : C} (f : X Y) {T : C} (g : X T) (hg : = 0) :
= g
noncomputable def category_theory.abelian.mono_lift {C : Type u} {X Y : C} (f : X Y) {T : C} (g : T Y) (hg : = 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
@[simp]
theorem category_theory.abelian.mono_lift_comp_assoc {C : Type u} {X Y : C} (f : X Y) {T : C} (g : T Y) (hg : = 0) {X' : C} (f' : Y X') :
f f' = g f'
@[simp]
theorem category_theory.abelian.mono_lift_comp {C : Type u} {X Y : C} (f : X Y) {T : C} (g : T Y) (hg : = 0) :
= g
@[protected, instance]
@[protected, instance]

Any abelian category has pullbacks

@[protected, instance]
@[protected, instance]

Any abelian category has pushouts

@[protected, instance]
@[protected, instance]

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.

@[reducible]
noncomputable 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

@[reducible]
noncomputable def category_theory.abelian.pullback_to_biproduct_is_kernel.pullback_to_biproduct_fork {C : Type u} {X Y Z : C} (f : X Z) (g : Y Z) :

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

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

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

Equations
@[reducible]
noncomputable 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

@[reducible]
noncomputable def category_theory.abelian.biproduct_to_pushout_is_cokernel.biproduct_to_pushout_cofork {C : Type u} {X Y Z : C} (f : X Y) (g : X Z) :

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

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

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

Equations
@[protected, 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]

@[protected, 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.

theorem category_theory.abelian.epi_snd_of_is_limit {C : Type u} {X Y Z : C} (f : X Z) (g : Y Z)  :
theorem category_theory.abelian.epi_fst_of_is_limit {C : Type u} {X Y Z : C} (f : X Z) (g : Y Z)  :
theorem category_theory.abelian.epi_fst_of_factor_thru_epi_mono_factorization {C : Type u} {W X Y Z : C} (f : X Z) (g : Y Z) (g₁ : Y W) (g₂ : W Z) (hg : g₁ g₂ = g) (f' : X W) (hf : f' g₂ = f)  :

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.

@[protected, instance]
def category_theory.abelian.mono_pushout_of_mono_f {C : Type u} {X Y Z : C} (f : X Y) (g : X Z)  :
@[protected, instance]
def category_theory.abelian.mono_pushout_of_mono_g {C : Type u} {X Y Z : C} (f : X Y) (g : X Z)  :
theorem category_theory.abelian.mono_inr_of_is_colimit {C : Type u} {X Y Z : C} (f : X Y) (g : X Z)  :
theorem category_theory.abelian.mono_inl_of_is_colimit {C : Type u} {X Y Z : C} (f : X Y) (g : X Z)  :
theorem category_theory.abelian.mono_inl_of_factor_thru_epi_mono_factorization {C : Type u} {W X Y Z : C} (f : X Y) (g : X Z) (g₁ : X W) (g₂ : W Z) (hg : g₁ g₂ = g) (f' : W Y) (hf : g₁ f' = f)  :

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.

noncomputable def category_theory.non_preadditive_abelian.abelian (C : Type u)  :

Every non_preadditive_abelian category can be promoted to an abelian category.

Equations