Lemma 20.38.1. Let $(X, \mathcal{O}_ X)$ be a ringed space. Let $L, M$ be objects of $D(\mathcal{O}_ X)$. For every open $U$ we have

$H^0(U, R\mathop{\mathcal{H}\! \mathit{om}}\nolimits (L, M)) = \mathop{\mathrm{Hom}}\nolimits _{D(\mathcal{O}_ U)}(L|_ U, M|_ U)$

and in particular $H^0(X, R\mathop{\mathcal{H}\! \mathit{om}}\nolimits (L, M)) = \mathop{\mathrm{Hom}}\nolimits _{D(\mathcal{O}_ X)}(L, M)$.

Proof. Choose a K-injective complex $\mathcal{I}^\bullet$ of $\mathcal{O}_ X$-modules representing $M$ and a K-flat complex $\mathcal{L}^\bullet$ representing $L$. Then $\mathop{\mathcal{H}\! \mathit{om}}\nolimits ^\bullet (\mathcal{L}^\bullet , \mathcal{I}^\bullet )$ is K-injective by Lemma 20.37.8. Hence we can compute cohomology over $U$ by simply taking sections over $U$ and the result follows from Lemma 20.37.6. $\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).