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 #

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

An abelian category has finite biproducts.

@[protected, instance]
@[protected, instance]
noncomputable def category_theory.abelian.has_zero_object {C : Type u}  :
Equations
noncomputable def category_theory.abelian.non_preadditive_abelian {C : Type u}  :

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.

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

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) (h : = 0) :
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)  :
@[protected]
noncomputable def category_theory.abelian.images.image {C : Type u} {P Q : C} (f : P Q) :
C

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

@[protected]
noncomputable def category_theory.abelian.images.image.ι {C : Type u} {P Q : C} (f : P Q) :

The inclusion of the image into the codomain.

@[protected]
noncomputable 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') :
@[protected, 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.

@[protected, instance]

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} (h : f g = 0) :
@[protected, instance]
def category_theory.abelian.images.mono_factor_thru_image {C : Type u} {P Q : C} (f : P Q)  :
@[protected, instance]
def category_theory.abelian.images.is_iso_factor_thru_image {C : Type u} {P Q : C} (f : P Q)  :
@[simp]
@[simp]
noncomputable def category_theory.abelian.images.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]
@[protected]
noncomputable def category_theory.abelian.coimages.coimage {C : Type u} {P Q : C} (f : P Q) :
C

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

@[protected]
noncomputable def category_theory.abelian.coimages.coimage.π {C : Type u} {P Q : C} (f : P Q) :

The projection onto the coimage.

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

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

@[protected, instance]

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

theorem category_theory.abelian.coimages.comp_coimage_π_eq_zero {C : Type u} {P Q : C} {f : P Q} {R : C} {g : Q R} (h : f g = 0) :
@[protected, instance]
def category_theory.abelian.coimages.epi_factor_thru_coimage {C : Type u} {P Q : C} (f : P Q)  :
@[protected, instance]
def category_theory.abelian.coimages.is_iso_factor_thru_coimage {C : Type u} {P Q : C} (f : P Q)  :
@[simp]
noncomputable def category_theory.abelian.coimages.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
@[simp]
@[simp]
@[protected, instance]

An abelian category has strong epi-mono factorisations.

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

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.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) :
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
@[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.

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

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

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