hcju/stacksqa huggingface dataset:
As $X$ is quasi-compact we can find an affine scheme $U$ and a surjective \'etale morphism $U \to X$ (Properties of Spaces, Lemma \ref{spaces-properties-lemma-quasi-compact-affine-cover}). Observe that $U$ is Noetherian. Note that $E$ is $m$-pseudo-coherent if and only if $E|_U$ is $m$-pseudo-coherent (follows from the definition or from Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-pseudo-coherent-independent-representative}). Similarly, $H^i(E)$ is coherent if and only if $H^i(E)|_U = H^i(E|_U)$ is coherent (see Cohomology of Spaces, Lemma \ref{spaces-cohomology-lemma-coherent-Noetherian}). Thus we may assume that $X$ is representable. \medskip\noindent If $X$ is representable by a scheme $X_0$ then (Lemma \ref{lemma-derived-quasi-coherent-small-etale-site}) we can write $E = \epsilon^*E_0$ where $E_0$ is an object of $D_\QCoh(\mathcal{O}_{X_0})$ and $\epsilon : X_\etale \to (X_0)_{Zar}$ is as in (\ref{equation-epsilon}). In this case $E$ is $m$-pseudo-coherent if and only if $E_0$ is by Lemma \ref{lemma-descend-pseudo-coherent}. Similarly, $H^i(E_0)$ is of finite type (i.e., coherent) if and only if $H^i(E)$ is by Lemma \ref{lemma-descend-finite-type}. Finally, $H^i(E_0) = 0$ if and only if $H^i(E) = 0$ by Lemma \ref{lemma-epsilon-flat}. Thus we reduce to the case of schemes which is Derived Categories of Schemes, Lemma \ref{perfect-lemma-identify-pseudo-coherent-noetherian}.
It is clear that (1) implies (2). Assume (2). Let $j : U \to X$ be an \'etale morphism with $U$ affine. As $X$ is quasi-separated $j : U \to X$ is quasi-compact and separated, hence $j_*$ transforms quasi-coherent modules into quasi-coherent modules (Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-pushforward}). Thus the functor $\QCoh(\mathcal{O}_X) \to \QCoh(\mathcal{O}_U)$ is essentially surjective. It follows that condition (2) implies the vanishing of $H^i(E|_U \otimes_{\mathcal{O}_U}^\mathbf{L} \mathcal{G})$ for $i \not \in [a, b]$ for all quasi-coherent $\mathcal{O}_U$-modules $\mathcal{G}$. Since it suffices to prove that $E|_U$ has tor amplitude in $[a, b]$ we reduce to the case where $X$ is representable. \medskip\noindent If $X$ is representable by a scheme $X_0$ then (Lemma \ref{lemma-derived-quasi-coherent-small-etale-site}) we can write $E = \epsilon^*E_0$ where $E_0$ is an object of $D_\QCoh(\mathcal{O}_{X_0})$ and $\epsilon : X_\etale \to (X_0)_{Zar}$ is as in (\ref{equation-epsilon}). For every quasi-coherent module $\mathcal{F}_0$ on $X_0$ the module $\epsilon^*\mathcal{F}_0$ is quasi-coherent on $X$ and $$ H^i(E \otimes_{\mathcal{O}_X}^\mathbf{L} \epsilon^*\mathcal{F}_0) = \epsilon^*H^i(E_0 \otimes_{\mathcal{O}_{X_0}}^\mathbf{L} \mathcal{F}_0) $$ as $\epsilon$ is flat (Lemma \ref{lemma-epsilon-flat}). Moreover, the vanishing of these sheaves for $i \not \in [a, b]$ implies the same thing for $H^i(E_0 \otimes_{\mathcal{O}_{X_0}}^\mathbf{L} \mathcal{F}_0)$ by the same lemma. Thus we've reduced the problem to the case of schemes which is treated in Derived Categories of Schemes, Lemma \ref{perfect-lemma-tor-qc-qs}.
Recall that $\epsilon$ is flat (Lemma \ref{lemma-epsilon-flat}) and hence $\epsilon^* = L\epsilon^*$. There is a canonical map from left to right by Cohomology on Sites, Remark \ref{sites-cohomology-remark-prepare-fancy-base-change}. To see this is an isomorphism we can work locally, i.e., we may assume $X$ is an affine scheme. \medskip\noindent In case (1) we can represent $E$ by a bounded above complex $\mathcal{E}^\bullet$ of finite free $\mathcal{O}_X$-modules, see Derived Categories of Schemes, Lemma \ref{perfect-lemma-lift-pseudo-coherent}. We may also represent $F$ by a bounded below complex $\mathcal{F}^\bullet$ of $\mathcal{O}_X$-modules. Applying Cohomology, Lemma \ref{cohomology-lemma-Rhom-complex-of-direct-summands-finite-free} we see that $R\SheafHom(E, F)$ is represented by the complex with terms $$ \bigoplus\nolimits_{n = - p + q} \SheafHom_{\mathcal{O}_X}(\mathcal{E}^p, \mathcal{F}^q) $$ Applying Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-Rhom-complex-of-direct-summands-finite-free} we see that $R\SheafHom(\epsilon^*E, \epsilon^*F)$ is represented by the complex with terms $$ \bigoplus\nolimits_{n = - p + q} \SheafHom_{\mathcal{O}_\etale} (\epsilon^*\mathcal{E}^p, \epsilon^*\mathcal{F}^q) $$ Thus the statement of the lemma boils down to the true fact that the canonical map $$ \epsilon^*\SheafHom_{\mathcal{O}_X}(\mathcal{E}, \mathcal{F}) \longrightarrow \SheafHom_{\mathcal{O}_\etale} (\epsilon^*\mathcal{E}, \epsilon^*\mathcal{F}) $$ is an isomorphism for any $\mathcal{O}_X$-module $\mathcal{F}$ and finite free $\mathcal{O}_X$-module $\mathcal{E}$. \medskip\noindent In case (2) we can represent $E$ by a strictly perfect complex $\mathcal{E}^\bullet$ of $\mathcal{O}_X$-modules, use Derived Categories of Schemes, Lemmas \ref{perfect-lemma-affine-compare-bounded} and \ref{perfect-lemma-perfect-affine} and the fact that a perfect complex of modules is represented by a finite complex of finite projective modules. Thus we can do the exact same proof as above, replacing the reference to Cohomology, Lemma \ref{cohomology-lemma-Rhom-complex-of-direct-summands-finite-free} by a reference to Cohomology, Lemma \ref{cohomology-lemma-Rhom-strictly-perfect}.
This follows from the analogue for schemes (Derived Categories of Schemes, Lemma \ref{perfect-lemma-quasi-coherence-internal-hom}) via the criterion of Lemma \ref{lemma-check-quasi-coherence-on-covering}, the criterion of Lemmas \ref{lemma-descend-pseudo-coherent} and \ref{lemma-descend-perfect}, and the result of Lemma \ref{lemma-descend-RHom}.
Checking whether or not the map is an isomorphism can be done \'etale locally hence we may assume $X$ is an affine scheme. Then we can write $K, L, M$ as $\epsilon^*K_0, \epsilon^*L_0, \epsilon^*M_0$ for some $K_0, L_0, M_0$ in $D_\QCoh(\mathcal{O}_X)$ by Lemma \ref{lemma-derived-quasi-coherent-small-etale-site}. Then we see that Lemma \ref{lemma-descend-RHom} reduces cases (1) and (3) to the case of schemes which is Derived Categories of Schemes, Lemma \ref{perfect-lemma-internal-hom-evaluate-tensor-isomorphism}. If $K$ is perfect but no other assumptions are made, then we do not know that either side of the arrow is in $D_\QCoh(\mathcal{O}_X)$ but the result is still true because $K$ will be represented (after localizing further) by a finite complex of finite free modules in which case it is clear.
Being perfect is local on $X_\etale$. Thus it suffices to check that $Rj_*E$ is perfect when restricted to $U$ and $V$. We have $Rj_*E|_V = E$ by Lemma \ref{lemma-pushforward-with-support-in-open} which is perfect. We have $Rj_*E|_U = 0$ because $E|_{V \setminus j^{-1}(T)} = 0$ (use Lemma \ref{lemma-restrict-direct-image-open}).
Let $P \to E|_V$ be an approximation of the triple $(j^{-1}T, E|_V, m)$ over $V$. Then $Rj_*P$ is a perfect object of $D(\mathcal{O}_X)$ by Lemma \ref{lemma-pushforward-perfect}. On the other hand, $Rj_*P = j_!P$ by Lemma \ref{lemma-pushforward-with-support-in-open}. We see that $j_!P$ is supported on $T$ for example by (\ref{equation-stalk-j-shriek}). Hence we obtain an approximation $Rj_*P = j_!P \to j_!(E|_V) \to E$.
Let $X_0$ be an affine scheme representing $X$. Let $T_0 \subset X_0$ by the closed subset corresponding to $T$. Let $\epsilon : X_\etale \to X_{0, Zar}$ be the morphism (\ref{equation-epsilon}). We may write $E = \epsilon^*E_0$ for some object $E_0$ of $D_\QCoh(\mathcal{O}_{X_0})$, see Lemma \ref{lemma-derived-quasi-coherent-small-etale-site}. Then $E_0$ is $m$-pseudo-coherent, see Lemma \ref{lemma-descend-pseudo-coherent}. Comparing stalks of cohomology sheaves (see proof of Lemma \ref{lemma-epsilon-flat}) we see that $H^i(E_0)$ is supported on $T_0$ for $i \geq m - r + 1$. By Derived Categories of Schemes, Lemma \ref{perfect-lemma-approximation-affine} there exists an approximation $P_0 \to E_0$ of $(T_0, E_0, m)$. By Lemma \ref{lemma-descend-perfect} we see that $P = \epsilon^*P_0$ is a perfect object of $D(\mathcal{O}_X)$. Pulling back we obtain an approximation $P = \epsilon^*P_0 \to \epsilon^*E_0 = E$ as desired.
We will use the induction principle of Lemma \ref{lemma-induction-principle-enlarge} to prove this. Thus we immediately reduce to the case where we have an elementary distinguished square $(W \subset X, f : V \to X)$ with $V$ affine and $P \to E|_W$ as in the statement of the lemma. In the rest of the proof we will use Lemma \ref{lemma-derived-quasi-coherent-small-etale-site} (and the compatibilities of Remark \ref{remark-match-total-direct-images}) for the representable algebraic spaces $V$ and $W \times_X V$. We will also use the fact that perfectness on the Zariski site and \'etale site agree, see Lemma \ref{lemma-descend-perfect}. \medskip\noindent By Derived Categories of Schemes, Lemma \ref{perfect-lemma-lift-perfect-complex-plus-shift-support} we can choose a perfect object $Q$ in $D(\mathcal{O}_V)$ supported on $f^{-1}T$ and an isomorphism $Q|_{W \times_X V} \to (P \oplus P[1])|_{W \times_X V}$. By Derived Categories of Schemes, Lemma \ref{perfect-lemma-lift-map} we can replace $Q$ by $Q \otimes^\mathbf{L} I$ (still supported on $f^{-1}T$) and assume that the map $$ Q|_{W \times_X V} \to (P \oplus P[1])|_{W \times V} \longrightarrow P|_{W \times_X V} \longrightarrow E|_{W \times_X V} $$ lifts to $Q \to E|_V$. By Lemma \ref{lemma-glue} we find an morphism $a : R \to E$ of $D(\mathcal{O}_X)$ such that $a|_W$ is isomorphic to $P \oplus P[1] \to E|_W$ and $a|_V$ isomorphic to $Q \to E|_V$. Thus $R$ is perfect and supported on $T$ as desired.
We observe that $D_{\QCoh, T}(\mathcal{O}_X)$ is a triangulated category with direct sums by the remark preceding the lemma. By Proposition \ref{proposition-compact-is-perfect} the perfect objects define compact objects of $D(\mathcal{O}_X)$ hence a fortiori of any subcategory preserved under taking direct sums. For the converse we will use there exists a generator $E \in D_{\QCoh, T}(\mathcal{O}_X)$ which is a perfect complex of $\mathcal{O}_X$-modules, see Lemma \ref{lemma-generator-with-support}. Hence by the above, $E$ is compact. Then it follows from Derived Categories, Proposition \ref{derived-proposition-generator-versus-classical-generator} that $E$ is a classical generator of the full subcategory of compact objects of $D_{\QCoh, T}(\mathcal{O}_X)$. Thus any compact object can be constructed out of $E$ by a finite sequence of operations consisting of (a) taking shifts, (b) taking finite direct sums, (c) taking cones, and (d) taking direct summands. Each of these operations preserves the property of being perfect and the result follows.
Set $\mathcal{D} = D_{\QCoh, T}(\mathcal{O}_X)$. In both cases the complex $K = R\SheafHom(P, E)$ is an object of $\mathcal{D}$. See Lemma \ref{lemma-quasi-coherence-internal-hom} for quasi-coherence. It is clear that $K$ is supported on $T$ as formation of $R\SheafHom$ commutes with restriction to opens. The map $\alpha$ defines an element of $H^0(K) = \Hom_{D(\mathcal{O}_X)}(\mathcal{O}_X[0], K)$. Then it suffices to prove the result for the map $\alpha : \mathcal{O}_X[0] \to K$. \medskip\noindent Let $E \in \mathcal{D}$ be a perfect generator, see Lemma \ref{lemma-generator-with-support}. Write $$ K = \text{hocolim} K_n $$ as in Derived Categories, Lemma \ref{derived-lemma-write-as-colimit} using the generator $E$. Since the functor $\mathcal{D} \to D(\mathcal{O}_X)$ commutes with direct sums, we see that $K = \text{hocolim} K_n$ holds in $D(\mathcal{O}_X)$. Since $\mathcal{O}_X$ is a compact object of $D(\mathcal{O}_X)$ we find an $n$ and a morphism $\alpha_n : \mathcal{O}_X \to K_n$ which gives rise to $\alpha$, see Derived Categories, Lemma \ref{derived-lemma-commutes-with-countable-sums}. By Derived Categories, Lemma \ref{derived-lemma-factor-through} applied to the morphism $\mathcal{O}_X[0] \to K_n$ in the ambient category $D(\mathcal{O}_X)$ we see that $\alpha_n$ factors as $\mathcal{O}_X[0] \to Q \to K_n$ where $Q$ is an object of $\langle E \rangle$. We conclude that $Q$ is a perfect complex supported on $T$. \medskip\noindent Choose a distinguished triangle $$ I \to \mathcal{O}_X[0] \to Q \to I[1] $$ By construction $I$ is perfect, the map $I \to \mathcal{O}_X[0]$ restricts to an isomorphism over $U$, and the composition $I \to K$ is zero as $\alpha$ factors through $Q$. This proves the lemma.
Part (2) follows from (1) as $\Ext^n_{D(\mathcal{O}_X)}(K, L) = \Hom_{D(\mathcal{O}_X)}(K, L[n])$. We prove (1). Since $K$ is perfect we have $$ \Ext^i_{D(\mathcal{O}_X)}(K, L) = H^i(X, K^\vee \otimes_{\mathcal{O}_X}^\mathbf{L} L) $$ where $K^\vee$ is the ``dual'' perfect complex to $K$, see Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-dual-perfect-complex}. Note that $P = K^\vee \otimes_{\mathcal{O}_X}^\mathbf{L} L$ is in $D_\QCoh(X)$ by Lemmas \ref{lemma-quasi-coherence-tensor-product} and \ref{lemma-pseudo-coherent} (to see that a perfect complex has quasi-coherent cohomology sheaves). Say $K^\vee$ has tor amplitude in $[a, b]$. Then the spectral sequence $$ E_1^{p, q} = H^p(K^\vee \otimes_{\mathcal{O}_X}^\mathbf{L} H^q(L)) \Rightarrow H^{p + q}(K^\vee \otimes_{\mathcal{O}_X}^\mathbf{L} L) $$ shows that $H^j(K^\vee \otimes_{\mathcal{O}_X}^\mathbf{L} L)$ is zero if $H^q(L) = 0$ for $q \in [j - b, j - a]$. Let $N$ be the integer $\max(d_p + p)$ of Cohomology of Spaces, Lemma \ref{spaces-cohomology-lemma-vanishing-quasi-separated}. Then $H^0(X, K^\vee \otimes_{\mathcal{O}_X}^\mathbf{L} L)$ vanishes if the cohomology sheaves $$ H^{-N}(K^\vee \otimes_{\mathcal{O}_X}^\mathbf{L} L), \ H^{-N + 1}(K^\vee \otimes_{\mathcal{O}_X}^\mathbf{L} L), \ \ldots, \ H^0(K^\vee \otimes_{\mathcal{O}_X}^\mathbf{L} L) $$ are zero. Namely, by the lemma cited and Lemma \ref{lemma-application-nice-K-injective}, we have $$ H^0(X, K^\vee \otimes_{\mathcal{O}_X}^\mathbf{L} L) = H^0(X, \tau_{\geq -N}(K^\vee \otimes_{\mathcal{O}_X}^\mathbf{L} L)) $$ and by the vanishing of cohomology sheaves, this is equal to $H^0(X, \tau_{\geq 1}(K^\vee \otimes_{\mathcal{O}_X}^\mathbf{L} L))$ which is zero by Derived Categories, Lemma \ref{derived-lemma-negative-vanishing}. It follows that $\Hom_{D(\mathcal{O}_X)}(K, L)$ is zero if $H^i(L) = 0$ for $i \in [-b - N, -a]$.
The implication (2) $\Rightarrow$ (1) is true on any ringed site. Namely, assume (2) holds. Recall that a perfect object of the derived category is pseudo-coherent, see Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-perfect}. Then it follows from the definitions that $\tau_{\geq -n}K_n$ is $(-n + 1)$-pseudo-coherent and hence $\tau_{\geq -n}K$ is $(-n + 1)$-pseudo-coherent, hence $K$ is $(-n + 1)$-pseudo-coherent. This is true for all $n$, hence $K$ is pseudo-coherent, see Cohomology on Sites, Definition \ref{sites-cohomology-definition-pseudo-coherent}. \medskip\noindent Assume (1). We start by choosing an approximation $K_1 \to K$ of $(X, K, -2)$ by a perfect complex $K_1$, see Definitions \ref{definition-approximation-holds} and \ref{definition-approximation} and Theorem \ref{theorem-approximation}. Suppose by induction we have $$ K_1 \to K_2 \to \ldots \to K_n \to K $$ with $K_i$ perfect such that such that $\tau_{\geq -i}K_i \to \tau_{\geq -i}K$ is an isomorphism for all $1 \leq i \leq n$. Then we pick $a \leq b$ as in Lemma \ref{lemma-ext-from-perfect-into-bounded-QCoh} for the perfect object $K_n$. Choose an approximation $K_{n + 1} \to K$ of $(X, K, \min(a - 1, -n - 1))$. Choose a distinguished triangle $$ K_{n + 1} \to K \to C \to K_{n + 1}[1] $$ Then we see that $C \in D_\QCoh(\mathcal{O}_X)$ has $H^i(C) = 0$ for $i \geq a$. Thus by our choice of $a, b$ we see that $\Hom_{D(\mathcal{O}_X)}(K_n, C) = 0$. Hence the composition $K_n \to K \to C$ is zero. Hence by Derived Categories, Lemma \ref{derived-lemma-representable-homological} we can factor $K_n \to K$ through $K_{n + 1}$ proving the induction step. \medskip\noindent We still have to prove that $K = \text{hocolim} K_n$. This follows by an application of Derived Categories, Lemma \ref{derived-lemma-cohomology-of-hocolim} to the functors $H^i( - ) : D(\mathcal{O}_X) \to \textit{Mod}(\mathcal{O}_X)$ and our choice of $K_n$.
[First proof] We will use the induction principle in Lemma \ref{lemma-induction-principle} to prove this. If $D(\QCoh(\mathcal{O}_X)) \to D_\QCoh(\mathcal{O}_X)$ is an equivalence, then the lemma is true because the functor $RQ_X$ of Section \ref{section-coherator} is a right adjoint to the functor $D(\QCoh(\mathcal{O}_X)) \to D(\mathcal{O}_X)$. In particular, our lemma is true for affine algebraic spaces, see Lemma \ref{lemma-affine-coherator}. Thus we see that it suffices to show: if $(U \subset X, f : V \to X)$ is an elementary distinguished square with $U$ quasi-compact and $V$ affine and the lemma holds for $U$, $V$, and $U \times_X V$, then the lemma holds for $X$. \medskip\noindent The adjoint exists if and only if for every object $K$ of $D(\mathcal{O}_X)$ we can find a distinguished triangle $$ E' \to E \to K \to E'[1] $$ in $D(\mathcal{O}_X)$ such that $E'$ is in $D_\QCoh(\mathcal{O}_X)$ and such that $\Hom(M, K) = 0$ for all $M$ in $D_\QCoh(\mathcal{O}_X)$. See Derived Categories, Lemma \ref{derived-lemma-right-adjoint}. Consider the distinguished triangle $$ E \to Rj_{U, *}E|_U \oplus Rj_{V, *}E|_V \to Rj_{U \times_X V, *}E|_{U \times_X V} \to E[1] $$ in $D(\mathcal{O}_X)$ of Lemma \ref{lemma-exact-sequence-j-star}. By Derived Categories, Lemma \ref{derived-lemma-prepare-adjoint} it suffices to construct the desired distinguished triangles for $Rj_{U, *}E|_U$, $Rj_{V, *}E|_V$, and $Rj_{U \times_X V, *}E|_{U \times_X V}$. This reduces us to the statement discussed in the next paragraph. \medskip\noindent Let $j : U \to X$ be an \'etale morphism corresponding with $U$ quasi-compact and quasi-separated and the lemma is true for $U$. Let $L$ be an object of $D(\mathcal{O}_U)$. Then there exists a distinguished triangle $$ E' \to Rj_*L \to K \to E'[1] $$ in $D(\mathcal{O}_X)$ such that $E'$ is in $D_\QCoh(\mathcal{O}_X)$ and such that $\Hom(M, K) = 0$ for all $M$ in $D_\QCoh(\mathcal{O}_X)$. To see this we choose a distinguished triangle $$ L' \to L \to Q \to L'[1] $$ in $D(\mathcal{O}_U)$ such that $L'$ is in $D_\QCoh(\mathcal{O}_U)$ and such that $\Hom(N, Q) = 0$ for all $N$ in $D_\QCoh(\mathcal{O}_U)$. This is possible because the statement in Derived Categories, Lemma \ref{derived-lemma-right-adjoint} is an if and only if. We obtain a distinguished triangle $$ Rj_*L' \to Rj_*L \to Rj_*Q \to Rj_*L'[1] $$ in $D(\mathcal{O}_X)$. Observe that $Rj_*L'$ is in $D_\QCoh(\mathcal{O}_X)$ by Lemma \ref{lemma-quasi-coherence-direct-image}. On the other hand, if $M$ in $D_\QCoh(\mathcal{O}_X)$, then $$ \Hom(M, Rj_*Q) = \Hom(Lj^*M, Q) = 0 $$ because $Lj^*M$ is in $D_\QCoh(\mathcal{O}_U)$ by Lemma \ref{lemma-quasi-coherence-pullback}. This finishes the proof.
The statement makes sense because $Rf_*$ sends $D_\QCoh(\mathcal{O}_X)$ into $D_\QCoh(\mathcal{O}_Y)$ by Lemma \ref{lemma-quasi-coherence-direct-image}. The statement is true because $Lf^*$ similarly maps $D_\QCoh(\mathcal{O}_Y)$ into $D_\QCoh(\mathcal{O}_X)$ (Lemma \ref{lemma-quasi-coherence-pullback}) and hence both $Rf_* \circ DQ_X$ and $DQ_Y \circ Rf_*$ are right adjoint to $Lf^* : D_\QCoh(\mathcal{O}_Y) \to D(\mathcal{O}_X)$.
We will prove this using the induction principle of Lemma \ref{lemma-induction-principle}. \medskip\noindent If $X$ is affine, then the lemma is true with $N = 0$ because then $RQ_X = DQ_X$ is given by taking the complex of quasi-coherent sheaves associated to $R\Gamma(X, K)$. See Lemma \ref{lemma-affine-coherator}. \medskip\noindent Let $(U \subset W, f : V \to W)$ be an elementary distinguished square with $W$ quasi-compact and quasi-separated, $U \subset W$ quasi-compact open, $V$ affine such that the lemma holds for $U$, $V$, and $U \times_W V$. Say with integers $N(U)$, $N(V)$, and $N(U \times_W V)$. Now suppose $K$ is in $D(\mathcal{O}_X)$ with $H^i(W, K) = 0$ for all affine $W$ \'etale over $X$ and all $i \not \in [a, b]$. Then $K|_U$, $K|_V$, $K|_{U \times_W V}$ have the same property. Hence we see that $RQ_U(K|_U)$ and $RQ_V(K|_V)$ and $RQ_{U \cap V}(K|_{U \times_W V})$ have vanishing cohomology sheaves outside the inverval $[a, b + \max(N(U), N(V), N(U \times_W V))$. Since the functors $Rj_{U, *}$, $Rj_{V, *}$, $Rj_{U \times_W V, *}$ have finite cohomological dimension on $D_\QCoh$ by Lemma \ref{lemma-quasi-coherence-direct-image} we see that there exists an $N$ such that $Rj_{U, *}DQ_U(K|_U)$, $Rj_{V, *}DQ_V(K|_V)$, and $Rj_{U \cap V, *}DQ_{U \times_W V}(K|_{U \times_W V})$ have vanishing cohomology sheaves outside the interval $[a, b + N]$. Then finally we conclude by the distinguished triangle of Remark \ref{remark-explain-consequence}.
Without any assumptions there is a map $Rf_*(E) \otimes_{\mathcal{O}_Y}^\mathbf{L} K \to Rf_*(E \otimes_{\mathcal{O}_X}^\mathbf{L} Lf^*K)$. Namely, it is the adjoint to the canonical map $$ Lf^*(Rf_*(E) \otimes_{\mathcal{O}_Y}^\mathbf{L} K) = Lf^*(Rf_*(E)) \otimes_{\mathcal{O}_X}^\mathbf{L} Lf^*K \longrightarrow E \otimes_{\mathcal{O}_X}^\mathbf{L} Lf^*K $$ coming from the map $Lf^*Rf_*E \to E$. See Cohomology on Sites, Lemmas \ref{sites-cohomology-lemma-pullback-tensor-product} and \ref{sites-cohomology-lemma-adjoint}. To check it is an isomorphism we may work \'etale locally on $Y$. Hence we reduce to the case that $Y$ is an affine scheme. \medskip\noindent Suppose that $K = \bigoplus K_i$ is a direct sum of some complexes $K_i \in D_\QCoh(\mathcal{O}_Y)$. If the statement holds for each $K_i$, then it holds for $K$. Namely, the functors $Lf^*$ and $\otimes^\mathbf{L}$ preserve direct sums by construction and $Rf_*$ commutes with direct sums (for complexes with quasi-coherent cohomology sheaves) by Lemma \ref{lemma-quasi-coherence-pushforward-direct-sums}. Moreover, suppose that $K \to L \to M \to K[1]$ is a distinguished triangle in $D_\QCoh(Y)$. Then if the statement of the lemma holds for two of $K, L, M$, then it holds for the third (as the functors involved are exact functors of triangulated categories). \medskip\noindent Assume $Y$ affine, say $Y = \Spec(A)$. The functor $\widetilde{\ } : D(A) \to D_\QCoh(\mathcal{O}_Y)$ is an equivalence by Lemma \ref{lemma-derived-quasi-coherent-small-etale-site} and Derived Categories of Schemes, Lemma \ref{perfect-lemma-affine-compare-bounded}. Let $T$ be the property for $K \in D(A)$ that the statement of the lemma holds for $\widetilde{K}$. The discussion above and More on Algebra, Remark \ref{more-algebra-remark-P-resolution} shows that it suffices to prove $T$ holds for $A[k]$. This finishes the proof, as the statement of the lemma is clear for shifts of the structure sheaf.