Let $A$ and $B$ be sets and let $f,g\colon A\rightrightarrows B$ be functions.
The coequaliser of $f$ and $g$ is the pair $\webleft (\text{CoEq}\webleft (f,g\webright ),\text{coeq}\webleft (f,g\webright )\webright )$ consisting of:
-
The Colimit. The set $\text{CoEq}\webleft (f,g\webright )$ defined by
\[ \text{CoEq}\webleft (f,g\webright )\mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}B/\mathord {\sim }, \]
where $\mathord {\sim }$ is the equivalence relation on $B$ generated by $f\webleft (a\webright )\sim g\webleft (a\webright )$.
-
The Cocone. The map
\[ \text{coeq}\webleft (f,g\webright )\colon B\to \text{CoEq}\webleft (f,g\webright ) \]
given by the quotient map $\pi \colon B\twoheadrightarrow B/\mathord {\sim }$ with respect to the equivalence relation generated by $f\webleft (a\webright )\sim g\webleft (a\webright )$.
We claim that $\text{CoEq}\webleft (f,g\webright )$ is the categorical coequaliser of $f$ and $g$ in $\mathsf{Sets}$. First we need to check that the relevant coequaliser diagram commutes, i.e. that we have
\[ \text{coeq}\webleft (f,g\webright )\circ f=\text{coeq}\webleft (f,g\webright )\circ g. \]
Indeed, we have
\begin{align*} \webleft [\text{coeq}\webleft (f,g\webright )\circ f\webright ]\webleft (a\webright ) & \mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}\webleft [\text{coeq}\webleft (f,g\webright )\webright ]\webleft (f\webleft (a\webright )\webright )\\ & \mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}\webleft [f\webleft (a\webright )\webright ]\\ & = \webleft [g\webleft (a\webright )\webright ]\\ & \mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}\webleft [\text{coeq}\webleft (f,g\webright )\webright ]\webleft (g\webleft (a\webright )\webright )\\ & \mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}\webleft [\text{coeq}\webleft (f,g\webright )\circ g\webright ]\webleft (a\webright )\end{align*}
for each $a\in A$. Next, we prove that $\text{CoEq}\webleft (f,g\webright )$ satisfies the universal property of the coequaliser. Suppose we have a diagram of the form
in $\mathsf{Sets}$. Then, since $c\webleft (f\webleft (a\webright )\webright )=c\webleft (g\webleft (a\webright )\webright )$ for each $a\in A$, it follows from , and of that there exists a unique map $\text{CoEq}\webleft (f,g\webright )\overset {\exists !}{\to }C$ making the diagram
commute.