TITLE: Elements in $\hat{\mathbb{Z}}$, the profinite completion of the integers
QUESTION [30 upvotes]: Let $\hat{\mathbb{Z}}$ be the profinite completion of $\mathbb{Z}$. Since $\hat{\mathbb{Z}}$ is the inverse limit of the rings $\mathbb{Z}/n\mathbb{Z}$, it's a subgroup of $\prod_n \mathbb{Z}/n\mathbb{Z}$. So we can represent elements in $\hat{\mathbb{Z}}$ as a subset of all possible tuples $(k_1,k_2,k_3,k_4,k_5,...)$, where each $k_n$ is an element in $\mathbb{Z}/n\mathbb{Z}$. The precise subset of such tuples which corresponds to $\hat{\mathbb{Z}}$ is given by the usual definition of the inverse limit.
There is a canonical injective homomorphism $\eta: \mathbb{Z} \to \hat{\mathbb{Z}}$, such that to each $z \in \mathbb{Z}$ corresponds the tuple $\text{(z mod 1, z mod 2, z mod 3, ...)}$. However, it is well known that this homomorphism is not surjective, meaning there exist elements in $\hat{\mathbb{Z}}$ which do not correspond to anything in $\mathbb{Z}$.
Does anyone know how to explicitly construct an example of such an element in $\hat{\mathbb{Z}}$, which isn't in the image of the homomorphism $\eta$, and to represent it as a tuple as outlined above?

REPLY [28 votes]: The Chinese Remainder Theorem tells you that if $n=\prod_pp^{e(p)}$, where the product is taken over only finitely many primes, and each $p$ appears to the power $e(p)$ in $n$, Then $\mathbb Z/n\mathbb Z$ is isomorphic to $\bigoplus(\mathbb Z/p^{e(p)}\mathbb Z)$. This direct sum is also direct product, and when you take the projective limit, everything in sight lines up correctly, and you get this wonderful result:
$$
\projlim_n\>\mathbb Z/n\mathbb Z\cong\prod_p\left(\projlim_m\mathbb Z/p^m\mathbb Z\right)\cong\prod_p\mathbb Z_p\>.
$$
Thus to hold and admire a non-$\mathbb Z$ element of $\hat{\mathbb Z}$, all you need is any old collection of $p$-adic integers.
Given the isomorphism $\hat{\mathbb Z}\cong\prod_p\mathbb Z_p$, because the operations addition and multiplication go componentwise, $\hat{\mathbb Z}$ must have lots of zero divisors. E.g. if $e_2 := (1,0,0,...)\ne 0$ with the $1$ in $\mathbb Z_2$ and $e_3 := (0,1,0,...) \ne 0$ with the $1$ in $\mathbb Z_3$ then $e_2\cdot e_3 = (1\cdot 0,0\cdot 1,0\cdot 0,...)=0\in \mathbb Z$. Of course, $e_2$ and $e_3$ cannot be members of $\mathbb Z$, because the latter does not contain zero divisors (and both cannot be "finite").
@Mike Battaglia: To your question as of Dec 12 '12 at 7:30, it seems to me that two isomorhisms are mixed up: first the isomorhism $\hat{\mathbb Z}\cong\prod_{p\in\mathbb P}\mathbb Z_p$, where you can freely chose 2-adic, 3-adic etc numbers and build a profinite integer being congruent to all these freely chosen components, and second the inclusion $\hat{\mathbb Z}\subset\prod_{n\in\mathbb N}\mathbb Z/n\mathbb Z$, where you have in addition to observe the compatibility conditions as you mention them: $\mathbb Z/6\mathbb Z\to \mathbb Z/2\mathbb Z$. – Herbert Eberle