Lemma 18.27.3. Internal hom and (co)limits. Let $\mathcal{C}$ be a category and let $\mathcal{O}$ be a presheaf of rings.

1. For any presheaf of $\mathcal{O}$-modules $\mathcal{F}$ the functor

$\textit{PMod}(\mathcal{O}) \longrightarrow \textit{PMod}(\mathcal{O}) , \quad \mathcal{G} \longmapsto \mathop{\mathcal{H}\! \mathit{om}}\nolimits _\mathcal {O}(\mathcal{F}, \mathcal{G})$

commutes with arbitrary limits.

2. For any presheaf of $\mathcal{O}$-modules $\mathcal{G}$ the functor

$\textit{PMod}(\mathcal{O}) \longrightarrow \textit{PMod}(\mathcal{O})^{opp} , \quad \mathcal{F} \longmapsto \mathop{\mathcal{H}\! \mathit{om}}\nolimits _\mathcal {O}(\mathcal{F}, \mathcal{G})$

commutes with arbitrary colimits, in a formula

$\mathop{\mathcal{H}\! \mathit{om}}\nolimits _\mathcal {O}(\mathop{\mathrm{colim}}\nolimits _ i \mathcal{F}_ i, \mathcal{G}) = \mathop{\mathrm{lim}}\nolimits _ i \mathop{\mathcal{H}\! \mathit{om}}\nolimits _\mathcal {O}(\mathcal{F}_ i, \mathcal{G}).$

Suppose that $\mathcal{C}$ is a site, and $\mathcal{O}$ is a sheaf of rings.

1. For any sheaf of $\mathcal{O}$-modules $\mathcal{F}$ the functor

$\textit{Mod}(\mathcal{O}) \longrightarrow \textit{Mod}(\mathcal{O}) , \quad \mathcal{G} \longmapsto \mathop{\mathcal{H}\! \mathit{om}}\nolimits _\mathcal {O}(\mathcal{F}, \mathcal{G})$

commutes with arbitrary limits.

2. For any sheaf of $\mathcal{O}$-modules $\mathcal{G}$ the functor

$\textit{Mod}(\mathcal{O}) \longrightarrow \textit{Mod}(\mathcal{O})^{opp} , \quad \mathcal{F} \longmapsto \mathop{\mathcal{H}\! \mathit{om}}\nolimits _\mathcal {O}(\mathcal{F}, \mathcal{G})$

commutes with arbitrary colimits, in a formula

$\mathop{\mathcal{H}\! \mathit{om}}\nolimits _\mathcal {O}(\mathop{\mathrm{colim}}\nolimits _ i \mathcal{F}_ i, \mathcal{G}) = \mathop{\mathrm{lim}}\nolimits _ i \mathop{\mathcal{H}\! \mathit{om}}\nolimits _\mathcal {O}(\mathcal{F}_ i, \mathcal{G}).$

Proof. Let $\mathcal{I} \to \textit{PMod}(\mathcal{O})$, $i \mapsto \mathcal{G}_ i$ be a diagram. Let $U$ be an object of the category $\mathcal{C}$. As $j_ U^*$ is both a left and a right adjoint we see that $\mathop{\mathrm{lim}}\nolimits _ i j_ U^*\mathcal{G}_ i = j_ U^* \mathop{\mathrm{lim}}\nolimits _ i \mathcal{G}_ i$. Hence we have

\begin{align*} \mathop{\mathcal{H}\! \mathit{om}}\nolimits _\mathcal {O}(\mathcal{F}, \mathop{\mathrm{lim}}\nolimits _ i \mathcal{G}_ i)(U) & = \mathop{\mathrm{Hom}}\nolimits _{\mathcal{O}_ U}(\mathcal{F}|_ U, \mathop{\mathrm{lim}}\nolimits _ i \mathcal{G}_ i|_ U) \\ & = \mathop{\mathrm{lim}}\nolimits _ i \mathop{\mathrm{Hom}}\nolimits _{\mathcal{O}_ U}(\mathcal{F}|_ U, \mathcal{G}_ i|_ U) \\ & = \mathop{\mathrm{lim}}\nolimits _ i \mathop{\mathcal{H}\! \mathit{om}}\nolimits _\mathcal {O}(\mathcal{F}, \mathcal{G}_ i)(U) \end{align*}

by definition of a limit. This proves (1). Part (2) is proved in exactly the same way. Part (3) follows from (1) because the limit of a diagram of sheaves is the same as the limit in the category of presheaves. Finally, (4) follow because, in the formula we have

$\mathop{Mor}\nolimits _{\textit{Mod}(\mathcal{O})}( \mathop{\mathrm{colim}}\nolimits _ i \mathcal{F}_ i, \mathcal{G}) = \mathop{Mor}\nolimits _{\textit{PMod}(\mathcal{O})}( \mathop{\mathrm{colim}}\nolimits ^{PSh}_ i \mathcal{F}_ i, \mathcal{G})$

as the colimit $\mathop{\mathrm{colim}}\nolimits _ i \mathcal{F}_ i$ is the sheafification of the colimit $\mathop{\mathrm{colim}}\nolimits ^{PSh}_ i \mathcal{F}_ i$ in $\textit{PMod}(\mathcal{O})$. Hence (4) follows from (2) (by the remark on limits above again). $\square$

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).