Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Merge branch 'u/saraedum/a_framework_for_discrete_valuations_in_sage'…
Browse files Browse the repository at this point in the history
… of git://trac.sagemath.org/sage into t/21869/a_framework_for_discrete_valuations_in_sage
  • Loading branch information
saraedum committed Jan 19, 2018
2 parents 963ceb7 + 2142891 commit 4900f56
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 10 deletions.
6 changes: 3 additions & 3 deletions src/doc/en/reference/valuations/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ Internally, all the above is backed by the algorithms described in
``K.valuation(x - 4)`` to the field `L` above to outline how this works
internally.

First, the valuation on `K` is induced by a valuation on `\Q[x]`. To construct
this valuation, we start from the trivial valuation on `\Q` and consider its
induced Gauss valuation on `\Q[x]`, i.e., the valuation that assigns to a
First, the valuation on `K` is induced by a valuation on `\QQ[x]`. To construct
this valuation, we start from the trivial valuation on `\\Q` and consider its
induced Gauss valuation on `\\Q[x]`, i.e., the valuation that assigns to a
polynomial the minimum of the coefficient valuations::

sage: R.<x> = QQ[]
Expand Down
18 changes: 14 additions & 4 deletions src/sage/rings/padics/padic_valuation.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def create_key_and_extra_args_for_number_field_from_valuation(self, R, v, prime,
# the one approximated by v.
vK = v.restriction(v.domain().base_ring()).extension(K)
if approximants is None:
approximants = vK.mac_lane_approximants(G)
approximants = vK.mac_lane_approximants(G, require_incomparability=True)
approximants = [approximant.extension(v.domain()) for approximant in approximants]
approximant = vK.mac_lane_approximant(G, v, approximants=tuple(approximants))

Expand Down Expand Up @@ -298,7 +298,7 @@ def create_key_and_extra_args_for_number_field_from_ideal(self, R, I, prime):
if len(F) != 1:
raise ValueError("%r does not lie over a single prime of %r"%(I, K))
vK = K.valuation(F[0][0])
candidates = vK.mac_lane_approximants(G)
candidates = vK.mac_lane_approximants(G, require_incomparability=True)

candidates_for_I = [c for c in candidates if all(c(g.polynomial()) > 0 for g in I.gens())]
assert(len(candidates_for_I) > 0) # This should not be possible, unless I contains a unit
Expand Down Expand Up @@ -687,7 +687,7 @@ def _extensions_to_quotient(self, ring, approximants=None):
"""
from sage.rings.valuation.valuation_space import DiscretePseudoValuationSpace
parent = DiscretePseudoValuationSpace(ring)
approximants = approximants or self.mac_lane_approximants(ring.modulus().change_ring(self.domain()), assume_squarefree=True)
approximants = approximants or self.mac_lane_approximants(ring.modulus().change_ring(self.domain()), assume_squarefree=True, require_incomparability=True)
return [pAdicValuation(ring, approximant, approximants) for approximant in approximants]

def extensions(self, ring):
Expand Down Expand Up @@ -736,6 +736,16 @@ def extensions(self, ring):
sage: w(w.uniformizer())
1/4
A case where the extensions could not be separated at some point::
sage: v = QQ.valuation(2)
sage: R.<x> = QQ[]
sage: F = x^48 + 120*x^45 + 56*x^42 + 108*x^36 + 32*x^33 + 40*x^30 + 48*x^27 + 80*x^24 + 112*x^21 + 96*x^18 + 96*x^15 + 24*x^12 + 96*x^9 + 16*x^6 + 96*x^3 + 68
sage: L.<a> = QQ.extension(F)
sage: v.extensions(L)
[[ 2-adic valuation, v(x) = 1/24, v(x^24 + 4*x^18 + 10*x^12 + 12*x^6 + 8*x^3 + 6) = 29/8 ]-adic valuation,
[ 2-adic valuation, v(x) = 1/24, v(x^24 + 4*x^18 + 2*x^12 + 12*x^6 + 8*x^3 + 6) = 29/8 ]-adic valuation]
"""
if self.domain() is ring:
return [self]
Expand All @@ -761,7 +771,7 @@ def extensions(self, ring):
if ring.base_ring().fraction_field() is self.domain().fraction_field():
from sage.rings.valuation.valuation_space import DiscretePseudoValuationSpace
parent = DiscretePseudoValuationSpace(ring)
approximants = self.mac_lane_approximants(ring.fraction_field().relative_polynomial().change_ring(self.domain()), assume_squarefree=True)
approximants = self.mac_lane_approximants(ring.fraction_field().relative_polynomial().change_ring(self.domain()), assume_squarefree=True, require_incomparability=True)
return [pAdicValuation(ring, approximant, approximants) for approximant in approximants]
if ring.base_ring() is not ring and self.domain().is_subring(ring.base_ring()):
return sum([w.extensions(ring) for w in self.extensions(ring.base_ring())], [])
Expand Down
4 changes: 2 additions & 2 deletions src/sage/rings/valuation/mapped_valuation.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,8 +504,8 @@ def upper_bound(self, x):
sage: L.<t> = K.extension(t^2 + 1)
sage: v = valuations.pAdicValuation(QQ, 5)
sage: u,uu = v.extensions(L)
sage: u.upper_bound(t + 2)
3
sage: u.upper_bound(t + 2) >= 1
True
sage: u(t + 2)
1
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/valuation/valuation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ class MacLaneApproximantNode(object):
relevant, everything else are caches/debug info.) The boolean ``ef``
denotes whether ``v`` already has the final ramification index E and
residue degree F of this approximant. An edge V -- P represents the
relation ``P.vV.v`` (pointwise on the polynomial ring K[x]) between the
relation ``P.v`` `≤` ``V.v`` (pointwise on the polynomial ring K[x]) between the
valuations.
TESTS::
Expand Down

0 comments on commit 4900f56

Please sign in to comment.