Ultrafilters on naturals determine p-adic numbers While preparing for a short lecture on ultrafilters for undergraduates, I realized some interesting things I have never read about.
Though I'm asking now a specific question, any reference about this idea is welcome.
Let $\beta(X)$ denote the set of ultrafilters on $X$.
By the principal filters we obtain an embedding $X\hookrightarrow \beta(X)$, so ultrafilters can be regarded as 'generalized elements' joined to our set $X$, as this is often done in topology.
The main observation is, that unary predicates can be perfectly evaluated to ultrafilters themselves (without referring to any ultraproduct or such), as the interpretation of unary predicates are just the subsets of $X$.
For example, every nonprincipal ultrafilter $U$ on $\Bbb N$ satisfies $x>n$ for every fixed $n\in\Bbb N$, by which I simply mean $$\{x\in\Bbb N:x>n\}\ \in\  U\,.$$
Specifically, every ultrafilter $U\in\beta(\Bbb N)$ has a last digit in any number system $n$, in the sense that exactly one of the below sets will belong to $U$: $\ n\Bbb N,\ n\Bbb N+1,\ \dots,\ n\Bbb N+(n-1)$, since their disjoint union is the full set $\Bbb N$.
But this gives rise to a well defined function $\Phi:\beta(\Bbb N)\to\hat{\Bbb Z}=\prod_p\Bbb Z_p$ where $\Bbb Z_p$ denotes the set of $p$-adic integers.
Question: Is $\Phi$ surjective? In particular, does there exist an ultrafilter for every $p$-adic integer?
Attempt. Assume $a\in\Bbb Z_p$ is given. I'd like to define a filter and then extend it to ultrafilter.
$$\mathcal F:=\big\{A\subseteq\Bbb N \mid \forall n\,\exists x\in A: x\equiv a\!\!\!\pmod{p^n}\big\}$$
but the problem is that it's not a filter, though nonempty and increasing system, it's not closed under intersection, because if $a_n$ denotes the last $n$ digits of $a$ modulo $p$, then we can take $A=\{a_n\}\in\mathcal F$ and the disjoint $B=\{p^n+a_n\}\in\mathcal F$.
 A: The set $\beta(\mathbb{N})$ has a natural topology that makes it the Stone-Cech compactification of $\mathbb{N}$, and your map $\Phi$ is just the unique continuous extension of the inclusion map $\mathbb{N}\to\hat{\mathbb{Z}}$.  In particular, since $\Phi$ is continuous, its image is closed in $\hat{\mathbb{Z}}$.  Since $\mathbb{N}$ is dense in $\hat{\mathbb{Z}}$, this implies $\Phi$ is surjective.
Concretely, given $a\in\hat{\mathbb{Z}}$ and nonzero $n\in\mathbb{Z}$, let $X_{a,n}$ be the set of integers that have the same mod $n$ residue as $a$.  For fixed $a$, these sets $X_{a,n}$ generate a proper filter (since $X_{a,n}\cap X_{a,m}=X_{a,\operatorname{lcm}(m,n)}$) which can then be extended to an ultrafilter, and this ultrafilter maps to $a$ under $\Phi$.
A: Suppose that $a=\langle a_n:n\in\Bbb Z^+\rangle\in\prod_{n\in\Bbb Z^+}\Bbb Z/p^n\Bbb Z$ is in $\Bbb Z_p$, i.e., is such that $a_m\equiv a_n\pmod{p^m}$ whenever $m\le n$. For $n\in\Bbb Z^+$ let
$$A_n=\left\{k\in\Bbb Z^+:k\equiv a_n\pmod{p^n}\right\}\,;$$
if $m\le n$, then $A_n\subseteq A_m$, so there is a $\mathscr{U}\in\beta\Bbb N$ such that $A_n\in\mathscr{U}$ for each $n\in\Bbb Z^+$, and clearly $\big(\Phi(\mathscr{U})\big)(p)=a$. Thus, for each prime $p$ and each $p$-adic integer there is an ultrafilter that picks out that $p$-adic integer. (I don’t, however, know whether $\Phi$ is surjective.)
