# Question about a projective module in a direct sum

I have a question about my method of proof for proving a simple fact about projective modules. I have a feeling my idea is wrong and I was hoping some one could point out where the mistake is.

Let $R$ be a commutative ring with identity.

Let $P$ be a projective $R$-module. Prove that there exists a free $R$-module $F$ such that $P \oplus F \cong F$.

Sketch of Proof: Since $P$ is projective there exits a free $R$-module $F$ such that $F=P \oplus M$ for some module $M$. Then we can consider the direct sum $P \oplus F \cong P \oplus P \oplus M$. Thus it suffices to check $P \oplus P \cong P$. Is the last isomorphism justifiable because P is projective? Am I on the right track or should I try something else?

-
It is not necessarily true that $P\oplus P\cong P$. For example, take $R=\mathbb{Z}$; then $\mathbb{Z}$ itself is projective over $R$ (since it is free), but it is not true that $\mathbb{Z}\oplus\mathbb{Z}\cong\mathbb{Z}$ as modules. – Arturo Magidin Sep 12 '11 at 4:16
Something of a spoiler: Eilenberg swindle‌​. – Dylan Moreland Sep 12 '11 at 4:18

Take $X$ an infinite set, then $F^{(X)}\cong(P\oplus M)^{(X)}\cong P^{(X)}\oplus M^{(X)}\cong P\oplus P^{(X)}\oplus M^{(X)}\cong P\oplus F^{(X)}$ and $F^{(X)}$ is free.