TITLE: An exact sequence of homology in abelian categories
QUESTION [3 upvotes]: $\renewcommand{\im}{\mathop{\rm im}}\DeclareMathOperator{\coker}{coker}$Let $A\xrightarrow{f}B\xrightarrow{g}C$ be a complex in an abelian category, I.e. $gf=0$.
Let $H:=\coker(\im(f)\to \ker(g)).$
Then $H\xrightarrow{i}\coker(f)\xrightarrow{p}\im(g)$ is exact.
Could you give me a proof of it?
I can say that $i$ is a monomorphism and $p$ is epi.
I know that $\im(f)=\ker(\coker(f))=\coker(\ker(f))$ and that $\im(f)\to \ker(g)$ is monomorphic.
But I want $\im(i)=\ker(p).$ I cannot prove even that $pi=0.$

REPLY [2 votes]: Let us denote the objects by capital and corresponding arrows by small letters: ${\rm coim} f:A\to {\rm Coim} f$. Sorry, I write from left to right.
First of all, as in any Abelian category, $f={\rm coim} f\cdot {\rm im}f$, so 
$$fg=0 \iff {\rm coim}f\, {\rm im}f\cdot{\rm coim}g\,{\rm im}g=0 \iff {\rm im}f\cdot {\rm coim g}=0,$$
as ${\rm coim} f$ is epi and ${\rm im}g$ is mono, moreover, we also have ${\rm ker}g={\rm ker}({\rm coim}g)$ and ${\rm coker}f={\rm coker}({\rm im}f)$.
Hence wlog. we can assume that $f$ is mono ($f={\rm im}f$) and $g$ is epi ($g={\rm coim} g$), and this way $A={\rm Im}f$ and $C={\rm Coim}g$ is also assumed.
We can then draw a (bit simplified) diagram with
$$ A\underbrace{\overset{j}\to {\rm Ker}g \to B}_f \overbrace{\to{\rm Coker}f \underset{p}\to C}^g$$
where $H={\rm Coker}j$. As $j\cdot{\rm ker}g\cdot{\rm coker}f=f\cdot{\rm coker}f=0$, we get the $i:H\to{\rm Coker}f$. Now 
$${\rm coker}j\cdot i\, p= {\rm ker}g\cdot {\rm coker}f\cdot p= {\rm ker}g\cdot g=0$$
hence, $ip=0$, because ${\rm coker}j$ is epi.
For the exactness, it is enough to prove that $p={\rm coker}i$. For this: if $iv=0$ for any arrow $v$, we have
$0={\rm coker} j\cdot iv={\rm ker} g\cdot{\rm coker}f\cdot v$. But, as $g$ is epi, $g={\rm coim}g={\rm coker}({\rm ker}g)$, this goes through $g$: we get a $t$ such that $gt={\rm coker}f\cdot v$. Then, using that ${\rm coker}f$ is epi, we arrive to $pt=v$.
{"set_name": "stack_exchange", "score": 3, "question_id": 222048}