Bug in hilbert numerator of a big ideal?

82 views
Skip to first unread message

jplab

unread,
May 21, 2015, 10:03:45 AM5/21/15
to sage-...@googlegroups.com
Hi everyone,

I encountered a weird behavior while computing the hilbert numerator of certain Stanley-Reisner ideals.

It is difficult to give a short, self-contained, correct example since the smallest example I can obtain that
produces the bug involves an ideal with ~2500 generators (of degree 2) on around ~70 variables.

Eventhough the ideal is relatively big, I know what it should look like (i know the simplicial complex it comes from).
So I remove from the obtained hilbert numerator the correct solution and I find a non-zero polynomial.

I factored this polynomial and found out that the number:

4294967296 (which should ring a bell)

is a factor of the polynomial!

I produced different examples and this number always comes up when I do not get the expected hilbert numerator.

It seems that the hilbert numerator uses singular. Can that be that singular can not deal with very big integers?? Or with too many variables?
Thanks,
JP

Simon King

unread,
May 21, 2015, 10:10:06 AM5/21/15
to sage-...@googlegroups.com
Hi Jean Philippe,

On 2015-05-21, jplab <jeanphil...@gmail.com> wrote:
> It seems that the hilbert numerator uses singular. Can that be that
> singular can not deal with very big integers?? Or with too many variables?

I wouldn't be surprised, as I have problems with computing Hilbert
series with Singular in a different context, too.

Best regards,
Simon


john_perry_usm

unread,
May 21, 2015, 4:35:23 PM5/21/15
to sage-...@googlegroups.com
Hi

I factored this polynomial and found out that the number:

4294967296 (which should ring a bell)

is a factor of the polynomial!

It didn't ring a bell for me, but factor(4294967296) enlightens me. :-)
 
It seems that the hilbert numerator uses singular. Can that be that singular can not deal with very big integers?? Or with too many variables?

I think the first sentence on this page is related to your question:


In principle you could get around it using another Hilbert function. You could try frobby, which is actually in Sage (in mine, anyway), but I've never used it, so I can't be more helpful, sorry.

john perry

john_perry_usm

unread,
May 21, 2015, 4:38:02 PM5/21/15
to sage-...@googlegroups.com
Actually, there seems to be a convenient frobby.hilbert() function which does what you want, though I don't know if it's happy with larger coefficients.

john perry

jplab

unread,
May 22, 2015, 8:30:29 AM5/22/15
to sage-...@googlegroups.com
Dear John,

Ok, I'll have a look at frobby! Just to check, I installed Macaulay2 and did the same computation and it gave me the right answer... So I could interface my code, but this is not the optimal way. If it is a bug, it should be looked at and repaired...

Best,
Jean-Philippe

john_perry_usm

unread,
May 23, 2015, 1:05:51 AM5/23/15
to sage-...@googlegroups.com

Ok, I'll have a look at frobby! Just to check, I installed Macaulay2 and did the same computation and it gave me the right answer...

CoCoA might also compute the correct answer, as I believe CoCoA switches silently to bigint whenever it notices the need. I don't think Sage supports CoCoA anymore though. (I'd like to fix that one day, but there are lots of things I'd like to do one day...)
 
So I could interface my code, but this is not the optimal way. If it is a bug, it should be looked at and repaired...

I'm willing to be corrected here, but my reaction is that this is "not a bug." Sage uses Singular as its commutative algebra engine, and Singular advertises this limitation. As an analogy, it's not a bug if a computer algebra system that cautions users that it works only modulo a prime p gives you 1-2=p-1 instead of -1.

That doesn't mean we can't address it. Hilbert series & polynomials work with int, so maybe a workaround would be to check output from Singular, and see if 2^32 divides it; if so, cancel the corresponding term. I don't know if we can guarantee that this is always correct.

Alternately, we can ask upstream.

john perry

jplab

unread,
May 26, 2015, 10:57:00 AM5/26/15
to sage-...@googlegroups.com
Hi!

So, the workaround I found was to wrap cocoa using a subprocess... It works quite ok for my purposes...

Thanks for your help!
JP
Reply all
Reply to author
Forward
0 new messages