The end formula for hom animae in functor categories has a relative colimit form. It expresses a diagram as a colimit of representable diagrams with coefficients and leads to a duality between colimit-preserving functors out of a presheaf category and functor-valued diagrams.

Recall that \(s\otimes x=\colim_s x\) for a small anima \(s\) and an object \(x\) of a category admitting small colimits. These tensors are functorial in both variables by the preceding construction. For \(j:I\) and \(X:C\), write \(j\otimes X\) for the diagram \[ i\mapsto\Hom_I(j,i)\otimes X. \] The hom-anima formula for tensors and the Yoneda lemma give \[ \Hom_{\Fun(I,C)}(j\otimes X,G)\simeq\Hom_C(X,G(j)). \] Indeed, natural transformations on the left correspond to natural transformations \(\Hom_I(j,-)\to\Hom_C(X,G(-))\); if necessary we form the latter in a larger universe.

Proposition 12.9.1. Let \(I\) be a small category and \(C\) a category with small colimits. For any functor \(F\colon I\to C\), the colimit of the functor \[ \Tw(I)\catop\to\Fun(I,C)\ , \quad (j,i)\mapsto j\otimes F(i) \] is \(F\) itself.

Proof

For any functor \(G\colon I\to C\), we have \[ \Hom(j\otimes X,G)=\Hom(X,G(j)) \] for any \(X\) in \(C\). The corollary is therefore a direct reformulation of Theorem 12.5.5.

Construction 12.9.2. Let \(A\) be a small category and \(B\) a category with small colimits. Using the tensors \(s\otimes x=\colim_s x\), we define the Yoneda functor of \(A\) with coefficients in \(B\) as the functor \[ h_{A/B}\colon A\times B\to\Fun(A\catop,B)\ , \quad (a,x)\mapsto a\otimes x:=\Hom_A(-,a)\otimes x\, . \] Given any functor of the form \(\Phi\colon \Fun(A\catop,B)\to C\) we get a functor \[ \Phi\circ \, h_{A/B}\colon A\times B\to C \] which in turn yields by transposition a functor \[ {^t\Phi}\colon B\to\Fun(A,C)\, . \] Given \(x : B\), the functor \(^t\Phi(x)\) assigns to each \(a : A\) the term \(\Phi(a\otimes x)\). In particular, we see that, if ever \(\Phi\) preserves small colimits, then so does \(^t\Phi\).

Theorem 12.9.3. Let \(A\) be a small category and \(B\) and \(C\) two categories with small colimits. The assignment \(\Phi\mapsto{^t\Phi}\) defines an equivalence \[ \Fun_!(\Fun(A\catop,B),C)\iso\Fun_!(B,\Fun(A,C))\, . \]

Proof

We observe that we have a canonical equivalence of the form \[ \Fun_!(\Fun(A\catop,B),\Fun([1],C))\simeq\Fun([1],\Fun_!(\Fun(A\catop,B),C))\, . \] Similarly, we have \[ \Fun_!(B,\Fun(A,\Fun([1],C)))\simeq\Fun([1],\Fun_!(B,\Fun(A,C)))\, . \] The argument below is uniform in the target category. In view of these identifications, Corollary 6.3.9 reduces the theorem to proving, for every target \(C\) with small colimits, that the assignment \(\Phi\mapsto{^t\Phi}\) induces an equivalence on groupoid cores of the form \[ \Fun_!(\Fun(A\catop,B),C)^\simeq\iso\Fun_!(B,\Fun(A,C))^\simeq\, . \] Indeed, applying this core-level statement with target \(\Fun([1],C)\) gives, under the preceding identifications, the equivalence on arrow animae required by the Fundamental Theorem. We first record the relative co-Yoneda formula. Applying Proposition 12.9.1 to \(F\colon A\catop\to B\), and using Remark 12.3.12, gives an identification \[ F = \colim_{(\alpha\colon a\to a'): \Tw(A)\catop}a\otimes F(a') \] in \(\Fun(A\catop,B)\).

Now let \(\Psi\colon B\to\Fun(A,C)\) preserve small colimits. For \(F\colon A\catop\to B\), define \[ \Psi'(F):=\colim_{(\alpha\colon a\to a'): \Tw(A)\catop} \Psi(F(a'))(a). \] This construction is functorial in both \(\Psi\) and \(F\). Moreover, \(\Psi'\) preserves small colimits: evaluation at \(a'\) preserves colimits in \(\Fun(A\catop,B)\), \(\Psi\) preserves them by assumption, evaluation at \(a\) preserves them in \(\Fun(A,C)\), and the final colimit over the small category \(\Tw(A)\catop\) commutes with small colimits.

We claim that \(\Psi\mapsto\Psi'\) is inverse to \(\Phi\mapsto{}^t\Phi\). If \(\Phi\colon\Fun(A\catop,B)\to C\) preserves small colimits and \(\Psi={}^t\Phi\), then the relative co-Yoneda formula gives \begin{align*} \Psi'(F) &\simeq\colim_{(\alpha\colon a\to a'): \Tw(A)\catop} \Phi(a\otimes F(a'))\\ &\simeq\Phi\left( \colim_{(\alpha\colon a\to a'): \Tw(A)\catop}a\otimes F(a') \right) \simeq\Phi(F), \end{align*} naturally in \(F\).

Conversely, let \(x\) be an object of \(B\) and \(a_0\) an object of \(A\). Since \(\Psi\) preserves tensors by small animae, we have \begin{align*} \Psi'(a_0\otimes x) &\simeq\colim_{(\alpha\colon a\to a'): \Tw(A)\catop} \Psi\bigl(\Hom_A(a',a_0)\otimes x\bigr)(a)\\ &\simeq\colim_{(\alpha\colon a\to a'): \Tw(A)\catop} \Hom_A(a',a_0)\otimes\Psi(x)(a)\\ &\simeq\Psi(x)(a_0). \end{align*} The final isomorphism is Proposition 12.9.1, evaluated at \(a_0\). It is natural in \(a_0\) and \(x\), and therefore \({}^t(\Psi')\simeq\Psi\).