Lemma 31.18.7. Let $f : X \to S$ be a morphism of schemes. Let $D \subset X$ be a relative effective Cartier divisor on $X/S$. If $f$ is flat at all points of $X \setminus D$, then $f$ is flat.
Proof. This translates into the following algebra fact: Let $A \to B$ be a ring map and $h \in B$. Assume $h$ is a nonzerodivisor, that $B/hB$ is flat over $A$, and that the localization $B_ h$ is flat over $A$. Then $B$ is flat over $A$. The reason is that we have a short exact sequence
\[ 0 \to B \to B_ h \to \mathop{\mathrm{colim}}\nolimits _ n (1/h^ n)B/B \to 0 \]
and that the second and third terms are flat over $A$, which implies that $B$ is flat over $A$ (see Algebra, Lemma 10.39.13). Note that a filtered colimit of flat modules is flat (see Algebra, Lemma 10.39.3) and that by induction on $n$ each $(1/h^ n)B/B \cong B/h^ nB$ is flat over $A$ since it fits into the short exact sequence
\[ 0 \to B/h^{n - 1}B \xrightarrow {h} B/h^ nB \to B/hB \to 0 \]
Some details omitted. $\square$
Comments (0)