I'm now reading J.Rotman's "A First Course in Abstract Algebra, 3rd edition". I am confused about Proposition2.73 in page 149.
Proposition 2.73. A group $G$ of order $n$ is cyclic if and only if, for each divisor $d$ of $n$, there is at most one cyclic subgroup of order $d$.
Proof.
...(If $G$ is cyclic, proof is obvious, I omit it.)
Conversely, define a relation on a group $G$ by $a\equiv b$ if $\langle a\rangle=\langle b\rangle$. It's easy to see that this is an equivalence relation and that the equivalence class $[a]$ of $a \in G$ consists of all the generators of$C=\langle a\rangle$. Thus, we denote $[a]$ by gen($C$), and $$G=\bigcup_{C\,\,cyclic}{gen\left( C \right)}.$$ Hence, $n=|G|=\sum_C{|gen(C)|}$, where the sum is over all the syclic subgroups of $G$. But Corollary 2.70 gives $|gen(C)|=\phi(C)$ (here $\phi$ is the Euler $\phi$-function). By hypothesis, $G$ has at most one (cyclic) subgroup of any order, so that $$ n= \sum_{C}{|gen(C)|} \leq \sum_{d|n}{\phi(d) = n},$$ the last equality being Corollary 1.28. Therefore, for each divisor $d$ of $n$, there must be a cyclic subgroup $C$ of order $d$ contributing $\phi(d)$ to $\sum_C{gen(C)}$. In particular, there must be a cyclic subgroup $C$ of order $n$, and so $G$ is cyclic. $\blacksquare$
Now, my question is about this line: $$ n= \sum_{C}{|gen(C)|} \leq \sum_{d|n}{\phi(d) = n}.$$ In the hypothesis, it should have no conditions for those orders of subgroup which are not divisors of $n$, then the $\leq$ can only hold if we can prove there is no such $C$ whose order does not divide $n$. Note that $G$ is not assumed cyclic.
So can we prove it or I misunderstood this proposition? Maybe what it really means is that for those non-divisors there isn't any cyclic subgroup.