Description
The ideal I is generated by binomials of type X^aX^b (multiindex notation) in the surrounding polynomial ring K[X]=K[X_1,...,X_n]. The binomials represent a congruence on the monoid \ZZ^n with residue monoid M. Let N be the image of M in gp(M)/torsion. Then N is universal in the sense that every homomorphism from M to an affine monoid factors through N. If I is a prime ideal, then K[N] \cong K[X]/I. In general, K[N]\cong K[X]/P where P is the unique minimal prime ideal of I generated by binomials of type X^aX^b.
The function computes the normalization of K[N] and returns it as a monomial subalgebra in a newly created polynomial ring of the same Krull dimension, whose variables are t_1,\ldots,t_{nr}, where r is the rank of the matrix with rows ab. (In general there is no canonical choice for such an embedding.)
i1 : R=ZZ/37[x,y,z,w];

i2 : I=ideal(x*zy^2, x*wy*z);
o2 : Ideal of R

i3 : normalToricRing(I,t)
ZZ 3 2 2 3
o3 = [t , t t , t t , t ]
37 2 1 2 1 2 1
ZZ
o3 : monomial subalgebra of [t ..t ]
37 1 2
