Projective modules over polynomial rings Let $M$ be a finitely generated right module over a polynomial ring $R$ (in any number of variables) over a field $\mathbb F$. Given a maximal ideal $\mathfrak{m}$ of $R$, consider $\frac{R}{\mathfrak{m}}$ as a natural right $R$-module. 
If the dimension of $M \otimes_R \frac{R}{\mathfrak{m}}$ over $\mathbb F$ is independent of the maximal ideal $\mathfrak{m}$, then $M$ is projective?
I have seen this argument many times and I don't know why it is true (or even if some hypothesis are being forgotten).
__ The field $\mathbb F$ can be assumed algebraically closed.
 A: Let $R, M$ be as in the answer of Andrew. Let $n$ be the (constant) rank of $R_\mathfrak p/\mathfrak pR_\mathfrak p$ for all prime ideals $\mathfrak p$ of $R$. 
Fix any $\mathfrak p$. By Nakayama's lemma, $M_\mathfrak p$ is generated by $n$ elements $x_1,\cdots, x_n\in M$. Writing the elements of a generating system of $M$ as linear combinations of the $x_i$'s with coefficients in $R_\mathfrak p$, we find an $f\in R\setminus \mathfrak p$ such that $M_f$ is generated by $x_1,\cdots, x_n$. This implies that we can cover $\mathrm{Spec}(R)$ by various Zariski open subsets $D(f)$ such that $M_f$ is generated by $n$ elements. 
Let's show that $M_f$ is free of rank $n$. For simplicity, we replace $R, M$ by $R_f, M_f$. Let $R^n\to M$ be a surjective linear map with kernel $N$. For any $\mathfrak p$, the induced map 
$$(R_\mathfrak p/\mathfrak pR_\mathfrak p)^n\to M_\mathfrak p/\mathfrak pM_\mathfrak p$$
is surjective, hence bijective. This implies that $N_\mathfrak p\subseteq (\mathfrak p R_\mathfrak p)^n$ and $N\subseteq (\mathfrak p )^n$. By Krull's intersection theorem, and because $R$ is reduced, we get $N=0$ and $R^n\simeq M$. 
In particular, $M$ is a flat and finite generated module over $R$. When $R$ is noetherian, it is known thant $M$ is then projective. Otherwise the same result holds if $M$ is finitely presented. 
To return to your case where $R$ is a finitely generated algebra over an  algebraically closed   field $F$, the methods works with the following two observations: (1) $M\otimes_R R/\mathfrak m=M_\mathfrak m/\mathfrak mR_{\mathfrak m}$ and $R/\mathfrak m=F$; (2) By Hilbert's Nullstellensatz, the intersection of all maximal ideals is $0$ (because $R$ is reduced).
A: A version of this is actually Exercise 20.13 of Eisenbud. We only need to assume that $R$ is reduced (and commutative with unit). Then it is true, for a finitely generated $R$-module $M,$ that $M$ is projective of constant rank iff the number $\dim_{R_p/pR_p}\left(M_p/pM_p\right)$ is constant on primes $p\subseteq R.$ There is a hint to this problem, and I haven't worked it out yet, so hopefully it's helpful enough to just point you in the right direction for now.
