#19611: Error in gcd for polynomials modulo p^n
-------------------------+-------------------------------------------------
   Reporter:  roed       |            Owner:
       Type:  defect     |           Status:  new
   Priority:  major      |        Milestone:  sage-6.10
  Component:  algebra    |         Keywords:
  Merged in:             |          Authors:
  Reviewers:             |  Report Upstream:  Not yet reported upstream;
Work issues:             |  Will do shortly.
     Commit:             |           Branch:
   Stopgaps:             |     Dependencies:
-------------------------+-------------------------------------------------
 We've observed an error in gcds for polynomials over `Zmod(5^2)` and
 `Zmod(5^3)`.  This seems to be a problem in FLINT's `nmod_poly_gcd`, since
 Sage essentially calls that function directly.

 {{{
 sage: R.<x> = QQ['x']
 sage: f1old = x^5 + 7*x^3 + 8*x^2 + 15*x + 19
 sage: f1old.is_irreducible()
 True
 sage: f2 = f1old.derivative()
 sage: factor((f1old).discriminant())
 181654981
 sage: for i in range(1,5):
 ....:     K.<x> = Zmod(5^i)['x']  #reducing over ZZ/(5^i ZZ)
 ....:     f1 = K(f1old)
 ....:     f2 = f1.derivative()
 ....:     h = gcd(f1,f2)
 ....:     if h.degree() > 0:
 ....:         r = -h.constant_coefficient()
 ....:         print 'over (ZZ/5^%s)[x], gcd is %s, evaluations of f1, f2
 at the root are %s, %s'%(i, h, f1(r), f2(r))
 over (ZZ/5^2)[x], gcd is x + 1, evaluations of f1, f2 at the root are 4, 0
 over (ZZ/5^3)[x], gcd is x + 101, evaluations of f1, f2 at the root are 4,
 0
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/19611>
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/d/optout.

Reply via email to