p-adic Numbers (preliminary)

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

The p-adic numbers Q_p are the completion of the rational numbers with respect to the valuation \nu_p( p^v \cdot a / 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.

Pure p-adic Numbers

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

<#Include Label="PurePadicNumberFamily">

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 for other methods for .
<#Include Label="Valuation"> <#Include Label="ShiftedPadicNumber"> <#Include Label="IsPurePadicNumber"> <#Include Label="IsPurePadicNumberFamily">

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 , 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.

<#Include Label="PadicExtensionNumberFamily"> <#Include Label="PadicNumber"> <#Include Label="IsPadicExtensionNumber"> <#Include Label="IsPadicExtensionNumberFamily">