Finitely generated projective modules are locally free Let $A$ be a commutative noetherian ring, and let $M$ be a finitely generated projective $A$-module. It is well known and easy to prove that $M$ is locally free in the sense that for every $p \in\operatorname{Spec} A$, the module $M_p$ is a free $A_p$-module.
Is it true that projectives are also locally free in the following (more geometric?) sense:

There are elements $f_1,\dots,f_n \in A$ such that $(f_1,\dots,f_n) = 1$, and such that $M_{f_i}$ is a free $A_{f_i}$-module for all $1\le i \le n$.

Is this true? if so, can you provide a reference or explain how to prove it?
Thanks!
 A: For future reference, I have written up a constructive and reasonably self-contained, if somewhat dense, proof (one page). The basic idea is to first verify that idempotent matrices over local rings are equivalent to diagonal matrices with entries $1$ and $0$, thus showing that finitely generated projective modules over local rings are free.
A: This answer shows that if its stalk $M_\mathfrak{p}$ at $\mathfrak{p}$ is free, then there is an open neighbourhood $\mathfrak{p}\in D(f)$ on which its value $M_f$ is also free.
Proof: Reduce to the case that the natural map $M\to M_\mathfrak{p}$ is an injection by localising some $f_0\in A$. Now use the basis of $M_\mathfrak{p}$ to give a surjection $\alpha:A^n\to M$ whose localisation at $\mathfrak{p}$ is the isomorphism $A^n_\mathfrak{p}\to M_\mathfrak{p}$. Thus $\ker \alpha_\mathfrak{p}=0$, so $\ker \alpha_f=0$ for some $f\in A$. Thus $M_f\simeq A^n_f$ is free, completing the proof.
Thus the quasicompact space $\text{Spec}A$ admits a finite cover by $D(f_i)$'s, on each of which $M_{f_i}$ is free. $\text{Spec}A=\cup D(f_i)$ means precisely that $(f_1,...,f_n)=A$.
A: Yes, this is true.  See this Math Overflow question for a precise statement and a reference to its proof in Bourbaki's Commutative Algebra.
This result is also stated in my commutative algebra notes, but the proof is not unfortunately not yet written up there.  I certainly hope that this will be remedied soon though, as I will be teaching a course out of these notes starting on Monday.  When the proof gets written, I will update this answer with a page number.
Added: Here is something in the MO answer that I decided was worth a comment here.  For finitely generated modules, this stronger version of local freeness is actually equivalent to projectivity, whereas the weaker "pointwise local freeness" is subtly weaker in general.
A: I have a somehow naïve idea, that $M_{p}=\mbox{colim}_{f\notin p}M_{f}$. Now choose a basis $x_{i}$ for $M_{p}$ and we may assume $x_{i}\in M$, then they are linear independent over $A$. Then we "consider the distance of $M_{f}$ from being free as $f$ goes to infinity", which is the exact sequence
$$0\rightarrow \bigoplus A_{f}x_{i} \rightarrow M_{f} \rightarrow M_{f}/\bigoplus A_{f}x_{i}\rightarrow 0$$
Taking colimit with $f$ and note that localization and taking colimit are exact,
$$\mbox{colim} M_{f}/\bigoplus A_{f}x_{i}=M_{p}/\bigoplus A_{p}x_{i}=0$$
Hence there exist some $f$, such that $M_{f}/\bigoplus A_{f}x_{i}=0$, provided $M$ is finitely generated. Now for every $p$ there is a distinguished open neighborhood, hence the ideal generated by these $f$'s must be trivial.
