The exponent vectors of the given monomials are considered as vertices of a lattice polytope P. The Ehrhart ring of a (lattice) polytope P is the monoid algebra defined by the monoid of lattice points in the cone over the polytope P; see Bruns and Gubeladze, Polytopes, Rings, and K-theory, Springer 2009, pp. 228, 229. The function returns two monomial subalgebras, the first has as generators the monomials representing the lattice points of the polytope, the second is the Ehrhart ring. If there is already a free variable in the original ring (i.e. a variable that does not appear in any of the monomials in L), give the function that variable as second input. The function then uses it instead of creating a new one.
i1 : R=ZZ/37[x,y,t]; |
i2 : L={x^3, x^2*y, y^3, x*y^2}; |
i3 : (latticePoints,ehrhart)=ehrhartRing(L,t); |
i4 : latticePoints ZZ 3 2 2 3 o4 = --[y , x*y , x y, x ] 37 o4 : monomial subalgebra of R |
i5 : ehrhart ZZ 3 2 2 3 o5 = --[y t, x*y t, x y*t, x t] 37 o5 : monomial subalgebra of R |