# Commutative Algebra/Diagram chasing within Abelian categories
## Exact sequences of Abelian groups

Definition 4.1 (sequence):
Given $n$ Abelian groups $A_{1},A_{2},\ldots ,A_{n}$ and $n-1$ morphisms (that is, since we are in the category of Abelian groups, group homomorphisms)
    $\varphi _{j}:A_{j}\to A_{j+1}$,
we may define the whole of those to be a sequence of Abelian groups, and denote it by
    $A_{1}{\overset {\varphi _{1}}{\longrightarrow }}A_{2}{\overset {\varphi _{2}}{\longrightarrow }}\cdots {\overset {\varphi _{n-2}}{\longrightarrow }}A_{n-1}{\overset {\varphi _{n-1}}{\longrightarrow }}A_{n}$.
Note that if one of the objects is the trivial group, we denote it by $0$ and simply leave out the caption of the arrows going to it and emitting from it, since the trivial group is the zero object in the category of Abelian groups.
There are also infinite exact sequences, indicated by a notation of the form
    $A_{1}{\overset {\varphi _{1}}{\longrightarrow }}A_{2}{\overset {\varphi _{2}}{\longrightarrow }}\cdots {\overset {\varphi _{n-2}}{\longrightarrow }}A_{n-1}{\overset {\varphi _{n-1}}{\longrightarrow }}A_{n}{\overset {\varphi _{n}}{\longrightarrow }}\cdots$;
it just goes on and on and on. The exact sequence to be infinite means, that we have a sequence (in the classical sense) of objects and another classical sequence of morphisms between these objects (here, the two have same cardinality: Countably infinite).
Definition 4.2 (exact sequence):
A given sequence
    $A_{1}{\overset {\varphi _{1}}{\longrightarrow }}A_{2}{\overset {\varphi _{2}}{\longrightarrow }}\cdots {\overset {\varphi _{n-2}}{\longrightarrow }}A_{n-1}{\overset {\varphi _{n-1}}{\longrightarrow }}A_{n}$
is called exact iff for all $i$,
    $\operatorname {im} \varphi _{i}=\ker \varphi _{i+1}$.
There is a fundamental example to this notion.
Example 4.3 (short exact sequence):
A short exact sequence is simply an exact sequence of the form
    $0\longrightarrow A{\overset {f}{\longrightarrow }}B{\overset {g}{\longrightarrow }}C\longrightarrow 0$
for suitable Abelian groups $A,B,C$ and group homomorphisms $f:A\to B,g:B\to C$.
The exactness of this sequence means, considering the form of the image and kernel of the zero morphism:
* $f$ injective
* $\ker g=\operatorname {im} f$
* $g$ surjective.
Example 4.4:
Set $A:=\mathbb {Z} /3\mathbb {Z}$, $B:=\mathbb {Z} /15\mathbb {Z}$, $C:=\mathbb {Z} /5\mathbb {Z}$, where we only consider the additive group structure, and define the group homomorphisms
    $f:A\to B,f(n+3\mathbb {Z} ):=5n+15\mathbb {Z}$ and $g:B\to C,g(n+15\mathbb {Z} ):=n+5\mathbb {Z}$.
This gives a short exact sequence
    $0\longrightarrow A{\overset {f}{\longrightarrow }}B{\overset {g}{\longrightarrow }}C\longrightarrow 0$,
as can be easily checked.
A similar construction can be done for any factorisation of natural numbers $k=m\cdot j$ (in our example, $k=15$, $m=3$, $j=5$).

## Diagram chase: The short five lemma

