Proof (Chinese remainder theorem in cyclic groups)
Let $C_{mn} = \gen g$. Then $\gen {g^n}\cong C_m$ and $\gen{g^m}\cong C_n$.
We will check the hypothesis of the direct product theorem:
-
Note that $$\begin{align*} g^k \in \gen{g^n} &\iff k = np + (mn)q, &&p,q\in\Z \\ &\iff n | k. \end{align*}$$ Similarly $g^k\in\gen{g^m} \iff m|k$. Therefore $$\begin{align*} g^k \in \gen{g^n}\cap\gen{g^m}&\iff n|k\text{ and } m|k \\ &\iff lcm(n,m) | k \\ &\iff mn|k, &&\text{since }gcd(m,n)=1 \\ &\iff g^k = e, \end{align*}$$ which means that $\gen{g^n}\cap\gen{g^m} = \set e$.
-
$g^{km} g^{ln} = g^{ln} g^{km}$ because cyclic groups are abelian.
-
For all $g^k \in \gen g$, since $gcd(m,n) = 1$, Bezout's theorem gives $p,q\in\Z$ such that $$ k = pm + qn. $$ Thus $$ g^k = (g^m)^p (g^n)^q $$ where $(g^m)^p\in\gen{g^m}$ and $(g^n)^q \in\gen g^n$.