Lemma 21.19.6. Let $f : (\mathop{\mathit{Sh}}\nolimits (\mathcal{C}), \mathcal{O}_\mathcal {C}) \to (\mathop{\mathit{Sh}}\nolimits (\mathcal{D}), \mathcal{O}_\mathcal {D})$ be a morphism of ringed topoi. Let $\mathcal{K}^\bullet $ be a complex of $\mathcal{O}_\mathcal {C}$-modules. The diagram

\[ \xymatrix{ Lf^*f_*\mathcal{K}^\bullet \ar[r] \ar[d] & f^*f_*\mathcal{K}^\bullet \ar[d] \\ Lf^*Rf_*\mathcal{K}^\bullet \ar[r] & \mathcal{K}^\bullet } \]

coming from $Lf^* \to f^*$ on complexes, $f_* \to Rf_*$ on complexes, and adjunction $Lf^* \circ Rf_* \to \text{id}$ commutes in $D(\mathcal{O}_\mathcal {C})$.

**Proof.**
We will use the existence of K-flat resolutions and K-injective resolutions, see Lemmas 21.17.11, 21.18.2, and 21.18.1 and the discussion above. Choose a quasi-isomorphism $\mathcal{K}^\bullet \to \mathcal{I}^\bullet $ where $\mathcal{I}^\bullet $ is K-injective as a complex of $\mathcal{O}_\mathcal {C}$-modules. Choose a quasi-isomorphism $\mathcal{Q}^\bullet \to f_*\mathcal{I}^\bullet $ where $\mathcal{Q}^\bullet $ is a K-flat complex of $\mathcal{O}_\mathcal {D}$-modules with flat terms. We can choose a K-flat complex of $\mathcal{O}_\mathcal {D}$-modules $\mathcal{P}^\bullet $ with flat terms and a diagram of morphisms of complexes

\[ \xymatrix{ \mathcal{P}^\bullet \ar[r] \ar[d] & f_*\mathcal{K}^\bullet \ar[d] \\ \mathcal{Q}^\bullet \ar[r] & f_*\mathcal{I}^\bullet } \]

commutative up to homotopy where the top horizontal arrow is a quasi-isomorphism. Namely, we can first choose such a diagram for some complex $\mathcal{P}^\bullet $ because the quasi-isomorphisms form a multiplicative system in the homotopy category of complexes and then we can choose a resolution of $\mathcal{P}^\bullet $ by a K-flat complex with flat terms. Taking pullbacks we obtain a diagram of morphisms of complexes

\[ \xymatrix{ f^*\mathcal{P}^\bullet \ar[r] \ar[d] & f^*f_*\mathcal{K}^\bullet \ar[d] \ar[r] & \mathcal{K}^\bullet \ar[d] \\ f^*\mathcal{Q}^\bullet \ar[r] & f^*f_*\mathcal{I}^\bullet \ar[r] & \mathcal{I}^\bullet } \]

commutative up to homotopy. The outer rectangle witnesses the truth of the statement in the lemma.
$\square$

## Comments (1)

Comment #7138 by Hao Peng on