11 P-adic numbers

An idea we’ve seen a few times already is that it’s sometimes easiest to attack number-theoretic problems “one prime at a time”. Pursuing this idea a little further leads to the idea of p-adic numbers, which is the last topic we’ll look at in this module.

11.1 Review of metric spaces

For this section, we’ll need a few ideas which you saw in the Calculus II module (also known as Analysis II):

We’ll be interested in the case where \(X\) is also a ring; and we’ll want to consider metrics which “interact nicely” with the ring structure. This leads to the following construction:

Definition 11.1

If \(A\) is a commutative ring, then an absolute value on \(A\) is a map \(|\cdot| : A \to \mathbb{R}\) satisfying the conditions

  1. \(|x| \geqslant 0\) for all \(x,\) with equality if and only if \(x = 0\);

  2. \(|x \cdot y| = |x| \cdot |y|\);

  3. \(|x + y| \leqslant|x| + |y|.\)

If we have the stronger inequality

  1. \(|x + y| \leqslant\max(|x|, |y|)\)

then we say \(|\cdot|\) is non-archimedean.

Clearly if \(|\cdot|\) is an absolute value, then the formula \(d(x, y) = |x - y|\) gives a metric (but not all metrics arise in this way). For instance, the standard metric on \(\mathbb{R}\) is induced by the standard absolute value; this satisfies (c) but not (c’) (it is “Archimedean”).

Exercise 11.2

Show that if an absolute value on \(A\) exists, then \(A\) must be an integral domain.

11.2 The \(p\)-adic metric

Let \(p\) be a prime number.

Definition 11.3

We define the \(p\)-adic absolute value on \(\mathbb{Q}\) by \(|0|_p = 0,\) and for \(x = \frac{r}{s}\) with for integers \(r, s \ne 0,\) then \(|x|_p = p^{\mathop{\mathrm{ord}}_p(s) - \mathop{\mathrm{ord}}_p(r)}.\)

Here \(\mathop{\mathrm{ord}}_p n\) is the highest power of \(p\) dividing \(n,\) as before. Thus \(|p^k|_p = p^{-k}\) for all \(k\); note the sign! So we’ve entered a strange mirror-world where raising \(p\) to a large power gives something small.

Exercise 11.4

Show that \(|\cdot|_p\) is a nonarchimedean absolute value.

The \(p\)-adic metric has some strange properties. For example, if \(x, y, z\) are any three rationals, then at least two of the lengths \(|x - y|_p, |y - z|_p, |x - z|_p\) are equal to each other. That is, in the \(p\)-adic world, every triangle is an isosceles triangle! (Exercise: Prove this.)

Remark 11.5

There is a notion of “equivalence” of absolute values: the absolute values \(|\cdot|\) and \(|\cdot|'\) are equivalent if there is a real number \(e > 0\) such that \(|x|' = |x|^e\) for all \(e.\) Equivalent absolute values make the same sequences Cauchy, and induce the same topology.

Ostrowski’s theorem shows that any absolute value on \(\mathbb{Q}\) is equivalent to precisely one of the following:

  • the standard absolute value inherited from \(\mathbb{R},\)

  • the \(p\)-adic absolute value for some prime \(p,\)

  • the trivial absolute value with \(|x| = 1\) for all \(x \ne 0.\)

11.3 Building the completion

It turns out that \(\mathbb{Q}\) is not complete in the \(p\)-adic metric (more generally, a countable metric space with no isolated points cannot be complete). See Gouvea’s book for an explicit construction of a Cauchy sequence which doesn’t converge (using Proposition 6.2).

We’ll now show that there is a canonical way of “completing” it: embedding \(\mathbb{Q}\) into a larger field in which any Cauchy sequence for the \(p\)-adic metric has a unique limit, just like any Cauchy sequence in \(\mathbb{Q}\) for the usual metric has a limit in \(\mathbb{R}.\) (We’ll skip several proofs here; you can look them up in Gouvea’s book if you want to see the proofs, but you don’t need to know them for the exam.)

Definition 11.6

