When R is a polynomial ring, if hilb is an O-sequence (that is, it satisfies Macaulay's Theorem), such an L always exists. When Q is a quotient of a polynomial ring, there may be no lexicographic ideal with a particular Hilbert function even if it is an O-sequence. lexIdeal returns null if no lexicographic ideal L corresponding to the Hilbert function hilb exists in R or Q.
When lexIdeal has an ideal as its input, it returns the lexicographic ideal with the same Hilbert function as its output. If no such ideal exists, which may happen since Macaulay's Theorem fails in some quotient rings, then lexIdeal returns null.
The function now works for quotients by arbitrary homogeneous ideals, not just monomial ideals. We thank David Eisenbud and Jeff Mermin for contributing their ideas.
i1 : R=ZZ/32003[a..c]; |
i2 : lexIdeal(R,{1,3,4,3,1}) 2 2 3 3 2 2 5 o2 = ideal (a*b, a , a*c , b , b*c , b c , c ) o2 : Ideal of R |
i3 : lexIdeal ideal(a*b,b*c) 2 o3 = ideal (a*b, a ) o3 : Ideal of R |
i4 : lexIdeal(R,{1,3,7}) --not an O-sequence, so no lex ideal exists |
i5 : Q=R/ideal(a^3,b^3,a*c^2); |
i6 : lexIdeal(Q,{1,3,6,4,2}) 2 2 2 2 2 5 4 o6 = ideal (a c, a*b , a b, b c , c , b*c ) o6 : Ideal of Q |
i7 : lexIdeal(Q,{1,3,6,4,4}) --value of 4 in degree 4 is too high in this ring |
Note that we use the Gotzmann Persistence Theorem as a stopping criterion, so one should make sure this holds in the ring in which one is computing.
The object lexIdeal is a method function.