Lemma 21.5.2. Let $(\mathcal{C}, \mathcal{O})$ be a ringed site. Let $\mathcal{F}$ be a sheaf of $\mathcal{O}$-modules on $\mathcal{C}$. Let $\mathcal{F}_{ab}$ denote the underlying sheaf of abelian groups. Then there is a functorial isomorphism

$H^1(\mathcal{C}, \mathcal{F}_{ab}) = H^1(\mathcal{C}, \mathcal{F})$

where the left hand side is cohomology computed in $\textit{Ab}(\mathcal{C})$ and the right hand side is cohomology computed in $\textit{Mod}(\mathcal{O})$.

Proof. Let $\underline{\mathbf{Z}}$ denote the constant sheaf $\mathbf{Z}$. As $\textit{Ab}(\mathcal{C}) = \textit{Mod}(\underline{\mathbf{Z}})$ we may apply Lemma 21.5.1 twice, and it follows that we have to show

$\mathop{\mathrm{Ext}}\nolimits ^1_{\textit{Mod}(\mathcal{O})}(\mathcal{O}, \mathcal{F}) = \mathop{\mathrm{Ext}}\nolimits ^1_{\textit{Mod}(\underline{\mathbf{Z}})}( \underline{\mathbf{Z}}, \mathcal{F}_{ab}).$

Suppose that $0 \to \mathcal{F} \to \mathcal{E} \to \mathcal{O} \to 0$ is an extension in $\textit{Mod}(\mathcal{O})$. Then we can use the obvious map of abelian sheaves $1 : \underline{\mathbf{Z}} \to \mathcal{O}$ and pullback to obtain an extension $\mathcal{E}_{ab}$, like so:

$\xymatrix{ 0 \ar[r] & \mathcal{F}_{ab} \ar[r] \ar@{=}[d] & \mathcal{E}_{ab} \ar[r] \ar[d] & \underline{\mathbf{Z}} \ar[r] \ar[d]^{1} & 0 \\ 0 \ar[r] & \mathcal{F} \ar[r] & \mathcal{E} \ar[r] & \mathcal{O} \ar[r] & 0 }$

The converse is a little more fun. Suppose that $0 \to \mathcal{F}_{ab} \to \mathcal{E}_{ab} \to \underline{\mathbf{Z}} \to 0$ is an extension in $\textit{Mod}(\underline{\mathbf{Z}})$. Since $\underline{\mathbf{Z}}$ is a flat $\underline{\mathbf{Z}}$-module we see that the sequence

$0 \to \mathcal{F}_{ab} \otimes _{\underline{\mathbf{Z}}} \mathcal{O} \to \mathcal{E}_{ab} \otimes _{\underline{\mathbf{Z}}} \mathcal{O} \to \underline{\mathbf{Z}} \otimes _{\underline{\mathbf{Z}}} \mathcal{O} \to 0$

is exact, see Modules on Sites, Lemma 18.28.9. Of course $\underline{\mathbf{Z}} \otimes _{\underline{\mathbf{Z}}} \mathcal{O} = \mathcal{O}$. Hence we can form the pushout via the ($\mathcal{O}$-linear) multiplication map $\mu : \mathcal{F} \otimes _{\underline{\mathbf{Z}}} \mathcal{O} \to \mathcal{F}$ to get an extension of $\mathcal{O}$ by $\mathcal{F}$, like this

$\xymatrix{ 0 \ar[r] & \mathcal{F}_{ab} \otimes _{\underline{\mathbf{Z}}} \mathcal{O} \ar[r] \ar[d]^\mu & \mathcal{E}_{ab} \otimes _{\underline{\mathbf{Z}}} \mathcal{O} \ar[r] \ar[d] & \mathcal{O} \ar[r] \ar@{=}[d] & 0 \\ 0 \ar[r] & \mathcal{F} \ar[r] & \mathcal{E} \ar[r] & \mathcal{O} \ar[r] & 0 }$

which is the desired extension. We omit the verification that these constructions are mutually inverse. $\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).