In a category with a zero object ($0$ = initial and terminal) and zero morphisms are unique $A \to 0 \to B$ for every $A,B$, define the kernel of a map as the equalizer of $(f,0)$ and cokernel dually.
I try to prove that if $f = \ker(g)$ then $f = \ker(\operatorname{coker}(f))$. So set $c = \operatorname{coker}(f)$. We have the diagrams
$$A \xrightarrow{f} B \xrightarrow{g} C$$ $$A' \xrightarrow{\ker c} B \xrightarrow{c} C'$$
- $f$ equalizes $(g,0)$: $g f = 0$
- $c$ coequalizes $(f,0)$: $c f = 0$
- $\ker c$ equalizes $(c,0)$: $c \ker(c) = 0$
By (2) and $0 = 0 f$ we get that $f$ claims to equalize $(c,0)$ so there exists a universal map $u : A \to A'$ such that $\ker(c) u = f$, therefore $f$ equalizes $(c,0)$ and by uniqueness of equalizers $f = \ker(c)$.
But I don't know if this is right, am I making some mistakes and can anyone show me a simple proof instead? Thank you