Proving that $\mathbb{Z}_m\oplus \mathbb{Z}_n \cong \mathbb{Z}_d\oplus \mathbb{Z}_l $ as groups, where $l=\mathrm{lcm}(m,n)$ and $d=\gcd(m,n)$

How would one go about proving that $\mathbb{Z}_m\oplus \mathbb{Z}_n \cong \mathbb{Z}_d\oplus \mathbb{Z}_l $ as groups, where $l=\mathrm{lcm}(m,n)$ and $d=\gcd(m,n)$?

I am attempting to use the fundamental theorem of finitely generated abelian groups but am struggling. In the interest of honesty, this is a past exam question that I am attempting for which the solutions are not available.
EDIT: As the question was asked in the paper, the Chinese Remainder Theorem would not be permitted since this is only proved in the follow-up course.


Solution 1:

Write $m=dm', n=dn', d=mu+nv$. Then $l=m'n=mn'$.

These row and columns operations prove that $\mathbb{Z}_m\oplus \mathbb{Z}_n \cong \mathbb{Z}_d\oplus \mathbb{Z}_l$: $$ A=\pmatrix{ m & 0 \\ 0 & n} \to \pmatrix{ m & mu \\ 0 & n} \to \pmatrix{ m & mu+nv \\ 0 & n} = \pmatrix{ m & d \\ 0 & n}\\ \to \pmatrix{ 0 & d \\ -m'n & n} = \pmatrix{ 0 & d \\ -l & n} \to \pmatrix{ 0 & d \\ -l & 0} \to \pmatrix{ d & 0 \\ 0 & l}=B $$

An explicit isomorphism can be written by collecting the row and columns operations into two matrices $P,Q$ so that $B=PAQ$: $$ P = \pmatrix{ 1 & 0 \\ -n' & 1} \pmatrix{ 1 & v \\ 0 & 1} =\pmatrix{1 & v \\ -n' & 1 - v n'} \\ Q = \pmatrix{ 1 & u \\ 0 & 1} \pmatrix{ 1 & 0 \\ -m' & 1} \pmatrix{ 0 & -1 \\ 1 & 0} = \pmatrix{u & -1 + u m' \\ 1 & m'} $$

If $e_1, e_2$ is the canonical basis for $\mathbb Z^2$, then the basis $f_1, f_2$ given by $F=Q^{-1}E$ is such that this diagram commutes: $$ \matrix { \mathbb Z^2 , \{ e_1, e_2\} & \to & \mathbb Z^2, \{ f_1, f_2\} \\ \downarrow & & \downarrow \\ \mathbb{Z}_m\oplus \mathbb{Z}_n & \to & \mathbb{Z}_d\oplus \mathbb{Z}_l } $$

This isomorphism does not use prime factorizations nor explicitly the Chinese Remainder Theorem.

Solution 2:

Let $p_1, \dots, p_n$ be all prime numbers that divide either $m$ or $n$. Suppose $m = p_1^{i_1}\dots p_n^{i_n}$ and $n = p_1^{j_1} \dots p_n^{j_n}$. Now $d = p_1^{\min(i_1,j_1)} \dots p_n^{\min(i_n,j_n)}$ and $l = p_1^{\max(i_1,j_1)} \dots p_n^{\max(i_n,j_n)}$ Now we apply the Chinese remainder theorem, using that powers of distinct primes are coprime $\mathbb{Z}_m \oplus \mathbb{Z}_n \cong \mathbb{Z}_{p_1^{i_1}} \oplus \dots \oplus \mathbb{Z}_{p_n^{i_n}} \oplus \mathbb{Z}_{p_1^{j_1}} \oplus \dots \oplus \mathbb{Z}_{p_n^{j_n}}$

Now we simply rearrange depending on whether $i_k$ or $j_k$ is bigger: $\cong \mathbb{Z}_{p_1^{\min(i_1,j_1)}} \oplus \dots \oplus \mathbb{Z}_{p_n^{\min(i_n,j_n)}} \oplus \mathbb{Z}_{p_1^{\max(i_1,j_1)}} \oplus \dots \oplus \mathbb{Z}_{p_n^{\max(i_n,j_n)}} \cong \mathbb{Z}_d \oplus \mathbb{Z}_l$

In the last step we used the Chinese remainder theorem again.