hcju/stacksqa huggingface dataset:
Assume $f$ is quasi-finite at $x$. By assumption there exist opens $U \subset X$, $V \subset S$ such that $f(U) \subset V$, $x \in U$ and $x$ an isolated point of $U_s$. Hence $\{x\} \subset U_s$ is an open subset. Since $U_s = U \cap X_s \subset X_s$ is also open we conclude that $\{x\} \subset X_s$ is an open subset also. Thus we conclude that $x$ is an isolated point of $X_s$. \medskip\noindent Note that $X_s$ is a Jacobson scheme by Lemma \ref{lemma-ubiquity-Jacobson-schemes} (and Lemma \ref{lemma-base-change-finite-type}). If $x$ is isolated in $X_s$, i.e., $\{x\} \subset X_s$ is open, then $\{x\}$ contains a closed point (by the Jacobson property), hence $x$ is closed in $X_s$. It is clear that there is no point $x' \in X_s$, distinct from $x$, specializing to $x$. \medskip\noindent Assume that $x$ is closed in $X_s$ and that there is no point $x' \in X_s$, distinct from $x$, specializing to $x$. Consider a pair of affine opens $\Spec(A) = U \subset X$, $\Spec(R) = V \subset S$ with $f(U) \subset V$ and $x \in U$. Let $\mathfrak q \subset A$ correspond to $x$ and $\mathfrak p \subset R$ correspond to $s$. By Lemma \ref{lemma-locally-finite-type-characterize} the ring map $R \to A$ is of finite type. Consider the fibre ring $\overline{A} = A \otimes_R \kappa(\mathfrak p)$. Let $\overline{\mathfrak q}$ be the prime of $\overline{A}$ corresponding to $\mathfrak q$. Since $\Spec(\overline{A})$ is an open subscheme of the fibre $X_s$ we see that $\overline{q}$ is a maximal ideal of $\overline{A}$ and that there is no point of $\Spec(\overline{A})$ specializing to $\overline{\mathfrak q}$. This implies that $\dim(\overline{A}_{\overline{q}}) = 0$. Hence by Algebra, Definition \ref{algebra-definition-quasi-finite} we see that $R \to A$ is quasi-finite at $\mathfrak q$, i.e., $X \to S$ is quasi-finite at $x$ by definition. \medskip\noindent At this point we have shown conditions (1) -- (3) are all equivalent. It is clear that (4) implies (1). And it is also clear that (2) implies (4) since if $x$ is an isolated point of $X_s$ then it is also an isolated point of $U_s$ for any open $U$ which contains it.
Suppose $T$ is a scheme which (a) is locally of finite type over a field $k$, and (b) has finitely many points. Then Lemma \ref{lemma-ubiquity-Jacobson-schemes} shows $T$ is a Jacobson scheme. A finite Jacobson space is discrete, see Topology, Lemma \ref{topology-lemma-finite-jacobson}. Apply this remark to the fibre $X_s$ which is locally of finite type over $\Spec(\kappa(s))$ to see the first statement. Finally, apply Lemma \ref{lemma-quasi-finite-at-point-characterize} to see the second.
It is immediate that (3) implies (2). Lemma \ref{lemma-quasi-finite-at-point-characterize} shows that (2) is equivalent to (1). Assume (2) and let $\Spec(k) \to S$ be as in (3). Denote $s \in S$ the image  of $\Spec(k) \to S$. Then $X_k$ is the base change of $X_s$ via $\Spec(k) \to \Spec(\kappa(s))$. Hence every point of $X_k$ is closed by Lemma \ref{lemma-base-change-closed-point-fibre-locally-finite-type}. As $X_k \to \Spec(k)$ is locally of finite type (by Lemma \ref{lemma-base-change-finite-type}), we may apply Lemma \ref{lemma-quasi-finite-at-point-characterize} to conclude that every point of $X_k$ is isolated, i.e., $X_k$ has a discrete underlying topological space.
Assume $f$ is quasi-finite. It is quasi-compact by Definition \ref{definition-finite-type}. Let $x \in X$. We see that $f$ is quasi-finite at $x$ by Lemma \ref{lemma-quasi-finite-at-point-characterize}. Hence $f$ is quasi-compact and locally quasi-finite. \medskip\noindent Assume $f$ is quasi-compact and locally quasi-finite. Then $f$ is of finite type. Let $x \in X$ be a point. By Lemma \ref{lemma-quasi-finite-at-point-characterize} we see that $x$ is an isolated point of its fibre. The lemma is proved.
Assume $f$ is quasi-finite. In particular $f$ is locally of finite type and quasi-compact (since it is of finite type). Let $s \in S$. Since every $x \in X_s$ is isolated in $X_s$ we see that $X_s = \bigcup_{x \in X_s} \{x\}$ is an open covering. As $f$ is quasi-compact, the fibre $X_s$ is quasi-compact. Hence we see that $X_s$ is finite. \medskip\noindent Conversely, assume $f$ is locally of finite type, quasi-compact and has finite fibres. Then it is locally quasi-finite by Lemma \ref{lemma-finite-fibre}. Hence it is quasi-finite by Lemma \ref{lemma-quasi-finite-locally-quasi-compact}.
For a ring map $R \to A$ let us define $P(R \to A)$ to mean ``$R \to A$ is quasi-finite'' (see remark above lemma). We claim that $P$ is a local property of ring maps. We check conditions (a), (b) and (c) of Definition \ref{definition-property-local}. In the proof of Lemma \ref{lemma-locally-finite-type-characterize} we have seen that (a), (b) and (c) hold for the property of being ``of finite type''. Note that, for a finite type ring map $R \to A$, the property $R \to A$ is quasi-finite at $\mathfrak q$ depends only on the local ring $A_{\mathfrak q}$ as an algebra over $R_{\mathfrak p}$ where $\mathfrak p = R \cap \mathfrak q$ (usual abuse of notation). Using these remarks (a), (b) and (c) of Definition \ref{definition-property-local} follow immediately. For example, suppose $R \to A$ is a ring map such that all of the ring maps $R \to A_{a_i}$ are quasi-finite for $a_1, \ldots, a_n \in A$ generating the unit ideal. We conclude that $R \to A$ is of finite type. Also, for any prime $\mathfrak q \subset A$ the local ring $A_{\mathfrak q}$ is isomorphic as an $R$-algebra to the local ring $(A_{a_i})_{\mathfrak q_i}$ for some $i$ and some $\mathfrak q_i \subset A_{a_i}$. Hence we conclude that $R \to A$ is quasi-finite at $\mathfrak q$. \medskip\noindent We conclude that Lemma \ref{lemma-locally-P} applies with $P$ as in the previous paragraph. Hence it suffices to prove that $f$ is locally quasi-finite is equivalent to $f$ is locally of type $P$. Since $P(R \to A)$ is ``$R \to A$ is quasi-finite'' which means $R \to A$ is quasi-finite at every prime of $A$, this follows from Lemma \ref{lemma-quasi-finite-at-point-characterize}.
In the proof of Lemma \ref{lemma-locally-quasi-finite-characterize} we saw that $P = $``quasi-finite'' is a local property of ring maps, and that a morphism of schemes is locally quasi-finite if and only if it is locally of type $P$ as in Definition \ref{definition-locally-P}. Hence the first statement of the lemma follows from Lemma \ref{lemma-composition-type-P} combined with the fact that being quasi-finite is a property of ring maps that is stable under composition, see Algebra, Lemma \ref{algebra-lemma-quasi-finite-composition}. By the above, Lemma \ref{lemma-quasi-finite-locally-quasi-compact} and the fact that compositions of quasi-compact morphisms are quasi-compact, see Schemes, Lemma \ref{schemes-lemma-composition-quasi-compact} we see that the composition of quasi-finite morphisms is quasi-finite.
The first and second assertion follow from the corresponding algebra result, see Algebra, Lemma \ref{algebra-lemma-quasi-finite-base-change} (combined with the fact that $f'$ is also locally of finite type by Lemma \ref{lemma-base-change-finite-type}). By the above, Lemma \ref{lemma-quasi-finite-locally-quasi-compact} and the fact that a base change of a quasi-compact morphism is quasi-compact, see Schemes, Lemma \ref{schemes-lemma-quasi-compact-preserved-base-change} we see that the base change of a quasi-finite morphism is quasi-finite.
The fibre $X_s$ is a scheme of finite type over a field, hence Noetherian (Lemma \ref{lemma-finite-type-noetherian}). Hence the topology on $X_s$ is Noetherian (Properties, Lemma \ref{properties-lemma-Noetherian-topology}) and can have at most a finite number of isolated points (by elementary topology). Thus our lemma follows from Lemma \ref{lemma-quasi-finite-at-point-characterize}.
Via Lemma \ref{lemma-locally-quasi-finite-characterize} this translates into the following algebra fact: Given ring maps $A \to B \to C$ such that $A \to C$ is quasi-finite, then $B \to C$ is quasi-finite. This follows from Algebra, Lemma \ref{algebra-lemma-four-rings} with $R = A$, $S = S' = C$ and $R' = B$.
This follows from Lemma \ref{lemma-locally-P} if we show that the property ``$R \to A$ is of finite presentation'' is local. We check conditions (a), (b) and (c) of Definition \ref{definition-property-local}. By Algebra, Lemma \ref{algebra-lemma-base-change-finiteness} being of finite presentation is stable under base change and hence we conclude (a) holds. By the same lemma being of finite presentation is stable under composition and trivially for any ring $R$ the ring map $R \to R_f$ is of finite presentation. We conclude (b) holds. Finally, property (c) is true according to Algebra, Lemma \ref{algebra-lemma-cover-upstairs}.
In the proof of Lemma \ref{lemma-locally-finite-presentation-characterize} we saw that being of finite presentation is a local property of ring maps. Hence the first statement of the lemma follows from Lemma \ref{lemma-composition-type-P} combined with the fact that being of finite presentation is a property of ring maps that is stable under composition, see Algebra, Lemma \ref{algebra-lemma-compose-finite-type}. By the above and the fact that compositions of quasi-compact, quasi-separated morphisms are quasi-compact and quasi-separated, see Schemes, Lemmas \ref{schemes-lemma-composition-quasi-compact} and \ref{schemes-lemma-separated-permanence} we see that the composition of morphisms of finite presentation is of finite presentation.
In the proof of Lemma \ref{lemma-locally-finite-presentation-characterize} we saw that being of finite presentation is a local property of ring maps. Hence the first statement of the lemma follows from Lemma \ref{lemma-composition-type-P} combined with the fact that being of finite presentation is a property of ring maps that is stable under base change, see Algebra, Lemma \ref{algebra-lemma-base-change-finiteness}. By the above and the fact that a base change of a quasi-compact, quasi-separated morphism is quasi-compact and quasi-separated, see Schemes, Lemmas \ref{schemes-lemma-quasi-compact-preserved-base-change} and \ref{schemes-lemma-separated-permanence} we see that the base change of a morphism of finite presentation is a morphism of finite presentation.
On any affine open $\Spec(R) \subset X$ we have $i^{-1}(\Spec(R)) = \Spec(R/I)$ and $\mathcal{I} = \widetilde{I}$. Moreover, $\mathcal{I}$ is of finite type if and only if $I$ is a finite $R$-module for every such affine open (see Properties, Lemma \ref{properties-lemma-finite-type-module}). And $R/I$ is of finite presentation over $R$ if and only if $I$ is a finite $R$-module. Hence we win.
The first statement follows from the fact that a ring of finite type over a Noetherian ring is of finite presentation, see Algebra, Lemma \ref{algebra-lemma-Noetherian-finite-type-is-finite-presentation}. Suppose that $f$ is of finite type and $S$ is locally Noetherian. Then $f$ is quasi-compact and locally of finite presentation by (1). Hence it suffices to prove that $f$ is quasi-separated. This follows from Lemma \ref{lemma-finite-type-Noetherian-quasi-separated} (and Lemma \ref{lemma-finite-presentation-finite-type}).
Proof of (1). Via Lemma \ref{lemma-locally-finite-presentation-characterize} this translates into the following algebra fact: Given ring maps $A \to B \to C$ such that $A \to C$ is of finite presentation and $A \to B$ is of finite type, then $B \to C$ is of finite presentation. See Algebra, Lemma \ref{algebra-lemma-compose-finite-type}. \medskip\noindent Part (2) follows from (1) and Schemes, Lemmas \ref{schemes-lemma-compose-after-separated} and \ref{schemes-lemma-quasi-compact-permanence}.
Note that $\Delta$ is a morphism of schemes over $X$ (via the second projection $X \times_Y X \to X$). Assume $f$ is locally of finite type. Note that $X$ is of finite presentation over $X$ and $X \times_Y X$ is locally of finite type over $X$ (by Lemma \ref{lemma-base-change-finite-type}). Thus the first statement holds by Lemma \ref{lemma-finite-presentation-permanence}. The second statement follows from the first, the definitions, and the fact that a diagonal morphism is a monomorphism, hence separated (Schemes, Lemma \ref{schemes-lemma-monomorphism-separated}).
To show that the inverse image of every constructible subset is constructible it suffices to show that the inverse image of every retrocompact open $V$ of $Y$ is retrocompact in $X$, see Topology, Lemma \ref{topology-lemma-inverse-images-constructibles}. The significance of $V$ being retrocompact in $Y$ is just that the open immersion $V \to Y$ is quasi-compact. Hence the base change $f^{-1}(V) = X \times_Y V \to X$ is quasi-compact too, see Schemes, Lemma \ref{schemes-lemma-quasi-compact-preserved-base-change}. Hence we see $f^{-1}(V)$ is retrocompact in $X$. Suppose $E$ is locally constructible in $Y$. Choose $x \in X$. Choose an affine neighbourhood $V$ of $f(x)$ and an affine neighbourhood $U \subset X$ of $x$ such that $f(U) \subset V$. Thus we think of $f|_U : U \to V$ as a morphism into $V$. By Properties, Lemma \ref{properties-lemma-locally-constructible} we see that $E \cap V$ is constructible in $V$. By the constructible case we see that $(f|_U)^{-1}(E \cap V)$ is constructible in $U$. Since $(f|_U)^{-1}(E \cap V) = f^{-1}(E) \cap U$ we win.
By Properties, Lemma \ref{properties-lemma-constructible-quasi-compact-quasi-separated} it suffices to prove this lemma in case $Y$ is affine. In this case $X$ is quasi-compact. Hence we can write $X = U_1 \cup \ldots \cup U_n$ with each $U_i$ affine open in $X$. If $E \subset X$ is constructible, then each $E \cap U_i$ is constructible too, see Topology, Lemma \ref{topology-lemma-open-immersion-constructible-inverse-image}. Hence, since $f(E) = \bigcup f(E \cap U_i)$ and since finite unions of constructible sets are constructible, this reduces us to the case where $X$ is affine. In this case the result is Algebra, Theorem \ref{algebra-theorem-chevalley}.
Assume $\{x' \mid x' \leadsto x\} \subset E$. We may assume $X$ is affine. In this case $E$ is constructible, see Properties, Lemma \ref{properties-lemma-locally-constructible}. In particular, also the complement $E^c$ is constructible. By Algebra, Lemma \ref{algebra-lemma-constructible-is-image} we can find a morphism of affine schemes $f : Y \to X$ such that $E^c = f(Y)$. Let $Z \subset X$ be the scheme theoretic image of $f$. By Lemma \ref{lemma-reach-points-scheme-theoretic-image} and the assumption $\{x' \mid x' \leadsto x\} \subset E$ we see that $x \not \in Z$. Hence $X \setminus Z \subset E$ is an open neighbourhood of $x$ contained in $E$.
Assume $\varphi$ is open. Let $y' \leadsto y$ be a specialization of points of $Y$. Let $x \in X$ with $\varphi(x) = y$. Choose affine opens $U \subset X$ and $V \subset Y$ such that $\varphi(U) \subset V$ and $x \in U$. Then also $y' \in V$. Hence we may replace $X$ by $U$ and $Y$ by $V$ and assume $X$, $Y$ affine. The affine case is Algebra, Lemma \ref{algebra-lemma-open-going-down} (combined with Algebra, Lemma \ref{algebra-lemma-going-up-down-specialization}).
Let $V \subset Y$ be a quasi-compact open. As $g$ is open and surjective we can find a quasi-compact open $W' \subset W$ such that $g(W') = V$. By assumption $(f')^{-1}(W')$ is quasi-compact. The image of $(f')^{-1}(W')$ in $X$ is equal to $f^{-1}(V)$, see Lemma \ref{lemma-when-point-maps-to-pair}. Hence $f^{-1}(V)$ is quasi-compact as the image of a quasi-compact space, see Topology, Lemma \ref{topology-lemma-image-quasi-compact}. Thus $f$ is quasi-compact.
Let $R \to A$ be a ring map. Let $M$ be an $A$-module. If $M$ is $R$-flat, then for all primes $\mathfrak q$ the module $M_{\mathfrak q}$ is flat over $R_{\mathfrak p}$ with $\mathfrak p$ the prime of $R$ lying under $\mathfrak q$. Conversely, if $M_{\mathfrak q}$ is flat over $R_{\mathfrak p}$ for all primes $\mathfrak q$ of $A$, then $M$ is flat over $R$. See Algebra, Lemma \ref{algebra-lemma-flat-localization}. This equivalence easily implies the statements of the lemma.
By Lemma \ref{lemma-flat-module-characterize} and the fact that $f$ is an affine morphism, this reduces us to the affine case. Say $X \to Y \to S$ corresponds to the ring maps $C \leftarrow B \leftarrow A$. Let $N$ be the $C$-module corresponding to $\mathcal{F}$. Recall that $f_*\mathcal{F}$ corresponds to $N$ viewed as a $B$-module, see Schemes, Lemma \ref{schemes-lemma-widetilde-pullback}. Thus the result is clear.
This follows from Lemmas \ref{lemma-generalizations-lift-flat} and Lemma \ref{lemma-locally-finite-presentation-universally-open} above. We can also argue directly as follows. \medskip\noindent Let $f : X \to S$ be flat locally of finite presentation. To show $f$ is open it suffices to show that we may cover $X$ by open affines $X = \bigcup U_i$ such that $U_i \to S$ is open. By definition we may cover $X$ by affine opens $U_i \subset X$ such that each $U_i$ maps into an affine open $V_i \subset S$ and such that the induced ring map $\mathcal{O}_S(V_i) \to \mathcal{O}_X(U_i)$ is of finite presentation. Thus $U_i \to V_i$ is open by Algebra, Proposition \ref{algebra-proposition-fppf-open}. The lemma follows.
By Lemmas \ref{lemma-base-change-module-flat}, \ref{lemma-base-change-finite-presentation}, and \ref{lemma-support-finite-type} the assumptions are preserved under base change. By Lemma \ref{lemma-locally-finite-presentation-universally-open} it suffices to show that generalizations lift along $f$. This follows from Algebra, Lemma \ref{algebra-lemma-going-down-flat-module}.
The question is local on $Y$, hence we may assume that $Y$ is affine. In this case $X$ is quasi-compact as $f$ is quasi-compact. Write $X = X_1 \cup \ldots \cup X_n$ as a finite union of affine opens. Then $f' : X' = X_1 \amalg \ldots \amalg X_n \to Y$ is a surjective flat morphism of affine schemes. Note that for $T \subset Y$ we have $(f')^{-1}(T) = f^{-1}(T) \cap X_1 \amalg \ldots \amalg f^{-1}(T) \cap X_n$. Hence, $f^{-1}(T)$ is open if and only if $(f')^{-1}(T)$ is open. Thus we may assume both $X$ and $Y$ are affine. \medskip\noindent Let $f : \Spec(B) \to \Spec(A)$ be a surjective morphism of affine schemes corresponding to a flat ring map $A \to B$. Suppose that $f^{-1}(T)$ is closed, say $f^{-1}(T) = V(J)$ for $J \subset B$ an ideal. Then $T = f(f^{-1}(T)) = f(V(J))$ is the image of $\Spec(B/J) \to \Spec(A)$ (here we use that $f$ is surjective). On the other hand, generalizations lift along $f$ (Lemma \ref{lemma-generalizations-lift-flat}). Hence by Topology, Lemma \ref{topology-lemma-lift-specializations-images} we see that $Y \setminus T = f(X \setminus f^{-1}(T))$ is stable under generalization. Hence $T$ is stable under specialization (Topology, Lemma \ref{topology-lemma-open-closed-specialization}). Thus $T$ is closed by Algebra, Lemma \ref{algebra-lemma-image-stable-specialization-closed}.
You can prove this by applying Algebra, Lemma \ref{algebra-lemma-flatness-descends-more-general}. Here is a direct proof. Let $s \in S$ be the image of $y$. Consider the local ring maps $\mathcal{O}_{S, s} \to \mathcal{O}_{Y, y} \to \mathcal{O}_{X, x}$. By assumption the ring map $\mathcal{O}_{Y, y} \to \mathcal{O}_{X, x}$ is faithfully flat, see Algebra, Lemma \ref{algebra-lemma-local-flat-ff}. Let $N = \mathcal{G}_y$. Note that $h^*\mathcal{G}_x = N \otimes_{\mathcal{O}_{Y, y}} \mathcal{O}_{X, x}$, see Sheaves, Lemma \ref{sheaves-lemma-stalk-pullback-modules}. Let $M' \to M$ be an injection of $\mathcal{O}_{S, s}$-modules. By the faithful flatness mentioned above we have \begin{align*} \Ker( M' \otimes_{\mathcal{O}_{S, s}} N \to M \otimes_{\mathcal{O}_{S, s}} N) \otimes_{\mathcal{O}_{Y, y}} \mathcal{O}_{X, x} \\ = \Ker( M' \otimes_{\mathcal{O}_{S, s}} N \otimes_{\mathcal{O}_{Y, y}} \mathcal{O}_{X, x} \to M \otimes_{\mathcal{O}_{S, s}} N \otimes_{\mathcal{O}_{Y, y}} \mathcal{O}_{X, x}) \end{align*} Hence the equivalence of the lemma follows from the second characterization of flatness in Algebra, Lemma \ref{algebra-lemma-flat}.
We will use the characterization of Lemma \ref{lemma-characterize-scheme-theoretically-dense}. We have to show that for any open $U \subset X$ the map $\mathcal{O}_X(U) \to \mathcal{O}_X(U \cap f^{-1}V)$ is injective. It suffices to prove this when $U$ is an affine open which maps into an affine open $W \subset Y$. Say $W = \Spec(A)$ and $U = \Spec(B)$. Then $V \cap W = D(f_1) \cup \ldots \cup D(f_n)$ for some $f_i \in A$, see Algebra, Lemma \ref{algebra-lemma-qc-open}. Thus we have to show that $B \to B_{f_1} \times \ldots \times B_{f_n}$ is injective. We are given that $A \to A_{f_1} \times \ldots \times A_{f_n}$ is injective and that $A \to B$ is flat. Since $B_{f_i} = A_{f_i} \otimes_A B$ we win.
Recall that $Z$ is cut out by $\mathcal{I} = \Ker(\mathcal{O}_Y \to g_*\mathcal{O}_V)$ and $Z'$ is cut out by $\mathcal{I}' = \Ker(\mathcal{O}_X \to (V \times_Y X \to X)_*\mathcal{O}_{V \times_Y X})$, see Lemma \ref{lemma-quasi-compact-scheme-theoretic-image}. Hence the question is local on $X$ and $Y$ and we may assume $X$ and $Y$ affine. Note that we may replace $V$ by $\coprod V_i$ where $V = V_1 \cup \ldots \cup V_n$ is a finite affine open covering. Hence we may assume $g$ is affine. In this case $(V \times_Y X \to X)_*\mathcal{O}_{V \times_Y X}$ is the pullback of $g_*\mathcal{O}_V$ by $f$. Since $f$ is flat we conclude that $f^*\mathcal{I} = \mathcal{I}'$ and the lemma holds.
The affine case of the bijection is Algebra, Lemma \ref{algebra-lemma-pure-open-closed-specializations}. For general schemes $X$ the bijection follows by covering $X$ by affines and glueing. Details omitted. For the final assertion, observe that the projection $Z \times_{X, g} Y \to Y$ is a flat (Lemma \ref{lemma-base-change-flat}) closed immersion which is bijective on underlying topological spaces and hence must be an isomorphism by the bijection esthablished in the first part of the proof.
Note that $\text{trdeg}_{\kappa(s)}(\kappa(x)) = \text{trdeg}_{\kappa(y)}(\kappa(x)) + \text{trdeg}_{\kappa(s)}(\kappa(y))$. Thus by Lemma \ref{lemma-dimension-fibre-at-a-point} the statement is equivalent to $$ \dim(\mathcal{O}_{X_s, x}) \leq \dim(\mathcal{O}_{X_y, x}) + \dim(\mathcal{O}_{Y_s, y}). $$ For this see Algebra, Lemma \ref{algebra-lemma-dimension-base-fibre-total}. For the flat case see Algebra, Lemma \ref{algebra-lemma-dimension-base-fibre-equals-total}.
By Lemma \ref{lemma-openness-bounded-dimension-fibres} the set $U_n \subset X$ of points where the dimension of the fibre is $\leq n$ is open. Since $f$ is of finite type, every point is contained in some $U_n$ (because the dimension of a finite type algebra over a field is finite). Since $Y$ is quasi-compact and $f$ is of finite type, we see that $X$ is quasi-compact. Hence $X = U_n$ for some $n$.
The topological space $X$ has a basis for its topology consisting of affine opens $U \subset X$ such that the induced morphism $f|_U : U \to S$ factors through an affine open $V \subset S$. Hence it is enough to show that $U \cap U_n$ is quasi-compact for such a $U$. Note that $U_n \cap U$ is the same as the open $\{x \in U \mid \dim_x U_{f(x)} \leq n\}$. This reduces us to the case where $X$ and $S$ are affine. In this case the lemma follows from Algebra, Lemma \ref{algebra-lemma-dimension-fibres-bounded-quasi-compact-open-upstairs} (and Lemma \ref{lemma-locally-finite-presentation-characterize}).
Part (1) follows from the fact that any open of $X_s$ containing $x'$ also contains $x$. Part (2) follows since $\mathcal{O}_{X_s, x}$ is a localization of $\mathcal{O}_{X_s, x'}$ at a prime ideal, hence any chain of prime ideals in $\mathcal{O}_{X_s, x}$ is part of a strictly longer chain of primes in $\mathcal{O}_{X_s, x'}$. The last inequality follows from Algebra, Lemma \ref{algebra-lemma-tr-deg-specialization}.