Skip to content

Commit 376bccb

Browse files
committed
Make it clear that the singular test gives a wrong answer, and move it to its proper place
1 parent 543f8d6 commit 376bccb

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/sage/rings/polynomial/hilbert.pyx

-8
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

+8
Original file line numberDiff line numberDiff line change
@@ -3105,6 +3105,14 @@ def hilbert_numerator(self, grading=None, algorithm='sage'):
31053105
sage: I.hilbert_numerator() # optional - sage.rings.number_field
31063106
-t^5 + 1
31073107
3108+
This example returns a wrong answer due to an integer overflow in Singular::
3109+
3110+
sage: n=4; m=11; P = PolynomialRing(QQ, n*m, "x"); x = P.gens(); M = Matrix(n, x)
3111+
sage: I = P.ideal(M.minors(2))
3112+
sage: J = P * [m.lm() for m in I.groebner_basis()]
3113+
sage: J.hilbert_numerator(algorithm='singular')
3114+
...120*t^33 - 3465*t^32 + 48180*t^31 - ...
3115+
31083116
Our two algorithms should always agree; not tested until
31093117
:trac:`33178` is fixed::
31103118

0 commit comments

Comments
 (0)