I want to show that $X^n-1 = \prod_{d|n}{\Phi_d}$, and I found this proof on internet:
$X^n-1=\prod_{k=1}^{n}{(X-e^{i\frac{2k\pi}{n}})}=\prod_{d|n}{\prod_{k=1,gcd(k;n)=d}^{n}{(X-e^{i\frac{2k\pi}{n}})}}=\prod_{d|n}{\Phi_{n/d}}=\prod_{d|n}{\Phi_d}$
What I don't understand :
1) How to split the product in a double one (right hand side of the second equality) and how to justify it.
2) How to pass from $\Phi_{n/d}$ at $\Phi_d$ at the end? Is it beacause there is a bijection $D(n) -> D(n); d -> n/d$ (where $D(n) = \left\{d|n , d\ge0\right\}$)