Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit 21e4f9a

Browse files
committed
a minimal fix to ensure that 'lex' order always reduces
1 parent 10ed24e commit 21e4f9a

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/sage/libs/singular/decl.pxd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ cdef extern from "singular/Singular/libsingular.h":
334334
bint *pairtest
335335
void *R
336336
int *S_2_R
337+
bint noTailReduction
337338

338339
ctypedef struct data_union:
339340
ring *uring

src/sage/libs/singular/groebner_strategy.pyx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ cdef class GroebnerStrategy(SageObject):
9393
...
9494
NotImplementedError: Only coefficient fields are implemented so far.
9595
96+
Check that :trac:`27508` is fixed::
97+
98+
sage: R2.<x,y> = PolynomialRing(QQ, 2, order="lex")
99+
sage: I2 = R2.ideal(["x^2 - x", "y^2 - y"])
100+
sage: R2("x^2 + y").mod(I2), R2("x + y^2").mod(I2)
101+
(x + y, x + y)
96102
"""
97103
if not isinstance(L, MPolynomialIdeal):
98104
raise TypeError("First parameter must be a multivariate polynomial ideal.")
@@ -127,6 +133,7 @@ cdef class GroebnerStrategy(SageObject):
127133
self._strat.sl = -1
128134
#- init local data struct
129135
initS(i, NULL, self._strat)
136+
self._strat.noTailReduction = False
130137

131138
cdef int j
132139
cdef bint base_ring_is_field = R.base_ring().is_field()

0 commit comments

Comments
 (0)