On Tuesday, April 28, 2015 at 10:28:06 AM UTC-7, Joao Alberto de Faria 
wrote:
>
> What is the difficulty in factoring polynomials with multiple roots over 
> the p-adic ring? 
>
> [[[ R.<x>=Qp(5)[]
> f=x^2
> g=gcd(f,f.derivative())
> (f/g).factor() ]]]
>
> returns the following error:
>
> sage.rings.padics.precision_error.PrecisionError: p-adic factorization
> not well-defined since the discriminant is zero up to the requestion
> p-adic precision
>
>
You didn't do what you think you did there:

sage: f/g
((1 + O(5^20))*x^2)/((1 + O(5^20))*x)

It looks like sage is being conservative here in taking out apparent common 
factors. Calling "factor" on that will probably attempt to factor numerator 
and denominator separately. You'd really want to do a long division here:

sage: f // g
(1 + O(5^20))*x
sage: (f//g).factor()
(1 + O(5^20))*x + (O(5^20))

Checking the remainder:

sage: f % g
(O(5^20))*x^2

so it's indeed indistinguishable from 0.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to