Lemma 37.16.7. Let $f : X \to S$ be a morphism of schemes of finite presentation. Let $\mathcal{F}$ be a finitely presented $\mathcal{O}_ X$-module. Let $x \in X$ with image $s \in S$. If $\mathcal{F}$ is flat at $x$ over $S$ and $(\mathcal{F}_ s)_ x$ is a flat $\mathcal{O}_{X_ s, x}$-module, then $\mathcal{F}$ is finite free in a neighbourhood of $x$.

Proof. If $\mathcal{F}_ x \otimes \kappa (x)$ is zero, then $\mathcal{F}_ x = 0$ by Nakayama's lemma (Algebra, Lemma 10.20.1) and hence $\mathcal{F}$ is zero in a neighbourhood of $x$ (Modules, Lemma 17.9.5) and the lemma holds. Thus we may assume $\mathcal{F}_ x \otimes \kappa (x)$ is not zero and we see that Theorem 37.16.2 applies with $f = \text{id} : X \to X$. We conclude that $\mathcal{F}_ x$ is flat over $\mathcal{O}_{X, x}$. Hence $\mathcal{F}_ x$ is free, see Algebra, Lemma 10.78.5 for example. Choose an open neighbourhood $x \in U \subset X$ and sections $s_1, \ldots , s_ r \in \mathcal{F}(U)$ which map to a basis in $\mathcal{F}_ x$. The corresponding map $\psi : \mathcal{O}_ U^{\oplus r} \to \mathcal{F}|_ U$ is surjective after shrinking $U$ (Modules, Lemma 17.9.5). Then $\mathop{\mathrm{Ker}}(\psi )$ is of finite type (see Modules, Lemma 17.11.3) and $\mathop{\mathrm{Ker}}(\psi )_ x = 0$. Whence after shrinking $U$ once more $\psi$ is an isomorphism. $\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).