# mathlibdocumentation

category_theory.abelian.pseudoelements

# Pseudoelements in abelian categories #

A pseudoelement of an object X in an abelian category C is an equivalence class of arrows ending in X, where two arrows are considered equivalent if we can find two epimorphisms with a common domain making a commutative square with the two arrows. While the construction shows that pseudoelements are actually subobjects of X rather than "elements", it is possible to chase these pseudoelements through commutative diagrams in an abelian category to prove exactness properties. This is done using some "diagram-chasing metatheorems" proved in this file. In many cases, a proof in the category of abelian groups can more or less directly be converted into a proof using pseudoelements.

A classic application of pseudoelements are diagram lemmas like the four lemma or the snake lemma.

Pseudoelements are in some ways weaker than actual elements in a concrete category. The most important limitation is that there is no extensionality principle: If f g : X ⟶ Y, then ∀ x ∈ X, f x = g x does not necessarily imply that f = g (however, if f = 0 or g = 0, it does). A corollary of this is that we can not define arrows in abelian categories by dictating their action on pseudoelements. Thus, a usual style of proofs in abelian categories is this: First, we construct some morphism using universal properties, and then we use diagram chasing of pseudoelements to verify that is has some desirable property such as exactness.

It should be noted that the Freyd-Mitchell embedding theorem gives a vastly stronger notion of pseudoelement (in particular one that gives extensionality). However, this theorem is quite difficult to prove and probably out of reach for a formal proof for the time being.

## Main results #

We define the type of pseudoelements of an object and, in particular, the zero pseudoelement.

We prove that every morphism maps the zero pseudoelement to the zero pseudoelement (apply_zero) and that a zero morphism maps every pseudoelement to the zero pseudoelement (zero_apply)

Here are the metatheorems we provide:

• A morphism f is zero if and only if it is the zero function on pseudoelements.
• A morphism f is an epimorphism if and only if it is surjective on pseudoelements.
• A morphism f is a monomorphism if and only if it is injective on pseudoelements if and only if ∀ a, f a = 0 → f = 0.
• A sequence f, g of morphisms is exact if and only if ∀ a, g (f a) = 0 and ∀ b, g b = 0 → ∃ a, f a = b.
• If f is a morphism and a, a' are such that f a = f a', then there is some pseudoelement a'' such that f a'' = 0 and for every g we have g a' = 0 → g a = g a''. We can think of a'' as a - a', but don't get too carried away by that: pseudoelements of an object do not form an abelian group.

## Notations #

We introduce coercions from an object of an abelian category to the set of its pseudoelements and from a morphism to the function it induces on pseudoelements.

These coercions must be explicitly enabled via local instances: local attribute [instance] object_to_sort hom_to_fun

## Implementation notes #

It appears that sometimes the coercion from morphisms to functions does not work, i.e., writing g a raises a "function expected" error. This error can be fixed by writing (g : X ⟶ Y) a.

## References #

def category_theory.abelian.app {C : Type u} {P Q : C} (f : P Q) (a : category_theory.over P) :

This is just composition of morphisms in C. Another way to express this would be (over.map f).obj a, but our definition has nicer definitional properties.

Equations
@[simp]
theorem category_theory.abelian.app_hom {C : Type u} {P Q : C} (f : P Q) (a : category_theory.over P) :
= a.hom f
def category_theory.abelian.pseudo_equal {C : Type u} (P : C) (f g : category_theory.over P) :
Prop

Two arrows f : X ⟶ P and g : Y ⟶ P are called pseudo-equal if there is some object R and epimorphisms p : R ⟶ X and q : R ⟶ Y such that p ≫ f = q ≫ g.

Equations
theorem category_theory.abelian.pseudo_equal_refl {C : Type u} {P : C} :
theorem category_theory.abelian.pseudo_equal_symm {C : Type u} {P : C} :
theorem category_theory.abelian.pseudo_equal_trans {C : Type u} {P : C} :

Pseudoequality is transitive: Just take the pullback. The pullback morphisms will be epimorphisms since in an abelian category, pullbacks of epimorphisms are epimorphisms.

def category_theory.abelian.pseudoelement.setoid {C : Type u} (P : C) :

The arrows with codomain P equipped with the equivalence relation of being pseudo-equal.

Equations
def category_theory.abelian.pseudoelement {C : Type u} (P : C) :
Type (max u v)

A pseudoelement of P is just an equivalence class of arrows ending in P by being pseudo-equal.

Equations

A coercion from an object of an abelian category to its pseudoelements.

Equations

A coercion from an arrow with codomain P to its associated pseudoelement.

Equations
theorem category_theory.abelian.pseudoelement.over_coe_def {C : Type u} {P Q : C} (a : Q P) :
theorem category_theory.abelian.pseudoelement.pseudo_apply_aux {C : Type u} {P Q : C} (f : P Q) (a b : category_theory.over P) :
a b

If two elements are pseudo-equal, then their composition with a morphism is, too.

def category_theory.abelian.pseudoelement.pseudo_apply {C : Type u} {P Q : C} (f : P Q) :
P → Q

A morphism f induces a function pseudo_apply f on pseudoelements.

Equations

A coercion from morphisms to functions on pseudoelements

