hcju/stacksqa huggingface dataset:
By Lemma \ref{lemma-where-flat} we may assume that $f$ is flat. Note that $f$ is locally of finite presentation by Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-finite-presentation-permanence}. Hence $f$ is open, see Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-fppf-open}. Let $W \subset Z$ be the open subspace (see Properties of Spaces, Lemma \ref{spaces-properties-lemma-open-subspaces}) with underlying set of points $$ |W| = |Z| \setminus |q|\left(|Y| \setminus |f|(|X|)\right). $$ in other words for $z \in |Z|$ we have $z \in |W|$ if and only if the whole fibre of $|Y| \to |Z|$ over $z$ is in the image of $|X| \to |Y|$. Since $q$ is closed this set is open in $|Z|$. The morphism $X_W \to Y_W$ is surjective by construction. Finally, suppose that $X_{Z'} \to Y_{Z'}$ is surjective. In order to show that $Z' \to Z$ factors through $W$ it suffices to show that $|Z'| \to |Z|$ has image contained in $|W|$, see Properties of Spaces, Lemma \ref{spaces-properties-lemma-factor-through-open-subspace}. Hence it suffices to prove the result when $Z'$ is the spectrum of a field. Denote $z \in |Z|$ the image of $|Z'| \to |Z|$. By Properties of Spaces, Lemma \ref{spaces-properties-lemma-points-cartesian} in the commutative diagram $$ \xymatrix{ |X_{Z'}| \ar[d] \ar[r] & |Y_{Z'}| \ar[d] \\ |p|^{-1}(\{z\}) \ar[r] & |q|^{-1}(\{z\}) } $$ the vertical arrows are surjective. It follows that $z \in |W|$ as desired.
By Lemma \ref{lemma-where-surjective-flat} there exists an open subspace $W_1 \subset Z$ such that $f_{Z'}$ is surjective and flat if and only if $Z' \to Z$ factors through $W_1$. By Lemma \ref{lemma-where-closed-immersion} there exists an open subspace $W_2 \subset Z$ such that $f_{Z'}$ is a closed immersion if and only if $Z' \to Z$ factors through $W_2$. We claim that $W = W_1 \cap W_2$ works. Certainly, if $f_{Z'}$ is an isomorphism, then $Z' \to Z$ factors through $W$. Hence it suffices to show that $f_W$ is an isomorphism. By construction $f_W$ is a surjective flat closed immersion. In particular $f_W$ is representable. Since a surjective flat closed immersion of schemes is an isomorphism (see Morphisms, Lemma \ref{morphisms-lemma-characterize-flat-closed-immersions}) we win. (Note that actually $f_W$ is locally of finite presentation, whence open, so you can avoid the use of this lemma if you like.)
By Lemma \ref{lemma-base-change-lci-fibres} there exists an open subspace $U(f) \subset X$ which is the set of points where $f$ is Koszul. Moreover, formation of $U(f)$ commutes with arbitrary base change. Let $W \subset Z$ be the open subspace (see Properties of Spaces, Lemma \ref{spaces-properties-lemma-open-subspaces}) with underlying set of points $$ |W| = |Z| \setminus |p|\left(|X| \setminus |U(f)|\right) $$ i.e., $z \in |Z|$ is a point of $W$ if and only if $f$ is Koszul at every point of $X$ above $z$. Note that this is open because we assumed that $p$ is closed. Since the formation of $U(f)$ commutes with arbitrary base change we immediately see (using Properties of Spaces, Lemma \ref{spaces-properties-lemma-factor-through-open-subspace}) that $W$ has the desired universal property.
By Derived Categories of Spaces, Lemma \ref{spaces-perfect-lemma-tor-independent} we may check tor independence \'etale locally on $X \times_B Y$ and $Z'$. This\footnote{Here is the argument in more detail. Choose a surjective \'etale morphism $W' \to B'$ with $W'$ a scheme. Choose a surjective \'etale morphism $W \to B \times_{B'} W'$ with $W$ a scheme. Choose a surjective \'etale morphism $U' \to X' \times_{B'} W'$ with $U'$ a scheme. Choose a surjective \'etale morphism $V' \to Y' \times_{B'} W'$ with $V'$ a scheme. Observe that $U' \times_{W'} V' \to X' \times_{B'} Y'$ is surjective \'etale. Choose a surjective \'etale morphism $T' \to Z' \times_{X' \times_{B'} Y'} U' \times_{W'} V'$ with $T'$ a scheme. Denote $U$ and $V$ the base changes of $U'$ and $V'$ to $W$. Then the lemma says that $X \times_B Y$ and $Z'$ are Tor independent over $X' \times_{B'} Y'$ as algebraic spaces if and only if $U \times_W V$ and $T'$ are Tor independent over $U' \times_{W'} V'$ as schemes. Thus it suffices to prove the lemma for the square with corners $T', U', V', W'$ and base change by $W \to W'$. The flatness of $Y' \to B'$ and $Z' \to X'$ implies flatness of $V' \to W'$ and $T' \to U'$.} reduces the lemma to the case of schemes which is More on Morphisms, Lemma \ref{more-morphisms-lemma-case-of-tor-independence}.
Since $W = c^{-1}(V)$ and since $c$ is a closed immersion over $V$, we see that $c|_W$ is a closed immersion. It is of finite presentation because $W$ and $V$ are of finite presentation over $A$, see Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-finite-presentation-permanence}. First we have $$ Rq_*(Lp^*K \otimes^\mathbf{L} E)|_V = Rq'_*\left((Lp^*K \otimes^\mathbf{L} E)|_{X \times_A V}\right) $$ where $q' : X \times_A V \to V$ is the projection because formation of total direct image commutes with localization. Denote $i = (b, c)|_W : W \to X \times_A V$ the given closed immersion. Then $$ Rq'_*\left((Lp^*K \otimes^\mathbf{L} E)|_{X \times_A V}\right) = Rq'_*(Lp^*K|_{X \times_A V} \otimes^\mathbf{L} i_*\mathcal{O}_W) $$ by property (5). Since $i$ is a closed immersion we have $i_*\mathcal{O}_W = Ri_*\mathcal{O}_W$. Using Derived Categories of Spaces, Lemma \ref{spaces-perfect-lemma-cohomology-base-change} we can rewrite this as $$ Rq'_* Ri_* Li^* Lp^*K|_{X \times_A V} = R(q' \circ i)_* Lb^*K|_W = R(W \to V)_* K|_W $$ which is what we want. (Note that restricting to $W$ and derived pulling back via $W \to X$ is the same thing as $W$ is \'etale over $X$.)
Assume $K \in D_\QCoh(\mathcal{O}_X)$ and $R\Gamma(X, E \otimes^\mathbf{L} K)$ is pseudo-coherent in $D(A)$ for every pseudo-coherent $E$ in $D(\mathcal{O}_X)$. Let $x \in |X|$. We will show that $K$ is pseudo-coherent relative to $A$ in an \'etale neighbourhood of $x$. This will prove the lemma by our definition of relative pseudo-coherence. \medskip\noindent Choose $n, Z, z, V, E$ as in Lemma \ref{lemma-derived-chow}. Denote $p : X \times \mathbf{P}^n \to X$ and $q : X \times \mathbf{P}^n \to \mathbf{P}^n_A$ the projections. Then for any $i \in \mathbf{Z}$ we have \begin{align*} & R\Gamma(\mathbf{P}^n_A, Rq_*(Lp^*K \otimes^\mathbf{L} E) \otimes^\mathbf{L} \mathcal{O}_{\mathbf{P}^n_A}(i)) \\ & = R\Gamma(X \times \mathbf{P}^n, Lp^*K \otimes^\mathbf{L} E \otimes^\mathbf{L} Lq^*\mathcal{O}_{\mathbf{P}^n_A}(i)) \\ & = R\Gamma(X, K \otimes^\mathbf{L} Rq_*(E \otimes^\mathbf{L} Lq^*\mathcal{O}_{\mathbf{P}^n_A}(i))) \end{align*} by Derived Categories of Spaces, Lemma \ref{spaces-perfect-lemma-cohomology-base-change}. By Derived Categories of Spaces, Lemma \ref{spaces-perfect-lemma-flat-proper-pseudo-coherent-direct-image-general} the complex $Rq_*(E \otimes^\mathbf{L} Lq^*\mathcal{O}_{\mathbf{P}^n_A}(i))$ is pseudo-coherent on $X$. Hence the assumption tells us the expression in the displayed formula is a pseudo-coherent object of $D(A)$. By Derived Categories of Schemes, Lemma \ref{perfect-lemma-pseudo-coherent-on-projective-space} we conclude that $Rq_*(Lp^*K \otimes^\mathbf{L} E)$ is pseudo-coherent on $\mathbf{P}^n_A$. By Lemma \ref{lemma-compute-Fourier-Mukai-for-derived-chow} we have $$ Rq_*(Lp^*K \otimes^\mathbf{L} E)|_{X \times_A V} = R(W \to V)_*K|_W $$ Since $W \to V$ is a closed immersion into an open subscheme of $\mathbf{P}^n_A$ this means $K|_W$ is pseudo-coherent relative to $A$ for example by More on Morphisms, Lemma \ref{more-morphisms-lemma-check-relative-pseudo-coherence-on-charts}.
In view of Lemma \ref{lemma-characterize-pseudo-coherent}, it suffices to show $R \Gamma (X, E \otimes ^{\mathbf{L}} K)$ is pseudo-coherent in $D(A)$ for every pseudo-coherent  $E \in D(\mathcal{O}_X)$. By Derived Categories of Spaces, Proposition \ref{spaces-perfect-proposition-detecting-bounded-above} it follows that $K \in D^-_\QCoh (\mathcal{O}_X)$. Now the result follows by Derived Categories of Spaces, Lemma \ref{spaces-perfect-lemma-perfect-enough}.
To make sense of parts (2), (3), (4) of the lemma, observe that the object $E|_U$ of $D_\QCoh(\mathcal{O}_U)$ corresponds to an object $E_0$ of $D_\QCoh(\mathcal{O}_{U_0})$ where $U_0$ denotes the scheme underlying $U$, see Derived Categories of Spaces, Lemma \ref{spaces-perfect-lemma-derived-quasi-coherent-small-etale-site}. Moreover, in this case $E_0$ is pseudo-coherent if and only if $E|_U$ is pseudo-coherent, see Derived Categories of Spaces, Lemma \ref{spaces-perfect-lemma-descend-pseudo-coherent}. Also, $E|_U$ locally has finite tor dimension over $f^{-1}\mathcal{O}_Y|_U = g^{-1}\mathcal{O}_V$ if and only if $E_0$ locally has finite tor dimension over $g_0^{-1}\mathcal{O}_{V_0}$ by Derived Categories of Spaces, Lemma \ref{spaces-perfect-lemma-tor-dimension-rel}. Here $g_0 : U_0 \to V_0$ is the morphism of schemes representing $g : U \to V$ (notation as in Derived Categories of Spaces, Remark \ref{spaces-perfect-remark-match-total-direct-images}). Finally, observe that ``being pseudo-coherent'' is \'etale local and of course ``having locally finite tor dimension'' is \'etale local. Thus we see that it suffices to check $Y$-perfectness \'etale locally and by the above discussion we see that (1) implies (2) and (3) implies (1). Since part (4) is equivalent to (2) and (3) by Derived Categories of Schemes, Lemma \ref{perfect-lemma-affine-locally-rel-perfect} the proof is complete.
For every quasi-compact and quasi-separated object $U_0$ of $(X_0)_{spaces, \etale}$ consider the condition $P$ that $$ \colim_{i \geq 0} \Hom_{D(\mathcal{O}_{U_i})}(K_i|_{U_i}, L_i|_{U_i}) \longrightarrow \Hom_{D(\mathcal{O}_U)}(K|_U, L|_U) $$ is an isomorphism where $U = X \times_{X_0} U_0$ and $U_i = X_i \times_{X_0} U_0$. We will prove $P$ holds for each $U_0$. \medskip\noindent Suppose that $(U_0 \subset W_0, V_0 \to W_0)$ is an elementary distinguished square in $(X_0)_{spaces, \etale}$ and $P$ holds for $U_0, V_0, U_0 \times_{W_0} V_0$. Then $P$ holds for $W_0$ by Mayer-Vietoris for hom in the derived category, see Derived Categories of Spaces, Lemma \ref{spaces-perfect-lemma-mayer-vietoris-hom}. \medskip\noindent We first consider $U_0 = W_0 \times_{Y_0} X_0$ with $W_0$ a quasi-compact and quasi-separated object of $(Y_0)_{spaces, \etale}$. By the induction principle of Derived Categories of Spaces, Lemma \ref{spaces-perfect-lemma-induction-principle} applied to these $W_0$ and the previous paragraph, we find that it is enough to prove $P$ for $U_0 = W_0 \times_{Y_0} X_0$ with $W_0$ affine. In other words, we have reduced to the case where $Y_0$ is affine. Next, we apply the induction principle again, this time to all quasi-compact and quasi-separated opens of $X_0$, to reduce to the case where $X_0$ is affine as well. \medskip\noindent If $X_0$ and $Y_0$ are affine, then we are back in the case of schemes which is proved in Derived Categories of Schemes, Lemma \ref{perfect-lemma-relative-descend-homomorphisms}. The reader may use Derived Categories of Spaces, Lemmas \ref{spaces-perfect-lemma-pseudo-coherent}, \ref{spaces-perfect-lemma-derived-quasi-coherent-small-etale-site}, \ref{spaces-perfect-lemma-descend-pseudo-coherent}, and \ref{spaces-perfect-lemma-tor-dimension-rel} to accomplish the translation of the statement into a statement involving only schemes and derived categories of modules on schemes.
For every quasi-compact and quasi-separated object $U_0$ of $(X_0)_{spaces, \etale}$ consider the condition $P$ that the functor $$ \colim_{i \geq 0} D_{Y_i\text{-perfect}}(\mathcal{O}_{U_i}) \longrightarrow D_{Y\text{-perfect}}(\mathcal{O}_U) $$ is an equivalence where $U = X \times_{X_0} U_0$ and $U_i = X_i \times_{X_0} U_0$. We observe that we already know this functor is fully faithful by Lemma \ref{lemma-relative-descend-homomorphisms}. Thus it suffices to prove essential surjectivity. \medskip\noindent Suppose that $(U_0 \subset W_0, V_0 \to W_0)$ is an elementary distinguished square in $(X_0)_{spaces, \etale}$ and $P$ holds for $U_0, V_0, U_0 \times_{W_0} V_0$. We claim that $P$ holds for $W_0$. We will use the notation $U_i = X_i \times_{X_0} U_0$, $U = X \times_{X_0} U_0$, and similarly for $V_0$ and $W_0$. We will abusively use the symbol $f_i$ for all the morphisms $U \to U_i$, $V \to V_i$, $U \times_W V \to U_i \times_{W_i} V_i$, and $W \to W_i$. Suppose $E$ is an $Y$-perfect object of $D(\mathcal{O}_W)$. Goal: show $E$ is in the essential image of the functor. By assumption, we can find $i \geq 0$, an $Y_i$-perfect object $E_{U, i}$ on $U_i$, an $Y_i$-perfect object $E_{V, i}$ on $V_i$, and isomorphisms $Lf_i^*E_{U, i} \to E|_U$ and $Lf_i^*E_{V, i} \to E|_V$. Let $$ a : E_{U, i} \to (Rf_{i, *}E)|_{U_i} \quad\text{and}\quad b : E_{V, i} \to (Rf_{i, *}E)|_{V_i} $$ the maps adjoint to the isomorphisms $Lf_i^*E_{U, i} \to E|_U$ and $Lf_i^*E_{V, i} \to E|_V$. By fully faithfulness, after increasing $i$, we can find an isomorphism $c : E_{U, i}|_{U_i \times_{W_i} V_i} \to E_{V, i}|_{U_i \times_{W_i} V_i}$ which pulls back to the identifications  $$ Lf_i^*E_{U, i}|_{U \times_W V} \to E|_{U \times_W V} \to Lf_i^*E_{V, i}|_{U \times_W V}. $$ Apply Derived Categories of Spaces, Lemma \ref{spaces-perfect-lemma-glue} to get an object $E_i$ on $W_i$ and a map $d : E_i \to Rf_{i, *}E$ which restricts to the maps $a$ and $b$ over $U_i$ and $V_i$. Then it is clear that $E_i$ is $Y_i$-perfect (because being relatively perfect is an \'etale local property) and that $d$ is adjoint to an isomorphism $Lf_i^*E_i \to E$. \medskip\noindent By exactly the same argument as used in the proof of Lemma \ref{lemma-relative-descend-homomorphisms} using the induction principle (Derived Categories of Spaces, Lemma \ref{spaces-perfect-lemma-induction-principle}) we reduce to the case where both $X_0$ and $Y_0$ are affine: first work with quasi-compact and quasi-separated objects in $(Y_0)_{spaces, \etale}$ to reduce to $Y_0$ affine, then work with quasi-compact and quasi-separated object in $(X_0)_{spaces, \etale}$ to reduce to $X_0$ affine. In the affine case the result follows from the case of schemes which is Derived Categories of Schemes, Lemma \ref{perfect-lemma-descend-relatively-perfect}. The translation into the case for schemes is done by Lemma \ref{lemma-affine-locally-rel-perfect}.
The statement on base change is Derived Categories of Spaces, Lemma \ref{spaces-perfect-lemma-base-change-tensor} (with $\mathcal{G}^\bullet$ equal to $\mathcal{O}_X$ in degree $0$). Thus it suffices to show that $Rf_*E$ is a perfect object. We will reduce to the case where $Y$ is Noetherian affine by a limit argument. \medskip\noindent The question is \'etale local on $Y$, hence we may assume $Y$ is affine. Say $Y = \Spec(R)$. We write $R = \colim R_i$ as a filtered colimit of Noetherian rings $R_i$. By Limits of Spaces, Lemma \ref{spaces-limits-lemma-descend-finite-presentation} there exists an $i$ and an algebraic space $X_i$ of finite presentation over $R_i$ whose base change to $R$ is $X$. By Limits of Spaces, Lemmas \ref{spaces-limits-lemma-eventually-proper} and \ref{spaces-limits-lemma-descend-flat} we may assume $X_i$ is proper and flat over $R_i$. By Lemma \ref{lemma-descend-relatively-perfect} we may assume there exists a $R_i$-perfect object $E_i$ of $D(\mathcal{O}_{X_i})$ whose pullback to $X$ is $E$. Applying Derived Categories of Spaces, Lemma \ref{spaces-perfect-lemma-perfect-direct-image} to $X_i \to \Spec(R_i)$ and $E_i$ and using the base change property already shown we obtain the result.
By Lemma \ref{lemma-characterize-pseudo-coh-improved}, $K$ is pseudo-coherent relative to $A$. By Lemma \ref{lemma-relative-pseudo-coherent-is-moot}, $K$ is pseudo-coherent in $D(\mathcal{O}_X)$. By Derived Categories of Spaces, Proposition \ref{spaces-perfect-proposition-detecting-bounded-below} we see that $K$ is in $D^-(\mathcal{O}_X)$. Let $\mathfrak{p}$ be a prime ideal of $A$ and denote $i : Y \to X$ the inclusion of the scheme theoretic fibre over $\mathfrak{p}$, i.e., $Y$ is a scheme over $\kappa(\mathfrak p)$. By Lemma \ref{lemma-bounded-on-fibres}, we will be done if we can show  $Li^*(K)$ is bounded below.  Let $G \in D_{perf} (\mathcal{O}_X)$ be a perfect complex which generates $D_\QCoh (\mathcal{O}_X)$, see Derived Categories of Spaces, Theorem \ref{spaces-perfect-theorem-bondal-van-den-Bergh}. We have \begin{align*} R\Hom _{\mathcal{O}_Y}(Li^*(G), Li^*(K)) & = R\Gamma(Y, Li^*(G ^\vee \otimes ^\mathbf{L} K)) \\ & = R\Gamma(X, G^\vee \otimes ^{\mathbf{L}} K) \otimes^\mathbf{L}_A \kappa(\mathfrak{p}) \end{align*} The first equality uses that $Li^*$ preserves perfect objects and duals and Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-dual-perfect-complex}; we omit some details. The second equality follows from Derived Categories of Spaces, Lemma \ref{spaces-perfect-lemma-compare-base-change} as $X$ is flat over $A$. It follows from our hypothesis that this is a perfect object of $D(\kappa(\mathfrak{p}))$. The object $Li^*(G) \in D_{perf}(\mathcal{O}_Y)$  generates $D_\QCoh(\mathcal{O}_Y)$ by Derived Categories of Spaces, Remark \ref{spaces-perfect-remark-pullback-generator}. Hence Derived Categories of Spaces, Proposition \ref{spaces-perfect-proposition-detecting-bounded-below} now implies that $Li^*(K)$ is bounded below and we win.
Pullback always preserves $m$-pseudo-coherence, see Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-pseudo-coherent-pullback}. Thus it suffices to assume $Lf_i^*E$ is $m$-pseudo-coherent and to prove that $E$ is $m$-pseudo-coherent. Then first we may assume $X_i$ is a scheme for all $i$, see Topologies on Spaces, Lemma \ref{spaces-topologies-lemma-refine-fpqc-schemes}. Next, choose a  surjective \'etale morphism $U \to X$ where $U$ is a scheme. Then $U_i = U \times_X X_i$ is a scheme and we obtain an fpqc covering $\{U_i \to U\}$ of schemes, see Topologies on Spaces, Lemma \ref{spaces-topologies-lemma-recognize-fpqc-covering}. We know the result is true for $\{U_i \to U\}_{i \in I}$ by the case for schemes, see Derived Categories of Schemes, Lemma \ref{perfect-lemma-pseudo-coherent-descends-fpqc}. On the other hand, the restriction $E|_U$ comes from an object of $D_\QCoh(\mathcal{O}_U)$ (defined using the Zariski topology and the ``usual'' structure sheaf of $U$), see Derived Categories of Spaces, Lemma \ref{spaces-perfect-lemma-derived-quasi-coherent-small-etale-site}. The lemma follows as the two notions of pseudo-coherent (\'etale and Zariski) agree by Derived Categories of Spaces, Lemma \ref{spaces-perfect-lemma-descend-pseudo-coherent}.
Pullback preserves ``tor amplitude in $[a, b]$'' by Derived Categories of Spaces, Lemma \ref{spaces-perfect-lemma-tor-independence-and-tor-amplitude} Observe that $Y_i$ and $X$ are tor independent over $Y$ as $Y_i \to Y$ is flat. Let us assume (2) and prove (1). We can compute tor dimension at stalks, see Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-tor-amplitude-stalk} and Properties of Spaces, Theorem \ref{spaces-properties-theorem-exactness-stalks}. Let $\overline{x}$ be a geometric point of $X$. Choose an $i$ and a geometric point $\overline{x}_i$ in $X_i$ with image $\overline{x}$ in $X$. Then $$ (L(g_i')^*E)_{\overline{x}_i} = E_{\overline{x}} \otimes_{\mathcal{O}_{X, \overline{x}}}^\mathbf{L} \mathcal{O}_{X_, \overline{x}_i} $$ Let $\overline{y}_i$ in $Y_i$ and $\overline{y}$ in $Y$ be the image of $\overline{x}_i$ and $\overline{x}$. Since $X$ and $Y_i$ are tor independent over $Y$, we can apply More on Algebra, Lemma \ref{more-algebra-lemma-base-change-comparison} to see that the right hand side of the displayed formula is equal to $E_{\overline{x}} \otimes_{\mathcal{O}_{Y, \overline{y}}}^\mathbf{L} \mathcal{O}_{Y_i, \overline{y}_i}$ in $D(\mathcal{O}_{Y_i, \overline{y}_i})$. Since we have assume the tor amplitude of this is in $[a, b]$, we conclude that the tor amplitude of $E_{\overline{x}}$ in $D(\mathcal{O}_{Y, \overline{y}})$ is in $[a, b]$ by More on Algebra, Lemma \ref{more-algebra-lemma-flat-descent-tor-amplitude}. Thus (1) follows. \medskip\noindent Using some elementary topology the case ``locally finite tor dimension'' follows too.
We first prove $K'$ has quasi-coherent cohomology sheaves; we urge the reader to skip this part. To do this, we may reduce to the case of a first order thickening, see Section \ref{section-thickenings}. Let $\mathcal{I} \subset \mathcal{O}_{X'}$ be the quasi-coherent sheaf of ideals cutting out $X$. Tensoring the short exact sequence $$ 0 \to \mathcal{I} \to \mathcal{O}_{X'} \to i_*\mathcal{O}_X \to 0 $$ with $K'$ we obtain a distinguished triangle $$ K' \otimes_{\mathcal{O}_{X'}}^\mathbf{L} \mathcal{I} \to K' \to K' \otimes_{\mathcal{O}_{X'}}^\mathbf{L} i_*\mathcal{O}_X \to (K' \otimes_{\mathcal{O}_{X'}}^\mathbf{L} \mathcal{I})[1] $$ Since $i_* = Ri_*$ and since we may view $\mathcal{I}$ as a quasi-coherent $\mathcal{O}_X$-module (as we have a first order thickening) we may rewrite this as $$ i_*(K \otimes_{\mathcal{O}_X}^\mathbf{L} \mathcal{I}) \to K' \to i_*K \to i_*(K \otimes_{\mathcal{O}_X}^\mathbf{L} \mathcal{I})[1] $$ Please use Cohomology of Spaces, Lemma \ref{spaces-cohomology-lemma-projection-formula-finite} to identify the terms. Since $K$ is in $D_\QCoh(\mathcal{O}_X)$ we conclude that $K'$ is in $D_\QCoh(\mathcal{O}_{X'})$; this uses Derived Categories of Spaces, Lemmas \ref{spaces-perfect-lemma-pseudo-coherent}, \ref{spaces-perfect-lemma-quasi-coherence-tensor-product}, and \ref{spaces-perfect-lemma-quasi-coherence-direct-image}. \medskip\noindent Assume $K'$ is in $D_\QCoh(\mathcal{O}_{X'})$. The question is \'etale local on $X'$ hence we may assume $X'$ is affine. In this case the result follows from the case of schemes (More on Morphisms, Lemma \ref{more-morphisms-lemma-thickening-pseudo-coherent}). The translation into the language of schemes uses Derived Categories of Spaces, Lemmas \ref{spaces-perfect-lemma-derived-quasi-coherent-small-etale-site} and \ref{spaces-perfect-lemma-descend-pseudo-coherent} and Remark \ref{spaces-perfect-remark-match-total-direct-images}.
Recall that being $Y$-perfect for $E$ means $E$ is pseudo-coherent and locally has finite tor dimension as a complex of $f^{-1}\mathcal{O}_Y$-modules (Definition \ref{definition-relatively-perfect}). By Lemma \ref{lemma-thickening-pseudo-coherent} we find that $E'$ is pseudo-coherent. In particular, $E'$ is in $D_\QCoh(\mathcal{O}_{X'})$, see Derived Categories of Spaces, Lemma \ref{spaces-perfect-lemma-pseudo-coherent}. By Lemma \ref{lemma-affine-locally-rel-perfect} this reduces us to the case of schemes. The case of schemes is More on Morphisms, Lemma \ref{more-morphisms-lemma-thickening-relatively-perfect}.
Choose a commutative diagram $$ \xymatrix{ U \ar[d] \ar[r]_h & V \ar[d] \\ X \ar[r]^f & Y } $$ where $U$, $V$ are schemes, the vertical arrows are \'etale, and $U \to X$ is surjective. By the lemma for the case of schemes (Algebraic Curves, Lemma \ref{curves-lemma-locus-where-nodal}) we find a maximal open subscheme $U' \subset U$ such that $h|_{U'} : U' \to V$ is at-worst-nodal of relative dimension $1$ and such that formation of $U'$ commutes with base change. Let $X' \subset X$ be the open subspace whose points correspond to the open subset $\Im(|U'| \to |X|)$. By Lemma \ref{lemma-nodal-local} we see that $X' \to Y$ is at-worst-nodal of relative dimension $1$ and that $X'$ is the largest open subspace with this property (this also implies that $U'$ is the inverse image of $X'$ in $U$, but we do not need this). Since the same is true after base change the proof is complete.