First of all, I'm not sure about asking this question here. I guess the answer is in the literature, but for the moment I'm a bit confused... a pointer to a specific source would be very helpful! Thanks in advance.




---


Let $\mathcal S$ be a small category with the trivial topology (such that every presheaf is a sheaf) and $O$ a presheaf of $\mathbb{R}$-algebras on it. Then $(\mathcal S, O)$ is a ringed site and $\mathrm{Mod}(\mathcal O)$, the category of $O$-modules, has enough injectives.


I am interested in the derived functors $\mathrm{Ext}^n(\mathbb{R}\_{\mathcal S},-)$ of $\mathrm{Hom}\_{\mathrm{Mod}(\mathcal O)}(\mathbb{R}\_{\mathcal S}, -)$, where $\mathbb{R}$ is the presheaf $X\mapsto \mathbb{R}$ with trivial $O$-action. (This corresponds to topos cohomology, no?) Such functors are defined in terms of injective resolutions.


Some hypotheses on $\mathcal S$ (not ad-hoc, they come from the nature of the problem) allow me to build a projective resolution $P^\bullet \to \mathbb{R}\_{\mathcal S}$; in fact, it is the usual bar resolution on each object of $\mathcal S$.


I define now
\begin{align}
\underline{\mathrm{Ext}}^0(\mathbb{R}\_{\mathcal S},B) &= \ker(\mathrm{Hom}\_{\mathrm{Mod}(\mathcal O)}(P\_0,B) \to \mathrm{Hom}\_{\mathrm{Mod}(\mathcal O)}(P\_1,B)), \\
\underline{\mathrm{Ext}}^i(\mathbb{R}\_{\mathcal S},B) &= \frac{\ker(\mathrm{Hom}\_{\mathrm{Mod}(\mathcal O)}(P\_i,B) \to \mathrm{Hom}\_{\mathrm{Mod}(\mathcal O)}(P\_{i+1},B))}{\mathrm{im}(\mathrm{Hom}\_{\mathrm{Mod}(\mathcal O)}(P\_{i-1},B) \to \mathrm{Hom}\_{\mathrm{Mod}(\mathcal O)}(P\_{i},B))}, \quad \text{for } i\geq 1. \label{Ext\_n}
\end{align}


Is it true that $\mathrm{Ext}^n(\mathbb{R}\_{\mathcal S},B) \simeq \underline{\mathrm{Ext}}^n(\mathbb{R}\_{\mathcal S},B)$? 


This is true when the category has enough injectives and projectives, 
<https://webusers.imj-prg.fr/~pierre.schapira/lectnotes/AlTo.pdf> p. 80. 


I guess another possible strategy would use the identification with the Yoneda extensions (cf. [Universality of Ext functor using Yoneda extensions](https://mathoverflow.net/questions/121140/universality-of-ext-functor-using-yoneda-extensions)) or other techniques in derived categories. 



Computing $\mathrm{Ext}$ with a projective resolution (in a topos)
The terminal (and initial) object in $\mathrm{Mod}(\mathcal{O})$ is 0. The unadorned phrase "sheaf cohomology of $B$" would typically be the derived version of the global sections functor $\mathrm{Hom}\_{\mathrm{Mod}(\mathcal{O})}(\mathcal{O},-)$, or equivalently $\mathrm{Hom}\_{\mathrm{Psh}(\mathcal{S})}(1,-)$, applied to $B$. The latter description, using homs of $\mathsf{Set}$-valued presheaves, is where the terminal object shows up.


As for your question, I think if you look at the proof you linked to in the Schapira notes, you'll see that the primary tool, Theorem 4.6.10, only relies on the existence of one injective resolution and one projective resolution for the comparison to hold. So yes, these are the same.


