I am working on the following problem:
Let $R$ be a principal ideal domain and $R^+$ the field of quotients. Then $R^+$ is an $R$-module. Prove that any finitely generated submodule of $R^+$ is a free module of rank $1$.
The idea I tried:
Suppose that $M=\left<\frac{a_1}{b_1},\frac{a_2}{b_2},...,\frac{a_n}{b_n}\right>$ is a finitely generated $R$-submodule of $R^+$. Let's prove that the elements of the basis are not linearly independent for $n>1$. Indeed take the elements $\frac{a_i}{b_i}$ and $\frac{a_j}{b_j}$. Then for $r=b_i a_j$ and $s=a_i b_j$ we have $r\frac{a_i}{b_i}-s\frac{a_j}{b_j}=0$ which means they are not linearly independent. So $M$ is of rank $1$.
The problem I have is that it looks right to me but I did not use in anyway the fact that $R$ is a PID. Can you tell me where does my reasoning fail?
Another thing I tried was that since $R$ is a PID I could use the fact that any $R$-submodule of $R$ is an ideal in $R$ and since $R$ is a PID it follows. But how to connect the dots from the submodule of $R^+$ to the submodule of $R$?
Let $M$ be a nonzero finitely generated submodule of $R^+$; you can assume a set of generators is $$ \left\{\frac{a_1}{d},\frac{a_2}{d},\dots,\frac{a_n}{d}\right\} $$ by using a common denominator. The $R$-homomorphism $M\to R$ defined by $x\mapsto dx$ is injective, so $M$ is isomorphic to a nonzero ideal of $R$.
(The assumption $M\ne\{0\}$ is of course necessary at the outset.)
As already commented, you can't assume $M$ has a basis to begin with.