Lemma 37.12.4. Let $f : X \to S$ be a morphism of locally Noetherian schemes. Let $Z \subset S$ be a closed subscheme with $n$th infinitesimal neighbourhood $Z_ n \subset S$. Set $X_ n = Z_ n \times _ S X$. If $X_ n \to Z_ n$ is flat for all $n$, then $f$ is flat at every point of $f^{-1}(Z)$.

Proof. This is a translation of Algebra, Lemma 10.98.11 into the language of schemes. $\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).