Local criterion for flatness

In algebra, the local criterion for flatness gives conditions one can check to show flatness of a module.

Statement
Given a commutative ring A, an ideal I and an A-module M, suppose either or Then the following are equivalent: 1. M is a flat module.
 * A is a Noetherian ring and M is idealwise separated for I: for every ideal $$\mathfrak{a}$$, $$\bigcap_{n \ge 1} I^n(\mathfrak{a} \otimes M) = 0$$ (for example, this is the case when A is a Noetherian local ring, I its maximal ideal and M finitely generated),
 * I is nilpotent.

2. $M/I$ is flat over $A/I$ and $\operatorname{Tor}_1^A(A/I, M) = 0$.

3. For each $n \ge 0$, $M_n = M/I^{n+1} M$ is flat over $A_n = A/I^{n+1}$.

4. In the notations of 3., $M_0$ is $A_0$-flat and the natural $\operatorname{gr}_I A$-module surjection
 * $\operatorname{gr}_I A \otimes_{A_0} M_0 \to \operatorname{gr}_I M$

is an isomorphism; i.e., each $I^n/I^{n+1} \otimes_{A_0} M_0 \to I^nM /I^{n+1} M$ is an isomorphism.

The assumption that “A is a Noetherian ring” is used to invoke the Artin–Rees lemma and can be weakened; see

Proof
Following SGA 1, Exposé IV, we first prove a few lemmas, which are interesting themselves. (See also this blog post by Akhil Mathew for a proof of a special case.)

Proof: The equivalence of the first two can be seen by studying the Tor spectral sequence. Here is a direct proof: if 1. is valid and $$N \hookrightarrow N'$$ is an injection of $$B$$-modules with cokernel C, then, as A-modules,
 * $$\operatorname{Tor}^A_1(C, M) = 0 \to N \otimes_A M \to N' \otimes_A M$$.

Since $$N \otimes_A M \simeq N \otimes_B (B \otimes_A N)$$ and the same for $$N'$$, this proves 2. Conversely, considering $$0 \to R \to F \to X \to 0$$ where F is B-free, we get:
 * $$\operatorname{Tor}^A_1(F, M) = 0 \to \operatorname{Tor}^A_1(X, M) \to R \otimes_A M \to F \otimes_A M$$.

Here, the last map is injective by flatness and that gives us 1. To see the "Moreover" part, if 1. is valid, then $$\operatorname{Tor}_1^A(I^n X/I^{n+1}X, M) = 0$$ and so
 * $$\operatorname{Tor}_1^A(I^{n+1} X, M) \to \operatorname{Tor}_1^A(I^n X, M) \to 0.$$

By descending induction, this implies 3. The converse is trivial. $$\square$$

Proof: The assumption implies that $$I^n \otimes M = I^n M$$ and so, since tensor product commutes with base extension,
 * $$\operatorname{gr}_I(A) \otimes_{A_0} M_0 = \oplus_0^{\infty} (I^n)_0 \otimes_{A_0} M_0 = \oplus_0^{\infty} (I^n \otimes_A M)_0 = \oplus_0^{\infty} (I^n M)_0 = \operatorname{gr}_I M$$.

For the second part, let $$\alpha_i$$ denote the exact sequence $$0 \to \operatorname{Tor}_1^A(A/I^i, M) \to I^i \otimes M \to I^i M \to 0$$ and $$\gamma_i: 0 \to 0 \to I^i/I^{i+1} \otimes M \overset{\simeq} \to I^i M/I^{i+1} M \to 0$$. Consider the exact sequence of complexes:
 * $$\alpha_{i+1} \to \alpha_i \to \gamma_i.$$

Then $$\operatorname{Tor}_1^A(A/I^i, M) = 0, i > 0$$ (it is so for large $$i$$ and then use descending induction). 3. of Lemma 1 then implies that $$M$$ is flat. $$\square$$

Proof of the main statement.

$$2. \Rightarrow 1.$$: If $$I$$ is nilpotent, then, by Lemma 1, $$\operatorname{Tor}_1^A(-, M) = 0$$ and $$M$$ is flat over $$A$$. Thus, assume that the first assumption is valid. Let $$\mathfrak{a} \subset A$$ be an ideal and we shall show $$\mathfrak{a} \otimes M \to M$$ is injective. For an integer $$k > 0$$, consider the exact sequence
 * $$0 \to \mathfrak{a}/(I^k \cap \mathfrak{a}) \to A/I^k \to A/(\mathfrak{a} + I^k) \to 0.$$

