Local Generic¶
Superclass for \(p\)-adic and power series rings.
AUTHORS:
David Roe
- class sage.rings.padics.local_generic.LocalGeneric(base, prec, names, element_class, category=None)[source]¶
Bases:
CommutativeRing
Initialize
self
.EXAMPLES:
sage: R = Zp(5) # indirect doctest sage: R.precision_cap() 20
>>> from sage.all import * >>> R = Zp(Integer(5)) # indirect doctest >>> R.precision_cap() 20
R = Zp(5) # indirect doctest R.precision_cap()
In Issue #14084, the category framework has been implemented for \(p\)-adic rings:
sage: TestSuite(R).run() # needs sage.geometry.polyhedron sage: K = Qp(7) sage: TestSuite(K).run() # needs sage.geometry.polyhedron
>>> from sage.all import * >>> TestSuite(R).run() # needs sage.geometry.polyhedron >>> K = Qp(Integer(7)) >>> TestSuite(K).run() # needs sage.geometry.polyhedron
TestSuite(R).run() # needs sage.geometry.polyhedron K = Qp(7) TestSuite(K).run() # needs sage.geometry.polyhedron
- absolute_degree()[source]¶
Return the degree of this extension over the prime \(p\)-adic field/ring.
EXAMPLES:
sage: K.<a> = Qq(3^5) # needs sage.libs.ntl sage: K.absolute_degree() # needs sage.libs.ntl 5 sage: R.<x> = QQ[] sage: L.<pi> = Qp(3).extension(x^2 - 3) # needs sage.libs.ntl sage: L.absolute_degree() # needs sage.libs.ntl 2
>>> from sage.all import * >>> K = Qq(Integer(3)**Integer(5), names=('a',)); (a,) = K._first_ngens(1)# needs sage.libs.ntl >>> K.absolute_degree() # needs sage.libs.ntl 5 >>> R = QQ['x']; (x,) = R._first_ngens(1) >>> L = Qp(Integer(3)).extension(x**Integer(2) - Integer(3), names=('pi',)); (pi,) = L._first_ngens(1)# needs sage.libs.ntl >>> L.absolute_degree() # needs sage.libs.ntl 2
K.<a> = Qq(3^5) # needs sage.libs.ntl K.absolute_degree() # needs sage.libs.ntl R.<x> = QQ[] L.<pi> = Qp(3).extension(x^2 - 3) # needs sage.libs.ntl L.absolute_degree() # needs sage.libs.ntl
- absolute_e()[source]¶
Return the absolute ramification index of this ring/field.
EXAMPLES:
sage: K.<a> = Qq(3^5) # needs sage.libs.ntl sage: K.absolute_e() # needs sage.libs.ntl 1 sage: R.<x> = QQ[] sage: L.<pi> = Qp(3).extension(x^2 - 3) # needs sage.libs.ntl sage: L.absolute_e() # needs sage.libs.ntl 2
>>> from sage.all import * >>> K = Qq(Integer(3)**Integer(5), names=('a',)); (a,) = K._first_ngens(1)# needs sage.libs.ntl >>> K.absolute_e() # needs sage.libs.ntl 1 >>> R = QQ['x']; (x,) = R._first_ngens(1) >>> L = Qp(Integer(3)).extension(x**Integer(2) - Integer(3), names=('pi',)); (pi,) = L._first_ngens(1)# needs sage.libs.ntl >>> L.absolute_e() # needs sage.libs.ntl 2
K.<a> = Qq(3^5) # needs sage.libs.ntl K.absolute_e() # needs sage.libs.ntl R.<x> = QQ[] L.<pi> = Qp(3).extension(x^2 - 3) # needs sage.libs.ntl L.absolute_e() # needs sage.libs.ntl
- absolute_f()[source]¶
Return the degree of the residue field of this ring/field over its prime subfield.
EXAMPLES:
sage: K.<a> = Qq(3^5) # needs sage.libs.ntl sage: K.absolute_f() # needs sage.libs.ntl 5 sage: R.<x> = QQ[] sage: L.<pi> = Qp(3).extension(x^2 - 3) # needs sage.libs.ntl sage: L.absolute_f() # needs sage.libs.ntl 1
>>> from sage.all import * >>> K = Qq(Integer(3)**Integer(5), names=('a',)); (a,) = K._first_ngens(1)# needs sage.libs.ntl >>> K.absolute_f() # needs sage.libs.ntl 5 >>> R = QQ['x']; (x,) = R._first_ngens(1) >>> L = Qp(Integer(3)).extension(x**Integer(2) - Integer(3), names=('pi',)); (pi,) = L._first_ngens(1)# needs sage.libs.ntl >>> L.absolute_f() # needs sage.libs.ntl 1
K.<a> = Qq(3^5) # needs sage.libs.ntl K.absolute_f() # needs sage.libs.ntl R.<x> = QQ[] L.<pi> = Qp(3).extension(x^2 - 3) # needs sage.libs.ntl L.absolute_f() # needs sage.libs.ntl
- absolute_inertia_degree()[source]¶
Return the degree of the residue field of this ring/field over its prime subfield.
EXAMPLES:
sage: K.<a> = Qq(3^5) # needs sage.libs.ntl sage: K.absolute_inertia_degree() # needs sage.libs.ntl 5 sage: R.<x> = QQ[] sage: L.<pi> = Qp(3).extension(x^2 - 3) # needs sage.libs.ntl sage: L.absolute_inertia_degree() # needs sage.libs.ntl 1
>>> from sage.all import * >>> K = Qq(Integer(3)**Integer(5), names=('a',)); (a,) = K._first_ngens(1)# needs sage.libs.ntl >>> K.absolute_inertia_degree() # needs sage.libs.ntl 5 >>> R = QQ['x']; (x,) = R._first_ngens(1) >>> L = Qp(Integer(3)).extension(x**Integer(2) - Integer(3), names=('pi',)); (pi,) = L._first_ngens(1)# needs sage.libs.ntl >>> L.absolute_inertia_degree() # needs sage.libs.ntl 1
K.<a> = Qq(3^5) # needs sage.libs.ntl K.absolute_inertia_degree() # needs sage.libs.ntl R.<x> = QQ[] L.<pi> = Qp(3).extension(x^2 - 3) # needs sage.libs.ntl L.absolute_inertia_degree() # needs sage.libs.ntl
- absolute_ramification_index()[source]¶
Return the absolute ramification index of this ring/field.
EXAMPLES:
sage: K.<a> = Qq(3^5) # needs sage.libs.ntl sage: K.absolute_ramification_index() # needs sage.libs.ntl 1 sage: R.<x> = QQ[] sage: L.<pi> = Qp(3).extension(x^2 - 3) # needs sage.libs.ntl sage: L.absolute_ramification_index() # needs sage.libs.ntl 2
>>> from sage.all import * >>> K = Qq(Integer(3)**Integer(5), names=('a',)); (a,) = K._first_ngens(1)# needs sage.libs.ntl >>> K.absolute_ramification_index() # needs sage.libs.ntl 1 >>> R = QQ['x']; (x,) = R._first_ngens(1) >>> L = Qp(Integer(3)).extension(x**Integer(2) - Integer(3), names=('pi',)); (pi,) = L._first_ngens(1)# needs sage.libs.ntl >>> L.absolute_ramification_index() # needs sage.libs.ntl 2
K.<a> = Qq(3^5) # needs sage.libs.ntl K.absolute_ramification_index() # needs sage.libs.ntl R.<x> = QQ[] L.<pi> = Qp(3).extension(x^2 - 3) # needs sage.libs.ntl L.absolute_ramification_index() # needs sage.libs.ntl
- change(**kwds)[source]¶
Return a new ring with changed attributes.
INPUT:
The following arguments are applied to every ring in the tower:
type
– string, the precision typep
– the prime of the ground ring; defining polynomials will be converted to the new base ringsprint_mode
– stringprint_pos
– booleanprint_sep
– stringprint_alphabet
– dictionaryshow_prec
– booleancheck
– booleanlabel
– string (only for lattice precision)
The following arguments are only applied to the top ring in the tower:
var_name
– stringres_name
– stringunram_name
– stringram_name
– stringnames
– stringmodulus
– polynomial
The following arguments have special behavior:
prec
– integer; if the precision is increased on an extension ring, the precision on the base is increased as necessary (respecting ramification). If the precision is decreased, the precision of the base is unchanged.field
– boolean; ifTrue
, switch to a tower of fields via the fraction field IfFalse
, switch to a tower of rings of integersq
– prime power; replace the initial unramified extension of \(\QQ_p\) or \(\ZZ_p\) with an unramified extension of residue cardinality \(q\). If the initial extension is ramified, add in an unramified extension.base
– ring or field; use a specific base ring instead of recursively callingchange()
down the tower
See the
constructors
for more details on the meaning of these arguments.EXAMPLES:
We can use this method to change the precision:
sage: Zp(5).change(prec=40) 5-adic Ring with capped relative precision 40
>>> from sage.all import * >>> Zp(Integer(5)).change(prec=Integer(40)) 5-adic Ring with capped relative precision 40
Zp(5).change(prec=40)
or the precision type:
sage: Zp(5).change(type='capped-abs') 5-adic Ring with capped absolute precision 20
>>> from sage.all import * >>> Zp(Integer(5)).change(type='capped-abs') 5-adic Ring with capped absolute precision 20
Zp(5).change(type='capped-abs')
or even the prime:
sage: ZpCA(3).change(p=17) 17-adic Ring with capped absolute precision 20
>>> from sage.all import * >>> ZpCA(Integer(3)).change(p=Integer(17)) 17-adic Ring with capped absolute precision 20
ZpCA(3).change(p=17)
You can switch between the ring of integers and its fraction field:
sage: ZpCA(3).change(field=True) 3-adic Field with capped relative precision 20
>>> from sage.all import * >>> ZpCA(Integer(3)).change(field=True) 3-adic Field with capped relative precision 20
ZpCA(3).change(field=True)
You can also change print modes:
sage: R = Zp(5).change(prec=5, print_mode='digits') sage: repr(~R(17)) '...13403'
>>> from sage.all import * >>> R = Zp(Integer(5)).change(prec=Integer(5), print_mode='digits') >>> repr(~R(Integer(17))) '...13403'
R = Zp(5).change(prec=5, print_mode='digits') repr(~R(17))
Changing print mode to ‘digits’ works for Eisenstein extensions:
sage: # needs sage.libs.ntl sage: S.<x> = ZZ[] sage: W.<w> = Zp(3).extension(x^4 + 9*x^2 + 3*x - 3) sage: W.print_mode() 'series' sage: W.change(print_mode='digits').print_mode() 'digits'
>>> from sage.all import * >>> # needs sage.libs.ntl >>> S = ZZ['x']; (x,) = S._first_ngens(1) >>> W = Zp(Integer(3)).extension(x**Integer(4) + Integer(9)*x**Integer(2) + Integer(3)*x - Integer(3), names=('w',)); (w,) = W._first_ngens(1) >>> W.print_mode() 'series' >>> W.change(print_mode='digits').print_mode() 'digits'
# needs sage.libs.ntl S.<x> = ZZ[] W.<w> = Zp(3).extension(x^4 + 9*x^2 + 3*x - 3) W.print_mode() W.change(print_mode='digits').print_mode()
You can change extensions:
sage: # needs sage.libs.flint sage: K.<a> = QqFP(125, prec=4) sage: K.change(q=64) 2-adic Unramified Extension Field in a defined by x^6 + x^4 + x^3 + x + 1 sage: R.<x> = QQ[] sage: K.change(modulus = x^2 - x + 2, print_pos=False) 5-adic Unramified Extension Field in a defined by x^2 - x + 2
>>> from sage.all import * >>> # needs sage.libs.flint >>> K = QqFP(Integer(125), prec=Integer(4), names=('a',)); (a,) = K._first_ngens(1) >>> K.change(q=Integer(64)) 2-adic Unramified Extension Field in a defined by x^6 + x^4 + x^3 + x + 1 >>> R = QQ['x']; (x,) = R._first_ngens(1) >>> K.change(modulus = x**Integer(2) - x + Integer(2), print_pos=False) 5-adic Unramified Extension Field in a defined by x^2 - x + 2
# needs sage.libs.flint K.<a> = QqFP(125, prec=4) K.change(q=64) R.<x> = QQ[] K.change(modulus = x^2 - x + 2, print_pos=False)
and variable names:
sage: K.change(names='b') # needs sage.libs.flint 5-adic Unramified Extension Field in b defined by x^3 + 3*x + 3
>>> from sage.all import * >>> K.change(names='b') # needs sage.libs.flint 5-adic Unramified Extension Field in b defined by x^3 + 3*x + 3
K.change(names='b') # needs sage.libs.flint
and precision:
sage: # needs sage.libs.flint sage: Kup = K.change(prec=8); Kup 5-adic Unramified Extension Field in a defined by x^3 + 3*x + 3 sage: Kup.precision_cap() 8 sage: Kup.base_ring() 5-adic Field with floating precision 8
>>> from sage.all import * >>> # needs sage.libs.flint >>> Kup = K.change(prec=Integer(8)); Kup 5-adic Unramified Extension Field in a defined by x^3 + 3*x + 3 >>> Kup.precision_cap() 8 >>> Kup.base_ring() 5-adic Field with floating precision 8
# needs sage.libs.flint Kup = K.change(prec=8); Kup Kup.precision_cap() Kup.base_ring()
If you decrease the precision, the precision of the base stays the same:
sage: # needs sage.libs.flint sage: Kdown = K.change(prec=2); Kdown 5-adic Unramified Extension Field in a defined by x^3 + 3*x + 3 sage: Kdown.precision_cap() 2 sage: Kdown.base_ring() 5-adic Field with floating precision 4
>>> from sage.all import * >>> # needs sage.libs.flint >>> Kdown = K.change(prec=Integer(2)); Kdown 5-adic Unramified Extension Field in a defined by x^3 + 3*x + 3 >>> Kdown.precision_cap() 2 >>> Kdown.base_ring() 5-adic Field with floating precision 4
# needs sage.libs.flint Kdown = K.change(prec=2); Kdown Kdown.precision_cap() Kdown.base_ring()
Changing the prime works for extensions:
sage: # needs sage.libs.ntl sage: x = polygen(ZZ) sage: R.<a> = Zp(5).extension(x^2 + 2) sage: S = R.change(p=7) sage: S.defining_polynomial(exact=True) x^2 + 2 sage: A.<y> = Zp(5)[] sage: R.<a> = Zp(5).extension(y^2 + 2) sage: S = R.change(p=7) sage: S.defining_polynomial(exact=True) y^2 + 2
>>> from sage.all import * >>> # needs sage.libs.ntl >>> x = polygen(ZZ) >>> R = Zp(Integer(5)).extension(x**Integer(2) + Integer(2), names=('a',)); (a,) = R._first_ngens(1) >>> S = R.change(p=Integer(7)) >>> S.defining_polynomial(exact=True) x^2 + 2 >>> A = Zp(Integer(5))['y']; (y,) = A._first_ngens(1) >>> R = Zp(Integer(5)).extension(y**Integer(2) + Integer(2), names=('a',)); (a,) = R._first_ngens(1) >>> S = R.change(p=Integer(7)) >>> S.defining_polynomial(exact=True) y^2 + 2
# needs sage.libs.ntl x = polygen(ZZ) R.<a> = Zp(5).extension(x^2 + 2) S = R.change(p=7) S.defining_polynomial(exact=True) A.<y> = Zp(5)[] R.<a> = Zp(5).extension(y^2 + 2) S = R.change(p=7) S.defining_polynomial(exact=True)
sage: # needs sage.libs.ntl sage: R.<a> = Zq(5^3) sage: S = R.change(prec=50) sage: S.defining_polynomial(exact=True) x^3 + 3*x + 3
>>> from sage.all import * >>> # needs sage.libs.ntl >>> R = Zq(Integer(5)**Integer(3), names=('a',)); (a,) = R._first_ngens(1) >>> S = R.change(prec=Integer(50)) >>> S.defining_polynomial(exact=True) x^3 + 3*x + 3
# needs sage.libs.ntl R.<a> = Zq(5^3) S = R.change(prec=50) S.defining_polynomial(exact=True)
>>> from sage.all import * >>> # needs sage.libs.ntl >>> R = Zq(Integer(5)**Integer(3), names=('a',)); (a,) = R._first_ngens(1) >>> S = R.change(prec=Integer(50)) >>> S.defining_polynomial(exact=True) x^3 + 3*x + 3
# needs sage.libs.ntl R.<a> = Zq(5^3) S = R.change(prec=50) S.defining_polynomial(exact=True)
Changing label for lattice precision (the precision lattice is not copied):
sage: R = ZpLC(37, (8,11)) sage: S = R.change(label = "change"); S 37-adic Ring with lattice-cap precision (label: change) sage: S.change(label = "new") 37-adic Ring with lattice-cap precision (label: new)
>>> from sage.all import * >>> R = ZpLC(Integer(37), (Integer(8),Integer(11))) >>> S = R.change(label = "change"); S 37-adic Ring with lattice-cap precision (label: change) >>> S.change(label = "new") 37-adic Ring with lattice-cap precision (label: new)
R = ZpLC(37, (8,11)) S = R.change(label = "change"); S S.change(label = "new")
- defining_polynomial(var='x', exact=False)[source]¶
Return the defining polynomial of this local ring.
INPUT:
var
– string (default:'x'
); the name of the variableexact
– boolean (default:False
); whether to return the underlying exact defining polynomial rather than the one with coefficients in the base ring
OUTPUT: the defining polynomial of this ring as an extension over its ground ring
EXAMPLES:
sage: R = Zp(3, 3, 'fixed-mod') sage: R.defining_polynomial().parent() Univariate Polynomial Ring in x over 3-adic Ring of fixed modulus 3^3 sage: R.defining_polynomial('foo') foo sage: R.defining_polynomial(exact=True).parent() Univariate Polynomial Ring in x over Integer Ring
>>> from sage.all import * >>> R = Zp(Integer(3), Integer(3), 'fixed-mod') >>> R.defining_polynomial().parent() Univariate Polynomial Ring in x over 3-adic Ring of fixed modulus 3^3 >>> R.defining_polynomial('foo') foo >>> R.defining_polynomial(exact=True).parent() Univariate Polynomial Ring in x over Integer Ring
R = Zp(3, 3, 'fixed-mod') R.defining_polynomial().parent() R.defining_polynomial('foo') R.defining_polynomial(exact=True).parent()
- degree()[source]¶
Return the degree of this extension.
Raise an error if the base ring/field is itself an extension.
EXAMPLES:
sage: K.<a> = Qq(3^5) # needs sage.libs.ntl sage: K.degree() # needs sage.libs.ntl 5 sage: R.<x> = QQ[] sage: L.<pi> = Qp(3).extension(x^2 - 3) # needs sage.libs.ntl sage: L.degree() # needs sage.libs.ntl 2
>>> from sage.all import * >>> K = Qq(Integer(3)**Integer(5), names=('a',)); (a,) = K._first_ngens(1)# needs sage.libs.ntl >>> K.degree() # needs sage.libs.ntl 5 >>> R = QQ['x']; (x,) = R._first_ngens(1) >>> L = Qp(Integer(3)).extension(x**Integer(2) - Integer(3), names=('pi',)); (pi,) = L._first_ngens(1)# needs sage.libs.ntl >>> L.degree() # needs sage.libs.ntl 2
K.<a> = Qq(3^5) # needs sage.libs.ntl K.degree() # needs sage.libs.ntl R.<x> = QQ[] L.<pi> = Qp(3).extension(x^2 - 3) # needs sage.libs.ntl L.degree() # needs sage.libs.ntl
- e()[source]¶
Return the ramification index of this extension.
Raise an error if the base ring/field is itself an extension.
EXAMPLES:
sage: K.<a> = Qq(3^5) # needs sage.libs.ntl sage: K.e() # needs sage.libs.ntl 1 sage: R.<x> = QQ[] sage: L.<pi> = Qp(3).extension(x^2 - 3) # needs sage.libs.ntl sage: L.e() # needs sage.libs.ntl 2
>>> from sage.all import * >>> K = Qq(Integer(3)**Integer(5), names=('a',)); (a,) = K._first_ngens(1)# needs sage.libs.ntl >>> K.e() # needs sage.libs.ntl 1 >>> R = QQ['x']; (x,) = R._first_ngens(1) >>> L = Qp(Integer(3)).extension(x**Integer(2) - Integer(3), names=('pi',)); (pi,) = L._first_ngens(1)# needs sage.libs.ntl >>> L.e() # needs sage.libs.ntl 2
K.<a> = Qq(3^5) # needs sage.libs.ntl K.e() # needs sage.libs.ntl R.<x> = QQ[] L.<pi> = Qp(3).extension(x^2 - 3) # needs sage.libs.ntl L.e() # needs sage.libs.ntl
- ext(*args, **kwds)[source]¶
Construct an extension of
self
. Seeextension()
for more details.EXAMPLES:
sage: A = Zp(7,10) sage: S.<x> = A[] # needs sage.libs.ntl sage: B.<t> = A.ext(x^2 + 7) # needs sage.libs.ntl sage: B.uniformiser() # needs sage.libs.ntl t + O(t^21)
>>> from sage.all import * >>> A = Zp(Integer(7),Integer(10)) >>> S = A['x']; (x,) = S._first_ngens(1)# needs sage.libs.ntl >>> B = A.ext(x**Integer(2) + Integer(7), names=('t',)); (t,) = B._first_ngens(1)# needs sage.libs.ntl >>> B.uniformiser() # needs sage.libs.ntl t + O(t^21)
A = Zp(7,10) S.<x> = A[] # needs sage.libs.ntl B.<t> = A.ext(x^2 + 7) # needs sage.libs.ntl B.uniformiser() # needs sage.libs.ntl
- f()[source]¶
Return the degree of the residual extension.
Raise an error if the base ring/field is itself an extension.
EXAMPLES:
sage: K.<a> = Qq(3^5) # needs sage.libs.ntl sage: K.f() # needs sage.libs.ntl 5 sage: R.<x> = QQ[] sage: L.<pi> = Qp(3).extension(x^2 - 3) # needs sage.libs.ntl sage: L.f() # needs sage.libs.ntl 1
>>> from sage.all import * >>> K = Qq(Integer(3)**Integer(5), names=('a',)); (a,) = K._first_ngens(1)# needs sage.libs.ntl >>> K.f() # needs sage.libs.ntl 5 >>> R = QQ['x']; (x,) = R._first_ngens(1) >>> L = Qp(Integer(3)).extension(x**Integer(2) - Integer(3), names=('pi',)); (pi,) = L._first_ngens(1)# needs sage.libs.ntl >>> L.f() # needs sage.libs.ntl 1
K.<a> = Qq(3^5) # needs sage.libs.ntl K.f() # needs sage.libs.ntl R.<x> = QQ[] L.<pi> = Qp(3).extension(x^2 - 3) # needs sage.libs.ntl L.f() # needs sage.libs.ntl
- ground_ring()[source]¶
Return
self
.Will be overridden by extensions.
INPUT:
self
– a local ring
OUTPUT: the ground ring of
self
, i.e., itselfEXAMPLES:
sage: R = Zp(3, 5, 'fixed-mod') sage: S = Zp(3, 4, 'fixed-mod') sage: R.ground_ring() is R True sage: S.ground_ring() is R False
>>> from sage.all import * >>> R = Zp(Integer(3), Integer(5), 'fixed-mod') >>> S = Zp(Integer(3), Integer(4), 'fixed-mod') >>> R.ground_ring() is R True >>> S.ground_ring() is R False
R = Zp(3, 5, 'fixed-mod') S = Zp(3, 4, 'fixed-mod') R.ground_ring() is R S.ground_ring() is R
- ground_ring_of_tower()[source]¶
Return
self
.Will be overridden by extensions.
INPUT:
self
– a \(p\)-adic ring
OUTPUT: the ground ring of the tower for
self
, i.e., itselfEXAMPLES:
sage: R = Zp(5) sage: R.ground_ring_of_tower() 5-adic Ring with capped relative precision 20
>>> from sage.all import * >>> R = Zp(Integer(5)) >>> R.ground_ring_of_tower() 5-adic Ring with capped relative precision 20
R = Zp(5) R.ground_ring_of_tower()
- inertia_degree()[source]¶
Return the degree of the residual extension.
Raise an error if the base ring/field is itself an extension.
EXAMPLES:
sage: K.<a> = Qq(3^5) # needs sage.libs.ntl sage: K.inertia_degree() # needs sage.libs.ntl 5 sage: R.<x> = QQ[] sage: L.<pi> = Qp(3).extension(x^2 - 3) # needs sage.libs.ntl sage: L.inertia_degree() # needs sage.libs.ntl 1
>>> from sage.all import * >>> K = Qq(Integer(3)**Integer(5), names=('a',)); (a,) = K._first_ngens(1)# needs sage.libs.ntl >>> K.inertia_degree() # needs sage.libs.ntl 5 >>> R = QQ['x']; (x,) = R._first_ngens(1) >>> L = Qp(Integer(3)).extension(x**Integer(2) - Integer(3), names=('pi',)); (pi,) = L._first_ngens(1)# needs sage.libs.ntl >>> L.inertia_degree() # needs sage.libs.ntl 1
K.<a> = Qq(3^5) # needs sage.libs.ntl K.inertia_degree() # needs sage.libs.ntl R.<x> = QQ[] L.<pi> = Qp(3).extension(x^2 - 3) # needs sage.libs.ntl L.inertia_degree() # needs sage.libs.ntl
- inertia_subring()[source]¶
Return the inertia subring, i.e.
self
.INPUT:
self
– a local ring
OUTPUT: the inertia subring of
self
, i.e., itselfEXAMPLES:
sage: R = Zp(5) sage: R.inertia_subring() 5-adic Ring with capped relative precision 20
>>> from sage.all import * >>> R = Zp(Integer(5)) >>> R.inertia_subring() 5-adic Ring with capped relative precision 20
R = Zp(5) R.inertia_subring()
- is_capped_absolute()[source]¶
Return whether this \(p\)-adic ring bounds precision in a capped absolute fashion.
The absolute precision of an element is the power of \(p\) modulo which that element is defined. In a capped absolute ring, the absolute precision of elements are bounded by a constant depending on the ring.
EXAMPLES:
sage: R = ZpCA(5, 15) sage: R.is_capped_absolute() True sage: R(5^7) 5^7 + O(5^15) sage: S = Zp(5, 15) sage: S.is_capped_absolute() False sage: S(5^7) 5^7 + O(5^22)
>>> from sage.all import * >>> R = ZpCA(Integer(5), Integer(15)) >>> R.is_capped_absolute() True >>> R(Integer(5)**Integer(7)) 5^7 + O(5^15) >>> S = Zp(Integer(5), Integer(15)) >>> S.is_capped_absolute() False >>> S(Integer(5)**Integer(7)) 5^7 + O(5^22)
R = ZpCA(5, 15) R.is_capped_absolute() R(5^7) S = Zp(5, 15) S.is_capped_absolute() S(5^7)
- is_capped_relative()[source]¶
Return whether this \(p\)-adic ring bounds precision in a capped relative fashion.
The relative precision of an element is the power of \(p\) modulo which the unit part of that element is defined. In a capped relative ring, the relative precision of elements are bounded by a constant depending on the ring.
EXAMPLES:
sage: R = ZpCA(5, 15) sage: R.is_capped_relative() False sage: R(5^7) 5^7 + O(5^15) sage: S = Zp(5, 15) sage: S.is_capped_relative() True sage: S(5^7) 5^7 + O(5^22)
>>> from sage.all import * >>> R = ZpCA(Integer(5), Integer(15)) >>> R.is_capped_relative() False >>> R(Integer(5)**Integer(7)) 5^7 + O(5^15) >>> S = Zp(Integer(5), Integer(15)) >>> S.is_capped_relative() True >>> S(Integer(5)**Integer(7)) 5^7 + O(5^22)
R = ZpCA(5, 15) R.is_capped_relative() R(5^7) S = Zp(5, 15) S.is_capped_relative() S(5^7)
- is_exact()[source]¶
Return whether this \(p\)-adic ring is exact, i.e.
False
.EXAMPLES:
sage: R = Zp(5, 3, 'fixed-mod'); R.is_exact() False
>>> from sage.all import * >>> R = Zp(Integer(5), Integer(3), 'fixed-mod'); R.is_exact() False
R = Zp(5, 3, 'fixed-mod'); R.is_exact()
- is_fixed_mod()[source]¶
Return whether this \(p\)-adic ring bounds precision in a fixed modulus fashion.
The absolute precision of an element is the power of \(p\) modulo which that element is defined. In a fixed modulus ring, the absolute precision of every element is defined to be the precision cap of the parent. This means that some operations, such as division by \(p\), don’t return a well defined answer.
EXAMPLES:
sage: R = ZpFM(5,15) sage: R.is_fixed_mod() True sage: R(5^7,absprec=9) 5^7 sage: S = ZpCA(5, 15) sage: S.is_fixed_mod() False sage: S(5^7,absprec=9) 5^7 + O(5^9)
>>> from sage.all import * >>> R = ZpFM(Integer(5),Integer(15)) >>> R.is_fixed_mod() True >>> R(Integer(5)**Integer(7),absprec=Integer(9)) 5^7 >>> S = ZpCA(Integer(5), Integer(15)) >>> S.is_fixed_mod() False >>> S(Integer(5)**Integer(7),absprec=Integer(9)) 5^7 + O(5^9)
R = ZpFM(5,15) R.is_fixed_mod() R(5^7,absprec=9) S = ZpCA(5, 15) S.is_fixed_mod() S(5^7,absprec=9)
- is_floating_point()[source]¶
Return whether this \(p\)-adic ring bounds precision in a floating point fashion.
The relative precision of an element is the power of \(p\) modulo which the unit part of that element is defined. In a floating point ring, elements do not store precision, but arithmetic operations truncate to a relative precision depending on the ring.
EXAMPLES:
sage: R = ZpCR(5, 15) sage: R.is_floating_point() False sage: R(5^7) 5^7 + O(5^22) sage: S = ZpFP(5, 15) sage: S.is_floating_point() True sage: S(5^7) 5^7
>>> from sage.all import * >>> R = ZpCR(Integer(5), Integer(15)) >>> R.is_floating_point() False >>> R(Integer(5)**Integer(7)) 5^7 + O(5^22) >>> S = ZpFP(Integer(5), Integer(15)) >>> S.is_floating_point() True >>> S(Integer(5)**Integer(7)) 5^7
R = ZpCR(5, 15) R.is_floating_point() R(5^7) S = ZpFP(5, 15) S.is_floating_point() S(5^7)
- is_lattice_prec()[source]¶
Return whether this \(p\)-adic ring bounds precision using a lattice model.
In lattice precision, relationships between elements are stored in a precision object of the parent, which allows for optimal precision tracking at the cost of increased memory usage and runtime.
EXAMPLES:
sage: R = ZpCR(5, 15) sage: R.is_lattice_prec() False sage: x = R(25, 8) sage: x - x O(5^8) sage: S = ZpLC(5, 15) doctest:...: FutureWarning: This class/method/function is marked as experimental. It, its functionality or its interface might change without a formal deprecation. See https://github.com/sagemath/sage/issues/23505 for details. sage: S.is_lattice_prec() True sage: x = S(25, 8) sage: x - x O(5^30)
>>> from sage.all import * >>> R = ZpCR(Integer(5), Integer(15)) >>> R.is_lattice_prec() False >>> x = R(Integer(25), Integer(8)) >>> x - x O(5^8) >>> S = ZpLC(Integer(5), Integer(15)) doctest:...: FutureWarning: This class/method/function is marked as experimental. It, its functionality or its interface might change without a formal deprecation. See https://github.com/sagemath/sage/issues/23505 for details. >>> S.is_lattice_prec() True >>> x = S(Integer(25), Integer(8)) >>> x - x O(5^30)
R = ZpCR(5, 15) R.is_lattice_prec() x = R(25, 8) x - x S = ZpLC(5, 15) S.is_lattice_prec() x = S(25, 8) x - x
- is_relaxed()[source]¶
Return whether this \(p\)-adic ring bounds precision in a relaxed fashion.
In a relaxed ring, elements have mechanisms for computing themselves to greater precision.
EXAMPLES:
sage: R = Zp(5) sage: R.is_relaxed() False
>>> from sage.all import * >>> R = Zp(Integer(5)) >>> R.is_relaxed() False
R = Zp(5) R.is_relaxed()
- maximal_unramified_subextension()[source]¶
Return the maximal unramified subextension.
INPUT:
self
– a local ring
OUTPUT: the maximal unramified subextension of
self
EXAMPLES:
sage: R = Zp(5) sage: R.maximal_unramified_subextension() 5-adic Ring with capped relative precision 20
>>> from sage.all import * >>> R = Zp(Integer(5)) >>> R.maximal_unramified_subextension() 5-adic Ring with capped relative precision 20
R = Zp(5) R.maximal_unramified_subextension()
- precision_cap()[source]¶
Return the precision cap for this ring.
EXAMPLES:
sage: R = Zp(3, 10,'fixed-mod'); R.precision_cap() 10 sage: R = Zp(3, 10,'capped-rel'); R.precision_cap() 10 sage: R = Zp(3, 10,'capped-abs'); R.precision_cap() 10
>>> from sage.all import * >>> R = Zp(Integer(3), Integer(10),'fixed-mod'); R.precision_cap() 10 >>> R = Zp(Integer(3), Integer(10),'capped-rel'); R.precision_cap() 10 >>> R = Zp(Integer(3), Integer(10),'capped-abs'); R.precision_cap() 10
R = Zp(3, 10,'fixed-mod'); R.precision_cap() R = Zp(3, 10,'capped-rel'); R.precision_cap() R = Zp(3, 10,'capped-abs'); R.precision_cap()
Note
This will have different meanings depending on the type of local ring. For fixed modulus rings, all elements are considered modulo
self.prime()^self.precision_cap()
. For rings with an absolute cap (i.e. the classpAdicRingCappedAbsolute
), each element has a precision that is tracked and is bounded above byself.precision_cap()
. Rings with relative caps (e.g. the classpAdicRingCappedRelative
) are the same except that the precision is the precision of the unit part of each element.
- ramification_index()[source]¶
Return the ramification index of this extension.
Raise an error if the base ring/field is itself an extension.
EXAMPLES:
sage: K.<a> = Qq(3^5) # needs sage.libs.ntl sage: K.ramification_index() # needs sage.libs.ntl 1 sage: R.<x> = QQ[] sage: L.<pi> = Qp(3).extension(x^2 - 3) # needs sage.libs.ntl sage: L.ramification_index() # needs sage.libs.ntl 2
>>> from sage.all import * >>> K = Qq(Integer(3)**Integer(5), names=('a',)); (a,) = K._first_ngens(1)# needs sage.libs.ntl >>> K.ramification_index() # needs sage.libs.ntl 1 >>> R = QQ['x']; (x,) = R._first_ngens(1) >>> L = Qp(Integer(3)).extension(x**Integer(2) - Integer(3), names=('pi',)); (pi,) = L._first_ngens(1)# needs sage.libs.ntl >>> L.ramification_index() # needs sage.libs.ntl 2
K.<a> = Qq(3^5) # needs sage.libs.ntl K.ramification_index() # needs sage.libs.ntl R.<x> = QQ[] L.<pi> = Qp(3).extension(x^2 - 3) # needs sage.libs.ntl L.ramification_index() # needs sage.libs.ntl
- relative_degree()[source]¶
Return the degree of this extension over its base field/ring.
EXAMPLES:
sage: K.<a> = Qq(3^5) # needs sage.libs.ntl sage: K.relative_degree() # needs sage.libs.ntl 5 sage: R.<x> = QQ[] sage: L.<pi> = Qp(3).extension(x^2 - 3) # needs sage.libs.ntl sage: L.relative_degree() # needs sage.libs.ntl 2
>>> from sage.all import * >>> K = Qq(Integer(3)**Integer(5), names=('a',)); (a,) = K._first_ngens(1)# needs sage.libs.ntl >>> K.relative_degree() # needs sage.libs.ntl 5 >>> R = QQ['x']; (x,) = R._first_ngens(1) >>> L = Qp(Integer(3)).extension(x**Integer(2) - Integer(3), names=('pi',)); (pi,) = L._first_ngens(1)# needs sage.libs.ntl >>> L.relative_degree() # needs sage.libs.ntl 2
K.<a> = Qq(3^5) # needs sage.libs.ntl K.relative_degree() # needs sage.libs.ntl R.<x> = QQ[] L.<pi> = Qp(3).extension(x^2 - 3) # needs sage.libs.ntl L.relative_degree() # needs sage.libs.ntl
- relative_e()[source]¶
Return the ramification index of this extension over its base ring/field.
EXAMPLES:
sage: K.<a> = Qq(3^5) # needs sage.libs.ntl sage: K.relative_e() # needs sage.libs.ntl 1 sage: R.<x> = QQ[] sage: L.<pi> = Qp(3).extension(x^2 - 3) # needs sage.libs.ntl sage: L.relative_e() # needs sage.libs.ntl 2
>>> from sage.all import * >>> K = Qq(Integer(3)**Integer(5), names=('a',)); (a,) = K._first_ngens(1)# needs sage.libs.ntl >>> K.relative_e() # needs sage.libs.ntl 1 >>> R = QQ['x']; (x,) = R._first_ngens(1) >>> L = Qp(Integer(3)).extension(x**Integer(2) - Integer(3), names=('pi',)); (pi,) = L._first_ngens(1)# needs sage.libs.ntl >>> L.relative_e() # needs sage.libs.ntl 2
K.<a> = Qq(3^5) # needs sage.libs.ntl K.relative_e() # needs sage.libs.ntl R.<x> = QQ[] L.<pi> = Qp(3).extension(x^2 - 3) # needs sage.libs.ntl L.relative_e() # needs sage.libs.ntl
- relative_f()[source]¶
Return the degree of the residual extension over its base ring/field.
EXAMPLES:
sage: K.<a> = Qq(3^5) # needs sage.libs.ntl sage: K.relative_f() # needs sage.libs.ntl 5 sage: R.<x> = QQ[] sage: L.<pi> = Qp(3).extension(x^2 - 3) # needs sage.libs.ntl sage: L.relative_f() # needs sage.libs.ntl 1
>>> from sage.all import * >>> K = Qq(Integer(3)**Integer(5), names=('a',)); (a,) = K._first_ngens(1)# needs sage.libs.ntl >>> K.relative_f() # needs sage.libs.ntl 5 >>> R = QQ['x']; (x,) = R._first_ngens(1) >>> L = Qp(Integer(3)).extension(x**Integer(2) - Integer(3), names=('pi',)); (pi,) = L._first_ngens(1)# needs sage.libs.ntl >>> L.relative_f() # needs sage.libs.ntl 1
K.<a> = Qq(3^5) # needs sage.libs.ntl K.relative_f() # needs sage.libs.ntl R.<x> = QQ[] L.<pi> = Qp(3).extension(x^2 - 3) # needs sage.libs.ntl L.relative_f() # needs sage.libs.ntl
- relative_inertia_degree()[source]¶
Return the degree of the residual extension over its base ring/field.
EXAMPLES:
sage: K.<a> = Qq(3^5) # needs sage.libs.ntl sage: K.relative_inertia_degree() # needs sage.libs.ntl 5 sage: R.<x> = QQ[] sage: L.<pi> = Qp(3).extension(x^2 - 3) # needs sage.libs.ntl sage: L.relative_inertia_degree() # needs sage.libs.ntl 1
>>> from sage.all import * >>> K = Qq(Integer(3)**Integer(5), names=('a',)); (a,) = K._first_ngens(1)# needs sage.libs.ntl >>> K.relative_inertia_degree() # needs sage.libs.ntl 5 >>> R = QQ['x']; (x,) = R._first_ngens(1) >>> L = Qp(Integer(3)).extension(x**Integer(2) - Integer(3), names=('pi',)); (pi,) = L._first_ngens(1)# needs sage.libs.ntl >>> L.relative_inertia_degree() # needs sage.libs.ntl 1
K.<a> = Qq(3^5) # needs sage.libs.ntl K.relative_inertia_degree() # needs sage.libs.ntl R.<x> = QQ[] L.<pi> = Qp(3).extension(x^2 - 3) # needs sage.libs.ntl L.relative_inertia_degree() # needs sage.libs.ntl
- relative_ramification_index()[source]¶
Return the ramification index of this extension over its base ring/field.
EXAMPLES:
sage: K.<a> = Qq(3^5) # needs sage.libs.ntl sage: K.relative_ramification_index() # needs sage.libs.ntl 1 sage: R.<x> = QQ[] sage: L.<pi> = Qp(3).extension(x^2 - 3) # needs sage.libs.ntl sage: L.relative_ramification_index() # needs sage.libs.ntl 2
>>> from sage.all import * >>> K = Qq(Integer(3)**Integer(5), names=('a',)); (a,) = K._first_ngens(1)# needs sage.libs.ntl >>> K.relative_ramification_index() # needs sage.libs.ntl 1 >>> R = QQ['x']; (x,) = R._first_ngens(1) >>> L = Qp(Integer(3)).extension(x**Integer(2) - Integer(3), names=('pi',)); (pi,) = L._first_ngens(1)# needs sage.libs.ntl >>> L.relative_ramification_index() # needs sage.libs.ntl 2
K.<a> = Qq(3^5) # needs sage.libs.ntl K.relative_ramification_index() # needs sage.libs.ntl R.<x> = QQ[] L.<pi> = Qp(3).extension(x^2 - 3) # needs sage.libs.ntl L.relative_ramification_index() # needs sage.libs.ntl
- residue_characteristic()[source]¶
Return the characteristic of
self
’s residue field.INPUT:
self
– a \(p\)-adic ring
OUTPUT: the characteristic of the residue field
EXAMPLES:
sage: R = Zp(3, 5, 'capped-rel'); R.residue_characteristic() 3
>>> from sage.all import * >>> R = Zp(Integer(3), Integer(5), 'capped-rel'); R.residue_characteristic() 3
R = Zp(3, 5, 'capped-rel'); R.residue_characteristic()
- uniformiser()[source]¶
Return a uniformiser for
self
, ie a generator for the unique maximal ideal.EXAMPLES:
sage: R = Zp(5) sage: R.uniformiser() 5 + O(5^21) sage: A = Zp(7,10) sage: S.<x> = A[] # needs sage.libs.ntl sage: B.<t> = A.ext(x^2+7) # needs sage.libs.ntl sage: B.uniformiser() # needs sage.libs.ntl t + O(t^21)
>>> from sage.all import * >>> R = Zp(Integer(5)) >>> R.uniformiser() 5 + O(5^21) >>> A = Zp(Integer(7),Integer(10)) >>> S = A['x']; (x,) = S._first_ngens(1)# needs sage.libs.ntl >>> B = A.ext(x**Integer(2)+Integer(7), names=('t',)); (t,) = B._first_ngens(1)# needs sage.libs.ntl >>> B.uniformiser() # needs sage.libs.ntl t + O(t^21)
R = Zp(5) R.uniformiser() A = Zp(7,10) S.<x> = A[] # needs sage.libs.ntl B.<t> = A.ext(x^2+7) # needs sage.libs.ntl B.uniformiser() # needs sage.libs.ntl
- uniformiser_pow(n)[source]¶
Return the \(n\)-th power of the uniformiser of
self
(as an element ofself
).EXAMPLES:
sage: R = Zp(5) sage: R.uniformiser_pow(5) 5^5 + O(5^25)
>>> from sage.all import * >>> R = Zp(Integer(5)) >>> R.uniformiser_pow(Integer(5)) 5^5 + O(5^25)
R = Zp(5) R.uniformiser_pow(5)