Suppose that $A$ and $B$ are finitely generated abelian groups (NOT necessarily finite, just finitely generated). And suppose that $A \oplus A \simeq B \oplus B$. I need to prove that $A \simeq B$.
Now, since $A$ and $B$ are finitely generated abelian groups, we have that both $A$ and $B$ have the unique primary decompositions $A \simeq \mathbb{Z}_{p_{1}^{r_{1}}} \oplus\mathbb{Z}_{p_{2}^{r_{2}}} \oplus \cdots \oplus \mathbb{Z}_{p_{k}^{r_{k}}} \oplus \mathbb{Z}^{m} $ and $B \simeq \mathbb{Z}_{q_{1}^{s_{1}}} \oplus\mathbb{Z}_{q_{2}^{s_{2}}} \oplus \cdots \oplus \mathbb{Z}_{q_{l}^{s_{l}}} \oplus \mathbb{Z}^{n}$.
Then, $A \oplus A \simeq B \oplus B$ implies that $(\mathbb{Z}_{p_{1}^{r_{1}}} \oplus\mathbb{Z}_{p_{2}^{r_{2}}} \oplus \cdots \oplus \mathbb{Z}_{p_{k}^{r_{k}}} \oplus \mathbb{Z}^{m}) \oplus (\mathbb{Z}_{p_{1}^{r_{1}}} \oplus\mathbb{Z}_{p_{2}^{r_{2}}} \oplus \cdots \oplus \mathbb{Z}_{p_{k}^{r_{k}}} \oplus \mathbb{Z}^{m}) \simeq (\mathbb{Z}_{q_{1}^{s_{1}}} \oplus\mathbb{Z}_{q_{2}^{s_{2}}} \oplus \cdots \oplus \mathbb{Z}_{q_{l}^{s_{l}}} \oplus \mathbb{Z}^{n})\oplus (\mathbb{Z}_{q_{1}^{s_{1}}} \oplus\mathbb{Z}_{q_{2}^{s_{2}}} \oplus \cdots \oplus \mathbb{Z}_{q_{l}^{s_{l}}} \oplus \mathbb{Z}^{n})$
where $p_{i}$, $q_{i}$ are primes.
Then, where do I go from here?
Note: This question is similar to this one but it is NOT a duplicate because there they are asking specifically for finite abelian groups and I am asking about finitely generated abelian groups. Of course, all finite abelian groups are finitely generated, but there might be nuances involved with finitely generated abelian groups that are not touched upon in the case where the groups are finite, and thus might not be addressed in that answer. Also, in the answer to that question, I do not understand the notation $\mathbb{Z}/p^{n_1}\mathbb{Z} \times \mathbb{Z}/p^{n_2}\mathbb{Z} \times \ldots \mathbb{Z}/p^{n_m}\mathbb{Z}$ where $p$ is prime. If you are going to use that notation in your answer to this question, could you please explain to me what that means?
Also, please be willing to answer LOTS of follow-up questions! I am going to need to be asking them most likely.
Thank you.