Lemma 10.79.3. Let $R$ be a ring. Let $\mathfrak p \subset R$ be a prime. Let $M$ be a finitely presented $R$-module. If $M_\mathfrak p$ is free, then there is an $f \in R$, $f \not\in \mathfrak p$ such that $M_ f$ is a free $R_ f$-module.

Proof. Choose a basis $x_1, \ldots , x_ n \in M_\mathfrak p$. We can choose an $f \in R$, $f \not\in \mathfrak p$ such that $x_ i$ is the image of some $y_ i \in M_ f$. After replacing $y_ i$ by $f^ m y_ i$ for $m \gg 0$ we may assume $y_ i \in M$. Namely, this replaces $x_1, \ldots , x_ n$ by $f^ mx_1, \ldots , f^ mx_ n$ which is still a basis as $f$ maps to a unit in $R_\mathfrak p$. Hence we obtain a homomorphism $\varphi = (y_1, \ldots , y_ n) : R^{\oplus n} \to M$ of $R$-modules whose localization at $\mathfrak p$ is an isomorphism. By Lemma 10.79.2 we can find an $f \in R$, $f \not\in \mathfrak p$ such that $\varphi _\mathfrak q$ is an isomorphism for all primes $\mathfrak q \subset R$ with $f \not\in \mathfrak q$. Then it follows from Lemma 10.23.1 that $\varphi _ f$ is an isomorphism and the proof is complete. $\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).