Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions src/sage/rings/polynomial/hilbert.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -576,14 +576,6 @@ def hilbert_poincare_series(I, grading=None):
120*t^3 + 135*t^2 + 30*t + 1
sage: hilbert_poincare_series(J).denominator().factor()
(t - 1)^14

This example exceeded the capabilities of Singular before version 4.2.1p2.
In Singular 4.3.1, it works correctly on 64-bit, but on 32-bit, it prints overflow warnings
and omits some terms::

sage: J.hilbert_numerator(algorithm='singular')
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
...120*t^33 - 3465*t^32 + 48180*t^31 - ... # 32-bit
"""
cdef Polynomial_integer_dense_flint HP
HP, grading = first_hilbert_series(I, grading=grading, return_grading=True)
Expand Down
8 changes: 8 additions & 0 deletions src/sage/rings/polynomial/multi_polynomial_ideal.py
Original file line number Diff line number Diff line change
Expand Up @@ -3105,6 +3105,14 @@ def hilbert_numerator(self, grading=None, algorithm='sage'):
sage: I.hilbert_numerator() # optional - sage.rings.number_field
-t^5 + 1

This example returns a wrong answer due to an integer overflow in Singular::

sage: n=4; m=11; P = PolynomialRing(QQ, n*m, "x"); x = P.gens(); M = Matrix(n, x)
sage: I = P.ideal(M.minors(2))
sage: J = P * [m.lm() for m in I.groebner_basis()]
sage: J.hilbert_numerator(algorithm='singular')
...120*t^33 - 3465*t^32 + 48180*t^31 - ...

Our two algorithms should always agree; not tested until
:trac:`33178` is fixed::

Expand Down