Skip to content

Commit

Permalink
gh-38689: Fix tests with singular 4.4.0p3
Browse files Browse the repository at this point in the history
    
Fuzz some tests to make then pass with singular>=4.4.0p3, which returns
different Gröbner bases in some cases
    
URL: #38689
Reported by: Antonio Rojas
Reviewer(s): Antonio Rojas, Michael Orlitzky
  • Loading branch information
Release Manager committed Sep 27, 2024
2 parents 9f791ae + 84dd3e5 commit 3cc2491
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions src/sage/libs/singular/option.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,17 @@ By default, tail reductions are performed::
sage: from sage.libs.singular.option import opt, opt_ctx
sage: opt['red_tail']
True
sage: std(I)[-1]
sage: red = std(I)[-1]; red
d^2*e^6 + 28*b*c*d + ...
If we don't want this, we can create an option context, which disables
this::
sage: with opt_ctx(red_tail=False, red_sb=False):
....: std(I)[-1]
d^2*e^6 + 8*c^3 + ...
....: notred = std(I)[-1]; notred
d^2*e^6 + ...
sage: len(list(red)) < len(list(notred))
True
However, this does not affect the global state::
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/polynomial/multi_polynomial_ideal.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
The Groebner basis modulo any product of the prime factors is also non-trivial::
sage: I.change_ring(P.change_ring(IntegerModRing(2 * 7))).groebner_basis()
[x + 9*y + 13*z, y^2 + 3*y, y*z + 7*y + 6, 2*y + 6, z^2 + 3, 2*z + 10]
[x + ..., y^2 + 3*y, y*z + 7*y + 6, 2*y + 6, z^2 + 3, 2*z + 10]
Modulo any other prime the Groebner basis is trivial so there are
no other solutions. For example::
Expand Down

0 comments on commit 3cc2491

Please sign in to comment.