TITLE: flatness condition for local noetherian ring without nilpotent elements
QUESTION [9 upvotes]: In SGA 1, chapter 4, there is a corollary describing a flatness condition for a module of finite type over a local noetherian integral ring.  The corollary is number 4.4, and states:
Suppose that $A$ is a local noetherian integral ring with maximal ideal $I$ and residue field $k = A/I$ and field of fractions $K$.  Let $M$ be a module of finite type over $A$.  Then saying that $M$ is flat (note: SGA actually cites here a previous proposition with equivalent conditions of flatness which in this case is satisfied) is equivalent to saying that $M\otimes_A K$ and $M\otimes_A k$ are vector spaces of the same dimension.
There is a remark immediately following this corollary saying the reader is left to generalize this to the case where $A$ is only assumed to be a ring without nilpotent elements.  How does one show this more general case?

REPLY [4 votes]: For a generalization to arbitrary noetherian reduced rings, see EGA III, 7.6.9. Applied to a projective resolution $P_*\to M$ for a finitely generated $A$-module $M$, it says in particular that $d(x)\colon x\mapsto\dim_{k(x)}(M\otimes k(x))$ is semi-continuous on $\mathrm{Spec}(A)$, and $M$ is flat iff $d$ is locally constant. The statement in SGA is a special case since semi-continuity together with $\dim_K(M\otimes K)=\dim_k(M\otimes k)$ already implies that $d$ is constant. A more elementary statement can be found in Mumford's treatment of semi-continuity in his Abelian Varieties (Lemma 1 in section II.5).