Lemma 31.22.7. Let $\varphi : X \to S$ be a flat morphism which is locally of finite presentation. Let $T \subset X$ be a closed subscheme. Let $x \in T$ with image $s \in S$.

If $T_ s \subset X_ s$ is a quasi-regular immersion in a neighbourhood of $x$, then there exists an open $U \subset X$ and a relative quasi-regular immersion $Z \subset U$ such that $Z_ s = T_ s \cap U_ s$ and $T \cap U \subset Z$.

If $T_ s \subset X_ s$ is a quasi-regular immersion in a neighbourhood of $x$, the morphism $T \to X$ is of finite presentation, and $T \to S$ is flat at $x$, then we can choose $U$ and $Z$ as in (1) such that $T \cap U = Z$.

If $T_ s \subset X_ s$ is a quasi-regular immersion in a neighbourhood of $x$, and $T$ is cut out by $c$ equations in a neighbourhood of $x$, where $c = \dim _ x(X_ s) - \dim _ x(T_ s)$, then we can choose $U$ and $Z$ as in (1) such that $T \cap U = Z$.

In each case $Z \to U$ is a regular immersion by Lemma 31.22.4. In particular, if $T \to S$ is locally of finite presentation and flat and all fibres $T_ s \subset X_ s$ are quasi-regular immersions, then $T \to X$ is a relative quasi-regular immersion.

**Proof.**
Choose affine open neighbourhoods $\mathop{\mathrm{Spec}}(A)$ of $s$ and $\mathop{\mathrm{Spec}}(B)$ of $x$ such that $\varphi (\mathop{\mathrm{Spec}}(B)) \subset \mathop{\mathrm{Spec}}(A)$. Let $\mathfrak p \subset A$ be the prime ideal corresponding to $s$. Let $\mathfrak q \subset B$ be the prime ideal corresponding to $x$. Let $I \subset B$ be the ideal corresponding to $T$. By the initial assumption of the lemma we know that $A \to B$ is flat and of finite presentation. The assumption in (1) means that, after shrinking $\mathop{\mathrm{Spec}}(B)$, we may assume $I(B \otimes _ A \kappa (\mathfrak p))$ is generated by a quasi-regular sequence of elements. After possibly localizing $B$ at some $g \in B$, $g \not\in \mathfrak q$ we may assume there exist $f_1, \ldots , f_ r \in I$ which map to a quasi-regular sequence in $B \otimes _ A \kappa (\mathfrak p)$ which generates $I(B \otimes _ A \kappa (\mathfrak p))$. By Algebra, Lemmas 10.69.6 and 10.68.6 we may assume after another localization that $f_1, \ldots , f_ r \in I$ form a regular sequence in $B \otimes _ A \kappa (\mathfrak p)$. By Lemma 31.18.9 it follows that $Z_1 = V(f_1) \subset \mathop{\mathrm{Spec}}(B)$ is a relative effective Cartier divisor, again after possibly localizing $B$. 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 one reaches $Z = Z_ n = V(f_1, \ldots , f_ n)$. Then $Z \to \mathop{\mathrm{Spec}}(B)$ is a regular immersion and $Z$ is flat over $S$, in particular $Z \to \mathop{\mathrm{Spec}}(B)$ is a relative quasi-regular immersion over $\mathop{\mathrm{Spec}}(A)$. This proves (1).

To see (2) consider the closed immersion $Z \to D$. The surjective ring map $u : \mathcal{O}_{D, x} \to \mathcal{O}_{Z, x}$ is a map of flat local $\mathcal{O}_{S, s}$-algebras which are essentially of finite presentation, and which becomes an isomorphisms after dividing by $\mathfrak m_ s$. Hence it is an isomorphism, see Algebra, Lemma 10.128.4. It follows that $Z \to D$ is an isomorphism in a neighbourhood of $x$, see Algebra, Lemma 10.126.6.

To see (3), after possibly shrinking $U$ we may assume that the ideal of $Z$ is generated by a regular sequence $f_1, \ldots , f_ r$ (see our construction of $Z$ above) and the ideal of $T$ is generated by $g_1, \ldots , g_ c$. We claim that $c = r$. Namely,

\begin{align*} \dim _ x(X_ s) & = \dim (\mathcal{O}_{X_ s, x}) + \text{trdeg}_{\kappa (s)}(\kappa (x)), \\ \dim _ x(T_ s) & = \dim (\mathcal{O}_{T_ s, x}) + \text{trdeg}_{\kappa (s)}(\kappa (x)), \\ \dim (\mathcal{O}_{X_ s, x}) & = \dim (\mathcal{O}_{T_ 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. As $T \subset Z$ we see that $f_ i = \sum b_{ij} g_ j$. But the ideals of $Z$ and $T$ cut out the same quasi-regular closed subscheme of $X_ s$ in a neighbourhood of $x$. Hence the matrix $(b_{ij}) \bmod \mathfrak m_ x$ is invertible (some details omitted). Hence $(b_{ij})$ is invertible in an open neighbourhood of $x$. In other words, $T \cap U = Z$ after shrinking $U$.

The final statements of the lemma follow immediately from part (2), combined with the fact that $Z \to S$ is locally of finite presentation if and only if $Z \to X$ is of finite presentation, see Morphisms, Lemmas 29.21.3 and 29.21.11.
$\square$

## Comments (0)