Lemma 31.22.4. Let $X \to S$ be a morphism of schemes. Let $Z \to X$ be an immersion. Assume

1. $X \to S$ is flat and locally of finite presentation,

2. $Z \to X$ is a relative quasi-regular immersion.

Then $Z \to X$ is a regular immersion and the same remains true after any base change.

Proof. Pick $x \in Z$ with image $s \in S$. To prove this it suffices to find an affine neighbourhood of $x$ contained in $U$ such that the result holds on that affine open. Hence we may assume that $X$ is affine and there exist a quasi-regular sequence $f_1, \ldots , f_ r \in \Gamma (X, \mathcal{O}_ X)$ such that $Z = V(f_1, \ldots , f_ r)$. By More on Algebra, Lemma 15.31.4 the sequence $f_1|_{X_ s}, \ldots , f_ r|_{X_ s}$ is a quasi-regular sequence in $\Gamma (X_ s, \mathcal{O}_{X_ s})$. Since $X_ s$ is Noetherian, this implies, possibly after shrinking $X$ a bit, that $f_1|_{X_ s}, \ldots , f_ r|_{X_ s}$ is a regular sequence, see Algebra, Lemmas 10.69.6 and 10.68.6. By Lemma 31.18.9 it follows that $Z_1 = V(f_1) \subset X$ is a relative effective Cartier divisor, again after possibly shrinking $X$ a bit. Applying the same lemma again, but now to $Z_2 = V(f_1, f_2) \subset Z_1$ we see that $Z_2 \subset Z_1$ is a relative effective Cartier divisor. And so on until on reaches $Z = Z_ n = V(f_1, \ldots , f_ n)$. Since being a relative effective Cartier divisor is preserved under arbitrary base change, see Lemma 31.18.1, we also see that the final statement of the lemma holds. $\square$

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).