hcju/stacksqa huggingface dataset:
Choose a K-injective complex $\mathcal{I}^\bullet$ representing $E$. We may assume $\mathcal{I}^n$ is an injective object of $\textit{Mod}(\mathcal{O}_X)$ for all $n$, see Injectives, Theorem \ref{injectives-theorem-K-injective-embedding-grothendieck}. Then $R\Gamma(X, E)$ is computed by $\Gamma(X, \mathcal{I}^\bullet)$. Similarly for $U$, $V$, and $U \cap V$ by Lemma \ref{lemma-restrict-K-injective-to-open}. Hence the distinguished triangle of the lemma is the distinguished triangle associated (by Derived Categories, Section \ref{derived-section-canonical-delta-functor} and especially Lemma \ref{derived-lemma-derived-canonical-delta-functor}) to the short exact sequence of complexes $$ 0 \to \mathcal{I}^\bullet(X) \to \mathcal{I}^\bullet(U) \oplus \mathcal{I}^\bullet(V) \to \mathcal{I}^\bullet(U \cap V) \to 0. $$ We have seen this is a short exact sequence in the proof of Lemma \ref{lemma-mayer-vietoris}. The final statement follows from the functoriality of the construction in Injectives, Theorem \ref{injectives-theorem-K-injective-embedding-grothendieck}.
Choose a K-injective complex $\mathcal{I}^\bullet$ representing $E$. We may assume $\mathcal{I}^n$ is an injective object of $\textit{Mod}(\mathcal{O}_X)$ for all $n$, see Injectives, Theorem \ref{injectives-theorem-K-injective-embedding-grothendieck}. Then $Rf_*E$ is computed by $f_*\mathcal{I}^\bullet$. Similarly for $U$, $V$, and $U \cap V$ by Lemma \ref{lemma-restrict-K-injective-to-open}. Hence the distinguished triangle of the lemma is the distinguished triangle associated (by Derived Categories, Section \ref{derived-section-canonical-delta-functor} and especially Lemma \ref{derived-lemma-derived-canonical-delta-functor}) to the short exact sequence of complexes $$ 0 \to f_*\mathcal{I}^\bullet \to a_*\mathcal{I}^\bullet|_U \oplus b_*\mathcal{I}^\bullet|_V \to c_*\mathcal{I}^\bullet|_{U \cap V} \to 0. $$ This is a short exact sequence of complexes by Lemma \ref{lemma-relative-mayer-vietoris} and the fact that $R^1f_*\mathcal{I} = 0$ for an injective object $\mathcal{I}$ of $\textit{Mod}(\mathcal{O}_X)$. The final statement follows from the functoriality of the construction in Injectives, Theorem \ref{injectives-theorem-K-injective-embedding-grothendieck}.
Let $V = X \setminus T$ and $W = U \cap V$. Note that $X = U \cup V$ is an open covering of $X$. Denote $j_W : W \to V$ the open immersion. Let $E$ be an object of $D(\mathcal{O}_X)$ whose cohomology sheaves are supported on $T$. By Lemma \ref{lemma-restrict-direct-image-open} we have $(Rj_*E|_U)|_V = Rj_{W, *}(E|_W) = 0$ because $E|_W = 0$ by our assumption. On the other hand, $Rj_*(E|_U)|_U = E|_U$. Thus (1) is clear. Let $F$ be an object of $D(\mathcal{O}_U)$ whose cohomology sheaves are supported on $T$. By Lemma \ref{lemma-restrict-direct-image-open} we have $(Rj_*F)|_V = Rj_{W, *}(F|_W) = 0$ because $F|_W = 0$ by our assumption. We also have $(j_!F)|_V = j_{W!}(F|_W) = 0$ (the first equality is immediate from the definition of extension by zero). Since both $(Rj_*F)|_U = F$ and $(j_!F)|_U = F$ we see that (2) holds.
The functor $i_*$ is exact, so $i_* = Ri_* = Li_*$. Hence part (1) of the lemma follows from Modules, Lemma \ref{modules-lemma-adjoint-section-with-support} and Derived Categories, Lemma \ref{derived-lemma-derived-adjoint-functors}. Let $K$ be as in (2). We can represent $K$ by a K-injective complex $\mathcal{I}^\bullet$ of $\mathcal{O}_X|_Z$-modules. By Lemma \ref{lemma-K-injective-flat} the complex $i_*\mathcal{I}^\bullet$, which represents $i_*K$, is a K-injective complex of $\mathcal{O}_X$-modules. Thus $R\mathcal{H}_Z(i_*K)$ is computed by $\mathcal{H}_Z(i_*\mathcal{I}^\bullet) = \mathcal{I}^\bullet$ which proves (2). Part (3) is a special case of (2).
Part (1) is immediate from the definitions. Part (3) is a formal consequence of part (2) and Lemma \ref{lemma-cohomology-with-support-sheaf-on-support}. In the rest of the proof we prove part (2). \medskip\noindent Let us think of $i$ as the morphism of ringed spaces $i : (Z, \mathcal{O}_X|_Z) \to (X, \mathcal{O}_X)$. Recall that $i^*$ and $i_*$ is an adjoint pair of functors. Since $i$ is a closed immersion, $i_*$ is exact. Since $i^{-1}\mathcal{O}_X = \mathcal{O}_X|_Z$ is the structure sheaf of $(Z, \mathcal{O}_X|_Z)$ we see that $i^* = i^{-1}$ is exact and we see that that $i^*i_* = i^{-1}i_*$ is isomorphic to the identify functor. See Modules, Lemmas \ref{modules-lemma-exactness-pushforward-pullback} and \ref{modules-lemma-i-star-exact}. Thus $i_* : D(\mathcal{O}_X|_Z) \to D_Z(\mathcal{O}_X)$ is fully faithful and $i^{-1}$ determines a left inverse. On the other hand, suppose that $K$ is an object of $D_Z(\mathcal{O}_X)$ and consider the adjunction map $K \to i_*i^{-1}K$. Using exactness of $i_*$ and $i^{-1}$ this induces the adjunction maps $H^n(K) \to i_*i^{-1}H^n(K)$ on cohomology sheaves. Since these cohomology sheaves are supported on $Z$ we see these adjunction maps are isomorphisms and we conclude that $i_* : D(\mathcal{O}_X|_Z) \to D_Z(\mathcal{O}_X)$ is an equivalence. \medskip\noindent To finish the proof it suffices to show that $R\mathcal{H}_Z(K) = i^{-1}K$ if $K$ is an object of $D_Z(\mathcal{O}_X)$. To do this we can use that $K = i_*i^{-1}K$ as we've just proved this is the case. Then Lemma \ref{lemma-cohomology-with-support-sheaf-on-support} tells us what we want.
Since $i_* : \textit{Mod}(\mathcal{O}_X|_Z) \to \textit{Mod}(\mathcal{O}_X)$ is exact and left adjoint to $\mathcal{H}_Z$ (Modules, Lemma \ref{modules-lemma-adjoint-section-with-support}) this follows from Derived Categories, Lemma \ref{derived-lemma-adjoint-preserve-K-injectives}.
Choose a K-injective complex $\mathcal{I}^\bullet$ all of whose terms are injective $\mathcal{O}_X$-modules representing $K$. See Section \ref{section-unbounded}. Recall that $\mathcal{I}^\bullet|_U$ is a K-injective complex of $\mathcal{O}_U$-modules, see Lemma \ref{lemma-restrict-K-injective-to-open}. Hence each of the derived functors in the distinguished triangle is gotten by applying the underlying functor to $\mathcal{I}^\bullet$. Hence we find that it suffices to prove that for an injective $\mathcal{O}_X$-module $\mathcal{I}$ we have a short exact sequence $$ 0 \to \Gamma_Z(X, \mathcal{I}) \to \Gamma(X, \mathcal{I}) \to \Gamma(U, \mathcal{I}) \to 0 $$ This follows from Lemma \ref{lemma-injective-restriction-surjective} and the definitions.
Choose a K-injective complex $\mathcal{I}^\bullet$ all of whose terms are injective $\mathcal{O}_X$-modules representing $K$. See Section \ref{section-unbounded}. Recall that $\mathcal{I}^\bullet|_U$ is a K-injective complex of $\mathcal{O}_U$-modules, see Lemma \ref{lemma-restrict-K-injective-to-open}. Hence each of the derived functors in the distinguished triangle is gotten by applying the underlying functor to $\mathcal{I}^\bullet$. Hence it suffices to prove that for an injective $\mathcal{O}_X$-module $\mathcal{I}$ we have a short exact sequence $$ 0 \to i_*\mathcal{H}_Z(\mathcal{I}) \to \mathcal{I} \to j_*(\mathcal{I}|_U) \to 0 $$ This follows from Lemma \ref{lemma-injective-restriction-surjective} and the definitions.
Choose a K-injective complex $\mathcal{I}^\bullet$ of $\mathcal{O}_U$-modules representing $K$. Then $j_*\mathcal{I}^\bullet$ represents $Rj_*K$. By Lemma \ref{lemma-K-injective-flat} the complex $j_*\mathcal{I}^\bullet$ is a K-injective complex of $\mathcal{O}_X$-modules. Hence $\mathcal{H}_Z(j_*\mathcal{I}^\bullet)$ represents $R\mathcal{H}_Z(Rj_*K)$. Thus it suffices to show that $\mathcal{H}_Z(j_*\mathcal{G}) = 0$ for any abelian sheaf $\mathcal{G}$ on $U$. Thus we have to show that a section $s$ of $j_*\mathcal{G}$ over some open $W$ which is supported on $W \cap Z$ is zero. The support condition means that $s|_{W \setminus W \cap Z} = 0$. Since $j_*\mathcal{G}(W) = \mathcal{G}(U \cap W) = j_*\mathcal{G}(W \setminus W \cap Z)$ this implies that $s$ is zero as desired.
Proof of (1). The map is constructed as follows. Choose a K-injective complex of $\mathcal{O}_X$-modules $\mathcal{I}^\bullet$ representing $K$. Choose a quasi-isomorpism $\mathcal{I}^\bullet \to \mathcal{J}^\bullet$ where $\mathcal{J}^\bullet$ is a K-injective complex of abelian groups. Then the map in (1) is given by $$ \Gamma_Z(X, \mathcal{I}^\bullet) \to \Gamma_Z(X, \mathcal{J}^\bullet) $$ determined by the fact that $\Gamma_Z$ is a functor on abelian sheaves. An easy check shows that the resulting map combined with the canonical maps of Lemma \ref{lemma-modules-abelian-unbounded} fit into a morphism of distinguished triangles $$ \xymatrix{ R\Gamma_Z(X, K) \ar[r] \ar[d] & R\Gamma(X, K) \ar[r] \ar[d] & R\Gamma(U, K) \ar[d] \\ R\Gamma_Z(X, K_{ab}) \ar[r] & R\Gamma(X, K_{ab}) \ar[r] & R\Gamma(U, K_{ab}) } $$ of Lemma \ref{lemma-triangle-sections-with-support}. Since two of the three arrows are isomorphisms by the lemma cited, we conclude by Derived Categories, Lemma \ref{derived-lemma-third-isomorphism-triangle}. \medskip\noindent The proof of (2) is omitted. Hint: use the same argument with Lemma \ref{lemma-triangle-sections-with-support-sheaves} for the distinguished triangle.
Omitted. Hints: Using that $H^p(Z, R\mathcal{H}_Z(K)) = H^p(X, i_*R\mathcal{H}_Z(K))$ and similarly for $R\mathcal{H}_{Z'}(Lf^*K)$ this follows from the functoriality of the pullback maps and the commutative diagram used to define the map of Remark \ref{remark-support-functorial}.
The first statement follows from Injectives, Lemma \ref{injectives-lemma-RF-commutes-with-Rlim}. Then we may apply  More on Algebra, Remark \ref{more-algebra-remark-compare-derived-limit} to $R\lim R\Gamma(U, K_n) = R\Gamma(U, R\lim K_n)$ to get the short exact sequences.
Let $(K_n)$ be an inverse system in $D(\mathcal{O}_X)$. Consider the defining distinguished triangle $$ R\lim K_n \to \prod K_n \to \prod K_n $$ in $D(\mathcal{O}_X)$. Applying the exact functor $Rf_*$ we obtain the distinguished triangle $$ Rf_*(R\lim K_n) \to Rf_*\left(\prod K_n\right) \to Rf_*\left(\prod K_n\right) $$ in $D(\mathcal{O}_Y)$. Thus we see that it suffices to prove that $Rf_*$ commutes with products in the derived category (which are not just given by products of complexes, see Injectives, Lemma \ref{injectives-lemma-derived-products}). However, since $Rf_*$ is a right adjoint by Lemma \ref{lemma-adjoint} this follows formally (see Categories, Lemma \ref{categories-lemma-adjoint-exact}). Caution: Note that we cannot apply Categories, Lemma \ref{categories-lemma-adjoint-exact} directly as $R\lim K_n$ is not a limit in $D(\mathcal{O}_X)$.
Set $K_n = \mathcal{F}_n$ and $K = R\lim \mathcal{F}_n$. Using the notation of Remark \ref{remark-discuss-derived-limit} and assumption (2) we see that for $U \in \mathcal{B}$ we have $\underline{\mathcal{H}}_n^m(U) = 0$ when $m \not = 0$ and $\underline{\mathcal{H}}_n^0(U) = \mathcal{F}_n(U)$. From Equation (\ref{equation-ses-Rlim-over-U}) and assumption (3) we see that $\underline{\mathcal{H}}^m(U) = 0$ when $m \not = 0$ and equal to $\lim \mathcal{F}_n(U)$ when $m = 0$. Sheafifying using (1) we find that $\mathcal{H}^m = 0$ when $m \not = 0$ and equal to $\lim \mathcal{F}_n$ when $m = 0$. Hence $K = \lim \mathcal{F}_n$. Since $H^m(U, K) = \underline{\mathcal{H}}^m(U) = 0$ for $m > 0$ (see above) we see that the second assertion holds.
Let $\gamma$ be an element of $H^m(R\lim K_n)_x$ which maps to zero in $H^m(K_{n(x)})_x$. Since $H^m(R\lim K_n)$ is the sheafification of $U \mapsto H^m(U, R\lim K_n)$ (by Lemma \ref{lemma-sheafification-cohomology}) we can choose $U \in \mathfrak{U}_x$ and an element $\tilde \gamma \in H^m(U, R\lim K_n)$ mapping to $\gamma$. Then $\tilde\gamma$ maps to $\tilde\gamma_{n(x)} \in H^m(U, K_{n(x)})$. Using that $H^m(K_{n(x)})$ is the sheafification of $U \mapsto H^m(U, K_{n(x)})$ (by Lemma \ref{lemma-sheafification-cohomology} again) we see that after shrinking $U$ we may assume that $\tilde\gamma_{n(x)} = 0$. For this $U$ we consider the short exact sequence $$ 0 \to R^1\lim H^{m - 1}(U, K_n) \to H^m(U, R\lim K_n) \to \lim H^m(U, K_n) \to 0 $$ of Lemma \ref{lemma-RGamma-commutes-with-Rlim}. By assumption (1) the group on the left is zero and by assumption (2) the group on the right maps injectively into $H^m(U, K_{n(x)})$. We conclude $\tilde\gamma = 0$ and hence $\gamma = 0$ as desired.
Set $K_n = \tau_{\geq -n}E$ and $K = R\lim K_n$. The canonical map $E \to K$ comes from the canonical maps $E \to K_n = \tau_{\geq -n}E$. We have to show that $E \to K$ induces an isomorphism $H^m(E) \to H^m(K)$ of cohomology sheaves. In the rest of the proof we fix $m$. If $n \geq -m$, then the map $E \to \tau_{\geq -n}E = K_n$ induces an isomorphism $H^m(E) \to H^m(K_n)$. To finish the proof it suffices to show that for every $x \in X$ there exists an integer $n(x) \geq -m$ such that the map $H^m(K)_x \to H^m(K_{n(x)})_x$ is injective. Namely, then the composition $$ H^m(E)_x \to H^m(K)_x \to H^m(K_{n(x)})_x $$ is a bijection and the second arrow is injective, hence the first arrow is bijective. Set $$ n(x) = 1 + \max\{-m, p(x, m - 1) - m, -1 + p(x, m) - m, -2 + p(x, m + 1) - m\}. $$ so that in any case $n(x) \geq -m$. Claim: the maps $$ H^{m - 1}(U, K_{n + 1}) \to H^{m - 1}(U, K_n) \quad\text{and}\quad H^m(U, K_{n + 1}) \to H^m(U, K_n) $$ are isomorphisms for $n \geq n(x)$ and $U \in \mathfrak{U}_x$. The claim implies conditions (1) and (2) of Lemma \ref{lemma-cohomology-derived-limit-injective} are satisfied and hence implies the desired injectivity. Recall (Derived Categories, Remark \ref{derived-remark-truncation-distinguished-triangle}) that we have distinguished triangles $$ H^{-n - 1}(E)[n + 1] \to K_{n + 1} \to K_n \to H^{-n - 1}(E)[n + 2] $$ Looking at the asssociated long exact cohomology sequence the claim follows if $$ H^{m + n}(U, H^{-n - 1}(E)),\quad H^{m + n + 1}(U, H^{-n - 1}(E)),\quad H^{m + n + 2}(U, H^{-n - 1}(E)) $$ are zero for $n \geq n(x)$ and $U \in \mathfrak{U}_x$. This follows from our choice of $n(x)$ and the assumption in the lemma.
Observe that $K = R\lim \tau_{\geq -n} K$ by Lemma \ref{lemma-is-limit-dimension} with $d = 0$. Let $U \in \mathcal{B}$. By Equation (\ref{equation-ses-Rlim-over-U}) we get a short exact sequence $$ 0 \to R^1\lim H^{q - 1}(U, \tau_{\geq -n}K) \to H^q(U, K) \to \lim H^q(U, \tau_{\geq -n}K) \to 0 $$ Condition (2) implies $H^q(U, \tau_{\geq -n} K) = H^0(U, H^q(\tau_{\geq -n} K))$ for all $q$ by using the spectral sequence of Example \ref{example-spectral-sequence}. The spectral sequence converges because $\tau_{\geq -n}K$ is bounded below. If $n > -q$ then we have $H^q(\tau_{\geq -n}K) = H^q(K)$. Thus the systems on the left and the right of the displayed short exact sequence are eventually constant with values $H^0(U, H^{q - 1}(K))$ and $H^0(U, H^q(K))$. The lemma follows.
Set $K = R\lim K_n$. We will use notation as in Remark \ref{remark-discuss-derived-limit}. Let $U \in \mathcal{B}$. By Lemma \ref{lemma-cohomology-over-U-trivial} and (2)(a) we have $H^q(U, K_n) = H^0(U, H^q(K_n))$. Using that the functor $R\Gamma(U, -)$ commutes with derived limits we have $$ H^q(U, K) = H^q(R\lim R\Gamma(U, K_n)) = \lim H^0(U, H^q(K_n)) $$ where the final equality follows from More on Algebra, Remark \ref{more-algebra-remark-compare-derived-limit} and assumption (2)(b). Thus $H^q(U, K)$ is the inverse limit the sections of the sheaves $H^q(K_n)$ over $U$. Since $\lim H^q(K_n)$ is a sheaf we find using assumption (1) that $H^q(K)$, which is the sheafification of the presheaf $U \mapsto H^q(U, K)$, is equal to $\lim H^q(K_n)$. This proves the lemma.
Let ${\mathcal I}^\bullet$ be a K-injective complex whose terms are injective $\mathcal{O}_X$-modules. The map (\ref{equation-global-sections-to-alternating-cech}) for $\mathcal{I}^\bullet$ is a map $\Gamma(X, {\mathcal I}^\bullet) \to \text{Tot}(\check{\mathcal{C}}^\bullet_{alt}({\mathcal U}, {\mathcal I}^\bullet))$. This is a quasi-isomorphism of complexes of abelian groups as follows from Homology, Lemma \ref{homology-lemma-double-complex-gives-resolution} applied to the double complex $\check{\mathcal{C}}^\bullet_{alt}({\mathcal U}, {\mathcal I}^\bullet)$ using Lemmas \ref{lemma-injective-trivial-cech} and \ref{lemma-alternating-usual}. Suppose ${\mathcal F}^\bullet \to {\mathcal I}^\bullet$ is a quasi-isomorphism of ${\mathcal F}^\bullet$ into a K-injective complex whose terms are injectives (Injectives, Theorem \ref{injectives-theorem-K-injective-embedding-grothendieck}). Since $R\Gamma(X, {\mathcal F}^\bullet)$ is represented by the complex $\Gamma(X, {\mathcal I}^\bullet)$ we obtain the map of the lemma using $$ \text{Tot}(\check{\mathcal{C}}^\bullet_{alt}({\mathcal U}, {\mathcal F}^\bullet)) \longrightarrow \text{Tot}(\check{\mathcal{C}}^\bullet_{alt}({\mathcal U}, {\mathcal I}^\bullet)). $$ We omit the verification of functoriality and compatibilities.
First assume $\mathcal{F}^\bullet$ is bounded below. In this case the map $$ \text{Tot}(\check{\mathcal{C}}^\bullet_{alt}(\mathcal{U}, \mathcal{F}^\bullet)) \longrightarrow \text{Tot}(\check{\mathcal{C}}^\bullet(\mathcal{U}, \mathcal{F}^\bullet)) $$ is a quasi-isomorphism by Lemma \ref{lemma-alternating-usual}. Namely, the map of double complexes $\check{\mathcal{C}}^\bullet_{alt}(\mathcal{U}, \mathcal{F}^\bullet) \to \check{\mathcal{C}}^\bullet(\mathcal{U}, \mathcal{F}^\bullet)$ induces an isomorphism between the first pages of the second spectral sequences associated to these complexes (by Homology, Lemma \ref{homology-lemma-ss-double-complex}) and these spectral sequences converge (Homology, Lemma \ref{homology-lemma-first-quadrant-ss}). Thus the conclusion in this case by Lemma \ref{lemma-cech-complex-complex-computes} and assumption (3)(a). \medskip\noindent In general, by assumption (3)(c) we may choose a resolution $\mathcal{F}^\bullet \to \mathcal{I}^\bullet = \lim \mathcal{I}_n^\bullet$ as in Lemma \ref{lemma-K-injective}. Then the map of the lemma becomes $$ \lim_n  \text{Tot}(\check{\mathcal{C}}^\bullet_{alt}(\mathcal{U}, \tau_{\geq -n}\mathcal{F}^\bullet)) \longrightarrow \Gamma(X, \mathcal{I}^\bullet) = \lim_n \Gamma(X, \mathcal{I}_n^\bullet) $$ Here the arrow is in the derived category, but the equality on the right holds on the level of complexes. Note that (3)(b) shows that $\tau_{\geq -n}\mathcal{F}^\bullet$ is a bounded below complex satisfying the hypothesis of the lemma. Thus the case of bounded below complexes shows each of the maps $$ \text{Tot}(\check{\mathcal{C}}^\bullet_{alt}(\mathcal{U}, \tau_{\geq -n}\mathcal{F}^\bullet)) \longrightarrow \Gamma(X, \mathcal{I}_n^\bullet) $$ is a quasi-isomorphism. The cohomologies of the complexes on the left hand side in given degree are eventually constant (as the alternating {\v C}ech complex is finite). Hence the same is true on the right hand side. Thus the cohomology of the limit on the right hand side is this constant value by Homology, Lemma \ref{homology-lemma-apply-Mittag-Leffler-again} (or the stronger More on Algebra, Lemma \ref{more-algebra-lemma-apply-Mittag-Leffler-again}) and we win.
We have \begin{align*} H^0(\Gamma(U, \SheafHom^\bullet(\mathcal{L}^\bullet, \mathcal{I}^\bullet))) & = \Hom_{K(\mathcal{O}_U)}(L|_U, M|_U) \\ & = \Hom_{D(\mathcal{O}_U)}(L|_U, M|_U) \end{align*} The first equality is (\ref{equation-cohomology-hom-complex}). The second equality is true because $\mathcal{I}^\bullet|_U$ is K-injective by Lemma \ref{lemma-restrict-K-injective-to-open}.
Let $M$ be the object of $D(\mathcal{O}_X)$ represented by $\mathcal{I}^\bullet$ and $(\mathcal{I}')^\bullet$. Let $L$ be the object of $D(\mathcal{O}_X)$ represented by $\mathcal{L}^\bullet$ and $(\mathcal{L}')^\bullet$. By Lemma \ref{lemma-RHom-into-K-injective} we see that the sheaves $$ H^0(\SheafHom^\bullet(\mathcal{L}^\bullet, (\mathcal{I}')^\bullet)) \quad\text{and}\quad H^0(\SheafHom^\bullet((\mathcal{L}')^\bullet, \mathcal{I}^\bullet)) $$ are both equal to the sheaf associated to the presheaf $$ U \longmapsto \Hom_{D(\mathcal{O}_U)}(L|_U, M|_U) $$ Thus the map is a quasi-isomorphism.
Namely, if $\mathcal{K}^\bullet$ is an acyclic complex of $\mathcal{O}_X$-modules, then \begin{align*} \Hom_{K(\mathcal{O}_X)}(\mathcal{K}^\bullet, \SheafHom^\bullet(\mathcal{L}^\bullet, \mathcal{I}^\bullet)) & = H^0(\Gamma(X, \SheafHom^\bullet(\mathcal{K}^\bullet, \SheafHom^\bullet(\mathcal{L}^\bullet, \mathcal{I}^\bullet)))) \\ & = H^0(\Gamma(X, \SheafHom^\bullet(\text{Tot}( \mathcal{K}^\bullet \otimes_{\mathcal{O}_X} \mathcal{L}^\bullet), \mathcal{I}^\bullet))) \\ & = \Hom_{K(\mathcal{O}_X)}( \text{Tot}(\mathcal{K}^\bullet \otimes_{\mathcal{O}_X} \mathcal{L}^\bullet), \mathcal{I}^\bullet) \\ & = 0 \end{align*} The first equality by (\ref{equation-cohomology-hom-complex}). The second equality by Lemma \ref{lemma-compose}. The third equality by (\ref{equation-cohomology-hom-complex}). The final equality because $\text{Tot}(\mathcal{K}^\bullet \otimes_{\mathcal{O}_X} \mathcal{L}^\bullet)$ is acyclic because $\mathcal{L}^\bullet$ is K-flat (Definition \ref{definition-K-flat}) and because $\mathcal{I}^\bullet$ is K-injective.
Choose a K-injective complex $\mathcal{I}^\bullet$ of $\mathcal{O}_X$-modules representing $M$ and a K-flat complex $\mathcal{L}^\bullet$ representing $L$. Then $\SheafHom^\bullet(\mathcal{L}^\bullet, \mathcal{I}^\bullet)$ is K-injective by Lemma \ref{lemma-RHom-from-K-flat-into-K-injective}. Hence we can compute cohomology over $U$ by simply taking sections over $U$ and the result follows from Lemma \ref{lemma-RHom-into-K-injective}.
Choose a K-injective complex $\mathcal{I}^\bullet$ representing $M$ and a K-flat complex of $\mathcal{O}_X$-modules $\mathcal{L}^\bullet$ representing $L$. Let $\mathcal{H}^\bullet$ be the complex described above. For any complex of $\mathcal{O}_X$-modules $\mathcal{K}^\bullet$ we have $$ \SheafHom^\bullet(\mathcal{K}^\bullet, \SheafHom^\bullet(\mathcal{L}^\bullet, \mathcal{I}^\bullet)) = \SheafHom^\bullet( \text{Tot}(\mathcal{K}^\bullet \otimes_{\mathcal{O}_X} \mathcal{L}^\bullet), \mathcal{I}^\bullet) $$ by Lemma \ref{lemma-compose}. Note that the left hand side represents $R\SheafHom(K, R\SheafHom(L, M))$ (use Lemma \ref{lemma-RHom-from-K-flat-into-K-injective}) and that the right hand side represents $R\SheafHom(K \otimes_{\mathcal{O}_X}^\mathbf{L} L, M)$. This proves the displayed formula of the lemma. Taking global sections and using Lemma \ref{lemma-section-RHom-over-U} we obtain (\ref{equation-internal-hom}).
Choose a K-injective complex $\mathcal{I}^\bullet$ representing $M$, a K-injective complex $\mathcal{J}^\bullet$ representing $L$, and any complex of $\mathcal{O}_X$-modules $\mathcal{K}^\bullet$ representing $K$. By Lemma \ref{lemma-composition} there is a map of complexes $$ \text{Tot}\left( \SheafHom^\bullet(\mathcal{J}^\bullet, \mathcal{I}^\bullet) \otimes_{\mathcal{O}_X} \SheafHom^\bullet(\mathcal{K}^\bullet, \mathcal{J}^\bullet) \right) \longrightarrow \SheafHom^\bullet(\mathcal{K}^\bullet, \mathcal{I}^\bullet) $$ The complexes of $\mathcal{O}_X$-modules $\SheafHom^\bullet(\mathcal{J}^\bullet, \mathcal{I}^\bullet)$, $\SheafHom^\bullet(\mathcal{K}^\bullet, \mathcal{J}^\bullet)$, and $\SheafHom^\bullet(\mathcal{K}^\bullet, \mathcal{I}^\bullet)$ represent $R\SheafHom(L, M)$, $R\SheafHom(K, L)$, and $R\SheafHom(K, M)$. If we choose a K-flat complex $\mathcal{H}^\bullet$ and a quasi-isomorphism $\mathcal{H}^\bullet \to \SheafHom^\bullet(\mathcal{K}^\bullet, \mathcal{J}^\bullet)$, then there is a map $$ \text{Tot}\left( \SheafHom^\bullet(\mathcal{J}^\bullet, \mathcal{I}^\bullet) \otimes_{\mathcal{O}_X} \mathcal{H}^\bullet \right) \longrightarrow \text{Tot}\left( \SheafHom^\bullet(\mathcal{J}^\bullet, \mathcal{I}^\bullet) \otimes_{\mathcal{O}_X} \SheafHom^\bullet(\mathcal{K}^\bullet, \mathcal{J}^\bullet) \right) $$ whose source represents $R\SheafHom(L, M) \otimes_{\mathcal{O}_X}^\mathbf{L} R\SheafHom(K, L)$. Composing the two displayed arrows gives the desired map. We omit the proof that the construction is functorial.