Minimal generating set of abelian finite group-solution check To begin with, I have seen other solutions of the following question in similar threads but I didn't see any such solution. If there is and I didn't notice it I am sorry.
Question: Let $G$ be a finite abelian group written as
$$G=C_{d_1}\times\dots C_{d_k}$$
where $1\neq d_1|d_2|\dots|d_k$ (I believe the $d_i$s are called invariants of $G$) where $C_{d_i}$ denotes the cyclic group of order $d_i$. Prove that $G$ cannot be generated by less than $k$ elements.
My attempt: Let $p$ be a prime dividing $d_1$. Therefore each $C_{d_i}$ contains an element of order $p$ and $G$ contains $p^k-1$ distinct elements of order​ $p$. Let's​ say that $G$ were generated by $j$ elements, $j<k$. By the fact that $G$ is the image of a free abelian group of dimension $j$, I can write $G$ as
$$G=C_{m_1}\times\dots C_{m_j}$$.
An element of the last product has the form $(a_1,\dots,a_j)$ and its order is the least common multiple of the orders of the $a_i$. Therefore there can be only $p^j-1$ elements of order $p$ contradicting the initial statement.
Is my solution correct?
 A: I think the OP's sketch solution, once the confusion about the  number of elements of order $p$ is cleared up can be made to work.
But here is how I'd write it.
We have
$$G=C_{d_1}\times C_{d_2}\times \dots \times C_{d_k}$$
where 
$$1\not=d_1\ |\ d_2\ |\ \dots \ |\ d_k.$$
Let $p$ be a prime divisor of $d_1$, and consider the set $H$ of elements of order dividing $p$ in $G$. It is then clear that $H$ is a subgroup and consists of the elements
$$
\left\{(a_1,\dots,a_k)\ |\ a_{1}^{p}=a_{2}^{p}=\dots = a_{k}^{p}=1\right\}.
$$
As a cyclic group $C_{pm}$ contains exactly $p$ elements of order dividing $p$ we have that $|H|=p^k$.
Now suppose that $G$ is also the product of $\ell$ cyclic factors. Then the number of elements of order dividing $p$ is, by the same argument $p^{\ell_0}$ for some $\ell_0\leqslant \ell$; possibly smaller because this time we don't have a guarantee that $p$ divides every factor.
Hence we have $\ell_0=k$, and the alternative factorisation has at least as many factors.
