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

Commit fd60c06

Browse files
frederichan-IMJPRGjdemeyer
authored andcommitted
change test on cf.type in interred
1 parent 90cc488 commit fd60c06

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/sage/rings/polynomial/multi_polynomial_ideal.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3530,8 +3530,7 @@ def groebner_basis(self, algorithm='', deg_bound=None, mult_bound=None, prot=Fal
35303530
sage: gb # optional - giacpy_sage
35313531
[c^3 - 79/210*c^2 + 1/30*b + 1/70*c, b^2 - 3/5*c^2 - 1/5*b + 1/5*c, b*c + 6/5*c^2 - 1/10*b - 2/5*c, a + 2*b + 2*c - 1]
35323532
3533-
sage: ideal(gb).change_ring(P).interreduced_basis() # optional - giacpy_sage
3534-
[a - 60*c^3 + 158/7*c^2 + 8/7*c - 1, b + 30*c^3 - 79/7*c^2 + 3/7*c, c^4 - 10/21*c^3 + 1/84*c^2 + 1/84*c]
3533+
sage: J.groebner_basis.set_cache(gb) # optional - giacpy_sage
35353534
sage: ideal(J.transformed_basis()).change_ring(P).interreduced_basis() # testing trac 21884
35363535
[a - 60*c^3 + 158/7*c^2 + 8/7*c - 1, b + 30*c^3 - 79/7*c^2 + 3/7*c, c^4 - 10/21*c^3 + 1/84*c^2 + 1/84*c]
35373536

src/sage/rings/polynomial/multi_polynomial_ideal_libsingular.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def interred_libsingular(I):
280280
sage: P.<x,y,z> = PolynomialRing(QQ)
281281
sage: I = ideal( x^2 - 3*y, y^3 - x*y, z^3 - x, x^4 - y*z + 1 )
282282
sage: I.interreduced_basis()
283-
[y*z^2 - 81*x*y - 9*y - z, z^3 - x, x^2 - 3*y, 9*y^2 - y*z + 1]
283+
[y*z^2 - 81*x*y - 9*y - z, z^3 - x, x^2 - 3*y, y^2 - 1/9*y*z + 1/9]
284284
"""
285285
global singular_options
286286

@@ -310,7 +310,7 @@ def interred_libsingular(I):
310310

311311

312312
# divide head by coefficients
313-
if r.cf.type == n_unknown:
313+
if r.cf.type != n_Z and r.cf.type != n_Znm and r.cf.type != n_Zn and r.cf.type != n_Z2m :
314314
for j from 0 <= j < IDELEMS(result):
315315
p = result.m[j]
316316
if p:

0 commit comments

Comments
 (0)