[Next][Prev] [Right] [Left] [Up] [Index] [Root]

Creation of p-adic Rings and Fields

A p-adic ring or field is specified by a prime p, which is the characteristic of the residue class field and the precision n. For p-adic rings the precision is interpreted as an absolute precision, (specifying to what valuation the digits of the element are known) but for p-adic fields it is interpreted as a relative precision, (specifying how many digits of the element are known).

Subsections

Creation Functions

The p-adic rings and fields are created using the following functions.

pAdicRing(p, n) : RngIntElt, RngIntElt -> RngLoc
pAdicRing(p) : RngIntElt -> RngLoc
pAdicField(p, n) : RngIntElt, RngIntElt -> FldLoc
pAdicField(p) : RngIntElt -> FldLoc
    Precision: RngIntElt                Default: 20
Create the ring (field) of p-adic integers (numbers) with precision n. If n is not given the floating p-adic ring (field) with infinite precision is created but elements except for the embedded integers and coercible rationals are created with the default precision given by Precision. The angle bracket notation can be used to assign a name to the uniformizing element e.g. Zp<t> := pAdicRing(p).

Between Ring and Field

These functions are provided to easily gain the field with the same invariants as a given ring and the ring with the same invariants as a given field.

IntegerRing(P) : FldLoc -> RngLoc
Integers(P) : FldLoc -> RngLoc
RingOfIntegers(P) : FldLoc -> RngLoc
Create the ring R of integers in the p-adic field P. This is the set of elements of non-negative valuation.
FieldOfFractions(P) : RngLoc -> FldLoc
Create the field of fractions F of the p-adic ring P. The relative precision of F is the precision of P.

Attributes of p-adic Rings and Fields

There are two attributes of p-adic rings and fields that can be set and altered by the user.

P`DefaultPrecision
Can be used to retrieve or set the default precision of the p-adic ring or field P. If P is a fixed precision ring or field setting this attribute has no effect since its value will be constantly the same as the precision of the ring. If P is a floating (infinite precision) p-adic ring or field, this will change the precision with which elements are created when they can't have infinite precision.
P`SeriesPrinting
By default, elements of a p-adic ring are printed as integers, An element of a p-adic field is printed as an integer co--prime to the prime of the field multiplied by the prime to the power of the valuation of the element.

If the SeriesPrinting attribute is true then the elements of any p-adic ring or field are printed as a power series in the uniformizing element with coefficients in the residue class field. Series printing has the advantage that the valuations of all the terms of the element can be seen.


Example RngPad_series-print (H42E1)

SeriesPrinting affects the way in which p-adic ring and field elements are printed. This can be illustrated in a very simple way.

> Zp<p> := pAdicRing(5, 30);
> p;    
5
> Zp`SeriesPrinting := true;
> p;
p
This is consistent with Zp having SeriesPrinting on since the p-adic coefficients are printed as series in p. A less trivial example is given below.

> Zp!320056308567305656;
1 + p + p^2 - p^4 - 2*p^5 - 2*p^6 + 2*p^7 + 2*p^8 + p^9 + 2*p^10 - p^11 - 2*p^13
    + p^14 + p^16 - p^17 + p^18 + p^20 + p^21 - p^22 + 2*p^23 + p^25
> FieldOfFractions(Zp)!$1;
320056308567305656 + O(5^30)
> Qp := FieldOfFractions(Zp);
> Qp!p^5*$1;                 
320056308567305656*5^5 + O(5^35)
> Qp`SeriesPrinting := true;
> $1;
5^5 + 5^6 + 5^7 - 5^9 - 2*5^10 - 2*5^11 + 2*5^12 + 2*5^13 + 5^14 + 2*5^15 - 5^16
    - 2*5^18 + 5^19 + 5^21 - 5^22 + 5^23 + 5^25 + 5^26 - 5^27 + 2*5^28 + 5^30 + 
    O(5^35)

Elements with infinite precision can have infinite series expansions. In these cases when SeriesPrinting is on the series for the element will be printed to the default precision of the ring.

> R := pAdicRing(2);                                                    
> R!-1;
-1
> R`SeriesPrinting := true;
> R!-1;
1 + 2 + 2^2 + 2^3 + 2^4 + 2^5 + 2^6 + 2^7 + 2^8 + 2^9 + 2^10 + 2^11 + 2^12 + 
    2^13 + 2^14 + 2^15 + 2^16 + 2^17 + 2^18 + 2^19 + O(2^20)

 [Next][Prev] [Right] [Left] [Up] [Index] [Root]