hcju/stacksqa huggingface dataset:
This follows formally from Lemmas \ref{lemma-relative-pseudo-coherent-descends-fppf} and \ref{lemma-relative-pseudo-coherent-post-compose}. Namely, if $E$ is $m$-pseudo-coherent relative to $S$, then $Lg_i^*E$ is $m$-pseudo-coherent relative to $S$ (by the first lemma), hence $Lg_i^*E$ is $m$-pseudo-coherent relative to $S_i$ (by the second). Conversely, if $Lg_i^*E$ is $m$-pseudo-coherent relative to $S_i$, then $Lg_i^*E$ is $m$-pseudo-coherent relative to $S$ (by the second lemma), hence $E$ is $m$-pseudo-coherent relative to $S$ (by the first lemma).
We first prove $K'$ has quasi-coherent cohomology sheaves. 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, Lemma \ref{cohomology-lemma-projection-formula-closed-immersion} 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 Schemes, Lemmas \ref{perfect-lemma-pseudo-coherent}, \ref{perfect-lemma-quasi-coherence-tensor-product}, and \ref{perfect-lemma-quasi-coherence-direct-image}. \medskip\noindent Assume $K'$ is in $D_\QCoh(\mathcal{O}_{X'})$. The question is local on $X'$ hence we may assume $X'$ is affine. Say $X' = \Spec(A')$ and $X = \Spec(A)$ with $A = A'/I$ and $I$ nilpotent. Then $K'$ comes from an object $M' \in D(A')$, see Derived Categories of Schemes, Lemma \ref{perfect-lemma-affine-compare-bounded}. Thus $M = M' \otimes_{A'}^\mathbf{L} A$ is a pseudo-coherent object of $D(A)$ by Derived Categories of Schemes, Lemma \ref{perfect-lemma-pseudo-coherent-affine} and our assumption on $K$. Hence we can represent $M$ by a bounded above complex of finite free $A$-modules $E^\bullet$, see More on Algebra, Lemma \ref{more-algebra-lemma-pseudo-coherent}. By More on Algebra, Lemma \ref{more-algebra-lemma-lift-complex-projectives} we conclude that $M'$ is pseudo-coherent as desired.
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 (Derived Categories of Schemes, Definition \ref{perfect-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 Schemes, Lemma \ref{perfect-lemma-pseudo-coherent}. To prove that $E'$ locally has finite tor dimension we may work locally on $X'$. Hence we may assume $X'$, $S'$, $X$, $S$ are affine, say given by rings $A'$, $R'$, $A$, $R$. Then we reduce to the commutative algebra version by Derived Categories of Schemes, Lemma \ref{perfect-lemma-affine-locally-rel-perfect}. The commutative algebra version in More on Algebra, Lemma \ref{more-algebra-lemma-thickening-relatively-perfect}.
Choose a finite affine open covering $X = U_1 \cup \ldots \cup U_n$. For each $i$ we can choose a closed immersion $U_i \to \mathbf{A}^{d_i}_S$. Set $U_{i, 0} = S_0 \times_S U_i$. For each $i$ the complex $E_0|_{U_{i, 0}}$ has tor amplitude in $[a_i, b_i]$ for some $a_i, b_i \in \mathbf{Z}$. Let $x \in X$ be a point. We will show that the tor amplitude of $E_x$ over $R$ is in $[a_i - d_i, b_i]$ for some $i$. This will finish the proof as the tor amplitude can be read off from the stalks by Cohomology, Lemma \ref{cohomology-lemma-tor-amplitude-stalk}. \medskip\noindent Since $f$ is proper $f(\overline{\{x\}})$ is a closed subset of $S$. Since $I$ is contained in the Jacobson radical, we see that $f(\overline{\{x\}})$ meeting the closed subset $S_0 \subset S$. Hence there is a specialization $x \leadsto x_0$ with $x_0 \in X_0$. Pick an $i$ with $x_0 \in U_i$, so $x_0 \in U_{i, 0}$. We will fix $i$ for the rest of the proof. Write $U_i = \Spec(A)$. Then $A$ is a flat, finitely presented $R$-algebra which is a quotient of a polynomial $R$-algebra in $d_i$-variables. The restriction $E|_{U_i}$ corresponds (by Derived Categories of Schemes, Lemma \ref{perfect-lemma-affine-compare-bounded} and \ref{perfect-lemma-pseudo-coherent-affine}) to a pseudo-coherent object $K$ of $D(A)$. Observe that $E_0$ corresponds to $K \otimes_A^\mathbf{L} A/IA$. Let $\mathfrak q \subset \mathfrak q_0 \subset A$ be the prime ideals corresponding to $x \leadsto x_0$. Then $E_x = K_{\mathfrak q}$ and $K_{\mathfrak q}$ is a localization of $K_{\mathfrak q_0}$. Hence it suffices to show that $K_{\mathfrak q_0}$ has tor amplitude in $[a_i - d_i, b_i]$ as a complex of $R$-modules. Let $I \subset \mathfrak p_0 \subset R$ be the prime ideal corresponding to $f(x_0)$. Then we have \begin{align*} K \otimes_R^\mathbf{L} \kappa(\mathfrak p_0) & = (K \otimes_R^\mathbf{L} R/I) \otimes_{R/I}^\mathbf{L} \kappa(\mathfrak p_0) \\ & = (K \otimes_A^\mathbf{L} A/IA) \otimes_{R/I}^\mathbf{L} \kappa(\mathfrak p_0) \end{align*} the second equality because $R \to A$ is flat. By our choice of $a_i, b_i$ this complex has cohomology only in degrees in the interval $[a_i, b_i]$. Thus we may finally apply More on Algebra, Lemma \ref{more-algebra-lemma-lift-from-fibre-relatively-perfect} to $R \to A$, $\mathfrak q_0$, $\mathfrak p_0$ and $K$ to conclude.
To prove the lemma we may replace $Y$ by an open neighbourhood of $y$. Thus we may assume $Y$ is affine and that all fibres of $f$ have dimension $\leq 1$, see Morphisms, Lemma \ref{morphisms-lemma-openness-bounded-dimension-fibres}. In this case $R^1f_*\mathcal{O}_X$ is a quasi-coherent $\mathcal{O}_Y$-module of finite type and its formation commutes with arbitrary base change, see Limits, Lemmas \ref{limits-lemma-proper-top-cohomology-finite-type} and \ref{limits-lemma-higher-direct-images-zero-above-dimension-fibre}. The lemma follows immediately.
To prove the lemma we may replace $Y$ by an open neighbourhood of $y$. Thus we may assume $Y$ is affine and that all fibres of $f$ have dimension $\leq 1$, see Morphisms, Lemma \ref{morphisms-lemma-openness-bounded-dimension-fibres}. In this case $R^1f_*\mathcal{O}_X$ is a quasi-coherent $\mathcal{O}_Y$-module of finite type and its formation commutes with arbitrary base change, see Limits, Lemmas \ref{limits-lemma-proper-top-cohomology-finite-type} and \ref{limits-lemma-higher-direct-images-zero-above-dimension-fibre}. Say $Y = \Spec(A)$, $y$ corresponds to the prime $\mathfrak p \subset A$, and $R^1f_*\mathcal{O}_X$ corresponds to the finite $A$-module $M$. Then $H^1(X_y, \mathcal{O}_{X_y}) = 0$ means that $\mathfrak pM_\mathfrak p = M_\mathfrak p$ by the statement on base change. By Nakayama's lemma we conclude $M_\mathfrak p = 0$. Since $M$ is finite, we find an $f \in A$, $f \not \in \mathfrak p$ such that $M_f = 0$. Thus taking $V$ the principal open $D(f)$ we obtain the desired result.
The vanishing in (1) is Limits, Lemma \ref{limits-lemma-higher-direct-images-zero-above-dimension-fibre}. To prove (2) we may work locally on $Y$ and assume $Y$ is affine. Then $R^1f_*\mathcal{F}$ is the quasi-coherent module on $Y$ associated to the module $H^1(X, \mathcal{F})$. Here we use that $Y$ is affine, quasi-coherence of higher direct images (Cohomology of Schemes, Lemma \ref{coherent-lemma-quasi-coherence-higher-direct-images}), and Cohomology of Schemes, Lemma \ref{coherent-lemma-quasi-coherence-higher-direct-images-application}. Since $Y$ is affine, the quasi-coherent module $\mathcal{G}$ is globally generated, and hence so is $f^*\mathcal{G}$ and $\mathcal{F}$. In this way we see that (4) implies (2). Part (3) follows from (1) as well as the remarks on quasi-coherence of direct images just made. Thus all that remains is the prove (4). If $\mathcal{F}$ is globally generated, then there is a surjection $\bigoplus_{i \in I} \mathcal{O}_X \to \mathcal{F}$. By part (1) and the long exact sequence of cohomology this induces a surjection on $H^1$. Since $H^1(X, \mathcal{O}_X) = 0$ because $R^1f_*\mathcal{O}_X = 0$ by Lemma \ref{lemma-h1-fibre-zero}, and since $H^1(X, -)$ commutes with direct sums (Cohomology, Lemma \ref{cohomology-lemma-quasi-separated-cohomology-colimit}) we conclude.
We may assume $Y$ and $Y'$ affine. Then we can choose a closed immersion $Y' \to Y''$ with $Y'' \to Y$ a flat morphism of affines. By flat base change (Cohomology of Schemes, Lemma \ref{coherent-lemma-flat-base-change-cohomology}) we see that the result holds for $X'' \to Y''$. Thus we may assume $Y'$ is a closed subscheme of $Y$. Let $\mathcal{I} \subset \mathcal{O}_Y$ be the ideal cutting out $Y'$. Then there is a short exact sequence $$ 0 \to \mathcal{I}\mathcal{O}_X \to \mathcal{O}_X \to \mathcal{O}_{X'} \to 0 $$ where we view $\mathcal{O}_{X'}$ as a quasi-coherent module on $X$. By Lemma \ref{lemma-globally-generated-vanishing} we have $H^1(X, \mathcal{I}\mathcal{O}_X) = 0$. It follows that $$ H^0(Y, \mathcal{O}_Y) \to H^0(Y, f_*\mathcal{O}_X) = H^0(X, \mathcal{O}_X) \to H^0(X, \mathcal{O}_{X'}) $$ is surjective as desired. The first arrow is surjective as $Y$ is affine and since we assumed $\mathcal{O}_Y \to f_*\mathcal{O}_X$ is surjective and the second by the long exact sequence of cohomology associated to the short exact sequence above and the vanishing just proved.
We may assume $Y$ and $S$ are affine, say $S = \Spec(A)$. To show the quasi-coherent $\mathcal{O}_Y$-module $f_*\mathcal{O}_X$ is flat relative to $S$ it suffices to show that $H^0(X, \mathcal{O}_X)$ is flat over $A$ (some details omitted). By Lemma \ref{lemma-globally-generated-vanishing} we have $H^1(X, \mathcal{O}_X \otimes_A M) = 0$ for every $A$-module $M$. Since also $\mathcal{O}_X$ is flat over $A$ we deduce the functor $M \mapsto H^0(X, \mathcal{O}_X \otimes_A M)$ is exact. Moreover, this functor commutes with direct sums by Cohomology, Lemma \ref{cohomology-lemma-quasi-separated-cohomology-colimit}. Then it is an exercise to see that $H^0(X, \mathcal{O}_X \otimes_A M) = M \otimes_A H^0(X, \mathcal{O}_X)$ functorially in $M$ and this gives the desired flatness. Finally, if $S' \to S$ is a morphism of affines given by the ring map $A \to A'$, then in the affine case just discussed we see that $$ H^0(X \times_S S', \mathcal{O}_{X \times_S S'}) = H^0(X, \mathcal{O}_X \otimes_A A') = H^0(X, \mathcal{O}_X) \otimes_A A' $$ This shows that formation of $f_*\mathcal{O}_X$ commutes with any base change $S' \to S$. Some details omitted.
By the projection formula (Cohomology, Lemma \ref{cohomology-lemma-projection-formula}) we see that $f_*f^*\mathcal{N} \cong \mathcal{N}$ for $\mathcal{N} \in \Pic(Y)$. We claim that for $\mathcal{L} \in \Pic(X)$ with $\mathcal{L}|_{X_y} \cong \mathcal{O}_{X_y}$ for all $y \in Y$ we have $\mathcal{N} = f_*\mathcal{L}$ is invertible and $\mathcal{L} \cong f^*\mathcal{N}$. This will finish the proof. \medskip\noindent The $\mathcal{O}_Y$-module $\mathcal{N} = f_*\mathcal{L}$ is coherent by Cohomology of Schemes, Proposition \ref{coherent-proposition-proper-pushforward-coherent}. Thus to see that it is an invertible $\mathcal{O}_Y$-module, it suffices to check on stalks (Algebra, Lemma \ref{algebra-lemma-finite-projective}). Since the map from a Noetherian local ring to its completion is faithfully flat, it suffices to check the completion $(f_*\mathcal{L})_y^\wedge$ is free (see Algebra, Section \ref{algebra-section-completion-noetherian} and Lemma \ref{algebra-lemma-finite-projective-descends}). For this we will use the theorem of formal functions as formulated in Cohomology of Schemes, Lemma \ref{coherent-lemma-formal-functions-stalk}. Since $f_*\mathcal{O}_X = \mathcal{O}_Y$ and hence $(f_*\mathcal{O}_X)_y^\wedge \cong \mathcal{O}_{Y, y}^\wedge$, it suffices to show that $\mathcal{L}|_{X_n} \cong \mathcal{O}_{X_n}$ for each $n$ (compatibly for varying $n$. By Lemma \ref{lemma-picard-group-first-order-thickening} we have an exact sequence $$ H^1(X_y, \mathfrak m_y^n\mathcal{O}_X/\mathfrak m_y^{n + 1}\mathcal{O}_X) \to \Pic(X_{n + 1}) \to \Pic(X_n) $$ with notation as in the theorem on formal functions. Observe that we have a surjection $$ \mathcal{O}_{X_y}^{\oplus r_n} \cong \mathfrak m_y^n/\mathfrak m_y^{n + 1} \otimes_{\kappa(y)} \mathcal{O}_{X_y} \longrightarrow \mathfrak m_y^n\mathcal{O}_X/\mathfrak m_y^{n + 1}\mathcal{O}_X $$ for some integers $r_n \geq 0$. Since $\dim(X_y) \leq 1$ this surjection induces a surjection on first cohomology groups (by the vanishing of cohomology in degrees $\geq 2$ coming from Cohomology, Proposition \ref{cohomology-proposition-vanishing-Noetherian}). Hence the $H^1$ in the sequence is zero and the transition maps $\Pic(X_{n + 1}) \to \Pic(X_n)$ are injective as desired. \medskip\noindent We still have to show that $f^*\mathcal{N} \cong \mathcal{L}$. This is proved by the same method and we omit the details.
Recall that we have a partial ordering on $I$ such that the closure of $X_i$ is contained in $\bigcup_{j \leq i} X_j$ for all $i \in I$. Let $I' \subset I$ be the set of maximal indices of $I$. If $i \in I'$, then $X_i$ is open in $X$ because the union of the closures of the other strata is the complement of $X_i$. Let $U = \bigcup_{i \in I'} X_i$ viewed as an open subscheme of $X$ so that $U_{red} = \coprod_{i \in I'} X_i$ as schemes. Then $U$ is an affine scheme by Schemes, Lemma \ref{schemes-lemma-disjoint-union-affines} and Lemma \ref{lemma-thickening-affine-scheme}. The morphism $U \to X$ is affine as each $X_i \to X$, $i \in I'$ is affine by the same reasoning using Lemma \ref{lemma-thicken-property-morphisms}. The complement $Z = X \setminus U$ endowed with the reduced induced scheme structure has the affine stratification $Z = \bigcup_{i \in I \setminus I'} X_i$. Here we use that a morphism of schemes $T \to Z$ is affine if and only if the composition $T \to X$ is affine; this follows from Morphisms, Lemmas \ref{morphisms-lemma-closed-immersion-affine}, \ref{morphisms-lemma-composition-affine}, and \ref{morphisms-lemma-affine-permanence}. Observe that the partially ordered set $I \setminus I'$ has length exactly one less than the length of $I$. Hence by induction we find that $Z$ has an affine stratification $Z = Z_0 \amalg \ldots \amalg Z_{n - 1}$ with index set $\{1, \ldots, n\}$. Setting $Z_n = U$ we obtain the desired stratification of $X$.
Let $X = \bigcup X_i$ be a finite affine stratification. Since each $X_i$ is affine hence quasi-compact, we conclude that $X$ is quasi-compact. Let $U, V \subset X$ be affine open. Then $U \cap X_i$ and $V \cap X_i$ are affine open in $X_i$ since $X_i \to X$ is an affine morphism. Hence $U \cap V \cap X_i$ is an affine open of the affine scheme $X_i$ (see Schemes, Lemma \ref{schemes-lemma-characterize-separated} for example). Therefore $U \cap V = \coprod U \cap V \cap X_i$ is quasi-compact as a finite union of affine strata. We conclude that $X$ is quasi-separated by Schemes, Lemma \ref{schemes-lemma-characterize-quasi-separated}. \medskip\noindent Assume $X$ is quasi-compact and quasi-separated. We may use the induction principle of Cohomology of Schemes, Lemma \ref{coherent-lemma-induction-principle} to prove the assertion that $X$ has a finite affine stratification. If $X$ is empty, then it has an empty affine stratification. If $X$ is nonempty affine then it has an affine stratification with one stratum. Next, asssume $X = U \cup V$ where $U$ is quasi-compact open, $V$ is affine open, and we have a finite affine stratifications $U = \bigcup_{i \in I} U_i$ and $U \cap V = \coprod_{j \in J} W_j$. Denote $Z = X \setminus V$ and $Z' = X \setminus U$. Note that $Z$ is closed in $U$ and $Z'$ is closed in $V$. Observe that $U_i \cap Z$ and $U_i \cap W_j = U_i \times_U W_j$ are affine schemes affine over $U$. (Hints: use that $U_i \times_U W_j \to W_j$ is affine as a base change of $U_i \to U$, hence $U_i \cap W_j$ is affine, hence $U_i \cap W_j \to U_i$ is affine, hence $U_i \cap W_j \to U$ is affine.) It follows that $$ U = \coprod\nolimits_{i \in I} (U_i \cap Z) \amalg \coprod\nolimits_{(i, j) \in I \times J} (U_i \cap W_j) $$ is a finite affine stratification with partial ordering on $I \amalg I \times J$ given by $i' \leq (i, j) \Leftrightarrow i' \leq i$ and $(i', j') \leq (i, j) \Leftrightarrow i' \leq i$ and $j' \leq j$. Observe that $(U_i \cap Z) \times_X V = \emptyset$ and $(U_i \cap W_j) \times_X V = U_i \cap W_j$ are affine. Hence the morphisms $U_i \cap Z \to X$ and $U_i \cap W_j \to X$ are affine because we can check affineness of a morphism locally on the target (Morphisms, Lemma \ref{morphisms-lemma-characterize-affine}) and we have affineness over both $U$ and $V$. To finish the proof we take the stratification above and we add one additional stratum, namely $Z'$, whose index we add as a minimal element to the partially ordered set.
Say $X = U_0 \cup \ldots \cup U_n$ is an affine open covering. Set $$ X_i = (U_i \cup \ldots \cup U_n) \setminus (U_{i + 1} \cup \ldots \cup U_n) $$ Then $X_i$ is affine as a closed subscheme of $U_i$. The morphism $X_i \to X$ is affine by Morphisms, Lemma \ref{morphisms-lemma-affine-permanence}. Finally, we have $\overline{X_i} \subset X_i \cup X_{i - 1} \cup \ldots X_0$.
By induction on $d$. If $d = 0$, then $X$ is affine, see Properties, Lemma \ref{properties-lemma-locally-Noetherian-dimension-0}. Assume $d > 0$. Let $\eta_1, \ldots, \eta_n$ be the generic points of the irreducible components of $X$ (Properties, Lemma \ref{properties-lemma-Noetherian-irreducible-components}). We can cover $X$ by affine opens containing $\eta_1, \ldots, \eta_n$, see Properties, Lemma \ref{properties-lemma-point-and-maximal-points-affine}. Since $X$ is quasi-compact we can find a finite affine open covering $X = \bigcup_{j = 1, \ldots, m} U_j$ with $\eta_1, \ldots, \eta_n \in U_j$ for all $j = 1, \ldots, m$. Choose an affine open $U \subset U_1 \cap \ldots \cap U_m$ containing $\eta_1, \ldots, \eta_n$ (possible by the lemma already quoted). Then the morphism $U \to X$ is affine because $U \to U_j$ is affine for all $j$, see Morphisms, Lemma \ref{morphisms-lemma-characterize-affine}. Let $Z = X \setminus U$. By construction $\dim(Z) < \dim(X)$. By induction hypothesis we can find an affine stratification $Z = \bigcup_{i \in \{0, \ldots, n\}} Z_i$ of $Z$ with $n \leq \dim(Z)$. Setting $U = X_{n + 1}$ and $X_i = Z_i$ for $i \leq n$ we conclude.
For any $n$ the scheme $\mathbf{A}^n \times Y$ is unibranch by Lemma \ref{lemma-number-of-branches-and-smooth}. Hence the hypotheses of the lemma hold for the morphisms $\mathbf{A}^n \times X \to \mathbf{A}^n \times Y$ for all $n$. By Lemma \ref{lemma-test-universally-open} it suffices to prove $f$ is open. By Morphisms, Lemma \ref{morphisms-lemma-locally-finite-presentation-universally-open} it suffices to show that generalizations lift along $f$. Suppose that $y' \leadsto y$ is a specialization of points in $Y$ and $x \in X$ is a point mapping to $y$. As in Lemma \ref{lemma-etale-makes-quasi-finite-finite-at-point} choose a diagram $$ \xymatrix{ u \ar[d] & U \ar[d] \ar[r] & X \ar[d] \\ v & V \ar[r] & Y } $$ where $(V, v) \to (Y, y)$ is an elementary \'etale neighbourhood, $U \to V$ is finite, $u$ is the unique point of $U$ mapping to $v$, $U \subset V \times_Y X$ is open, and $v \mapsto y$ and $u \mapsto x$. Let $E$ be an irreducible component of $U$ passing through $u$ (there is at least one of these). Since $U \to X$ is \'etale, $E$ maps to an irreducible component of $X$, which in turn dominates an irreducible component of $Y$ (by assumption). Since $U \to V$ is finite hence closed, we conclude that the image $E' \subset V$ of $E$ is an irreducible closed subset passing through $v$ which dominates an irreducible component of $Y$. Since $V \to Y$ is \'etale $E'$ must be an irreducible component of $V$ passing through $v$. Since $Y$ is unibranch we see that $E'$ is the unique irreducible component of $V$ passing through $v$ (Lemma \ref{lemma-nr-branches}). Since $V$ is locally Noetherian we may after shrinking $V$ assume that $E' = V$ (equality of sets). \medskip\noindent Since $V \to Y$ is \'etale we can find a specialization $v' \leadsto v$ whose image is $y' \leadsto y$. By the above we can find $u' \in U$ mapping to $v'$. Then $u' \leadsto u$ because $u$ is the only point of $U$ mapping to $v$ and $U \to V$ is closed. Then finally the image $x' \in X$ of $u'$ is a point specializing to $x$ and mapping to $y'$ and the proof is complete.
By Limits, Lemma \ref{limits-lemma-descend-quasi-finite} after increasing $0$ we may assume $f_0$ is locally quasi-finite. Let $x \in X$. By \'etale localization of quasi-finite morphisms we can find a diagram $$ \xymatrix{ X \ar[d] & U \ar[l] \ar[d] \\ Y & V \ar[l] } $$ where $V \to Y$ is \'etale, $U \subset X_V$ is open, $U \to V$ is finite, and $x$ is in the image of $U \to X$, see Lemma \ref{lemma-etale-makes-quasi-finite-finite-at-point}. After shrinking $V$ we may assume $V$ and $U$ are affine. Since $X$ is quasi-compact, it follows, by taking a finite disjoint union of such $V$ and $U$, that we can make a diagram as above such that $U \to X$ is surjective. By Limits, Lemmas \ref{limits-lemma-descend-finite-presentation}, \ref{limits-lemma-descend-opens}, \ref{limits-lemma-descend-surjective}, \ref{limits-lemma-descend-finite-finite-presentation}, \ref{limits-lemma-descend-etale}, and \ref{limits-lemma-limit-affine} after possibly increasing $0$ we may assume we have a diagram $$ \xymatrix{ X_0 \ar[d] & U_0 \ar[l] \ar[d] \\ Y_0 & V_0 \ar[l] } $$ where $V_0$ is affine, $V_0 \to Y_0$ is \'etale, $U_0 \subset (X_0)_{V_0}$ is open, $U_0 \to V_0$ is finite, and $U_0 \to X_0$ is surjective. Since $V_i \to Y_i$ is \'etale and hence universally open, follows that it suffices to prove that $U_i \to V_i$ is universally open for large enough $i$. This reduces us to the case discussed in the next paragraph. \medskip\noindent Let $A = \colim A_i$ be a filtered colimit of rings. Let $A_0 \to B_0$ be a ring map. Set $B = A \otimes_{A_0} B_0$ and $B_i = A_i \otimes_{A_0} B_0$. Assume $A_0 \to B_0$ is finite, of finite presentation, and $A \to B$ is universally open. We have to show that $A_i \to B_i$ is universally open for $i$ large enough. Pick $b_{0, 1}, \ldots, b_{0, d} \in B_0$ which generate $B_0$ as an $A_0$-module. Set $h_0 = \sum_{j = 1, \ldots, d} x_jb_{0, j}$ in $B_0[x_1, \ldots, x_d]$. Denote $h$, resp.\ $h_i$ the image of $h_0$ in $B[x_1, \ldots, x_d]$, resp.\ $B_i[x_1, \ldots, x_d]$. The image $U$ of $D(h)$ in $\Spec(A[x_1, \ldots, x_d])$ is open as $A \to B$ is universally open. Of course $U$ is quasi-compact as the image of an affine scheme. For $i$ large enough there is a quasi-compact open $U_i \subset \Spec(A_i[x_1, \ldots, x_d])$ whose inverse image in $\Spec(A[x_1, \ldots, x_d])$ is $U$, see Limits, Lemma \ref{limits-lemma-descend-opens}. After increasing $i$ we may assume that $D(h_i)$ maps into $U_i$; this follows from the same lemma by considering the pullback of $U_i$ in $D(h_i)$. Finally, for $i$ even larger the morphism of schemes $D(h_i) \to U_i$ will be surjective by an application of the already used Limits, Lemma \ref{limits-lemma-descend-surjective}. We conclude $A_i \to B_i$ is universally open by Lemma \ref{lemma-characterize-universally-open-finite}.
Agreement of the functions is immediate from the fact that the (geometric) fibres of a locally quasi-finite morphism are discrete, see Morphisms, Lemma \ref{morphisms-lemma-locally-quasi-finite-fibres}. Boundedness follows from Morphisms, Lemmas \ref{morphisms-lemma-characterize-universally-bounded} and \ref{morphisms-lemma-locally-quasi-finite-qc-source-universally-bounded}.