hcju/stacksqa huggingface dataset:
Part (1) is the special case of part (2) where $U = X$. Choose a surjective \'etale morphism $U' \to U$ where $U'$ is a scheme. It is clear that we may replace $U$ by $U'$ and hence we may assume $U$ is a scheme. Since $X$ is quasi-compact, there exist finitely many affine opens $U_i \subset U$ such that $U' = \coprod U_i \to X$ is surjective. After replacing $U$ by $U'$ again, we see that we may assume $U$ is affine. Since $X$ is quasi-separated, hence reasonable, there exists an integer $d$ bounding the degree of the geometric fibres of $U \to X$ (see Lemma \ref{lemma-bounded-fibres}). We will prove the lemma by induction on $d$ for all quasi-compact and separated schemes $U$ mapping surjective and \'etale onto $X$. If $d = 1$, then $U = X$ and the result holds with $Y = U$. Assume $d > 1$. \medskip\noindent We apply Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-quasi-finite-separated-quasi-affine} and we obtain a factorization $$ \xymatrix{ U \ar[rr]_j \ar[rd] & & Y \ar[ld]^\pi \\ & X } $$ with $\pi$ integral and $j$ a quasi-compact open immersion. We may and do assume that $j(U)$ is scheme theoretically dense in $Y$. Note that $$ U \times_X Y = U \amalg W $$ where the first summand is the image of $U \to U \times_X Y$ (which is closed by Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-semi-diagonal} and open because it is \'etale as a morphism between algebraic spaces \'etale over $Y$) and the second summand is the (open and closed) complement. The image $V \subset Y$ of $W$ is an open subspace containing $Y \setminus U$. \medskip\noindent The \'etale morphism $W \to Y$ has geometric fibres of cardinality $< d$. Namely, this is clear for geometric points of $U \subset Y$ by inspection. Since $|U| \subset |Y|$ is dense, it holds for all geometric points of $Y$ by Lemma \ref{lemma-quasi-compact-reasonable-stratification} (the degree of the fibres of a quasi-compact \'etale morphism does not go up under specialization). Thus we may apply the induction hypothesis to $W \to V$ and find a surjective integral morphism $Z \to V$ with $Z$ a scheme, which Zariski locally factors through $W$. Choose a factorization $Z \to Z' \to Y$ with $Z' \to Y$ integral and $Z \to Z'$ open immersion (Lemma \ref{lemma-extend-integral-morphism}). After replacing $Z'$ by the scheme theoretic closure of $Z$ in $Z'$ we may assume that $Z$ is scheme theoretically dense in $Z'$. After doing this we have $Z' \times_Y V = Z$. Finally, let $T \subset Y$ be the induced closed subspace structure on $Y \setminus V$. Consider the morphism $$ Z' \amalg T \longrightarrow X $$ This is a surjective integral morphism by construction. Since $T \subset U$ it is clear that the morphism $T \to X$ factors through $U$. On the other hand, let $z \in Z'$ be a point. If $z \not \in Z$, then $z$ maps to a point of $Y \setminus V \subset U$ and we find a neighbourhood of $z$ on which the morphism factors through $U$. If $z \in Z$, then we have an open neighbourhood of $z$ in $Z$ (which is also an open neighbourhood of $z$ in $Z'$) which factors through $W \subset U \times_X Y$ and hence through $U$.
If $y \in Y$ is in the schematic locus, then it has an affine open neighbourhood $V \subset Y$ and the inverse image $U$ of $V$ in $X$ is an open finite over $V$, hence affine. Thus (1) implies (2). \medskip\noindent Conversely, assume that $U \subset X$ as in (2) is given. Set $R = X \times_Y X$ and denote the projections $s, t : R \to X$. Consider $Z = R \setminus s^{-1}(U) \cap t^{-1}(U)$. This is a closed subset of $R$. The image $t(Z)$ is a closed subset of $X$ which can loosely be described as the set of points of $X$ which are $R$-equivalent to a point of $X \setminus U$. Hence $U' = X \setminus t(Z)$ is an $R$-invariant, open subspace of $X$ contained in $U$ which contains the fibre of $X \to Y$ over $y$. Since $X \to Y$ is open (Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-fppf-open}) the image of $U'$ is an open subspace $V' \subset Y$. Since $U'$ is $R$-invariant and $R = X \times_Y X$, we see that $U'$ is the inverse image of $V'$ (use Properties of Spaces, Lemma \ref{spaces-properties-lemma-points-cartesian}). After replacing $Y$ by $V'$ and $X$ by $U'$ we see that we may assume $X$ is a scheme isomorphic to an open subscheme of an affine scheme. \medskip\noindent Assume $X$ is a scheme isomorphic to an open subscheme of an affine scheme. In this case the fppf quotient sheaf $X/R$ is a scheme, see Properties of Spaces, Proposition \ref{spaces-properties-proposition-finite-flat-equivalence-global}. Since $Y$ is a sheaf in the fppf topology, obtain a canonical map $X/R \to Y$ factoring $X \to Y$. Since $X \to Y$ is surjective finite locally free, it is surjective as a map of sheaves (Spaces, Lemma \ref{spaces-lemma-surjective-flat-locally-finite-presentation}). We conclude that $X/R \to Y$ is surjective as a map of sheaves. On the other hand, since $R = X \times_Y X$ as sheaves we conclude that $X/R \to Y$ is injective as a map of sheaves. Hence $X/R \to Y$ is an isomorphism and we see that $Y$ is representable.
[First proof] The morphism $U \to X$ is finite locally free. Hence there is a decomposition of $X$ into open and closed subspaces $X_d \subset X$ such that $U \times_X X_d \to X_d$ is finite locally free of degree $d$. Thus we may assume $U \to X$ is finite locally free of degree $d$. In this case, let $U_i \subset U$, $i \in I$ be the set of affine opens. For each $i$ the morphism $U_i \to X$ is \'etale and has universally bounded fibres (namely, bounded by $d$). In other words, $X$ is reasonable and the result follows from Proposition \ref{proposition-reasonable-open-dense-scheme}.
The category is nonempty by Lemma \ref{lemma-decent-space-elementary-etale-neighbourhood}. Suppose that we have two elementary \'etale neighbourhoods $(U_i, u_i) \to (X, x)$. Then consider $U = U_1 \times_X U_2$. Since $\Spec(\kappa(u_i)) \to X$, $i = 1, 2$ are both monomorphisms in the class of $x$ (Lemma \ref{lemma-identifies-residue-fields}) , we see that $$ u = \Spec(\kappa(u_1)) \times_X \Spec(\kappa(u_2)) $$ is the spectrum of a field $\kappa(u)$ such that the induced maps $\kappa(u_i) \to \kappa(u)$ are isomorphisms. Then $u \to U$ is a point of $U$ and we see that $(U, u) \to (X, x)$ is an elementary \'etale neighbourhood dominating $(U_i, u_i)$. If $a, b : (U_1, u_1) \to (U_2, u_2)$ are two morphisms between our elementary \'etale neighbourhoods, then we consider the scheme $$ U = U_1 \times_{(a, b), (U_2 \times_X U_2), \Delta} U_2 $$ Using Properties of Spaces, Lemma \ref{spaces-properties-lemma-etale-permanence} we see that $U \to X$ is \'etale. Moreover, in exactly the same manner as before we see that $U$ has a point $u$ such that $(U, u) \to (X, x)$ is an elementary \'etale neighbourhood. Finally, $U \to U_1$ equalizes $a$ and $b$ and the proof is finished.
Since the category of elementary \'etale neighbourhood of $(X, x)$ is cofiltered (Lemma \ref{lemma-elementary-etale-neighbourhoods}) we see that the category of elementary \'etale neighbourhoods of $(U, u)$ is initial in the category of elementary \'etale neighbourhood of $(X, x)$. Then the equality follows from More on Morphisms, Lemma \ref{more-morphisms-lemma-describe-henselization} and Categories, Lemma \ref{categories-lemma-cofinal} (initial is turned into cofinal because the colimit definining henselian local rings is over the opposite of the category of elementary \'etale neighbourhoods).
Follows from Lemma \ref{lemma-describe-henselian-local-ring}, Properties of Spaces, Lemma \ref{spaces-properties-lemma-describe-etale-local-ring} and the fact that $(R^h)^{sh} = R^{sh}$ for a local ring $(R, \mathfrak m, \kappa)$ and a given separable algebraic closure $\kappa^{sep}$ of $\kappa$. This equality follows from Algebra, Lemma \ref{algebra-lemma-uniqueness-henselian}.
Choose an elementary \'etale neighbourhood $(U, u) \to (X, x)$. Then $\kappa(u) = \kappa(x)$ and $\mathcal{O}_{X, x}^h = \mathcal{O}_{U, u}^h$ (Lemma \ref{lemma-describe-henselian-local-ring}). The residue field of $\mathcal{O}_{U, u}^h$ is $\kappa(u)$ by Algebra, Lemma \ref{algebra-lemma-henselization} (the output of this lemma is the construction/definition of the henselization of a local ring, see Algebra, Definition \ref{algebra-definition-henselization}).
Let $x_1, x_2 \in |X|$ with $x_1 \leadsto x_2$ and $x_2 \leadsto x_1$. We have to show that $x_1 = x_2$. Pick a scheme $U$ and an \'etale morphism $U \to X$ such that $x_1, x_2$ are both in the image of $|U| \to |X|$. By Lemma \ref{lemma-decent-specialization} we can find a specialization $u_1 \leadsto u_2$ in $U$ mapping to $x_1 \leadsto x_2$. By Lemma \ref{lemma-decent-specialization} we can find $u_2' \leadsto u_1$ mapping to $x_2 \leadsto x_1$. This means that $u_2' \leadsto u_2$ is a specialization between points of $U$ mapping to the same point of $X$, namely $x_2$. This is not possible, unless $u_2' = u_2$, see Lemma \ref{lemma-decent-no-specializations-map-to-same-point}. Hence also $u_1 = u_2$ as desired.
Proof of (1). Choose a scheme $U$ with a point $u \in U$ and an \'etale morphism $h : U \to X$ mapping $u$ to $x$. By definition the dimension of $X$ at $x$ is $\dim_u(|U|)$. Thus we may pick $U$ such that $\dim_x(X) = \dim(|U|)$. Let $d$ be an integer. If $\dim(U) \geq d$, then there exists a sequence of nontrivial specializations $u_d \leadsto \ldots \leadsto u_0$ in $U$. Taking the image we find a corresponding sequence $h(u_d) \leadsto \ldots \leadsto h(u_0)$ each of which is nontrivial by Lemma \ref{lemma-decent-no-specializations-map-to-same-point}. Hence we see that the image of $|U|$ in $|X|$ has dimension at least $d$. Conversely, suppose that $x_d \leadsto \ldots \leadsto x_0$ is a sequence of specializations in $|X|$ with $x_0$ in the image of $|U| \to |X|$. Then we can lift this to a sequence of specializations in $U$ by Lemma \ref{lemma-decent-specialization}. \medskip\noindent Part (2) is an immediate consequence of part (1), Topology, Lemma \ref{topology-lemma-dimension-supremum-local-dimensions}, and Properties of Spaces, Section \ref{spaces-properties-section-dimension}.
The definition of the dimension of the local ring of a point on an algebraic space is given in Properties of Spaces, Definition \ref{spaces-properties-definition-dimension-local-ring}. Choose an \'etale morphism $(V, v) \to (Y, y)$ where $V$ is a scheme. Choose an \'etale morphism $U \to V \times_Y X$ and a point $u \in U$ mapping to $x \in |X|$ and $v \in V$. Then $U \to V$ is locally quasi-finite and we have to prove that $$ \dim(\mathcal{O}_{V, v}) \geq \dim(\mathcal{O}_{U, u}) $$ This is Algebra, Lemma \ref{algebra-lemma-dimension-inequality-quasi-finite}.
The assumption implies that $|X| = \{x\}$ is a singleton. Since $X$ is decent we can find a quasi-compact monomorphism $\Spec(k') \to X$ whose image is $x$. Then the projection $U = \Spec(k') \times_X \Spec(k) \to \Spec(k)$ is a monomorphism, whence $U = \Spec(k)$, see Schemes, Lemma \ref{schemes-lemma-mono-towards-spec-field}. Hence the projection $\Spec(k) = U \to \Spec(k')$ is \'etale and we win.
Consider the fibre square $$ \xymatrix{ T \ar[d] \ar[r] & \Spec(k) \ar[d] \\ \Spec(k') \ar[r] & Z } $$ Note that $T \to \Spec(k')$ is flat and surjective hence $T$ is not empty. On the other hand $T \to \Spec(k)$ is flat as $k$ is a field. Hence $T \to Z$ is flat and surjective. It follows from Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-flat-permanence} that $\Spec(k') \to Z$ is flat. It is surjective as by assumption $|Z|$ is a singleton.
Assume (1). Let $W$ be a scheme and let $W \to Z$ be a surjective \'etale morphism. Then $W$ is a reduced scheme. Let $\eta \in W$ be a generic point of an irreducible component of $W$. Since $W$ is reduced we have $\mathcal{O}_{W, \eta} = \kappa(\eta)$. It follows that the canonical morphism $\eta = \Spec(\kappa(\eta)) \to W$ is flat. We see that the composition $\eta \to Z$ is flat (see Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-composition-flat}). It is also surjective as $|Z|$ is a singleton. In other words (2) holds. \medskip\noindent Assume (2). Let $W$ be a scheme and let $W \to Z$ be a surjective \'etale morphism. Choose a field $k$ and a surjective flat morphism $\Spec(k) \to Z$. Then $W \times_Z \Spec(k)$ is a scheme \'etale over $k$. Hence $W \times_Z \Spec(k)$ is a disjoint union of spectra of fields (see Remark \ref{remark-recall}), in particular reduced. Since $W \times_Z \Spec(k) \to W$ is surjective and flat we conclude that $W$ is reduced (Descent, Lemma \ref{descent-lemma-descend-reduced}). In other words (1) holds. \medskip\noindent It is clear that (3) implies (2). Finally, assume (2). Pick a nonempty affine scheme $W$ and an \'etale morphism $W \to Z$. Pick a closed point $w \in W$ and set $k = \kappa(w)$. The composition $$ \Spec(k) \xrightarrow{w} W \longrightarrow Z $$ is locally of finite type by Morphisms of Spaces, Lemmas \ref{spaces-morphisms-lemma-composition-finite-type} and \ref{spaces-morphisms-lemma-etale-locally-finite-type}. It is also flat and surjective by Lemma \ref{lemma-flat-cover-by-field}. Hence (3) holds.
Assume (2) holds. By Lemma \ref{lemma-unique-point} we see that $Z$ is reduced and $|Z|$ is a singleton. Let $W$ be a scheme and let $W \to Z$ be a surjective \'etale morphism. Choose a field $k$ and a locally finitely presented, surjective, flat morphism $\Spec(k) \to Z$. Then $W \times_Z \Spec(k)$ is a scheme \'etale over $k$, hence a disjoint union of spectra of fields (see Remark \ref{remark-recall}), hence locally Noetherian. Since $W \times_Z \Spec(k) \to W$ is flat, surjective, and locally of finite presentation, we see that $\{W \times_Z \Spec(k) \to W\}$ is an fppf covering and we conclude that $W$ is locally Noetherian (Descent, Lemma \ref{descent-lemma-Noetherian-local-fppf}). In other words (1) holds. \medskip\noindent Assume (1). Pick a nonempty affine scheme $W$ and an \'etale morphism $W \to Z$. Pick a closed point $w \in W$ and set $k = \kappa(w)$. Because $W$ is locally Noetherian the morphism $w : \Spec(k) \to W$ is of finite presentation, see Morphisms, Lemma \ref{morphisms-lemma-closed-immersion-finite-presentation}. Hence the composition $$ \Spec(k) \xrightarrow{w} W \longrightarrow Z $$ is locally of finite presentation by Morphisms of Spaces, Lemmas \ref{spaces-morphisms-lemma-composition-finite-presentation} and \ref{spaces-morphisms-lemma-etale-locally-finite-presentation}. It is also flat and surjective by Lemma \ref{lemma-flat-cover-by-field}. Hence (2) holds.
We may assume that $Z'$ is nonempty. In this case the fibre product $T = Z' \times_Z \Spec(k)$ is nonempty, see Properties of Spaces, Lemma \ref{spaces-properties-lemma-points-cartesian}. Now $T$ is an algebraic space and the projection $T \to \Spec(k)$ is a monomorphism. Hence $T = \Spec(k)$, see Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-monomorphism-toward-field}. We conclude that $\Spec(k) \to Z$ factors through $Z'$. But as $\Spec(k) \to Z$ is surjective, flat and locally of finite presentation, we see that $\Spec(k) \to Z$ is surjective as a map of sheaves on $(\Sch/S)_{fppf}$ (see Spaces, Remark \ref{spaces-remark-warning}) and we conclude that $Z' = Z$.
Choose a scheme $U$ and a surjective \'etale morphism $U \to X$. Set $R = U \times_X U$ so that $X = U/R$ is a presentation (see Spaces, Section \ref{spaces-section-presentations}). Set $$ U' = \coprod\nolimits_{u \in U\text{ lying over }x} \Spec(\kappa(u)). $$ The canonical morphism $U' \to U$ is a monomorphism. Let $$ R' = U' \times_X U' = R \times_{(U \times_S U)} (U' \times_S U'). $$ Because $U' \to U$ is a monomorphism we see that the projections $s', t' : R' \to U'$ factor as a monomorphism followed by an \'etale morphism. Hence, as $U'$ is a disjoint union of spectra of fields, using Remark \ref{remark-recall}, and using Schemes, Lemma \ref{schemes-lemma-mono-towards-spec-field} we conclude that $R'$ is a disjoint union of spectra of fields and that the morphisms $s', t' : R' \to U'$ are \'etale. Hence $Z = U'/R'$ is an algebraic space by Spaces, Theorem \ref{spaces-theorem-presentation}. As $R'$ is the restriction of $R$ by $U' \to U$ we see $Z \to X$ is a monomorphism by Groupoids, Lemma \ref{groupoids-lemma-quotient-groupoid-restrict}. Since $Z \to X$ is a monomorphism we see that $|Z| \to |X|$ is injective, see Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-monomorphism-injective-points}. By Properties of Spaces, Lemma \ref{spaces-properties-lemma-points-cartesian} we see that $$ |U'| = |Z \times_X U'| \to |Z| \times_{|X|} |U'| $$ is surjective which implies (by our choice of $U'$) that $|Z| \to |X|$ has image $\{x\}$. We conclude that $|Z|$ is a singleton. Finally, by construction $U'$ is locally Noetherian and reduced, i.e., we see that $Z$ satisfies the equivalent conditions of Lemma \ref{lemma-unique-point-better}. \medskip\noindent Let us prove uniqueness of $Z \to X$. Suppose that $Z' \to X$ is a second such monomorphism of algebraic spaces. Then the projections $$ Z' \longleftarrow Z' \times_X Z \longrightarrow Z $$ are monomorphisms. The algebraic space in the middle is nonempty by Properties of Spaces, Lemma \ref{spaces-properties-lemma-points-cartesian}. Hence the two projections are isomorphisms by Lemma \ref{lemma-monomorphism-into-point} and we win.
Let $Z$ be a reduced, locally Noetherian singleton algebraic space over a scheme $S$. Let $W \to Z$ be a surjective \'etale morphism where $W$ is a scheme. Let $k$ be a field and let $\Spec(k) \to Z$ be surjective, flat, and locally of finite presentation (see Lemma \ref{lemma-unique-point-better}). The scheme $T = W \times_Z \Spec(k)$ is \'etale over $k$ in particular regular, see Remark \ref{remark-recall}. Since $T \to W$ is locally of finite presentation, flat, and surjective it follows that $W$ is regular, see Descent, Lemma \ref{descent-lemma-descend-regular}. By definition this means that $Z$ is regular.
Namely, let $X$ be an algebraic space (over some base scheme, for example over $\mathbf{Z}$) which is decent and locally Noetherian. Let $U \to X$ and $V \to X$ be \'etale morphisms with $U$ and $V$ affine schemes. We have to show that $W = U \times_X V$ is quasi-compact (Properties of Spaces, Lemma \ref{spaces-properties-lemma-characterize-quasi-separated}). Since $X$ is locally Noetherian, the schemes $U$, $V$ are Noetherian and $W$ is locally Noetherian. Since $X$ is decent, the fibres of the morphism $W \to U$ are finite. Namely, we can represent any $x \in |X|$ by a quasi-compact monomorphism $\Spec(k) \to X$. Then $U_k$ and $V_k$ are finite disjoint unions of spectra of finite separable extensions of $k$ (Remark \ref{remark-recall}) and we see that $W_k = U_k \times_{\Spec(k)} V_k$ is finite. Let $n$ be the maximum degree of a fibre of $W \to U$ at a generic point of an irreducible component of $U$. Consider the stratification $$ U = U_0 \supset U_1 \supset U_2 \supset \ldots $$ associated to $W \to U$ in More on Morphisms, Lemma \ref{more-morphisms-lemma-stratify-flat-fp-lqf}. By our choice of $n$ above we conclude that $U_{n + 1}$ is empty. Hence we see that the fibres of $W \to U$ are universally bounded. Then we can apply More on Morphisms, Lemma \ref{more-morphisms-lemma-stratify-flat-fp-lqf-universally-bounded} to find a stratification $$ \emptyset = Z_{-1} \subset Z_0 \subset Z_1 \subset Z_2 \subset \ldots \subset Z_n = U $$ by closed subsets such that with $S_r = Z_r \setminus Z_{r - 1}$ the morphism $W \times_U S_r \to S_r$ is finite locally free. Since $U$ is Noetherian, the schemes $S_r$ are Noetherian, whence the schemes $W \times_U S_r$ are Noetherian, whence $W = \coprod W \times_U S_r$ is quasi-compact as desired.
Assume $|X|$ is a singleton. It follows immediately from Theorem \ref{theorem-decent-open-dense-scheme} that $X$ is a scheme, but we can also argue directly as follows. Choose an affine scheme $U$ and a surjective \'etale morphism $U \to X$. Set $R = U \times_X U$. Then $U$ and $R$ have finitely many points by Lemma \ref{lemma-UR-finite-above-x} (and the definition of a decent space). All of these points are closed in $U$ and $R$ by Lemma \ref{lemma-decent-no-specializations-map-to-same-point}. It follows that $U$ and $R$ are affine schemes. We may shrink $U$ to a singleton space. Then $U$ is the spectrum of a henselian local ring, see Algebra, Lemma \ref{algebra-lemma-local-dimension-zero-henselian}. The projections $R \to U$ are \'etale, hence finite \'etale because $U$ is the spectrum of a $0$-dimensional henselian local ring, see Algebra, Lemma \ref{algebra-lemma-characterize-henselian}. It follows that $X$ is a scheme by Groupoids, Proposition \ref{groupoids-proposition-finite-flat-equivalence}. \medskip\noindent Part (2) follows from (1) and the fact that a reduced singleton scheme is the spectrum of a field.
Suppose that $x \leadsto x'$ for some $x' \in |X|$. Choose an \'etale morphism $U \to X$ where $U$ is a scheme and a point $u' \in U'$ mapping to $x'$. Choose a specialization $u \leadsto u'$ in $U$ with $u$ mapping to $x$ in $X$, see Lemma \ref{lemma-decent-specialization}. Then $u$ is the image of a point $w$ of the scheme $W = \Spec(k) \times_X U$. Since the projection $W \to \Spec(k)$ is \'etale we see that $\kappa(w) \supset k$ is finite. Hence $\kappa(w) \supset \kappa(s)$ is algebraic. Hence $\kappa(u) \supset \kappa(s)$ is algebraic. Thus $u$ is a closed point of $U$ by Morphisms, Lemma \ref{morphisms-lemma-algebraic-residue-field-extension-closed-point-fibre}. Thus $u = u'$, whence $x = x'$.
By Lemma \ref{lemma-algebraic-residue-field-extension-closed-point} the image point $x \in |X|$ is closed. Let $Z \subset X$ be the reduced closed subspace with $|Z| = \{x\}$ (Properties of Spaces, Lemma \ref{spaces-properties-lemma-reduced-closed-subspace}). Note that $Z$ is a decent algebraic space by Lemma \ref{lemma-representable-named-properties}. By Lemma \ref{lemma-when-field} we see that $Z = \Spec(k')$ for some field $k'$. Of course $k \supset k' \supset \kappa(s)$. Then $\Spec(k) \to Z$ is a finite morphism of schemes and $Z \to X$ is a finite morphism as it is a closed immersion. Hence $\Spec(k) \to X$ is finite (Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-composition-integral}). If $k = \kappa(s)$, then $\Spec(k) = Z$ and $\Spec(k) \to X$ is a closed immersion.
We know that $x$ can be represented by a quasi-compact monomorphism $i : \Spec(k) \to X$ where $k$ is a field (Definition \ref{definition-very-reasonable}). Let $U \to X$ be an \'etale morphism where $U$ is an affine scheme. As $x$ is closed and $X$ decent, the fibre $F$ of $|U| \to |X|$ over $x$ consists of closed points (Lemma \ref{lemma-decent-no-specializations-map-to-same-point}). As $i$ is a monomorphism, so is $U_k = U \times_X \Spec(k) \to U$. In particular, the map $|U_k| \to F$ is injective. Since $U_k$ is quasi-compact and \'etale over a field, we see that $U_k$ is a finite disjoint union of spectra of fields (Remark \ref{remark-recall}). Say $U_k = \Spec(k_1) \amalg \ldots \amalg \Spec(k_r)$. Since $\Spec(k_i) \to U$ is a monomorphism, we see that its image $u_i$ has residue field $\kappa(u_i) = k_i$. Since $u_i \in F$ is a closed point we conclude the morphism $\Spec(k_i) \to U$ is a closed immersion. As the $u_i$ are pairwise distinct, $U_k \to U$ is a closed immersion. Hence $i$ is a closed immersion (Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-closed-immersion-local}). This finishes the proof.