I want to prove that if R is a PID and M is a finitely generated R-module, then there exist a free R- module F such that
$M \cong F \oplus M_{\text{tors}}$
So, in order to prove the above I set $M/M_{\text{tors}} = F$ and since R is a PID then it is also an integral domain, hence $M/M_{\text{tors}}$ is torsion free, ie F is torsion free. Also, since M is finitely generated the same goes for F, so we have that F is torsion free and finitely generated, hence F is a free R-module. Now, I don't know why, but I am stuck. How to conclude that there is indeed the isomorphism between M and $F \oplus M_{\text{tors}}$? Any help would be very much appreciated.