116 CHAPTER 4. ALGORITHMS FOR STABLE IDEALSMuPAD>> compute_all_Hilbert_series(poly(4*z + 1, [z]), 4);Output3 2{poly(3 t + 1, [t]), poly(- t + 2 t + 2 t + 1, [t]),4 3 2poly(- t + t + t + 2 t + 1, [t]),5 4 2poly(- t + t + t + 2 t + 1, [t]),6 4 3poly(- t + t + t + 2 t + 1, [t]),5 4 3 2poly(- t + t + t - t + 3 t + 1, [t]),7 4 3 2poly(- t + t + t + t + t + 1, [t]),6 5 4 3 2poly(- 2 t + t + t + t + t + t + 1, [t])}The above results equal those computed by Alyson Reeves in [16] (see Chapter 3, Example2, pp. 25,26 ).If we want to compute the numerators <strong>of</strong> the non-reduced Hilbert series as well, we proceedas follows:MuPAD>> compute_all_Hilbert_series(poly(4*z + 1, [z]), 4, All);Output4 3 2{[poly(- 3 t + 8 t - 6 t + 1, [t]), poly(3 t + 1, [t])],6 5 4 3 2[poly(t - 5 t + 7 t - 2 t - t - t + 1, [t]),3 2poly(- t + 2 t + 2 t + 1, [t])], [poly(7 6 5 4 3 2t - 4 t + 5 t - 3 t + 3 t - 2 t - t + 1, [t]),
4.6. COMPUTING ALL HILBERT SERIES TO A HILBERT POLYNOMIAL 1174 3 2poly(- t + t + t + 2 t + 1, [t])],8 7 6 4 3 2[poly(t - 4 t + 5 t - 8 t + 12 t - 7 t + 1, [t]),5 4 3 2poly(- t + t + t - t + 3 t + 1, [t])],8 7 6 5 4 3 2[poly(t - 4 t + 6 t - 5 t + 2 t + 2 t - 2 t - t + 1, [t]),5 4 2poly(- t + t + t + 2 t + 1, [t])],9 8 7 6 4 3 2[poly(t - 3 t + 2 t + t - 4 t + 6 t - 3 t - t + 1, [t]),6 4 3poly(- t + t + t + 2 t + 1, [t])],9 8 7 6 2[poly(2 t - 7 t + 8 t - 3 t + t - 2 t + 1, [t]),6 5 4 3 2poly(- 2 t + t + t + t + t + t + 1, [t])],10 9 8 7 6 5 2[poly(t - 3 t + 3 t - 2 t + 2 t - t + t - 2 t + 1, [t]),7 4 3 2poly(- t + t + t + t + t + 1, [t])]}Now the set returned by the procedure consists <strong>of</strong> lists each containing two polynomials –the first polynomial is the numerator <strong>of</strong> the non-reduced Hilbert series, the second one thenumerator <strong>of</strong> the reduced Hilbert series (which had already been computed above).Since we can now compute all Hilbert series associated to a given Hilbert polynomial,we might be interested in computing all Hilbert functions associated to a specific Hilbertpolynomial. Thus, in the following section <strong>of</strong> the chapter we give an algorithm, whichcomputes the values <strong>of</strong> the Hilbert function from a given Hilbert series. In general, itsuffices to know the Hilbert series in order to compute the values <strong>of</strong> the Hilbert function –we will see that we can again benefit from our characterization <strong>of</strong> the lexicographic idealL p associated to some Hilbert polynomial p(z) to optimize our algorithm. Together withthe algorithm to compute all Hilbert series from a specific Hilbert polynomial discussedwithin this section, we obtain the possibility to compute all Hilbert functions to a givenHilbert polynomial.