We now should like to briefly exemplify a supremely important method of proof called diagram chase in the case of Abelian groups. We shall later like to generalize this method, and we will see that the classical diagram lemmas hold in huge generality (that includes our example below), namely in the generality of Abelian categories (to be introduced below).
Theorem 4.5 (the short five lemma):
Assume we have a commutative diagram
where the two rows are exact. If $g$ and $h$ are isomorphisms, then so must be $f$.
Proof:
We first prove that $f$ is injective. Let $f(b)=0$ for a $b\in B$. Since the given diagram is commutative, we have $0=t(f(b))=h(q(b))$ and since $h$ is an isomorphism, $q(b)=0$. Since the top row is exact, it follows that $b\in \operatorname {im} p$, that is, $b=p(a)$ for a suitable $a\in A$. Hence, the commutativity of the given diagram implies $0=f(b)=f(q(a))=s(g(a))$, and hence $a=0$ since $s\circ g$ is injective as the composition of two injective maps. Therefore, $b=q(a)=q(0)=0$.
Next, we prove that $f$ is surjective. Let thus $b'\in B'$ be given. Set $c':=t(b')$. Since $h\circ q$ is surjective as the composition of two surjective maps, there exists $b\in B$ such that $h(q(b))=c'$. The commutativity of the given diagram yields $t(f(b))=c'$. Thus, $t(f(b)-b')=0$ by linearity, whence $f(b)-b'\in \ker t=\operatorname {im} s$, and since $g$ is an isomorphism, we find $a\in A$ such that $s(g(a))=f(b)-b'$. The commutativity of the diagram yields $f(b)-b'=s(g(a))=f(p(a))$, and hence $f(b-p(a))=b'$.$\Box$

## Additive categories

Definition 4.6:
An additive category is a category ${\mathcal {C}}$ such that the following holds:
* $\operatorname {Hom} (a,b)$ is an Abelian group for all objects $a,b$ of ${\mathcal {C}}$.
* The composition of arrows
          $\circ :\operatorname {Hom} (b,c)\times \operatorname {Hom} (a,b)\to \operatorname {Hom} (a,c)$
       is bilinear; that is, for $f,f'\in \operatorname {Hom} (b,c)$ and $g,g'\in \operatorname {Hom} (b,c)$, we have
          $(f+f')\circ (g+g')=f\circ g+f'\circ g+f\circ g'+f'\circ g'$
       (note that, since no scalar multiplication is involved, this definition of bilinearity is less rich than bilinearity in vector spaces).
* ${\mathcal {C}}$ has a zero object.
* Each pair of objects $a,b$ of ${\mathcal {C}}$ has a biproduct $a\oplus b$.
Although additive categories are important in their own right, we shall only treat them as in-between step to the definition of Abelian categories.

## Abelian categories

Definition 4.7:
An Abelian category is an additive category ${\mathcal {C}}$ such that furthermore:
* Every arrow of ${\mathcal {C}}$ has a kernel and a cokernel, and
* every monic arrow of ${\mathcal {C}}$ is the kernel of some arrow, and every epic arrow of ${\mathcal {C}}$ is the cokernel of some arrow.
We now embark to obtain a canonical factorisation of arrows within Abelian categories.
Lemma 4.8:
Let ${\mathcal {C}}$ be a category with a zero object and kernels and cokernels for all arrows. Then every arrow $f$ of ${\mathcal {C}}$ admits a factorisation
    $f=kq$,
where $k=\ker(\operatorname {coker} f))$.
Proof:
The factorisation comes from the following commutative diagram, where we call $u:=\operatorname {coker} f$ and $k:=\ker(\operatorname {coker} f)$:
Indeed, by the property of $k$ as a kernel and since $u\circ f=0$, $f$ factors uniquely through $k$.$\Box$
In Abelian categories, $q$ is even a monomorphism:
Lemma 4.9:
Let ${\mathcal {C}}$ be an Abelian category. If $k=\ker(\operatorname {coker} f)$ and we have any factorisation $f=kq$, then $q$ is an epimorphism.
Proof:
Theorem 4.10:
Let ${\mathcal {C}}$ be an Abelian category. Then every arrow $f$ of ${\mathcal {C}}$ has a factorisation
    $f=me$,
where $m=\ker(\operatorname {coker} f)$ and $e=\operatorname {coker} (\ker f)$.

