# Singular          #### D.4.19.4 ehrhartRing

Procedure from library `normaliz.lib` (see normaliz_lib).

Usage:
ehrhartRing(ideal I);

Return:
The exponent vectors of the leading monomials of the elements of I are considered as points 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 a list of ideals:
(i) If the last ring variable is not used by the monomials, it is treated as the auxiliary variable of the Ehrhart ring. The function returns two ideals, the first containing the monomials representing all the lattice points of the polytope, the second containing the algebra generators of the Ehrhart ring over the coefficient field.
(ii) If the last ring variable is used by the monomials, the list returned contains only one ideal, namely the monomials representing the lattice points of the polytope.

The function returns the a list containing the input ideal I if one of the options `supp`, `triang`, `volume`, or `hseries` has been activated. However, in this case some numerical invariants are computed, and some other data may be contained in files that you can read into Singular (see showNuminvs, exportNuminvs).

Note:
A mathematical remark: the Ehrhart ring depends on the list of monomials given, and not only on the ideal they generate!

Example:
 ```LIB "normaliz.lib"; ring R=37,(x,y,t),dp; ideal J=x3,x2y,y3,xy2t7; ehrhartRing(J); ==> : ==> _=y3 ==> _=xy2 ==> _=xy2t ==> _=xy2t2 ==> _=xy2t3 ==> _=xy2t4 ==> _=xy2t5 ==> _=xy2t6 ==> _=xy2t7 ==> _=x2y ==> _=x2yt ==> _=x2yt2 ==> _=x2yt3 ==> _=x3 ``` 