hcju/stacksqa huggingface dataset:
Choose an affine scheme $V$, a point $v \in V$ and an \'etale morphism $V \to Y$ mapping $v$ to $y$. The map $|V| \to |Y|$ is open and by Properties of Spaces, Lemma \ref{spaces-properties-lemma-points-cartesian} the image of $|X \times_Y V| \to |V|$ is the inverse image of the image of $|f|$. We conclude that the point $v$ is in the closure of the image of $|X \times_Y V| \to |V|$. If we prove the lemma for $X \times_Y V \to V$ and the point $v$, then the lemma follows for $f$ and $y$. In this way we reduce to the situation described in the next paragraph. \medskip\noindent Assume we have $f : X \to Y$ and $y \in |Y|$ as in the lemma where $Y$ is an affine scheme. Since $f$ is quasi-compact, we conclude that $X$ is quasi-compact. Hence we can choose an affine scheme $W$ and a surjective \'etale morphism $W \to X$. Then the image of $|f|$ is the same as the image of $W \to Y$. In this way we reduce to the case of schemes which is Limits, Lemma \ref{limits-lemma-reach-point-closure-Noetherian}.
It suffices to prove that $f$ is universally closed. Let $V \to Y$ be an \'etale morphism where $V$ is an affine scheme. By Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-universally-closed-local} it suffices to prove that the base change $X \times_Y V \to V$ is universally closed. By Properties of Spaces, Lemma \ref{spaces-properties-lemma-points-cartesian} the image $I$ of $|U \times_Y V| \to |X \times_Y V|$ is the inverse image of the image of $|h|$. Since $|X \times_Y V| \to |X|$ is open (Properties of Spaces, Lemma \ref{spaces-properties-lemma-etale-open}) we conclude that $I$ is dense in $|X \times_Y V|$. Therefore the assumptions of the lemma are satisfied for the morphisms $U \times_Y V \to X \times_Y V \to V$. Hence we may assume $Y$ is an affine scheme. \medskip\noindent Assume $Y$ is an affine scheme. Then $U$ is quasi-compact. Choose an affine scheme and a surjective \'etale morphism $W \to U$. Then we may and do replace $U$ by $W$ and assume that $U$ is affine. By the weak version of Chow's lemma (Cohomology of Spaces, Lemma \ref{spaces-cohomology-lemma-weak-chow}) we can choose a surjective proper morphism $X' \to X$ where $X'$ is a scheme. Then $U' = X' \times_X U$ is a scheme and $U' \to X'$ is of finite type. We may replace $X'$ by the scheme theoretic image of $h' : U' \to X'$ and hence $h'(U')$ is dense in $X'$. We claim that for every diagram $$ \xymatrix{ \Spec(K) \ar[r] \ar[d] & U' \ar[r]^h & X' \ar[d]^{f'} \\ \Spec(A) \ar[rr] \ar@{-->}[rru] & & Y } $$ where $A$ is a discrete valuation ring with field of fractions $K$, there exists a dotted arrow making the diagram commute. Namely, we first get an arrow $\Spec(A) \to X$ by the assumption of the lemma and then we lift this to an arrow $\Spec(A) \to X'$ using the valuative criterion for properness (Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-characterize-proper}). The morphism $X' \to Y$ is separated as a composition of a proper and a separated morphism. Thus by the case of schemes the morphism $X' \to Y$ is proper (Limits, Lemma \ref{limits-lemma-refined-valuative-criterion-proper}). By Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-image-proper-is-proper} we conclude that $X \to Y$ is proper.
We will apply Lemma \ref{lemma-refined-valuative-criterion-proper} to the morphisms $U \to X$ and $\Delta : X \to X \times_Y X$. We check the conditions. Observe that $\Delta$ is quasi-compact because $f$ is quasi-separated. Of course $\Delta$ is locally of finite type and separated (true for any diagonal morphism). Finally, suppose given a commutative solid diagram $$ \xymatrix{ \Spec(K) \ar[r] \ar[d] & U \ar[r]^h & X \ar[d]^\Delta \\ \Spec(A) \ar[rr]^{(a, b)} \ar@{-->}[rru] & & X \times_Y X } $$ where $A$ is a discrete valuation ring with field of fractions $K$. Then $a$ and $b$ give two dotted arrows in the diagram of the lemma and have to be equal. Hence as dotted arrow we can use $a = b$ which gives existence. This finishes the proof.
By Lemma \ref{lemma-finite-type-closed-in-finite-presentation} we can find a closed immersion $X \to X'$ over $B$ where $X'$ is an algebraic space of finite presentation over $B$. By Lemma \ref{lemma-descend-finite-presentation} we can find an $i$ and a morphism of finite presentation $X'_i \to B_i$ whose pull back is $X'$. Set $W = X'_i$.
Since $X$ is quasi-compact and quasi-separated formation of the scheme theoretic image of $X \to B_{i'} \times_{B_i} W$ commutes with \'etale localization (Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-quasi-compact-scheme-theoretic-image}). Hence we may and do assume $W$ is affine and maps into an affine $U_i$ \'etale over $B_i$. Then $$ B_{i'} \times_{B_i} W = B_{i'} \times_{B_i} U_i \times_{U_i} W = U_{i'} \times_{U_i} W $$ where $U_{i'} = B_{i'} \times_{B_i} U_i$ is affine as the transition morphisms are affine. Thus the lemma follows from the case of schemes which is Limits, Lemma \ref{limits-lemma-limit-from-good-diagram}.
Since $V \to B_{i_2}$ is of finite presentation and $X = \lim_{i \geq i_1} X_i$ we can appeal to Proposition \ref{proposition-characterize-locally-finite-presentation} as improved by Lemma \ref{lemma-better-characterize-relative-limit-preserving} to find an $i_0 \geq \max(i_1, i_2)$ and a morphism $h : X_{i_0} \to V$ over $B_{i_2}$ such that $X \to X_{i_0} \to V$ is equal to $X \to Y \to V$. For $i \geq i_0$ we get a commutative solid diagram $$ \xymatrix{ X \ar[d] \ar[r] & X_i \ar[r] \ar@{..>}[d] \ar@/_2pc/[dd] |!{[d];[ld]}\hole & X_{i_0} \ar[d]^h \\ Y \ar[r] \ar[d] & Y_i \ar[r] \ar[d] & V \ar[d] \\ B \ar[r] & B_i \ar[r] & B_{i_0} } $$ Since $X \to X_i$ has scheme theoretically dense image and since $Y_i$ is the scheme theoretic image of $Y \to B_i \times_{B_{i_2}} V$ we find that the morphism $X_i \to B_i \times_{B_{i_2}} V$ induced by the diagram factors through $Y_i$ (Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-factor-factor}). This proves existence. \medskip\noindent Uniqueness. Let $E_i \to X_i$ be the equalizer of $f_i$ and $g_i$ for $i \geq i_0$. We have $E_i = Y_i \times_{\Delta, Y_i \times_{B_i} Y_i, (f_i, g_i)} X_i$. Hence $E_i \to X_i$ is a monomorphism of finite presentation as a base change of the diagonal of $Y_i$ over $B_i$, see Morphisms of Spaces, Lemmas \ref{spaces-morphisms-lemma-properties-diagonal} and \ref{spaces-morphisms-lemma-diagonal-morphism-finite-type}. Since $X_i$ is a closed subspace of $B_i \times_{B_{i_0}} X_{i_0}$ and similarly for $Y_i$ we see that $$ E_i = X_i \times_{(B_i \times_{B_{i_0}} X_{i_0})} (B_i \times_{B_{i_0}} E_{i_0}) = X_i \times_{X_{i_0}} E_{i_0} $$ Similarly, we have $X = X \times_{X_{i_0}} E_{i_0}$. Hence we conclude that $E_i = X_i$ for $i$ large enough by Lemma \ref{lemma-descend-isomorphism}.
By Lemma \ref{lemma-descend-finite-presentation} we can choose an $i \geq i_2$ and a morphism $U \to Y_i$ of finite presentation such that $X = Y \times_{Y_i} U$ (this is where we use that $f$ is of finite presentation). After increasing $i$ we may assume that $U \to Y_i$ is flat, see Lemma \ref{lemma-descend-flat}. As discussed in Remark \ref{remark-finite-type-gives-well-defined-system} we may and do replace the initial diagram used to define the system $(X_i)_{i \geq i_1}$ by the system corresponding to $X \to U \to B_i$. Thus $X_{i'}$ for $i' \geq i$ is defined as the scheme theoretic image of $X \to B_{i'} \times_{B_i} U$. \medskip\noindent Because $U \to Y_i$ is flat (this is where we use that $f$ is flat), because $X = Y \times_{Y_i} U$, and because the scheme theoretic image of $Y \to Y_i$ is $Y_i$, we see that the scheme theoretic image of $X \to U$ is $U$ (Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-flat-base-change-scheme-theoretic-image}). Observe that $Y_{i'} \to B_{i'} \times_{B_i} Y_i$ is a closed immersion for $i' \geq i$ by construction of the system of $Y_j$. Then the same argument as above shows that the scheme theoretic image of $X \to B_{i'} \times_{B_i} U$ is equal to the closed subspace $Y_{i'} \times_{Y_i} U$. Thus we see that $X_{i'} = Y_{i'} \times_{Y_i} U$ for all $i' \geq i$ and hence the lemma holds with $i_3 = i$.
By the discussion in  Remark \ref{remark-finite-type-gives-well-defined-system} the choice of $i_1$ and $W$ fitting into a diagram as in (\ref{equation-good-diagram}) is immaterial for the truth of the lemma. Thus we choose $W$ as follows. First we choose a closed immersion $X \to X'$ with $X' \to Y$ proper and of finite presentation, see Lemma \ref{lemma-proper-limit-of-proper-finite-presentation}. Then we choose an $i_3 \geq i_2$ and a proper morphism $W \to Y_{i_3}$ such that $X' = Y \times_{Y_{i_3}} W$. This is possible because $Y = \lim_{i \geq i_2} Y_i$ and Lemmas \ref{lemma-relative-approximation} and \ref{lemma-eventually-proper}. With this choice of $W$ it is immediate from the construction that for $i \geq i_3$ the algebraic space $X_i$ is a closed subspace of $Y_i \times_{Y_{i_3}} W \subset B_i \times_{B_{i_3}} W$ and hence proper over $Y_i$.
By Lemma \ref{lemma-finite-type-closed-in-finite-presentation} there is a closed immersion $X \to Z$ with $Z/Y$ of finite presentation. Let $\mathcal{I} \subset \mathcal{O}_Z$ be the quasi-coherent sheaf of ideals defining $X$ as a closed subscheme of $Y$. By Lemma \ref{lemma-directed-colimit-finite-type} we can write $\mathcal{I}$ as a directed colimit $\mathcal{I} = \colim_{a \in A} \mathcal{I}_a$ of its quasi-coherent sheaves of ideals of finite type. Let $X_a \subset Z$ be the closed subspace defined by $\mathcal{I}_a$. These form an inverse system indexed by $A$. The transition morphisms $X_a \to X_{a'}$ are affine because they are closed immersions. Each $X_a$ is quasi-compact and quasi-separated since it is a closed subspace of $Z$ and $Z$ is quasi-compact and quasi-separated by our assumptions. We have $X = \lim_a X_a$ as follows directly from the fact that $\mathcal{I} = \colim_{a \in A} \mathcal{I}_a$. Each of the morphisms $X_a \to Z$ is of finite presentation, see Morphisms, Lemma \ref{morphisms-lemma-closed-immersion-finite-presentation}. Hence the morphisms $X_a \to Y$ are of finite presentation. Thus it suffices to show that $X_a \to Y$ is separated for some $a \in A$. This follows from Lemma \ref{lemma-eventually-separated} as we have assumed that $X \to Y$ is separated.
We may and do view $f : X \to Y$ as a morphism of algebraic spaces over $\Spec(\mathbf{Z})$ (see Spaces, Definition \ref{spaces-definition-base-change}). Note that integral morphisms are affine and universally closed, see Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-integral-universally-closed}. By Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-image-universally-closed-separated} we see that $Y$ is a separated algebraic space. As $f$ is surjective and $X$ is quasi-compact we see that $Y$ is quasi-compact. \medskip\noindent Consider the sheaf $\mathcal{A} = f_*\mathcal{O}_X$. This is a quasi-coherent sheaf of $\mathcal{O}_Y$-algebras, see Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-pushforward}. By Lemma \ref{lemma-colimit-finitely-presented} we can write $\mathcal{A} = \colim_i \mathcal{F}_i$ as a filtered colimit of finite type $\mathcal{O}_Y$-modules. Let $\mathcal{A}_i \subset \mathcal{A}$ be the $\mathcal{O}_Y$-subalgebra generated by $\mathcal{F}_i$. Since the map of algebras $\mathcal{O}_Y \to \mathcal{A}$ is integral, we see that each $\mathcal{A}_i$ is a finite quasi-coherent $\mathcal{O}_Y$-algebra. Hence $$ X_i = \underline{\Spec}_Y(\mathcal{A}_i) \longrightarrow Y $$ is a finite morphism of algebraic spaces. Here  $\underline{\Spec}$ is the construction of Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-affine-equivalence-algebras}. It is clear that $X = \lim_i X_i$. Hence by Lemma \ref{lemma-limit-is-affine} we see that for $i$ sufficiently large the scheme $X_i$ is affine. Moreover, since $X \to Y$ factors through each $X_i$ we see that $X_i \to Y$ is surjective. Hence we conclude that $Y$ is affine by Lemma \ref{lemma-affine}.
Part (1) is the special case of (2) with $U = X$. Let $Y \to X$ be as in Decent Spaces, Lemma \ref{decent-spaces-lemma-there-is-a-scheme-integral-over}. Choose a finite affine open covering $Y = \bigcup V_j$ such that $V_j \to X$ factors through $U$. We can write $Y = \lim Y_i$ with $Y_i \to X$ finite and of finite presentation, see Lemma \ref{lemma-integral-limit-finite-and-finite-presentation}. For large enough $i$ the algebraic space $Y_i$ is a scheme, see Lemma \ref{lemma-limit-is-scheme}. For large enough $i$ we can find affine opens $V_{i, j} \subset Y_i$ whose inverse image in $Y$ recovers $V_j$, see Lemma \ref{lemma-descend-opens}. For even larger $i$ the morphisms $V_j \to U$ over $X$ come from morphisms $V_{i, j} \to U$ over $X$, see Proposition \ref{proposition-characterize-locally-finite-presentation}. This finishes the proof.
Choose an affine open $\Spec(\Lambda) \subset S$ such that $\Spec(k) \to S$ factors through it. By Artin's Axioms, Section \ref{artin-section-predeformation-categories} we obtain a predeformation category $\mathcal{F}_{\mathcal{X}, k, x_0}$ over the category $\mathcal{C}_\Lambda$. (As pointed out in locus citatus this category only depends on the morphism $\Spec(k) \to S$ and not on the choice of $\Lambda$.) By Artin's Axioms, Lemmas \ref{artin-lemma-deformation-category} and \ref{artin-lemma-algebraic-stack-RS} $\mathcal{F}_{\mathcal{X}, k, x_0}$ is actually a deformation category. By Artin's Axioms, Lemma \ref{artin-lemma-finite-dimension} we find that $T\mathcal{F}_{\mathcal{X}, k, x_0}$ and $\text{Inf}(\mathcal{F}_{\mathcal{X}, k, x_0})$ are finite dimensional $k$-vector spaces.
By Lemma \ref{lemma-deformation-category} and Formal Deformation Theory, Lemma \ref{formal-defos-lemma-versal-object-existence} (note that the assumptions of this lemma hold by Formal Deformation Theory, Lemmas \ref{formal-defos-lemma-RS-implies-S1-S2} and Definition \ref{formal-defos-definition-deformation-category}). By the uniquness result of Formal Deformation Theory, Lemma \ref{formal-defos-lemma-minimal-versal} there exists a ``minimal'' versal ring $A$ of $\mathcal{X}$ at $x_0$ such that any other versal ring of $\mathcal{X}$ at $x_0$ is isomorphic to $A[[t_1, \ldots, t_r]]$ for some $r$. This clearly implies the second statement.
Follows immediately from Artin's Axioms, Lemma \ref{artin-lemma-change-of-field} and Formal Deformation Theory, Lemma \ref{formal-defos-lemma-change-of-field-versal-ring}. (We also use that $\mathcal{X}$ satisfies (RS) by Artin's Axioms, Lemma \ref{artin-lemma-algebraic-stack-RS}.)
Since $U \to S$ is locally of finite type (as a composition of such morphisms), we see that $\Spec(k) \to S$ is of finite type (again as a composition). Thus the statement makes sense. The equivalence of (1) and (2) is the definition of $x$ being versal at $u_0$. The equivalence of (1) and (3) is Artin's Axioms, Lemma \ref{artin-lemma-versality-matches}. Thus (1), (2), and (3) are equivalent. \medskip\noindent If $x|_{U'}$ is smooth, then the functor $\hat x : \mathcal{F}_{U, k, u_0} \to \mathcal{F}_{\mathcal{X}, k, x_0}$ is smooth by Artin's Axioms, Lemma \ref{artin-lemma-formally-smooth-on-deformation-categories}. Thus (4) implies (1), (2), and (3). For the converse, assume $x$ is versal at $u_0$. Choose a surjective smooth morphism $y : V \to \mathcal{X}$ where $V$ is a scheme. Set $Z = V \times_\mathcal{X} U$ and pick a finite type point $z_0 \in |Z|$ lying over $u_0$ (this is possible by Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-finite-type-points-surjective-morphism}). By Artin's Axioms, Lemma \ref{artin-lemma-base-change-versal} the morphism $Z \to V$ is smooth at $z_0$. By definition we can find an open neighbourhood $W \subset Z$ of $z_0$ such that $W \to V$ is smooth. Since $Z \to U$ is open, let $U' \subset U$ be the image of $W$. Then we see that $U' \to \mathcal{X}$ is smooth by our definition of smooth morphisms of stacks. \medskip\noindent The final statement follows from the definitions as $\mathcal{O}_{U, u_0}^\wedge$ prorepresents $\mathcal{F}_{U, k, u_0}$.
The equivalence of (2) and (3) follows immediately from Formal Deformation Theory, Lemma \ref{formal-defos-lemma-smooth-power-series-classical}. \medskip\noindent Note that $\mathcal{O}_{S, s} \to A$ is formally smooth in the $\mathfrak m_A$-adic topology if and only if $\mathcal{O}_{S, s} \to A' = A[[t_1, \ldots, t_r]]$ is formally smooth in the $\mathfrak m_{A'}$-adic topology. Hence (2) does not depend on the choice of our versal ring by Lemma \ref{lemma-versal-ring}. Next, let $l/k$ be a finite extension and choose $A \to A'$ as in Lemma \ref{lemma-versal-ring-field-extension}. If $\mathcal{O}_{S, s} \to A$ is formally smooth in the $\mathfrak m_A$-adic topology, then $\mathcal{O}_{S, s} \to A'$ is formally smooth in the $\mathfrak m_{A'}$-adic topology, see More on Algebra, Lemma \ref{more-algebra-lemma-compose-formally-smooth}. Conversely, if $\mathcal{O}_{S, s} \to A'$ is formally smooth in the $\mathfrak m_{A'}$-adic topology, then $\mathcal{O}_{S, s}^\wedge \to A'$ and $A \to A'$ are regular (More on Algebra, Proposition \ref{more-algebra-proposition-fs-regular}) and hence $\mathcal{O}_{S, s}^\wedge \to A$ is regular (More on Algebra, Lemma \ref{more-algebra-lemma-regular-permanence}), hence $\mathcal{O}_{S, s} \to A$ is formally smooth in the $\mathfrak m_A$-adic topology (same lemma as before). Thus the equivalence of (2) and (1) holds for $k$ and $x_0$ if and only if it holds for $l$ and $x_{0, l}$. \medskip\noindent Choose a scheme $U$ and a smooth morphism $U \to \mathcal{X}$ such that $\Spec(k) \times_\mathcal{X} U$ is nonempty. Choose a finite extension $l/k$ and a point $w_0 : \Spec(l) \to \Spec(k) \times_\mathcal{X} U$. Let $u_0 \in U$ be the image of $w_0$. We may apply the above to $l/k$ and to $l/\kappa(u_0)$ to see that we can reduce to $u_0$. Thus we may assume $A = \mathcal{O}_{U, u_0}^\wedge$, see Lemma \ref{lemma-compare-versal-ring-completion}. Observe that $x_0$ is in the smooth locus of $\mathcal{X} \to S$ if and only if $u_0$ is in the smooth locus of $U \to S$, see for example Morphisms of Stacks, Lemma \ref{stacks-morphisms-lemma-where-smooth}. Thus the equivalence of (1) and (2) follows from More on Algebra, Lemma \ref{more-algebra-lemma-formally-smooth-finite-type}.
Let $(\xi_n, f_n)$ be the versal formal object over $A$. By Artin's Axioms, Lemma \ref{artin-lemma-effective} we know that $\xi = (A, \xi_n, f_n)$ is effective. By assumption $\mathcal{X}$ is locally of finite presentation over $S$ (use Morphisms of Stacks, Lemma \ref{stacks-morphisms-lemma-noetherian-finite-type-finite-presentation}), and hence limit preserving by Limits of Stacks, Proposition \ref{stacks-limits-proposition-characterize-locally-finite-presentation}. Thus Artin approximation as in Artin's Axioms, Lemma \ref{artin-lemma-approximate-versal} shows that we may find a morphism $U \to \mathcal{X}$ with source a finite type $S$-scheme, containing a point $u_0 \in U$ of residue field $k$ satisfying (1) and (2) such that $U \to \mathcal{X}$ is versal at $u_0$. By Lemma \ref{lemma-compare-versal-ring-completion} after shrinking $U$ we may assume $U \to \mathcal{X}$ is smooth.
If the local ring of $S$ at the image point is a G-ring, then this follows immediately from Lemma \ref{lemma-Artin-approximation-by-smooth-morphism} and the fact that the map from a Noetherian local ring to its completion is flat. In general we prove it as follows. \medskip\noindent Step I. If $A$ and $A'$ are two versal rings to $\mathcal{X}$ at $x_0$, then the result is true for $A$ if and only if it is true for $A'$. Namely, after possible swapping $A$ and $A'$, we may assume there is a formally smooth map $\varphi : A \to A'$ such that the composition $$ \Spec(A') \to \Spec(A) \to \mathcal{X} $$ is the morphism $\Spec(A') \to \mathcal{X}$, see Lemma \ref{lemma-versal-ring} and Remark \ref{remark-upgrade}. Since $A \to A'$ is faithfully flat we obtain the equivalence from Morphisms of Stacks, Lemmas \ref{stacks-morphisms-lemma-composition-flat} and \ref{stacks-morphisms-lemma-flat-permanence}. \medskip\noindent Step II. Let $l/k$ be a finite extension of fields. Let $x_{l, 0} : \Spec(l) \to \mathcal{X}$ be the induced morphism. Let $A$ be a versal ring to $\mathcal{X}$ at $x_0$ and let $A \to A'$ be as in Lemma \ref{lemma-versal-ring-field-extension}. Then again the composition $$ \Spec(A') \to \Spec(A) \to \mathcal{X} $$ is the morphism $\Spec(A') \to \mathcal{X}$, see Remark \ref{remark-upgrade}. Arguing as before and using step I to see choice of versal rings is irrelevant, we see that the lemma holds for $x_0$ if and only if it holds for $x_{l, 0}$. \medskip\noindent Step III. Choose a scheme $U$ and a surjective smooth morphism $U \to \mathcal{X}$. Then we can choose a finite type point $z_0$ on $Z = U \times_\mathcal{X} x_0$ (this is a nonempty algebraic space). Let $u_0 \in U$ be the image of $z_0$ in $U$. Choose a scheme and a surjective \'etale map $W \to Z$ such that $z_0$ is the image of a closed point $w_0 \in W$ (see Morphisms of Spaces, Section \ref{spaces-morphisms-section-points-finite-type}). Since $W \to \Spec(k)$ and $W \to U$ are of finite type, we see that $\kappa(w_0)/k$ and $\kappa(w_0)/\kappa(u_0)$ are finite extensions of fields (see Morphisms, Section \ref{morphisms-section-points-finite-type}). Applying Step II twice we may replace $x_0$ by $u_0 \to U \to \mathcal{X}$. Then we see our morphism is the composition $$ \Spec(\mathcal{O}_{U, u_0}^\wedge) \to U \to \mathcal{X} $$ The first arrow is flat because completion of Noetherian local rings are flat (Algebra, Lemma \ref{algebra-lemma-completion-flat}) and the second arrow is flat as a smooth morphism is flat. The composition is flat as composition preserves flatness.
The map $|U| \to |\mathcal{X}|$ is continuous and open by Properties of Stacks, Lemma \ref{stacks-properties-lemma-topology-points}. Let $T \subset |U|$ be an irreducible component. Since $U$ is locally Noetherian, we can find a nonempty affine open $W \subset U$ contained in $T$. Then $f(T) \subset |\mathcal{X}|$ is irreducible and contains the nonempty open subset $f(W)$. Thus the closure of $f(T)$ is irreducible and contains a nonempty open. It follows that this closure is an irreducible component. \medskip\noindent Assume $U \to \mathcal{X}$ is surjective and let $Z \subset |\mathcal{X}|$ be an irreducible component. Choose a Noetherian open subset $V$ of $|\mathcal{X}|$ meeting $Z$. After removing the other irreducible components from $V$ we may assume that $V \subset Z$. Take an irreducible component of the nonempty open $f^{-1}(V) \subset |U|$ and let $T \subset |U|$ be its closure. This is an irreducible component of $|U|$ and the closure of $f(T)$ must agree with $Z$ by our choice of $T$.
Write $\xi'$ for the generic point of $T'$, and $\xi$ for the generic point of $T$. Let $A = \mathcal{O}_{X, \xi}$ and $B = \mathcal{O}_{U, \xi'}$. We need to show that $\text{length}_A A = \text{length}_B B$. Since $A \to B$ is a flat local homomorphism of rings (since smooth morphisms are flat), we have $$ \text{length}_A(A) \text{length}_B(B/\mathfrak m_A B) = \text{length}_B(B) $$ by Algebra, Lemma \ref{algebra-lemma-pullback-module}. Thus it suffices to show $\mathfrak m_A B = \mathfrak m_B$, or equivalently, that $B/\mathfrak m_A B$ is reduced. Since $U \to X$ is smooth, so is its base change $U_{\xi} \to \Spec \kappa(\xi)$. As $U_{\xi}$ is a smooth scheme over a field, it is reduced, and thus so its local ring at any point (Varieties, Lemma \ref{varieties-lemma-smooth-geometrically-normal}). In particular, $$ B/\mathfrak m_A B = \mathcal{O}_{U, \xi'}/\mathfrak m_{X, \xi}\mathcal{O}_{U, \xi'} = \mathcal{O}_{U_\xi, \xi'} $$ is reduced, as required.