## 10.129 Openness of the flat locus

We use Lemma 10.128.3 to reduce to the Noetherian case. The Noetherian case is handled using the characterization of exact complexes given in Section 10.102.

Lemma 10.129.1. Let $k$ be a field. Let $S$ be a finite type $k$-algebra. Let $f_1, \ldots , f_ i$ be elements of $S$. Assume that $S$ is Cohen-Macaulay and equidimensional of dimension $d$, and that $\dim V(f_1, \ldots , f_ i) \leq d - i$. Then equality holds and $f_1, \ldots , f_ i$ forms a regular sequence in $S_{\mathfrak q}$ for every prime $\mathfrak q$ of $V(f_1, \ldots , f_ i)$.

Proof. If $S$ is Cohen-Macaulay and equidimensional of dimension $d$, then we have $\dim (S_{\mathfrak m}) = d$ for all maximal ideals $\mathfrak m$ of $S$, see Lemma 10.114.7. By Proposition 10.103.4 we see that for all maximal ideals $\mathfrak m \in V(f_1, \ldots , f_ i)$ the sequence is a regular sequence in $S_{\mathfrak m}$ and the local ring $S_{\mathfrak m}/(f_1, \ldots , f_ i)$ is Cohen-Macaulay of dimension $d - i$. This actually means that $S/(f_1, \ldots , f_ i)$ is Cohen-Macaulay and equidimensional of dimension $d - i$. $\square$

Lemma 10.129.2. Let $R \to S$ be a finite type ring map. Let $d$ be an integer such that all fibres $S \otimes _ R \kappa (\mathfrak p)$ are Cohen-Macaulay and equidimensional of dimension $d$. Let $f_1, \ldots , f_ i$ be elements of $S$. The set

$\{ \mathfrak q \in V(f_1, \ldots , f_ i) \mid f_1, \ldots , f_ i \text{ are a regular sequence in } S_{\mathfrak q}/\mathfrak p S_{\mathfrak q} \text{ where }\mathfrak p = R \cap \mathfrak q \}$

is open in $V(f_1, \ldots , f_ i)$.

