Let $X$ be a noetherian scheme and $\mathscr{F}$ a coherent $\mathscr{O}_{X}$-module. For a point $x \in X$, let $k(x)=\mathscr{O}_{X,x}/\mathfrak{m}_{x}$ be the residue field at $x$.
(a) Suppose $x \in X$ is a point such that $\mathscr{F}_{x} \otimes_{\mathscr{O}_{X,x}}k(x)=0$. Show that there exists an open neighborhood $U$ of $x$ such that $\mathscr{F} \mid_{U}=0$.
(b) Suppose $U$ is an open neighborhood of $x$ and $a_{1},...,a_{n} \in \mathscr{F}(U)$ are such that the images $\bar{a}_{1},...,\bar{a}_{n}$ generate $\mathscr{F}_{x} \otimes_{\mathscr{O}_{X,x}}k(x)$. Show that there exists an open neighborhood $U_{0} \subset U$ of $x$ such that $a_{1},...,a_{n}$ generate $\mathscr{F}\mid_{U_{0}}$.
(c) For $x \in X$ define $e(x)=dim_{k(x)}(\mathscr{F}_{x} \otimes_{\mathscr{O}_{X,x}}k(x))$. Show that $e$ is upper semi-continuous, i.e. $\left\{x:e(x)\leq r\right\}$ is open for all $r$.
Initial thoughts: (c) $e(x)$ is simply the minimal number of generators required to generate $\mathscr{F}_{x}$ over $\mathscr{O}_{X,x}$. Suppose that $e(x)=n$ and let $s_{1},...,s_{n}$ be the sections of $\mathscr{F}$ over some neighborhood $U$ of $x$ such that their images in $\mathscr{F}_{x}$ generate $\mathscr{F}_{x}$ over $\mathscr{O}_{X,x}$. Then I thought to define a morphism from $\mathscr{O}_{U}^n \rightarrow \mathscr{F}$ which is given by these sections and then show that the cokernel of this morphism is zero in some neighborhood of $x$. I think this should work.
I came across these various formulations of Nakayama's Lemma in my reading. How might I prove these? Any help would be appreciated!
Let $X$ be an arbitrary locally ringed space and $\mathcal{F}$ be an arbitrary $\mathcal{O}_X$-module of finite type.
(a) Choose some open neighborhood of $x$ on which the restriction of $\mathcal{F}$ is generated by sections $s_1,\dotsc,s_n$. Then $\mathcal{F}_x$ is generated by their stalks $(s_1)_x,\dotsc,(s_n)_x$. Since $\mathcal{F}_x \otimes k(x)=0$, by Nakayama we get $\mathcal{F}_x=0$. In particular, $(s_1)_x=\dotsc=(s_n)_x=0$. It follows that $s_1,\dotsc,s_n$ vanish on some small neighborhood of $x$. Then also $\mathcal{F}$ vanishes there.
(b) Apply (a) to $F|_U / \langle a_1,\dotsc,a_n \rangle$.
(c) Follows immediately from (b).