Lemma 21.33.4. Let $f : (\mathop{\mathit{Sh}}\nolimits (\mathcal{C}), \mathcal{O}) \to (\mathop{\mathit{Sh}}\nolimits (\mathcal{C}'), \mathcal{O}')$ and $f' : (\mathop{\mathit{Sh}}\nolimits (\mathcal{C}'), \mathcal{O}') \to (\mathop{\mathit{Sh}}\nolimits (\mathcal{C}''), \mathcal{O}'')$ be morphisms of ringed topoi. The relative cup product of Remark 21.19.7 is compatible with compositions in the sense that the diagram

$\xymatrix{ R(f' \circ f)_*K \otimes _{\mathcal{O}''}^\mathbf {L} R(f' \circ f)_*L \ar@{=}[rr] \ar[d] & & Rf'_*Rf_*K \otimes _{\mathcal{O}''}^\mathbf {L} Rf'_*Rf_*L \ar[d] \\ R(f' \circ f)_*(K \otimes _\mathcal {O}^\mathbf {L} L) \ar@{=}[r] & Rf'_*Rf_*(K \otimes _\mathcal {O}^\mathbf {L} L) & Rf'_*(Rf_*K \otimes _{\mathcal{O}'}^\mathbf {L} Rf_*L) \ar[l] }$

is commutative in $D(\mathcal{O}'')$ for all $K, L$ in $D(\mathcal{O})$.

Proof. This is true because going around the diagram either way we obtain the map adjoint to the map

\begin{align*} & L(f' \circ f)^*\left(R(f' \circ f)_*K \otimes _{\mathcal{O}''}^\mathbf {L} R(f' \circ f)_*L\right) \\ & = L(f' \circ f)^*R(f' \circ f)_*K \otimes _\mathcal {O}^\mathbf {L} L(f' \circ f)^*R(f' \circ f)_*L) \\ & \to K \otimes _\mathcal {O}^\mathbf {L} L \end{align*}

in $D(\mathcal{O})$. To see this one uses that the composition of the counits like so

$L(f' \circ f)^*R(f' \circ f)_* = Lf^* L(f')^* Rf'_* Rf_* \to Lf^* Rf_* \to \text{id}$

is the counit for $L(f' \circ f)^*$ and $R(f' \circ f)_*$. See Categories, Lemma 4.24.9. $\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).