= Solution
Use the <connected-component presheaf of a functor>. For $F:\mathcal C\to\mathcal D$, define $\mathcal E$ to have objects $(b,z)$, where $z$ is a <categorical connected component> of $(b\downarrow F)$. An arrow $(b,z)\to(b',z')$ is an arrow $u:b\to b'$ such that $u^*z'=z$, where precomposition induces $u^*:\pi_0(b'\downarrow F)\to\pi_0(b\downarrow F)$. Identity and composition follow from precomposition, so this is a <category>.
The projection $G:\mathcal E\to\mathcal D$ is a <discrete fibration>: the unique lift of $u:b\to b'$ with codomain $(b',z')$ has domain $(b,u^*z')$.
Define $J:\mathcal C\to\mathcal E$ by
$$
Ja=(Fa,[(a,1_{Fa})]),\qquad Jv=Fv.
$$
For $v:a\to a'$, the objects $(a,1_{Fa})$ and $(a',Fv)$ lie in the same component of $(Fa\downarrow F)$, proving this is well-defined. Clearly $GJ=F$.
For $(b,z)\in\mathcal E$, the objects and arrows of $((b,z)\downarrow J)$ are exactly the objects and arrows of the component $z$ of $(b\downarrow F)$. Indeed, an arrow $(b,z)\to Ja$ is $u:b\to Fa$ with $[(a,u)]=z$, and its commuting triangles are precisely those in the original comma category. This category is nonempty and connected. Hence $J$ is a <final functor>, proving the <final-discrete-fibration factorization>
$$
\boxed{\mathcal C\xrightarrow{J}\mathcal E\xrightarrow{G}\mathcal D.}
$$
Back to article page