Ring Direct Product of Modulo Integers is Isomorphic to Ring Modulo Product iff Coprime

Theorem

Let $m, n \in \Z_{>1}$.

Let $\struct {\Z_m, +_m, \times_m}$ and $\struct {\Z_n, +_n, \times_n}$ be the rings of integers modulo $m$ and $n$ respectively.

Let $\struct {\Z_m \times \Z_n}$ be the direct product of $\Z_m$ and $\Z_n$.

Let $\struct {\Z_{m n}, +_{m n}, \times_{m n} }$ be the ring of integers modulo $mn$.

Then $\struct {\Z_m \times \Z_n}$ is isomorphic to $\struct {\Z_{m n}, +_{m n}, \times_{m n} }$ if and only if $m$ and $n$ are coprime.