hcju/stacksqa huggingface dataset:
Choose a K-flat complex $\mathcal{K}^\bullet$ representing $K$, and a K-injective complex $\mathcal{I}^\bullet$ representing $L$, and choose any complex of $\mathcal{O}_X$-modules $\mathcal{M}^\bullet$ representing $M$. Choose a quasi-isomorphism $\text{Tot}(\mathcal{K}^\bullet \otimes_{\mathcal{O}_X} \mathcal{I}^\bullet) \to \mathcal{J}^\bullet$ where $\mathcal{J}^\bullet$ is K-injective. Then we use the map $$ \text{Tot}\left( \mathcal{K}^\bullet \otimes_{\mathcal{O}_X} \SheafHom^\bullet(\mathcal{M}^\bullet, \mathcal{I}^\bullet) \right) \to \SheafHom^\bullet(\mathcal{M}^\bullet, \text{Tot}(\mathcal{K}^\bullet \otimes_{\mathcal{O}_X} \mathcal{I}^\bullet)) \to \SheafHom^\bullet(\mathcal{M}^\bullet, \mathcal{J}^\bullet) $$ where the first map is the map from Lemma \ref{lemma-diagonal-better}.
Choose a K-flat complex $\mathcal{K}^\bullet$ representing $K$ and any complex of $\mathcal{O}_X$-modules $\mathcal{L}^\bullet$ representing $L$. Choose a K-injective complex $\mathcal{J}^\bullet$ and a quasi-isomorphism $\text{Tot}(\mathcal{K}^\bullet \otimes_{\mathcal{O}_X} \mathcal{L}^\bullet) \to \mathcal{J}^\bullet$. Then we use $$ \mathcal{K}^\bullet \to \SheafHom^\bullet(\mathcal{L}^\bullet, \text{Tot}(\mathcal{K}^\bullet \otimes_{\mathcal{O}_X} \mathcal{L}^\bullet)) \to \SheafHom^\bullet(\mathcal{L}^\bullet, \mathcal{J}^\bullet) $$ where the first map comes from Lemma \ref{lemma-diagonal}.
Choose a K-injective complex $\mathcal{I}^\bullet$ representing $M$, a K-injective complex $\mathcal{J}^\bullet$ representing $L$, and a K-flat complex $\mathcal{K}^\bullet$ representing $K$. The map is defined using the map $$ \text{Tot}(\SheafHom^\bullet(\mathcal{J}^\bullet, \mathcal{I}^\bullet) \otimes_{\mathcal{O}_X} \mathcal{K}^\bullet) \longrightarrow \SheafHom^\bullet(\SheafHom^\bullet(\mathcal{K}^\bullet, \mathcal{J}^\bullet), \mathcal{I}^\bullet) $$ of Lemma \ref{lemma-evaluate-and-more}. By our particular choice of complexes the left hand side represents $R\SheafHom(L, M) \otimes_{\mathcal{O}_X}^\mathbf{L} K$ and the right hand side represents $R\SheafHom(R\SheafHom(K, L), M)$. We omit the proof that this is functorial in all three objects of $D(\mathcal{O}_X)$.
Denote $j_U$, $j_V$, $j_{U \cap V}$ the corresponding open immersions. Choose a distinguished triangle $$ F \to Rj_{U, *}A \oplus Rj_{V, *}B \to Rj_{U \cap V, *}(B|_{U \cap V}) \to F[1] $$ where the map $Rj_{V, *}B \to Rj_{U \cap V, *}(B|_{U \cap V})$ is the obvious one and where $Rj_{U, *}A \to Rj_{U \cap V, *}(B|_{U \cap V})$ is the composition of $Rj_{U, *}A \to Rj_{U \cap V, *}(A|_{U \cap V})$ with $Rj_{U \cap V, *}c$. Restricting to $U$ we obtain $$ F|_U \to A \oplus (Rj_{V, *}B)|_U \to (Rj_{U \cap V, *}(B|_{U \cap V}))|_U \to F|_U[1] $$ Denote $j : U \cap V \to U$. Compatibility of restriction to opens and cohomology shows that both $(Rj_{V, *}B)|_U$ and $(Rj_{U \cap V, *}(B|_{U \cap V}))|_U$ are canonically isomorphic to $Rj_*(B|_{U \cap V})$. Hence the second arrow of the last displayed diagram has a section, and we conclude that the morphism $F|_U \to A$ is an isomorphism. Similarly, the morphism $F|_V \to B$ is an isomorphism. The existence of the morphism $F \to E$ follows from the Mayer-Vietoris sequence for $\Hom$, see Lemma \ref{lemma-mayer-vietoris-hom}.
Lemma \ref{lemma-unbounded-describe-higher-direct-images} tells us $H^i(Rf_*K)$ is the sheaf associated to the presheaf $V \mapsto H^i(f^{-1}(V), K) = H^i(V, Rf_*K)$. The assumptions in (1) imply that $Rf_*K$ has vanishing cohomology sheaves in degrees $< 0$. We conclude that for any open $V \subset Y$ the cohomology group $H^i(V, Rf_*K)$ is zero for $i < 0$ and is equal to $H^0(V, H^0(Rf_*K))$ for $i = 0$. This proves (1). \medskip\noindent To prove (2) apply (1) to the complex $R\SheafHom(K, L)$ using Lemma \ref{lemma-section-RHom-over-U} to do the translation.
Let $(K, \rho_U)$ and $(K', \rho'_U)$ be a pair of solutions. Let $f : X \to Y$ be the continuous map constructed in Topology, Lemma \ref{topology-lemma-create-map-from-subcollection}. Set $\mathcal{O}_Y = f_*\mathcal{O}_X$. Then $K, K'$ and $\mathcal{B}$ are as in Lemma \ref{lemma-vanishing-and-glueing} part (2). Hence we obtain the vanishing of negative exts for $K$ and we see that the rule $$ V \longmapsto \Hom(K|_{f^{-1}V}, K'|_{f^{-1}V}) $$ is a sheaf on $Y$. As both $(K, \rho_U)$ and $(K', \rho'_U)$ are solutions the maps $$ (\rho'_U)^{-1} \circ \rho_U : K|_U \longrightarrow K'|_U $$ over $U = f^{-1}(f(U))$ agree on overlaps. Hence we get a unique global section of the sheaf above which defines the desired isomorphism $K \to K'$ compatible with all structure available.
Uniqueness was seen in Lemma \ref{lemma-uniqueness}. We may prove the lemma by induction on $n$. The case $n = 1$ is immediate. \medskip\noindent The case $n = 2$. Consider the isomorphism $\rho_{U_1, U_2} : K_{U_1}|_{U_1 \cap U_2} \to K_{U_2}|_{U_1 \cap U_2}$ constructed in Remark \ref{remark-uniqueness}. By Lemma \ref{lemma-glue} we obtain an object $K$ in $D(\mathcal{O}_X)$ and isomorphisms $\rho_{U_1} : K|_{U_1} \to K_{U_1}$ and $\rho_{U_2} : K|_{U_2} \to K_{U_2}$ compatible with $\rho_{U_1, U_2}$. Take $U \in \mathcal{B}$. We will construct an isomorphism $\rho_U : K|_U \to K_U$ and we will leave it to the reader to verify that $(K, \rho_U)$ is a solution. Consider the set $\mathcal{B}'$ of elements of $\mathcal{B}$ contained in either $U \cap U_1$ or contained in $U \cap U_2$. Then $(K_U, \rho^U_{U'})$ is a solution for the system $(\{K_{U'}\}_{U' \in \mathcal{B}'}, \{\rho_{V'}^{U'}\}_{V' \subset U'\text{ with }U', V' \in \mathcal{B}'})$ on the ringed space $U$. We claim that $(K|_U, \tau_{U'})$ is another solution where $\tau_{U'}$ for $U' \in \mathcal{B}'$ is chosen as follows: if $U' \subset U_1$ then we take the composition $$ K|_{U'} \xrightarrow{\rho_{U_1}|_{U'}} K_{U_1}|_{U'} \xrightarrow{\rho^{U_1}_{U'}} K_{U'} $$ and if $U' \subset U_2$ then we take the composition $$ K|_{U'} \xrightarrow{\rho_{U_2}|_{U'}} K_{U_2}|_{U'} \xrightarrow{\rho^{U_2}_{U'}} K_{U'}. $$ To verify this is a solution use the property of the map $\rho_{U_1, U_2}$ described in Remark \ref{remark-uniqueness} and the compatibility of $\rho_{U_1}$ and $\rho_{U_2}$ with $\rho_{U_1, U_2}$. Having said this we apply Lemma \ref{lemma-uniqueness} to see that we obtain a unique isomorphism $K|_{U'} \to K_{U'}$ compatible with the maps $\tau_{U'}$ and $\rho^U_{U'}$ for $U' \in \mathcal{B}'$. \medskip\noindent The case $n > 2$. Consider the open subspace $X' = U_1 \cup \ldots \cup U_{n - 1}$ and let $\mathcal{B}'$ be the set of elements of $\mathcal{B}$ contained in $X'$. Then we find a system $(\{K_U\}_{U \in \mathcal{B}'}, \{\rho_V^U\}_{U, V \in \mathcal{B}'})$ on the ringed space $X'$ to which we may apply our induction hypothesis. We find a solution $(K_{X'}, \rho^{X'}_U)$. Then we can consider the collection $\mathcal{B}^* = \mathcal{B} \cup \{X'\}$ of opens of $X$ and we see that we obtain a system $(\{K_U\}_{U \in \mathcal{B}^*}, \{\rho_V^U\}_{V \subset U\text{ with }U, V \in \mathcal{B}^*})$. Note that this new system also satisfies condition (3) by Lemma \ref{lemma-uniqueness} applied to the solution $K_{X'}$. For this system we have $X = X' \cup U_n$. This reduces us to the case $n = 2$ we worked out above.
The first statement follows from the second, hence we only prove (2). We will prove this by induction on the length of the complex $\mathcal{E}^\bullet$. If $\mathcal{E}^\bullet \cong \mathcal{E}[-n]$ for some direct summand $\mathcal{E}$ of a finite free $\mathcal{O}_X$-module and integer $n \geq a$, then the result follows from Lemma \ref{lemma-local-lift-map} and the fact that $\mathcal{F}^{n - 1} \to \Ker(\mathcal{F}^n \to \mathcal{F}^{n + 1})$ is surjective by the assumed vanishing of $H^n(\mathcal{F}^\bullet)$. If $\mathcal{E}^i$ is zero except for $i \in [a, b]$, then we have a split exact sequence of complexes $$ 0 \to \mathcal{E}^b[-b] \to \mathcal{E}^\bullet \to \sigma_{\leq b - 1}\mathcal{E}^\bullet \to 0 $$ which determines a distinguished triangle in $K(\mathcal{O}_X)$. Hence an exact sequence $$ \Hom_{K(\mathcal{O}_X)}( \sigma_{\leq b - 1}\mathcal{E}^\bullet, \mathcal{F}^\bullet) \to \Hom_{K(\mathcal{O}_X)}(\mathcal{E}^\bullet, \mathcal{F}^\bullet) \to \Hom_{K(\mathcal{O}_X)}(\mathcal{E}^b[-b], \mathcal{F}^\bullet) $$ by the axioms of triangulated categories. The composition $\mathcal{E}^b[-b] \to \mathcal{F}^\bullet$ is locally homotopic to zero, whence we may assume our map comes from an element in the left hand side of the displayed exact sequence above. This element is locally zero by induction hypothesis.
Our assumptions on $f$ imply the cone $C(f)^\bullet$ has vanishing cohomology sheaves in degrees $\geq a$. Hence Lemma \ref{lemma-local-homotopy} guarantees there is an open covering $X = \bigcup U_i$ such that the composition $\mathcal{E}^\bullet \to \mathcal{F}^\bullet \to C(f)^\bullet$ is homotopic to zero over $U_i$. Since $$ \mathcal{G}^\bullet \to \mathcal{F}^\bullet \to C(f)^\bullet \to \mathcal{G}^\bullet[1] $$ restricts to a distinguished triangle in $K(\mathcal{O}_{U_i})$ we see that we can lift $\alpha|_{U_i}$ up to homotopy to a map $\alpha_i : \mathcal{E}^\bullet|_{U_i} \to \mathcal{G}^\bullet|_{U_i}$ as desired.
Proof of (1). By the construction of the derived category we can find a quasi-isomorphism $f : \mathcal{F}^\bullet \to \mathcal{G}^\bullet$ and a map of complexes $\beta : \mathcal{E}^\bullet \to \mathcal{G}^\bullet$ such that $\alpha = f^{-1}\beta$. Thus the result follows from Lemma \ref{lemma-lift-through-quasi-isomorphism}. We omit the proof of (2).
Choose a quasi-isomorphism $\mathcal{F}^\bullet \to \mathcal{I}^\bullet$ into a K-injective complex. Let $(\mathcal{H}')^\bullet$ be the complex with terms $$ (\mathcal{H}')^n = \prod\nolimits_{n = p + q} \SheafHom_{\mathcal{O}_X}(\mathcal{L}^{-q}, \mathcal{I}^p) $$ which represents $R\SheafHom(\mathcal{E}^\bullet, \mathcal{F}^\bullet)$ by the construction in Section \ref{section-internal-hom}. It suffices to show that the map $$ \mathcal{H}^\bullet \longrightarrow (\mathcal{H}')^\bullet $$ is a quasi-isomorphism. Given an open $U \subset X$ we have by inspection $$ H^0(\mathcal{H}^\bullet(U)) = \Hom_{K(\mathcal{O}_U)}(\mathcal{E}^\bullet|_U, \mathcal{K}^\bullet|_U) \to H^0((\mathcal{H}')^\bullet(U)) = \Hom_{D(\mathcal{O}_U)}(\mathcal{E}^\bullet|_U, \mathcal{K}^\bullet|_U) $$ By Lemma \ref{lemma-local-actual} the sheafification of $U \mapsto H^0(\mathcal{H}^\bullet(U))$ is equal to the sheafification of $U \mapsto H^0((\mathcal{H}')^\bullet(U))$. A similar argument can be given for the other cohomology sheaves. Thus $\mathcal{H}^\bullet$ is quasi-isomorphic to $(\mathcal{H}')^\bullet$ which proves the lemma.
Choose a quasi-isomorphism $\mathcal{F}^\bullet \to \mathcal{I}^\bullet$ where $\mathcal{I}^\bullet$ is a bounded below complex of injectives. Note that $\mathcal{I}^\bullet$ is K-injective (Derived Categories, Lemma \ref{derived-lemma-bounded-below-injectives-K-injective}). Hence the construction in Section \ref{section-internal-hom} shows that $R\SheafHom(\mathcal{E}^\bullet, \mathcal{F}^\bullet)$ is  represented by the complex $(\mathcal{H}')^\bullet$ with terms $$ (\mathcal{H}')^n = \prod\nolimits_{n = p + q} \SheafHom_{\mathcal{O}_X}(\mathcal{E}^{-q}, \mathcal{I}^p) = \bigoplus\nolimits_{n = p + q} \SheafHom_{\mathcal{O}_X}(\mathcal{E}^{-q}, \mathcal{I}^p) $$ (equality because there are only finitely many nonzero terms). Note that $\mathcal{H}^\bullet$ is the total complex associated to the double complex with terms $\SheafHom_{\mathcal{O}_X}(\mathcal{E}^{-q}, \mathcal{F}^p)$ and similarly for $(\mathcal{H}')^\bullet$. The natural map $(\mathcal{H}')^\bullet \to \mathcal{H}^\bullet$ comes from a map of double complexes. Thus to show this map is a quasi-isomorphism, we may use the spectral sequence of a double complex (Homology, Lemma \ref{homology-lemma-first-quadrant-ss}) $$ {}'E_1^{p, q} = H^p(\SheafHom_{\mathcal{O}_X}(\mathcal{E}^{-q}, \mathcal{F}^\bullet)) $$ converging to $H^{p + q}(\mathcal{H}^\bullet)$ and similarly for $(\mathcal{H}')^\bullet$. To finish the proof of the lemma it suffices to show that $\mathcal{F}^\bullet \to \mathcal{I}^\bullet$ induces an isomorphism $$ H^p(\SheafHom_{\mathcal{O}_X}(\mathcal{E}, \mathcal{F}^\bullet)) \longrightarrow H^p(\SheafHom_{\mathcal{O}_X}(\mathcal{E}, \mathcal{I}^\bullet)) $$ on cohomology sheaves whenever $\mathcal{E}$ is a direct summand of a finite free $\mathcal{O}_X$-module. Since this is clear when $\mathcal{E}$ is finite free the result follows.
Let $\mathcal{F}^\bullet$ be any complex representing $E$ and let $X = \bigcup U_i$ and $\alpha_i : \mathcal{E}_i^\bullet \to E|_{U_i}$ be as in (1). We will show that $\mathcal{F}^\bullet$ is $m$-pseudo-coherent as a complex, which will prove (1) and (2) simultaneously. By Lemma \ref{lemma-local-actual} we can after refining the open covering $X = \bigcup U_i$ represent the maps $\alpha_i$ by maps of complexes $\alpha_i : \mathcal{E}_i^\bullet \to \mathcal{F}^\bullet|_{U_i}$. By assumption $H^j(\alpha_i)$ are isomorphisms for $j > m$, and $H^m(\alpha_i)$ is surjective whence $\mathcal{F}^\bullet$ is $m$-pseudo-coherent.
Represent $E$ by a complex $\mathcal{E}^\bullet$ of $\mathcal{O}_Y$-modules and choose an open covering $Y = \bigcup V_i$ and $\alpha_i : \mathcal{E}_i^\bullet \to \mathcal{E}^\bullet|_{V_i}$ as in Definition \ref{definition-pseudo-coherent}. Set $U_i = f^{-1}(V_i)$. By Lemma \ref{lemma-pseudo-coherent-independent-representative} it suffices to show that $Lf^*\mathcal{E}^\bullet|_{U_i}$ is $m$-pseudo-coherent. Choose a distinguished triangle $$ \mathcal{E}_i^\bullet \to \mathcal{E}^\bullet|_{V_i} \to C \to \mathcal{E}_i^\bullet[1] $$ The assumption on $\alpha_i$ means exactly that the cohomology sheaves $H^j(C)$ are zero for all $j \geq m$. Denote $f_i : U_i \to V_i$ the restriction of $f$. Note that $Lf^*\mathcal{E}^\bullet|_{U_i} =  Lf_i^*(\mathcal{E}|_{V_i})$. Applying $Lf_i^*$ we obtain the distinguished triangle $$ Lf_i^*\mathcal{E}_i^\bullet \to Lf_i^*\mathcal{E}|_{V_i} \to Lf_i^*C \to Lf_i^*\mathcal{E}_i^\bullet[1] $$ By the construction of $Lf_i^*$ as a left derived functor we see that $H^j(Lf_i^*C) = 0$ for $j \geq m$ (by the dual of Derived Categories, Lemma \ref{derived-lemma-negative-vanishing}). Hence $H^j(Lf_i^*\alpha_i)$ is an isomorphism for $j > m$ and $H^m(Lf^*\alpha_i)$ is surjective. On the other hand, $Lf_i^*\mathcal{E}_i^\bullet = f_i^*\mathcal{E}_i^\bullet$. is strictly perfect by Lemma \ref{lemma-strictly-perfect-pullback}. Thus we conclude.
Proof of (1). Choose an open covering $X = \bigcup U_i$ and maps $\alpha_i : \mathcal{K}_i^\bullet \to K|_{U_i}$ in $D(\mathcal{O}_{U_i})$ with $\mathcal{K}_i^\bullet$ strictly perfect and $H^j(\alpha_i)$ isomorphisms for $j > m + 1$ and surjective for $j = m + 1$. We may replace $\mathcal{K}_i^\bullet$ by $\sigma_{\geq m + 1}\mathcal{K}_i^\bullet$ and hence we may assume that $\mathcal{K}_i^j = 0$ for $j < m + 1$. After refining the open covering we may choose maps $\beta_i : \mathcal{L}_i^\bullet \to L|_{U_i}$ in $D(\mathcal{O}_{U_i})$ with $\mathcal{L}_i^\bullet$ strictly perfect such that $H^j(\beta)$ is an isomorphism for $j > m$ and surjective for $j = m$. By Lemma \ref{lemma-lift-through-quasi-isomorphism} we can, after refining the covering, find maps of complexes $\gamma_i : \mathcal{K}^\bullet \to \mathcal{L}^\bullet$ such that the diagrams $$ \xymatrix{ K|_{U_i} \ar[r] & L|_{U_i} \\ \mathcal{K}_i^\bullet \ar[u]^{\alpha_i} \ar[r]^{\gamma_i} & \mathcal{L}_i^\bullet \ar[u]_{\beta_i} } $$ are commutative in $D(\mathcal{O}_{U_i})$ (this requires representing the maps $\alpha_i$, $\beta_i$ and $K|_{U_i} \to L|_{U_i}$ by actual maps of complexes; some details omitted). The cone $C(\gamma_i)^\bullet$ is strictly perfect (Lemma \ref{lemma-cone}). The commutativity of the diagram implies that there exists a morphism of distinguished triangles $$ (\mathcal{K}_i^\bullet, \mathcal{L}_i^\bullet, C(\gamma_i)^\bullet) \longrightarrow (K|_{U_i}, L|_{U_i}, M|_{U_i}). $$ It follows from the induced map on long exact cohomology sequences and Homology, Lemmas \ref{homology-lemma-four-lemma} and \ref{homology-lemma-five-lemma} that $C(\gamma_i)^\bullet \to M|_{U_i}$ induces an isomorphism on cohomology in degrees $> m$ and a surjection in degree $m$. Hence $M$ is $m$-pseudo-coherent by Lemma \ref{lemma-pseudo-coherent-independent-representative}. \medskip\noindent Assertions (2) and (3) follow from (1) by rotating the distinguished triangle.
Assume that $K \oplus L$ is $m$-pseudo-coherent. After replacing $X$ by the members of an open covering we may assume $K \oplus L \in D^-(\mathcal{O}_X)$, hence $L \in D^-(\mathcal{O}_X)$. Note that there is a distinguished triangle $$ (K \oplus L, K \oplus L, L \oplus L[1]) = (K, K, 0) \oplus (L, L, L \oplus L[1]) $$ see Derived Categories, Lemma \ref{derived-lemma-direct-sum-triangles}. By Lemma \ref{lemma-cone-pseudo-coherent} we see that $L \oplus L[1]$ is $m$-pseudo-coherent. Hence also $L[1] \oplus L[2]$ is $m$-pseudo-coherent. By induction $L[n] \oplus L[n + 1]$ is $m$-pseudo-coherent. Since $L$ is bounded above we see that $L[n]$ is $m$-pseudo-coherent for large $n$. Hence working backwards, using the distinguished triangles $$ (L[n], L[n] \oplus L[n - 1], L[n - 1]) $$ we conclude that $L[n - 1], L[n - 2], \ldots, L$ are $m$-pseudo-coherent as desired.
Proof of (1). We may work locally on $X$. Hence we may assume there exists a strictly perfect complex $\mathcal{E}^\bullet$ and a map $\alpha : \mathcal{E}^\bullet \to K$ which induces an isomorphism on cohomology in degrees $> m$ and a surjection in degree $m$. It suffices to prove the result for $\mathcal{E}^\bullet$. Let $n$ be the largest integer such that $\mathcal{E}^n \not = 0$. If $n = m$, then $H^m(\mathcal{E}^\bullet)$ is a quotient of $\mathcal{E}^n$ and the result is clear. If $n > m$, then $\mathcal{E}^{n - 1} \to \mathcal{E}^n$ is surjective as $H^n(E^\bullet) = 0$. By Lemma \ref{lemma-local-lift-map} we can locally find a section of this surjection and write $\mathcal{E}^{n - 1} = \mathcal{E}' \oplus \mathcal{E}^n$. Hence it suffices to prove the result for the complex $(\mathcal{E}')^\bullet$ which is the same as $\mathcal{E}^\bullet$ except has $\mathcal{E}'$ in degree $n - 1$ and $0$ in degree $n$. We win by induction on $n$. \medskip\noindent Proof of (2). We may work locally on $X$. Hence we may assume there exists a strictly perfect complex $\mathcal{E}^\bullet$ and a map $\alpha : \mathcal{E}^\bullet \to K$ which induces an isomorphism on cohomology in degrees $> m$ and a surjection in degree $m$. As in the proof of (1) we can reduce to the case that $\mathcal{E}^i = 0$ for $i > m + 1$. Then we see that $H^{m + 1}(K) \cong H^{m + 1}(\mathcal{E}^\bullet) = \Coker(\mathcal{E}^m \to \mathcal{E}^{m + 1})$ which is of finite presentation.
As $\mathcal{E}^\bullet$ is a bounded above complex of flat modules we see that $\mathcal{E}^\bullet \otimes_{\mathcal{O}_X} \mathcal{F} = \mathcal{E}^\bullet \otimes_{\mathcal{O}_X}^{\mathbf{L}} \mathcal{F}$ for any $\mathcal{O}_X$-module $\mathcal{F}$. Hence for every $\mathcal{O}_X$-module $\mathcal{F}$ the sequence $$ \mathcal{E}^{a - 2} \otimes_{\mathcal{O}_X} \mathcal{F} \to \mathcal{E}^{a - 1} \otimes_{\mathcal{O}_X} \mathcal{F} \to \mathcal{E}^a \otimes_{\mathcal{O}_X} \mathcal{F} $$ is exact in the middle. Since $\mathcal{E}^{a - 2} \to \mathcal{E}^{a - 1} \to \mathcal{E}^a \to \Coker(d^{a - 1}) \to 0$ is a flat resolution this implies that $\text{Tor}_1^{\mathcal{O}_X}(\Coker(d^{a - 1}), \mathcal{F}) = 0$ for all $\mathcal{O}_X$-modules $\mathcal{F}$. This means that $\Coker(d^{a - 1})$ is flat, see Lemma \ref{lemma-flat-tor-zero}.
If (2) holds, then we may compute $E \otimes_{\mathcal{O}_X}^\mathbf{L} \mathcal{F} = \mathcal{E}^\bullet \otimes_{\mathcal{O}_X} \mathcal{F}$ and it is clear that (1) holds. \medskip\noindent Assume that (1) holds. We may represent $E$ by a bounded above complex of flat $\mathcal{O}_X$-modules $\mathcal{K}^\bullet$, see Section \ref{section-flat}. Let $n$ be the largest integer such that $\mathcal{K}^n \not = 0$. If $n > b$, then $\mathcal{K}^{n - 1} \to \mathcal{K}^n$ is surjective as $H^n(\mathcal{K}^\bullet) = 0$. As $\mathcal{K}^n$ is flat we see that $\Ker(\mathcal{K}^{n - 1} \to \mathcal{K}^n)$ is flat (Modules, Lemma \ref{modules-lemma-flat-ses}). Hence we may replace $\mathcal{K}^\bullet$ by $\tau_{\leq n - 1}\mathcal{K}^\bullet$. Thus, by induction on $n$, we reduce to the case that $K^\bullet$ is a complex of flat $\mathcal{O}_X$-modules with $\mathcal{K}^i = 0$ for $i > b$. \medskip\noindent Set $\mathcal{E}^\bullet = \tau_{\geq a}\mathcal{K}^\bullet$. Everything is clear except that $\mathcal{E}^a$ is flat which follows immediately from Lemma \ref{lemma-last-one-flat} and the definitions.
Assume $E$ has tor amplitude in $[a, b]$. By Lemma \ref{lemma-tor-amplitude} we can represent $E$ by a complex of $\mathcal{E}^\bullet$ of flat $\mathcal{O}$-modules with $\mathcal{E}^i = 0$ for $i \not \in [a, b]$. Then $Lf^*E$ is represented by $f^*\mathcal{E}^\bullet$. By Modules, Lemma \ref{modules-lemma-pullback-flat} the modules $f^*\mathcal{E}^i$ are flat. Thus by Lemma \ref{lemma-tor-amplitude} we conclude that $Lf^*E$ has tor amplitude in $[a, b]$.
Taking stalks at $x$ is the same thing as pulling back by the morphism of ringed spaces $(x, \mathcal{O}_{X, x}) \to (X, \mathcal{O}_X)$. Hence the implication (1) $\Rightarrow$ (2) follows from Lemma \ref{lemma-tor-amplitude-pullback}. For the converse, note that taking stalks commutes with tensor products (Modules, Lemma \ref{modules-lemma-stalk-tensor-product}). Hence $$ (E \otimes_{\mathcal{O}_X}^\mathbf{L} \mathcal{F})_x = E_x \otimes_{\mathcal{O}_{X, x}}^\mathbf{L} \mathcal{F}_x $$ On the other hand, taking stalks is exact, so $$ H^i(E \otimes_{\mathcal{O}_X}^\mathbf{L} \mathcal{F})_x = H^i((E \otimes_{\mathcal{O}_X}^\mathbf{L} \mathcal{F})_x) = H^i(E_x \otimes_{\mathcal{O}_{X, x}}^\mathbf{L} \mathcal{F}_x) $$ and we can check whether $H^i(E \otimes_{\mathcal{O}_X}^\mathbf{L} \mathcal{F})$ is zero by checking whether all of its stalks are zero (Modules, Lemma \ref{modules-lemma-abelian}). Thus (2) implies (1).
After replacing $X$ by the members of an open covering we may assume there exists a strictly perfect complex $\mathcal{E}^\bullet$ and a map $\alpha : \mathcal{E}^\bullet \to E$ such that $H^i(\alpha)$ is an isomorphism for $i \geq a$. We may and do replace $\mathcal{E}^\bullet$ by $\sigma_{\geq a - 1}\mathcal{E}^\bullet$. Choose a distinguished triangle $$ \mathcal{E}^\bullet \to E \to C \to \mathcal{E}^\bullet[1] $$ From the vanishing of cohomology sheaves of $E$ and $\mathcal{E}^\bullet$ and the assumption on $\alpha$ we obtain $C \cong \mathcal{K}[a - 2]$ with $\mathcal{K} = \Ker(\mathcal{E}^{a - 1} \to \mathcal{E}^a)$. Let $\mathcal{F}$ be an $\mathcal{O}_X$-module. Applying $- \otimes_{\mathcal{O}_X}^\mathbf{L} \mathcal{F}$ the assumption that $E$ has tor amplitude in $[a, b]$ implies $\mathcal{K} \otimes_{\mathcal{O}_X} \mathcal{F} \to \mathcal{E}^{a - 1} \otimes_{\mathcal{O}_X} \mathcal{F}$ has image $\Ker(\mathcal{E}^{a - 1} \otimes_{\mathcal{O}_X} \mathcal{F} \to \mathcal{E}^a \otimes_{\mathcal{O}_X} \mathcal{F})$. It follows that $\text{Tor}_1^{\mathcal{O}_X}(\mathcal{E}', \mathcal{F}) = 0$ where $\mathcal{E}' = \Coker(\mathcal{E}^{a - 1} \to \mathcal{E}^a)$. Hence $\mathcal{E}'$ is flat (Lemma \ref{lemma-flat-tor-zero}). Thus $\mathcal{E}'$ is locally a direct summand of a finite free module by Modules, Lemma \ref{modules-lemma-flat-locally-finite-presentation}. Thus locally the complex $$ \mathcal{E}' \to \mathcal{E}^{a - 1} \to \ldots \to \mathcal{E}^b $$ is quasi-isomorphic to $E$ and $E$ is perfect.