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.
{"ft_lang_label":"__label__en","ft_lang_prob":0.8382837,"math_prob":0.76666045,"size":619,"snap":"2023-40-2023-50","text_gpt3_token_len":172,"char_repetition_ratio":0.107317075,"word_repetition_ratio":0.0,"special_character_ratio":0.2714055,"punctuation_ratio":0.12781955,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.96142983,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-09-21T19:42:28Z\",\"WARC-Record-ID\":\"<urn:uuid:a0f270cd-039f-496f-989b-aadfaa8a0ff0>\",\"Content-Length\":\"60443\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:5f2deb15-1d88-4790-a6ba-1bff48496dd4>\",\"WARC-Concurrent-To\":\"<urn:uuid:a9cdd474-ef44-4d50-ad9f-880f9bf7f906>\",\"WARC-IP-Address\":\"194.254.163.53\",\"WARC-Target-URI\":\"https://ask.sagemath.org/question/10695/roots-of-p-adic-polynomials/\",\"WARC-Payload-Digest\":\"sha1:YX76RNHWYDPR5WEJRLLV36LGBGPDFA7A\",\"WARC-Block-Digest\":\"sha1:NTH2P3FDTQ7RXRHS5U276SOA7ANOTJRU\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-40/CC-MAIN-2023-40_segments_1695233506029.42_warc_CC-MAIN-20230921174008-20230921204008-00462.warc.gz\"}"}