Let \(\mathcal{C}\) denote the set of sequences \((x_n)_{n \in \mathbb{N}}\) of rational numbers which are Cauchy sequences for the \(p\)-adic metric.

Notice that we can embed \(\mathbb{Q}\) into \(\mathcal{C}\) via \(x \mapsto (x, x, x, \dots).\) We can also make \(\mathcal{R}\) into a ring with the obvious termwise ring operations, so \((x_0, x_1, \dots) + (y_0, y_1, \dots) = (x_0 + y_0, x_1 + y_1, \dots)\) and similarly for multiplication.

Exercise 11.7

Check that the sum and product of Cauchy sequences is Cauchy, so this is well-defined.

Definition 11.8

We write \(\mathcal{N} \subset \mathcal{C}\) for the set of Cauchy sequences tending to 0.

Proposition 11.9

The set \(\mathcal{N}\) is an ideal of \(\mathcal{C}.\)

Proof. It is easy to check that the sum of two sequences tending to 0 tends to 0, so it is a subgroup under addition. To show it is closed under multiplication, let \((x_n) \in \mathcal{N}\) and let \((y_n)\) be any Cauchy sequence; then we can find a \(B\) such that \(|y_n|_p \leqslant B\) for all sufficiently large \(n,\) so \(|x_n y_n|_p \leqslant B |x_n|_p,\) and for large enough \(n\) this can be made arbitrarily small.

Definition 11.10

We define \(\mathbb{Q}_p\) as the quotient ring \(\mathcal{C} / \mathcal{N}.\)

Proposition 11.11

\(\mathbb{Q}_p\) is a field.

Proof. What we need to show is the following: if \((x_n)_{n \in \mathbb{N}}\) is a Cauchy sequence which does not tend to 0, then we can find another Cauchy sequence \((y_n)_{n \in \mathbb{N}}\) such that \(x_n y_n - 1 \in \mathcal{N}.\)

One can show that the sequence \((x_n)\) is eventually bounded away from 0; that is, we can find a \(c > 0\) and \(N \in \mathbb{N}\) such that \(|x_n|_p \geqslant c\) for all \(n \geqslant N.\) (This is a nice exercise, using the fact that \((x_n)\) is a Cauchy sequence and doesn’t tend to 0.) In particular, \(x_n \ne 0\) for all \(n \geqslant N.\)

Let’s define the sequence \(y_n\) by \(y_n = 0\) if \(x_n = 0,\) and \(y_n = 1/x_n\) otherwise. Then \(y_n\) is Cauchy, since for any \(m, n \geqslant N\) we have \[|y_m - y_n|_p = \frac{|x_m - x_n|_p}{|x_m x_n|_p} \leqslant\tfrac{1}{c^2} |x_m - x_n|_p,\] so the Cauchy property for \((y_n)\) follows from that for \((x_n).\) So \((y_n) \in \mathcal{C}.\) Moreover, \(x_n y_n - 1\) is a sequence which eventually consists entirely of zeros, so it’s certainly tending to 0.

The composite \(\mathbb{Q}\to \mathcal{C} \to \mathcal{C} / \mathcal{N}\) is injective, since \((x, x, x, \dots) \notin \mathcal{N}\) if \(x \ne 0.\) So we can identify \(\mathbb{Q}\) with a subfield of \(\mathbb{Q}_p.\) It turns out that the \(p\)-adic absolute value extends to \(\mathbb{Q}_p\):

Proposition 11.12

For any \((x_n) \in \mathcal{C},\) the limit \(|x|_p = \lim_{n \to \infty} |x_n|_p\) exists, and it depends only on the image of \((x_n)\) in the quotient \(\mathbb{Q}_p.\) This defines a nonarchimedean absolute value \({|\cdot|_p}\) on \(\mathbb{Q}_p\) whose restriction to \(\mathbb{Q}\) is the \(p\)-adic absolute value defined above. Moreover, for any \(x \in \mathbb{Q}_p\) we have \[|x|_p \in \{0\} \cup \{ p^{-k} : k \in \mathbb{Z}\}.\]

