Lemma 21.13.3. Let $\mathcal{C}$ be a site. Let $K$ be a sheaf of sets on $\mathcal{C}$. Consider the morphism of topoi $j : \mathop{\mathit{Sh}}\nolimits (\mathcal{C}/K) \to \mathop{\mathit{Sh}}\nolimits (\mathcal{C})$, see Sites, Lemma 7.30.3. Then $j^{-1}$ preserves injectives and $H^ p(K, \mathcal{F}) = H^ p(\mathcal{C}/K, j^{-1}\mathcal{F})$ for any abelian sheaf $\mathcal{F}$ on $\mathcal{C}$.

Proof. By Sites, Lemmas 7.30.1 and 7.30.3 the morphism of topoi $j$ is equivalent to a localization. Hence this follows from Lemma 21.7.1. $\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).