Are we allowed to interchange product and inverse limits?

474 Views Asked by At

Currently, I am trying to show that the profinite completion $\hat{\mathbb{Z}}$ of $\mathbb{Z}$ is isomorphic to $\prod_p \mathbb{Z}_p$ (as topological groups) where $p$ runs through all prime numbers and $\mathbb{Z}_p$ denotes the ring of $p$-adic integers.

By definition, we know that $\hat{\mathbb{Z}}$ is the inverse limit of $\mathbb{Z}/n\mathbb{Z}$ and $\mathbb{Z}_p$ is the inverse limit of $\mathbb{Z}/p^n\mathbb{Z}$. Furthermore, the Chinese Remainder Theorem tells us that if $n = \prod_p p^{e_p(n)}$ denotes the prime factorization of $n$, then we have $$ \mathbb{Z}/n\mathbb{Z} \simeq \prod_p \mathbb{Z}/p^{e_p(n)} \mathbb{Z}.$$

So I would like to show that $$ \hat{\mathbb{Z}} = \varprojlim_n \mathbb{Z}/n\mathbb{Z} \simeq \varprojlim_n \prod_p \mathbb{Z}/p^{e_p(n)} \mathbb{Z} = \prod_p \varprojlim_n \mathbb{Z}/p^{e_p(n)} \mathbb{Z} = \prod_p \varprojlim_n \mathbb{Z}/p^n \mathbb{Z} = \prod_p \mathbb{Z}_p, $$

but I am not sure about these steps, especially with the third and fourth step. Could you please give me an easy explanation whether this works or not? Thank you!