In number theory, given a prime number, the -adic numbers form an extension of the rational numbers which is distinct from the real numbers, though with some similar properties; -adic numbers can be written in a form similar to (possibly infinite) decimals, but with digits based on a prime number rather than ten, and extending to the left rather than to the right.
For example, comparing the expansion of the rational number
\tfrac15
\begin{alignat}{3} \tfrac15&{}=0.01210121\ldots (base3) &&{}=0 ⋅ 30+0 ⋅ 3-1+1 ⋅ 3-2+2 ⋅ 3-3+ … \\[5mu] \tfrac15&{}=...121012102 (3-adic) &&{}= … +2 ⋅ 33+1 ⋅ 32+0 ⋅ 31+2 ⋅ 30. \end{alignat}
Formally, given a prime number, a -adic number can be defined as a series
infty | |
s=\sum | |
i=k |
aipi=akpk+ak+1pk+1+ak+2pk+2+ …
ai
0\leai<p.
k\ge0.
-k | |
|s| | |
p=p |
,
ai\ne0
ai
Every rational number can be uniquely expressed as the sum of a series as above, with respect to the -adic absolute value. This allows considering rational numbers as special -adic numbers, and alternatively defining the -adic numbers as the completion of the rational numbers for the -adic absolute value, exactly as the real numbers are the completion of the rational numbers for the usual absolute value.
-adic numbers were first described by Kurt Hensel in 1897, though, with hindsight, some of Ernst Kummer's earlier work can be interpreted as implicitly using -adic numbers.[1]
Roughly speaking, modular arithmetic modulo a positive integer consists of "approximating" every integer by the remainder of its division by, called its residue modulo . The main property of modular arithmetic is that the residue modulo of the result of a succession of operations on integers is the same as the result of the same succession of operations on residues modulo . If one knows that the absolute value of the result is less than, this allows a computation of the result which does not involve any integer larger than .
For larger results, an old method, still in common use, consists of using several small moduli that are pairwise coprime, and applying the Chinese remainder theorem for recovering the result modulo the product of the moduli.
Another method discovered by Kurt Hensel consists of using a prime modulus, and applying Hensel's lemma for recovering iteratively the result modulo
p2,p3,\ldots,pn,\ldots
The theory of -adic numbers is fundamentally based on the two following lemmas
Every nonzero rational number can be written where,, and are integers and neither nor is divisible by . The exponent is uniquely determined by the rational number and is called its -adic valuation (this definition is a particular case of a more general definition, given below). The proof of the lemma results directly from the fundamental theorem of arithmetic.
Every nonzero rational number of valuation can be uniquely written
r=apv+s,
0<a<p.
The proof of this lemma results from modular arithmetic: By the above lemma, where and are integers coprime with . The modular inverse of is an integer such that
nq=1+ph
mq
mq=pk+a
0<a<p,
r=apv+pv+1
kn-hm | |
n, |
This can be iterated starting from instead of, giving the following.
Given a nonzero rational number of valuation and a positive integer, there are a rational number
sk
a0,\ldots,ak-1
a0>0
v | |
r=a | |
0p |
+a1pv+1+ … +ak-1pv+k-1+pv+ksk.
The -adic numbers are essentially obtained by continuing this infinitely to produce an infinite series.
The -adic numbers are commonly defined by means of -adic series.
A -adic series is a formal power series of the form
infty | |
\sum | |
i=v |
ripi,
v
ri
ri
Every rational number may be viewed as a -adic series with a single nonzero term, consisting of its factorization of the form
pk\tfracnd,
Two -adic series and are equivalent if there is an integer such that, for every integer
n>N,
n | |
\sum | |
i=v |
ripi-
n | |
\sum | |
i=w |
sipi
A -adic series is normalized if either all
ai
0\leai<p,
av>0,
ai
Every -adic series is equivalent to exactly one normalized series. This normalized series is obtained by a sequence of transformations, which are equivalences of series; see § Normalization of a -adic series, below.
In other words, the equivalence of -adic series is an equivalence relation, and each equivalence class contains exactly one normalized -adic series.
The usual operations of series (addition, subtraction, multiplication, division) are compatible with equivalence of -adic series. That is, denoting the equivalence with, if, and are nonzero -adic series such that
S\simT,
\begin{align} S\pmU&\simT\pmU,\\ SU&\simTU,\\ 1/S&\sim1/T. \end{align}
The -adic numbers are often defined as the equivalence classes of -adic series, in a similar way as the definition of the real numbers as equivalence classes of Cauchy sequences. The uniqueness property of normalization, allows uniquely representing any -adic number by the corresponding normalized -adic series. The compatibility of the series equivalence leads almost immediately to basic properties of -adic numbers:
vp(x)
vp(0)=+infty
-v(x) | |
|x| | |
p=p |
;
|0|p=0.
Starting with the series the first above lemma allows getting an equivalent series such that the -adic valuation of
rv
ri.
ri
j>0,
ri=
js | |
p | |
i |
si
ri
ri+j
ri+j+si.
rv
Then, if the series is not normalized, consider the first nonzero
ri
[0,p-1].
ri=ai+psi;
ri
ai,
si
ri+1.
There are several equivalent definitions of -adic numbers. The one that is given here is relatively elementary, since it does not involve any other mathematical concepts than those introduced in the preceding sections. Other equivalent definitions use completion of a discrete valuation ring (see), completion of a metric space (see), or inverse limits (see).
A -adic number can be defined as a normalized -adic series. Since there are other equivalent definitions that are commonly used, one says often that a normalized -adic series represents a -adic number, instead of saying that it is a -adic number.
One can say also that any -adic series represents a -adic number, since every -adic series is equivalent to a unique normalized -adic series. This is useful for defining operations (addition, subtraction, multiplication, division) of -adic numbers: the result of such an operation is obtained by normalizing the result of the corresponding operation on series. This well defines operations on -adic numbers, since the series operations are compatible with equivalence of -adic series.
With these operations, -adic numbers form a field called the field of -adic numbers and denoted
\Qp
Qp.
The valuation of a nonzero -adic number, commonly denoted
vp(x),
vp(0)=infty;
infty.
\Q,
The -adic integers are the -adic numbers with a nonnegative valuation.
A -adic integer can be represented as a sequence
x=(x1\operatorname{mod}p,~x2\operatorname{mod}p2,~x3\operatorname{mod}p3,~\ldots)
xi\equivxj~(\operatorname{mod}pi)
Every integer is a -adic integer (including zero, since
0<infty
k\ge0
The -adic integers form a commutative ring, denoted
\Zp
Zp
\Zp
\Z(p)=\{\tfracnd\midn,d\in\Z,d\not\inp\Z\},
\Z
p\Z.
The last property provides a definition of the -adic numbers that is equivalent to the above one: the field of the -adic numbers is the field of fractions of the completion of the localization of the integers at the prime ideal generated by .
The -adic valuation allows defining an absolute value on -adic numbers: the -adic absolute value of a nonzero -adic number is
|x|p=
-vp(x) | |
p |
,
vp(x)
0
|0|p=0.
|x|p=0
x=0;
|x|p ⋅ |y|p=|xy|p
|x+y|p\lemax(|x|p,|y|p)\le|x|p+|y|p.
Moreover, if
|x|p\ne|y|p,
|x+y|p=max(|x|p,|y|p).
This makes the -adic numbers a metric space, and even an ultrametric space, with the -adic distance defined by
dp(x,y)=|x-y|p.
As a metric space, the -adic numbers form the completion of the rational numbers equipped with the -adic absolute value. This provides another way for defining the -adic numbers. However, the general construction of a completion can be simplified in this case, because the metric is defined by a discrete valuation (in short, one can extract from every Cauchy sequence a subsequence such that the differences between two consecutive terms have strictly decreasing absolute values; such a subsequence is the sequence of the partial sums of a -adic series, and thus a unique normalized -adic series can be associated to every equivalence class of Cauchy sequences; so, for building the completion, it suffices to consider normalized -adic series instead of equivalence classes of Cauchy sequences).
As the metric is defined from a discrete valuation, every open ball is also closed. More precisely, the open ball
Br(x)=\{y\middp(x,y)<r\}
B | |
p-v |
[x]=\{y\middp(x,y)\lep-v\},
p-v<r.
Br[x]=
B | |
p-w |
(x),
p-w>r.
This implies that the -adic numbers form a locally compact space, and the -adic integers—that is, the ball
B1[0]=Bp(0)
r
r=
infty | |
\sum | |
i=k |
ai10-i,
k
ai
0\leai<10.
r=\tfracnd
10k\ler<10k+1,
a
0<a<10,
r=a10k+r',
r'<10k.
r'
r
p
r
r=pk\tfracnd,
k
n
d
p
d
k
r
vp(r),
p-k
|r|p
r=apk+r'
a
0\lea<p,
r'
|r'|p<p-k
vp(r')>k
The
r=
infty | |
\sum | |
i=k |
aipi
ai
0\leai<p.
If
r=pk\tfracn1
n>0
r
The existence and the computation of the -adic expansion of a rational number results from Bézout's identity in the following way. If, as above,
r=pk\tfracnd,
d
p
t
u
td+up=1.
r=pk\tfracnd(td+up)=pknt+pk+1
un | |
d. |
nt
p
nt=qp+a,
0\lea<p.
\begin{array}{lcl} r&=&pk(qp+a)+pk+1
un | |
d |
\\ &=&apk+pk+1
qd+un | |
d, |
\\ \end{array}
r'=pk+1
qd+un | |
d |
The uniqueness of the division step and of the whole -adic expansion is easy: if
pka1+pk+1
k | |
s | |
1=p |
a2+pk+1s2,
a1-a2=p(s2-s1).
p
a1-a2.
0\lea1<p
0\lea2<p,
0\lea1
a2<p.
-p<a1-a2<p,
p
a1-a2
a1=a2.
The -adic expansion of a rational number is a series that converges to the rational number, if one applies the definition of a convergent series with the -adic absolute value.In the standard -adic notation, the digits are written in the same order as in a standard base- system, namely with the powers of the base increasing to the left. This means that the production of the digits is reversed and the limit happens on the left hand side.
The -adic expansion of a rational number is eventually periodic. Conversely, a series with
0\leai<p
Let us compute the 5-adic expansion of
\tfrac13.
2 ⋅ 3+(-1) ⋅ 5=1
13= | |||
|
-1/3
-1/3
-1
- |
| |||
-2
5
-2=3-1 ⋅ 5,
- |
| |||
|
=3+5(
-2 | |
3), |
13= | |
2+5 ⋅ |
(3+5 ⋅ (
-2 | |
3))= |
2+3 ⋅ 5+
-2 | |
3 ⋅ |
52.
Similarly, one has
- |
| |||
13=2+3 ⋅ | |
5 |
+1 ⋅ 52+
-1 | |
3 ⋅ |
53.
As the "remainder"
-\tfrac13
3
1
13= | |
\ldots |
13131325
\ldots
It is possible to use a positional notation similar to that which is used to represent numbers in base .
Let be a normalized -adic series, i.e. each
ai
[0,p-1].
k\le0
ai=0
0\lei<k
k>0
If
k\ge0,
ai
\ldotsan\ldotsa1{a0}p
13= | |
\ldots |
13131325,
25 | |
3= |
\ldots1313132005.
k<0,
1{15}= | |
\ldots |
3131313.52,
1{75}= | |
\ldots |
1313131.532.
If a -adic representation is finite on the left (that is,
ai=0
npv,
n,v
n\Z | |
\Z | |
p |
\Z/pn\Z
pn.
pn
[0,pn-1].
n\Z | |
\Z | |
p |
\Z/pn\Z.
The inverse limit of the rings
n\Z | |
\Z | |
p |
a0,a1,\ldots
ai\in\Z/pi\Z
The mapping that maps a normalized -adic series to the sequence of its partial sums is a ring isomorphism from
\Zp
n\Z | |
\Z | |
p. |
This definition of -adic integers is specially useful for practical computations, as allowing building -adic integers by successive approximations.
For example, for computing the -adic (multiplicative) inverse of an integer, one can use Newton's method, starting from the inverse modulo ; then, each Newton step computes the inverse modulo from the inverse modulo
The same method can be used for computing the -adic square root of an integer that is a quadratic residue modulo . This seems to be the fastest known method for testing whether a large integer is a square: it suffices to test whether the given integer is the square of the value found in
n\Z | |
\Z | |
p |
Hensel lifting is a similar method that allows to "lift" the factorization modulo of a polynomial with integer coefficients to a factorization modulo for large values of . This is commonly used by polynomial factorization algorithms.
There are several different conventions for writing -adic expansions. So far this article has used a notation for -adic expansions in which powers of increase from right to left. With this right-to-left notation the 3-adic expansion of
\tfrac15,
15 | |
= |
...1210121023.
When performing arithmetic in this notation, digits are carried to the left. It is also possible to write -adic expansions so that the powers of increase from left to right, and digits are carried to the right. With this left-to-right notation the 3-adic expansion of
\tfrac15
15 | |
= |
2.01210121...3
1{15} | |
= |
20.1210121...3.
-adic expansions may be written with other sets of digits instead of . For example, the -adic expansion of
\tfrac15
15 | |
= |
...\underline{1}11\underline{11}11\underline{11}11\underline{1}3.
In fact any set of integers which are in distinct residue classes modulo may be used as -adic digits. In number theory, Teichmüller representatives are sometimes used as digits.
is a variant of the -adic representation of rational numbers that was proposed in 1979 by Eric Hehner and Nigel Horspool for implementing on computers the (exact) arithmetic with these numbers.
Both
\Zp
\Qp
\Zp,
\Zp
\{0,\ldots,p-1\}\N.
\Qp
\Zp
\Qp=cup
infty | |
i=0 |
1{p | |
i}\Z |
p.
\Qp
\Q
Because can be written as sum of squares,[2]
\Qp
\R
\C
\Qp
\overline{\Qp},
\Qp
\overline{\Qp},
\Cp
\Omegap
\Cp
\C
\Cp
\C
\Cp
\C
If
K
\Qp,
\operatorname{Gal}\left(K/\Qp\right)
\operatorname{Gal}\left(\overline{\Qp}/\Qp\right)
\Qp
\Q13
\Qp
\Q2
Given a natural number, the index of the multiplicative group of the -th powers of the non-zero elements of
\Qp
x | |
\Q | |
p |
The number, defined as the sum of reciprocals of factorials, is not a member of any -adic field; but
ep\in\Qp
p\ne2
\Qp
Helmut Hasse's local–global principle is said to hold for an equation if it can be solved over the rational numbers if and only if it can be solved over the real numbers and over the -adic numbers for every prime . This principle holds, for example, for equations given by quadratic forms, but fails for higher polynomials in several indeterminates.
See main article: Hensel lifting.
The reals and the -adic numbers are the completions of the rationals; it is also possible to complete other fields, for instance general algebraic number fields, in an analogous way. This will be described now.
Suppose D is a Dedekind domain and E is its field of fractions. Pick a non-zero prime ideal P of D. If x is a non-zero element of E, then xD is a fractional ideal and can be uniquely factored as a product of positive and negative powers of non-zero prime ideals of D. We write ordP(x) for the exponent of P in this factorization, and for any choice of number c greater than 1 we can set
|x|P=
-\operatorname{ord | |
c | |
P(x)}. |
For example, when E is a number field, Ostrowski's theorem says that every non-trivial non-Archimedean absolute value on E arises as some |⋅|P. The remaining non-trivial absolute values on E arise from the different embeddings of E into the real or complex numbers. (In fact, the non-Archimedean absolute values can be considered as simply the different embeddings of E into the fields Cp, thus putting the description of allthe non-trivial absolute values of a number field on a common footing.)
Often, one needs to simultaneously keep track of all the above-mentioned completions when E is a number field (or more generally a global field), which are seen as encoding "local" information. This is accomplished by adele rings and idele groups.
Tp
Tp
Zp
R
Z
\Q2
22+12+12+12+\left(\sqrt{-7}\right)2=0,
\Qp
(p-1) x 12+\left(\sqrt{1-p}\right)2=0.
\Cp
\C