Let $R$ be a PID and let $p$ be a prime in $R$.
(a) Let $M$ be a finitely generated torsion $R$-module. Use the previous exercise to prove that $p^{k-1}M/p^kM \cong F^{n_k} $ where $F$ is the field $R/(p)$ and $n_k$ is the number of elementary divisors of $M$ which are powers $p^a$ with $a \ge k$.
(b) Suppose $M_1$ and $M_2$ are isomorphic finitely generated torsion $R$-modules. Use (a) to prove that, for every $ k \ge 0$, $M_1$ and $M_2$ have the same number of elementary divisors $p^a$ with $a \ge k$. Prove that this implies $M_1$ and $M_2$ have the same set of elementary divisors.
I am referring to the exercise 12.1.12 of Dummit-Foote book Abstract Algebra. I have proved the part (a) and that $M_1$ and $M_2$ have the same number of elementary divisors with $p^a$ with $a \ge k$.
I have difficulties to prove that $M_1$ and $M_2$ have the same set of elementary divisors.
Can anyone help me...thanks in advance....
You already know the following:
Let's prove that this is enough to conclude that $M_1$ and $M_2$ have the same set of elementary divisors.
Suppose that $p^{k_1}$ is an elementary divisor of $M_1$. First let's assume that $k_1$ is a maximal exponent with this property. Note that $M_2$ has no elementary divisor of the form $p^a$ with $a>k_1$, otherwise $M_1$ would have (at least) one of that form, a contradiction with the maximality of $k_1$. Instead $M_2$ has an elementary divisor of the form $p^{k_1}$, and their number is the same as the one of elementary divisors of the form $p^{k_1}$ in $M_1$.
Now suppose that $p^{k_2}$ is an elementary divisor of $M_1$ with $k_2<k_1$, and there is no other elementary divisor of $M_1$ of the form $p^a$ with $k_2<a<k_1$. (That is, $p^{k_2}$ is the next elementary divisor of $M_1$ less that $p^{k_1}$.) As before one can show that there is no elementary divisor of $M_2$ of the form $p^a$ with $k_2<a<k_1$, but there is at least one of the form $p^{k_2}$, and their number is the same as the one of elementary divisors of the form $p^{k_2}$ in $M_1$.
Continue this way and show that the elementary divisors of the form $p^a$ are the same for both modules. Since $p$ is an arbitrary prime you are done.