Decomposition of finite abelian $p$-group into cyclic groups is unique. "Simpler" proof?

Theorem. Let $$G, G'$$ be isomorphic finite abelian $$p$$-groups. Suppose $$G=A_1 \times \cdots \times A_k, \ G'=B_1 \times \cdots \times B_s$$ where $$A_i$$ and $$B_i$$ are cyclic groups of order (resp.) $$p^{n_i}$$ and $$p^{h_i}$$, $$n_1 \ge \cdots \ge n_k>0$$ and $$h_1 \ge \dots \ge h_s > 0 \:$$. Then $$k=s$$ and $$A_i \cong B_i$$ for $$i=1,\dots, k$$.

All the proofs I have seen of this theorem seem overly technical. They first prove that if two finite abelian groups are isomorphic, then the number of invariants is the same, by confronting the order of the groups $$G(p)=\{x^p=e \mid x \in G\}$$ and $$G'(p)$$ (defined analogously). Then they assume there is a $$t$$ such that $$n_t > h_t$$ (w.l.o.g.) and derive a contradiction by considering the groups $$H= \{ x^{p^{h_t}} \mid x \in G\}$$ and $$H'= \{ x^{p^{h_t}} \mid x \in G'\}$$, which are isomorphic and therefore should have the same number of invariants, but don't.

So I was wondering if I could prove it like this instead (I am omitting some steps to make it easier to read):

Proof. Assume w.l.o.g. that $$k\le s$$. I'm going to prove that $$A_i \cong B_i$$ for $$i=1,\dots,k \:$$ by induction on $$i$$. Since $$p^{n_1}$$ is the greatest order of any element in $$G$$, it must be the greatest order of any element in $$G'$$ as well, so $$B_1$$ must have order $$p^{n_1}$$. [For if $$o(B_1)< p^{n_1}$$ then no element in $$G'$$ has order $$p^{n_1}$$, whereas if $$o(B_1)> p^{n_1}$$ then there is an element in $$G$$ of order $$>p^{n_1}$$, both contradictions.]. Since they are cyclic of the same order, we conclude $$A_1 \cong B_1$$. This proves the base case.

Now assume the statement holds for all $$i, i.e. $$A_i \cong B_i$$ for all $$i. It is easy to show that $$G/(A_1 \times \cdots \times A_{d-1}) \cong A_d \times \cdots \times A_k$$ and analogously for $$G'$$. Since the quotient groups of respectively isomorphic groups are isomorphic, we have $$H=A_d \times \cdots \times A_k \cong B_d \times \cdots \times B_k \times \dots \times B_s=H'$$ But now we can apply the same reasoning used in the first part of this proof to show that $$A_d\cong B_d$$. The induction is complete, so we get that $$A_i \cong B_i$$ for $$i=1,\dots,k \:$$. The fact that $$A_d \times \cdots \times A_k \cong A_d \times \cdots \times A_k \times B_{k+1} \times \dots \times B_s$$ forces $$k=s$$, because the $$B_i$$'s aren't trivial by definition. $$\square$$

This proof is far more intuitive to me. I fail to see an equivalence between this proof and the "standard" proofs which I have sketched above.

Let $$G=A_1\times ....\times A_k$$ and $$G'=B_1\times... \times B_s$$ as defined in the question.
Claim $$1$$: First we prove that $$k=s$$. Clearly an isomorphism preserves the order. The solution of the equation $$x^p=1$$ in $$G$$ has $$p^k$$ solutions and $$p^s$$ solutions in $$G'$$. Thus, $$k=s$$, as desired. (According to your notation, we used the fact that $$|G(p)|=|G'(p)|$$.)
Claim $$2$$: $$n_i=h_i$$ for $$1\leq i \leq k.$$ We proceed by induction on $$|G|$$. $$G/G(p)=\overline A_1\times....\times\overline A_{k'}.$$ $$G'/G'(p)=\overline B_1\times....\times\overline B_{s'}.$$
Where $$|\overline A_i|=p^{n_i-1}$$ and $$|\overline B_i|=p^{h_i-1}$$. Then we get that $$n_i=h_i$$ for $$i\leq k'$$ by induction. Note that $$k'$$ might be smaller than $$k$$ as some of the factors might be of order $$p$$ and they might be vanished in the quotient. Since both $$s=k$$ and $$s'=k'$$ by claim $$1$$, we get that $$n_i=h_i=p$$ for $$i>k'$$.
• Thank you. It is indeed cleaner. The use of subgroups such as $G(p)$, which contain elements of all the cyclic groups in the factorization, is inevitably neater. I should just get used to them. Jul 10 '19 at 23:09