Processing math: 100%
Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 Bib Ind
 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 

68 p-adic Numbers (preliminary)
 68.1 Pure p-adic Numbers
 68.2 Extensions of the p-adic Numbers

68 p-adic Numbers (preliminary)

In this chapter p is always a (fixed) prime integer.

The p-adic numbers Qp are the completion of the rational numbers with respect to the valuation νp(pva/b)=v if p divides neither a nor b. They form a field of characteristic 0 which nevertheless shows some behaviour of the finite field with p elements.

A p-adic numbers can be represented by a p-adic expansion which is similar to the decimal expansion used for the reals (but written from left to right). So for example if p=2, the numbers 1, 2, 3, 4, 1/2, and 4/5 are represented as 1(2), 0.1(2), 1.1(2), 0.01(2), 10(2), and the infinite periodic expansion 0.010110011001100...(2). p-adic numbers can be approximated by ignoring higher powers of p, so for example with only 2 digits accuracy 4/5 would be approximated as 0.01(2). This is different from the decimal approximation of real numbers in that p-adic approximation is a ring homomorphism on the subrings of p-adic numbers whose valuation is bounded from below so that rounding errors do not increase with repeated calculations.

In GAP, p-adic numbers are always represented by such approximations. A family of approximated p-adic numbers consists of p-adic numbers with a fixed prime p and a certain precision, and arithmetic with these numbers is done with this precision.

68.1 Pure p-adic Numbers

Pure p-adic numbers are the p-adic numbers described so far.

68.1-1 PurePadicNumberFamily
‣ PurePadicNumberFamily( p, precision )( function )

returns the family of pure p-adic numbers over the prime p with precision digits. That is to say, the approximate value will differ from the correct value by a multiple of pdigits.

68.1-2 PadicNumber
‣ PadicNumber( fam, rat )( operation )

returns the element of the p-adic number family fam that approximates the rational number rat.

p-adic numbers allow the usual operations for fields.

gap> fam:=PurePadicNumberFamily(2,20);;
gap> a:=PadicNumber(fam,4/5);
0.010110011001100110011(2)
gap> fam:=PurePadicNumberFamily(2,3);;
gap> a:=PadicNumber(fam,4/5);
0.0101(2)
gap> 3*a;
0.0111(2)
gap> a/2;
0.101(2)
gap> a*10;
0.001(2)

See PadicNumber (68.2-2) for other methods for PadicNumber.

68.1-3 Valuation
‣ Valuation( obj )( operation )

The valuation is the p-part of the p-adic number. See also PValuation (15.7-1).

68.1-4 ShiftedPadicNumber
‣ ShiftedPadicNumber( padic, int )( operation )

ShiftedPadicNumber takes a p-adic number padic and an integer shift and returns the p-adic number c, that is padic * p^shift.

68.1-5 IsPurePadicNumber
‣ IsPurePadicNumber( obj )( category )

The category of pure p-adic numbers.

68.1-6 IsPurePadicNumberFamily
‣ IsPurePadicNumberFamily( fam )( category )

The family of pure p-adic numbers.

68.2 Extensions of the p-adic Numbers

The usual Kronecker construction with an irreducible polynomial can be used to construct extensions of the p-adic numbers. Let L be such an extension. Then there is a subfield K<L such that K is an unramified extension of the p-adic numbers and L/K is purely ramified.

(For an explanation of ramification see for example [Neu92, Section II.7], or another book on algebraic number theory. Essentially, an extension L of the p-adic numbers generated by a rational polynomial f is unramified if f remains squarefree modulo p and is completely ramified if modulo p the polynomial f is a power of a linear factor while remaining irreducible over the p-adic numbers.)

The representation of extensions of p-adic numbers in GAP uses the subfield K.

68.2-1 PadicExtensionNumberFamily
‣ PadicExtensionNumberFamily( p, precision, unram, ram )( function )

An extended p-adic field L is given by two polynomials h and g with coefficient lists unram (for the unramified part) and ram (for the ramified part). Then L is isomorphic to Qp[x,y]/(h(x),g(y)).

This function takes the prime number p and the two coefficient lists unram and ram for the two polynomials. The polynomial given by the coefficients in unram must be a cyclotomic polynomial and the polynomial given by ram must be either an Eisenstein polynomial or 1+x. This is not checked by GAP.

Every number in L is represented as a coefficient list w. r. t. the basis {1,x,x2,,y,xy,x2y,} of L. The integer precision is the number of digits that all the coefficients have.

A general comment:

The polynomials with which PadicExtensionNumberFamily is called define an extension of Qp. It must be ensured that both polynomials are really irreducible over Qp! For example x2+x+1 is not irreducible over Qp. Therefore the extension PadicExtensionNumberFamily(3, 4, [1,1,1], [1,1]) contains non-invertible pseudo-p-adic numbers. Conversely, if an extension contains noninvertible elements then one of the defining polynomials was not irreducible.

68.2-2 PadicNumber
‣ PadicNumber( fam, rat )( operation )
‣ PadicNumber( purefam, list )( operation )
‣ PadicNumber( extfam, list )( operation )

(see also PadicNumber (68.1-2)).

PadicNumber creates a p-adic number in the p-adic numbers family fam. The first form returns the p-adic number corresponding to the rational rat.

The second form takes a pure p-adic numbers family purefam and a list list of length two, and returns the number p^list[1] * list[2]. It must be guaranteed that no entry of list[2] is divisible by the prime p. (Otherwise precision will get lost.)

The third form creates a number in the family extfam of a p-adic extension. The second argument must be a list list of length two such that list[2] is the list of coefficients w.r.t. the basis {1,,xf1ye1} of the extended p-adic field and list[1] is a common p-part of all these coefficients.

p-adic numbers admit the usual field operations.

gap> efam:=PadicExtensionNumberFamily(3, 5, [1,1,1], [1,1]);;
gap> PadicNumber(efam,7/9);
padic(120(3),0(3))

A word of warning:

Depending on the actual representation of quotients, precision may seem to vanish. For example in PadicExtensionNumberFamily(3, 5, [1,1,1], [1,1]) the number (1.2000, 0.1210)(3) can be represented as [ 0, [ 1.2000, 0.1210 ] ] or as [ -1, [ 12.000, 1.2100 ] ] (here the coefficients have to be multiplied by p1).

So there may be a number (1.2, 2.2)(3) which seems to have only two digits of precision instead of the declared 5. But internally the number is stored as [ -3, [ 0.0012, 0.0022 ] ] and so has in fact maximum precision.

68.2-3 IsPadicExtensionNumber
‣ IsPadicExtensionNumber( obj )( category )

The category of elements of the extended p-adic field.

gap>  efam:=PadicExtensionNumberFamily(3, 5, [1,1,1], [1,1]);;
gap> IsPadicExtensionNumber(PadicNumber(efam,7/9));
true

68.2-4 IsPadicExtensionNumberFamily
‣ IsPadicExtensionNumberFamily( fam )( category )

Family of elements of the extended p-adic field.

gap> efam:=PadicExtensionNumberFamily(3, 5, [1,1,1], [1,1]);;
gap> IsPadicExtensionNumberFamily(efam);
true
 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 
Goto Chapter: Top 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 Bib Ind

generated by GAPDoc2HTML