[proofplan]
View the finite abelian [group](/page/Group) $A$ as a [module](/page/Module) over $\mathbb{Z}$ by repeated addition. Since $A$ is finite, this $\mathbb{Z}$-module is finitely generated, and since $\mathbb{Z}$ is a [Euclidean domain](/page/Euclidean%20Domain), the [Structure Theorem for Finitely Generated Modules over Euclidean Domains](/theorems/857) applies. The structure theorem gives invariant factors together with a possible free summand; finiteness of $A$ forces the free summand to vanish. Finally, the uniqueness of the invariant factors is exactly the uniqueness part of the structure theorem, equivalently the uniqueness of Smith normal form up to associates.
[/proofplan]
[step:Give $A$ its natural $\mathbb{Z}$-module structure]
Write the abelian group operation on $A$ additively. Define scalar multiplication $\mathbb{Z} \times A \to A$ by
\begin{align*}
n \cdot a &:= \underbrace{a + \cdots + a}_{n \text{ terms}}
\end{align*}
for $n \geq 1$, by $0 \cdot a := 0_A$, and by $(-n) \cdot a := -(n \cdot a)$ for $n \geq 1$. Because the group operation on $A$ is associative, commutative, and has inverses, these operations satisfy the module axioms over $\mathbb{Z}$. Thus $A$ is a $\mathbb{Z}$-module.
[guided]
We write the abelian group operation on $A$ additively because a module structure over $\mathbb{Z}$ is naturally expressed by repeated addition. For $a \in A$, define the scalar action of an integer $n \in \mathbb{Z}$ by
\begin{align*}
n \cdot a &:= \underbrace{a + \cdots + a}_{n \text{ terms}}
\end{align*}
when $n \geq 1$, by $0 \cdot a := 0_A$, and by $(-n) \cdot a := -(n \cdot a)$ when $n \geq 1$.
The identities
\begin{align*}
(m+n)\cdot a &= m\cdot a + n\cdot a, \\
m\cdot(a+b) &= m\cdot a + m\cdot b, \\
(mn)\cdot a &= m\cdot(n\cdot a), \\
1\cdot a &= a
\end{align*}
follow directly from associativity, commutativity, and inverses in the abelian group $A$. Therefore this action makes $A$ into a $\mathbb{Z}$-module.
[/guided]
[/step]
[step:Verify the hypotheses of the structure theorem over $\mathbb{Z}$]
The [ring](/page/Ring) $\mathbb{Z}$ is a [Euclidean domain](/page/Euclidean%20Domain) with Euclidean function $\varphi: \mathbb{Z} \setminus \{0\} \to \mathbb{N}$ defined by $\varphi(n) := |n|$. Since $A$ is finite, the finite set $A$ itself generates $A$ as a $\mathbb{Z}$-module: every element $a \in A$ is equal to $1 \cdot a$. Hence $A$ is a finitely generated $\mathbb{Z}$-module. Therefore the hypotheses of the structure theorem apply to $A$ with base ring $\mathbb{Z}$.
[/step]
[step:Apply the structure theorem to obtain invariant factors and a free summand]
By the structure theorem, there exist integers $r,s \geq 0$ and integers $d_1,\ldots,d_r \geq 2$ satisfying
\begin{align*}
d_1 \mid d_2 \mid \cdots \mid d_r
\end{align*}
such that, as $\mathbb{Z}$-modules,
\begin{align*}
A \cong \mathbb{Z}/(d_1) \oplus \mathbb{Z}/(d_2) \oplus \cdots \oplus \mathbb{Z}/(d_r) \oplus \mathbb{Z}^s.
\end{align*}
Here $(d_i)$ denotes the ideal of $\mathbb{Z}$ generated by $d_i$, and $\mathbb{Z}^s$ denotes the direct sum of $s$ copies of $\mathbb{Z}$.
[guided]
The structure theorem applies because the preceding step verified both required hypotheses: the base ring $\mathbb{Z}$ is Euclidean, and the module $A$ is finitely generated over $\mathbb{Z}$. It therefore decomposes $A$ into cyclic torsion summands and a free summand. Concretely, there exist integers $r,s \geq 0$ and integers $d_1,\ldots,d_r \geq 2$ such that
\begin{align*}
d_1 \mid d_2 \mid \cdots \mid d_r
\end{align*}
and
\begin{align*}
A \cong \mathbb{Z}/(d_1) \oplus \mathbb{Z}/(d_2) \oplus \cdots \oplus \mathbb{Z}/(d_r) \oplus \mathbb{Z}^s.
\end{align*}
The divisibility chain is the invariant-factor condition supplied by the theorem. The integer $s$ is the rank of the free part, while each quotient $\mathbb{Z}/(d_i)$ is a torsion cyclic $\mathbb{Z}$-module.
[/guided]
[/step]
[step:Use finiteness of $A$ to eliminate the free summand]
We claim that $s=0$. If $s \geq 1$, then $\mathbb{Z}^s$ is infinite, and hence
\begin{align*}
\mathbb{Z}/(d_1) \oplus \cdots \oplus \mathbb{Z}/(d_r) \oplus \mathbb{Z}^s
\end{align*}
is infinite. This contradicts the fact that it is isomorphic to the finite group $A$. Therefore $s=0$, and
\begin{align*}
A \cong \mathbb{Z}/(d_1) \oplus \mathbb{Z}/(d_2) \oplus \cdots \oplus \mathbb{Z}/(d_r).
\end{align*}
[guided]
The only possible obstruction to the desired finite product of cyclic groups is the free summand $\mathbb{Z}^s$. We show it cannot occur. If $s \geq 1$, then the map $\mathbb{Z} \to \mathbb{Z}^s$ given by
\begin{align*}
n &\mapsto (n,0,\ldots,0)
\end{align*}
is injective, so $\mathbb{Z}^s$ is infinite. A direct sum containing an infinite direct summand is infinite, so
\begin{align*}
\mathbb{Z}/(d_1) \oplus \cdots \oplus \mathbb{Z}/(d_r) \oplus \mathbb{Z}^s
\end{align*}
would be infinite. But this group is isomorphic to $A$, and $A$ is finite by hypothesis. This contradiction forces $s=0$. Thus the structure theorem reduces to
\begin{align*}
A \cong \mathbb{Z}/(d_1) \oplus \mathbb{Z}/(d_2) \oplus \cdots \oplus \mathbb{Z}/(d_r).
\end{align*}
[/guided]
[/step]
[step:Identify the quotient modules with cyclic groups]
For each $i \in \{1,\ldots,r\}$, the additive group of $\mathbb{Z}/(d_i)$ is cyclic of order $d_i$, generated by the residue class $1+(d_i)$. Hence, as abelian groups,
\begin{align*}
\mathbb{Z}/(d_i) \cong C_{d_i}.
\end{align*}
Replacing each quotient summand by the corresponding cyclic group gives
\begin{align*}
A \cong C_{d_1} \times C_{d_2} \times \cdots \times C_{d_r}.
\end{align*}
The divisibility relation
\begin{align*}
d_1 \mid d_2 \mid \cdots \mid d_r
\end{align*}
is the same invariant-factor divisibility relation obtained from the structure theorem.
[/step]
[step:Deduce uniqueness from invariant-factor uniqueness]
The same structure theorem asserts uniqueness of the invariant factors. Equivalently, in the proof of that theorem, the invariant factors are obtained from the Smith normal form of a presentation matrix over $\mathbb{Z}$, and Smith normal form is unique up to multiplication of the diagonal entries by associates. The only associates in $\mathbb{Z}$ are $\pm 1$, and the representatives $d_i \geq 2$ are chosen positive, so the integers $d_1,\ldots,d_r$ are uniquely determined by $A$.
[/step]