TITLE: Inverse limit of $\mathbb{Z}/n\mathbb{Z}$
QUESTION [9 upvotes]: I know that this is well-known fact that
$$\lim\limits_\leftarrow\mathbb{Z}/n\mathbb{Z}=\prod\limits_p\mathbb{Z}_p,$$
however I don't know the rigorous proof of this.
Can anyone give me the explanation?
Thanx.

REPLY [4 votes]: An elegant way to see this using Pontryagin duality. I think that you should be able to fill in the details in the following argument (no part of which is very difficult). 
Let $\mathbf{ProAb}$ be the category of profinite abelian groups and $\mathbf{TorsAb}$ the category of torsion abelian groups with the discrete topology. Consider the functor 
$$\mathbf{ProAb} \to \mathbf{TorsAb}$$
$$ G \mapsto \text{Hom}(G, \mathbb Q/\mathbb Z)$$
here $\text{Hom}$ means continous homomorphisms of topological groups. This functor is an anti-equivalence of categories, with inverse $A \mapsto \text{Hom}(A, \mathbb Q/\mathbb Z)$.
Now, notice that
$$\text{Hom}(\widehat{\mathbb Z}, \mathbb Q/\mathbb Z) = \mathbb Q/\mathbb Z$$
while 
$$\text{Hom}(\prod_p {\mathbb Z_p}, \mathbb Q/\mathbb Z) = \bigoplus_p \mathbb Q_p/\mathbb Z_p.$$
Here $\mathbb Q_p/\mathbb Z_p$ is the subgroup of $p$-power torsion elements in $\mathbb Q/\mathbb Z$.
There is a canonical isomorphism $\mathbb Q/\mathbb Z  = \bigoplus_p \mathbb Q_p/\mathbb Z_p$, which gives the isomorphism $\widehat{\mathbb Z}  = \prod_p \mathbb Z_p$.