Inverse limit of $\mathbb{Z}/n\mathbb{Z}$ 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.
 A: For $k\in\mathbf{N}^{*}$ I note $k = \prod_{p\in\mathscr{P}} p^{v_p(k)}$ the unique decomposition of $k$ in product of prime numbers. Then you have by the chinese reminder theorem, and as a product is a special kind of projective limit and as projective limits commute (i.e., can be interverted) : $$\varprojlim_{n\geq 1} \mathbf{Z} / n \mathbf{Z} \simeq \varprojlim_{l\geq 1} \mathbf{Z} / l! \mathbf{Z} \simeq \varprojlim_{l\geq 1} \prod_{p\in\mathscr{P}} \mathbf{Z} / p^{v_p(l!)} \mathbf{Z} \simeq \prod_{p\in\mathscr{P}} \varprojlim_{l\geq 1} \mathbf{Z} / p^{v_p(l!)} \mathbf{Z} \simeq \prod_{p\in\mathscr{P}} \varprojlim_{n\geq 1} \mathbf{Z} / p^n \mathbf{Z} \simeq \prod_{p\in\mathscr{P}} \mathbf{Z}_p. $$ Only two of the previous isomorphisms are still not justified, namely $$\varprojlim_{n\geq 1} \mathbf{Z} / n \mathbf{Z} \simeq \varprojlim_{l\geq 1} \mathbf{Z} / l! \mathbf{Z}$$ and for a fixed $p\in \mathscr{P}$ you have $$ \varprojlim_{l\geq 1} \mathbf{Z} / p^{v_p(l!)} \mathbf{Z}\simeq \varprojlim_{n\geq 1} \mathbf{Z} / p^n \mathbf{Z},$$ and this is the non-trivial part. So, why have we these isomorphism ? A pedantic (but right) way to say this being that cofinal projective limits are isomorphic, i.e., that is, that if projective system $(A_i,f_{i,j})$ with indexes in $I$ has a limit, then for any cofinal part subset $J\subseteq I$, the projective system $(A_i,f_{i,j})$ with indexes in $J$ has a limit, isomorphic to the one of $(A_i,f_{i,j})$. I won't give details about cofinality here for limits (projective or inductive), as you will easily find notes/references about this alone. I will just show that the set of indexes $I = \mathbf{N}^{*}$ in the left projective limit has a very nice cofinal (for the divisibility relation) subset $J$, namely : $J = \{n!\;|\;n\in\mathbf{N}^{*}\}$, as for each integer $n\geq 1$ there exist a $l!$ such that $n$ divides $l!$. STILL EDITING
