Skip to content

Commit

Permalink
Trac #17638: Division of polynomials produces errors when using local…
Browse files Browse the repository at this point in the history
… orderings

Consider two polynomials f,g in a ring define using a local ordering,
e.g.,
{{{
R.<x,y>=PolynomialRing(QQ,order='neglex')
}}}
If the leading monomial of g is 1 then f/g will produces a wrong result,
namely f divided by the independent coefficient of g. Note that in that
case g.is_unit() yields True, since for Singular R is not Q[x,y] but the
ordering localization (i.e., one can divide by the polynomials whose
leading monomial is 1).

PS: It is my first ticket, I apologize for the mistakes.

URL: https://trac.sagemath.org/17638
Reported by: enriqueartal
Ticket author(s): Mckenzie West
Reviewer(s): Luis Felipe Tabera Alonso, Thierry Monteil
  • Loading branch information
Release Manager committed May 16, 2022
2 parents dbe2d6a + 8dd8ebe commit 52b8e39
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/sage/rings/polynomial/multi_polynomial_libsingular.pyx
Expand Up @@ -2315,6 +2315,15 @@ cdef class MPolynomial_libsingular(MPolynomial):
Traceback (most recent call last):
...
ZeroDivisionError: rational division by zero
Ensure that :trac:`17638` is fixed::
sage: R.<x,y> = PolynomialRing(QQ, order="neglex")
sage: f = 1 + y
sage: g = 1 + x
sage: h = f/g
sage: h*g == f
True
"""
cdef poly *p
cdef MPolynomial_libsingular right = <MPolynomial_libsingular>right_ringelement
Expand Down

0 comments on commit 52b8e39

Please sign in to comment.