Using the Yoneda Lemma to construct a left adjoint to the restriction functor $U : C^A \to C^{\operatorname{ob} A}$

category-theorymonads

I am working through the following exercise of Emily Riehl's Category Theory in Context,

Exercise 5.5.v. Generalizing Exercise 5.5.iv, for any small category $J$ and any cocomplete category $C$ the forgetful functor $C^J \to C^{\operatorname{ob} J}$ admits a left adjoint $\operatorname{Lan}: C^{
\operatorname{ob} J} \to C^J$
that sends a functor $F ∈ C^{\operatorname{ob} J}$
to the functor $\operatorname{Lan}F ∈ C^J$ defined by
$$
\operatorname{Lan}F(j) = \coprod_{x \in J}\coprod_{C(x,j)}Fx.
$$

(i) Define $\operatorname{Lan}F$ on morphisms in $J$.

(ii) Define $\operatorname{Lan}$ on morphisms in $C^{\operatorname{ob} J}$.

(iii) Use the Yoneda lemma to show that $\operatorname{Lan}$ is left adjoint to the forgetful (restriction) functor $C^J \to C^{\operatorname{ob} J}$.

(iv) Prove that this adjunction is monadic by appealing to the monadicity theorem.

I have managed to do items $(i)$ through $(iii)$, although I haven't appealed to the Yoneda lemma to prove that $\operatorname{Lan}$ is left adjoint to the restriction functor: instead, I have constructed a natural bijection 'by hand'.

How can one prove this via the Yoneda lemma? I would also appreciate a hint for item $(iv)$, as I haven't gathered much intution on split-pairs yet.

Best Answer

I guess it is just the classical application of Yoneda lemma, in the form that adjoints are unique up to canonical iso: call $U$ the forgetful functor; it is just precomposition with the functor $j : Ob(J) \to J$. So, if $U$ has a left adjoint, it must be left extension along $j$.

If you now prove that the functor $L$ Emily defined is such that $$ C^{Ob(J)}(D, UX)\cong C^J(LD,X) $$ (you did it by hand, it's a reasonable way) then you get a natural isomorphism $$ C^J(LD,X) \cong C^J(Lan_jD,X) $$ and now Yoneda lemma entails that $LD\cong Lan_jD$, canonically.