* Georgi Guninski <gunin...@guninski.com> [2013-11-14 12:01:44 +0200]:
> On Thu, Nov 14, 2013 at 09:39:58AM +0000, John Cremona wrote: > > On 14 November 2013 09:28, Georgi Guninski <gunin...@guninski.com> wrote: > > > This appears a bug to me: > > > > > > sage: Kz.<t>=Qp(3,5)[];pol=t**2-2*t+1;ro=pol.roots(multiplicities=0);ro > > > [] > > > sage: pol(1) > > > O(3^5) > > > > I agree -- even I can solve (t-1)^2=0. Perhaps the code does not > > correctly do an initial squarefree division? > > > > John Cremona > > > > The factorization doesn't appear correct too: > > sage: Kz.<t>=Qp(3,5)[];pol=(t-1)**2;factor(pol) > (1 + O(3^5))*t^2 + (1 + 2*3 + 2*3^2 + 2*3^3 + 2*3^4 + O(3^5))*t + (1 + > O(3^5)) My guess would be that we are using pari's factorpadic() incorrectly. I do not know pari well but it seems to me that factorpadic() treats the input as an exact polynomial. As such t^2+241*t+1 is squarefree. (The source code of factorpadic() is here: http://sourcecodebrowser.com/pari/2.1.7/polarit1_8c.html#a64cf7127fb8fed0d32e4cd29b7448374 ) We should add a stopgap warning I guess; to fix this we could do our own squarefree decomposition, e.g., using the gcd from here http://trac.sagemath.org/ticket/13439 and/or the new factorization code http://trac.sagemath.org/ticket/12561 julian
pgptpdpiczhyb.pgp
Description: PGP signature