(Note that since the new absolute value on \(\mathbb{Q}_p\) agrees with the one we already have on \(\mathbb{Q},\) there is no harm in denoting both by the same symbol.) The last theorem of this section shows that we have achieved our goal of “\(p\)-adically completing” \(\mathbb{Q}\):

Theorem 11.13

The field \(\mathbb{Q}_p\) is complete for the metric induced by this absolute value; and \(\mathbb{Q}\) is a dense subset of \(\mathbb{Q}_p.\)

Proof. Omitted.

11.4 The \(p\)-adic integers \(\mathbb{Z}_p\)

Definition 11.14

We define \(\mathbb{Z}_p = \{ x \in \mathbb{Q}_p : |x|_p \leqslant 1\}.\)

The non-archimedean property implies that this is a subring of \(\mathbb{Q}_p,\) not just a subset. Moreover, it is both open and closed in the \(p\)-adic topology. We’re going to show that \(\mathbb{Z}_p\) is also the closure of \(\mathbb{Z}\) in \(\mathbb{Q}_p\); this follows from the following more precise statement:

Proposition 11.15

Given any \(x \in \mathbb{Z}_p\) and \(n \geqslant 1,\) there exists \(\alpha \in \mathbb{Z}\) such that \(|x - \alpha| \leqslant p^{-n}\); and the set of \(\alpha\) with this property is a congruence class modulo \(p^n.\)

Proof. If \(\alpha_0\) satisfies these conditions, and \(\alpha\) is any integer, then the nonarchimedean property implies that \[|x - \alpha| \leqslant p^{-n} \iff |\alpha - \alpha_0| \leqslant p^{-n} \iff \alpha = \alpha_0 \bmod p^{-n}.\] So the set of \(\alpha \in \mathbb{Z}\) such that \(|x - \alpha| \leqslant p^{-n}\) is either empty, or a congruence class mod \(p^n.\)

It remains to show that some \(\alpha_0\) with this property exists. The density of \(\mathbb{Q}\) in \(\mathbb{Q}_p\) shows there is a rational \(\tfrac{a}{b}\) with \(|x - \tfrac{a}{b}|_p \leqslant p^{-n}.\) Since \(|x|_p \leqslant 1,\) we deduce that \(|\tfrac{a}{b}|_p \leqslant 1\) also; so \(\mathop{\mathrm{ord}}_p(a) \geqslant\mathop{\mathrm{ord}}_p(b),\) and after removing any common factors, we can suppose \(p \nmid b.\) Hence we can find \(b' \in \mathbb{Z}\) with \(bb' = 1 \bmod p^n.\)

