Abelian Group of Prime-power Order is Product of Cyclic Groups

Lemma
Let $G$ be an abelian group of prime-power order.

Let $a$ be an element of maximal order in $G$.

Then $G$ can be written in the form $\left \langle {a} \right \rangle \times K$.

Proof
Denote $\left|{G}\right| = p^n$ and induct on $n$.

For $n=1$, then $G = \langle a \rangle \times \langle e \rangle$.

Now we assume the lemma is true for all Abelian groups of order $p^k$, where $k < n$.

For an element $a \in G$ with maximal order $p^m, x^{p^m} = e \forall x \in G$.

We can assume $G \ne \langle a \rangle$, for then there is nothing to prove.

Choose $b \in G$ such that $b \notin \langle a \rangle$.

The claim is that $\langle a \rangle \cap \langle b \rangle = \left\{ e \right\}$.

Clearly, this would be established if $\left|{b}\right| = p$.

Since $\left| {b^p}\right| = \frac {\left|{b}\right|} p$, we know that $b^p \in \langle a \rangle$ by the manner in which b was chosen.

Say $b^p = a^i$.

Note that $e = b^{p^m} = \left({b^p}\right)^{p^{m-1}} = \left({a^i}\right)^{p^{m-1}}$, so $\left|a^i\right|\le p^{m-1}$.

Hence $a^i$ is not a generator of $\langle a \rangle$ and therefore $gcd \left\{{p^m, i}\right\} \ne 1$.

This proves that $p$ divides $i$, so that we can write $i=pj$.

Then $b^p = a^i = a^{pj}$.

Consider that element $c = a^{-j} b$.

This element $c$ is not in $\langle a \rangle$, for if it were, $b$ would be, too.

Also, $c^p = a^{-jp} b^p = a^{-i}b^p = b^{-p}b^p = e$.

Hence $c$ is an element of order $p$ such that $c \notin \langle a \rangle$.

Since $b$ was chosen to have smallest order such that $b \notin \langle a \rangle$, we conclude $b$ also has order $p$, and the claim is verified.

Now consider the factor group $\bar{G} = G / \langle b \rangle$.

Let $\bar{x}$ denote the coset $x \langle b \rangle$ in G.

If $\left|\bar{a}\right| < \left|a\right| = p^m$, then $\bar{a}^{p^{m-1}} = \bar{e}$.

This means $\left({a \langle b \rangle}\right)^{p^{m-1}} = a^{p^{m-1}} \langle b \rangle = \langle b \rangle$, so that $a^{p^{m-1}} \in \langle a \rangle \cap \langle b \rangle = \left\{{e}\right\}$, contradicting the fact that $\left|a\right| = p^m$.

Thus, $\left|\bar{a}\right| = \left|a\right| = p^m$, and therefore $\bar{a}$ is an element of maximal order in $\bar{G}$.

By induction, we know that $\bar{G}$ can be written in the form $\langle \bar{a} \rangle \times \bar{K}$ for some subgroup $\bar{K}$ of $\bar{G}$.

Let $K$ be the pullback of $\bar{K}$ under the natural homomorphism from $G$ to $\bar{G}$, specifically, $K = \left\{{x \in G : \bar{x} \in \bar{K}}\right\}$.

The claim is that $\langle a \rangle \cap K = \left\{{e}\right\}$.

For if $x \in \langle a \rangle \cap K$, then $\bar{x} \in \langle \bar{a} \rangle \cap \bar{K} = \left\{{\bar{e}}\right\} = \langle b \rangle$ and $x \in \langle a \rangle \cap \langle b \rangle = \left\{ e \right\}$.

It now follows from an order argument that $G = \langle a \rangle K$, and therefore $G = \langle a \rangle \times K$.