On submodules of finitely generated modules over a PID It is well-known that if $M$ is a finitely generated module over a PID $R$, then
$M\cong R/R{p_1}^{n_1}\oplus \ldots \oplus R/R{p_k}^{n_k}\oplus F$ for some prime element $p_i$ and for some positive integers $n_i$ $(1\leq i\leq k)$ and free $R$-module $F$ finite rank. What is the form of a submodule $N$ of $M$ with respect to this characterization?
 A: A submodule is again a finitely generated module over a PID, hence it is of the form
$N \cong R/q_1^{m_1} \oplus \dotsb \oplus R/q_s^{m_s} \oplus F^\prime$
with $m_i \geq 1$ and $F^\prime$ free.
By tensoring with the quotient field, it is clear that the rank of $F^\prime$ is at most the rank of $F$.
By localizing the injection $N \hookrightarrow M$ at the prime $(q_j)$, we obtain that each $q_j$ occurs within the $p_j$. If not, the right hand side would have killed all torsion, while the left hand side still had torsion.
Thus we can write
$$N \cong R/p_1^{m_1} \oplus \dotsb \oplus R/p_k^{m_k} \oplus F^\prime$$
with $m_i \geq 0$.
By localizing at $(p_i)$ and then passing to the torsion part, we get an injection $R/p_i^{m_i} \hookrightarrow R/p_i^{n_i}$.
In particular $1 \in R/p_i^{m_i}$ is annihilated by $p_i^{n_i}$, hence $p_i^{n_i} \in (p_i^{m_i})$ or equivalently $m_i \leq n_i$.
Summarizing, we get the (intuitively obvious) result, that $N$ is of the form
$$N \cong R/p_1^{m_1} \oplus \dotsb \oplus R/p_k^{m_k} \oplus F^\prime$$
with $0 \leq m_i \leq n_i$ and $\operatorname{rank} F^\prime \leq \operatorname{rank}F$.
