Skip to content

Commit 845963c

Browse files
author
Release Manager
committed
gh-35977: Move hilbert_numerator test to its proper place And make it clear that it gives a wrong answer URL: #35977 Reported by: Antonio Rojas Reviewer(s):
2 parents fb1648e + 376bccb commit 845963c

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/sage/rings/polynomial/hilbert.pyx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -576,14 +576,6 @@ def hilbert_poincare_series(I, grading=None):
576576
120*t^3 + 135*t^2 + 30*t + 1
577577
sage: hilbert_poincare_series(J).denominator().factor()
578578
(t - 1)^14
579-
580-
This example exceeded the capabilities of Singular before version 4.2.1p2.
581-
In Singular 4.3.1, it works correctly on 64-bit, but on 32-bit, it prints overflow warnings
582-
and omits some terms::
583-
584-
sage: J.hilbert_numerator(algorithm='singular')
585-
120*t^33 - 3465*t^32 + 48180*t^31 - 429374*t^30 + 2753520*t^29 - 13522410*t^28 + 52832780*t^27 - 168384150*t^26 + 445188744*t^25 - 987193350*t^24 + 1847488500*t^23 + 1372406746*t^22 - 403422496*t^21 - 8403314*t^20 - 471656596*t^19 + 1806623746*t^18 + 752776200*t^17 + 752776200*t^16 - 1580830020*t^15 + 1673936550*t^14 - 1294246800*t^13 + 786893250*t^12 - 382391100*t^11 + 146679390*t^10 - 42299400*t^9 + 7837830*t^8 - 172260*t^7 - 468930*t^6 + 183744*t^5 - 39270*t^4 + 5060*t^3 - 330*t^2 + 1 # 64-bit
586-
...120*t^33 - 3465*t^32 + 48180*t^31 - ... # 32-bit
587579
"""
588580
cdef Polynomial_integer_dense_flint HP
589581
HP, grading = first_hilbert_series(I, grading=grading, return_grading=True)

src/sage/rings/polynomial/multi_polynomial_ideal.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3123,6 +3123,14 @@ def hilbert_numerator(self, grading=None, algorithm='sage'):
31233123
sage: I.hilbert_numerator() # needs sage.rings.number_field
31243124
-t^5 + 1
31253125
3126+
This example returns a wrong answer due to an integer overflow in Singular::
3127+
3128+
sage: n=4; m=11; P = PolynomialRing(QQ, n*m, "x"); x = P.gens(); M = Matrix(n, x)
3129+
sage: I = P.ideal(M.minors(2))
3130+
sage: J = P * [m.lm() for m in I.groebner_basis()]
3131+
sage: J.hilbert_numerator(algorithm='singular')
3132+
...120*t^33 - 3465*t^32 + 48180*t^31 - ...
3133+
31263134
Our two algorithms should always agree; not tested until
31273135
:trac:`33178` is fixed::
31283136

0 commit comments

Comments
 (0)