Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Well, there is no built-in function, but you can make your own:

sage: rng = QQ['x, y']         
sage: rng.inject_variables()
Defining x, y
sage: I = rng.ideal([x**3, y*x**2, y**10*x])
sage: I.hilbert_series()
(t^11 + t^3 - t^2 - t - 1)/(t - 1)
sage: def hilbert_coeffs(ideal):
....:     t = PowerSeriesRing(QQ, 't').gen()
....:     return ideal.hilbert_series()(t).coefficients()
....: 
sage: 
sage: hilbert_coeffs(I)
[1, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1]