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