Lemma 37.22.2. Let $f : X \to S$ be a morphism of schemes. Let $x \in X$ be a point with image $s \in S$. Let $h_1, \ldots , h_ r \in \mathcal{O}_{X, x}$. Assume

1. $f$ is locally of finite presentation,

2. $f$ is flat at $x$, and

3. the images of $h_1, \ldots , h_ r$ in $\mathcal{O}_{X_ s, x} = \mathcal{O}_{X, x}/\mathfrak m_ s\mathcal{O}_{X, x}$ form a regular sequence.

Then there exists an affine open neighbourhood $U \subset X$ of $x$ such that $h_1, \ldots , h_ r$ come from $h_1, \ldots , h_ r \in \Gamma (U, \mathcal{O}_ U)$ and such that $Z = V(h_1, \ldots , h_ r) \to U$ is a regular immersion with $x \in Z$ and $Z \to S$ flat and locally of finite presentation. Moreover, the base change $Z_{S'} \to U_{S'}$ is a regular immersion for any scheme $S'$ over $S$.

Proof. (Our conventions on regular sequences imply that $h_ i \in \mathfrak m_ x$ for each $i$.) The case $r = 1$ follows from Lemma 37.22.1 combined with Divisors, Lemma 31.18.1 to see that $V(h_1)$ remains an effective Cartier divisor after base change. The case $r > 1$ follows from a straightforward induction on $r$ (applying the result for $r = 1$ exactly $r$ times; details omitted).

Another way to prove the lemma is using the material from Divisors, Section 31.22. Namely, first by openness of flatness (see Theorem 37.15.1) we may assume, after replacing $X$ by an open neighbourhood of $x$, that $X \to S$ is flat. We may also assume that $X$ and $S$ are affine. After possible shrinking $X$ a bit we may assume that we have $h_1, \ldots , h_ r \in \Gamma (X, \mathcal{O}_ X)$. Set $Z = V(h_1, \ldots , h_ r)$. Note that $X_ s$ is a Noetherian scheme (because it is an algebraic $\kappa (s)$-scheme, see Varieties, Section 33.20) and that the topology on $X_ s$ is induced from the topology on $X$ (see Schemes, Lemma 26.18.5). Hence after shrinking $X$ a bit more we may assume that $Z_ s \subset X_ s$ is a regular immersion cut out by the $r$ elements $h_ i|_{X_ s}$, see Divisors, Lemma 31.20.8 and its proof. It is also clear that $r = \dim _ x(X_ s) - \dim _ x(Z_ s)$ because

\begin{align*} \dim _ x(X_ s) & = \dim (\mathcal{O}_{X_ s, x}) + \text{trdeg}_{\kappa (s)}(\kappa (x)), \\ \dim _ x(Z_ s) & = \dim (\mathcal{O}_{Z_ s, x}) + \text{trdeg}_{\kappa (s)}(\kappa (x)), \\ \dim (\mathcal{O}_{X_ s, x}) & = \dim (\mathcal{O}_{Z_ s, x}) + r \end{align*}

the first two equalities by Algebra, Lemma 10.116.3 and the second by $r$ times applying Algebra, Lemma 10.60.13. Hence Divisors, Lemma 31.22.7 part (3) applies to show that (after Zariski shrinking $X$) the morphism $Z \to X$ is a regular immersion to which Divisors, Lemma 31.22.4 applies (which gives the flatness and the statement on base change). $\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).