Skip to content

Commit 4d8a280

Browse files
Merge pull request #397 from oscarbenjamin/pr_buchberger_test
test: update test for buchberger_naive
2 parents f1eaa53 + d8b5356 commit 4d8a280

1 file changed

Lines changed: 15 additions & 6 deletions

File tree

src/flint/test/test_all.py

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4004,21 +4004,30 @@ def test_fmpz_mpoly_vec():
40044004
assert vec.buchberger_naive() == mpoly_vec([x**2 - y, x**3 * y - x, x * y**2 - x, y**3 - y], ctx)
40054005
assert vec.buchberger_naive(limits=(2, 2, 512)) == (mpoly_vec([x**2 - y, x**3 * y - x], ctx), False)
40064006

4007-
unreduced_basis = mpoly_vec([x**2 - 2, y**2 - 3, z - x - y], ctx).buchberger_naive()
4008-
assert list(unreduced_basis) == [
4007+
# buchberger_naive output changed in FLINT 3.6.0
4008+
unreduced = [
40094009
x**2 - 2,
40104010
y**2 - 3,
40114011
x + y - z,
40124012
2*y*z - z**2 - 1,
40134013
2*y + z**3 - 11*z,
4014-
z**4 - 10*z**2 + 1
4014+
z**4 - 10*z**2 + 1,
4015+
]
4016+
reduced = [
4017+
x + y - z,
4018+
2*y + z**3 - 11*z,
4019+
z**4 - 10*z**2 + 1,
40154020
]
4021+
unreduced_basis = mpoly_vec([x**2 - 2, y**2 - 3, z - x - y], ctx).buchberger_naive()
4022+
assert list(unreduced_basis) in [reduced, unreduced]
40164023

4017-
assert list(unreduced_basis.autoreduction()) == [
4018-
z**4 - 10 * z**2 + 1,
4024+
reduced = [
4025+
2 * x - z**3 + 9 * z,
40194026
2*y + z**3 - 11 * z,
4020-
2 * x - z**3 + 9 * z
4027+
z**4 - 10 * z**2 + 1,
40214028
]
4029+
reduced_old = reduced[::-1]
4030+
assert list(unreduced_basis.autoreduction()) in [reduced, reduced_old]
40224031

40234032

40244033
def _all_polys_mpolys():

0 commit comments

Comments
 (0)