Elementary divisors of an abelian group From Advanced Modern Algebra (Rotman):

Proposition 4.10 If $G$ is an abelian group and $p$ is prime, then $G/pG$ is a vector space over $\Bbb{F}_p.$
Definition If $p$ is prime and $G$ is a finite $p$-primary abelian group, then $$d(G)=\dim(G/pG).$$
Definition Let $G$ be a finite $p$-primary abelian group, where $p$ is prime. For $n \geq 0$,  define $$U_p(n,G) = d(p^n,G) - d(p^{n+1}, G).$$

The textbook says that when we decompose a finite $p$-primary abelian group into factors, $U_p(n,G)$ will be "the number of cyclic summands having order $p^{n+1}$".

Definition If $G$ is a $p$-primary abelian group, then its elementary divisors are the numbers in the sequence $ U_p(0,G)$ $p'$s, $U_p(1, G)$ $p^2$'s, ... , $U_p(t-1,G)$ $p^t$'s

Then the textbook gives an example: decomposing an abelian group of order $72=2^33^2$.
Basically, you just say $8 = (2)(4) = (2)(2)(2)$ and $(9)=(3)(3)$, and you have the elementary divisors, right? But I don't know how to relate this to the method that Rotman uses.
In other words (for example), we have $U_2(0,G)$ $2$'s, and $U_2(0,G) = \dim(G/2G) - \dim(2G/4G)$.
$\{0+2G, 1+2G\}$ is a basis for $G/2G$, so $\dim(G/2G)=2$
and
$\{0+2G, 2+2G\}$ is a basis for $2G/4G$, so $\dim(2G/4G)=2$, right?
But then $U_2(0,G)=0$???
 A: First we have $G=H\oplus K$ where $|H|=8$ and $|K|=9$. Then apply the Rotman's method to the primary groups  $H$ and $K$.
Addendum: For example, take the group $G={\mathbb Z}_2\oplus {\mathbb Z}_2^2$. For it the elementary divisors are $(2,4)$. We have $G/2G={\mathbb Z}_2, 2G/4G={\mathbb Z}_2$, so $\dim(G/2G)= \dim(2G/4G)=1$ (since a basis for $G/2G$ is $\{1+2G\}$!). This means $U_2(0,G)=U_2(1,G)=1$.
A: I understand that Rotman is using all of this machinery to prove the fundamental theorem of finite abelian groups, but sometimes to understand the intuition, it is best to assume the result of the theorem, and work through a general example.
What I mean is this: let us begin with a finite abelian $p$ primary group $G$, which we 'know' is a product of cyclic groups.  Write $G=\mathbb{Z}_{p^{k_1}}\oplus\ldots\oplus\mathbb{Z}_{p^{k_m}}$, with all $k_i\ge 1$.  Now, multiplication by $p$ will kill off a power of $p$ in each summand, so we have:
$$pG\cong \mathbb{Z}_{p^{k_1-1}}\oplus\ldots\oplus\mathbb{Z}_{p^{k_m-1}}$$
Notice that some of these summands may be trivial (if $k_i=1$), and we are interested in determining the number of them that are, which we'll 'call' $U_p(0,G)$.  The quotient space is:
$$G/pG\cong \underbrace{\mathbb{Z}_{p}\oplus\ldots\oplus\mathbb{Z}_{p}}_{m\text{ times}}$$
Notice this has dimension $m$ as an $\mathbb{F}_p$ vector space, so that $d(G)=m$.  Let's now compute $p^2G$:
$$p^2G\cong \mathbb{Z}_{p^{k_1-2}}\oplus\ldots\oplus\mathbb{Z}_{p^{k_m-2}}$$
Some of these summands may not make sense, specifically those for which $k_i=1$.  For notational purposes, we leave them in the direct sum, understanding that they are just the identity.  For each $k_i=1$, we have, in our notation, $\mathbb{Z}_{p^{k_i-1}}/\mathbb{Z}_{p^{k_i-2}}=\{e\}$.  This means that $d(p,G)$, the dimension of the quotient:
$$pG/p^2G=\underbrace{\mathbb{Z}_p\oplus\ldots\oplus\mathbb{Z}_p}_{D(p,G)\text{ many times}}$$
is exactly $U_p(0,G)$ less than $d(G)$, one for each summand of $G$ with $k_i=1$.  We thus arrive at the formula $U_p(0,G)=d(G)-d(p,G)$.
Now just repeat the argument replacing $G$ with $pG$, and noting that $d(p^n,pG)=d(p^{n+1},G)$ and $U_p(n,pG)=U_p(n+1,G)$.
