TITLE: Smoothness of the generic fiber implies smoothness over a dense open of the target?
QUESTION [9 upvotes]: I can prove the following result without too much trouble:
Let $f: X \to S$ be a proper flat morphism of finite presentation with $S$ irreducible having generic point $\xi \in S$. Then the following are equivalent,
(1) the generic fiber $X_\xi \to \mathrm{Spec}{\kappa(\xi)}$ is smooth
(2) there exists a smooth fiber $X_s \to \mathrm{Spec}(\kappa(s))$ for some $s \in S$
(3) there exists a dense open set $U \subset S$ such that $f : X_U \to U$ is smooth.
A possible reference is [EGA-IV-4-12.2.4] then use properness to conclude that the image of the nonsmooth locus is closed.
However, I am interested in the case that $f$ is not proper. It is easy to show that (2) does not imply (3) without properness. E.g. take
$$ X = \mathrm{Spec}{k[x, y, z]/(y(xz - 1))} \to \mathrm{Spec}{k[z]} = \mathbb{A}^1_k $$
which has only one smooth fiber (over $z = 0$). However, is it true that (1) still implies (3) without properness? Explicitly, is the following true:
Let $f: X \to S$ be a flat morphism of finite presentation with $S$ irreducible having generic point $\xi \in S$. Then if $X_\xi \to \mathrm{Spec}(\kappa(\xi))$ is smooth then there is a dense open set $U \subset S$ such that $f : X_U \to U$ is smooth?
If this is true can somebody point me to a reference? If it is false can somebody provide a counterexample?
Many thanks.

REPLY [8 votes]: As Will Sawin said in his comment, this is true using Chevalley's theorem. A sketch goes as follows.
Suppose that $X_\xi \to \mathrm{Spec}(\kappa(\xi))$ is smooth. Let $N \subset X$ be the nonsmooth locus. For a morphism of finite presentation, the smooth locus is retrocompact open so $N$ is constructible. Thus by Chevalley's theorem $f(N)$ is constructible so $S \setminus f(N)$ is constructible. However, $\xi \in S \setminus f(N)$ because the generic fiber is smooth so $S \setminus f(N)$ contains a dense open $U \subset S \setminus f(N)$. Then $X_U \to U$ is smooth because $f$ is flat + finite presentation and each fiber above $s \in U$ is smooth since $U$ does not intersect $f(N)$ meaning the fiber over $s \in U$ does not intersect $N$.