4.14.1.1 pAdicField Objects

class pAdicField
Field Q_p of p-adic numbers.
pAdicField( p)

Instances of class pAdicField have the following functions (in addition to inherited functions and special functions):

characteristic,$  $ is_field,$  $ name,$  $ prec,$  $ prime,$  $ print_prec,$  $ random,$  $ residue_characteristic,$  $ residue_class_field,$  $ series_print

Further documentation:

characteristic( )
The characteristic of the field Qp, which is always 0.
sage: K = Qp(7)
sage: K.characteristic()
0

is_field( )
This function always returns true, because Qp is a field.
sage: K = Qp(7)
sage: K.is_field()
True

prime( )
The prime p such that this is the field Qp.
sage: K = Qp(7)
sage: K.prime()
7

print_prec( [n=None])

If you call print_prec(n), then printing of elements in this p-adic field is truncated at $ O(p^n)$ . Calling print_prec() with no arguments returns n. This command only affects printing, and does not alter the actual values of elements of this field.

random( [prec=10])
A random integral element of Q_p to precision O(p**prec).

residue_characteristic( )
The characteristic of the residue class field Qp.
sage: K = Qp(7)
sage: K.residue_characteristic()
7

residue_class_field( )
The residue class field of the ring Zp of integers of Qp, i.e., the field Z/pZ.
sage: K = Qp(3)
sage: K.residue_class_field()
Ring of integers modulo 3

Instances of class pAdicField also have the following special functions:

__call__,$  $ __cmp__

See About this document... for information on suggesting changes.