Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2001/iii/paper-17/6/i/solution

For , let be its category of elements. Its objects are with ; an arrow is a morphism satisfying . This is a small category, because is small and all values of are sets.
Send to the representable presheaf , and send an arrow to postcomposition . There is a cocone to whose map at is
The functor laws give its naturality and the required cocone compatibility.
Compute the colimit pointwise as a disjoint union modulo its diagram identifications. At a representative is a triple , and it maps to . Every is the image of . Moreover is an arrow in , so its diagram relation identifies
Thus every representative is identified with the canonical representative of its image. Two representatives have equal images exactly when their canonical representatives agree. This proves a componentwise bijection; restriction maps respect it. The resulting natural isomorphism is the canonical colimit presentation of a presheaf:

New to topics? Read the docs here!