Hi, maybe this is a stupid question, however none of my mathematicians colleagues could answer it properly. It's know that a finitely generated projective $A$-module $M$ is free if $A$ is a local ring. Now, consider an arbitrary finitely generated $A$-module $M$. If you pick all the possibles localizations of $M$, you will get some free $A\_{\mathfrak{p}}$-modules $M\_{\mathfrak{p}}$. In what conditions one can glue (using the Zariski topology) the localizations to get a free module $A$-module $N$ such that $N\_{\mathfrak{p}} = M\_{\mathfrak{p}}$ (if $M = N$, this will be better)? Of course, all the localizations must have the same rank, however I don't know if this is sufficient to produce a free module. I friend of mine said that his advisor researched this question for Von Neumann regular rings (which implies that the space will be Boolean and, then, there is a injection from the global sections into the product of the fibers) and, in some conditions (he doesn't remember), the result will hold. 


Thanks in advance. 



Gluing free modules to get a finitely generated free module
I am assuming your ring is commutative. First of all, there is currently an error in your question, because you neither assume $M$ to be locally free, not projective. Your questions reads: "Now, consider an arbitrary finitely generated $A$-module $M$." My guess is you inadvertedly deleted this assumption when you edited your question, but I suppose $M$ is projective, because that's what you say in your comment. Now, as mentioned by several people in the comments, including myself, if all localizations of $M$ have equal rank $k$, then you can take $N$ to be the free module $A^k$. There is no reason for $M$ itself to be free. In special cases, there are cohomological criteria that if satisfied, will imply $M$ is free.


