Valuations on polynomial rings based on -adic expansions¶
This file implements a base class for discrete valuations on polynomial rings,
defined by a
AUTHORS:
Julian Rüth (2013-04-15): initial version
EXAMPLES:
The Gauss valuation
is a simple example of a valuation that relies on
sage: R.<x> = QQ[]
sage: v = GaussValuation(R, QQ.valuation(2))
>>> from sage.all import *
>>> R = QQ['x']; (x,) = R._first_ngens(1)
>>> v = GaussValuation(R, QQ.valuation(Integer(2)))
R.<x> = QQ[] v = GaussValuation(R, QQ.valuation(2))
In this case,
sage: f = x^2 + 2*x + 2
sage: list(v.coefficients(f))
[2, 2, 1]
>>> from sage.all import *
>>> f = x**Integer(2) + Integer(2)*x + Integer(2)
>>> list(v.coefficients(f))
[2, 2, 1]
f = x^2 + 2*x + 2 list(v.coefficients(f))
Often only the first few coefficients are necessary in computations, so for performance reasons, coefficients are computed lazily:
sage: v.coefficients(f)
<generator object ...coefficients at 0x...>
>>> from sage.all import *
>>> v.coefficients(f)
<generator object ...coefficients at 0x...>
v.coefficients(f)
Another example of a DevelopingValuation
is an augmented
valuation
:
sage: w = v.augmentation(x^2 + x + 1, 3)
>>> from sage.all import *
>>> w = v.augmentation(x**Integer(2) + x + Integer(1), Integer(3))
w = v.augmentation(x^2 + x + 1, 3)
Here, the expansion lists the remainders of repeated division by
sage: list(w.coefficients(f))
[x + 1, 1]
>>> from sage.all import *
>>> list(w.coefficients(f))
[x + 1, 1]
list(w.coefficients(f))
- class sage.rings.valuation.developing_valuation.DevelopingValuation(parent, phi)[source]¶
Bases:
DiscretePseudoValuation
Abstract base class for a discrete valuation of polynomials defined over the polynomial ring
domain
by the -adic development.EXAMPLES:
sage: R.<x> = QQ[] sage: v = GaussValuation(R, QQ.valuation(7))
>>> from sage.all import * >>> R = QQ['x']; (x,) = R._first_ngens(1) >>> v = GaussValuation(R, QQ.valuation(Integer(7)))
R.<x> = QQ[] v = GaussValuation(R, QQ.valuation(7))
- coefficients(f)[source]¶
Return the
-adic expansion off
.INPUT:
f
– a monic polynomial in the domain of this valuation
OUTPUT:
An iterator
of polynomials in the domain of this valuation such thatEXAMPLES:
sage: # needs sage.libs.ntl sage: R = Qp(2,5) sage: S.<x> = R[] sage: v = GaussValuation(S) sage: f = x^2 + 2*x + 3 sage: list(v.coefficients(f)) # note that these constants are in the polynomial ring [1 + 2 + O(2^5), 2 + O(2^6), 1 + O(2^5)] sage: v = v.augmentation( x^2 + x + 1, 1) sage: list(v.coefficients(f)) [(1 + O(2^5))*x + 2 + O(2^5), 1 + O(2^5)]
>>> from sage.all import * >>> # needs sage.libs.ntl >>> R = Qp(Integer(2),Integer(5)) >>> S = R['x']; (x,) = S._first_ngens(1) >>> v = GaussValuation(S) >>> f = x**Integer(2) + Integer(2)*x + Integer(3) >>> list(v.coefficients(f)) # note that these constants are in the polynomial ring [1 + 2 + O(2^5), 2 + O(2^6), 1 + O(2^5)] >>> v = v.augmentation( x**Integer(2) + x + Integer(1), Integer(1)) >>> list(v.coefficients(f)) [(1 + O(2^5))*x + 2 + O(2^5), 1 + O(2^5)]
# needs sage.libs.ntl R = Qp(2,5) S.<x> = R[] v = GaussValuation(S) f = x^2 + 2*x + 3 list(v.coefficients(f)) # note that these constants are in the polynomial ring v = v.augmentation( x^2 + x + 1, 1) list(v.coefficients(f))
- effective_degree(f, valuations=None)[source]¶
Return the effective degree of
f
with respect to this valuation.The effective degree of
is the largest such that the valuation of and the valuation of in the development coincide (see [Mac1936II] p.497.)INPUT:
f
– a nonzero polynomial in the domain of this valuation
EXAMPLES:
sage: # needs sage.libs.ntl sage: R = Zp(2,5) sage: S.<x> = R[] sage: v = GaussValuation(S) sage: v.effective_degree(x) 1 sage: v.effective_degree(2*x + 1) 0
>>> from sage.all import * >>> # needs sage.libs.ntl >>> R = Zp(Integer(2),Integer(5)) >>> S = R['x']; (x,) = S._first_ngens(1) >>> v = GaussValuation(S) >>> v.effective_degree(x) 1 >>> v.effective_degree(Integer(2)*x + Integer(1)) 0
# needs sage.libs.ntl R = Zp(2,5) S.<x> = R[] v = GaussValuation(S) v.effective_degree(x) v.effective_degree(2*x + 1)
- newton_polygon(f, valuations=None)[source]¶
Return the Newton polygon of the
-adic development off
.INPUT:
f
– a polynomial in the domain of this valuation
EXAMPLES:
sage: # needs sage.libs.ntl sage: R = Qp(2,5) sage: S.<x> = R[] sage: v = GaussValuation(S) sage: f = x^2 + 2*x + 3 sage: v.newton_polygon(f) # needs sage.geometry.polyhedron Finite Newton polygon with 2 vertices: (0, 0), (2, 0) sage: v = v.augmentation( x^2 + x + 1, 1) sage: v.newton_polygon(f) # needs sage.geometry.polyhedron Finite Newton polygon with 2 vertices: (0, 0), (1, 1) sage: v.newton_polygon( f * v.phi()^3 ) # needs sage.geometry.polyhedron Finite Newton polygon with 2 vertices: (3, 3), (4, 4)
>>> from sage.all import * >>> # needs sage.libs.ntl >>> R = Qp(Integer(2),Integer(5)) >>> S = R['x']; (x,) = S._first_ngens(1) >>> v = GaussValuation(S) >>> f = x**Integer(2) + Integer(2)*x + Integer(3) >>> v.newton_polygon(f) # needs sage.geometry.polyhedron Finite Newton polygon with 2 vertices: (0, 0), (2, 0) >>> v = v.augmentation( x**Integer(2) + x + Integer(1), Integer(1)) >>> v.newton_polygon(f) # needs sage.geometry.polyhedron Finite Newton polygon with 2 vertices: (0, 0), (1, 1) >>> v.newton_polygon( f * v.phi()**Integer(3) ) # needs sage.geometry.polyhedron Finite Newton polygon with 2 vertices: (3, 3), (4, 4)
# needs sage.libs.ntl R = Qp(2,5) S.<x> = R[] v = GaussValuation(S) f = x^2 + 2*x + 3 v.newton_polygon(f) # needs sage.geometry.polyhedron v = v.augmentation( x^2 + x + 1, 1) v.newton_polygon(f) # needs sage.geometry.polyhedron v.newton_polygon( f * v.phi()^3 ) # needs sage.geometry.polyhedron
- phi()[source]¶
Return the polynomial
, the key polynomial of this valuation.EXAMPLES:
sage: R = Zp(2,5) sage: S.<x> = R[] # needs sage.libs.ntl sage: v = GaussValuation(S) # needs sage.libs.ntl sage: v.phi() # needs sage.libs.ntl (1 + O(2^5))*x
>>> from sage.all import * >>> R = Zp(Integer(2),Integer(5)) >>> S = R['x']; (x,) = S._first_ngens(1)# needs sage.libs.ntl >>> v = GaussValuation(S) # needs sage.libs.ntl >>> v.phi() # needs sage.libs.ntl (1 + O(2^5))*x
R = Zp(2,5) S.<x> = R[] # needs sage.libs.ntl v = GaussValuation(S) # needs sage.libs.ntl v.phi() # needs sage.libs.ntl
Use
augmentation_chain()
to obtain the sequence of key polynomials of anInductiveValuation
:sage: R.<x> = QQ[] sage: v = GaussValuation(R, QQ.valuation(2)) sage: v = v.augmentation(x, 1) sage: v = v.augmentation(x^2 + 2*x + 4, 3) sage: v [ Gauss valuation induced by 2-adic valuation, v(x) = 1, v(x^2 + 2*x + 4) = 3 ] sage: [w.phi() for w in v.augmentation_chain()[:-1]] [x^2 + 2*x + 4, x]
>>> from sage.all import * >>> R = QQ['x']; (x,) = R._first_ngens(1) >>> v = GaussValuation(R, QQ.valuation(Integer(2))) >>> v = v.augmentation(x, Integer(1)) >>> v = v.augmentation(x**Integer(2) + Integer(2)*x + Integer(4), Integer(3)) >>> v [ Gauss valuation induced by 2-adic valuation, v(x) = 1, v(x^2 + 2*x + 4) = 3 ] >>> [w.phi() for w in v.augmentation_chain()[:-Integer(1)]] [x^2 + 2*x + 4, x]
R.<x> = QQ[] v = GaussValuation(R, QQ.valuation(2)) v = v.augmentation(x, 1) v = v.augmentation(x^2 + 2*x + 4, 3) v [w.phi() for w in v.augmentation_chain()[:-1]]
A similar approach can be used to obtain the key polynomials and their corresponding valuations:
sage: [(w.phi(), w.mu()) for w in v.augmentation_chain()[:-1]] [(x^2 + 2*x + 4, 3), (x, 1)]
>>> from sage.all import * >>> [(w.phi(), w.mu()) for w in v.augmentation_chain()[:-Integer(1)]] [(x^2 + 2*x + 4, 3), (x, 1)]
[(w.phi(), w.mu()) for w in v.augmentation_chain()[:-1]]
- valuations(f)[source]¶
Return the valuations of the
in the expansion .INPUT:
f
– a polynomial in the domain of this valuation
OUTPUT:
A list, each entry a rational numbers or infinity, the valuations of
EXAMPLES:
sage: # needs sage.libs.ntl sage: R = Qp(2,5) sage: S.<x> = R[] sage: v = GaussValuation(S, R.valuation()) sage: f = x^2 + 2*x + 16 sage: list(v.valuations(f)) [4, 1, 0]
>>> from sage.all import * >>> # needs sage.libs.ntl >>> R = Qp(Integer(2),Integer(5)) >>> S = R['x']; (x,) = S._first_ngens(1) >>> v = GaussValuation(S, R.valuation()) >>> f = x**Integer(2) + Integer(2)*x + Integer(16) >>> list(v.valuations(f)) [4, 1, 0]
# needs sage.libs.ntl R = Qp(2,5) S.<x> = R[] v = GaussValuation(S, R.valuation()) f = x^2 + 2*x + 16 list(v.valuations(f))