Proof. Write $\overline{S} = S/(f_1, \ldots , f_ i)$. Suppose $\mathfrak q$ is an element of the set defined in the lemma, and $\mathfrak p$ is the corresponding prime of $R$. We will use relative dimension as defined in Definition 10.125.1. First, note that $d = \dim _{\mathfrak q}(S/R) = \dim (S_{\mathfrak q}/\mathfrak pS_{\mathfrak q}) + \text{trdeg}_{\kappa (\mathfrak p)}\ \kappa (\mathfrak q)$ by Lemma 10.116.3. Since $f_1, \ldots , f_ i$ form a regular sequence in the Noetherian local ring $S_{\mathfrak q}/\mathfrak pS_{\mathfrak q}$ Lemma 10.60.13 tells us that $\dim (\overline{S}_{\mathfrak q}/\mathfrak p\overline{S}_{\mathfrak q}) = \dim (S_{\mathfrak q}/\mathfrak pS_{\mathfrak q}) - i$. We conclude that $\dim _{\mathfrak q}(\overline{S}/R) = \dim (\overline{S}_{\mathfrak q}/\mathfrak p\overline{S}_{\mathfrak q}) + \text{trdeg}_{\kappa (\mathfrak p)}\ \kappa (\mathfrak q) = d - i$ by Lemma 10.116.3. By Lemma 10.125.6 we have $\dim _{\mathfrak q'}(\overline{S}/R) \leq d - i$ for all $\mathfrak q' \in V(f_1, \ldots , f_ i) = \mathop{\mathrm{Spec}}(\overline{S})$ in a neighbourhood of $\mathfrak q$. Thus after replacing $S$ by $S_ g$ for some $g \in S$, $g \not\in \mathfrak q$ we may assume that the inequality holds for all $\mathfrak q'$. The result follows from Lemma 10.129.1. $\square$

Lemma 10.129.3. Let $R \to S$ be a ring map. Consider a finite homological complex of finite free $S$-modules:

$F_{\bullet } : 0 \to S^{n_ e} \xrightarrow {\varphi _ e} S^{n_{e-1}} \xrightarrow {\varphi _{e-1}} \ldots \xrightarrow {\varphi _{i + 1}} S^{n_ i} \xrightarrow {\varphi _ i} S^{n_{i-1}} \xrightarrow {\varphi _{i-1}} \ldots \xrightarrow {\varphi _1} S^{n_0}$

For every prime $\mathfrak q$ of $S$ consider the complex $\overline{F}_{\bullet , \mathfrak q} = F_{\bullet , \mathfrak q} \otimes _ R \kappa (\mathfrak p)$ where $\mathfrak p$ is inverse image of $\mathfrak q$ in $R$. Assume $R$ is Noetherian and there exists an integer $d$ such that $R \to S$ is finite type, flat with fibres $S \otimes _ R \kappa (\mathfrak p)$ Cohen-Macaulay of dimension $d$. The set

$\{ \mathfrak q \in \mathop{\mathrm{Spec}}(S) \mid \overline{F}_{\bullet , \mathfrak q}\text{ is exact}\}$

is open in $\mathop{\mathrm{Spec}}(S)$.

Proof. Let $\mathfrak q$ be an element of the set defined in the lemma. We are going to use Proposition 10.102.9 to show there exists a $g \in S$, $g \not\in \mathfrak q$ such that $D(g)$ is contained in the set defined in the lemma. In other words, we are going to show that after replacing $S$ by $S_ g$, the set of the lemma is all of $\mathop{\mathrm{Spec}}(S)$. Thus during the proof we will, finitely often, replace $S$ by such a localization. Recall that Proposition 10.102.9 characterizes exactness of complexes in terms of ranks of the maps $\varphi _ i$ and the ideals $I(\varphi _ i)$, in case the ring is local. We first address the rank condition. Set $r_ i = n_ i - n_{i + 1} + \ldots + (-1)^{e - i} n_ e$. Note that $r_ i + r_{i + 1} = n_ i$ and note that $r_ i$ is the expected rank of $\varphi _ i$ (in the exact case).

By Lemma 10.99.5 we see that if $\overline{F}_{\bullet , \mathfrak q}$ is exact, then the localization $F_{\bullet , \mathfrak q}$ is exact. In particular the complex $F_\bullet$ becomes exact after localizing by an element $g \in S$, $g \not\in \mathfrak q$. In this case Proposition 10.102.9 applied to all localizations of $S$ at prime ideals implies that all $(r_ i + 1) \times (r_ i + 1)$-minors of $\varphi _ i$ are zero. Thus we see that the rank of $\varphi _ i$ is at most $r_ i$.

Let $I_ i \subset S$ denote the ideal generated by the $r_ i \times r_ i$-minors of the matrix of $\varphi _ i$. By Proposition 10.102.9 the complex $\overline{F}_{\bullet , \mathfrak q}$ is exact if and only if for every $1 \leq i \leq e$ we have either $(I_ i)_{\mathfrak q} = S_{\mathfrak q}$ or $(I_ i)_{\mathfrak q}$ contains a $S_{\mathfrak q}/\mathfrak p S_{\mathfrak q}$-regular sequence of length $i$. Namely, by our choice of $r_ i$ above and by the bound on the ranks of the $\varphi _ i$ this is the only way the conditions of Proposition 10.102.9 can be satisfied.

If $(I_ i)_{\mathfrak q} = S_{\mathfrak q}$, then after localizing $S$ at some element $g \not\in \mathfrak q$ we may assume that $I_ i = S$. Clearly, this is an open condition.

If $(I_ i)_{\mathfrak q} \not= S_{\mathfrak q}$, then we have a sequence $f_1, \ldots , f_ i \in (I_ i)_{\mathfrak q}$ which form a regular sequence in $S_{\mathfrak q}/\mathfrak pS_{\mathfrak q}$. Note that for any prime $\mathfrak q' \subset S$ such that $(f_1, \ldots , f_ i) \not\subset \mathfrak q'$ we have $(I_ i)_{\mathfrak q'} = S_{\mathfrak q'}$. Thus the result follows from Lemma 10.129.2. $\square$

Theorem 10.129.4. Let $R$ be a ring. Let $R \to S$ be a ring map of finite presentation. Let $M$ be a finitely presented $S$-module. The set

$\{ \mathfrak q \in \mathop{\mathrm{Spec}}(S) \mid M_{\mathfrak q}\text{ is flat over }R\}$

is open in $\mathop{\mathrm{Spec}}(S)$.

Proof. Let $\mathfrak q \in \mathop{\mathrm{Spec}}(S)$ be a prime. Let $\mathfrak p \subset R$ be the inverse image of $\mathfrak q$ in $R$. Note that $M_{\mathfrak q}$ is flat over $R$ if and only if it is flat over $R_{\mathfrak p}$. Let us assume that $M_{\mathfrak q}$ is flat over $R$. We claim that there exists a $g \in S$, $g \not\in \mathfrak q$ such that $M_ g$ is flat over $R$.

We first reduce to the case where $R$ and $S$ are of finite type over $\mathbf{Z}$. Choose a directed set $\Lambda$ and a system $(R_\lambda \to S_\lambda , M_\lambda )$ as in Lemma 10.127.18. Set $\mathfrak p_\lambda$ equal to the inverse image of $\mathfrak p$ in $R_\lambda$. Set $\mathfrak q_\lambda$ equal to the inverse image of $\mathfrak q$ in $S_\lambda$. Then the system

$((R_\lambda )_{\mathfrak p_\lambda }, (S_\lambda )_{\mathfrak q_\lambda }, (M_\lambda )_{\mathfrak q_{\lambda }})$

is a system as in Lemma 10.127.13. Hence by Lemma 10.128.3 we see that for some $\lambda$ the module $M_\lambda$ is flat over $R_\lambda$ at the prime $\mathfrak q_{\lambda }$. Suppose we can prove our claim for the system $(R_\lambda \to S_\lambda , M_\lambda , \mathfrak q_{\lambda })$. In other words, suppose that we can find a $g \in S_\lambda$, $g \not\in \mathfrak q_\lambda$ such that $(M_\lambda )_ g$ is flat over $R_\lambda$. By Lemma 10.127.18 we have $M = M_\lambda \otimes _{R_\lambda } R$ and hence also $M_ g = (M_\lambda )_ g \otimes _{R_\lambda } R$. Thus by Lemma 10.39.7 we deduce the claim for the system $(R \to S, M, \mathfrak q)$.

At this point we may assume that $R$ and $S$ are of finite type over $\mathbf{Z}$. We may write $S$ as a quotient of a polynomial ring $R[x_1, \ldots , x_ n]$. Of course, we may replace $S$ by $R[x_1, \ldots , x_ n]$ and assume that $S$ is a polynomial ring over $R$. In particular we see that $R \to S$ is flat and all fibres rings $S \otimes _ R \kappa (\mathfrak p)$ have global dimension $n$.

Choose a resolution $F_\bullet$ of $M$ over $S$ with each $F_ i$ finite free, see Lemma 10.71.1. Let $K_ n = \mathop{\mathrm{Ker}}(F_{n-1} \to F_{n-2})$. Note that $(K_ n)_{\mathfrak q}$ is flat over $R$, since each $F_ i$ is flat over $R$ and by assumption on $M$, see Lemma 10.39.13. In addition, the sequence

$0 \to K_ n/\mathfrak p K_ n \to F_{n-1}/ \mathfrak p F_{n-1} \to \ldots \to F_0 / \mathfrak p F_0 \to M/\mathfrak p M \to 0$

is exact upon localizing at $\mathfrak q$, because of vanishing of $\text{Tor}_ i^{R_\mathfrak p}(\kappa (\mathfrak p), M_{\mathfrak q})$. Since the global dimension of $S_\mathfrak q/\mathfrak p S_{\mathfrak q}$ is $n$ we conclude that $K_ n / \mathfrak p K_ n$ localized at $\mathfrak q$ is a finite free module over $S_\mathfrak q/\mathfrak p S_{\mathfrak q}$. By Lemma 10.99.4 $(K_ n)_{\mathfrak q}$ is free over $S_{\mathfrak q}$. In particular, there exists a $g \in S$, $g \not\in \mathfrak q$ such that $(K_ n)_ g$ is finite free over $S_ g$.

By Lemma 10.129.3 there exists a further localization $S_ g$ such that the complex

$0 \to K_ n \to F_{n-1} \to \ldots \to F_0$

is exact on all fibres of $R \to S$. By Lemma 10.99.5 this implies that the cokernel of $F_1 \to F_0$ is flat. This proves the theorem in the Noetherian case. $\square$

Comment #6258 by Qilin,Yang on

The reasoning in the last paragraph of the proof of Lemma 10.129.3 is seriously unclear, especially I don't know how you use the openness of lemma 10.129.2.

1. (I_ i){\mathfrak q'} = S{\mathfrak q'}. Why?
2. The openness of Lemma 10.129.2 is not in the Base S, why in Lemma 10.129.3 it is related to the openness on the base ?

Thanks!

Comment #6264 by Qilin,Yang on

Johan, thanks for your answer,I know the reasoning. Taking the inetersection $D(I)\cap U,$ where $\mathfrank(q)\in D(I)$ statifies $I__{\mathfrank {q}}=S_{\mathfrank{q}},$ and $U$ is the open subset of $Spec(S)$ such that on $V(I)\cap U$ the sequence $(f_1,\cdots,f_i)$ is a regular sequence.

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).