I am proving the following statement:
Suppose $d|n$, then there are exactly $\phi(d)$ elements of $\Bbb Z_n$ of order $d$.
Here $\phi$ Euler function. I have seen a proof that firstly shows $\lbrace$elements of order $d\rbrace \subseteq \frac{n}{d}\Bbb Z_n\cong\Bbb Z_d$ impliy we only need to consider $n=d$. And then simply proved that there are $\phi(n)$ elements of order $n$ in $\Bbb Z_n$.
So may I please ask why does the fact:
$\lbrace$elements of order $d\rbrace \subseteq \frac{n}{d}\Bbb Z_n\cong\Bbb Z_d$
inplies that we only need to consider the case $n=d$?
Thanks!
Let $S$ be the set of elements of order $d$. As $S\subseteq \frac{n}{d}\mathbb{Z}_n$, the number of elements of order $d$ is equal to the number of elements of order $d$ in $\frac{n}{d}\mathbb{Z}_n$.
If $\phi:\frac{n}{d}\mathbb{Z}_n\to\mathbb{Z}_d$ is an ismorphism then $\phi(x)$ has order $d$ if and only if $x$ has order $d$, so the number of elements of order $d$ in $\frac{n}{d}\mathbb{Z}_n$ is equal to the number of elements of order $d$ in $\mathbb{Z}_d$.
Putting these together, the number of elements of order $d$ in $\mathbb{Z}_n$ is the same as the number of elements of order $d$ in $\mathbb{Z}_d$, so we may as well assume $n=d$.