I've seen the definitions of p-adic numbers scattered around on the internet,
but this analogy as motivated by the book
p-adic numbers by Fernando Gouvea really made me understand why one would study the p-adics, and why the
definitions are natural. So I'm going to recapitulate the material, with the
aim of having somoene who reads this post be left with a sense of why it's
profitable to study the p-adics, and what sorts of analogies are fruitful when
thinking about them.
We wish to draw an analogy between the ring C[X], where (X−α)are the prime ideals, and Z where (p) are the prime ideals. We wish
to take all operations one can perform with polynomials, such as generating
functions ( 1/(X−α)=1+X+X2+… ),
taylor expansions (expanding aronund (X−α)),
and see what their analogous objects will look like in Zrelative to a prime p.
§ Perspective: Taylor series as writing in base p:
Now, for example, given a prime p, we can write any positive integer min base p, as (m=∑i=0naipi) where (0≤ai≤p−1).
For example, consider m=72,p=3. The expansion of 72 is
72=0×1+0×3+2×32+2×33.
This shows us that 72 is divisible by 32.
This perspective to take is that this us the information local to prime p,
about what order the number m is divisible by p,
just as the taylor expansion tells us around (X−α) of a polynomial P(X)tells us to what order P(X) vanishes at a point α.
§ Perspective: rational numbers and rational functions as infinite series:
Now, we investigate the behaviour of expressions such as
P(X)=1/(1+X)=1−X+X2−X3+….
We know that the above formula is correct formally from the theory of
generating functions. Hence, we take inspiration to define values for
rational numbers .
Let's take p≡3, and we know that 4=1+3=1+p.
We now calculate 1/4 as:
1/4=1/(1+p)=1−p+p2−p3+p4−p5+p6+⋯
However, we don't really know how to interpret (−1⋅p), since we assumed
the coefficients are always non-negative. What we can do is to rewrite p2=3p,
and then use this to make the coefficient positive. Performing this transformation
for every negative coefficient, we arrive at:
We can verify that this is indeed correct, by multiplying with 4=(1+p)and checking that the result is 1:
(1+p)(1+2p+2p3+⋯)=(1+p)+(2p+2p2)+(2p3+2p4)+⋯=1+3p+2p2+2p3+2p4+⋯(Rewrite 3p=p⋅p=p2)=1+(p2+2p2)+2p3+2p4+⋯=1+3p2+2p3+2p4+⋯(Rewrite 3p2=p3 and collect p3)=1+3p3+2p4+⋯=1+3p4+⋯=1+⋯=1
What winds up happening is that all the numbers after 1 end up being cleared
due to the carrying of (3pi↦pi+1).
This little calculation indicates that we can also define take the p-adic
expansion of rational numbers .
We next want to find a p-adic expansion of -1, since we can then expand
out theory to work out "in general". The core idea is to "borrow" p, so
that we can write -1 as (p−1)−p, and then we fix −p, just like we fixed
−1. This eventually leads us to an infinite series expansion for −1. Written
down formally, the calculation proceeds as:
−1−1=−1+p−p(borrow p, and subtract to keep equality)=(p−1)−p(Now we have a problem of −p)=(p−1)−p+p2−p2=(p−1)+p(p−1)−p2=(p−1)+p(p−1)−p2+p3−p3=(p−1)+p(p−1)+p2(p−1)−p3(Generalizing the above pattern)=(p−1)+p(p−1)+p2(p−1)+p3(p−1)+p4(p−1)+⋯
This now gives us access to negative numbers, since we can formally multiply
the series of two numbers, to write −a=−1⋅a.
Notice that this definition of −1 also curiously matches the 2s complement
definition, where we have −1=11…1. In this case, the expansion is
infinite , while in the 2s complement case, it is finite. I would be very
interested to explore this connection more fully.
We've now managed to completely reinterpret all the numbers we care about in
the rationals as power series in base p. This is pretty neat. We're next
going to try to complete this, just as we complete the rationals to get
the reals. We're going to show that we get a different number system on
completion, called Qp.
To perform this, we first look at how the p-adic numbers help us solve
congruences mod p, and how this gives rise to completions to equations such
as x2−2=0, which in the reals give us x=2, and in Qpgive us a different answer!
Let's start by solving an equation we already know how to solve:
X2≡25mod3n.
We already know the solutions to X2≡25mod3n in Z are
X≡±5mod3n.
Explicitly, the solutions are:
X≡3mod3
X≡5mod9
X≡5mod27
At this point, the answer remains constant.
This was somewhat predictable. We move to a slightly more interesting case.
Note that we can't really predict the digits in the 3-adic sequence of -5,
but we can keep expanding and finding more digits.
Also see that the solutions are "coherent". In that, if we look at the
solution mod 9, which is 4, and then consider it mod 3, we get 1. So,
we can say that given a sequence of integers 0≤αn≤pn−1,
αn is p-adically coherent sequence iff:
Since our solution sets are coherent, we can view the solutions as a tree,
with the expansions of X=5,X=−5mod3 and then continuing onwards
from there. That is, the sequences are
We now construct a solution to the equation X2=1 in the 7-adic system,
thereby showing that Qp is indeed strictly larger than Q,
since this equation does not have rational roots.
For n=1, we have the solutions as X≡3mod7, X≡4≡−3mod7.
To find solutions for n=2, we recall that we need our solutions to be consistent
with those for n=1. So, we solve for:
This gives the solution X≡10mod49. The other branch ( X=4+7k)
gives us X≡39≡−10mod49.
We can continue this process indefinitely ( exercise ), giving us the sequences:
3→10→108→2166→…
4→39→235→235→…
We can show that the sequences of solutions we get satisfy the equation
X2=2mod7. This is so by construction. Hence, Q7 contains
a solution that Q does not, and is therefore strictly bigger, since
we can already represent every rational in Q in Q7.
Let's use the tools we have built so far to solve the equation X=1+3X.
Instead of solving it using algebra, we look at it as a recurrence Xn+1=1+3Xn.
This gives us the terms:
X0=1
X1=1+3
X2=1+3+32
Xn=1+3+⋯+3n
In R, this is a divergent sequence. However, we know that the
solution so 1+X+X2+⋯=1/(1−X), at least as a generating function.
Plugging this in, we get that the answer should be:
1/(1−3)=−1/2
which is indeed the correct answer.
Now this required some really shady stuff in R. However, with a change
of viewpoint, we can explain what's going on. We can look at the above series
as being a series in Q3. Now, this series does really converge,
and by the same argument as above, it converges to −1/2.
The nice thing about this is that a dubious computation becomes a legal one
by changing one's perspective on where the above series lives.
The last thing that we need to import from the theory of polynomials
is the ability to evaluate them: Given a rational function F(X)=P(X)/Q(X),
where P(X),Q(X) are polynomials, we can
evaluate it at some arbitrary point x0, as long as x0 is not a zero
of the polynomial Q(X).
We would like a similar function, such that for a fixed prime p, we obtain
a ring homomorphism from Q→Fpx, which we will
denote as p(x0), where we are imagining that we are "evaluating" the prime
p against the rational x0.
We define the value of x0=a/b at the prime p to be equal to
ab−1modp, where bb−1≡1modp. That is, we compute the
usual ab−1 to evaluate a/b, except we do this (modp), to stay with
the analogy.
Note that if b≡0modp, then we cannot evaluate
the rational a/b, and we say that a/b has a pole at p. The order
of the pole is the number of times p occurs in the prime factorization of b.
I'm not sure how profitable this viewpoint is, so I
asked on math.se ,
and I'll update this post when I recieve a good answer.
§ Perspective: Forcing the formal sum to converge by imposing a new norm:
So far, we have dealt with infinite series in base p, which have terms
pi,i≥0.
Clearly, these sums are divergent as per the usual topology on Q.
However, we would enjoy assigning analytic meaning to these series. Hence, we
wish to consider a new notion of the absolute value of a number, which makes it
such that pi with large i are considered small.
We define the absolute value for a field K as a function
∣⋅∣:K→R. It obeys the axioms:
∣x∣=0⟺x=0
∣xy∣=∣x∣∣y∣ for all x,y∈K
∣x+y∣≤∣x∣+∣y∣, for all x,y∈K.
We want the triangle inequality so it's metric-like, and the norm to be
multiplicative so it measures the size of elements.
The usual absolute value ∣x∣≡x:x≥0;−x:otherwise satisfies
these axioms.
Now, we create a new absolute value that measures primeness. We first introduce
a gadget known as a valuation, which measures the p-ness of a number. We use
this to create a norm that makes number smaller as their p-ness increases.
This will allow infinite series in pi to converge.
First, we introduce
a valuation vp:Z−0→R, where vp(n) is
the power of the prime pi in the prime factorization of n. More formally,
vp(n) is the unique number such that:
n=pvp(n)m, where p∤m.
We extend the valuation to the rationals by defining vp(a/b)=vp(a)−vp(b).
We set vp(0)=+∞. The intuition is that 0 can be divided by pan infinite number of times.
The valuation gets larger as we have larger powers of p in the prime
factorization of a number. However, we want the norm to get smaller . Also,
we need the norm to be multiplicative, while vp(nm)=vp(n)+vp(m), which
is additive.
To fix both of these, we create a norm by exponentiating vp.
This converts the additive property into a multiplicative property. We
exponentiate with a negative sign so that higher values of vp lead to
smaller values of the norm.
Now, we define the p-adic absolute value of a number n as
∣n∣p≡p−vp(n).
the norm of 0 is p−vp(0)=p−∞=0.
If p−vp(n)=0, then −vp(n)=logp0=−∞, and hence n=0.
The norm is multiplicative since vp is additive.
Since vp(x+y)≥min(vp(x),vp(y)),∣x+y∣p≤max(∣x∣p,∣y∣p)≤∣x∣p+∣y∣p. Hence, the triangle inequality is also satisfied.
So ∣n∣p is indeed a norm, which measures p-ness, and is smaller as igets larger in the power pi of the factorization of n, causing our
infinite series to converge.
There is a question of why we chose a base p for ∣n∣p=pvp(n). It would
appear that any choice of ∣n∣p=cvp(n),c>1 would be legal.
I asked this on math.se,
and the answer is that this choosing a base p gives us the nice formula
∀x∈Z,{p:pis prime}∪{∞}∏∣x∣p=1
That is, the product of all p norms and the usual norm
(denoted by ∣x∣∞ )
give us the number 1. The reason is that the ∣x∣p give us
multiples p−vp(x),
while the usual norm ∣x∣∞ contains a multiple
pvp(x), thereby cancelling each other out.
What we've done in this whirlwind tour is to try and draw analogies between
the ring of polynomials C[X] and the ring Z, by trying
to draw analogies between their prime ideals: (X−α) and (p). So,
we imported the notions of generating functions, polynomial evaluation, and
completions (of Q) to gain a picture of what Qp is like.
We also tried out the theory we've built against some toy problems, that shows
us that this point of view maybe profitable. If you found this interesting,
I highly recommend the book
p-adic numbers by Fernando Gouvea .