hcju/stacksqa huggingface dataset:
For any object $E$ of $D(\mathcal{O}_X)$ we can use Cohomology on Sites, Remark \ref{sites-cohomology-remark-base-change} to get a canonical base change map $Lg^*Rf_*E \to Rf'_*L(g')^*E$. To check this is an isomorphism we may work \'etale locally on $Y'$. Hence we may assume $g : Y' \to Y$ is a morphism of affine schemes. In particular, $g$ is affine and it suffices to show that $$ Rg_*Lg^*Rf_*E \to Rg_*Rf'_*L(g')^*E = Rf_*(Rg'_* L(g')^* E) $$ is an isomorphism, see Lemma \ref{lemma-affine-morphism} (and use Lemmas \ref{lemma-quasi-coherence-pullback}, \ref{lemma-quasi-coherence-tensor-product}, and \ref{lemma-quasi-coherence-direct-image} to see that the objects $Rf'_*L(g')^*E$ and $Lg^*Rf_*E$ have quasi-coherent cohomology sheaves). Note that $g'$ is affine as well (Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-base-change-affine}). By Lemma \ref{lemma-affine-morphism-pull-push} the map becomes a map $$ Rf_*E \otimes_{\mathcal{O}_Y}^\mathbf{L} g_*\mathcal{O}_{Y'} \longrightarrow Rf_*(E \otimes_{\mathcal{O}_X}^\mathbf{L} g'_*\mathcal{O}_{X'}) $$ Observe that $g'_*\mathcal{O}_{X'} = f^*g_*\mathcal{O}_{Y'}$. Thus by Lemma \ref{lemma-cohomology-base-change} it suffices to prove that $Lf^*g_*\mathcal{O}_{Y'} = f^*g_*\mathcal{O}_{Y'}$. This follows from our assumption that $X$ and $Y'$ are Tor independent over $Y$. Namely, to check it we may work \'etale locally on $X$, hence we may also assume $X$ is affine. Say $X = \Spec(A)$, $Y = \Spec(R)$ and $Y' = \Spec(R')$. Our assumption implies that $A$ and $R'$ are Tor independent over $R$ (see Lemma \ref{lemma-tor-independent} and More on Algebra, Lemma \ref{more-algebra-lemma-tor-independent}), i.e., $\text{Tor}_i^R(A, R') = 0$ for $i > 0$. In other words $A \otimes_R^\mathbf{L} R' = A \otimes_R R'$ which exactly means that $Lf^*g_*\mathcal{O}_{Y'} = f^*g_*\mathcal{O}_{Y'}$.
There is a canonical map $R\Hom_X(M, K) \to R\Hom_{X'}(L(g')^*M, L(g')^*K)$ in $D(\Gamma(X, \mathcal{O}_X))$ of global hom complexes, see Cohomology on Sites, Section \ref{sites-cohomology-section-global-RHom}. Restricting scalars we can view this as a map in $D(R)$. Then we can use the adjointness of restriction and $- \otimes_R^\mathbf{L} R'$ to get the displayed map of the lemma. Having defined the map it suffices to prove it is an isomorphism in the derived category of abelian groups. \medskip\noindent The right hand side is equal to $$ R\Hom_X(M, R(g')_*L(g')^*K) = R\Hom_X(M, K \otimes_{\mathcal{O}_X}^\mathbf{L} g'_*\mathcal{O}_{X'}) $$ by Lemma \ref{lemma-affine-morphism-pull-push}. In both cases the complex $R\SheafHom(M, K)$ is an object of $D_\QCoh(\mathcal{O}_X)$ by Lemma \ref{lemma-quasi-coherence-internal-hom}. There is a natural map $$ R\SheafHom(M, K) \otimes_{\mathcal{O}_X}^\mathbf{L} g'_*\mathcal{O}_{X'} \longrightarrow R\SheafHom(M, K \otimes_{\mathcal{O}_X}^\mathbf{L} g'_*\mathcal{O}_{X'}) $$ which is an isomorphism in both cases Lemma \ref{lemma-internal-hom-evaluate-tensor-isomorphism}. To see that this lemma applies in case (2) we note that $g'_*\mathcal{O}_{X'} = Rg'_*\mathcal{O}_{X'} = Lf^*g_*\mathcal{O}_X$ the second equality by Lemma \ref{lemma-compare-base-change}. Using Derived Categories of Schemes, Lemma \ref{perfect-lemma-tor-dimension-affine}, Lemma \ref{lemma-descend-tor-amplitude}, and Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-tor-amplitude-pullback} we conclude that $g'_*\mathcal{O}_{X'}$ has finite Tor dimension. Hence, in both cases by replacing $K$ by $R\SheafHom(M, K)$ we reduce to proving $$ R\Gamma(X, K) \otimes^\mathbf{L}_A A' \longrightarrow R\Gamma(X, K \otimes^\mathbf{L}_{\mathcal{O}_X} g'_*\mathcal{O}_{X'}) $$ is an isomorphism. Note that the left hand side is equal to $R\Gamma(X', L(g')^*K)$ by Lemma \ref{lemma-affine-morphism-pull-push}. Hence the result follows from Lemma \ref{lemma-compare-base-change}.
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}. If $\overline{x}'$ is a geometric point of $X'$ with image $\overline{x}$ in $X$, then $$ (L(g')^*E)_{\overline{x}'} = E_{\overline{x}} \otimes_{\mathcal{O}_{X, \overline{x}}}^\mathbf{L} \mathcal{O}_{X', \overline{x}'} $$ Let $\overline{y}'$ in $Y'$ and $\overline{y}$ in $Y$ be the image of $\overline{x}'$ and $\overline{x}$. Since $X$ and $Y'$ 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', \overline{y}'}$ in $D(\mathcal{O}_{Y', \overline{y}'})$. Thus (1) follows from More on Algebra, Lemma \ref{more-algebra-lemma-pull-tor-amplitude}. To see (2) observe that flatness of $\mathcal{G}$ is equivalent to the condition that $\mathcal{G}[0]$ has tor amplitude in $[0, 0]$. Applying (1) we conclude.
To check the map is an isomorphism we may work \'etale locally on $Y'$. Hence we may assume $g : Y' \to Y$ is a morphism of affine schemes. In this case, we will use the induction principle of Lemma \ref{lemma-induction-principle} to prove that for a quasi-compact and quasi-separated algebraic space $U$ \'etale over $X$ the similarly constructed map $Lg^*R(U \to Y)_*K|_U \to R(U' \to Y')_*K'|_{U'}$ is an isomorphism. Here $U' = X' \times_{g', X} U = Y' \times_{g, Y} U$. \medskip\noindent If $U$ is a scheme (for example affine), then the result holds. Namely, then $Y, Y', U, U'$ are schemes, $K$ and $K'$ come from objects of the derived category of the underlying schemes by Lemma \ref{lemma-derived-quasi-coherent-small-etale-site} and the condition of Derived Categories of Schemes, Lemma \ref{perfect-lemma-single-complex-base-change-condition} holds for these complexes by Lemma \ref{lemma-single-complex-base-change-condition}. Thus (by the compatibilities explained in Remark \ref{remark-match-total-direct-images}) we can apply the result in the case of schemes which is Derived Categories of Schemes, Lemma \ref{perfect-lemma-single-complex-base-change}. \medskip\noindent The induction step. Let $(U \subset W, V \to W)$ be an elementary distinguished square with $W$ a quasi-compact and quasi-separated algebraic space \'etale over $X$, with $U$ quasi-compact, $V$ affine and the result holds for $U$, $V$, and $U \times_W V$. To easy notation we replace $W$ by $X$ (this is permissible at this point). Denote $a : U \to Y$, $b : V \to Y$, and $c : U \times_X V \to Y$ the obvious morphisms. Let $a' : U' \to Y'$, $b' : V' \to Y'$ and $c' : U' \times_{X'} V' \to Y'$ be the base changes of $a$, $b$, and $c$. Using the distinguished triangles from relative Mayer-Vietoris (Lemma \ref{lemma-unbounded-relative-mayer-vietoris}) we obtain a commutative diagram $$ \xymatrix{ Lg^*Rf_*K \ar[r] \ar[d] & Rf'_*K' \ar[d] \\ Lg^*Ra_*K|_U \oplus Lg^*Rb_*K|_V \ar[r] \ar[d] & Ra'_* K'|_{U'} \oplus Rb'_* K'|_{V'} \ar[d] \\ Lg^*Rc_*K|_{U \times_X V} \ar[r] \ar[d] & Rc'_*K'|_{U' \times_{X'} V'} \ar[d] \\ Lg^*Rf_* K[1] \ar[r] & Rf'_* K'[1] } $$ Since the 2nd and 3rd horizontal arrows are isomorphisms so is the first (Derived Categories, Lemma \ref{derived-lemma-third-isomorphism-triangle}) and the proof of the lemma is finished.
The statement makes sense as the complexes involved have quasi-coherent cohomology sheaves by Lemmas \ref{lemma-quasi-coherence-pullback}, \ref{lemma-quasi-coherence-tensor-product}, and \ref{lemma-quasi-coherence-internal-hom} and Cohomology on Sites, Lemmas \ref{sites-cohomology-lemma-pseudo-coherent-pullback} and \ref{sites-cohomology-lemma-perfect-pullback}. Having said this, we can check the maps (\ref{equation-bc}) are isomorphisms in case (1) by computing the source and target of (\ref{equation-bc}) using the transitive property of tensor product, see More on Algebra, Lemma \ref{more-algebra-lemma-triple-tensor-product}. The map in (2) and (3) is the composition $$ L(g')^*R\SheafHom(E, K) \to R\SheafHom(L(g')^*E, L(g')^*K) \to R\SheafHom(L(g')^*E, K') $$ where the first arrow is Cohomology on Sites, Remark \ref{sites-cohomology-remark-prepare-fancy-base-change} and the second arrow comes from the given map $L(g')^*K \to K'$. To prove the maps (\ref{equation-bc}) are isomorphisms one represents $E_x$ by a bounded complex of finite projective $\mathcal{O}_{X. x}$-modules in case (2) or by a bounded above complex of finite free modules in case (3) and computes the source and target of the arrow. Some details omitted.
The statement means the following. Let $g : Y' \to Y$ be a morphism of algebraic spaces and consider the base change diagram $$ \xymatrix{ X' \ar[r]_{g'} \ar[d]_{f'} & X \ar[d]^f \\ Y' \ar[r]^g & Y } $$ in other words $X' = Y' \times_Y X$. The lemma asserts that $$ Lg^*Rf_*(E \otimes^\mathbf{L}_{\mathcal{O}_X} \mathcal{G}^\bullet) \longrightarrow Rf'_*(L(g')^*E \otimes^\mathbf{L}_{\mathcal{O}_{X'}} (g')^*\mathcal{G}^\bullet) $$ is an isomorphism. Observe that on the right hand side we do {\bf not} use derived pullback on $\mathcal{G}^\bullet$. To prove this, we apply Lemmas \ref{lemma-single-complex-base-change} and \ref{lemma-single-complex-base-change-condition-inherited} to see that it suffices to prove the canonical map $$ L(g')^*\mathcal{G}^\bullet \to (g')^*\mathcal{G}^\bullet $$ satisfies the equivalent conditions of Lemma \ref{lemma-single-complex-base-change-condition}. This follows by checking the condition on stalks, where it immediately follows from the fact that $\mathcal{G}^\bullet_{\overline{x}} \otimes_{\mathcal{O}_{Y, \overline{y}}} \mathcal{O}_{Y', \overline{y}'}$ computes the derived tensor product by our assumptions on the complex $\mathcal{G}^\bullet$.
The statement means the following. Let $g : Y' \to Y$ be a morphism of algebraic spaces and consider the base change diagram $$ \xymatrix{ X' \ar[r]_h \ar[d]_{f'} & X \ar[d]^f \\ Y' \ar[r]^g & Y } $$ in other words $X' = Y' \times_Y X$. The lemma asserts that $$ Lg^*Rf_*R\SheafHom(E, \mathcal{G}^\bullet) \longrightarrow R(f')_*R\SheafHom(L(g')^*E, (g')^*\mathcal{G}^\bullet) $$ is an isomorphism. Observe that on the right hand side we do {\bf not} use the derived pullback on $\mathcal{G}^\bullet$. To prove this, we apply Lemmas \ref{lemma-single-complex-base-change} and \ref{lemma-single-complex-base-change-condition-inherited} to see that it suffices to prove the canonical map $$ L(g')^*\mathcal{G}^\bullet \to (g')^*\mathcal{G}^\bullet $$ satisfies the equivalent conditions of Lemma \ref{lemma-single-complex-base-change-condition}. This was shown in the proof of Lemma \ref{lemma-base-change-tensor}.
By Lemma \ref{lemma-direct-image-coherent} we see that $Rf_*E$ is an object of $D^b_{\textit{Coh}}(\mathcal{O}_Y)$. Hence $Rf_*E$ is pseudo-coherent (Lemma \ref{lemma-identify-pseudo-coherent-noetherian}). Hence it suffices to show that $Rf_*E$ has finite tor dimension, see Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-perfect}. By Lemma \ref{lemma-tor-qc-qs} it suffices to check that $Rf_*(E) \otimes_{\mathcal{O}_Y}^\mathbf{L} \mathcal{F}$ has universally bounded cohomology for all quasi-coherent sheaves $\mathcal{F}$ on $Y$. Bounded from above is clear as $Rf_*(E)$ is bounded from above. Let $T \subset |X|$ be the union of the supports of $H^i(E)$ for all $i$. Then $T$ is proper over $Y$ by assumptions (1) and (2) and Lemma \ref{lemma-union-closed-proper-over-base}. In particular there exists a quasi-compact open subspace $X' \subset X$ containing $T$. Setting $f' = f|_{X'}$ we have $Rf_*(E) = Rf'_*(E|_{X'})$ because $E$ restricts to zero on $X \setminus T$. Thus we may replace $X$ by $X'$ and assume $f$ is quasi-compact. We have assumed $f$ is quasi-separated. Thus $$ Rf_*(E) \otimes_{\mathcal{O}_Y}^\mathbf{L} \mathcal{F} = Rf_*\left(E \otimes_{\mathcal{O}_X}^\mathbf{L} Lf^*\mathcal{F}\right) = Rf_*\left(E \otimes_{f^{-1}\mathcal{O}_Y}^\mathbf{L} f^{-1}\mathcal{F}\right) $$ by Lemma \ref{lemma-cohomology-base-change} and Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-variant-derived-pullback}. By assumption (3) the complex $E \otimes_{f^{-1}\mathcal{O}_Y}^\mathbf{L} f^{-1}\mathcal{F}$ has cohomology sheaves in a given finite range, say $[a, b]$. Then $Rf_*$ of it has cohomology in the range $[a, \infty)$ and we win.
The object $K$ is perfect by Lemma \ref{lemma-perfect-direct-image}. We check the lemma applies: Locally $E$ is isomorphic to a finite complex of finite free $\mathcal{O}_X$-modules. Hence locally $E \otimes^\mathbf{L}_{\mathcal{O}_X} \mathcal{G}^\bullet$ is isomorphic to a finite complex whose terms are of the form $$ \bigoplus\nolimits_{i = a, \ldots, b} (\mathcal{G}^i)^{\oplus r_i} $$ for some integers $a, b, r_a, \ldots, r_b$. This immediately implies the cohomology sheaves $H^i(E \otimes^\mathbf{L}_{\mathcal{O}_X} \mathcal{G})$ are coherent. The hypothesis on the tor dimension also follows as $\mathcal{G}^i$ is flat over $f^{-1}\mathcal{O}_Y$.
Since $E$ is a perfect complex there exists a dual perfect complex $E^\vee$, see Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-dual-perfect-complex}. Observe that $R\SheafHom(E, \mathcal{G}^\bullet) = E^\vee \otimes^\mathbf{L}_{\mathcal{O}_X} \mathcal{G}^\bullet$. Thus the perfectness of $K$ follows from Lemma \ref{lemma-tensor-perfect}.
We have $$ \mathcal{G}^\bullet \otimes_{\mathcal{O}_X}^\mathbf{L} Lf^*\mathcal{F} = \mathcal{G}^\bullet \otimes_{f^{-1}\mathcal{O}_B}^\mathbf{L} f^{-1}\mathcal{F} = \mathcal{G}^\bullet \otimes_{f^{-1}\mathcal{O}_B} f^{-1}\mathcal{F} = \mathcal{G}^\bullet \otimes_{\mathcal{O}_X} f^*\mathcal{F} $$ the first equality by Cohomology on Sites, Lemma \ref{sites-cohomology-lemma-variant-derived-pullback}, the second as $\mathcal{G}^n$ is a flat $f^{-1}\mathcal{O}_B$-module, and the third by definition of pullbacks. Hence we obtain \begin{align*} H^i(X, E \otimes^\mathbf{L}_{\mathcal{O}_X} (\mathcal{G}^\bullet \otimes_{\mathcal{O}_X} f^*\mathcal{F})) & = H^i(X, E \otimes^\mathbf{L}_{\mathcal{O}_X} \mathcal{G}^\bullet \otimes_{\mathcal{O}_X}^\mathbf{L} Lf^*\mathcal{F}) \\ & = H^i(B, Rf_*(E \otimes^\mathbf{L}_{\mathcal{O}_X} \mathcal{G}^\bullet \otimes^\mathbf{L}_{\mathcal{O}_X} Lf^*\mathcal{F})) \\ & = H^i(B, Rf_*(E \otimes^\mathbf{L}_{\mathcal{O}_X} \mathcal{G}^\bullet) \otimes^\mathbf{L}_{\mathcal{O}_B} \mathcal{F}) \\ & = H^i(B, K \otimes^\mathbf{L}_{\mathcal{O}_B} \mathcal{F}) \end{align*} The first equality by the above, the second by Leray (Cohomology on Sites, Remark \ref{sites-cohomology-remark-before-Leray}), and the third equality by Lemma \ref{lemma-cohomology-base-change}. The statement on boundary maps means the following: Given a short exact sequence $0 \to \mathcal{F}_1 \to \mathcal{F}_2 \to \mathcal{F}_3 \to 0$ then the isomorphisms fit into commutative diagrams $$ \xymatrix{ H^i(B, K \otimes^\mathbf{L}_{\mathcal{O}_B} \mathcal{F}_3) \ar[r] \ar[d]_\delta & H^i(X, E \otimes^\mathbf{L}_{\mathcal{O}_X} (\mathcal{G}^\bullet \otimes_{\mathcal{O}_X} f^*\mathcal{F}_3)) \ar[d]^\delta \\ H^{i + 1}(B, K \otimes^\mathbf{L}_{\mathcal{O}_B} \mathcal{F}_1) \ar[r] & H^{i + 1}(X, E \otimes^\mathbf{L}_{\mathcal{O}_X} (\mathcal{G}^\bullet \otimes_{\mathcal{O}_X} f^*\mathcal{F}_1)) } $$ where the boundary maps come from the distinguished triangle $$ K \otimes^\mathbf{L}_{\mathcal{O}_B} \mathcal{F}_1 \to K \otimes^\mathbf{L}_{\mathcal{O}_B} \mathcal{F}_2 \to K \otimes^\mathbf{L}_{\mathcal{O}_B} \mathcal{F}_3 \to K \otimes^\mathbf{L}_{\mathcal{O}_B} \mathcal{F}_1[1] $$ and the distinguished triangle in $D(\mathcal{O}_X)$ associated to the short exact sequence $$ 0 \to \mathcal{G}^\bullet \otimes_{\mathcal{O}_X} f^*\mathcal{F}_1 \to \mathcal{G}^\bullet \otimes_{\mathcal{O}_X} f^*\mathcal{F}_2 \to \mathcal{G}^\bullet \otimes_{\mathcal{O}_X} f^*\mathcal{F}_3 \to 0 $$ of complexes. This sequence is exact because $\mathcal{G}^n$ is flat over $B$. We omit the verification of the commutativity of the displayed diagram.
As in the proof of Lemma \ref{lemma-ext-perfect} let $E^\vee$ be the dual perfect complex and recall that $K = Rf_*(E^\vee \otimes_{\mathcal{O}_X}^\mathbf{L} \mathcal{G}^\bullet)$. Since we also have $$ \Ext^i_{\mathcal{O}_X}(E, \mathcal{G}^\bullet \otimes_{\mathcal{O}_X} f^*\mathcal{F}) = H^i(X, E^\vee \otimes^\mathbf{L}_{\mathcal{O}_X} (\mathcal{G}^\bullet \otimes_{\mathcal{O}_X} f^*\mathcal{F})) $$ by construction of $E^\vee$, the existence of the isomorphisms follows from Lemma \ref{lemma-compute-tensor-perfect} applied to $E^\vee$ and $\mathcal{G}^\bullet$. The statement on boundary maps means the following: Given a short exact sequence $0 \to \mathcal{F}_1 \to \mathcal{F}_2 \to \mathcal{F}_3 \to 0$ then the isomorphisms fit into commutative diagrams $$ \xymatrix{ H^i(B, K \otimes^\mathbf{L}_{\mathcal{O}_B} \mathcal{F}_3) \ar[r] \ar[d]_\delta & \Ext^i_{\mathcal{O}_X}(E, \mathcal{G}^\bullet \otimes_{\mathcal{O}_X} f^*\mathcal{F}_3) \ar[d]^\delta \\ H^{i + 1}(B, K \otimes^\mathbf{L}_{\mathcal{O}_B} \mathcal{F}_1) \ar[r] & \Ext^{i + 1}_{\mathcal{O}_X}(E, \mathcal{G}^\bullet \otimes_{\mathcal{O}_X} f^*\mathcal{F}_1) } $$ where the boundary maps come from the distinguished triangle $$ K \otimes^\mathbf{L}_{\mathcal{O}_B} \mathcal{F}_1 \to K \otimes^\mathbf{L}_{\mathcal{O}_B} \mathcal{F}_2 \to K \otimes^\mathbf{L}_{\mathcal{O}_B} \mathcal{F}_3 \to K \otimes^\mathbf{L}_{\mathcal{O}_B} \mathcal{F}_1[1] $$ and the distinguished triangle in $D(\mathcal{O}_X)$ associated to the short exact sequence $$ 0 \to \mathcal{G}^\bullet \otimes_{\mathcal{O}_X} f^*\mathcal{F}_1 \to \mathcal{G}^\bullet \otimes_{\mathcal{O}_X} f^*\mathcal{F}_2 \to \mathcal{G}^\bullet \otimes_{\mathcal{O}_X} f^*\mathcal{F}_3 \to 0 $$ of complexes. This sequence is exact because $\mathcal{G}^n$ is flat over $B$. We omit the verification of the commutativity of the displayed diagram.
For every quasi-compact and quasi-separated object $U_0$ of $(X_0)_{spaces, \etale}$ consider the condition $P$ that the canonical map $$ \colim_{i \geq 0} \Hom_{D(\mathcal{O}_{U_i})}(E_i|_{U_i}, K_i|_{U_i}) \longrightarrow \Hom_{D(\mathcal{O}_U)}(E|_U, K|_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$ by the induction principle of Lemma \ref{lemma-induction-principle}. Condition (2) of this lemma follows immediately from Mayer-Vietoris for hom in the derived category, see Lemma \ref{lemma-mayer-vietoris-hom}. Thus it suffices to prove the lemma when $X_0$ is affine. \medskip\noindent If $X_0$ is affine, then the result follows from the case of schemes, see Derived Categories of Schemes, Lemma \ref{perfect-lemma-descend-homomorphisms}. To see this use the equivalence of Lemma \ref{lemma-derived-quasi-coherent-small-etale-site} and use the translation of properties explained in Lemmas \ref{lemma-descend-pseudo-coherent}, \ref{lemma-descend-tor-amplitude}, and \ref{lemma-descend-perfect}.
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_{perf}(\mathcal{O}_{U_i}) \longrightarrow D_{perf}(\mathcal{O}_U) $$ is an equivalence where ${}_{perf}$ indicates the full subcategory of perfect objects and where $U = X \times_{X_0} U_0$ and $U_i = X_i \times_{X_0} U_0$. We will prove $P$ holds for every $U_0$ by the induction principle of Lemma \ref{lemma-induction-principle}. First, we observe that we already know the functor is fully faithful by Lemma \ref{lemma-descend-homomorphisms}. Thus it suffices to prove essential surjectivity. \medskip\noindent We first check condition (2) of the induction principle. Thus suppose that we have an elementary distinguished square $(U_0 \subset X_0, V_0 \to X_0)$ and that $P$ holds for $U_0$, $V_0$, and $U_0 \times_{X_0} V_0$. Let $E$ be a perfect object of $D(\mathcal{O}_X)$. We can find $i \geq 0$ and $E_{U, i}$ perfect on $U_i$ and $E_{V, i}$ perfect on $V_i$ whose pullback to $U$ and $V$ are isomorphic to $E|_U$ and $E|_V$. Denote $$ a : E_{U, i} \to (R(X \to X_i)_*E)|_{U_i} \quad\text{and}\quad b : E_{V, i} \to (R(X \to X_i)_*E)|_{V_i} $$ the maps adjoint to the isomorphisms $L(U \to U_i)^*E_{U, i} \to E|_U$ and $L(V \to V_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_{X_i} V_i} \to E_{V, i}|_{U_i \times_{X_i} V_i}$ which pulls back to the identifications  $$ L(U \to U_i)^*E_{U, i}|_{U \times_X V} \to E|_{U \times_X V} \to L(V \to V_i)^*E_{V, i}|_{U \times_X V}. $$ Apply Lemma \ref{lemma-glue} to get an object $E_i$ on $X_i$ and a map $d : E_i \to R(X \to X_i)_*E$ which restricts to the maps $a$ and $b$ over $U_i$ and $V_i$. Then it is clear that $E_i$ is perfect and that $d$ is adjoint to an isomorphism $L(X \to X_i)^*E_i \to E$. \medskip\noindent Finally, we check condition (1) of the induction principle, in other words, we check the lemma holds when $X_0$ is affine. This follows from the case of schemes, see Derived Categories of Schemes, Lemma \ref{perfect-lemma-descend-perfect}. To see this use the equivalence of Lemma \ref{lemma-derived-quasi-coherent-small-etale-site} and use the translation of Lemma \ref{lemma-descend-perfect}.
The statement on base change is Lemma \ref{lemma-base-change-tensor}. Thus it suffices to show that $K$ is a perfect object. If $Y$ is Noetherian, then this follows from Lemma \ref{lemma-tensor-perfect}. We will reduce to this case by Noetherian approximation. We encourage the reader to skip the rest of this proof. \medskip\noindent The question is 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, Lemma \ref{spaces-limits-lemma-descend-modules-finite-presentation} we may assume after increasing $i$, that there exists a bounded complex of finitely presented $\mathcal{O}_{X_i}$-modules $\mathcal{G}_i^\bullet$ whose pullback to $X$ is $\mathcal{G}^\bullet$. After increasing $i$ we may assume $\mathcal{G}_i^n$ is flat over $R_i$, see Limits of Spaces, Lemma \ref{spaces-limits-lemma-descend-flat}. After increasing $i$ we may assume the support of $\mathcal{G}_i^n$ is proper over $R_i$, see Limits of Spaces, Lemma \ref{spaces-limits-lemma-eventually-proper-support}. Finally, by Lemma \ref{lemma-descend-perfect} we may, after increasing $i$, assume there exists a perfect object $E_i$ of $D(\mathcal{O}_{X_i})$ whose pullback to $X$ is $E$. Applying Lemma \ref{lemma-compute-tensor-perfect} to $X_i \to \Spec(R_i)$, $E_i$, $\mathcal{G}_i^\bullet$ and using the base change property already shown we obtain the result.