Equations
theorem category_theory.abelian.pseudoelement.comp_apply {C : Type u} {P Q R : C} (f : P Q) (g : Q R) (a : P) :
(f g) a = g (f a)

Applying a pseudoelement to a composition of morphisms is the same as composing with each morphism. Sadly, this is not a definitional equality, but at least it is true.

theorem category_theory.abelian.pseudoelement.comp_comp {C : Type u} {P Q R : C} (f : P Q) (g : Q R) :
g f = (f g)

Composition of functions on pseudoelements is composition of morphisms.

In this section we prove that for every P there is an equivalence class that contains precisely all the zero morphisms ending in P and use this to define the zero pseudoelement.

theorem category_theory.abelian.pseudoelement.pseudo_zero_aux {C : Type u} {P : C} (Q : C) (f : category_theory.over P) :
f 0 f.hom = 0

The arrows pseudo-equal to a zero morphism are precisely the zero morphisms

The zero pseudoelement is the class of a zero morphism

Equations
@[instance]
Equations
@[instance]
Equations
@[simp]
theorem category_theory.abelian.pseudoelement.zero_eq_zero {C : Type u} {P Q : C} :

The pseudoelement induced by an arrow is zero precisely when that arrow is zero

@[simp]
theorem category_theory.abelian.pseudoelement.apply_zero {C : Type u} {P Q : C} (f : P Q) :
f 0 = 0

Morphisms map the zero pseudoelement to the zero pseudoelement

@[simp]
theorem category_theory.abelian.pseudoelement.zero_apply {C : Type u} {P : C} (Q : C) (a : P) :
0 a = 0

The zero morphism maps every pseudoelement to 0.

@[ext]
theorem category_theory.abelian.pseudoelement.zero_morphism_ext {C : Type u} {P Q : C} (f : P Q) :
(∀ (a : P), f a = 0)f = 0

An extensionality lemma for being the zero arrow.

@[ext]
theorem category_theory.abelian.pseudoelement.zero_morphism_ext' {C : Type u} {P Q : C} (f : P Q) :
(∀ (a : P), f a = 0)0 = f
theorem category_theory.abelian.pseudoelement.eq_zero_iff {C : Type u} {P Q : C} (f : P Q) :
f = 0 ∀ (a : P), f a = 0
theorem category_theory.abelian.pseudoelement.pseudo_injective_of_mono {C : Type u} {P Q : C} (f : P Q)  :

A monomorphism is injective on pseudoelements.

theorem category_theory.abelian.pseudoelement.zero_of_map_zero {C : Type u} {P Q : C} (f : P Q) :
∀ (a : P), f a = 0a = 0

A morphism that is injective on pseudoelements only maps the zero element to zero.

theorem category_theory.abelian.pseudoelement.mono_of_zero_of_map_zero {C : Type u} {P Q : C} (f : P Q) :
(∀ (a : P), f a = 0a = 0)

A morphism that only maps the zero pseudoelement to zero is a monomorphism.

theorem category_theory.abelian.pseudoelement.pseudo_surjective_of_epi {C : Type u} {P Q : C} (f : P Q)  :

An epimorphism is surjective on pseudoelements.

theorem category_theory.abelian.pseudoelement.epi_of_pseudo_surjective {C : Type u} {P Q : C} (f : P Q) :

A morphism that is surjective on pseudoelements is an epimorphism.

theorem category_theory.abelian.pseudoelement.pseudo_exact_of_exact {C : Type u} {P Q R : C} {f : P Q} {g : Q R}  :
(∀ (a : P), g (f a) = 0) ∀ (b : Q), g b = 0(∃ (a : P), f a = b)

Two morphisms in an exact sequence are exact on pseudoelements.

theorem category_theory.abelian.pseudoelement.apply_eq_zero_of_comp_eq_zero {C : Type u} {P Q R : C} (f : Q R) (a : P Q) :
a f = 0f a = 0
theorem category_theory.abelian.pseudoelement.exact_of_pseudo_exact {C : Type u} {P Q R : C} (f : P Q) (g : Q R) :
((∀ (a : P), g (f a) = 0) ∀ (b : Q), g b = 0(∃ (a : P), f a = b))

If two morphisms are exact on pseudoelements, they are exact.

theorem category_theory.abelian.pseudoelement.sub_of_eq_image {C : Type u} {P Q : C} (f : P Q) (x y : P) :
f x = f y(∃ (z : P), f z = 0 ∀ (R : C) (g : P R), g y = 0g z = g x)

If two pseudoelements x and y have the same image under some morphism f, then we can form their "difference" z. This pseudoelement has the properties that f z = 0 and for all morphisms g, if g y = 0 then g z = g x.

theorem category_theory.abelian.pseudoelement.pseudo_pullback {C : Type u} {P Q R : C} {f : P R} {g : Q R} {p : P} {q : Q} :
f p = g q(∃ (s : ,

If f : P ⟶ R and g : Q ⟶ R are morphisms and p : P and q : Q are pseudoelements such that f p = g q, then there is some s : pullback f g such that fst s = p and snd s = q.

Remark: Borceux claims that s is unique. I was unable to transform his proof sketch into a pen-and-paper proof of this fact, so naturally I was not able to formalize the proof.