We claim \(\alpha_0 = a b' \in \mathbb{Z}\) works. This follows since \(|\tfrac{a}{b} - a b'|_p = |\tfrac{a - a b b'}{b}|_p = |a (1 - b b')|_p\) (as \(|b| = 1\)), which is \(\leqslant p^{-n},\) since \(b b' = 1 \bmod p^n.\)

This construction defines a map \(\mathbb{Z}_p \to \mathbb{Z}/ p^n \mathbb{Z},\) \(x \mapsto \alpha,\) which is clearly a ring homomorphism, and extends the natural quotient map \(\mathbb{Z}\to \mathbb{Z}/ p^n \mathbb{Z}.\)

The kernel of this map is \(\{x \in \mathbb{Z}_p : |x| \leqslant p^{-n} \},\) and since \(|x| \leqslant p^{-n} \iff |x / p^n| \leqslant 1,\) the kernel is precisely the principal ideal \(p^n \mathbb{Z}_p.\) That is, we’ve shown:

Proposition 11.16

The inclusion \(\mathbb{Z}\hookrightarrow \mathbb{Z}_p\) induces isomorphisms \[\mathbb{Z}/ p^n \mathbb{Z}\cong \mathbb{Z}_p / p^n \mathbb{Z}_p\] for all \(n \geqslant 1.\)0◻

(In particular, we may write “\(x \bmod p^n\)” for any \(x \in \mathbb{Z}_p\) to mean its image in \(\mathbb{Z}/ p^n \mathbb{Z}.\))

Proposition 11.17

The only ideals in \(\mathbb{Z}_p\) are the zero ideal and the ideals \(p^n \mathbb{Z}_p,\) for \(n \geqslant 1.\) In particular, the only non-zero prime ideal is \(p\mathbb{Z}_p.\)

Proof. For the first claim, let \(J\) be an ideal in \(\mathbb{Z}_p,\) and consider the set \(\{ k \in \mathbb{N}: \exists x \in J \text{ such that } |x| = p^{-k}\}.\) If \(S\) is empty, then \(J = \{0\}\) and we’re done. If \(S\) is non-empty, it has a least element, say \(n,\) and there is some \(x\) with \(|x| = p^{-n}.\) But then \(u = p^n / x\) satisfies \(|u| = 1,\) so \(u \in \mathbb{Z}_p\); thus \(u x = p^n \in J.\) Now, for any \(y \in J,\) we have \(|y / p^n| \leqslant 1,\) so \(y \in p^n \mathbb{Z}_p\) and we have shown that \(J = p^n \mathbb{Z}_p.\)

For the second claim, we know that \(p^k \mathbb{Z}_p\) isn’t prime for \(k > 1,\) since it doesn’t contain \(p\) or \(p^{k-1},\) but does contain their product.

Combining the last two propositions shows that going from \(\mathbb{Z}\) to \(\mathbb{Z}_p\) “removes” all primes except \(p,\) without changing anything modulo powers of \(p.\)

Proposition 11.18

Suppose we have a sequence of elements \[(x_1, x_2, x_3, \dots) \in (\mathbb{Z}/ p\mathbb{Z}) \times (\mathbb{Z}/ p^2 \mathbb{Z}) \times (\mathbb{Z}/ p^3 \mathbb{Z}) \times \dots\] satisfying \(x_{i + 1} \bmod p^i = x_i\) for all \(i.\) Then there is a unique \(x \in \mathbb{Z}_p\) with \(x \bmod p^i = x_i\) for all \(i.\)

Proof. It’s clear that the map sending \(x \in \mathbb{Z}_p\) to \((x \bmod p, x \bmod p^2, \dots)\) is well-defined, and it must be injective, since if \(x = x' \bmod p^i\) then \(|x - x'| \leqslant p^{-i},\) and if this holds for all \(i\) then \(|x - x'| = 0,\) implying \(x = x'.\)

To show surjectivity, let \(\tilde{x}_i\) be any choice of element in \(\mathbb{Z}_p\) reducing to \(x_i \bmod p^i.\) Then \((\tilde{x}_i)\) is a Cauchy sequence, since \(|\tilde{x}_i - \tilde{x}_j| \leqslant p^{-N}\) for all \(i, j \geqslant N.\) So it has a limit \(x\); and letting \(j \to \infty\) in the last formula we have \(|\tilde{x}_i - x| \leqslant p^{-N}\) for all \(i \geqslant N,\) hence \(|x - \tilde{x}_i| \leqslant p^{-i},\) i.e. \(x \bmod p^i = x_i.\)

This gives a bijection from \(\mathbb{Z}_p\) to the set of compatible sequences in \(\prod_{n = 1}^\infty \mathbb{Z}/ p^n \mathbb{Z}\); and this is clearly a ring homomorphism, if we define addition and multiplication of sequences term-by-term.

Remark 11.19

This can be used to give an alternative, purely algebraic definition of \(\mathbb{Z}_p,\) although constructing \(\mathbb{Q}_p\) this way is more difficult.

11.5 P-adic numbers as “power series”

Working with compatible sequences is a nice way of proving theorems about \(\mathbb{Z}_p,\) but it’s a little bit cumbersome if you want to actually compute. The basic problem is that if you know \(x_n,\) then you can recover \(x_1, x_2, \dots, x_{n-1}\) from it; so each new term in the sequence repeats a lot of information you already knew. The following proposition gives a more “concrete” way of thinking about, and calculating in, the ring \(\mathbb{Z}_p.\)

Proposition 11.20

Let \(x \in \mathbb{Z}_p.\) Then there are uniquely determined integers \((a_0, a_1, \dots),\) with \(a_i \in \{0, 1, 2, \dots, p-1\}\) for each \(i,\) such that the sum \(\sum_{i = 0}^\infty a_i p^i\) converges to \(x\) in the topology of \(\mathbb{Z}_p.\) This construction gives a bijection between \(\mathbb{Z}_p\) and \(\{0, \dots, p-1\}^{\mathbb{N}}.\)

Proof. If \(a = (a_0, a_1, \dots)\) is any sequence in \(\{0, \dots, p-1\}^{\mathbb{N}},\) then we write \(S_i(a),\) for \(i \geqslant 1,\) for the partial sum \(\sum_{r = 0}^{i - 1} a_r p^r.\)

If \(j \geqslant i \geqslant 1,\) then the extra terms in \(S_j(a)\) that aren’t in \(S_i(a)\) are all divisible by \(p^i,\) so \(S_j(a) = S_i(a) \bmod p^i.\) It follows that the sequence \((S_i(a))_{i \geqslant 1}\) is Cauchy, and hence have a limit in \(\mathbb{Z}_p.\)

On the other hand, if two such sequences \(a, b\) have the same limit \(x,\) then \(S_n(a) = S_n(b) = x \bmod p^n\) for all \(n\); but \(S_n(a)\) and \(S_n(b)\) are integers in \(\{0, \dots, p^{n} - 1\},\) so being equal mod \(p^n\) means they are equal as integers. Since an integer has a unique base \(p\) expansion, we have \(a_i = a_j\) for \(0 \leqslant j < n,\) and as this holds for all \(n,\) the two sequences are identical.

It remains to show that every \(x \in \mathbb{Z}_p\) is a limit of such a sequence. Clearly we can choose \(a_0 \in \{0, \dots, p-1\}\) such that \(x \bmod p = a_0.\) Then \(x \bmod p^2\) differs from \(a_0\) by a multiple of \(p,\) so we can find \(a_1 \in \{0, \dots, p-1\}\) such that \(x \bmod p^2 = a_0 + p a_1.\) Proceeding inductively we can construct a sequence \(a = (a_0, a_1, \dots ) \in \{0, \dots, p-1\}^\mathbb{N}\) such that \(S_n(a) = x \bmod p^n\) for all \(n,\) so the partial sums of \(a\) tend to \(x.\)

Corollary 11.21

\(\mathbb{Z}_p\) and \(\mathbb{Q}_p\) are uncountable.

Proof. Once we know that \(\mathbb{Z}_p\) bijects with (nontrivial finite set)\(^\mathbb{N},\) the proof proceeds in the same way as Cantor’s diagonal argument for the uncountability of the real numbers.

The \(a_i\) are sometimes called the \(p\)-adic digits of \(x.\) To add two \(p\)-adic integers in this form, we add the terms in the sum, starting with the degree 0 term, and “carrying” powers of \(p\) upwards, just like adding usual integers written in base 10. For example if \(p = 5,\) and we want to compute \[(3 + 2 \times 5 + 3 \times 5^2 + \dots) + (2 + 1 \times 5 + 2 \times 5^2 + \dots),\] then the degree 0 terms sum to \(5 = 0 + 1 \times 5\); so we write down 0, and carry the 1 to the next term to get \((2 + 1 + 1) \times 5 = 4 \times 5,\) hence the sum is \(0 + 4 \times 5 + \dots.\)

Remark 11.22

This process will never stop, unless \(x\) and \(y\) are actually in \(\mathbb{N}\); we can’t compute “all” the \(a_i\)’s for most \(p\)-adic numbers, any more than we can compute “all” of the decimal digits of \(\pi.\) But we can compute the first \(n\) digits of \(x + y\) for any given \(n\) if we know the corresponding digits of \(x\) and \(y.\)

We can extend this to \(\mathbb{Q}_p\) if we allow finitely many terms with negative powers of \(p,\) i.e. \(x = \sum_{i = -N}^\infty a_i p^i\) for some \(N.\) (We can’t allow an infinite negative “tail”, though, since the sum wouldn’t converge.)

Home

Chapters

Contents

PDFs