You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 x2 + 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).
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 319, 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.
This is a huge problem:
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 x2 + 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).
Component: padics
Keywords: roots
Reviewer: Jeroen Demeyer
Issue created by migration from https://trac.sagemath.org/ticket/14812
The text was updated successfully, but these errors were encountered: