2 Answers
2

As the notation in the above link, suppose $M$ is a finite generated projective module over $R$, then, first pick a minimal number of generators, i.e., $M=Rm_1+\cdots +Rm_k$, and $k$ is the minimal number with this property, so we get a decomposition

$$R^k=M\oplus N,$$ then, we are left to prove $N=0$.

First, applying $R/I\otimes-$, where $I$ is the unique maximal ideal in $R$, then we get $$(R/I)^k=M/IM\oplus N/IN,$$ and note that $M/IM$, $N/IN$ are vector spaces over the field $R/I$, so by comparing the dimension, we get $N/IN=0$, i.e., $N=IN$, then,
we use the Nakayama's lemma, the Statement 1 in the above link, we get $r\in 1+I$, such that $rN=0$, but $r\not \in I$ and $R$ is local implies $r$ is a unit, so $N=0$.

Remarks. 1) To get the choice of $k$, we can first assume $k=\dim_{R/I}(M/IM)$, then use the Statement 4 in the above link to lift the basis of $M/IM$ to get a minimal set of generators of $M$.

2) A deep theorem of Kaplansky says that any projective modules (not necessarily finitely generated) over a local ring is free.

I was wondering why $N$ is finitely generated... I was thinking about this for more than a day.... Now i got it, direct summand of a finitely generated module is finitely generated and that is why $N$ is finitely generated... I thought i should write that here so it may be of use to some one...
–
Praphulla KoushikJul 25 at 13:01

For a PID you are nearly done. Just observe that a projective module has no element of finte order and thus all torsion parts have to vanish.

For local rings this is not trivial and I don't have the time right know to give a full prove. The idea however is to write $$R^n=P\oplus Q$$ for a given projective module $P$ and set $p:R^n\to R^n$ to be the composition