The package *Normaliz* provides an interface for the use of `Normaliz 2.8` within Macaulay 2.

The program `Normaliz 2.8` (referred to as `Normaliz` in the following) is mainly a tool for computing the Hilbert bases and enumerative invariants of rational cones. Several additional data can be computed. It is included in the Macaulay 2 distribution. For more details on the program, see http://www.math.uos.de/normaliz/. For the theory of affine semigroups and the notions of commutative algebra we refer to W. Bruns and J. Gubeladze, *Polytopes, rings and K-theory.* Springer 2009.

For algorithms see:

- W. Bruns and R. Koch,
*Computing the integral closure of an affine semigroup.*Univ. Iagiell. Acta Math. 39, (2001), 59-70 - W. Bruns and B. Ichim
*Normaliz: Algorithms for affine monoids and rational cones,*J. Algebra (2010), available at http://dx.doi.org/10.1016/j.jalgebra.2010.01.031 - W. Bruns, B. Ichim and C.Soeger
*The power of pyramid decomposition in Normaliz,*arXiv:1206.1916v1, available at http://arxiv.org/abs/1206.1916v1

Using `Normaliz` one may for example compute the following:

- The Hilbert basis and the support hyperplanes of a rational cone.
- The lattice points, Ehrhart series and the support hyperplanes of an integral polytope.
- The generators of the integral closure of the Rees algebra of a monomial ideal.

If the associated semigroup or corresponding semigroup algebra is graded, then one may also compute the Hilbert series and Hilbert (quasi)polynomial of the semigroup.

The package gives direct access to `Normaliz`. The exchange of data between `Normaliz` and Macaulay 2 is via files. These files are automatically created and erased behind the scenes. As long as one wants to use only the ring-theoretic functions there is no need for file management. The key function for the direct use of `Normaliz` is normaliz, which calls the program `Normaliz`. To handle the in- and output one can use the functions writeNmzData and readNmzData, to set the options for the program setNmzOption. The output files are explained in output files written by Normaliz.

If you want to keep the results of the computations by `Normaliz` (i.e. the files written by the program), the package offers several methods for this purpose, see Keeping results of the computation by Normaliz for an example how to do this.

The package introduces two new classes MonomialSubalgebra and RationalCone.

The package provides four top level functions that aim directly at algebraic objects:

- normalToricRing -- normalization of a toric ring
- intclToricRing -- integral closure of a toric ring
- intclMonIdeal -- normalization of Rees algebra
- ehrhartRing -- Ehrhart ring

The package offers the following additional functions:

- torusInvariants -- ring of invariants of torus action
- finiteDiagInvariants -- ring of invariants of a finite group action
- diagInvariants -- ring of invariants of a diagonalizable group action
- intersectionValRings -- intersection of ring of valuations
- intersectionValRingIdeals -- intersection of valuation ideals

- Gesa Kaempf <gkaempf@uni-osnabrueck.de>
- Christof Soeger <csoeger@uni-osnabrueck.de>

Version **2.0** of this package was accepted for publication in volume 2 of the journal The Journal of Software for Algebra and Geometry: Macaulay2 on 2010-08-08, in the article A Macaulay2 interface for Normaliz. That version can be obtained from the journal or from the *Macaulay2* source code repository, `svn://svn.macaulay2.com/Macaulay2/trunk/M2/Macaulay2/packages/Normaliz.m2`, release number 11859.

- Types
- MonomialSubalgebra -- class of monomial subalgebras
- RationalCone -- class of rational cones

- Functions and commands
- createMonomialSubalgebra -- creates a monomial subalgebra
- diagInvariants -- ring of invariants of a diagonalizable group action
- ehrhartRing -- Ehrhart ring
- finiteDiagInvariants -- ring of invariants of a finite group action
- getNumInvs -- returns the numerical invariants computed
- intclMonIdeal -- normalization of Rees algebra
- intclToricRing -- integral closure of a toric ring
- intersectionValRingIdeals -- intersection of valuation ideals
- intersectionValRings -- intersection of ring of valuations
- normaliz -- calls Normaliz
- normalToricRing -- normalization of a toric ring
- readMultipleNmzData -- reads an output file of Normaliz containing several matrices
- readNmzData -- reads an output file of Normaliz containing one matrix
- rmNmzFiles -- removes the files created by Normaliz
- setNmzOption -- sets a command line option for Normaliz
- showNmzOptions -- prints the enabled options
- torusInvariants -- ring of invariants of torus action
- writeNmzData -- creates an input file for Normaliz

- Methods
- generators(MonomialSubalgebra) -- generators of a monomial subalgebra
- intclToricRing(MonomialSubalgebra) -- integral closure of a toric ring
- normalToricRing(MonomialSubalgebra) -- normalization of a toric ring
- numgens(MonomialSubalgebra) -- number of generators of a monomial subalgebra
- ring(MonomialSubalgebra) -- surrounding ring of a monomial subalgebra
- vars(MonomialSubalgebra) -- row matrix of the generators of a monomial subalgebra

- Symbols
- Other things
- nmzDataPath -- global variable, the path where Normaliz stores its files
- nmzFilename -- global variable holding the filename
- nmzNumberThreads -- global variable holding the number of threads
- nmzVersion -- global variable holding the Normaliz version