Skip to content
This repository has been archived by the owner on Mar 6, 2018. It is now read-only.

Commit

Permalink
Fix _equivalence_reduction for unramified steps
Browse files Browse the repository at this point in the history
  • Loading branch information
saraedum committed Dec 7, 2016
1 parent 1fd47aa commit 79b3380
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions inductive_valuation.py
Original file line number Diff line number Diff line change
Expand Up @@ -928,15 +928,18 @@ def _equivalence_reduction(self, f):
assert self.residue_ring() is v.residue_ring()
return v._equivalence_reduction(f)

valuations = list(self.valuations(f))
coefficients = list(self.coefficients(f))
valuations = list(self.valuations(f, coefficients=coefficients))
valuation = min(valuations)
for phi_divides in range(len(valuations)):
# count how many times phi divides f
if valuations[phi_divides] <= valuation:
break

if phi_divides:
f = f.parent()(list(self.coefficients(f))[phi_divides:])(self.phi())
from sage.rings.all import PolynomialRing
R = PolynomialRing(f.parent(), 'phi')
f = R(coefficients[phi_divides:])(self.phi())
valuation -= self.mu()*phi_divides

R = self.equivalence_unit(-valuation)
Expand Down

0 comments on commit 79b3380

Please sign in to comment.