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. Since these are defined in a polynomial ring with an additional variable, the function creates a new polynomial ring with an additional variable.
i1 : R=ZZ/37[x,y]; |
i2 : L={x^3, x^2*y, y^3, x*y^2}; |
i3 : (latticePoints,ehrhart)=ehrhartRing L; |
i4 : latticePoints ZZ 3 2 2 3 o4 = --[y , x*y , x y, x ] 37 ZZ o4 : monomial subalgebra of --[x..y, a] 37 |
i5 : ehrhart ZZ 3 2 2 3 o5 = --[y a, x*y a, x y*a, x a] 37 ZZ o5 : monomial subalgebra of --[x..y, a] 37 |