showing regular epimorphisms are not stable under composition in general The following counterexample is given in response to this question Is composition of regular epimorphisms always regular?:
"Let $\mathbf{2} =\textbf{{0→1}}$ be the category with two objects and one non-identity morphism between them, and let $F:\textbf{2}→\mathbb{N}$ be the functor sending this morphism to 1, where $\mathbb{N}$ is the additive monoid of natural numbers, viewed as 1-object category.
Let $G:\mathbb{N}→\mathbb{Z}$ be the inclusion of additive monoids, viewed as functor between the associated 1-object categories, and let $H:\mathbb{Z}→\mathbb{Z}/2\mathbb{Z}$ be the quotient map, again viewed as functor between 1-object categories.
Then $F$ and $H\circ G$ are regular epis in Cat, but $H\circ G\circ F$ is not."
I do not understand any of these conclusions. Why are $F$ and $H \circ G$ regular epimorphisms, and why is $H \circ G 
\circ F$ not a regular epimorphism? I thought $F$ might coequalize a pair of constant functors $K, J: \mathcal{C} \to \textbf{2}$ with $K(C) = 0$ and $J(C) = 1$ since both these objects must be sent by $F$ to the only object $*$ in $\mathbb{N}$.
 A: All the categories involved have universal properties. $\mathbf2$ is the free category with a morphism, $\mathbb N$ is the free category with an endomorphism, and $\mathbb Z/2$ is the free category with an idempotent.
$\mathbf2\to\mathbb N$ identifies with one another the two objects of $\mathbf2$, i.e. it coequalizes the two functors $\mathbf 1\to\mathbf2$. It is a coequalizer because any other functor coequalizing those two functors has to identify those two objects, and so has to specify an endomorphism, so factors uniquely out of $\mathbb N$. Thus, $\mathbf2\to\mathbb N$ is a coequalizer.
Similarly, $\mathbb N\to\mathbb Z/2$ identifies with one another the generating endomorphism of $\mathbb N$ and its square, so coequalizes two functors $\mathbf2\to\mathbb N$. Any functor coequalizing those two has to identify the generating endomorphism and its square, so has to specify an idempotent, so factors uniquely out of $\mathbb Z/2$. Thus, $\mathbb N\to\mathbb Z/2$ is a coequalizer.
To see that the composite $\mathbf2\to\mathbb Z/2$ is not a coequalizer, we can use the basic fact about regular epimorphisms that a regular epimorphism $f$ is the coequalizer of its kernel pair $p_i$ for $i=1,2$, if the latter exists. This is because by definition of the kernel pair, $fg_1=fg_2$ implies there exists unique $g$ such that $g_i=p_ig$, whence $h$ such that $hp_i$ are the same is an $h$ such that $hp_ig=hg_i$ are the same. In particular, if $f$ is the coequalizer of $g_i$, then $h$ factors uniquely through $f$.
The kernel pair of $\mathbf2\to\mathbb Z/2$ is the subcategory of $\mathbf2\times\mathbf2$ (of a commutative square) consisting of the four identity morphisms and the diagonal morphism, equipped with the two functors to $\mathbf2$ collapsing the square horizontally or vertically. For a functor to coequalize both of these, it would have to map the four objects to a single objects, i.e. giving an endomorphism. Since $\mathbb N$ is the free category with an endomorphism, we see that the coequalizer of the kernel pair of $\mathbf2\to\mathbb Z/2$ is $\mathbf2\to\mathbb N$, not $\mathbf2\to\mathbb Z/2$.
In fact, what's happening is that the kernel pairs of $\mathbf 2\to\mathbb N$ and $\mathbf 2\to\mathbb Z/2$ are the same.
