Finitely generaterd torsion-free module over PID 
Let $R$ be a principal ideal domain. Let $M$ be a finitely generated torsion-free $R$-module. Suppose that $S$ is a submodule of $M$ such that rank$(S)=1$ and $M/S$ is a torsion module. Prove that $M$ is a free $R$-module with rank$(M)=1$.

My partial answer: 
Since $M/S$ is a torsion module, we can find $m_0+S \in M/S$ where $m_0 \notin S$  and $r_0 \in R\backslash\{0\}$ such that $r_0(m_0+S)=S$. Hence, $r_0m_0 \in S$. Since $tm_0=0$ only satisfied by $t=0$, then $\{m_0\}$ is linearly independent. It's clear that $\langle\langle m_0 \rangle \rangle \subseteq M$. How to prove the reverse inclusion?
 A: Since $M$ is a finitely genearated module over PID and torsion-free, then $M$ is a free module. Since rank$(S)=1$ then $S\neq \{0\}$, hence $M\neq \{0\}$. Assume contrary that rank$(M) \neq 1$ then we have rank$(M)>1$. Let $B$ be a basis for $M$ with $|B|>1$. Let $b_1,b_2$ be a different element of $B$. Since $b_1+S, b_2+S \in M/S$ then there exist $r_1,r_2 \in R \backslash \{0\}$ such that $r_1(b_1+S)=S$ and $r_2(b_2+S)=S$. Hence, $r_1b_1, r_2b_2 \in S$. Since $M$ is torsion-free, then $r_1b_1\neq 0$ and $r_2b_2\neq 0$. Let $\{s\}$ be a basis of $S$, then there exist $r_1',r_2' \in R \backslash \{0\}$ such that $r_1b_1=r_1's$ and $r_2b_2=r_2's$. Hence, we have $r_2'r_1 \neq 0$ and $-r_1'r_2 \neq 0$ such that $(r_2'r_1)b_1+(-r_1'r_2)b_2=0$, contrary to $B$ is linearly independent. So, rank$(M)=1$.
A: Let $$N=\{m\in M\mid rm\in S\ \text{for some $r\in R, r\neq0$}\}.$$
We were also given that $S$ is free of rank one, so let $s$ be a generator of $S$ as an $R$-module.
Hints (for steps):


*

*Show that $N=M$.

*Let $m_1,m_2,\ldots, m_k$ be generators of $M$. By step 1 there exist some elements $r_i,i=1,2,\ldots,k$ such that $r_im_i\in S$ for $i=1,2,\ldots,k$. Let $I$ be the ideal generated by the elements $r_i$. Show that $I$ is the smallest ideal of $R$ such that $IM\subseteq S$.

*Let 
$$
J=\{r\in R\mid rs\in IM\}.
$$
Check that this is an ideal of $R$ as well.

*Let $i\in I$ and $j\in J$ be generators of the two ideals. Show that there exists an element $m_0\in M$ such that $im_0=js$.

*Show that $m_0$ generates $M$.

