#14812: p-adic root finding broken (mathematically incorrect answer)
---------------------------------+------------------------------------------
       Reporter:  robharron      |         Owner:  roed     
           Type:  defect         |        Status:  new      
       Priority:  blocker        |     Milestone:  sage-5.12
      Component:  padics         |    Resolution:           
       Keywords:  padics, roots  |   Work issues:           
Report Upstream:  N/A            |     Reviewers:           
        Authors:                 |     Merged in:           
   Dependencies:                 |      Stopgaps:           
---------------------------------+------------------------------------------

Comment (by roed):

 Yikes.  This is a precision problem:
 {{{
 sage: x = polygen(ZZ)
 sage: f = x^5 + x^4 - 4*x^2 - x + 3
 sage: R = Qp(3,print_mode='digits')
 sage: fQp = f.base_extend(R)
 sage: h = [a[0] for a in fQp.factor()]
 sage: h
 [(...1)*x + (...1),
  (...1)*x + (...12101021200010200212),
  (...1)*x + (...21121201022212022020),
  (...1)*x^2 + (...11222222222222222221)*x + (...1000000000000000001)]
 sage: h[1]*h[2]
 (...1)*x^2 + (...11000000000000000002)*x + (...20000000000000000010)
 sage: h[3].discriminant().valuation()
 19
 sage: prod(h) == fQp
 True
 }}}

 If you cut off the precision at some point then there are multiple valid
 factorizations, and this one has the unfortunate feature that it doesn't
 find all the roots.  `h[3]` is very close to `(x-1)^2`, but its
 discriminant is 3^19^, which is not a square.

 Note the sensitivity to the precision of the input:
 {{{
 sage: R19 = Qp(3,19,print_mode='digits',print_pos=False)
 sage: fQp19 = f.base_extend(R19)
 sage: [a[0] for a in fQp19.factor()]
 [(...1)*x + (...1),
  (...1)*x + (...121202120222222222),
  (...1)*x + (...1001020101222222222),
  (...1)*x + (...2201021200010200212),
  (...1)*x + (...1121201022212022020)]
 }}}
 The precision on the two roots near `-1` is a bit disturbing.  I'm curious
 how things go with #12561 applied, but don't have time to check at the
 moment.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14812#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to