15.5 Field $ \mathbf{Q}_p$ of $ p$ -adic Numbers

Module: sage.rings.padic_field

Module-level Functions

Qp( p)

is_pAdicField( x)

pAdicField( p)

Class: pAdicField_generic

class pAdicField_generic
Field $ \mathbf{Q}_p$ of $ p$ -adic numbers.

sage: K = pAdicField(17); K
17-adic Field

sage: loads(K.dumps()) == K
True
pAdicField_generic( self, p, [prec=Infinity], [series_print=True], [print_prec=20])

Functions: characteristic,$  $ prec,$  $ prime,$  $ print_prec,$  $ residue_characteristic,$  $ residue_class_field,$  $ series_print

characteristic( self)

The characteristic of the field $ \mathbf{Q}_p$ , which is always 0.

sage: K = Qp(7)
sage: K.characteristic()
0

prime( self)

The prime p such that this is the field Qp.

sage: K = Qp(7)
sage: K.prime()
7

print_prec( self, [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.

residue_characteristic( self)

The characteristic of the residue class field Qp.

sage: K = Qp(7)
sage: K.residue_characteristic()
7

residue_class_field( self)

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

Special Functions: __call__,$  $ __cmp__,$  $ _repr_

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