Alternatively, you could try to construct a compatible system of morphisms $$\prod_{p\in\mathscr{P}} \mathbf{Z}_p \to \mathbf{Z} / n \mathbf{Z},$$ and show that $\prod_{p\in\mathscr{P}} \mathbf{Z}_p$ endowed with this system of compatible morphism satisfies the same universal property that $\varprojlim_{n\geq 1} \mathbf{Z} / n \mathbf{Z}$ satisfies, showing thereby the existence of a unique isomorphism of ring between them.
Or you can guess and come up with the following isomorphism from $\varprojlim_{n\geq 1} \mathbf{Z}/n\mathbf{Z}$ to $\prod_{p\in\mathscr{P}} \varprojlim_{n\geq 1} \mathbf{Z} / p^n \mathbf{Z}$ sending a compatible sequence $(x_n)_{n\geq 1}$ to the family $(y_p)_{p\in\mathscr{P}}$ of compatible sequences $y_p$ defined by $y_p = (\varphi_{n,k}(x_n))_{p|n,k\geq 1}$ where $\varphi_{n,k}$ is the canonical morphism $\mathbf{Z}/n\mathbf{Z} \to \mathbf{Z}/p^k\mathbf{Z}$.
A: For each $n\in\mathbf{N}^{*}$ we note $\pi_n : \mathbf{Z} \to \mathbf{Z} / n \mathbf{Z}$ the canonical surjective morphism. If $n,m\in\mathbf{N}^{*}$ are integers such that $m|n$ we have $n \mathbf{Z} \subseteq m \mathbf{Z}$ so that we can define a canonical morphism $\varphi_{n,m} : \mathbf{Z} / n \mathbf{Z} \to \mathbf{Z} / m \mathbf{Z}$ sending the class modulo $n$ of an integer $x$ to the class modulo $m$ of $x$, and this morphism is obviously surjective. The morphism $\varphi_{n,m}$ is the only ring morphism such that $\varphi_{n,m} \circ \pi_n = \pi_m$. (This relation implies the surjectivity of $\varphi_{n,m}$, as $\pi_m$ is surjective.)
Let $\mathscr{P}$ be the set of positive prime numbers, and $p\in\mathscr{P}$. Armed with the previous notations, for $n\in\mathbf{N}^{*}$ we set $\pi_n^p := \pi_{p^n}$ and for $n,m\in\mathbf{N}^{*}$ such that $n\geq m$ we set $\varphi_{n,m}^p := \varphi_{p^m,p^n}$.
One easily verifies that $\left( \mathbf{Z} / n \mathbf{Z}, \varphi_{n,m} \right)$ is a projective system indexed by the partially ordered set $(\mathbf{N}^{*}, |)$. A projective limit of this projective system is a ring $A$ endowed with compatible morphisms $p_n : A \to \mathbf{Z} / n \mathbf{Z}$ (that is, morphisms $p_n : A \to \mathbf{Z} / n \mathbf{Z}$ such that for each integers $n,m\in\mathbf{N}^{*}$ such that $m|n$ we have $p_m = \varphi_{n,m} \circ p_n$) and verifying the following universal property : for each ring $B$ equipped with compatible morphisms $q_n : B \to \mathbf{Z} / n \mathbf{Z}$, there exist a unique morphism $g : B\to A$ such that for each $n\in\mathbf{N}^{*}$ we have $q_n = p_n \circ g$ (one say that $g$ is compatible). One verifies immediately that if such an $A$ does exist, it is unique up to unique compatible isomorphism, in which case it is noted $$\varprojlim_{n\in\mathbf{N}^{*}} \left( \mathbf{Z} / n \mathbf{Z}, \varphi_{n,m} \right).$$
One can verify that the ring defined by $$ \widehat{\mathbf{Z}} = \{(x_n)_{n\in\mathbf{N}^{*}}\;|\;\forall n\in\mathbf{N}^{*},x_n\in\mathbf{Z} / n \mathbf{Z}\textrm{ and }\forall n,m\in\mathbf{N}^{*}, (n|m)\Rightarrow (x_m = \varphi_{n,m}(x_n))\}$$ with obvious projections "to the $n$-th coordinate" $p_n : \widehat{\mathbf{Z}} \to \mathbf{Z} / n \mathbf{Z}$ satisfies the previous universal property, so that $$\widehat{\mathbf{Z}} = \varprojlim_{n\in\mathbf{N}^{*}} \left( \mathbf{Z} / n \mathbf{Z}, \varphi_{n,m} \right).$$ To show that a ring is isomorphic to $\widehat{\mathbf{Z}}$ it is necessary and sufficient to exhibit compatible projections and to show that the ring verifies the aforementioned universal property. This will be our strategy later below.
If $p\in\mathscr{P}$ we also easily verify that $\left( \mathbf{Z} / p^n \mathbf{Z}, \varphi_{n,m}^p \right)$ is a projective system indexed by the totally ordered ordered set $(\mathbf{N}^{*}, \leq)$ and that the projective limit $$\varprojlim_{n\in\mathbf{N}^{*}} \left( \mathbf{Z} / p^n \mathbf{Z}, \varphi_{n,m}^p \right)$$ of this system is described by $$ \mathbf{Z}_p = \{(x_n)_{n\in\mathbf{N}^{*}}\;|\;\forall n\in\mathbf{N}^{*},x_n\in\mathbf{Z} / p^n \mathbf{Z}\textrm{ and }\forall n,m\in\mathbf{N}^{*}, (n\geq m)\Rightarrow (x_m = \varphi_{n,m}^p (x_n))\},$$ whose projections ($n$-th coordinate map) $\mathbf{Z}_p \to \mathbf{Z} / p^n \mathbf{Z}$ will be noted $\varepsilon_n^p$. (I let you define the correct universal property in this cases.)
For $n\in\mathbf{N}^{*}$ we note $n = \prod_{p\in \mathscr{P}, p|n} p^{v_p (n)}$ the unique (up to permutations of the factors) decomposition of $n$ as product of prime numbers, and we note $$f_n : \mathbf{Z} / n\mathbf{Z} \to \prod_{p\in \mathscr{P}, p|n} \mathbf{Z} / p^{v_p (n)} \mathbf{Z}$$ the isomorphism given by the chinese reminder theorem, sending an element $x\in \mathbf{Z} / n\mathbf{Z}$ to $(\varphi_{n,p^{v_p(n)}} (x))_{p\in \mathscr{P}, p|n}$, and whose inverse is given by Bézout's theorem.
Consider the ring $A = \prod_{p\in \mathscr{P}} \mathbf{Z}_p$, that we want to show being isomorphic to $\widehat{\mathbf{Z}}$. For this, we will first start by defining compatible morphisms $q_n : A \to \mathbf{Z} / n \mathbf{Z}$. So fix an $n\in\mathbf{N}^{*}$. Take $y = (y_p)_{p\in \mathscr{P}} \in A$. Then obviously $$\left( \varepsilon_{p^{v_p(n)}}^p (y_p)\right)_{p\in \mathscr{P}, p|n} \in \prod_{p\in \mathscr{P}, p|n} \mathbf{Z} / p^{v_p (n)} \mathbf{Z} $$ so that the previous chinese reminder gives us $$ q_n(y) := f_n^{-1} \left( \left( \varepsilon_{p^{v_p(n)}}^p (y_p)\right)_{p\in \mathscr{P}, p|n} \right) \in \mathbf{Z} / n\mathbf{Z}$$ which defines the morphisms $q_n : A \to \mathbf{Z} / n \mathbf{Z}$, whose compatibility is obvious.
To finish, we have to show that $A$ verifies the universal property. So let $B$ be a ring equipped with compatible morphisms $r_n : B \to \mathbf{Z} / n \mathbf{Z}$ and let's show there exists a unique morphism $g : B\to A$ such that for each $n\in\mathbf{N}^{*}$ we have $r_n = r_n \circ g$. Let $b\in B$. For each prime $p\in\mathscr{P}$ set $x_p (b) := (r_{p^n}(b))_{n\in\mathbf{N}^{*}}$. As the $r_n : B \to \mathbf{Z} / n \mathbf{Z}$'s are compatible the element $x_p$ is indeed and element of $\mathbf{Z}_p$. Then we set $g(b) := (x_p (b))_{p\in\mathscr{P}} \in A$. We easily verify that $g$ is a morphism, and that for each $n\in\mathbf{N}^{*}$ we have $r_n = r_n \circ g$, and that $g$ is the only one with this property. This finally shows that $$ \prod_{p\in \mathscr{P}} \mathbf{Z}_p \simeq \widehat{\mathbf{Z}}$$ as projective limits of the system $\left( \mathbf{Z} / n \mathbf{Z}, \varphi_{n,m} \right)$.
A: 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$.
