Equivalence between the structure theorems of finite abelian groups I want to show that the primary decomposition and the invariant factor decomposition of finite abelian groups are equivalent. What I mean by this is that, given a finite abelian group $G$ is isomorphic to
$$\mathbb{Z}_{p_1^{k_1}}\oplus\dots\oplus\mathbb{Z}_{p_r^{k_r}},$$
where $r\in\mathbb{N}$ and every $p_i^{k_i}$ is the power of a prime (not necessarily different powers of primes), then $G$ is isomorphic to
$$\mathbb{Z}_{n_1}\oplus\ldots\oplus\mathbb{Z}_{n_u},$$
where $u\in\mathbb{N}$ and $n_i|n_{i+1}$ for every $i=1,\ldots,u-1$ and vice versa.
I read that this can be done using the Chinese remainder theorem, since this implies that $\mathbb{Z}_{ab}\cong\mathbb{Z}_a\bigoplus\mathbb{Z}_b$ iff $a$ and $b$ are coprime, but I can't seem to figger out how.
 A: Prove it by induction on the number of direct summands in the first decomposition. The result is trivially true if this is $0$.
Let $p_1, p_2, \ldots, p_s$ be the distinct primes dividing the group order (note that this is different from your notation). For each $p_i$, let $p_i^{k_i}$ be the highest power of $p_i$ that occurs as a summand ${\mathbb Z}_{p_i^{k_i}}$ in your first decomposition.  Let $m = p_1^{k_1} \cdots p_s^{k_s}$.
Then, letting $H$ be the sum of the remaining summands, we have $$G \cong H \oplus {\mathbb Z}_{p_1^{k_1}}  \oplus \cdots \oplus {\mathbb Z}_{p_s^{k_s}} \cong H \oplus {\mathbb Z}_m.$$
Now the result follows by applying induction to $H$, observing that the orders of all summands of $H$ divide $m$.
A: Okay, I think I might have come up with an answer for atleast one implication thanks to the examples at https://math.stackexchange.com/a/1874240/589 and https://math.stackexchange.com/a/2823996/589 .
Suppose a finite abelian group $G$ is indeed isomorphic to
$$\bigoplus_{i=1}^r\mathbb{Z}_{p_i^{k_i}}$$
One has to order the powers of the primes $p_i^{k_i}$ in increasing order. Then take the smallest one, say $p_a^{k_a}$ for some $a\in\{1,\ldots,r\}$ and all of its multiples in the list of powers of primes, $p_{a_1}^{k_{a_1}},\ldots,p_{a_\alpha}^{k_{a_\alpha}}$ with $\alpha\in\mathbb{N}$. This way $p_a^{k_a}|p_{a_1}^{k_{a_1}},\ldots,p_{a_\alpha}^{k_{a_\alpha}}$.
Now take the second smallest power of a prime from the list that is not a multiple of the previously taken smallest powers of primes, for now only $p_a^{k_a}$, say $p_b^{k_b}$ for some $b\in\{1,\ldots,r\}$ and again all of its multiples from the list, $p_{b_1}^{k_{b_1}},\ldots,p_{b_\beta}^{k_{b_\beta}}$ with $\beta\in\mathbb{N}$.
We keep repeating this procedure until all the powers of primes are ordered in this specific way. Now, place each collection in the row of a 'table' such that they are right aligned:
\begin{align*}
p_a^{k_a} \qquad &p_{a_1}^{k_{a_1}} \qquad p_{a_2}^{k_{a_2}} \ldots \space p_{a_\alpha}^{k_{a_\alpha}}\\
&p_b^{k_b} \qquad p_{b_1}^{k_{b_1}} \ldots \space p_{b_\beta}^{k_{b_\beta}}\\
&\ldots\ldots
\end{align*}
Now multiply each column and denote each product $P(a), P(a_1),\ldots,P(a_\alpha)$, referring to what column the product was made of. This way the gcd of all the terms in each of the products is 1 and $P(a)|P(a_1)|\ldots|P(a_\alpha)$. Now the Chinese remainder theorem come into play. This theorem implies that $\mathbb{Z}_{jk}\cong\mathbb{Z}_j\oplus\mathbb{Z}_k$ iff gcd$(j,k)=1$. Hence $\mathbb{Z}_{P(a_i)}\cong\mathbb{Z}_{p_{a_1}^{k_{a_1}}}\oplus\mathbb{Z}_{p_b^{k_b}}\oplus\ldots$ (a direct sum of cyclic groups, each with order equal to a term of the product $P(a_i)$) with $i=1,\ldots,\alpha$.
This means we finally have
$$\bigoplus_{i=1}^r\mathbb{Z}_{p_i^{k_i}}\cong\mathbb{Z}_{P(a)}\oplus\mathbb{Z}_{P(a_1)}\oplus\ldots\oplus\mathbb{Z}_{P(a_\alpha)},$$
where $P(a)|P(a_1)$ and $P(a_i)|P(a_{i+1})$ with $i=1,\ldots,\alpha-1$.
This is the best I could explain my method. I hope this is clear. If you have any comment feel free to leave it here.
