Proposition 13.3.5. Let \(C\) be a small category. The embedding functor \[ \PSh(C)\simeq\RFib(C)\hookrightarrow\Cat_{/C} \] has a right adjoint defined by assigning to each \(f\colon X\to C\) the presheaf \[ c\mapsto\Hom_{\Cat_{/C}}(C_{/c},X)\, . \]
Proof
Existence of the right adjoint follows from Corollary 12.8.2 and Lemma 13.3.4. If \(R\) denotes it, then the Yoneda lemma gives \[ R(X)(c)\simeq\Hom_{\PSh(C)}(h_C(c),R(X)) \simeq\Hom_{\Cat_{/C}}(C_{/c},X), \] which is the asserted formula.