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

Commit

Permalink
Trac #33134: add random (disabled) test for hilbert_numerator() algor…
Browse files Browse the repository at this point in the history
…ithms.

In a previous commit on Trac 33134, a test checking for incorrect
hilbert_numerator() output was deleted. To replace it, this commit
adds a random test that ensures both algorithms for
hilbert_numerator() agree. However, the test is disabled for now,
until the bug that caused the incorrect output can be fixed.
  • Loading branch information
orlitzky authored and dimpase committed Jul 11, 2022
1 parent 0679154 commit 9b8e7cb
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/sage/rings/polynomial/multi_polynomial_ideal.py
Original file line number Diff line number Diff line change
Expand Up @@ -2902,6 +2902,20 @@ def hilbert_numerator(self, grading = None, algorithm = 'sage'):
sage: I = Ideal([x^3*y^2 + 3*x^2*y^2*z + y^3*z^2 + z^5])
sage: I.hilbert_numerator()
-t^5 + 1
Our two algorithms should always agree; not tested until
:trac:`33178` is fixed::
sage: m = ZZ.random_element(2,8) # not tested
sage: nvars = m^2 # not tested
sage: R = PolynomialRing(QQ, "x", nvars) # not tested
sage: M = matrix(R, m, R.gens()) # not tested
sage: I = R.ideal(M.minors(2)) # not tested
sage: n1 = I.hilbert_numerator() # not tested
sage: n2 = I.hilbert_numerator(algorithm='singular') # not tested
sage: n1 == n2 # not tested
True
"""
if not self.is_homogeneous():
raise TypeError("Ideal must be homogeneous.")
Expand Down

0 comments on commit 9b8e7cb

Please sign in to comment.