The new hilb_numer command takes a Gröbner basis and a ring map from the variables of its base ring to a target ring. It creates the numerator of the Hilbert series generating function, in the target ring. This can be used to get at the full n-variable generating function, to work with bigradings, and so forth.
% hilb_numer hilb_numer <standard basis> <ideal> <result> % <ring 3 abt r % <ideal i a2 ab b2 % <ideal f t t t % std i j 23. computation complete after degree 3 % hilb_numer j f k % type k 2t3-3t2+1 % hilb_numer j r k % type k a2b+ab2-a2-ab-b2+1
This numerator makes sense in characteristic zero, over a polynomial ring. Computing it in low characteristics, or over a qring, may lead to absurd results.
Providing a map to hilb_numer is more efficient than collecting the raw multivariate numerator, and applying a map to it afterwards. This code maps to the target ring term by term as each term is created, adding or subtracting in the target ring.
[Added 12 March 94] An earlier bug has been fixed, which sometimes crashed Macaulay when the target ring was different from the base ring of the Gröbner basis.