symmetric monoidal (∞,1)-category of spectra
For any prime number $p$, the ring of $p$-adic integers $\mathbb{Z}_p$ (which, to avoid possible confusion with the ring $\mathbb{Z}/(p)$ used in modular arithmetic, is also written as $\widehat{\mathbb{Z}}_p$) may be described in one of several ways:
To the person on the street, it may be described as (the ring of) numbers written in base $p$, but allowing infinite expansions to the left. Thus, numbers of the form
where $0 \leq a_n \lt p$, added and multiplied with the usual method of carrying familiar from adding and multiplying ordinary integers.
More abstractly, it is the limit $\underset{\leftarrow}{\lim} \mathbb{Z}/(p^n)$, in the category of (unital) rings, of the diagram
This is also a limit in the category of topological rings, taking the rings in the diagram to have discrete topologies.
Alternatively, it is the metric completion? of the ring of integers $\mathbb{Z}$ with respect to the $p$-adic absolute value. Since addition and multiplication of integers are uniformly continuous with respect to the $p$-adic absolute value, they extend uniquely to a uniformly continuous addition and multiplication on $\mathbb{Z}_p$. Thus $\mathbb{Z}_p$ is a topological ring.
Also $\mathbb{Z}[ [ x ] ]/(x-q)\mathbb{Z}[ [ x ] ]$, see at analytic completion.
Hence one also speaks of the $p$-adic completion of the integers. See completion of a ring (which generalizes 2&3).
The ring of $p$-adic integers has the following properties:
As a topological space, it is compact, Hausdorff, and totally disconnected (i.e., is a Stone space). Moreover, every point is an accumulation point, and there is a countable basis of clopen sets – a Stone space with these properties must be homeomorphic to Cantor space.
As a topological group under addition, it is therefore an almost connected group. As an abelian compact group, it is Pontryagin dual to the Prüfer $p$-group as discrete group.
The profinite completion of the integers is
This is isomorphic to the product of the $p$-adic integers for all $p$
The ring of integral adeles $\mathbb{A}_{\mathbb{Z}}$ is the product of the profinite completion $\widehat{\mathbb{Z}}$ of the integers, example 1, with the real numbers
The group of units of the ring of adeles is called the group of ideles.
The formal spectrum $Spf(\mathbb{Z}_p)$ of $\mathbb{Z}_p$ may be understood as the formal neighbourhood of the point corresponding to the prime $p$ in the prime spectrum $Spec(\mathbb{Z})$ of the integers. The inclusion
is the formal dual of the canonical projection maps $\mathbb{Z}\to \mathbb{Z}_p\to \mathbb{Z}/(p)$.
$p$-adic number, adele.
Introductions and surveys include
Bernard Le Stum, One century of $p$-adic geometry – From Hensel to Berkovich and beyond talk notes, June 2012 (pdf)
Hendrik Lenstra, Profinite groups (pdf)