## Exact sequences in Abelian categories

We begin by defining the image of a morphism in a general context.
Definition 4.12:
Let $f$ be a morphism of a (this time arbitrary) category ${\mathcal {C}}$. If it exists, a kernel of a cokernel of $f$ is called image of $f$.
Construction 4.13:
We shall now construct an equivalence relation on the set $P_{c}$ of all morphisms whose codomain is a certain $c\in {\mathcal {C}}$, where ${\mathcal {C}}$ is a category. We set
    $f\leq g:\Leftrightarrow f=gf'$ for a suitable $f'$ (that is, $f$ factors through $g$).
This relation is transitive and reflexive. Hence, if we define
    $f\sim g:\Leftrightarrow f\leq g\wedge g\leq f$,
we have an equivalence relation (in fact, in this way we can always construct an equivalence relation from a transitive and reflexive binary relation, that is, a preorder).
With the image at hand, we may proceed to the definition of sequences, exact sequences and short exact sequences in a general context.
Definition 4.14:
Let ${\mathcal {C}}$ be an Abelian category.
Definition 4.15:
Let ${\mathcal {C}}$ be an Abelian category.
Definition 4.16:
Let ${\mathcal {C}}$ be an Abelian category.

## Diagram chase within Abelian categories

Now comes the clincher we have been working towards. In the ordinary diagram chase, we used elements of sets. We will now replace those elements by arrows in a simple way: Instead of looking at "elements" "$x\in a$" of some object $a$ of an abelian category ${\mathcal {C}}$, we look at arrows towards that element; that is, arrows $x:d\to a$ for arbitrary objects $d$ of ${\mathcal {C}}$. For "the codomain of an arrow $x$ is $a$", we write
    $x\in _{m}a$,
where the subscript $m$ stands for "member".
We have now replaced the notion of elements of a set by the notion of members in category theory. We also need to replace the notion of equality of two elements. We don't want equality of two arrows, since then we would not obtain the usual rules for chasing diagrams. Instead, we define yet another equivalence relation on arrows with codomain $a$ (that is, on members of $a$). The following lemma will help to that end.
Lemma 4.18 (square completion):
Construction 4.19 (second equivalence relation):
Now we are finally able to prove the proposition that will enable us doing diagram chases using the techniques we apply also to diagram chases for Abelian groups (or modules, or any other Abelian category).
Theorem 4.20 (diagram chase enabling theorem):
Let ${\mathcal {C}}$ be an Abelian category and $a$ an object of ${\mathcal {C}}$. We have the following rules concerning properties of a morphism:
* $f:a\to b$ is monic iff $\forall x\in _{m}a:fx\equiv 0\Rightarrow x\equiv 0$.
* $f:a\to b$ is monic iff $\forall x,x'\in _{m}a:fx\equiv fx'$.
* $f:a\to b$ is epic iff $\forall y\in _{m}b:\exists x\in _{m}a:fx\equiv y$.
* $f:a\to b$ is the zero arrow iff $\forall x\in _{m}a:fx\equiv 0$.
* A sequence $a{\overset {f}{\longrightarrow }}b{\overset {g}{\longrightarrow }}c$ is exact iff
** $gf=0$ and
** for each $y\in _{m}b$ with $gy\equiv 0$, there exists $x\in _{m}a$ such that $fx\equiv y$.
* If $f:a\to b$ is a morphism such that $fx\equiv fy$, there exists a member of $a$, which we shall call $(x-y)$ (the brackets indicate that this is one morphism), such that:
** $f(x-y)\equiv 0$
** $gx\equiv 0\Rightarrow g(x-y)\equiv -gy$
** $hy\equiv 0\Rightarrow h(x-y)\equiv hx$
We have thus constructed a relatively elaborate machinery in order to elevate our proof technique of diagram chase (which is quite abundant) to the very abstract level of Abelian categories.

## Examples of diagram lemmas

Theorem 4.21 (the long five lemma):
Theorem 4.22 (the snake lemma):