Solution (source code)

= Solution

Let $a:X\to Y$ be a <natural transformation> of <categorical presheaves>. If every $a_C:X(C)\to Y(C)$ is a <surjective function>, and $r,s:Y\rightrightarrows Z$ satisfy $ra=sa$, then $r_Ca_C=s_Ca_C$ at every $C$. Surjectivity gives $r_C=s_C$ for all $C$, hence $r=s$. Thus $a$ is an <epimorphism>.

Conversely suppose $y\in Y(C)$ is outside the image of some $a_C$. Construct the <pushout witness for failure of pointwise surjectivity> explicitly: at each $D$ take
$$
P(D)=\bigl(Y(D)\times\{0,1\}\bigr)/\sim,
\qquad (a_D(x),0)\sim(a_D(x),1).
$$
Restrictions send $[(z,k)]$ to $[(Y(f)z,k)]$; <naturality> of $a$ ensures that every generating identification is respected. Thus $P$ is a <categorical presheaf>, and the two inclusions $j_0,j_1:Y\to P$ are <natural transformations> with $j_0a=j_1a$.

All identifications concern the same element $z$ in its two copies, so an element outside the image is never identified with its other copy. Consequently $j_{0,C}(y)\ne j_{1,C}(y)$, proving $a$ is not an <epimorphism>. Therefore
$$
\boxed{a\text{ is epic}\quad\Longleftrightarrow\quad
\text{every }a_C\text{ is surjective}.}
$$
This is the <pointwise epimorphism in a functor category> criterion. It requires neither a componentwise choice of preimages nor a natural section.