I'd like to apologise in advance for the mixture of different notations.
This is Exercise I.8 of Mac Lane and Moerdijk's, "Sheaves in Geometry and Logic [. . .]". According to Approach0, this is new to MSE.
The Details:
From p. 17 ibid. . . .
Definition 1: Given two functors
$$F:\mathbf{X}\to \mathbf{A}\quad G: \mathbf{A}\to \mathbf{X},$$
we say that $G$ is right adjoint to $F$, written $F\dashv G$, when for any $X\in{\rm Ob}(\mathbf{X})$ and any $A\in{\rm Ob}(\mathbf{A})$, there is a natural bijection between morphisms
$$\frac{X\stackrel{f}{\to}G(A)}{F(X)\stackrel{h}{\to}A},$$
in the sense that each $f$, as displayed, uniquely determines $h$, and conversely.
From p. 19 ibid. . . .
Definition 2: Suppose products exist in $\mathbf{C}$. For a fixed $A\in{\rm Ob}(\mathbf{C})$, one may consider the functor
$$A\times -: \mathbf{C}\to \mathbf{C}.$$
If this functor had a right adjoint (unique up to isomorphism), this adjoint is denoted by
$$(-)^A:\mathbf{C}\to \mathbf{C}.$$
In this case $A$ is said to be an exponentiable object of $\mathbf{C}$.
The Question:
Consider a small category $\mathbf{C}$. For each object $B$ of $\mathbf{C}$ there is a functor $D_B: \mathbf{C} / B \to \mathbf{C}$ defined by taking the domain of each arrow to $B$. Hence, each $T: \mathbf{C}^{{\rm op}} \to\mathbf{Sets}$ yields $T_B = T \circ D^{{\rm op}}: (\mathbf{C} / B)^{{\rm op}} \to\mathbf{Sets}$. Define an exponential $T^S$ by
$$T^S(B)={\rm Hom}_{\widehat{(\mathbf{C}/B)}}(S_B, T_B),$$
with the evident evaluations${}^\dagger$ $e_B: T^S(B) \times S(B) \to T(B)$. Show that $T^S$ with this evaluation $e$ is indeed the exponential in the functor category $\hat{\mathbf{C}}=\mathbf{Sets}^{\mathbf{C}^{{\rm op}}}.$
Thoughts:
My experience with functor categories and exponents therein is best portrayed by $\S 9.3$(Exponentiation in $\mathbf{Set}^{\mathscr{C}}$) of Goldblatt's, "Topoi: [. . .]".
In Goldblatt's book, for $F:\mathscr{C}\to\mathbf{Set}$ (in his notation) and a $\mathscr{C}$-object $a$, it delineates the "forgetful functor" $F_a:\mathscr{C}\uparrow a \to \mathbf{Set}$ by $$(a\stackrel{f}{\to}b)\mapsto F(b)$$ and, for $g: a\to c$, $F_a$ sends an $h: f\to g$, where $h\circ f=g$, to $F(h)$. It then defines, for $F, G:\mathscr{C}\to \mathbf{Set}$, the exponent $G^F$ by
$$G^F(a)={\rm Nat}[F_a, G_a],$$ the collection of natural transformations from $F_a$ to $G_a$.
Now, this is not quite the same as in "Sheaves [. . .]"; neither is the evaluation arrow described in "Topoi: [. . .] (which I'll leave to you to look up in the link above). But they give me a rough idea of how to flesh out the exponential in question.
Nevertheless, I feel I am on unsure footing.
How do I translate from Goldblatt's book to Mac Lane & Moerdijk's to do Exercise I.8?
Please help :)
$\dagger$ I'm not sure what those evaluations are supposed to be.