How can I prove $ \ \bigcap_p \mathbb{Z}_p=\mathbb{Z}$? p-adic numbers
How can I  prove  $ \ \bigcap_p \mathbb{Z}_p=\mathbb{Z}, \ $ where $\mathbb{Z}_p$ is the ring of p-adic integer.
We have information from definition of projective or inverse limit that $\mathbb{Z}_p=\lim_{n} \mathbb{Z}/p^n$.
Also we know that each $\mathbb{Z}_p$ contains $\mathbb{Z}$ since it is a completion of $\mathbb{Z}$.
Also we  have the natural maps $\mathbb{Z} \to \mathbb{Z}_p$ and $ p^n \mathbb{Z} \to p^n\mathbb{Z}_p$ which give rise to the natural map $\mathbb{Z}/p^n\mathbb{Z} \to \mathbb{Z}_p/p^n \mathbb{Z}_p$.
How does these informations helps us to prove the above result?
 A: Even though there is wide agreement about how $p$-adic integers behave, this agreement does not extend to how they are represented in set theory. There are several possible constructions which all produce isomorphic rings -- each author chooses one of them and then feels justified in calling the thing he has defined the $p$-adic integers. This usually doesn't produce a problem because the results are indeed isomorphic -- but it does matter for something like $\bigcap_p \mathbb Z_p$ which doesn't depend only on the internal structure of each $\mathbb Z_p$.


*

*You could define $\mathbb Z_p$ as the $p$-adic metric completion of $\mathbb Z$. Then by definition every $\mathbb Z_p$ would contain $\mathbb Z$ as a subset -- but what else they have in common depends on exactly how you construct "the completion", which is often only defined up to isomorphism by a universal property.
If you construct the completion by taking equivalence classes of Cauchy sequences, we run into a problem that becomes a common theme below -- namely that even though each ordinary integer has a sequence that represents it canonically in each of the $\mathbb Z_p$s, the equivalence classes that contain this canonical representative are not the same in different $\mathbb Z_p$s. The actual set-theoretic intersection becomes empty in that case.

*Another common definition of a more algebraic slant is as an inverse limit:

A $p$-adic integer is a function $f$ with domain $\mathbb N_+$ such that for each $n$ we have $f(n)\in \mathbb Z/p^n\mathbb Z$, and additionally (... the $f(n)$s agree in some appropriate way ...)

Unfortunately, this doesn't resolve our question, because it now depends on, for example, what the intersection of $\mathbb Z/p\mathbb Z$ and $\mathbb Z/q\mathbb Z$ is. And there's a similar problem in defining the set-theoretic identity of those rings. Algebraists hugely prefer to let the elements of $\mathbb Z/p\mathbb Z$ be equivalence classes, and if we use that definition we get
$ \bigcap_p Z_p = \varnothing $
because there is no possible $f(1)$ that is at the same time an equivalence class modulo $p$ and an equivalence class modulo $q$ for $p\ne q$.

*On the other hand, people who want a more elementary (programmer-like) understanding of things might want to define the integers modulo $p^n$ as the set $\{0,1,\ldots,p^n-1\}$ with particular addition and multiplication operations on it. In that case the sequences
$$ (0,0,0,\ldots) \qquad\text{and}\qquad (1,1,1,\ldots) $$
would be elements of every $\mathbb Z_p$, but nothing else would. So then we'd have $\bigcap_p\mathbb Z_p = \{0,1\}$.

*We could also fuse the inverse limit construction with the construcion of modular arithmetic and define something like

A $p$-adic pre-integer is a function $f:\mathbb N_+ \to \mathbb Z$ such that $f(n)\equiv f(n+1) \pmod{p^n}$ for all $n$.
A $p$-adic integer is an equivalence class of $p$-adic pre-integers under such-and-such equivalence relation.

The goal of this might be to produce a clearer embedding of $\mathbb Z$ -- but it's actually not really an improvement for our purposes here. Even though we now seem to have $\mathbb Z$ embedded in $\bigcap_p\mathbb Z_p$ in the form of the constant sequences, that is only a representatives. The actual equivalence classes that encode the integers in each $\mathbb Z_p$ are still all different, so we still get $\bigcap_p\mathbb Z_p=\varnothing$.

*Finally we could take a completely programmer-centric approach and define

A $p$-adic integer is any function $f:\mathbb N_+ \to \{0,1,\ldots,p-1\}$.

where the $f(n)$s are single digits and we then define addition and multiplication by the obvious generalization of the grade-school digit-by-digit operations for $\mathbb Z$ in base $p$.
Now $\bigcap_p \mathbb Z_p$ consists of all infinite sequences of $\{0,1\}$ -- but in a way that is algebraically completely unsatisfying, because each such sequence behaves differently for different $p$s -- except for $(0,0,0,\ldots)$ and $(1,0,0,\ldots)$ which consistently represent $0$ and $1$.

*I think there are also more esoteric constructions that would work, such as constructing $\mathbb Z_p$ as the quotient $\mathbb Z[[X]]/\langle X-p\rangle$ where $\mathbb Z[[X]]$ is the ring of formal power series with integer coefficients. Again this would lead to $\bigcap_p \mathbb Z_p$ being empty because none of the equivalence classes agree.
Now, for each of the above definitions we could "cheat" and explicitly rename the elements that correspond to ordinary integers, such that they are represented by the elements of our usual $\mathbb Z$. Then we indeed get $\bigcap_p \mathbb Z_p= \mathbb Z$, but a priori that is more a feature of the cheating we did to define $\mathbb Z_p$.
One might be able to find a precise sense in which $\mathbb Z$ is the largest ring that embeds in all the $\mathbb Z_p$ in a "sufficiently nice" way -- but that is something quite different from a set-theoretic intersection. (Though I suppose one could co-opt the $\bigcap$ symbol with a category-theoretic meaning that produces this outcome).
A: I don't think you need to use any maps or heavy machinery, just work from the definitions:
Clearly $\mathbb{Z} \subseteq \bigcap_{p}\mathbb{Z}_p$ because any integer is also a p-adic integer.
For $q = \frac{a}{b} \in \mathbb{Z}_p$, $gcd(b,p)=1$. 
Therefore if $b$ is coprime to all primes $p$, indeed it is $1$. Therefore $q$ is an integer and you have the other inclusion. 
