#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 | Keywords: padics, roots
Work issues: | Report Upstream: N/A
Reviewers: | Authors:
Merged in: | Dependencies:
Stopgaps: |
-------------------------+--------------------------------------------------
This is a huge problem:
{{{
sage: x = polygen(QQ)
sage: f = x^5 + x^4 - 4*x^2 - x + 3
sage:
sage: f.roots()
[(-1, 1), (1, 2)]
sage: f.roots(Qp(3))
[(2 + 2*3 + 2*3^2 + 2*3^3 + 2*3^4 + 2*3^5 + 2*3^6 + 2*3^7 + 2*3^8 + 2*3^9
+ 2*3^10 + 2*3^11 + 2*3^12 + 2*3^13 + 2*3^14 + 2*3^15 + 2*3^16 + 2*3^17 +
2*3^18 + 2*3^19 + O(3^20), 1), (1 + 3 + 2*3^3 + 2*3^4 + 2*3^6 + 3^7 +
2*3^8 + 2*3^9 + 2*3^10 + 3^12 + 2*3^14 + 3^15 + 2*3^16 + 3^17 + 3^19 +
O(3^20), 1), (3 + 2*3^2 + 2*3^5 + 3^7 + 2*3^11 + 3^12 + 2*3^13 + 3^15 +
3^17 + 3^18 + O(3^20), 1)]
sage: f.base_extend(Qp(3)).factor()
((1 + O(3^20))*x + (1 + O(3^20))) * ((1 + O(3^20))*x + (2 + 3 + 2*3^2 +
2*3^5 + 3^7 + 2*3^11 + 3^12 + 2*3^13 + 3^15 + 3^17 + 2*3^18 + 3^19 +
O(3^20))) * ((1 + O(3^20))*x + (2*3 + 2*3^3 + 2*3^4 + 2*3^6 + 3^7 + 2*3^8
+ 2*3^9 + 2*3^10 + 3^12 + 2*3^14 + 3^15 + 2*3^16 + 3^17 + 3^18 + 2*3^19 +
O(3^20))) * ((1 + O(3^20))*x^2 + (1 + 2*3 + 2*3^2 + 2*3^3 + 2*3^4 + 2*3^5
+ 2*3^6 + 2*3^7 + 2*3^8 + 2*3^9 + 2*3^10 + 2*3^11 + 2*3^12 + 2*3^13 +
2*3^14 + 2*3^15 + 2*3^16 + 2*3^17 + 3^18 + 3^19 + O(3^20))*x + (1 + 3^18 +
O(3^20)))
}}}
The p-adic roots are quit wrong! It's such a crazy answer, I keep feeling
like I'm the problem, but I tried this on two copies of sage 5.9 on my
computer as well as on sage 5.10 on the cloud. Note for instance that the
polynomial x^2^ + 2x + 3 has discriminant -8, which is a square mod 3 and
so there should be five roots in Qp(3) (and of course 1 should be a root
with multiplicity 2).
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14812>
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.