Since $$\operatorname{Tor}_1^A(A/(\mathfrak{a} + I^k), M) = 0$$ by Lemma 1 (note $$I^k$$ kills $$A/(\mathfrak{a} + I^k)$$), tensoring the above with $$M$$, we get:
 * $$0 \to \mathfrak{a}/(I^k \cap \mathfrak{a}) \otimes M \to A/I^k \otimes M = M/I^k M$$.

Tensoring $$M$$ with $$0 \to I^k \cap \mathfrak{a} \to \mathfrak{a} \to \mathfrak{a}/(I^k \cap \mathfrak{a}) \to 0$$, we also have:
 * $$(I^k \cap \mathfrak{a}) \otimes M \overset{f}\to \mathfrak{a} \otimes M \overset{g}\to \mathfrak{a}/(I^k \cap \mathfrak{a}) \otimes M \to 0.$$

We combine the two to get the exact sequence:
 * $$(I^k \cap \mathfrak{a}) \otimes M \overset{f}\to \mathfrak{a} \otimes M \overset{g'}\to M/I^k M.$$

Now, if $$x$$ is in the kernel of $$\mathfrak{a} \otimes M \to M$$, then, a fortiori, $$x$$ is in $$\operatorname{ker}(g') = \operatorname{im}(f) = (I^k \cap \mathfrak{a}) \otimes M$$. By the Artin–Rees lemma, given $$n > 0$$, we can find $$k > 0$$ such that $$I^k \cap \mathfrak{a} \subset I^n \mathfrak{a}$$. Since $$\cap_{n \ge 1} I^n(\mathfrak{a} \otimes M) = 0$$, we conclude $$x = 0$$.

$$1. \Rightarrow 4.$$ follows from Lemma 2.

$$4. \Rightarrow 3.$$: Since $$(A_n)_0 = A_0$$, the condition 4. is still valid with $$M, A$$ replaced by $$M_n, A_n$$. Then Lemma 2 says that $$M_n$$ is flat over $$A_n$$.

$$3. \Rightarrow 2.$$ Tensoring $$0 \to I \to A \to A/I \to 0$$ with M, we see $$\operatorname{Tor}_1^A(A/I, M)$$ is the kernel of $$I \otimes M \to M$$. Thus, the implication is established by an argument similar to that of $$2. \Rightarrow 1.$$$$\square$$

Application: characterization of an étale morphism
The local criterion can be used to prove the following:

Proof: Assume that $$\widehat{\mathcal{O}_{y, Y}} \to \widehat{\mathcal{O}_{x, X}}$$ is an isomorphism and we show f is étale. First, since $$\mathcal{O}_x \to \widehat{\mathcal{O}_x}$$ is faithfully flat (in particular is a pure subring), we have:
 * $$\mathfrak{m}_y \mathcal{O}_x = \mathfrak{m}_y \widehat{\mathcal{O}_x} \cap \mathcal{O}_x = \widehat{\mathfrak{m}_y} \widehat{\mathcal{O}_x} \cap \mathcal{O}_x = \widehat{\mathfrak{m}_x} \cap \mathcal{O}_x = \mathfrak{m}_x$$.

Hence, $$f$$ is unramified (separability is trivial). Now, that $$\mathcal{O}_y \to \mathcal{O}_x$$ is flat follows from (1) the assumption that the induced map on completion is flat and (2) the fact that flatness descends under faithfully flat base change (it shouldn’t be hard to make sense of (2)).

Next, we show the converse: by the local criterion, for each n, the natural map $$\mathfrak{m}_y^n/\mathfrak{m}_y^{n+1} \to \mathfrak{m}_x^n/\mathfrak{m}_x^{n+1}$$ is an isomorphism. By induction and the five lemma, this implies $$\mathcal{O}_y/\mathfrak{m}_y^n \to \mathcal{O}_x/\mathfrak{m}_x^n$$ is an isomorphism for each n. Passing to limit, we get the asserted isomorphism. $$\square$$

Mumford’s Red Book gives an extrinsic proof of the above fact (Ch. III, § 5, Theorem 3).

Miracle flatness theorem
B. Conrad calls the next theorem the miracle flatness theorem. $$