 Hello again,

I want to get the roots of a p-adic polynomial. I wrote the following code:

p = 2
q = 4
K = Qp(p)
L.<omega> = Qq(q)
O_L = L. integer_ring()
pi = L.uniformizer()
q = L.residue_class_degree()
f = X^q + pi*X
f.roots()


This rises following error:

NotImplementedError: root finding for this polynomial not implemented


I still use version 5.10 of Sage. The compile of the latest version 5.12 is ongoing. Do I miss something or is there no way to get the roots in this case?

Will this be implemented in the future or does someone know a workaround?

Bye Lars

edit retag close merge delete

Sort by » oldest newest most voted

I think polynomial factorization and roots are not implemented over the p-adics. Essentially, we miss Hensel lifting. Ticket http://trac.sagemath.org/ticket/14828 will add some useful functions for this, but I doubt it will enter any distribution before 6.x.

more

Thanks for your fast response. This is too bad. I took a look at this ticket and it looks promising. Unfortunately my knowledge of Python is not enough to help you. Is it even possible for me as a beginner in Python and Sage to implement Hensel lifting by myself or do I need deep knowledge of Python and Sage for this task? Is there an alternative to Sage which offers the function to compute p-adic roots of p-adic polynomials? Maybe KASH, Octave, Maple or Magma? Thanks again! Bye Lars

here is a very simple and buggy Hensel lift I wrote a long time ago (I needed to lift square roots) def hensel(P, r): "Basic Hensel lifting. P'(r) must be invertible." pK = P.base_ring() w = pK.uniformiser() r = r.lift_to_precision(min(2*r.precision_absolute(), P.precision_absolute())) zero = P(r) v = zero.valuation() if v <= 0: raise ValueError, "Impossible to lift." elif v >= P.precision_absolute(): return r else: return hensel(P, r - zero / P.derivative()(r)) It fails in many important border cases, but it did its job for me. If you understand it, you can certainly make it work for you. Magma has Hensel lifting.