Solution (source code)

= Solution

Take the <pullback in a category> of $d_Y$ along $(f,g)$, with maps $e:E\to X$ and $k:E\to Y$ satisfying $(f,g)e=d_Yk$. Applying the two product projections gives $fe=k=ge$, so $e$ equalizes $f,g$.

Given $h:Z\to X$ with $fh=gh$, put $v=fh$. Then $(f,g)h=(v,v)=d_Yv$. The pullback property gives a unique $u:Z\to E$ with $eu=h$ and $ku=v$. Any map satisfying $eu=h$ automatically has $ku=feu=fh=v$, so uniqueness is exactly the <equalizer> uniqueness. Hence \b[pulling back the diagonal constructs the <equalizer> of $f,g$].