This is Normaliz.info, produced by Macaulay2, version 1.22

Normaliz -- an interface to use Normaliz in Macaulay 2
******************************************************

Description
===========

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

Authors
=======

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

Certification a gold star
=========================

Version 2.0 of this package was accepted for publication in volume 2 (see
http://www.j-sag.org/volume2.html ) of The Journal of Software for Algebra and
Geometry: Macaulay2 (see http://j-sag.org/ ) on 2010-08-08, in the article A
Macaulay2 interface for Normaliz (see
http://www.j-sag.org/Volume2/jsag-4-2010.pdf ). That version can be obtained
from the journal (see http://www.j-sag.org/Volume2/Normaliz.m2 ) or from the
Macaulay2 source code repository (see
https://github.com/Macaulay2/M2/blob/d814bd64858da074bc73c626d27ff5494dfb7d4f/
M2/Macaulay2/packages/Normaliz.m2 ).

Version
=======

This documentation describes version 2.6 of Normaliz.

Source code
===========

The source code from which this documentation is derived is in the file
Normaliz.m2 (see common/share/Macaulay2/Normaliz.m2 ).

Exports
=======

  * 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
      * "createMonomialSubalgebra(List)" -- see createMonomialSubalgebra,
        -- creates a monomial subalgebra
      * "diagInvariants(Matrix,Matrix,Ring)" -- see diagInvariants,
        -- ring of invariants of a diagonalizable group action
      * ehrhartRing(List) -- Ehrhart ring
      * ehrhartRing(List,RingElement)
        -- Ehrhart ring
      * "finiteDiagInvariants(Matrix,Ring)" -- see finiteDiagInvariants,
        -- ring of invariants of a finite group action
      * generators(MonomialSubalgebra)
        -- generators of a monomial
        subalgebra
      * intclMonIdeal(Ideal) -- normalization
        of Rees algebra
      * intclMonIdeal(Ideal,RingElement)
        -- normalization of Rees
        algebra
      * intclToricRing(List) -- integral
        closure of a toric ring
      * intclToricRing(MonomialSubalgebra)
        -- integral closure of a toric
        ring
      * "intersectionValRingIdeals(Matrix,Ring)" -- see
        intersectionValRingIdeals, -- intersection
        of valuation ideals
      * "intersectionValRings(Matrix,Ring)" -- see intersectionValRings,
        -- intersection of ring of valuations
      * normaliz(List) -- calls Normaliz with
        several input matrices
      * normaliz(Matrix,String) -- calls
        Normaliz
      * normalToricRing(Ideal,Thing),
        -- normalization of a toric ring given by a binomial ideal
      * normalToricRing(List), --
        normalization of a toric ring
      * normalToricRing(MonomialSubalgebra)
        -- normalization of a toric
        ring
      * numgens(MonomialSubalgebra), --
        number of generators of a monomial subalgebra
      * "readMultipleNmzData(String)" -- see readMultipleNmzData,
        -- reads an output file of Normaliz containing
        several matrices
      * "readNmzData(String)" -- see readNmzData, -- reads
        an output file of Normaliz containing one matrix
      * ring(MonomialSubalgebra), --
        surrounding ring of a monomial subalgebra
      * "setNmzOption(String,Boolean)" -- see setNmzOption,
        -- sets a command line option for Normaliz
      * "torusInvariants(Matrix,Ring)" -- see torusInvariants,
        -- ring of invariants of torus action
      * vars(MonomialSubalgebra) -- row
        matrix of the generators of a monomial subalgebra
      * writeNmzData(List) -- creates an input
        file for Normaliz with several matrices
      * writeNmzData(Matrix,String),
        -- creates an input file for Normaliz with one matrix
  * Symbols
      * allComputations
      * grading
  * 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

For the programmer
==================

The object Normaliz, is a package (Macaulay2Doc).

allComputations
***************

Description
===========

allComputations is an option for normaliz,
intclToricRing, normalToricRing,
intclMonIdeal, torusInvariants,
finiteDiagInvariants, diagInvariants,
see intersectionValRings,
intersectionValRingIdeals. Its default value is
false. If it is set to true, the cone in the cache table of the monomial
subalgebra returned contains not only the generators, but all the data that
have been computed by Normaliz (what this includes depends on the type and the
options set, see output files written by Normaliz).
+---------------------------------------------------------------------------+
|i1 : R=ZZ/37[x,y,t];                                                       |
+---------------------------------------------------------------------------+
|i2 : L={x^3, x^2*y, y^3, x*y^2};                                           |
+---------------------------------------------------------------------------+
|i3 : T=intclToricRing(allComputations=>true,L)                             |
|                                                                           |
|     ZZ                                                                    |
|o3 = --[y, x]                                                              |
|     37                                                                    |
|                                                                           |
|o3 : monomial subalgebra of R                                              |
+---------------------------------------------------------------------------+
|i4 : T.cache#"cone"                                                        |
|                                                                           |
|o4 = RationalCone{"cgr" => | 0 |                                          }|
|                           | 4 |                                           |
|                  "equ" => | 0 0 1 |                                       |
|                  "gen" => | 0 1 0 |                                       |
|                           | 1 0 0 |                                       |
|                  "inv" => HashTable{"" => (1, 1)                        } |
|                                     "class group" => 1 : (0)              |
|                                     "degree 1 elements" => 2              |
|                                     "dim max subspace" => 0               |
|                                     "embedding dim" => 3                  |
|                                     "external index" => 1                 |
|                                     "graded" => true                      |
|                                     "grading denom" => 1                  |
|                                     "grading" => (1, 1, 0)                |
|                                     "hilbert basis elements" => 2         |
|                                     "hilbert quasipolynomial denom" => 1  |
|                                     "hilbert series denom" => (1, 1)      |
|                                     "hilbert series num" => 1 : (1)       |
|                                     "inhomogeneous" => false              |
|                                     "integrally closed" => false          |
|                                     "internal index" => 3                 |
|                                     "multiplicity denom" => 1             |
|                                     "multiplicity" => 1                   |
|                                     "number extreme rays" => 2            |
|                                     "number support hyperplanes" => 2     |
|                                     "rank" => 2                           |
|                                     "size triangulation" => 1             |
|                                     "sum dets" => 1                       |
|                  "sup" => | 0 1 0 |                                       |
|                           | 1 0 0 |                                       |
|                                                                           |
|o4 : RationalCone                                                          |
+---------------------------------------------------------------------------+

Functions with optional argument named allComputations :
========================================================

  * "diagInvariants(Matrix,Matrix,Ring,allComputations=>...)" -- see
    diagInvariants, -- ring of invariants of a diagonalizable
    group action
  * ehrhartRing(List,allComputations=>...)
    -- Ehrhart ring
  * ehrhartRing(List,RingElement,allComputations=>...),
    --
    Ehrhart ring
  * "finiteDiagInvariants(Matrix,Ring,allComputations=>...)" -- see
    finiteDiagInvariants, -- ring of invariants of a
    finite group action
  * intclMonIdeal(Ideal,allComputations=>...)
    -- normalization of
    Rees algebra
  * intclMonIdeal(Ideal,RingElement,allComputations=>...),
    --
    normalization of Rees algebra
  * intclToricRing(List,allComputations=>...)
    -- integral closure
    of a toric ring
  * intclToricRing(MonomialSubalgebra,allComputations=>...),
    --
    integral closure of a toric ring
  * "intersectionValRingIdeals(Matrix,Ring,allComputations=>...)" -- see
    intersectionValRingIdeals, -- intersection of
    valuation ideals
  * "intersectionValRings(Matrix,Ring,allComputations=>...)" -- see
    intersectionValRings, -- intersection of ring of
    valuations
  * "normaliz(List,allComputations=>...)" -- see normaliz(List),
    -- calls Normaliz with several input matrices
  * "normaliz(Matrix,String,allComputations=>...)" -- see
    normaliz(Matrix,String), -- calls Normaliz
  * normaliz(Matrix,ZZ,allComputations=>...) (missing documentation)
  * "normalToricRing(Ideal,Thing,allComputations=>...)" -- see
    normalToricRing(Ideal,Thing), --
    normalization of a toric ring given by a binomial ideal
  * normalToricRing(List,allComputations=>...)
    -- normalization of
    a toric ring
  * normalToricRing(MonomialSubalgebra,allComputations=>...),
    --
    normalization of a toric ring
  * "torusInvariants(Matrix,Ring,allComputations=>...)" -- see
    torusInvariants, -- ring of invariants of torus action

For the programmer
==================

The object allComputations, is a symbol (Macaulay2Doc).

createMonomialSubalgebra -- creates a monomial subalgebra
*********************************************************

Synopsis
========

  * Usage:
        createMonomialSubalgebra L
  * Inputs:
      * a list (Macaulay2Doc), list of monomials that are the
        generators of the subalgebra
  * Outputs:
      * an instance of the type MonomialSubalgebra,
        the subalgebra of the polynomial ring of the monomials that has the
        given monomials as generators

Description
===========

+-------------------------------------------------+
|i1 : R=ZZ/37[x,y,z];                             |
+-------------------------------------------------+
|i2 : S=createMonomialSubalgebra {x^2*y, x*z, z^3}|
|                                                 |
|     ZZ  2         3                             |
|o2 = --[x y, x*z, z ]                            |
|     37                                          |
|                                                 |
|o2 : monomial subalgebra of R                    |
+-------------------------------------------------+

See also
========

  * MonomialSubalgebra -- class of monomial
    subalgebras

Ways to use createMonomialSubalgebra :
======================================

  * "createMonomialSubalgebra(List)"

For the programmer
==================

The object createMonomialSubalgebra, is a
method function (Macaulay2Doc).

diagInvariants -- ring of invariants of a diagonalizable group action
*********************************************************************

Synopsis
========

  * Usage:
        diagInvariants(T,U,R)
  * Inputs:
      * a matrix (Macaulay2Doc), whose rows are the values of the
        indeterminates under the torus action
      * a matrix (Macaulay2Doc), whose rows are the values of the
        indeterminates under action of the finite group
      * a ring (Macaulay2Doc),  the basering
  * Outputs:
      * an instance of the type MonomialSubalgebra,
        the ring of invariants

Description
===========

This function computes the ring of invariants of a diagonalizable group D =
T\times G where T is a torus and G is a finite abelian group, both acting
diagonally on the polynomial ring K[X_1,\ldots,X_n]. The group actions are
specified by the input matrices M and N. The first matrix specifies the torus
action, the second the action of the finite group. See torusInvariants,
or finiteDiagInvariants, for more
detail. The output is the monomial subalgebra of invariants.

This method can be used with the options allComputations,
and grading.
+-----------------------------------------------------------------------------+
|i1 : R=QQ[x,y,z,w];                                                          |
+-----------------------------------------------------------------------------+
|i2 : T=matrix({{-1,-1,2,0},{1,1,-2,-1}});                                    |
|                                                                             |
|              2        4                                                     |
|o2 : Matrix ZZ  <--- ZZ                                                      |
+-----------------------------------------------------------------------------+
|i3 : U=matrix{{1,1,1,1,5},{1,0,2,0,7}}                                       |
|                                                                             |
|o3 = | 1 1 1 1 5 |                                                           |
|     | 1 0 2 0 7 |                                                           |
|                                                                             |
|              2        5                                                     |
|o3 : Matrix ZZ  <--- ZZ                                                      |
+-----------------------------------------------------------------------------+
|i4 : diagInvariants(T,U,R)                                                   |
|                                                                             |
|         70 35     19 10   4 6 5   15 5 10   26 4 15   37 3 20   48 2 25     |
|o4 = QQ[y  z  , x*y  z  , x y z , x  y z  , x  y z  , x  y z  , x  y z  ,    |
|                                                                             |
|o4 : monomial subalgebra of R                                                |
|-----------------------------------------------------------------------------|
| 59   30   70 35                                                             |
|x  y*z  , x  z  ]                                                            |
+-----------------------------------------------------------------------------+

See also
========

  * torusInvariants -- ring of invariants of torus
    action
  * finiteDiagInvariants -- ring of invariants of
    a finite group action

Ways to use diagInvariants :
============================

  * "diagInvariants(Matrix,Matrix,Ring)"

For the programmer
==================

The object diagInvariants, is a method function with options (Macaulay2Doc).

ehrhartRing -- Ehrhart ring
***************************

Description
===========

The input of this function is 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 computes the lattice points of the polytope and its Ehrhart ring.

Ways to use ehrhartRing :
=========================

  * ehrhartRing(List) -- Ehrhart ring
  * ehrhartRing(List,RingElement),
    -- Ehrhart ring

For the programmer
==================

The object ehrhartRing, is a method function with options (Macaulay2Doc).

ehrhartRing(List) -- Ehrhart ring
*********************************

Synopsis
========

  * Function: ehrhartRing,
  * Usage:
        ehrhartRing L
  * Inputs:
      * a list (Macaulay2Doc), the monomials corresponding to the
        vertices of a lattice polytope
  * Optional inputs (Macaulay2Doc),:
      * allComputations,
        => ..., default
        value false, Ehrhart ring
  * Outputs:
      * an instance of the type MonomialSubalgebra,
        generated by the lattice points of the polytope
      * an instance of the type MonomialSubalgebra,
        the Ehrhart ring of the polytope

Description
===========

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             |
+-------------------------------------------+

Ways to use this method:
========================

  * ehrhartRing(List) -- Ehrhart ring

ehrhartRing(List,allComputations=>...) -- Ehrhart ring
******************************************************

Synopsis
========

  * Usage:
        ehrhartRing L
  * Inputs:
      * a list (Macaulay2Doc), the monomials corresponding to the
        vertices of a lattice polytope
  * Outputs:
      * an instance of the type MonomialSubalgebra,
        generated by the lattice points of the polytope
      * an instance of the type MonomialSubalgebra,
        the Ehrhart ring of the polytope

Description
===========

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. If the option allComputations, is
set to true, all data that has been computed by Normaliz is stored in a
RationalCone, in the CacheTable of the monomial subalgebras
returned (it is the same cone for both subalgebras).
+---------------------------------------------------------------------------+
|i1 : R=ZZ/37[x,y];                                                         |
+---------------------------------------------------------------------------+
|i2 : L={x^3, x^2*y, y^3, x*y^2};                                           |
+---------------------------------------------------------------------------+
|i3 : (latticePoints,ehrhart)=ehrhartRing(allComputations=>true,L);         |
+---------------------------------------------------------------------------+
|i4 : latticePoints.cache#"cone"                                            |
|                                                                           |
|o4 = RationalCone{"cgr" => | 0 |                                          }|
|                           | 4 |                                           |
|                  "equ" => | 1 1 -3 |                                      |
|                  "gen" => | 0 3 1 |                                       |
|                           | 1 2 1 |                                       |
|                           | 2 1 1 |                                       |
|                           | 3 0 1 |                                       |
|                  "inv" => HashTable{"" => (1, 1)                        } |
|                                     "class group" => (0, 3)               |
|                                     "degree 1 elements" => 4              |
|                                     "dim max subspace" => 0               |
|                                     "embedding dim" => 3                  |
|                                     "external index" => 1                 |
|                                     "graded" => true                      |
|                                     "grading denom" => 1                  |
|                                     "grading" => (0, 0, 1)                |
|                                     "hilbert basis elements" => 4         |
|                                     "hilbert quasipolynomial denom" => 1  |
|                                     "hilbert series denom" => (1, 1)      |
|                                     "hilbert series num" => (1, 2)        |
|                                     "inhomogeneous" => false              |
|                                     "integrally closed" => true           |
|                                     "internal index" => 1                 |
|                                     "multiplicity denom" => 1             |
|                                     "multiplicity" => 3                   |
|                                     "number extreme rays" => 2            |
|                                     "number support hyperplanes" => 2     |
|                                     "rank" => 2                           |
|                                     "size triangulation" => 3             |
|                                     "sum dets" => 3                       |
|                  "sup" => | -1 0 3 |                                      |
|                           | 1  0 0 |                                      |
|                                                                           |
|o4 : RationalCone                                                          |
+---------------------------------------------------------------------------+
|i5 : ehrhart.cache#"cone"                                                  |
|                                                                           |
|o5 = RationalCone{"cgr" => | 0 |                                          }|
|                           | 4 |                                           |
|                  "equ" => | 1 1 -3 |                                      |
|                  "gen" => | 0 3 1 |                                       |
|                           | 1 2 1 |                                       |
|                           | 2 1 1 |                                       |
|                           | 3 0 1 |                                       |
|                  "inv" => HashTable{"" => (1, 1)                        } |
|                                     "class group" => (0, 3)               |
|                                     "degree 1 elements" => 4              |
|                                     "dim max subspace" => 0               |
|                                     "embedding dim" => 3                  |
|                                     "external index" => 1                 |
|                                     "graded" => true                      |
|                                     "grading denom" => 1                  |
|                                     "grading" => (0, 0, 1)                |
|                                     "hilbert basis elements" => 4         |
|                                     "hilbert quasipolynomial denom" => 1  |
|                                     "hilbert series denom" => (1, 1)      |
|                                     "hilbert series num" => (1, 2)        |
|                                     "inhomogeneous" => false              |
|                                     "integrally closed" => true           |
|                                     "internal index" => 1                 |
|                                     "multiplicity denom" => 1             |
|                                     "multiplicity" => 3                   |
|                                     "number extreme rays" => 2            |
|                                     "number support hyperplanes" => 2     |
|                                     "rank" => 2                           |
|                                     "size triangulation" => 3             |
|                                     "sum dets" => 3                       |
|                  "sup" => | -1 0 3 |                                      |
|                           | 1  0 0 |                                      |
|                                                                           |
|o5 : RationalCone                                                          |
+---------------------------------------------------------------------------+

Further information
===================

  * Default value: false (Macaulay2Doc),
  * Method: ehrhartRing(List), -- Ehrhart ring
  * Option key: allComputations,

Functions with optional argument named allComputations :
========================================================

  * "diagInvariants(Matrix,Matrix,Ring,allComputations=>...)" -- see
    diagInvariants, -- ring of invariants of a diagonalizable
    group action
  * ehrhartRing(List,allComputations=>...)
    -- Ehrhart ring
  * ehrhartRing(List,RingElement,allComputations=>...),
    --
    Ehrhart ring
  * "finiteDiagInvariants(Matrix,Ring,allComputations=>...)" -- see
    finiteDiagInvariants, -- ring of invariants of a
    finite group action
  * intclMonIdeal(Ideal,allComputations=>...)
    -- normalization of
    Rees algebra
  * intclMonIdeal(Ideal,RingElement,allComputations=>...),
    --
    normalization of Rees algebra
  * intclToricRing(List,allComputations=>...)
    -- integral closure
    of a toric ring
  * intclToricRing(MonomialSubalgebra,allComputations=>...),
    --
    integral closure of a toric ring
  * "intersectionValRingIdeals(Matrix,Ring,allComputations=>...)" -- see
    intersectionValRingIdeals, -- intersection of
    valuation ideals
  * "intersectionValRings(Matrix,Ring,allComputations=>...)" -- see
    intersectionValRings, -- intersection of ring of
    valuations
  * "normaliz(List,allComputations=>...)" -- see normaliz(List),
    -- calls Normaliz with several input matrices
  * "normaliz(Matrix,String,allComputations=>...)" -- see
    normaliz(Matrix,String), -- calls Normaliz
  * normaliz(Matrix,ZZ,allComputations=>...) (missing documentation)
  * "normalToricRing(Ideal,Thing,allComputations=>...)" -- see
    normalToricRing(Ideal,Thing), --
    normalization of a toric ring given by a binomial ideal
  * normalToricRing(List,allComputations=>...)
    -- normalization of
    a toric ring
  * normalToricRing(MonomialSubalgebra,allComputations=>...),
    --
    normalization of a toric ring
  * "torusInvariants(Matrix,Ring,allComputations=>...)" -- see
    torusInvariants, -- ring of invariants of torus action

ehrhartRing(List,RingElement) -- Ehrhart ring
*********************************************

Synopsis
========

  * Function: ehrhartRing,
  * Usage:
        ehrhartRing(L,t)
  * Inputs:
      * a list (Macaulay2Doc), the monomials corresponding to the
        vertices of a lattice polytope
      * a ring element (Macaulay2Doc),  the free variable
        that should be used for the computation
  * Optional inputs (Macaulay2Doc),:
      * allComputations,
        =>
        ..., default value false, Ehrhart ring
  * Outputs:
      * an instance of the type MonomialSubalgebra,
        generated by the lattice points of the polytope
      * an instance of the type MonomialSubalgebra,
        the Ehrhart ring of the polytope

Description
===========

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                 |
+----------------------------------------------+

Ways to use this method:
========================

  * ehrhartRing(List,RingElement),
    -- Ehrhart ring

ehrhartRing(List,RingElement,allComputations=>...) -- Ehrhart ring
******************************************************************

Synopsis
========

  * Usage:
        ehrhartRing(L,t)
  * Inputs:
      * a list (Macaulay2Doc), the monomials corresponding to the
        vertices of a lattice polytope
      * a ring element (Macaulay2Doc),  the free variable
        that should be used for the computation
  * Outputs:
      * an instance of the type MonomialSubalgebra,
        generated by the lattice points of the polytope
      * an instance of the type MonomialSubalgebra,
        the Ehrhart ring of the polytope

Description
===========

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), you
can give the function that variable as second input. The function then uses it
instead of creating a new one.  If the option allComputations,
is set to true, all data that has been computed by Normaliz is
stored in a RationalCone, in the CacheTable of the monomial
subalgebras returned (it is the same cone for both subalgebras).
+---------------------------------------------------------------------------+
|i1 : R=ZZ/37[x,y,t];                                                       |
+---------------------------------------------------------------------------+
|i2 : L={x^3, x^2*y, y^3, x*y^2};                                           |
+---------------------------------------------------------------------------+
|i3 : (latticePoints,ehrhart)=ehrhartRing(allComputations=>true,L,t);       |
+---------------------------------------------------------------------------+
|i4 : latticePoints.cache#"cone"                                            |
|                                                                           |
|o4 = RationalCone{"cgr" => | 0 |                                          }|
|                           | 4 |                                           |
|                  "equ" => | 1 1 -3 |                                      |
|                  "gen" => | 0 3 1 |                                       |
|                           | 1 2 1 |                                       |
|                           | 2 1 1 |                                       |
|                           | 3 0 1 |                                       |
|                  "inv" => HashTable{"" => (1, 1)                        } |
|                                     "class group" => (0, 3)               |
|                                     "degree 1 elements" => 4              |
|                                     "dim max subspace" => 0               |
|                                     "embedding dim" => 3                  |
|                                     "external index" => 1                 |
|                                     "graded" => true                      |
|                                     "grading denom" => 1                  |
|                                     "grading" => (0, 0, 1)                |
|                                     "hilbert basis elements" => 4         |
|                                     "hilbert quasipolynomial denom" => 1  |
|                                     "hilbert series denom" => (1, 1)      |
|                                     "hilbert series num" => (1, 2)        |
|                                     "inhomogeneous" => false              |
|                                     "integrally closed" => true           |
|                                     "internal index" => 1                 |
|                                     "multiplicity denom" => 1             |
|                                     "multiplicity" => 3                   |
|                                     "number extreme rays" => 2            |
|                                     "number support hyperplanes" => 2     |
|                                     "rank" => 2                           |
|                                     "size triangulation" => 3             |
|                                     "sum dets" => 3                       |
|                  "sup" => | -1 0 3 |                                      |
|                           | 1  0 0 |                                      |
|                                                                           |
|o4 : RationalCone                                                          |
+---------------------------------------------------------------------------+
|i5 : ehrhart.cache#"cone"                                                  |
|                                                                           |
|o5 = RationalCone{"cgr" => | 0 |                                          }|
|                           | 4 |                                           |
|                  "equ" => | 1 1 -3 |                                      |
|                  "gen" => | 0 3 1 |                                       |
|                           | 1 2 1 |                                       |
|                           | 2 1 1 |                                       |
|                           | 3 0 1 |                                       |
|                  "inv" => HashTable{"" => (1, 1)                        } |
|                                     "class group" => (0, 3)               |
|                                     "degree 1 elements" => 4              |
|                                     "dim max subspace" => 0               |
|                                     "embedding dim" => 3                  |
|                                     "external index" => 1                 |
|                                     "graded" => true                      |
|                                     "grading denom" => 1                  |
|                                     "grading" => (0, 0, 1)                |
|                                     "hilbert basis elements" => 4         |
|                                     "hilbert quasipolynomial denom" => 1  |
|                                     "hilbert series denom" => (1, 1)      |
|                                     "hilbert series num" => (1, 2)        |
|                                     "inhomogeneous" => false              |
|                                     "integrally closed" => true           |
|                                     "internal index" => 1                 |
|                                     "multiplicity denom" => 1             |
|                                     "multiplicity" => 3                   |
|                                     "number extreme rays" => 2            |
|                                     "number support hyperplanes" => 2     |
|                                     "rank" => 2                           |
|                                     "size triangulation" => 3             |
|                                     "sum dets" => 3                       |
|                  "sup" => | -1 0 3 |                                      |
|                           | 1  0 0 |                                      |
|                                                                           |
|o5 : RationalCone                                                          |
+---------------------------------------------------------------------------+

Further information
===================

  * Default value: false (Macaulay2Doc),
  * Method: ehrhartRing(List,RingElement),
    -- Ehrhart ring
  * Option key: allComputations,

Functions with optional argument named allComputations :
========================================================

  * "diagInvariants(Matrix,Matrix,Ring,allComputations=>...)" -- see
    diagInvariants, -- ring of invariants of a diagonalizable
    group action
  * ehrhartRing(List,allComputations=>...)
    -- Ehrhart ring
  * ehrhartRing(List,RingElement,allComputations=>...),
    --
    Ehrhart ring
  * "finiteDiagInvariants(Matrix,Ring,allComputations=>...)" -- see
    finiteDiagInvariants, -- ring of invariants of a
    finite group action
  * intclMonIdeal(Ideal,allComputations=>...)
    -- normalization of
    Rees algebra
  * intclMonIdeal(Ideal,RingElement,allComputations=>...),
    --
    normalization of Rees algebra
  * intclToricRing(List,allComputations=>...)
    -- integral closure
    of a toric ring
  * intclToricRing(MonomialSubalgebra,allComputations=>...),
    --
    integral closure of a toric ring
  * "intersectionValRingIdeals(Matrix,Ring,allComputations=>...)" -- see
    intersectionValRingIdeals, -- intersection of
    valuation ideals
  * "intersectionValRings(Matrix,Ring,allComputations=>...)" -- see
    intersectionValRings, -- intersection of ring of
    valuations
  * "normaliz(List,allComputations=>...)" -- see normaliz(List),
    -- calls Normaliz with several input matrices
  * "normaliz(Matrix,String,allComputations=>...)" -- see
    normaliz(Matrix,String), -- calls Normaliz
  * normaliz(Matrix,ZZ,allComputations=>...) (missing documentation)
  * "normalToricRing(Ideal,Thing,allComputations=>...)" -- see
    normalToricRing(Ideal,Thing), --
    normalization of a toric ring given by a binomial ideal
  * normalToricRing(List,allComputations=>...)
    -- normalization of
    a toric ring
  * normalToricRing(MonomialSubalgebra,allComputations=>...),
    --
    normalization of a toric ring
  * "torusInvariants(Matrix,Ring,allComputations=>...)" -- see
    torusInvariants, -- ring of invariants of torus action

finiteDiagInvariants -- ring of invariants of a finite group action
*******************************************************************

Synopsis
========

  * Usage:
        finiteDiagInvariants(U,R)
  * Inputs:
      * a matrix (Macaulay2Doc), whose rows are the values of the
        indeterminates under the action of a finite group
      * a ring (Macaulay2Doc),  the basering
  * Outputs:
      * an instance of the type MonomialSubalgebra,
        the ring of invariants

Description
===========

This function computes the ring of invariants of a finite abelian group G
acting diagonally on the surrounding polynomial ring K[X_1,\ldots,X_n]. The
group is the direct product of cyclic groups generated by finitely many
elements g_1,\ldots,g_w. The element g_i acts on the indeterminate X_j by
g_i(X_j)= \lambda_i^{u_{ij}}X_jwhere \lambda_i is a primitive root of unity of
order equal to ord(g_i). The ring of invariants is generated by all monomials
satisfying the system u_{i1}a_1+...+u_{in} a_n \equiv \ 0 mod ord(g_i),
i=1,\ldots,w. The input to the function is the w\times (n+1) matrix U with rows
u_{i1} \ldots u_{in} ord(g_i), i=1,\ldots,w. The output is the monomial
subalgebra of invariants R^G=\{f\in R : g_i f= f  for all i=1,\ldots,w\}.

This method can be used with the options allComputations,
and grading.
+-----------------------------------------------------------------------------+
|i1 : R=QQ[x,y,z,w];                                                          |
+-----------------------------------------------------------------------------+
|i2 : U=matrix{{1,1,1,1,5},{1,0,2,0,7}}                                       |
|                                                                             |
|o2 = | 1 1 1 1 5 |                                                           |
|     | 1 0 2 0 7 |                                                           |
|                                                                             |
|              2        5                                                     |
|o2 : Matrix ZZ  <--- ZZ                                                      |
+-----------------------------------------------------------------------------+
|i3 : finiteDiagInvariants(U,R)                                               |
|                                                                             |
|         5   7 3   14    35     4     7 2     14   2 3   2 7    3 2   3 7    |
|o3 = QQ[w , z w , z  w, z  , y*w , y*z w , y*z  , y w , y z w, y w , y z ,   |
|                                                                             |
|o3 : monomial subalgebra of R                                                |
|-----------------------------------------------------------------------------|
| 4    5     3      24       3   2 13   3 2   5   4   5     3   5 2   2       |
|y w, y , x*z w, x*z  , x*y*z , x z  , x z , x z*w , x y*z*w , x y z*w ,      |
|-----------------------------------------------------------------------------|
| 5 3      5 4    7 3   7   2   7 2    7 3   12   2   12        12 2    14    |
|x y z*w, x y z, x w , x y*w , x y w, x y , x  z*w , x  y*z*w, x  y z, x  w,  |
|-----------------------------------------------------------------------------|
| 14    19    35                                                              |
|x  y, x  z, x  ]                                                             |
+-----------------------------------------------------------------------------+

See also
========

  * diagInvariants -- ring of invariants of a
    diagonalizable group action
  * torusInvariants -- ring of invariants of torus
    action

Ways to use finiteDiagInvariants :
==================================

  * "finiteDiagInvariants(Matrix,Ring)"

For the programmer
==================

The object finiteDiagInvariants, is a method function with options (Macaulay2Doc).

generators(MonomialSubalgebra) -- generators of a monomial subalgebra
*********************************************************************

Synopsis
========

  * Function: generators (Macaulay2Doc),
  * Usage:
        gens S
  * Inputs:
      * an instance of the type MonomialSubalgebra,
  * Optional inputs (Macaulay2Doc),:
      * CoefficientRing (Macaulay2Doc), => ...,
        default value null, null
  * Outputs:
      * a list (Macaulay2Doc),  whose entries are the generators of
        the monomial subalgebra S

Description
===========

+-------------------------------------------------+
|i1 : R=ZZ/37[x,y,z];                             |
+-------------------------------------------------+
|i2 : S=createMonomialSubalgebra {x^2*y, x*z, z^3}|
|                                                 |
|     ZZ  2         3                             |
|o2 = --[x y, x*z, z ]                            |
|     37                                          |
|                                                 |
|o2 : monomial subalgebra of R                    |
+-------------------------------------------------+
|i3 : gens S                                      |
|                                                 |
|       2         3                               |
|o3 = {x y, x*z, z }                              |
|                                                 |
|o3 : List                                        |
+-------------------------------------------------+

See also
========

  * vars(MonomialSubalgebra) -- row matrix
    of the generators of a monomial subalgebra

Ways to use this method:
========================

  * generators(MonomialSubalgebra),
    -- generators of a monomial subalgebra

getNumInvs -- returns the numerical invariants computed
*******************************************************

Synopsis
========

  * Usage:
        getNumInvs()
  * Outputs:
      * a hash table (Macaulay2Doc), the numerical invariants

Description
===========

This function returns a hashtable containing the invariants printed to the file
with suffix inv, if the files are kept, i.e., if a filename is specified (see
Keeping results of the computation by Normaliz).
The key of an entry is a String (Macaulay2Doc),
describing the invariant, the value is the invariant,
namely an ZZ (Macaulay2Doc), for rank, index, multiplicity, a
Sequence (Macaulay2Doc), for the grading, the Hilbert series and the
Hilbert quasi-polynomial and a Boolean (Macaulay2Doc), for graded
and primary (in the case of a Rees algebra).
+------------------------------------------------------+
|i1 : R=ZZ/37[x,y,t];                                  |
+------------------------------------------------------+
|i2 : I=ideal(x^3,x^2*y,y^3);                          |
|                                                      |
|o2 : Ideal of R                                       |
+------------------------------------------------------+
|i3 : nmzFilename="example";                           |
+------------------------------------------------------+
|i4 : setNmzOption("hilb",true);                       |
+------------------------------------------------------+
|i5 : intclMonIdeal I;                                 |
+------------------------------------------------------+
|i6 : invs=getNumInvs()                                |
|                                                      |
|o6 = HashTable{"" => (1, 1, 1, 1)                    }|
|               "degree 1 elements" => 7               |
|               "dim max subspace" => 0                |
|               "embedding dim" => 4                   |
|               "external index" => 1                  |
|               "graded" => true                       |
|               "grading denom" => 1                   |
|               "grading" => (1, 1, 1, -2)             |
|               "hilbert basis elements" => 7          |
|               "hilbert quasipolynomial denom" => 6   |
|               "hilbert series denom" => (1, 1, 1, 1) |
|               "hilbert series num" => (1, 3)         |
|               "inhomogeneous" => false               |
|               "integrally closed" => false           |
|               "internal index" => 1                  |
|               "multiplicity denom" => 1              |
|               "multiplicity" => 4                    |
|               "number extreme rays" => 5             |
|               "number support hyperplanes" => 5      |
|               "primary" => false                     |
|               "rank" => 4                            |
|               "size triangulation" => 3              |
|               "sum dets" => 4                        |
|                                                      |
|o6 : HashTable                                        |
+------------------------------------------------------+
|i7 : hvector=invs#"hilbert series num"                |
|                                                      |
|o7 = (1, 3)                                           |
|                                                      |
|o7 : Sequence                                         |
+------------------------------------------------------+
|i8 : invs#"hilbert series denom"                      |
|                                                      |
|o8 = (1, 1, 1, 1)                                     |
|                                                      |
|o8 : Sequence                                         |
+------------------------------------------------------+
|i9 : rmNmzFiles();                                    |
+------------------------------------------------------+

For the programmer
==================

The object getNumInvs, is a function closure (Macaulay2Doc).

grading
*******

Description
===========

grading is an option for normaliz, intclToricRing,
see normalToricRing, intclMonIdeal,
see torusInvariants,
finiteDiagInvariants, diagInvariants,
see intersectionValRings,
intersectionValRingIdeals. Its default value is an
empty list. If it is set to a list of integers it will be used as grading. This
has no influence on the generators of the computed objects, but on additional
data like the multiplicity or the Hilbert series. The grading may have
non-positive entries, but it must give positive values for all generators.
+----------------------------------------------------------------+
|i1 : R=ZZ/37[x,y,t];                                            |
+----------------------------------------------------------------+
|i2 : L={x^3, x^2*y, y^3, x*y^2};                                |
+----------------------------------------------------------------+
|i3 : T=intclToricRing(allComputations=>true,L);                 |
+----------------------------------------------------------------+
|i4 : T.cache#"cone"#"inv"#"hilbert series num"                  |
|                                                                |
|o4 = 1 : (1)                                                    |
|                                                                |
|o4 : Sequence                                                   |
+----------------------------------------------------------------+
|i5 : T.cache#"cone"#"inv"#"hilbert series denom"                |
|                                                                |
|o5 = (1, 1)                                                     |
|                                                                |
|o5 : Sequence                                                   |
+----------------------------------------------------------------+
|i6 : T=intclToricRing(allComputations=>true,grading=>{3,2,1},L);|
+----------------------------------------------------------------+
|i7 : T.cache#"cone"#"inv"#"hilbert series num"                  |
|                                                                |
|o7 = (1, -1, 1)                                                 |
|                                                                |
|o7 : Sequence                                                   |
+----------------------------------------------------------------+
|i8 : T.cache#"cone"#"inv"#"hilbert series denom"                |
|                                                                |
|o8 = (1, 6)                                                     |
|                                                                |
|o8 : Sequence                                                   |
+----------------------------------------------------------------+

See also
========

  * allComputations

Functions with optional argument named grading :
================================================

  * "diagInvariants(Matrix,Matrix,Ring,grading=>...)" -- see
    diagInvariants, -- ring of invariants of a diagonalizable
    group action
  * "finiteDiagInvariants(Matrix,Ring,grading=>...)" -- see
    finiteDiagInvariants, -- ring of invariants of a
    finite group action
  * "intclMonIdeal(Ideal,grading=>...)" -- see
    intclMonIdeal(Ideal,allComputations=>...),
    -- normalization of
    Rees algebra
  * "intclMonIdeal(Ideal,RingElement,grading=>...)" -- see
    intclMonIdeal(Ideal,RingElement,allComputations=>...),
    --
    normalization of Rees algebra
  * "intclToricRing(List,grading=>...)" -- see
    intclToricRing(List,allComputations=>...),
    -- integral closure
    of a toric ring
  * "intclToricRing(MonomialSubalgebra,grading=>...)" -- see
    intclToricRing(MonomialSubalgebra,allComputations=>...),
    --
    integral closure of a toric ring
  * "intersectionValRingIdeals(Matrix,Ring,grading=>...)" -- see
    intersectionValRingIdeals, -- intersection of
    valuation ideals
  * "intersectionValRings(Matrix,Ring,grading=>...)" -- see
    intersectionValRings, -- intersection of ring of
    valuations
  * "normaliz(List,grading=>...)" -- see normaliz(List),
    -- calls Normaliz with several input matrices
  * "normaliz(Matrix,String,grading=>...)" -- see
    normaliz(Matrix,String), -- calls Normaliz
  * normaliz(Matrix,ZZ,grading=>...) (missing documentation)
  * "normalToricRing(Ideal,Thing,grading=>...)" -- see
    normalToricRing(Ideal,Thing), --
    normalization of a toric ring given by a binomial ideal
  * "normalToricRing(List,grading=>...)" -- see
    normalToricRing(List,allComputations=>...),
    -- normalization of
    a toric ring
  * "normalToricRing(MonomialSubalgebra,grading=>...)" -- see
    normalToricRing(MonomialSubalgebra,allComputations=>...),
    --
    normalization of a toric ring
  * "torusInvariants(Matrix,Ring,grading=>...)" -- see torusInvariants,
    -- ring of invariants of torus action

For the programmer
==================

The object grading, is a symbol (Macaulay2Doc).

intclMonIdeal -- normalization of Rees algebra
**********************************************

Description
===========

This function computes the integral closure of a monomial ideal
I=(f_1,\ldots,f_m)\subset R in the polynomial ring R[t] and the normalization
of its Rees algebra. The normalization of the Rees algebra is the integral
closure of R[f_1t,\ldots,f_mt] in R[t]. For a definition of the Rees algebra
(or Rees ring) see Bruns and Herzog, Cohen-Macaulay rings, Cambridge University
Press 1998, p. 182.

Ways to use intclMonIdeal :
===========================

  * intclMonIdeal(Ideal) -- normalization of
    Rees algebra
  * intclMonIdeal(Ideal,RingElement)
    -- normalization of Rees algebra

For the programmer
==================

The object intclMonIdeal, is a method function with options (Macaulay2Doc).

intclMonIdeal(Ideal) -- normalization of Rees algebra
*****************************************************

Synopsis
========

  * Function: intclMonIdeal,
  * Usage:
        intclMonIdeal I
  * Inputs:
      * an ideal (Macaulay2Doc), the leading monomials of the
        elements of the ideal are considered as generators of a monomial ideal
  * Optional inputs (Macaulay2Doc),:
      * allComputations,
        => ..., default
        value false, normalization of Rees algebra
      * grading,
        => ..., default value {}, normalization of Rees algebra
  * Outputs:
      * an ideal (Macaulay2Doc), the integral closure of the input
        ideal
      * an instance of the type MonomialSubalgebra,
        the normalization of the Rees algebra of I

Description
===========

The leading monomials of the elements of I are considered as generators of a
monomial ideal. This function computes the integral closure of I\subset R in
the polynomial ring R[t] and the normalization of its Rees algebra. If
f_1,\ldots,f_m are the monomial generators of I, then the normalization of the
Rees algebra is the integral closure of K[f_1t,\ldots,f_nt] in R[t]. For a
definition of the Rees algebra (or Rees ring) see Bruns and Herzog,
Cohen-Macaulay rings, Cambridge University Press 1998, p. 182. The function
returns the integral closure of the ideal I and the normalization of its Rees
algebra. Since the Rees algebra is 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 : I=ideal(x^3, x^2*y, y^3, x*y^2);  |
|                                       |
|o2 : Ideal of R                        |
+---------------------------------------+
|i3 : (intCl,normRees)=intclMonIdeal I; |
+---------------------------------------+
|i4 : intCl                             |
|                                       |
|             3     2   2    3          |
|o4 = ideal (y , x*y , x y, x )         |
|                                       |
|              ZZ                       |
|o4 : Ideal of --[x..y, a]              |
|              37                       |
+---------------------------------------+
|i5 : normRees                          |
|                                       |
|     ZZ     3         2    2      3    |
|o5 = --[y, y a, x, x*y a, x y*a, x a]  |
|     37                                |
|                                       |
|                            ZZ         |
|o5 : monomial subalgebra of --[x..y, a]|
|                            37         |
+---------------------------------------+

Ways to use this method:
========================

  * intclMonIdeal(Ideal) -- normalization of
    Rees algebra

intclMonIdeal(Ideal,allComputations=>...) -- normalization of Rees algebra
**************************************************************************

Synopsis
========

  * Usage:
        intclMonIdeal I
  * Inputs:
      * an ideal (Macaulay2Doc), the leading monomials of the
        elements of the ideal are considered as generators of a monomial ideal
  * Outputs:
      * an ideal (Macaulay2Doc), the integral closure of the input
        ideal
      * an instance of the type MonomialSubalgebra,
        the normalization of the Rees algebra of I

Description
===========

The leading monomials of the elements of I are considered as generators of a
monomial ideal. This function computes the integral closure of I\subset R in
the polynomial ring R[t] and the normalization of its Rees algebra. If
f_1,\ldots,f_m are the monomial generators of I, then the normalization of the
Rees algebra is the integral closure of K[f_1t,\ldots,f_nt] in R[t]. For a
definition of the Rees algebra (or Rees ring) see Bruns and Herzog,
Cohen-Macaulay rings, Cambridge University Press 1998, p. 182. The function
returns the integral closure of the ideal I and the normalization of its Rees
algebra. Since the Rees algebra is defined in a polynomial ring with an
additional variable, the function creates a new polynomial ring with an
additional variable. If the option allComputations, is
set to true, all data that has been computed by Normaliz is stored in a
RationalCone, in the CacheTable of the monomial subalgebra
returned. This method can also be used with the option grading.
+-----------------------------------------------------------------------------+
|i1 : R=ZZ/37[x,y];                                                           |
+-----------------------------------------------------------------------------+
|i2 : I=ideal(x^3, x^2*y, y^3, x*y^2);                                        |
|                                                                             |
|o2 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i3 : (intCl,normRees)=intclMonIdeal(allComputations=>true,I)                 |
|                                                                             |
|              3     2   2    3                                               |
|o3 = (ideal (y , x*y , x y, x ),                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|     ------------------------------------------------------------------------|
|     MonomialSubalgebra{cache => CacheTable{...1...}                })       |
|                                           3         2    2      3           |
|                        generators => {y, y a, x, x*y a, x y*a, x a}         |
|                                ZZ                                           |
|                        ring => --[x..y, a]                                  |
|                                37                                           |
|                                                                             |
|o3 : Sequence                                                                |
+-----------------------------------------------------------------------------+
|i4 : normRees.cache#"cone"                                                   |
|                                                                             |
|o4 = RationalCone{"cgr" => | 0 |                                          }  |
|                           | 4 |                                             |
|                  "equ" => | 0 |                                             |
|                           | 3 |                                             |
|                  "gen" => | 0 1 0 |                                         |
|                           | 0 3 1 |                                         |
|                           | 1 0 0 |                                         |
|                           | 1 2 1 |                                         |
|                           | 2 1 1 |                                         |
|                           | 3 0 1 |                                         |
|                  "inv" => HashTable{"" => (1, 1, 1)                     }   |
|                                     "class group" => 1 : (1)                |
|                                     "degree 1 elements" => 6                |
|                                     "dim max subspace" => 0                 |
|                                     "embedding dim" => 3                    |
|                                     "external index" => 1                   |
|                                     "graded" => true                        |
|                                     "grading denom" => 1                    |
|                                     "grading" => (1, 1, -2)                 |
|                                     "hilbert basis elements" => 6           |
|                                     "hilbert quasipolynomial denom" => 1    |
|                                     "hilbert series denom" => (1, 1, 1)     |
|                                     "hilbert series num" => (1, 3)          |
|                                     "ideal multiplicity" => 9               |
|                                     "inhomogeneous" => false                |
|                                     "integrally closed" => true             |
|                                     "internal index" => 1                   |
|                                     "multiplicity denom" => 1               |
|                                     "multiplicity" => 4                     |
|                                     "number extreme rays" => 4              |
|                                     "number support hyperplanes" => 4       |
|                                     "primary" => true                       |
|                                     "rank" => 3                             |
|                                     "size triangulation" => 4               |
|                                     "sum dets" => 4                         |
|                  "sup" => | 0 0 1  |                                        |
|                           | 0 1 0  |                                        |
|                           | 1 0 0  |                                        |
|                           | 1 1 -3 |                                        |
|                                                                             |
|o4 : RationalCone                                                            |
+-----------------------------------------------------------------------------+

Further information
===================

  * Default value: false (Macaulay2Doc),
  * Method: intclMonIdeal(Ideal), --
    normalization of Rees algebra
  * Option key: allComputations,

Functions with optional argument named allComputations :
========================================================

  * "diagInvariants(Matrix,Matrix,Ring,allComputations=>...)" -- see
    diagInvariants, -- ring of invariants of a diagonalizable
    group action
  * ehrhartRing(List,allComputations=>...)
    -- Ehrhart ring
  * ehrhartRing(List,RingElement,allComputations=>...),
    --
    Ehrhart ring
  * "finiteDiagInvariants(Matrix,Ring,allComputations=>...)" -- see
    finiteDiagInvariants, -- ring of invariants of a
    finite group action
  * intclMonIdeal(Ideal,allComputations=>...)
    -- normalization of
    Rees algebra
  * intclMonIdeal(Ideal,RingElement,allComputations=>...),
    --
    normalization of Rees algebra
  * intclToricRing(List,allComputations=>...)
    -- integral closure
    of a toric ring
  * intclToricRing(MonomialSubalgebra,allComputations=>...),
    --
    integral closure of a toric ring
  * "intersectionValRingIdeals(Matrix,Ring,allComputations=>...)" -- see
    intersectionValRingIdeals, -- intersection of
    valuation ideals
  * "intersectionValRings(Matrix,Ring,allComputations=>...)" -- see
    intersectionValRings, -- intersection of ring of
    valuations
  * "normaliz(List,allComputations=>...)" -- see normaliz(List),
    -- calls Normaliz with several input matrices
  * "normaliz(Matrix,String,allComputations=>...)" -- see
    normaliz(Matrix,String), -- calls Normaliz
  * normaliz(Matrix,ZZ,allComputations=>...) (missing documentation)
  * "normalToricRing(Ideal,Thing,allComputations=>...)" -- see
    normalToricRing(Ideal,Thing), --
    normalization of a toric ring given by a binomial ideal
  * normalToricRing(List,allComputations=>...)
    -- normalization of
    a toric ring
  * normalToricRing(MonomialSubalgebra,allComputations=>...),
    --
    normalization of a toric ring
  * "torusInvariants(Matrix,Ring,allComputations=>...)" -- see
    torusInvariants, -- ring of invariants of torus action

intclMonIdeal(Ideal,RingElement) -- normalization of Rees algebra
*****************************************************************

Synopsis
========

  * Function: intclMonIdeal,
  * Usage:
        intclMonIdeal(I,t)
  * Inputs:
      * an ideal (Macaulay2Doc), the leading monomials of the
        elements of the ideal are considered as generators of a monomial ideal
      *  the free variable of the ring that should be used for the computation
        (optional), a ring element (Macaulay2Doc),
  * Optional inputs (Macaulay2Doc),:
      * allComputations,
        =>
        ..., default value false, normalization of Rees algebra
      * grading,
        => ..., default value {}, normalization of Rees algebra
  * Outputs:
      * an ideal (Macaulay2Doc), the integral closure of the input
        ideal
      * an instance of the type MonomialSubalgebra,
        the normalization of the Rees algebra of I

Description
===========

The leading monomials of the elements of I are considered as generators of a
monomial ideal. This function computes the integral closure of I\subset R in
the polynomial ring R[t] and the normalization of its Rees algebra. If
f_1,\ldots,f_m are the monomial generators of I, then the normalization of the
Rees algebra is the integral closure of K[f_1t,\ldots,f_nt] in R[t]. For a
definition of the Rees algebra (or Rees ring) see Bruns and Herzog,
Cohen-Macaulay rings, Cambridge University Press 1998, p. 182. The function
returns the integral closure of the ideal I and the normalization of its Rees
algebra. If there is a free variable in the original ring (i.e. a variable that
does not appear in any of the generators of I), you can give the function that
variable as second input. The function then uses it instead of creating a new
one. Note that in this case the input ideal is considered as ideal in the
smaller polynomial ring.
+-----------------------------------------+
|i1 : R=ZZ/37[x,y,t];                     |
+-----------------------------------------+
|i2 : I=ideal(x^3, x^2*y, y^3, x*y^2);    |
|                                         |
|o2 : Ideal of R                          |
+-----------------------------------------+
|i3 : (intCl,normRees)=intclMonIdeal(I,t);|
+-----------------------------------------+
|i4 : intCl                               |
|                                         |
|             3     2   2    3            |
|o4 = ideal (y , x*y , x y, x )           |
|                                         |
|o4 : Ideal of R                          |
+-----------------------------------------+
|i5 : normRees                            |
|                                         |
|     ZZ     3         2    2      3      |
|o5 = --[y, y t, x, x*y t, x y*t, x t]    |
|     37                                  |
|                                         |
|o5 : monomial subalgebra of R            |
+-----------------------------------------+

Ways to use this method:
========================

  * intclMonIdeal(Ideal,RingElement)
    -- normalization of Rees algebra

intclMonIdeal(Ideal,RingElement,allComputations=>...) -- normalization of Rees algebra
**************************************************************************************

Synopsis
========

  * Usage:
        intclMonIdeal(I,t)
  * Inputs:
      * an ideal (Macaulay2Doc), the leading monomials of the
        elements of the ideal are considered as generators of a monomial ideal
      *  the free variable of the ring that should be used for the computation
        (optional), a ring element (Macaulay2Doc),
  * Outputs:
      * an ideal (Macaulay2Doc), the integral closure of the input
        ideal
      * an instance of the type MonomialSubalgebra,
        the normalization of the Rees algebra of I

Description
===========

The leading monomials of the elements of I are considered as generators of a
monomial ideal. This function computes the integral closure of I\subset R in
the polynomial ring R[t] and the normalization of its Rees algebra. If
f_1,\ldots,f_m are the monomial generators of I, then the normalization of the
Rees algebra is the integral closure of K[f_1t,\ldots,f_nt] in R[t]. For a
definition of the Rees algebra (or Rees ring) see Bruns and Herzog,
Cohen-Macaulay rings, Cambridge University Press 1998, p. 182. The function
returns the integral closure of the ideal I and the normalization of its Rees
algebra. If there is a free variable in the original ring (i.e. a variable that
does not appear in any of the generators of I), you can give the function that
variable as second input. The function then uses it instead of creating a new
one. Note that in this case the input ideal is considered as ideal in the
smaller polynomial ring. If the option allComputations,
is set to true, all data that has been computed by Normaliz is stored in a
RationalCone, in the CacheTable of the monomial subalgebra
returned. This method can also be used with the option grading.
+-----------------------------------------------------------------------------+
|i1 : R=ZZ/37[x,y,t];                                                         |
+-----------------------------------------------------------------------------+
|i2 : I=ideal(x^3, x^2*y, y^3, x*y^2);                                        |
|                                                                             |
|o2 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i3 : (intCl,normRees)=intclMonIdeal(allComputations=>true,I)                 |
|                                                                             |
|              3     2   2    3                                               |
|o3 = (ideal (y , x*y , x y, x ),                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|     ------------------------------------------------------------------------|
|     MonomialSubalgebra{cache => CacheTable{...1...}                   })    |
|                                              3         2    2      3        |
|                        generators => {t, y, y a, x, x*y a, x y*a, x a}      |
|                                ZZ                                           |
|                        ring => --[x..y, t, a]                               |
|                                37                                           |
|                                                                             |
|o3 : Sequence                                                                |
+-----------------------------------------------------------------------------+
|i4 : normRees.cache#"cone"                                                   |
|                                                                             |
|o4 = RationalCone{"cgr" => | 0 |                                            }|
|                           | 5 |                                             |
|                  "equ" => | 0 |                                             |
|                           | 4 |                                             |
|                  "gen" => | 0 0 1 0 |                                       |
|                           | 0 1 0 0 |                                       |
|                           | 0 3 0 1 |                                       |
|                           | 1 0 0 0 |                                       |
|                           | 1 2 0 1 |                                       |
|                           | 2 1 0 1 |                                       |
|                           | 3 0 0 1 |                                       |
|                  "inv" => HashTable{"" => (1, 1, 1, 1)                    } |
|                                     "class group" => 1 : (1)                |
|                                     "degree 1 elements" => 7                |
|                                     "dim max subspace" => 0                 |
|                                     "embedding dim" => 4                    |
|                                     "external index" => 1                   |
|                                     "graded" => true                        |
|                                     "grading denom" => 1                    |
|                                     "grading" => (1, 1, 1, -2)              |
|                                     "hilbert basis elements" => 7           |
|                                     "hilbert quasipolynomial denom" => 6    |
|                                     "hilbert series denom" => (1, 1, 1, 1)  |
|                                     "hilbert series num" => (1, 3)          |
|                                     "inhomogeneous" => false                |
|                                     "integrally closed" => true             |
|                                     "internal index" => 1                   |
|                                     "multiplicity denom" => 1               |
|                                     "multiplicity" => 4                     |
|                                     "number extreme rays" => 5              |
|                                     "number support hyperplanes" => 5       |
|                                     "primary" => false                      |
|                                     "rank" => 4                             |
|                                     "size triangulation" => 4               |
|                                     "sum dets" => 4                         |
|                  "sup" => | 0 0 0 1  |                                      |
|                           | 0 0 1 0  |                                      |
|                           | 0 1 0 0  |                                      |
|                           | 1 0 0 0  |                                      |
|                           | 1 1 0 -3 |                                      |
|                                                                             |
|o4 : RationalCone                                                            |
+-----------------------------------------------------------------------------+

Further information
===================

  * Default value: false (Macaulay2Doc),
  * Method: intclMonIdeal(Ideal,RingElement),
    -- normalization of Rees algebra
  * Option key: allComputations,

Functions with optional argument named allComputations :
========================================================

  * "diagInvariants(Matrix,Matrix,Ring,allComputations=>...)" -- see
    diagInvariants, -- ring of invariants of a diagonalizable
    group action
  * ehrhartRing(List,allComputations=>...)
    -- Ehrhart ring
  * ehrhartRing(List,RingElement,allComputations=>...),
    --
    Ehrhart ring
  * "finiteDiagInvariants(Matrix,Ring,allComputations=>...)" -- see
    finiteDiagInvariants, -- ring of invariants of a
    finite group action
  * intclMonIdeal(Ideal,allComputations=>...)
    -- normalization of
    Rees algebra
  * intclMonIdeal(Ideal,RingElement,allComputations=>...),
    --
    normalization of Rees algebra
  * intclToricRing(List,allComputations=>...)
    -- integral closure
    of a toric ring
  * intclToricRing(MonomialSubalgebra,allComputations=>...),
    --
    integral closure of a toric ring
  * "intersectionValRingIdeals(Matrix,Ring,allComputations=>...)" -- see
    intersectionValRingIdeals, -- intersection of
    valuation ideals
  * "intersectionValRings(Matrix,Ring,allComputations=>...)" -- see
    intersectionValRings, -- intersection of ring of
    valuations
  * "normaliz(List,allComputations=>...)" -- see normaliz(List),
    -- calls Normaliz with several input matrices
  * "normaliz(Matrix,String,allComputations=>...)" -- see
    normaliz(Matrix,String), -- calls Normaliz
  * normaliz(Matrix,ZZ,allComputations=>...) (missing documentation)
  * "normalToricRing(Ideal,Thing,allComputations=>...)" -- see
    normalToricRing(Ideal,Thing), --
    normalization of a toric ring given by a binomial ideal
  * normalToricRing(List,allComputations=>...)
    -- normalization of
    a toric ring
  * normalToricRing(MonomialSubalgebra,allComputations=>...),
    --
    normalization of a toric ring
  * "torusInvariants(Matrix,Ring,allComputations=>...)" -- see
    torusInvariants, -- ring of invariants of torus action

intclToricRing -- integral closure of a toric ring
**************************************************

Description
===========

A toric ring S is a subalgebra of a polynomial ring generated by  monomials.
The function computes the integral closure T of S in the surrounding polynomial
ring.

Ways to use intclToricRing :
============================

  * intclToricRing(List) -- integral closure
    of a toric ring
  * intclToricRing(MonomialSubalgebra)
    -- integral closure of a toric ring

For the programmer
==================

The object intclToricRing, is a method function with options (Macaulay2Doc).

intclToricRing(List) -- integral closure of a toric ring
********************************************************

Synopsis
========

  * Function: intclToricRing,
  * Usage:
        intclToricRing L
  * Inputs:
      * a list (Macaulay2Doc), generators of the toric ring
  * Optional inputs (Macaulay2Doc),:
      * allComputations,
        => ..., default
        value false, integral closure of a toric ring
      * grading,
        => ..., default value {}, integral closure of a toric ring
  * Outputs:
      * an instance of the type MonomialSubalgebra,
        the integral closure of the toric ring

Description
===========

The toric ring S is the subalgebra of the basering generated by the monomials
in the list L. The function computes the integral closure T of S in the
surrounding polynomial ring.
+--------------------------------+
|i1 : R=ZZ/37[x,y,t];            |
+--------------------------------+
|i2 : L={x^3, x^2*y, y^3, x*y^2};|
+--------------------------------+
|i3 : intclToricRing L           |
|                                |
|     ZZ                         |
|o3 = --[y, x]                   |
|     37                         |
|                                |
|o3 : monomial subalgebra of R   |
+--------------------------------+

Ways to use this method:
========================

  * intclToricRing(List) -- integral closure
    of a toric ring

intclToricRing(List,allComputations=>...) -- integral closure of a toric ring
*****************************************************************************

Synopsis
========

  * Usage:
        intclToricRing L
  * Inputs:
      * a list (Macaulay2Doc), generators of the toric ring
  * Outputs:
      * an instance of the type MonomialSubalgebra,
        the integral closure of the toric ring

Description
===========

The toric ring S is the subalgebra of the basering generated by the monomials
in the list L. The function computes the integral closure T of S in the
surrounding polynomial ring. If the option allComputations,
is set to true, all data that has been computed by Normaliz is
stored in a RationalCone, in the CacheTable of the monomial
subalgebra returned.
+---------------------------------------------------------------------------+
|i1 : R=ZZ/37[x,y,t];                                                       |
+---------------------------------------------------------------------------+
|i2 : L={x^3, x^2*y, y^3, x*y^2};                                           |
+---------------------------------------------------------------------------+
|i3 : T=intclToricRing(allComputations=>true,L)                             |
|                                                                           |
|     ZZ                                                                    |
|o3 = --[y, x]                                                              |
|     37                                                                    |
|                                                                           |
|o3 : monomial subalgebra of R                                              |
+---------------------------------------------------------------------------+
|i4 : T.cache#"cone"                                                        |
|                                                                           |
|o4 = RationalCone{"cgr" => | 0 |                                          }|
|                           | 4 |                                           |
|                  "equ" => | 0 0 1 |                                       |
|                  "gen" => | 0 1 0 |                                       |
|                           | 1 0 0 |                                       |
|                  "inv" => HashTable{"" => (1, 1)                        } |
|                                     "class group" => 1 : (0)              |
|                                     "degree 1 elements" => 2              |
|                                     "dim max subspace" => 0               |
|                                     "embedding dim" => 3                  |
|                                     "external index" => 1                 |
|                                     "graded" => true                      |
|                                     "grading denom" => 1                  |
|                                     "grading" => (1, 1, 0)                |
|                                     "hilbert basis elements" => 2         |
|                                     "hilbert quasipolynomial denom" => 1  |
|                                     "hilbert series denom" => (1, 1)      |
|                                     "hilbert series num" => 1 : (1)       |
|                                     "inhomogeneous" => false              |
|                                     "integrally closed" => false          |
|                                     "internal index" => 3                 |
|                                     "multiplicity denom" => 1             |
|                                     "multiplicity" => 1                   |
|                                     "number extreme rays" => 2            |
|                                     "number support hyperplanes" => 2     |
|                                     "rank" => 2                           |
|                                     "size triangulation" => 1             |
|                                     "sum dets" => 1                       |
|                  "sup" => | 0 1 0 |                                       |
|                           | 1 0 0 |                                       |
|                                                                           |
|o4 : RationalCone                                                          |
+---------------------------------------------------------------------------+

Further information
===================

  * Default value: false (Macaulay2Doc),
  * Method: intclToricRing(List), -- integral
    closure of a toric ring
  * Option key: allComputations,

Functions with optional argument named allComputations :
========================================================

  * "diagInvariants(Matrix,Matrix,Ring,allComputations=>...)" -- see
    diagInvariants, -- ring of invariants of a diagonalizable
    group action
  * ehrhartRing(List,allComputations=>...)
    -- Ehrhart ring
  * ehrhartRing(List,RingElement,allComputations=>...),
    --
    Ehrhart ring
  * "finiteDiagInvariants(Matrix,Ring,allComputations=>...)" -- see
    finiteDiagInvariants, -- ring of invariants of a
    finite group action
  * intclMonIdeal(Ideal,allComputations=>...)
    -- normalization of
    Rees algebra
  * intclMonIdeal(Ideal,RingElement,allComputations=>...),
    --
    normalization of Rees algebra
  * intclToricRing(List,allComputations=>...)
    -- integral closure
    of a toric ring
  * intclToricRing(MonomialSubalgebra,allComputations=>...),
    --
    integral closure of a toric ring
  * "intersectionValRingIdeals(Matrix,Ring,allComputations=>...)" -- see
    intersectionValRingIdeals, -- intersection of
    valuation ideals
  * "intersectionValRings(Matrix,Ring,allComputations=>...)" -- see
    intersectionValRings, -- intersection of ring of
    valuations
  * "normaliz(List,allComputations=>...)" -- see normaliz(List),
    -- calls Normaliz with several input matrices
  * "normaliz(Matrix,String,allComputations=>...)" -- see
    normaliz(Matrix,String), -- calls Normaliz
  * normaliz(Matrix,ZZ,allComputations=>...) (missing documentation)
  * "normalToricRing(Ideal,Thing,allComputations=>...)" -- see
    normalToricRing(Ideal,Thing), --
    normalization of a toric ring given by a binomial ideal
  * normalToricRing(List,allComputations=>...)
    -- normalization of
    a toric ring
  * normalToricRing(MonomialSubalgebra,allComputations=>...),
    --
    normalization of a toric ring
  * "torusInvariants(Matrix,Ring,allComputations=>...)" -- see
    torusInvariants, -- ring of invariants of torus action

intclToricRing(MonomialSubalgebra) -- integral closure of a toric ring
**********************************************************************

Synopsis
========

  * Function: intclToricRing,
  * Usage:
        intclToricRing S
  * Inputs:
      * an instance of the type MonomialSubalgebra,
        the toric ring
  * Optional inputs (Macaulay2Doc),:
      * allComputations,
        =>
        ..., default value false, integral closure of a toric ring
      * grading,
        => ..., default value {}, integral closure of a toric ring
  * Outputs:
      * an instance of the type MonomialSubalgebra,
        the integral closure of the toric ring

Description
===========

The toric ring S is the monomial subalgebra given. The function computes the
integral closure T of S in the surrounding polynomial ring.
+---------------------------------------------------------+
|i1 : R=ZZ/37[x,y,t];                                     |
+---------------------------------------------------------+
|i2 : S=createMonomialSubalgebra {x^3, x^2*y, y^3, x*y^2};|
+---------------------------------------------------------+
|i3 : intclToricRing S                                    |
|                                                         |
|     ZZ                                                  |
|o3 = --[y, x]                                            |
|     37                                                  |
|                                                         |
|o3 : monomial subalgebra of R                            |
+---------------------------------------------------------+

Ways to use this method:
========================

  * intclToricRing(MonomialSubalgebra)
    -- integral closure of a toric ring

intclToricRing(MonomialSubalgebra,allComputations=>...) -- integral closure of a toric ring
*******************************************************************************************

Synopsis
========

  * Usage:
        intclToricRing S
  * Inputs:
      * an instance of the type MonomialSubalgebra,
        the toric ring
  * Outputs:
      * an instance of the type MonomialSubalgebra,
        the integral closure of the toric ring

Description
===========

The toric ring S is the monomial subalgebra given. The function computes the
integral closure T of S in the surrounding polynomial ring. If the option
allComputations, is set to true, all data that has been
computed by Normaliz is stored in a RationalCone, in the
CacheTable of the monomial subalgebra returned.
+---------------------------------------------------------------------------+
|i1 : R=ZZ/37[x,y,t];                                                       |
+---------------------------------------------------------------------------+
|i2 : S=createMonomialSubalgebra {x^3, x^2*y, y^3, x*y^2};                  |
+---------------------------------------------------------------------------+
|i3 : T=intclToricRing(allComputations=>true,S)                             |
|                                                                           |
|     ZZ                                                                    |
|o3 = --[y, x]                                                              |
|     37                                                                    |
|                                                                           |
|o3 : monomial subalgebra of R                                              |
+---------------------------------------------------------------------------+
|i4 : T.cache#"cone"                                                        |
|                                                                           |
|o4 = RationalCone{"cgr" => | 0 |                                          }|
|                           | 4 |                                           |
|                  "equ" => | 0 0 1 |                                       |
|                  "gen" => | 0 1 0 |                                       |
|                           | 1 0 0 |                                       |
|                  "inv" => HashTable{"" => (1, 1)                        } |
|                                     "class group" => 1 : (0)              |
|                                     "degree 1 elements" => 2              |
|                                     "dim max subspace" => 0               |
|                                     "embedding dim" => 3                  |
|                                     "external index" => 1                 |
|                                     "graded" => true                      |
|                                     "grading denom" => 1                  |
|                                     "grading" => (1, 1, 0)                |
|                                     "hilbert basis elements" => 2         |
|                                     "hilbert quasipolynomial denom" => 1  |
|                                     "hilbert series denom" => (1, 1)      |
|                                     "hilbert series num" => 1 : (1)       |
|                                     "inhomogeneous" => false              |
|                                     "integrally closed" => false          |
|                                     "internal index" => 3                 |
|                                     "multiplicity denom" => 1             |
|                                     "multiplicity" => 1                   |
|                                     "number extreme rays" => 2            |
|                                     "number support hyperplanes" => 2     |
|                                     "rank" => 2                           |
|                                     "size triangulation" => 1             |
|                                     "sum dets" => 1                       |
|                  "sup" => | 0 1 0 |                                       |
|                           | 1 0 0 |                                       |
|                                                                           |
|o4 : RationalCone                                                          |
+---------------------------------------------------------------------------+

Further information
===================

  * Default value: false (Macaulay2Doc),
  * Method: intclToricRing(MonomialSubalgebra),
    -- integral closure of a toric ring
  * Option key: allComputations,

Functions with optional argument named allComputations :
========================================================

  * "diagInvariants(Matrix,Matrix,Ring,allComputations=>...)" -- see
    diagInvariants, -- ring of invariants of a diagonalizable
    group action
  * ehrhartRing(List,allComputations=>...)
    -- Ehrhart ring
  * ehrhartRing(List,RingElement,allComputations=>...),
    --
    Ehrhart ring
  * "finiteDiagInvariants(Matrix,Ring,allComputations=>...)" -- see
    finiteDiagInvariants, -- ring of invariants of a
    finite group action
  * intclMonIdeal(Ideal,allComputations=>...)
    -- normalization of
    Rees algebra
  * intclMonIdeal(Ideal,RingElement,allComputations=>...),
    --
    normalization of Rees algebra
  * intclToricRing(List,allComputations=>...)
    -- integral closure
    of a toric ring
  * intclToricRing(MonomialSubalgebra,allComputations=>...),
    --
    integral closure of a toric ring
  * "intersectionValRingIdeals(Matrix,Ring,allComputations=>...)" -- see
    intersectionValRingIdeals, -- intersection of
    valuation ideals
  * "intersectionValRings(Matrix,Ring,allComputations=>...)" -- see
    intersectionValRings, -- intersection of ring of
    valuations
  * "normaliz(List,allComputations=>...)" -- see normaliz(List),
    -- calls Normaliz with several input matrices
  * "normaliz(Matrix,String,allComputations=>...)" -- see
    normaliz(Matrix,String), -- calls Normaliz
  * normaliz(Matrix,ZZ,allComputations=>...) (missing documentation)
  * "normalToricRing(Ideal,Thing,allComputations=>...)" -- see
    normalToricRing(Ideal,Thing), --
    normalization of a toric ring given by a binomial ideal
  * normalToricRing(List,allComputations=>...)
    -- normalization of
    a toric ring
  * normalToricRing(MonomialSubalgebra,allComputations=>...),
    --
    normalization of a toric ring
  * "torusInvariants(Matrix,Ring,allComputations=>...)" -- see
    torusInvariants, -- ring of invariants of torus action

intersectionValRingIdeals -- intersection of valuation ideals
*************************************************************

Synopsis
========

  * Usage:
        intersectionValRingIdeals(v,r)
  * Inputs:
      * a matrix (Macaulay2Doc), values of the indeterminates,
        the last column contains the lower bounds w_i
      * a ring (Macaulay2Doc),  the basering
  * Outputs:
      * a hash table (Macaulay2Doc), the subalgebra and the
        generators of the module over it

Description
===========

A discrete monomial valuation v on R=K[X_1,\ldots,X_n] is determined by the
values v(X_j) of the indeterminates. This function takes as input the matrix
V=(v_i(X_j)), whose rows correspond to the values of the indeterminates for for
r valuations v_1, \ldots,v_r, with an additional column holding lower bounds
w_1,\ldots,w_r \in \ZZ. It returns the subalgebra S=\{f\in R: v_i(f)\geq 0,
i=1,\ldots,n\}, the intersection of the valuation rings of the r valuations,
and a system of generators of the S-submodule M=\{f\in R: v_i(f)\geq w_i,
i=1,\ldots,n\} over R, which consists of the elements whose i-th valuation is
greater or equal to the i-th bound w_i. If w_i>=0 for all i, then M is an ideal
in S.

This method can be used with the options allComputations,
and grading. The additional data can be
accessed via the subalgebra in the HashTable (Macaulay2Doc).
+-----------------------------------------------------------------------------+
|i1 : R=QQ[x,y,z,w];                                                          |
+-----------------------------------------------------------------------------+
|i2 : V=matrix({{0,1,2,3,4},{-1,1,2,1,3}});                                   |
|                                                                             |
|              2        5                                                     |
|o2 : Matrix ZZ  <--- ZZ                                                      |
+-----------------------------------------------------------------------------+
|i3 : intersectionValRingIdeals(V,R)                                          |
|                                                                             |
|                                        3        2     2   2    2            |
|o3 = HashTable{"module generators" => {w , z*w, z , y*w , y w, y z, y        |
|               "subalgebra" => MonomialSubalgebra{cache => CacheTable        |
|                                                                             |
|                                                  generators => {w, z        |
|                                                  ring => R                  |
|                                                                             |
|o3 : HashTable                                                               |
|-----------------------------------------------------------------------------|
|4     2     2      4                                                         |
| , x*z , x*y z, x*y }    }                                                   |
|{...1...}               }                                                    |
|                     2                                                       |
|, y, x*w, x*z, x*y, x z}                                                     |
+-----------------------------------------------------------------------------+

See also
========

  * intersectionValRings -- intersection of ring
    of valuations

Ways to use intersectionValRingIdeals :
=======================================

  * "intersectionValRingIdeals(Matrix,Ring)"

For the programmer
==================

The object intersectionValRingIdeals, is a
method function with options (Macaulay2Doc).

intersectionValRings -- intersection of ring of valuations
**********************************************************

Synopsis
========

  * Usage:
        intersectionValRings(v,r)
  * Inputs:
      * a matrix (Macaulay2Doc), rows are the values of the
        indeterminates
      * a ring (Macaulay2Doc),  the basering
  * Outputs:
      * an instance of the type MonomialSubalgebra,
        the subalgebra consisting of the elements with valuation \geq 0 for all
        given valuations

Description
===========

A discrete monomial valuation v on R=K[X_1,\ldots,X_n] is determined by the
values v(X_j) of the indeterminates. This function computes the subalgebra
S=\{f\in R: v_i(f)\geq 0, i=1,\ldots,r\} that is the intersection of the
valuation rings of the given valuations v_1, \ldots,v_r, i.e. it consists of
all elements of R that have a nonnegative value for all r valuations. It takes
as input the matrix V=(v_i(X_j)) whose rows correspond to the values of the
indeterminates.

This method can be used with the options allComputations,
and grading.
+---------------------------------------+
|i1 : R=QQ[x,y,z,w];                    |
+---------------------------------------+
|i2 : V0=matrix({{0,1,2,3},{-1,1,2,1}});|
|                                       |
|              2        4               |
|o2 : Matrix ZZ  <--- ZZ                |
+---------------------------------------+
|i3 : intersectionValRings(V0,R)        |
|                                       |
|                                 2     |
|o3 = QQ[w, z, y, x*w, x*z, x*y, x z]   |
|                                       |
|o3 : monomial subalgebra of R          |
+---------------------------------------+

See also
========

  * intersectionValRingIdeals -- intersection
    of valuation ideals

Ways to use intersectionValRings :
==================================

  * "intersectionValRings(Matrix,Ring)"

For the programmer
==================

The object intersectionValRings, is a method function with options (Macaulay2Doc).

Keeping results of the computation by Normaliz
**********************************************

Normaliz prints the Hilbert basis and some auxiliary data as, e.g., the support
hyperplanes, into files. When Normaliz is called within the package Normaliz,
all the files created are deleted at the end of the function call by default.
Sometimes it is desirable to keep these results for later use. To switch the
file handling from "delete" to "keep", a filename has to be specified in the
global variable nmzFilename.
+-----------------------------------+
|i1 : nmzFilename="polytope";       |
+-----------------------------------+
|i2 : setNmzOption("allf",true);    |
+-----------------------------------+
|i3 : R=ZZ/37[x,y,z];               |
+-----------------------------------+
|i4 : ehrhartRing {x^0,x^2,y^3,z^5};|
+-----------------------------------+

Now all the files created by Normaliz are saved as polytope.suffix. The
generators of the integral closure are in the file with suffix gen, and the
functions of the package return always the content of this file. The support
hyperplanes, the defining equations and congruences are printed into the file
with suffix cst. For more suffixes see output files written by Normaliz.
Use readNmzData, to read
the files into Macaulay 2 provided they have been written, except for the
suffix cst you should use readMultipleNmzData, as
there are several matrices in this file. Which files are written depends on the
input data and on the "computation mode" which is determined by the options
set, here the option allf means that all possible data is written. For more
options see setNmzOption.
+---------------------------------------------------+
|i5 : extremeRays=readNmzData "ext"                 |
|                                                   |
|o5 = | 0 0 0 1 |                                   |
|     | 0 0 5 1 |                                   |
|     | 0 3 0 1 |                                   |
|     | 2 0 0 1 |                                   |
|                                                   |
|              4        4                           |
|o5 : Matrix ZZ  <--- ZZ                            |
+---------------------------------------------------+
|i6 : constraints=readMultipleNmzData "cst"         |
|                                                   |
|o6 = {| -15 -10 -6 30 |, | 0 |, | 0 |, | 0 0 0 1 |}|
|      | 0   0   1  0  |  | 4 |  | 5 |              |
|      | 0   1   0  0  |                            |
|      | 1   0   0  0  |                            |
|                                                   |
|o6 : List                                          |
+---------------------------------------------------+

The filename is kept during the Macaulay 2 process until another filename is
specified.
+--------------------------------------------+
|i7 : nmzFilename="square";                  |
+--------------------------------------------+
|i8 : nmzFilename=""; -- deletes the filename|
+--------------------------------------------+

The files are kept beyond the Macaulay 2 process. To delete them call the
function rmNmzFiles. Assure yourself that the right filename
is specified before calling the function! This function also resets
nmzFilename, to the empty string.
+----------------------------+
|i9 : nmzFilename="polytope";|
+----------------------------+
|i10 : rmNmzFiles();         |
+----------------------------+
|i11 : nmzFilename           |
|                            |
|o11 =                       |
+----------------------------+

If you want to change the directory where the files are saved (default is the
current directory) you have two possibilities. If you want work in the same
directory most of the time, you can define this in a file "start.m2" in the
current directory and add a line in "init.m2" such that it is read when
starting Macaulay 2. If you want to switch between directories more frequently,
you can specify the directory in the global variable nmzDataPath.

MonomialSubalgebra -- class of monomial subalgebras
***************************************************

Description
===========

A monomial subalgebra is a subalgebra of a polynomial ring generated by
monomials. In other words, it is a monoid algebra. A new monomial subalgebra
can be created using createMonomialSubalgebra.
+-------------------------------------------------+
|i1 : R=ZZ/37[x,y,z];                             |
+-------------------------------------------------+
|i2 : S=createMonomialSubalgebra {x^2*y, x*z, z^3}|
|                                                 |
|     ZZ  2         3                             |
|o2 = --[x y, x*z, z ]                            |
|     37                                          |
|                                                 |
|o2 : monomial subalgebra of R                    |
+-------------------------------------------------+
|i3 : ring S                                      |
|                                                 |
|o3 = R                                           |
|                                                 |
|o3 : PolynomialRing                              |
+-------------------------------------------------+
|i4 : gens S                                      |
|                                                 |
|       2         3                               |
|o4 = {x y, x*z, z }                              |
|                                                 |
|o4 : List                                        |
+-------------------------------------------------+

See also
========

  * createMonomialSubalgebra -- creates a
    monomial subalgebra

Methods that use an object of class MonomialSubalgebra :
========================================================

  * 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

For the programmer
==================

The object MonomialSubalgebra, is a type (Macaulay2Doc),
with ancestor classes HashTable (Macaulay2Doc),
< Thing (Macaulay2Doc).

nmzDataPath -- global variable, the path where Normaliz stores its files
************************************************************************

Description
===========

This global variable stores the file path where Normaliz stores the files
written. By default it is the empty string which means that the files are
stored in the current directory. If no filename is specified, this variable is
not used. There is no check whether the assigned directory exists. If it does
not exist, Normaliz will issue an error message. Use e.g. see makeDirectory (Macaulay2Doc),
to create an directory within Macaulay
2.
+-------------------------------------------------+
|i1 : nmzDataPath                                 |
|                                                 |
|o1 =                                             |
+-------------------------------------------------+
|i2 : nmzDataPath="d:/Normaliz2.5Windows/example";|
+-------------------------------------------------+
|i3 : nmzDataPath                                 |
|                                                 |
|o3 = d:/Normaliz2.5Windows/example               |
+-------------------------------------------------+

Caveat
======

Note that the path should not contain $ since Macaulay 2 seems to have problems
with such paths.

See also
========

  * Keeping results of the computation by Normaliz

For the programmer
==================

The object nmzDataPath, is a string (Macaulay2Doc).

nmzFilename -- global variable holding the filename
***************************************************

Description
===========

The user can specify a filename in the global variable nmzFilename to switch
the file handling from "delete" to "keep". Note that the files written by
Normaliz are not removed automatically if nmzFilename is not the empty string.
Use rmNmzFiles, to remove these files manually.
+-------------------------------------+
|i1 : nmzFilename="polytope";         |
+-------------------------------------+
|i2 : setNmzOption("allf",true);      |
+-------------------------------------+
|i3 : R=ZZ/37[x,y,z];                 |
+-------------------------------------+
|i4 : hb=intclToricRing {x^2,y^2,z^2};|
+-------------------------------------+
|i5 : extremalRays=readNmzData "ext"  |
|                                     |
|o5 = | 0 0 1 |                       |
|     | 0 1 0 |                       |
|     | 1 0 0 |                       |
|                                     |
|              3        3             |
|o5 : Matrix ZZ  <--- ZZ              |
+-------------------------------------+
|i6 : rmNmzFiles();                   |
+-------------------------------------+
|i7 : nmzFilename                     |
|                                     |
|o7 =                                 |
+-------------------------------------+

See also
========

  * Keeping results of the computation by Normaliz

For the programmer
==================

The object nmzFilename, is a string (Macaulay2Doc).

nmzNumberThreads -- global variable holding the number of threads
*****************************************************************

Description
===========

This global variable holds a positive integer limiting the number of threads
that Normaliz can access on your system. If you want to run Normaliz in a
strictly serial mode, choose nmzNumberThreads=1. The content of this global
variable is ignored unless the option "threads" is enabled.
+----------------------------------+
|i1 : nmzNumberThreads=2;          |
+----------------------------------+
|i2 : showNmzOptions()             |
|The following options are set:    |
| -f                               |
+----------------------------------+
|i3 : setNmzOption("threads",true);|
+----------------------------------+
|i4 : showNmzOptions()             |
|The following options are set:    |
| -f -x=2                          |
+----------------------------------+

For the programmer
==================

The object nmzNumberThreads, is an integer (Macaulay2Doc).

nmzVersion -- global variable holding the Normaliz version
**********************************************************

Description
===========

The executable of the program Normaliz. The package Normaliz uses the version
stored in the global variable nmzVersion. It can be normaliz, norm 64 or
normbig. If no version is specified it will use normaliz. This can be used to
use executables of Normaliz version 2.5 with this version of the Macaulay
package.
+--------------------------+
|i1 : nmzVersion           |
|                          |
|o1 =                      |
+--------------------------+
|i2 : nmzVersion="normbig";|
+--------------------------+
|i3 : nmzVersion           |
|                          |
|o3 = normbig              |
+--------------------------+

For the programmer
==================

The object nmzVersion, is a string (Macaulay2Doc).

normaliz -- calls Normaliz
**************************

Description
===========

This function applies Normaliz to the input data, which can be a matrix
specifying a cone and an integer indicating the type for Normaliz or a list
consisting of pairs of such a matrix and an integer. The function returns an
object of type RationalCone. The type determines how the
rows of the matrix are interpreted, see also writeNmzData,:
  * integral_closure: Computes the Hilbert basis of the rational cone generated
    by the rows with respect to the ambient lattice \ZZ^n;
  * normalization: The same as integral_closure, but with respect to the
    sublattice of \ZZ^n generated by the rows;
  * polytope: Computes the integral points in the polytope spanned by the rows
    and its Ehrhart semigroup (the semigroup determined by the polytope);
  * rees_algebra: Computes the integral closure of the Rees algebra of the
    ideal generated by the monomials with exponent vectors the rows;
  * inequalities: Computes the Hilbert basis of the rational cone in \RR^m
    given by the system of homogeneous inequalities mat x\ \geq\ 0;
  * equations: Computes the Hilbert basis of the rational cone given by the
    nonnegative solutions of the homogeneous system mat x\ =\ 0.
  * congruences: Computes the Hilbert basis of the rational cone given by the
    nonnegative solutions of the system of congruences defined by the rows as
    follows: Each row (x_1,\dots,x_n,c) represents a congruence x_1
    z_1+\dots+x_n z_n \equiv \ 0 \mod \ c.
  * inhom_inequalities: Computes the Hilbert basis of the rational cone in
    \RR^m given by the system of inhomogeneous inequalities. Each row
    (x_1,\dots,x_n,b) represents an inequality x_1 z_1+\dots+x_n z_n + b \geq \
    0.
  * inhom_equations: Computes the Hilbert basis of the rational cone given by
    the nonnegative solutions of the inhomogeneous system mat x\ =\ b.
  * inhom_congruences: Computes the Hilbert basis of the rational cone given by
    the nonnegative solutions of the system of congruences defined by the rows
    as follows: Each row (x_1,\dots,x_n,b,c) represents a congruence x_1
    z_1+\dots+x_n z_n + b \equiv \ 0 \mod \ c.
  * normal_toric_ideal: Computes the monoid as a quotient of \ZZ_+^n modulo a
    system of congruences (in the semigroup sense) defined by the rows of the
    input matrix.

It is possible to combine certain input types, see normaliz(List).
If you want to input only one matrix you can also use
normaliz(Matrix,String).

By default, the cone returned contains only the content of the output file
.gen, under the key "gen", i.e. the generators that have been computed, line by
line, and the content of the output file .inv, under the key "inv".
+-----------------------------------------------------------------------------+
|i1 : setNmzOption("allf",true);                                              |
+-----------------------------------------------------------------------------+
|i2 : eq=matrix {{1, 1, 1, -1, -1, -1,  0,  0,  0}, {1, 1, 1,  0,  0,  0, -1, |
|                                                                             |
|              7        9                                                     |
|o2 : Matrix ZZ  <--- ZZ                                                      |
|-----------------------------------------------------------------------------|
|-1, -1}, {0, 1, 1, -1,  0,  0, -1,  0,  0}, {1, 0, 1,  0, -1,  0,  0, -1,    |
|-----------------------------------------------------------------------------|
|0}, {1, 1, 0,  0,  0, -1,  0,  0, -1}, {0, 1, 1,  0, -1,  0,  0,  0, -1}, {1,|
|-----------------------------------------------------------------------------|
|1, 0,  0, -1,  0, -1,  0,  0}};                                              |
+-----------------------------------------------------------------------------+
|i3 : rc=normaliz(eq,"equations")                                             |
|                                                                             |
|o3 = RationalCone{"gen" => | 0 2 1 2 1 0 1 0 2 |                             |
|                           | 1 0 2 2 1 0 0 2 1 |                             |
|                           | 1 1 1 1 1 1 1 1 1 |                             |
|                           | 1 2 0 0 1 2 2 0 1 |                             |
|                           | 2 0 1 0 1 2 1 2 0 |                             |
|                  "inv" => HashTable{"" => (1, 1, 1)                         |
|                                     "class group" => (1, 2, 2)              |
|                                     "degree 1 elements" => 5                |
|                                     "dim max subspace" => 0                 |
|                                     "embedding dim" => 9                    |
|                                     "external index" => 1                   |
|                                     "graded" => true                        |
|                                     "grading denom" => 1                    |
|                                     "grading" => (0, 0, 0, 0, 1, 0, 0, 0,   |
|                                     "hilbert basis elements" => 5           |
|                                     "hilbert quasipolynomial denom" => 1    |
|                                     "hilbert series denom" => (1, 1, 1)     |
|                                     "hilbert series num" => (1, 2, 1)       |
|                                     "inhomogeneous" => false                |
|                                     "multiplicity denom" => 1               |
|                                     "multiplicity" => 4                     |
|                                     "number extreme rays" => 4              |
|                                     "number support hyperplanes" => 4       |
|                                     "rank" => 3                             |
|                                     "size triangulation" => 2               |
|                                     "sum dets" => 4                         |
|                                                                             |
|o3 : RationalCone                                                            |
|-----------------------------------------------------------------------------|
|   }                                                                         |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|  }                                                                          |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|0)                                                                           |
+-----------------------------------------------------------------------------+

To obtain all the information written by Normaliz set the option
allComputations, to true (to decide which information shall be
written by Normaliz use the options for Normaliz, see setNmzOption).
Then the method returns an object of type RationalCone whose
keys are the suffixes of all the output files written, with value the content
of the corresponding output file, which is an matrix whose rows contain the
data computed, except for the suffix inv, for which the type is a
HashTable (Macaulay2Doc), (see also getNumInvs).
+--------------------------------------------------------+
|i4 : arc=normaliz(allComputations=>true,eq,"equations");|
+--------------------------------------------------------+
|i5 : arc#"gen"                                          |
|                                                        |
|o5 = | 0 2 1 2 1 0 1 0 2 |                              |
|     | 1 0 2 2 1 0 0 2 1 |                              |
|     | 1 1 1 1 1 1 1 1 1 |                              |
|     | 1 2 0 0 1 2 2 0 1 |                              |
|     | 2 0 1 0 1 2 1 2 0 |                              |
|                                                        |
|              5        9                                |
|o5 : Matrix ZZ  <--- ZZ                                 |
+--------------------------------------------------------+
|i6 : arc#"ext"                                          |
|                                                        |
|o6 = | 0 2 1 2 1 0 1 0 2 |                              |
|     | 1 0 2 2 1 0 0 2 1 |                              |
|     | 1 2 0 0 1 2 2 0 1 |                              |
|     | 2 0 1 0 1 2 1 2 0 |                              |
|                                                        |
|              4        9                                |
|o6 : Matrix ZZ  <--- ZZ                                 |
+--------------------------------------------------------+
|i7 : arc#"inv"                                          |
|                                                        |
|o7 = HashTable{"" => (1, 1, 1)                         }|
|               "class group" => (1, 2, 2)               |
|               "degree 1 elements" => 5                 |
|               "dim max subspace" => 0                  |
|               "embedding dim" => 9                     |
|               "external index" => 1                    |
|               "graded" => true                         |
|               "grading denom" => 1                     |
|               "grading" => (0, 0, 0, 0, 1, 0, 0, 0, 0) |
|               "hilbert basis elements" => 5            |
|               "hilbert quasipolynomial denom" => 1     |
|               "hilbert series denom" => (1, 1, 1)      |
|               "hilbert series num" => (1, 2, 1)        |
|               "inhomogeneous" => false                 |
|               "multiplicity denom" => 1                |
|               "multiplicity" => 4                      |
|               "number extreme rays" => 4               |
|               "number support hyperplanes" => 4        |
|               "rank" => 3                              |
|               "size triangulation" => 2                |
|               "sum dets" => 4                          |
|                                                        |
|o7 : HashTable                                          |
+--------------------------------------------------------+

See also
========

  * RationalCone -- class of rational cones
  * readNmzData -- reads an output file of Normaliz
    containing one matrix
  * Keeping results of the computation by Normaliz
  * output files written by Normaliz

Ways to use normaliz :
======================

  * normaliz(List) -- calls Normaliz with several
    input matrices
  * normaliz(Matrix,String) -- calls
    Normaliz
  * normaliz(Matrix,ZZ) (missing documentation)

For the programmer
==================

The object normaliz, is a method function with options (Macaulay2Doc).

normaliz(List) -- calls Normaliz with several input matrices
************************************************************

Synopsis
========

  * Function: normaliz,
  * Usage:
        normaliz L
  * Inputs:
      * a list (Macaulay2Doc), a list of pairs (mat,nmzType)
  * Optional inputs (Macaulay2Doc),:
      * allComputations => ..., default value false
      * grading => ..., default value {}
  * Outputs:
      * an instance of the type RationalCone, generators
        of the integral closure and optional output from Normaliz

Description
===========

This function applies Normaliz to all mat each in the type set by the second
parameter nmzType. The function returns an object of type RationalCone,
defined by the file with suffix gen , if computed, and possibly
some additional information.It is possibly to give several matrices of the same
type. All matrices of one type are then appended to one matrix by Normaliz.

By default, the cone returned contains only the content of the output file
.gen, under the key "gen", i.e. the generators that have been computed, line by
line and the content of the output file .inv, under the key "inv".
+-----------------------------------------------------------------------------+
|i1 : hy=matrix {{-1,0,-1,0,3,0,0,0,0},{-1,0,1,0,1,0,0,0,0},{1,0,1,0,-1,0,0,0,|
|                                                                             |
|              4        9                                                     |
|o1 : Matrix ZZ  <--- ZZ                                                      |
|-----------------------------------------------------------------------------|
|0},{1,0,-1,0,1,0,0,0,0}};                                                    |
+-----------------------------------------------------------------------------+
|i2 : eq=matrix {{1,1,1,-1,-1,-1,0,0,0},{1,1,1,0,0,0,-1,-1,-1},{0,1,1,-1,0,   |
|                                                                             |
|              7        9                                                     |
|o2 : Matrix ZZ  <--- ZZ                                                      |
|-----------------------------------------------------------------------------|
|0,-1,0,0},{1,0,1,0,-1,0,0,-1,0},{1,1,0,0,0,-1,0,0,-1},{0,1,1,0,-1,0,0,0,-1},{|
|-----------------------------------------------------------------------------|
|1,1,0,0,-1,0,-1,0,0}};                                                       |
+-----------------------------------------------------------------------------+
|i3 : cg=matrix {{1,0,0,0,0,0,0,0,0,2},{0,0,1,0,0,0,0,0,0,2},{0,0,0,0,0,0,1,0,|
|                                                                             |
|              4        10                                                    |
|o3 : Matrix ZZ  <--- ZZ                                                      |
|-----------------------------------------------------------------------------|
|0,2},{0,0,0,0,0,0,0,0,1,2}};                                                 |
+-----------------------------------------------------------------------------+
|i4 : rc=normaliz({(hy,"inequalities"),(eq,"equations"),(cg,"congruences")}); |
+-----------------------------------------------------------------------------+
|i5 : rc#"gen"                                                                |
|                                                                             |
|o5 = | 0 4 2 4 2 0 2 0 4 |                                                   |
|     | 2 0 4 4 2 0 0 4 2 |                                                   |
|     | 2 2 2 2 2 2 2 2 2 |                                                   |
|     | 2 3 4 5 3 1 2 3 4 |                                                   |
|     | 2 4 0 0 2 4 4 0 2 |                                                   |
|     | 2 5 2 3 3 3 4 1 4 |                                                   |
|     | 4 0 2 0 2 4 2 4 0 |                                                   |
|     | 4 1 4 3 3 3 2 5 2 |                                                   |
|     | 4 3 2 1 3 5 4 3 2 |                                                   |
|                                                                             |
|              9        9                                                     |
|o5 : Matrix ZZ  <--- ZZ                                                      |
+-----------------------------------------------------------------------------+

To obtain all the information written by Normaliz set the option
allComputations, to true (to decide which information shall be
written by Normaliz use the options for Normaliz, see setNmzOption).
Then the method returns an object of type RationalCone whose
keys are the suffixes of all the output files written, with value the content
of the corresponding output file, which is an matrix whose rows contain the
data computed, except for the suffix inv, for which the type is a
HashTable (Macaulay2Doc), (see also getNumInvs).
It can also be used with the option grading.
+-----------------------------------------------------------------------------+
|i6 : setNmzOption("allf",true);                                              |
+-----------------------------------------------------------------------------+
|i7 : arc=normaliz(allComputations=>true,{(hy,"inequalities"),(eq,"equations  |
|-----------------------------------------------------------------------------|
|"),(cg,"congruences")});                                                     |
+-----------------------------------------------------------------------------+
|i8 : arc#"gen"                                                               |
|                                                                             |
|o8 = | 0 4 2 4 2 0 2 0 4 |                                                   |
|     | 2 0 4 4 2 0 0 4 2 |                                                   |
|     | 2 2 2 2 2 2 2 2 2 |                                                   |
|     | 2 3 4 5 3 1 2 3 4 |                                                   |
|     | 2 4 0 0 2 4 4 0 2 |                                                   |
|     | 2 5 2 3 3 3 4 1 4 |                                                   |
|     | 4 0 2 0 2 4 2 4 0 |                                                   |
|     | 4 1 4 3 3 3 2 5 2 |                                                   |
|     | 4 3 2 1 3 5 4 3 2 |                                                   |
|                                                                             |
|              9        9                                                     |
|o8 : Matrix ZZ  <--- ZZ                                                      |
+-----------------------------------------------------------------------------+
|i9 : arc#"ext"                                                               |
|                                                                             |
|o9 = | 0 4 2 4 2 0 2 0 4 |                                                   |
|     | 2 0 4 4 2 0 0 4 2 |                                                   |
|     | 2 4 0 0 2 4 4 0 2 |                                                   |
|     | 4 0 2 0 2 4 2 4 0 |                                                   |
|                                                                             |
|              4        9                                                     |
|o9 : Matrix ZZ  <--- ZZ                                                      |
+-----------------------------------------------------------------------------+
|i10 : arc#"inv"                                                              |
|                                                                             |
|o10 = HashTable{"class group" => (1, 4, 4)       }                           |
|                "dim max subspace" => 0                                      |
|                "embedding dim" => 9                                         |
|                "external index" => 4                                        |
|                "graded" => false                                            |
|                "hilbert basis elements" => 9                                |
|                "inhomogeneous" => false                                     |
|                "number extreme rays" => 4                                   |
|                "number support hyperplanes" => 4                            |
|                "rank" => 3                                                  |
|                "size triangulation" => 2                                    |
|                "sum dets" => 8                                              |
|                                                                             |
|o10 : HashTable                                                              |
+-----------------------------------------------------------------------------+

See also
========

  * RationalCone -- class of rational cones
  * readNmzData -- reads an output file of Normaliz
    containing one matrix
  * Keeping results of the computation by Normaliz
  * output files written by Normaliz

Ways to use this method:
========================

  * normaliz(List) -- calls Normaliz with several
    input matrices

normaliz(Matrix,String) -- calls Normaliz
*****************************************

Synopsis
========

  * Function: normaliz,
  * Usage:
        normaliz(mat,nmzType)
  * Inputs:
      * a matrix (Macaulay2Doc), mat the input matrix for
        Normaliz
      * a string (Macaulay2Doc), nmzType the type
  * Optional inputs (Macaulay2Doc),:
      * allComputations => ..., default value false
      * grading => ..., default value {}
  * Outputs:
      * an instance of the type RationalCone, generators
        of the integral closure and optional output from Normaliz

Description
===========

This function applies Normaliz to the parameter mat in the type set by nmzType.
The function returns an object of type RationalCone,
defined by the file with suffix gen , if computed, and possibly some additional
information. The type determines how the rows of the matrix are interpreted,
see also normaliz(List), and writeNmzData.

By default, the cone returned contains only the content of the output file
.gen, under the key "gen", i.e. the generators that have been computed, line by
line, and the content of the output file .inv, under the key "inv".
+-----------------------------------------------------------------------------+
|i1 : setNmzOption("allf",true);                                              |
+-----------------------------------------------------------------------------+
|i2 : eq=matrix {{1, 1, 1, -1, -1, -1,  0,  0,  0}, {1, 1, 1,  0,  0,  0, -1, |
|                                                                             |
|              7        9                                                     |
|o2 : Matrix ZZ  <--- ZZ                                                      |
|-----------------------------------------------------------------------------|
|-1, -1}, {0, 1, 1, -1,  0,  0, -1,  0,  0}, {1, 0, 1,  0, -1,  0,  0, -1,    |
|-----------------------------------------------------------------------------|
|0}, {1, 1, 0,  0,  0, -1,  0,  0, -1}, {0, 1, 1,  0, -1,  0,  0,  0, -1}, {1,|
|-----------------------------------------------------------------------------|
|1, 0,  0, -1,  0, -1,  0,  0}};                                              |
+-----------------------------------------------------------------------------+
|i3 : rc=normaliz(eq,"equations");                                            |
+-----------------------------------------------------------------------------+
|i4 : rc#"gen"                                                                |
|                                                                             |
|o4 = | 0 2 1 2 1 0 1 0 2 |                                                   |
|     | 1 0 2 2 1 0 0 2 1 |                                                   |
|     | 1 1 1 1 1 1 1 1 1 |                                                   |
|     | 1 2 0 0 1 2 2 0 1 |                                                   |
|     | 2 0 1 0 1 2 1 2 0 |                                                   |
|                                                                             |
|              5        9                                                     |
|o4 : Matrix ZZ  <--- ZZ                                                      |
+-----------------------------------------------------------------------------+

To obtain all the information written by Normaliz set the option
allComputations, to true (to decide which information shall be
written by Normaliz use the options for Normaliz, see setNmzOption).
Then the method returns an object of type RationalCone whose
keys are the suffixes of all the output files written, with value the content
of the corresponding output file, which is an matrix whose rows contain the
data computed, except for the suffix inv, for which the type is a
HashTable (Macaulay2Doc), (see also getNumInvs).
It can also be used with the option grading.
+--------------------------------------------------------+
|i5 : arc=normaliz(allComputations=>true,eq,"equations");|
+--------------------------------------------------------+
|i6 : arc#"gen"                                          |
|                                                        |
|o6 = | 0 2 1 2 1 0 1 0 2 |                              |
|     | 1 0 2 2 1 0 0 2 1 |                              |
|     | 1 1 1 1 1 1 1 1 1 |                              |
|     | 1 2 0 0 1 2 2 0 1 |                              |
|     | 2 0 1 0 1 2 1 2 0 |                              |
|                                                        |
|              5        9                                |
|o6 : Matrix ZZ  <--- ZZ                                 |
+--------------------------------------------------------+
|i7 : arc#"ext"                                          |
|                                                        |
|o7 = | 0 2 1 2 1 0 1 0 2 |                              |
|     | 1 0 2 2 1 0 0 2 1 |                              |
|     | 1 2 0 0 1 2 2 0 1 |                              |
|     | 2 0 1 0 1 2 1 2 0 |                              |
|                                                        |
|              4        9                                |
|o7 : Matrix ZZ  <--- ZZ                                 |
+--------------------------------------------------------+
|i8 : arc#"inv"                                          |
|                                                        |
|o8 = HashTable{"" => (1, 1, 1)                         }|
|               "class group" => (1, 2, 2)               |
|               "degree 1 elements" => 5                 |
|               "dim max subspace" => 0                  |
|               "embedding dim" => 9                     |
|               "external index" => 1                    |
|               "graded" => true                         |
|               "grading denom" => 1                     |
|               "grading" => (0, 0, 0, 0, 1, 0, 0, 0, 0) |
|               "hilbert basis elements" => 5            |
|               "hilbert quasipolynomial denom" => 1     |
|               "hilbert series denom" => (1, 1, 1)      |
|               "hilbert series num" => (1, 2, 1)        |
|               "inhomogeneous" => false                 |
|               "multiplicity denom" => 1                |
|               "multiplicity" => 4                      |
|               "number extreme rays" => 4               |
|               "number support hyperplanes" => 4        |
|               "rank" => 3                              |
|               "size triangulation" => 2                |
|               "sum dets" => 4                          |
|                                                        |
|o8 : HashTable                                          |
+--------------------------------------------------------+

See also
========

  * RationalCone -- class of rational cones
  * readNmzData -- reads an output file of Normaliz
    containing one matrix
  * Keeping results of the computation by Normaliz
  * output files written by Normaliz

Ways to use this method:
========================

  * normaliz(Matrix,String) -- calls
    Normaliz

normalToricRing -- normalization of a toric ring
************************************************

Description
===========

A toric ring S is a subalgebra of a polynomial ring generated by  monomials.
The function computes the normalization T of S, which is the integral closure
in its field of fractions.

Ways to use normalToricRing :
=============================

  * normalToricRing(Ideal,Thing), --
    normalization of a toric ring given by a binomial ideal
  * normalToricRing(List) -- normalization of
    a toric ring
  * normalToricRing(MonomialSubalgebra)
    -- normalization of a toric ring

For the programmer
==================

The object normalToricRing, is a method function with options (Macaulay2Doc).

normalToricRing(Ideal,Thing) -- normalization of a toric ring given by a binomial ideal
***************************************************************************************

Synopsis
========

  * Function: normalToricRing,
  * Usage:
        normalToricRing(I,t)
  * Inputs:
      * an ideal (Macaulay2Doc), a binomial ideal defining the
        toric ring
      * a thing (Macaulay2Doc), letter naming variables in new
        polynomial ring
  * Optional inputs (Macaulay2Doc),:
      * allComputations => ..., default value false
      * grading => ..., default value {}
  * Outputs:
      * an instance of the type MonomialSubalgebra,
        the normalization of the toric ring

Description
===========

The ideal I is generated by binomials of type X^a-X^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^a-X^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_{n-r}, where r is the rank of the matrix with
rows a-b. (In general there is no canonical choice for such an embedding.)
+--------------------------------------+
|i1 : R=ZZ/37[x,y,z,w];                |
+--------------------------------------+
|i2 : I=ideal(x*z-y^2, x*w-y*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 |
+--------------------------------------+

Ways to use this method:
========================

  * normalToricRing(Ideal,Thing), --
    normalization of a toric ring given by a binomial ideal

normalToricRing(List) -- normalization of a toric ring
******************************************************

Synopsis
========

  * Function: normalToricRing,
  * Usage:
        normalToricRing L
  * Inputs:
      * a list (Macaulay2Doc), the generators of the toric ring
  * Optional inputs (Macaulay2Doc),:
      * allComputations,
        => ..., default
        value false, normalization of a toric ring
      * grading,
        => ..., default value {}, normalization of a toric ring
  * Outputs:
      * an instance of the type MonomialSubalgebra,
        the normalization of the toric ring

Description
===========

The toric ring S is the monomial subalgebra of the basering generated by the
monomials in the list L. The function computes the normalization T of S, which
is the integral closure in its field of fractions.
+--------------------------------+
|i1 : R=ZZ/37[x,y,t];            |
+--------------------------------+
|i2 : L={x^3, x^2*y, y^3, x*y^2};|
+--------------------------------+
|i3 : normalToricRing L          |
|                                |
|     ZZ  3     2   2    3       |
|o3 = --[y , x*y , x y, x ]      |
|     37                         |
|                                |
|o3 : monomial subalgebra of R   |
+--------------------------------+

Ways to use this method:
========================

  * normalToricRing(List) -- normalization of
    a toric ring

normalToricRing(List,allComputations=>...) -- normalization of a toric ring
***************************************************************************

Synopsis
========

  * Usage:
        normalToricRing L
  * Inputs:
      * a list (Macaulay2Doc), the generators of the toric ring
  * Outputs:
      * an instance of the type MonomialSubalgebra,
        the normalization of the toric ring

Description
===========

The toric ring S is the monomial subalgebra of the basering generated by the
monomials in the list L. The function computes the normalization T of S, which
is the integral closure in its field of fractions. If the option
allComputations, is set to true, all data that has been
computed by Normaliz is stored in a RationalCone, in the
CacheTable of the monomial subalgebra returned.
+---------------------------------------------------------------------------+
|i1 : R=ZZ/37[x,y,t];                                                       |
+---------------------------------------------------------------------------+
|i2 : L={x^3, x^2*y, y^3, x*y^2};                                           |
+---------------------------------------------------------------------------+
|i3 : T=normalToricRing(allComputations=> true, L)                          |
|                                                                           |
|     ZZ  3     2   2    3                                                  |
|o3 = --[y , x*y , x y, x ]                                                 |
|     37                                                                    |
|                                                                           |
|o3 : monomial subalgebra of R                                              |
+---------------------------------------------------------------------------+
|i4 : T.cache#"cone"                                                        |
|                                                                           |
|o4 = RationalCone{"cgr" => | 1 1 0 3 |                                    }|
|                  "equ" => | 0 0 1 |                                       |
|                  "gen" => | 0 3 0 |                                       |
|                           | 1 2 0 |                                       |
|                           | 2 1 0 |                                       |
|                           | 3 0 0 |                                       |
|                  "inv" => HashTable{"" => (1, 1)                        } |
|                                     "class group" => (0, 3)               |
|                                     "degree 1 elements" => 4              |
|                                     "dim max subspace" => 0               |
|                                     "embedding dim" => 3                  |
|                                     "external index" => 3                 |
|                                     "graded" => true                      |
|                                     "grading denom" => 3                  |
|                                     "grading" => (1, 1, 0)                |
|                                     "hilbert basis elements" => 4         |
|                                     "hilbert quasipolynomial denom" => 1  |
|                                     "hilbert series denom" => (1, 1)      |
|                                     "hilbert series num" => (1, 2)        |
|                                     "inhomogeneous" => false              |
|                                     "integrally closed" => true           |
|                                     "internal index" => 1                 |
|                                     "multiplicity denom" => 1             |
|                                     "multiplicity" => 3                   |
|                                     "number extreme rays" => 2            |
|                                     "number support hyperplanes" => 2     |
|                                     "rank" => 2                           |
|                                     "size triangulation" => 3             |
|                                     "sum dets" => 3                       |
|                  "sup" => | 0 1 0 |                                       |
|                           | 1 0 0 |                                       |
|                                                                           |
|o4 : RationalCone                                                          |
+---------------------------------------------------------------------------+

Further information
===================

  * Default value: false (Macaulay2Doc),
  * Method: normalToricRing(List), --
    normalization of a toric ring
  * Option key: allComputations,

Functions with optional argument named allComputations :
========================================================

  * "diagInvariants(Matrix,Matrix,Ring,allComputations=>...)" -- see
    diagInvariants, -- ring of invariants of a diagonalizable
    group action
  * ehrhartRing(List,allComputations=>...)
    -- Ehrhart ring
  * ehrhartRing(List,RingElement,allComputations=>...),
    --
    Ehrhart ring
  * "finiteDiagInvariants(Matrix,Ring,allComputations=>...)" -- see
    finiteDiagInvariants, -- ring of invariants of a
    finite group action
  * intclMonIdeal(Ideal,allComputations=>...)
    -- normalization of
    Rees algebra
  * intclMonIdeal(Ideal,RingElement,allComputations=>...),
    --
    normalization of Rees algebra
  * intclToricRing(List,allComputations=>...)
    -- integral closure
    of a toric ring
  * intclToricRing(MonomialSubalgebra,allComputations=>...),
    --
    integral closure of a toric ring
  * "intersectionValRingIdeals(Matrix,Ring,allComputations=>...)" -- see
    intersectionValRingIdeals, -- intersection of
    valuation ideals
  * "intersectionValRings(Matrix,Ring,allComputations=>...)" -- see
    intersectionValRings, -- intersection of ring of
    valuations
  * "normaliz(List,allComputations=>...)" -- see normaliz(List),
    -- calls Normaliz with several input matrices
  * "normaliz(Matrix,String,allComputations=>...)" -- see
    normaliz(Matrix,String), -- calls Normaliz
  * normaliz(Matrix,ZZ,allComputations=>...) (missing documentation)
  * "normalToricRing(Ideal,Thing,allComputations=>...)" -- see
    normalToricRing(Ideal,Thing), --
    normalization of a toric ring given by a binomial ideal
  * normalToricRing(List,allComputations=>...)
    -- normalization of
    a toric ring
  * normalToricRing(MonomialSubalgebra,allComputations=>...),
    --
    normalization of a toric ring
  * "torusInvariants(Matrix,Ring,allComputations=>...)" -- see
    torusInvariants, -- ring of invariants of torus action

normalToricRing(MonomialSubalgebra) -- normalization of a toric ring
********************************************************************

Synopsis
========

  * Function: normalToricRing,
  * Usage:
        normalToricRing S
  * Inputs:
      * an instance of the type MonomialSubalgebra,
        the toric ring
  * Optional inputs (Macaulay2Doc),:
      * allComputations,
        => ..., default value false, normalization of a toric ring
      * grading,
        => ..., default value {}, normalization of a toric ring
  * Outputs:
      * an instance of the type MonomialSubalgebra,
        the normalization of the toric ring

Description
===========

The toric ring S is the monomial subalgebra given. The function computes the
normalization T of S, which is the integral closure in its field of fractions.
+---------------------------------------------------------+
|i1 : R=ZZ/37[x,y,t];                                     |
+---------------------------------------------------------+
|i2 : S=createMonomialSubalgebra {x^3, x^2*y, y^3, x*y^2};|
+---------------------------------------------------------+
|i3 : normalToricRing S                                   |
|                                                         |
|     ZZ  3     2   2    3                                |
|o3 = --[y , x*y , x y, x ]                               |
|     37                                                  |
|                                                         |
|o3 : monomial subalgebra of R                            |
+---------------------------------------------------------+

Ways to use this method:
========================

  * normalToricRing(MonomialSubalgebra)
    -- normalization of a toric ring

normalToricRing(MonomialSubalgebra,allComputations=>...) -- normalization of a toric ring
*****************************************************************************************

Synopsis
========

  * Usage:
        normalToricRing S
  * Inputs:
      * an instance of the type MonomialSubalgebra,
        the toric ring
  * Outputs:
      * an instance of the type MonomialSubalgebra,
        the normalization of the toric ring

Description
===========

The toric ring S is the monomial subalgebra given. The function computes the
normalization T of S, which is the integral closure in its field of fractions.
If the option allComputations, is set to true, all data
that has been computed by Normaliz is stored in a RationalCone,
in the CacheTable of the monomial subalgebra returned.
+---------------------------------------------------------------------------+
|i1 : R=ZZ/37[x,y,t];                                                       |
+---------------------------------------------------------------------------+
|i2 : S=createMonomialSubalgebra {x^3, x^2*y, y^3, x*y^2};                  |
+---------------------------------------------------------------------------+
|i3 : T=normalToricRing(allComputations=> true, S)                          |
|                                                                           |
|     ZZ  3     2   2    3                                                  |
|o3 = --[y , x*y , x y, x ]                                                 |
|     37                                                                    |
|                                                                           |
|o3 : monomial subalgebra of R                                              |
+---------------------------------------------------------------------------+
|i4 : T.cache#"cone"                                                        |
|                                                                           |
|o4 = RationalCone{"cgr" => | 1 1 0 3 |                                    }|
|                  "equ" => | 0 0 1 |                                       |
|                  "gen" => | 0 3 0 |                                       |
|                           | 1 2 0 |                                       |
|                           | 2 1 0 |                                       |
|                           | 3 0 0 |                                       |
|                  "inv" => HashTable{"" => (1, 1)                        } |
|                                     "class group" => (0, 3)               |
|                                     "degree 1 elements" => 4              |
|                                     "dim max subspace" => 0               |
|                                     "embedding dim" => 3                  |
|                                     "external index" => 3                 |
|                                     "graded" => true                      |
|                                     "grading denom" => 3                  |
|                                     "grading" => (1, 1, 0)                |
|                                     "hilbert basis elements" => 4         |
|                                     "hilbert quasipolynomial denom" => 1  |
|                                     "hilbert series denom" => (1, 1)      |
|                                     "hilbert series num" => (1, 2)        |
|                                     "inhomogeneous" => false              |
|                                     "integrally closed" => true           |
|                                     "internal index" => 1                 |
|                                     "multiplicity denom" => 1             |
|                                     "multiplicity" => 3                   |
|                                     "number extreme rays" => 2            |
|                                     "number support hyperplanes" => 2     |
|                                     "rank" => 2                           |
|                                     "size triangulation" => 3             |
|                                     "sum dets" => 3                       |
|                  "sup" => | 0 1 0 |                                       |
|                           | 1 0 0 |                                       |
|                                                                           |
|o4 : RationalCone                                                          |
+---------------------------------------------------------------------------+

Further information
===================

  * Default value: false (Macaulay2Doc),
  * Method: normalToricRing(MonomialSubalgebra),
    -- normalization of a toric ring
  * Option key: allComputations,

Functions with optional argument named allComputations :
========================================================

  * "diagInvariants(Matrix,Matrix,Ring,allComputations=>...)" -- see
    diagInvariants, -- ring of invariants of a diagonalizable
    group action
  * ehrhartRing(List,allComputations=>...)
    -- Ehrhart ring
  * ehrhartRing(List,RingElement,allComputations=>...),
    --
    Ehrhart ring
  * "finiteDiagInvariants(Matrix,Ring,allComputations=>...)" -- see
    finiteDiagInvariants, -- ring of invariants of a
    finite group action
  * intclMonIdeal(Ideal,allComputations=>...)
    -- normalization of
    Rees algebra
  * intclMonIdeal(Ideal,RingElement,allComputations=>...),
    --
    normalization of Rees algebra
  * intclToricRing(List,allComputations=>...)
    -- integral closure
    of a toric ring
  * intclToricRing(MonomialSubalgebra,allComputations=>...),
    --
    integral closure of a toric ring
  * "intersectionValRingIdeals(Matrix,Ring,allComputations=>...)" -- see
    intersectionValRingIdeals, -- intersection of
    valuation ideals
  * "intersectionValRings(Matrix,Ring,allComputations=>...)" -- see
    intersectionValRings, -- intersection of ring of
    valuations
  * "normaliz(List,allComputations=>...)" -- see normaliz(List),
    -- calls Normaliz with several input matrices
  * "normaliz(Matrix,String,allComputations=>...)" -- see
    normaliz(Matrix,String), -- calls Normaliz
  * normaliz(Matrix,ZZ,allComputations=>...) (missing documentation)
  * "normalToricRing(Ideal,Thing,allComputations=>...)" -- see
    normalToricRing(Ideal,Thing), --
    normalization of a toric ring given by a binomial ideal
  * normalToricRing(List,allComputations=>...)
    -- normalization of
    a toric ring
  * normalToricRing(MonomialSubalgebra,allComputations=>...),
    --
    normalization of a toric ring
  * "torusInvariants(Matrix,Ring,allComputations=>...)" -- see
    torusInvariants, -- ring of invariants of torus action

numgens(MonomialSubalgebra) -- number of generators of a monomial subalgebra
****************************************************************************

Synopsis
========

  * Function: numgens (Macaulay2Doc),
  * Usage:
        numgens S
  * Inputs:
      * an instance of the type MonomialSubalgebra,
  * Outputs:
      * an integer (Macaulay2Doc),  the number of generators of the
        monomial subalgebra S

Description
===========

+-------------------------------------------------+
|i1 : R=ZZ/37[x,y,z];                             |
+-------------------------------------------------+
|i2 : S=createMonomialSubalgebra {x^2*y, x*z, z^3}|
|                                                 |
|     ZZ  2         3                             |
|o2 = --[x y, x*z, z ]                            |
|     37                                          |
|                                                 |
|o2 : monomial subalgebra of R                    |
+-------------------------------------------------+
|i3 : numgens S                                   |
|                                                 |
|o3 = 3                                           |
+-------------------------------------------------+

Ways to use this method:
========================

  * numgens(MonomialSubalgebra), --
    number of generators of a monomial subalgebra

output files written by Normaliz
********************************

Depending on the options enabled (see setNmzOption),
Normaliz writes additional output files. To obtain the content of these files
within Macaulay2, use readNmzData, or allComputations.
The following files may be written, provided certain
conditions are satisfied and the information that should go into them has been
computed. We denote the files simply by their types. For the most types of
inputs the ambient lattice is \ZZ^n if the input of Normaliz is a matrix of n
columns. In types polytope and rees_algebra the ambient lattice is \ZZ^{n+1}
since the input vectors are extended by 1 component. For congruences and
inhomogeneous input it is \ZZ^{n-1} and for inhomogeneous congruences
\ZZ^{n-2}. For input of type normal_toric_ideal the lattice is \ZZ^{r} where
n-r is the rank of the input matrix. The essential lattice is gp(M) where M is
the monoid computed by Normaliz internally, i.e. after a linear transformation
such that the cone is full-dimensional and the integral closure has to be
computed. See the documentation of Normaliz at
https://github.com/Normaliz/Normaliz/blob/master/doc/Normaliz.pdf for more
details.
  * gen         The Hilbert basis
  * ext         The extreme rays
  * cst         The constraints defining the cone and the lattice in the same
    format as they would appear in the input. Using this file as input for
    Normaliz will reproduce the Hilbert basis and all the other data computed.
  * egn, esp     These contain the Hilbert basis and the support hyperplanes
    respectively, however with respect to the essential lattice and a basis of
    it.
  * typ          This is the product of the matrices corresponding to egn and
    esp. That is, the support hyperplanes of the cone are evaluated (as  linear
    forms) on the generators.
  * tri          The file tri contains a triangulation of the cone computed by
    Normaliz. Each of the rows of the matrix specifies a simplicial cone D: the
    entries except the last are the indices (with respect to the order in tgn)
    of those generators that span D, and the last entry is the multiplicity of
    D in the essential lattice, i.e. the absolute value of the determinant of
    the matrix of the spanning vectors (as elements of the essential lattice).
  * tgn        The file tgn contains a matrix of vectors (in the coordinates of
    the ambient lattice) spanning the simplicial cones in the triangulation.
  * ht1        If the there was a grading available, the file ht1 contains the
    degree 1 elements of the cone.
  * inv            The file inv contains all the information computed that is
    not contained in any of the other files, e.g. the h-vector, the Hilbert
    polynomial, whether the semigroup is generated in degree 1, the index, the
    multiplicity, and the cardinality of sets like the Hilbert basis, support
    hyperplanes and so one.

RationalCone -- class of rational cones
***************************************

Description
===========

The method normaliz, returns an object of type RationalCone. By
default, that cone contains only the content of the output file .gen, under the
key "gen" (i.e. the generators that have been computed) and the content of the
output file .inv, which contains some additional data. Note that Normaliz
writes the generators as rows, in contrast to the convention used in M2.
+-----------------------------------------------------------------------------+
|i1 : setNmzOption("allf",true);                                              |
+-----------------------------------------------------------------------------+
|i2 : eq=matrix {{1, 1, 1, -1, -1, -1,  0,  0,  0}, {1, 1, 1,  0,  0,  0, -1, |
|                                                                             |
|              7        9                                                     |
|o2 : Matrix ZZ  <--- ZZ                                                      |
|-----------------------------------------------------------------------------|
|-1, -1}, {0, 1, 1, -1,  0,  0, -1,  0,  0}, {1, 0, 1,  0, -1,  0,  0, -1,    |
|-----------------------------------------------------------------------------|
|0}, {1, 1, 0,  0,  0, -1,  0,  0, -1}, {0, 1, 1,  0, -1,  0,  0,  0, -1}, {1,|
|-----------------------------------------------------------------------------|
|1, 0,  0, -1,  0, -1,  0,  0}};                                              |
+-----------------------------------------------------------------------------+
|i3 : rc=normaliz(eq,"equations");                                            |
+-----------------------------------------------------------------------------+
|i4 : rc#"gen"                                                                |
|                                                                             |
|o4 = | 0 2 1 2 1 0 1 0 2 |                                                   |
|     | 1 0 2 2 1 0 0 2 1 |                                                   |
|     | 1 1 1 1 1 1 1 1 1 |                                                   |
|     | 1 2 0 0 1 2 2 0 1 |                                                   |
|     | 2 0 1 0 1 2 1 2 0 |                                                   |
|                                                                             |
|              5        9                                                     |
|o4 : Matrix ZZ  <--- ZZ                                                      |
+-----------------------------------------------------------------------------+
|i5 : rc#"inv"                                                                |
|                                                                             |
|o5 = HashTable{"" => (1, 1, 1)                         }                     |
|               "class group" => (1, 2, 2)                                    |
|               "degree 1 elements" => 5                                      |
|               "dim max subspace" => 0                                       |
|               "embedding dim" => 9                                          |
|               "external index" => 1                                         |
|               "graded" => true                                              |
|               "grading denom" => 1                                          |
|               "grading" => (0, 0, 0, 0, 1, 0, 0, 0, 0)                      |
|               "hilbert basis elements" => 5                                 |
|               "hilbert quasipolynomial denom" => 1                          |
|               "hilbert series denom" => (1, 1, 1)                           |
|               "hilbert series num" => (1, 2, 1)                             |
|               "inhomogeneous" => false                                      |
|               "multiplicity denom" => 1                                     |
|               "multiplicity" => 4                                           |
|               "number extreme rays" => 4                                    |
|               "number support hyperplanes" => 4                             |
|               "rank" => 3                                                   |
|               "size triangulation" => 2                                     |
|               "sum dets" => 4                                               |
|                                                                             |
|o5 : HashTable                                                               |
+-----------------------------------------------------------------------------+

To obtain all the information written by Normaliz set the option
allComputations, to true. Then the method returns an object of
type RationalCone whose keys are the suffixes of all the output files written,
with value the content of the corresponding output file (also to be read line
by line).
+--------------------------------------------------------+
|i6 : arc=normaliz(allComputations=>true,eq,"equations");|
+--------------------------------------------------------+
|i7 : arc#"gen"                                          |
|                                                        |
|o7 = | 0 2 1 2 1 0 1 0 2 |                              |
|     | 1 0 2 2 1 0 0 2 1 |                              |
|     | 1 1 1 1 1 1 1 1 1 |                              |
|     | 1 2 0 0 1 2 2 0 1 |                              |
|     | 2 0 1 0 1 2 1 2 0 |                              |
|                                                        |
|              5        9                                |
|o7 : Matrix ZZ  <--- ZZ                                 |
+--------------------------------------------------------+
|i8 : arc#"ext"                                          |
|                                                        |
|o8 = | 0 2 1 2 1 0 1 0 2 |                              |
|     | 1 0 2 2 1 0 0 2 1 |                              |
|     | 1 2 0 0 1 2 2 0 1 |                              |
|     | 2 0 1 0 1 2 1 2 0 |                              |
|                                                        |
|              4        9                                |
|o8 : Matrix ZZ  <--- ZZ                                 |
+--------------------------------------------------------+

See output files written by Normaliz,
for an explanation of the different output files.

See also
========

  * allComputations
  * readNmzData -- reads an output file of Normaliz
    containing one matrix
  * Keeping results of the computation by Normaliz
  * output files written by Normaliz

For the programmer
==================

The object RationalCone, is a type (Macaulay2Doc),
with ancestor classes HashTable (Macaulay2Doc),
< Thing (Macaulay2Doc).

readMultipleNmzData -- reads an output file of Normaliz containing several matrices
***********************************************************************************

Synopsis
========

  * Usage:
        readNmzData s
  * Inputs:
      * a string (Macaulay2Doc), the suffix of the file to be
        read
  * Outputs:
      * a list (Macaulay2Doc),  the content of the file

Description
===========

This function can read several matrices from a Normaliz output file. At the
moment, the only output file that contains several matrices is the file with
suffix cst. It contains the supporting hyperplanes, the defining equations and
the congruences defining the (same) cone. It is possible that one of the
matrices is a matrix with zero rows.

+---------------------------------------------------------------------------+
|i1 : nmzFilename="example" -- to keep the files                            |
|                                                                           |
|o1 = example                                                               |
+---------------------------------------------------------------------------+
|i2 : mat=matrix({{1,2,3},{4,5,6},{7,8,10}});                               |
|                                                                           |
|              3        3                                                   |
|o2 : Matrix ZZ  <--- ZZ                                                    |
+---------------------------------------------------------------------------+
|i3 : normaliz(allComputations => true,mat,"integral_closure")              |
|                                                                           |
|o3 = RationalCone{"cgr" => | 0 |                                          }|
|                           | 4 |                                           |
|                  "equ" => | 0 |                                           |
|                           | 3 |                                           |
|                  "gen" => | 1 2 3  |                                      |
|                           | 2 3 4  |                                      |
|                           | 3 4 5  |                                      |
|                           | 4 5 6  |                                      |
|                           | 7 8 10 |                                      |
|                  "inv" => HashTable{"" => (1, 1, 1)                     } |
|                                     "class group" => (0, 3)               |
|                                     "degree 1 elements" => 5              |
|                                     "dim max subspace" => 0               |
|                                     "embedding dim" => 3                  |
|                                     "external index" => 1                 |
|                                     "graded" => true                      |
|                                     "grading denom" => 1                  |
|                                     "grading" => (-1, 1, 0)               |
|                                     "hilbert basis elements" => 5         |
|                                     "hilbert quasipolynomial denom" => 2  |
|                                     "hilbert series denom" => (1, 1, 1)   |
|                                     "hilbert series num" => (1, 2)        |
|                                     "inhomogeneous" => false              |
|                                     "integrally closed" => false          |
|                                     "internal index" => 3                 |
|                                     "multiplicity denom" => 1             |
|                                     "multiplicity" => 3                   |
|                                     "number extreme rays" => 3            |
|                                     "number support hyperplanes" => 3     |
|                                     "rank" => 3                           |
|                                     "size triangulation" => 1             |
|                                     "sum dets" => 3                       |
|                  "sup" => | -4 11 -6 |                                    |
|                           | -2 -2 3  |                                    |
|                           | 1  -2 1  |                                    |
|                                                                           |
|o3 : RationalCone                                                          |
+---------------------------------------------------------------------------+
|i4 : readMultipleNmzData "cst"                                             |
|                                                                           |
|o4 = {| -4 11 -6 |, | 0 |, | 0 |, | -1 1 0 |}                              |
|      | -2 -2 3  |  | 3 |  | 4 |                                           |
|      | 1  -2 1  |                                                         |
|                                                                           |
|o4 : List                                                                  |
+---------------------------------------------------------------------------+
|i5 : rmNmzFiles();                                                         |
+---------------------------------------------------------------------------+

Ways to use readMultipleNmzData :
=================================

  * "readMultipleNmzData(String)"

For the programmer
==================

The object readMultipleNmzData, is a method function (Macaulay2Doc).

readNmzData -- reads an output file of Normaliz containing one matrix
*********************************************************************

Synopsis
========

  * Usage:
        readNmzData s
  * Inputs:
      * a string (Macaulay2Doc), the suffix of the file to be
        read
  * Outputs:
      * a matrix (Macaulay2Doc),  the content of the file

Description
===========

Reads an output file of Normaliz containing an integer matrix and returns it as
a Matrix (Macaulay2Doc), whose rows contains the data computed
(in contrast to the convention used in M2). To read the .inv file, use
getNumInvs. The filename is created from the current filename
specified by the user and the suffix given to the function. The possible
suffixes depend on the input and the computation mode. The computation mode is
controlled via the options, see setNmzOption. For the
possible output files see output files written by Normaliz.
For more details we refer to the documentation of
Normaliz available as pdf file at http://www.math.uos.de/normaliz/.
+---------------------------------------------------------------------------+
|i1 : nmzFilename="example" -- to keep the files                            |
|                                                                           |
|o1 = example                                                               |
+---------------------------------------------------------------------------+
|i2 : setNmzOption("allf",true); -- to write all files                      |
+---------------------------------------------------------------------------+
|i3 : mat=matrix({{1,2,3},{4,5,6},{7,8,10}});                               |
|                                                                           |
|              3        3                                                   |
|o3 : Matrix ZZ  <--- ZZ                                                    |
+---------------------------------------------------------------------------+
|i4 : normaliz(mat,"integral_closure")                                      |
|                                                                           |
|o4 = RationalCone{"gen" => | 1 2 3  |                                     }|
|                           | 2 3 4  |                                      |
|                           | 3 4 5  |                                      |
|                           | 4 5 6  |                                      |
|                           | 7 8 10 |                                      |
|                  "inv" => HashTable{"" => (1, 1, 1)                     } |
|                                     "class group" => (0, 3)               |
|                                     "degree 1 elements" => 5              |
|                                     "dim max subspace" => 0               |
|                                     "embedding dim" => 3                  |
|                                     "external index" => 1                 |
|                                     "graded" => true                      |
|                                     "grading denom" => 1                  |
|                                     "grading" => (-1, 1, 0)               |
|                                     "hilbert basis elements" => 5         |
|                                     "hilbert quasipolynomial denom" => 2  |
|                                     "hilbert series denom" => (1, 1, 1)   |
|                                     "hilbert series num" => (1, 2)        |
|                                     "inhomogeneous" => false              |
|                                     "integrally closed" => false          |
|                                     "internal index" => 3                 |
|                                     "multiplicity denom" => 1             |
|                                     "multiplicity" => 3                   |
|                                     "number extreme rays" => 3            |
|                                     "number support hyperplanes" => 3     |
|                                     "rank" => 3                           |
|                                     "size triangulation" => 1             |
|                                     "sum dets" => 3                       |
|                                                                           |
|o4 : RationalCone                                                          |
+---------------------------------------------------------------------------+
|i5 : readNmzData "typ"                                                     |
|                                                                           |
|o5 = | 0 3 0 |                                                             |
|     | 1 2 0 |                                                             |
|     | 2 1 0 |                                                             |
|     | 3 0 0 |                                                             |
|     | 0 0 1 |                                                             |
|                                                                           |
|              5        3                                                   |
|o5 : Matrix ZZ  <--- ZZ                                                    |
+---------------------------------------------------------------------------+
|i6 : rmNmzFiles();                                                         |
+---------------------------------------------------------------------------+

See also
========

  * writeNmzData -- creates an input file for Normaliz
  * normaliz -- calls Normaliz
  * allComputations
  * Keeping results of the computation by Normaliz
  * output files written by Normaliz

Ways to use readNmzData :
=========================

  * "readNmzData(String)"

For the programmer
==================

The object readNmzData, is a method function (Macaulay2Doc).

ring(MonomialSubalgebra) -- surrounding ring of a monomial subalgebra
*********************************************************************

Synopsis
========

  * Function: ring (Macaulay2Doc),
  * Usage:
        ring S
  * Inputs:
      * an instance of the type MonomialSubalgebra,
  * Outputs:
      * a ring (Macaulay2Doc), the surrounding ring of the monomial
        subalgebra S

Description
===========

+-------------------------------------------------+
|i1 : R=ZZ/37[x,y,z];                             |
+-------------------------------------------------+
|i2 : S=createMonomialSubalgebra {x^2*y, x*z, z^3}|
|                                                 |
|     ZZ  2         3                             |
|o2 = --[x y, x*z, z ]                            |
|     37                                          |
|                                                 |
|o2 : monomial subalgebra of R                    |
+-------------------------------------------------+
|i3 : ring S                                      |
|                                                 |
|o3 = R                                           |
|                                                 |
|o3 : PolynomialRing                              |
+-------------------------------------------------+

Ways to use this method:
========================

  * ring(MonomialSubalgebra), --
    surrounding ring of a monomial subalgebra

rmNmzFiles -- removes the files created by Normaliz
***************************************************

Synopsis
========

  * Usage:
        rmNmzFiles()

Description
===========

This function removes the files created for and by Normaliz, using the last
filename created. These files are removed automatically unless a (non-empty)
filename has been specified in the global variable nmzFilename.
In this case the filename is reset to the empty string.
+-----------------------------------+
|i1 : nmzFilename="VeryInteresting";|
+-----------------------------------+
|i2 : R=ZZ/37[x,y,z];               |
+-----------------------------------+
|i3 : normalToricRing {x^2*y, y^3}; |
+-----------------------------------+
|i4 : get ("VeryInteresting.cst")   |
|                                   |
|o4 = 2                             |
|     3                             |
|     -1 2 0                        |
|     1 0 0                         |
|     inequalities                  |
|     1                             |
|     3                             |
|     0 0 1                         |
|     equations                     |
|     1                             |
|     4                             |
|     5 2 0 6                       |
|     congruences                   |
|     1                             |
|     3                             |
|     1 1 0                         |
|     grading                       |
+-----------------------------------+
|i5 : rmNmzFiles();                 |
+-----------------------------------+
|i6 : nmzFilename                   |
|                                   |
|o6 =                               |
+-----------------------------------+

For the programmer
==================

The object rmNmzFiles, is a function closure (Macaulay2Doc).

setNmzOption -- sets a command line option for Normaliz
*******************************************************

Synopsis
========

  * Usage:
        setNmzOption(s,b)
  * Inputs:
      * a string (Macaulay2Doc), name of the option
      * a Boolean value (Macaulay2Doc), true switches the option
        on, false off

Description
===========

The Normaliz options are accessible via the following names:

Computation mode:
  * -s:   supp, only the support hyperplanes are computed.
  * -tT:   triang, computes the support hyperplanes, the triangulation and the
    multiplicity.
  * -v:   volume, computes the support hyperplanes and the multiplicity.
  * -p:   hvect, computes the support hyperplanes, the multiplicity, the
    h-vector and the Hilbert polynomial.
  * -n:   normal, computes the support hyperplanes, the triangulation, the
    multiplicity and the Hilbert basis.
  * -N:   normal_l, computes the support hyperplanes and the Hilbert basis.
  * -h:   hilb, computes the support hyperplanes, the multiplicity, the Hilbert
    basis, the h-vector and the Hilbert polynomial.
  * -1:   heigth1, computes the Hilbert basis elements of height 1.
  * -d:   dual, computes the Hilbert basis using Pottier's algorithm, cf. L.
    Pottier, The Euclide algorithm in dimension n. Research report, ISSAC 96,
    ACM Press 1996.
The options with _l indicate that they are in particular useful for big
examples.Further options:
  * -c:   control, gives you some access to 'control' data during the
    computation. When switched on, data will be printed on the screen.
  * -a:   allf, all files are written
  * -e:   errorcheck, when switched on the arithmetic tests will be performed,
    in order to assure that no arithmetic errors do occur. This may slow down
    the computations. This option is ignored if bigint is activated, since in
    this case no arithmetic errors can occur.
  * -B:   bigint, use indefinite precision arithmetic
  * -x=<N>: threads, there <N> stands for a positive integer limiting the
    number of threads that Normaliz can access on your system. The default
    value is <N>=\infty. If you want to run Normaliz in a strictly serial mode,
    choose <N>=1. If this option is enabled,<N> is taken as the value stored in
    the global variable nmzNumberThreads.

Note that it makes no sense to activate more than one of the computation mode
options. The -f option, which makes the .gen, .inv, .cst files to be printed,
is always set. The default value of all options is false.

To check which options are set use showNmzOptions.
+---------------------------------+
|i1 : setNmzOption("triang",true);|
+---------------------------------+
|i2 : showNmzOptions()            |
|The following options are set:   |
| -f -tT                          |
+---------------------------------+

See also
========

  * showNmzOptions -- prints the enabled options

Ways to use setNmzOption :
==========================

  * "setNmzOption(String,Boolean)"

For the programmer
==================

The object setNmzOption, is a method function (Macaulay2Doc).

showNmzOptions -- prints the enabled options
********************************************

Synopsis
========

  * Usage:
        showNmzOptions()

Description
===========

Prints the enabled options to the standard output. The -f option is always set.
See setNmzOption, for the possible options.
+---------------------------------+
|i1 : setNmzOption("triang",true);|
+---------------------------------+
|i2 : showNmzOptions()            |
|The following options are set:   |
| -f -tT                          |
+---------------------------------+

See also
========

  * setNmzOption -- sets a command line option for
    Normaliz

For the programmer
==================

The object showNmzOptions, is a function closure (Macaulay2Doc).

The generators of the integral closure of the Rees algebra of a monomial ideal.
*******************************************************************************

We use intclMonIdeal, to compute the integral closure of a
monomial ideal and of its Rees algebra.
+-----------------------------------------------------------------------------+
|i1 : R=ZZ/37[x_1..x_7];                                                      |
+-----------------------------------------------------------------------------+
|i2 : I=ideal(x_1..x_6, x_1*x_2*x_3*x_7, x_1*x_2*x_4*x_7, x_1*x_3*x_5*x_7,    |
|                                                                             |
|o2 : Ideal of R                                                              |
|-----------------------------------------------------------------------------|
|x_1*x_4*x_6*x_7, x_1*x_5*x_6*x_7, x_2*x_3*x_6*x_7, x_2*x_4*x_5*x_7,          |
|-----------------------------------------------------------------------------|
|x_2*x_5*x_6*x_7,x_3*x_4*x_5*x_7,x_3*x_4*x_6*x_7);                            |
+-----------------------------------------------------------------------------+
|i3 : (intcl,rees)=intclMonIdeal I;                                           |
+-----------------------------------------------------------------------------+
|i4 : intcl                                                                   |
|                                                                             |
|o4 = ideal (x , x , x , x , x , x )                                          |
|             6   5   4   3   2   1                                           |
|                                                                             |
|              ZZ                                                             |
|o4 : Ideal of --[x ..x , a]                                                  |
|              37  1   7                                                      |
+-----------------------------------------------------------------------------+
|i5 : rees                                                                    |
|                                                                             |
|     ZZ                                                                      |
|o5 = --[x , x , x a, x , x a, x , x a, x , x a, x , x a, x , x a]            |
|     37  7   6   6    5   5    4   4    3   3    2   2    1   1              |
|                                                                             |
|                            ZZ                                               |
|o5 : monomial subalgebra of --[x ..x , a]                                    |
|                            37  1   7                                        |
+-----------------------------------------------------------------------------+

The first entry is an ideal, the integral closure of the original ideal, the
second one a monomial subalgebra. Each variable in the example appears in a
generator of the ideal. Therefore an auxiliary variable a is added to the ring.
If there were a free variable in the ring, say x_8, then one can give this
variable as a second argument to the function, which then is used as auxiliary
variable.
+-----------------------------------------------------------------------------+
|i6 : R=ZZ/37[x_1..x_8];                                                      |
+-----------------------------------------------------------------------------+
|i7 : I=ideal(x_1..x_6, x_1*x_2*x_3*x_7, x_1*x_2*x_4*x_7, x_1*x_3*x_5*x_7,    |
|                                                                             |
|o7 : Ideal of R                                                              |
|-----------------------------------------------------------------------------|
|x_1*x_4*x_6*x_7, x_1*x_5*x_6*x_7, x_2*x_3*x_6*x_7, x_2*x_4*x_5*x_7,          |
|-----------------------------------------------------------------------------|
|x_2*x_5*x_6*x_7,x_3*x_4*x_5*x_7,x_3*x_4*x_6*x_7);                            |
+-----------------------------------------------------------------------------+
|i8 : (intcl,rees)=intclMonIdeal(I,x_8);                                      |
+-----------------------------------------------------------------------------+
|i9 : intcl                                                                   |
|                                                                             |
|o9 = ideal (x , x , x , x , x , x )                                          |
|             6   5   4   3   2   1                                           |
|                                                                             |
|o9 : Ideal of R                                                              |
+-----------------------------------------------------------------------------+
|i10 : rees                                                                   |
|                                                                             |
|      ZZ                                                                     |
|o10 = --[x , x , x x , x , x x , x , x x , x , x x , x , x x , x , x x ]     |
|      37  7   6   6 8   5   5 8   4   4 8   3   3 8   2   2 8   1   1 8      |
|                                                                             |
|o10 : monomial subalgebra of R                                               |
+-----------------------------------------------------------------------------+

The Hilbert basis and the support hyperplanes of a rational cone.
*****************************************************************

We want to calculate the Hilbert basis of a rational cone.  The cone may be
given by
  * a system of generators;
  * a linear system of inequalities;
  * a linear system of equations.

First of all consider the cone generated by the 16 vectors

 1 0 0 0 0 0 0             1 0 1 0 1 0 1
 0 1 0 0 0 0 0             1 0 0 1 0 1 1
 0 0 1 0 0 0 0             1 0 0 0 1 1 1
 0 0 0 1 0 0 0             0 1 1 0 0 1 1
 0 0 0 0 1 0 0             0 1 0 1 1 0 1
 0 0 0 0 0 1 0             0 1 0 0 1 1 1
 1 1 1 0 0 0 1             0 0 1 1 1 0 1
 1 1 0 1 0 0 1             0 0 1 1 0 1 1

in dimension 7. We compute its integral closure  in the ambient lattice \ZZ^7.
The fastest way is applying the function intclToricRing,
to the ideal that is generated by the monomials whose exponent vectors are the
generators of the cone (to compute it in the group of the monoid generated by
these vectors use normalToricRing) .

One can convert the vectors to monomials in the following way:
+-----------------------------------------------------------------------------+
|i1 : R=ZZ/37[x_1..x_7];                                                      |
+-----------------------------------------------------------------------------+
|i2 : l={{1, 0, 0, 0, 0, 0, 0},                                               |
|        {0, 1, 0, 0, 0, 0, 0},                                               |
|        {0, 0, 1, 0, 0, 0, 0},                                               |
|        {0, 0, 0, 1, 0, 0, 0},                                               |
|        {0, 0, 0, 0, 1, 0, 0},                                               |
|        {0, 0, 0, 0, 0, 1, 0},                                               |
|        {1, 1, 1, 0, 0, 0, 1},                                               |
|        {1, 1, 0, 1, 0, 0, 1},                                               |
|        {1, 0, 1, 0, 1, 0, 1},                                               |
|        {1, 0, 0, 1, 0, 1, 1},                                               |
|        {1, 0, 0, 0, 1, 1, 1},                                               |
|        {0, 1, 1, 0, 0, 1, 1},                                               |
|        {0, 1, 0, 1, 1, 0, 1},                                               |
|        {0, 1, 0, 0, 1, 1, 1},                                               |
|        {0, 0, 1, 1, 1, 0, 1},                                               |
|        {0, 0, 1, 1, 0, 1, 1}};                                              |
+-----------------------------------------------------------------------------+
|i3 : L=for i in l list R_i                                                   |
|                                                                             |
|o3 = {x , x , x , x , x , x , x x x x , x x x x , x x x x , x x x x ,        |
|       1   2   3   4   5   6   1 2 3 7   1 2 4 7   1 3 5 7   1 4 6 7         |
|     ------------------------------------------------------------------------|
|     x x x x , x x x x , x x x x , x x x x , x x x x , x x x x }             |
|      1 5 6 7   2 3 6 7   2 4 5 7   2 5 6 7   3 4 5 7   3 4 6 7              |
|                                                                             |
|o3 : List                                                                    |
+-----------------------------------------------------------------------------+
|i4 : S=intclToricRing L                                                      |
|                                                                             |
|     ZZ                                                                      |
|o4 = --[x , x , x , x , x x x x , x x x x , x , x x x x , x x x x , x x x x ,|
|     37  6   5   4   3   3 4 6 7   3 4 5 7   2   2 5 6 7   2 4 5 7   2 3 6 7 |
|                                                                             |
|o4 : monomial subalgebra of R                                                |
|-----------------------------------------------------------------------------|
|                                                                   2         |
|x , x x x x , x x x x , x x x x , x x x x , x x x x , x x x x x x x ]        |
| 1   1 5 6 7   1 4 6 7   1 3 5 7   1 2 4 7   1 2 3 7   1 2 3 4 5 6 7         |
+-----------------------------------------------------------------------------+

The function intclToricRing, returns a
MonomialSubalgebra. The Hilbert basis of the cone consists
of the exponent vectors of the generators of the subalgebra. The generators can
be extracted with generators (Macaulay2Doc).
+-----------------------------------------------------------------------------+
|i5 : hb = flatten \ exponents \  gens S                                      |
|                                                                             |
|o5 = {{0, 0, 0, 0, 0, 1, 0}, {0, 0, 0, 0, 1, 0, 0}, {0, 0, 0, 1, 0, 0, 0},   |
|     ------------------------------------------------------------------------|
|     {0, 0, 1, 0, 0, 0, 0}, {0, 0, 1, 1, 0, 1, 1}, {0, 0, 1, 1, 1, 0, 1}, {0,|
|     ------------------------------------------------------------------------|
|     1, 0, 0, 0, 0, 0}, {0, 1, 0, 0, 1, 1, 1}, {0, 1, 0, 1, 1, 0, 1}, {0, 1, |
|     ------------------------------------------------------------------------|
|     1, 0, 0, 1, 1}, {1, 0, 0, 0, 0, 0, 0}, {1, 0, 0, 0, 1, 1, 1}, {1, 0, 0, |
|     ------------------------------------------------------------------------|
|     1, 0, 1, 1}, {1, 0, 1, 0, 1, 0, 1}, {1, 1, 0, 1, 0, 0, 1}, {1, 1, 1, 0, |
|     ------------------------------------------------------------------------|
|     0, 0, 1}, {1, 1, 1, 1, 1, 1, 2}}                                        |
|                                                                             |
|o5 : List                                                                    |
+-----------------------------------------------------------------------------+

It is also possible to call Normaliz directly to do this computation by using
the function normaliz. It takes as input the matrix containing
the generators as rows, and the type for the computation.
+------------------------------------------+
|i6 : M=matrix l;                          |
|                                          |
|              16        7                 |
|o6 : Matrix ZZ   <--- ZZ                  |
+------------------------------------------+
|i7 : d=(normaliz(M,"normalization"))#"gen"|
|                                          |
|o7 = | 0 0 0 0 0 1 0 |                    |
|     | 0 0 0 0 1 0 0 |                    |
|     | 0 0 0 1 0 0 0 |                    |
|     | 0 0 1 0 0 0 0 |                    |
|     | 0 0 1 1 0 1 1 |                    |
|     | 0 0 1 1 1 0 1 |                    |
|     | 0 1 0 0 0 0 0 |                    |
|     | 0 1 0 0 1 1 1 |                    |
|     | 0 1 0 1 1 0 1 |                    |
|     | 0 1 1 0 0 1 1 |                    |
|     | 1 0 0 0 0 0 0 |                    |
|     | 1 0 0 0 1 1 1 |                    |
|     | 1 0 0 1 0 1 1 |                    |
|     | 1 0 1 0 1 0 1 |                    |
|     | 1 1 0 1 0 0 1 |                    |
|     | 1 1 1 0 0 0 1 |                    |
|     | 1 1 1 1 1 1 2 |                    |
|                                          |
|              17        7                 |
|o7 : Matrix ZZ   <--- ZZ                  |
+------------------------------------------+
|i8 : set entries d===set hb               |
|                                          |
|o8 = true                                 |
+------------------------------------------+

The result is an object of type RationalCone, from which
you obtain the Hilbert basis via the key "gen".

The support hyperplanes are stored in the Normaliz file <filename>.sup. To
inspect these, one has to assure that the computations by Normaliz are kept.
This can be done by specifying a filename, that is, assigning a non-empty
string to the global variable nmzFilename, see also
Keeping results of the computation by Normaliz.
Then use readNmzData, to read the
.sup file.
+------------------------------+
|i9 : nmzFilename="rproj2";    |
+------------------------------+
|i10 : intclToricRing L;       |
+------------------------------+
|i11 : hypes=readNmzData("sup")|
|                              |
|o11 = | 0 0 0 0 0 0 1  |      |
|      | 0 0 0 0 0 1 0  |      |
|      | 0 0 0 0 1 0 0  |      |
|      | 0 0 0 1 0 0 0  |      |
|      | 0 0 1 0 0 0 0  |      |
|      | 0 0 1 1 0 1 -1 |      |
|      | 0 0 1 1 1 0 -1 |      |
|      | 0 1 0 0 0 0 0  |      |
|      | 0 1 0 0 1 1 -1 |      |
|      | 0 1 0 1 1 0 -1 |      |
|      | 0 1 1 0 0 1 -1 |      |
|      | 0 1 1 1 1 1 -2 |      |
|      | 1 0 0 0 0 0 0  |      |
|      | 1 0 0 0 1 1 -1 |      |
|      | 1 0 0 1 0 1 -1 |      |
|      | 1 0 1 0 1 0 -1 |      |
|      | 1 0 1 1 1 1 -2 |      |
|      | 1 1 0 1 0 0 -1 |      |
|      | 1 1 0 1 1 1 -2 |      |
|      | 1 1 1 0 0 0 -1 |      |
|      | 1 1 1 0 1 1 -2 |      |
|      | 1 1 1 1 0 1 -2 |      |
|      | 1 1 1 1 1 0 -2 |      |
|      | 1 1 1 1 1 1 -3 |      |
|                              |
|               24        7    |
|o11 : Matrix ZZ   <--- ZZ     |
+------------------------------+

This means there are 24 support hyperplanes in \ZZ^7. So in contrast to the
convention of M2 Normaliz writes vectors as rows. If you don't want to keep the
results of the computations any longer, use rmNmzFiles, to
delete the files created by Normaliz.
+-------------------+
|i12 : rmNmzFiles();|
+-------------------+
-------------------------------------------------------------------------------

Conversely, suppose the cone is given by the above hyperplanes. In that case,
to compute the Hilbert basis, you should use Normaliz in type inequalities. The
result is an object of type RationalCone. The Hilbert
basis is accessible via the key "gen". Not surprisingly, it is the same Hilbert
basis as above (but in another order).
+-----------------------------------------------------------------------------+
|i13 : normaliz(hypes,"inequalities")                                         |
|                                                                             |
|o13 = RationalCone{"gen" => | 0 0 0 0 0 1 0 |                                |
|                            | 0 0 0 0 1 0 0 |                                |
|                            | 0 0 0 1 0 0 0 |                                |
|                            | 0 0 1 0 0 0 0 |                                |
|                            | 0 0 1 1 0 1 1 |                                |
|                            | 0 0 1 1 1 0 1 |                                |
|                            | 0 1 0 0 0 0 0 |                                |
|                            | 0 1 0 0 1 1 1 |                                |
|                            | 0 1 0 1 1 0 1 |                                |
|                            | 0 1 1 0 0 1 1 |                                |
|                            | 1 0 0 0 0 0 0 |                                |
|                            | 1 0 0 0 1 1 1 |                                |
|                            | 1 0 0 1 0 1 1 |                                |
|                            | 1 0 1 0 1 0 1 |                                |
|                            | 1 1 0 1 0 0 1 |                                |
|                            | 1 1 1 0 0 0 1 |                                |
|                            | 1 1 1 1 1 1 2 |                                |
|                   "inv" => HashTable{"" => (1, 1, 1, 1, 1, 1, 1)            |
|                                      "class group" => 1 : (17)              |
|                                      "degree 1 elements" => 16              |
|                                      "dim max subspace" => 0                |
|                                      "embedding dim" => 7                   |
|                                      "external index" => 1                  |
|                                      "graded" => true                       |
|                                      "grading denom" => 1                   |
|                                      "grading" => (1, 1, 1, 1, 1, 1, -2)    |
|                                      "hilbert basis elements" => 17         |
|                                      "hilbert quasipolynomial denom" => 60  |
|                                      "hilbert series denom" => (1, 1, 1, 1, |
|                                      "hilbert series num" => (1, 9, 31, 25, |
|                                      "inhomogeneous" => false               |
|                                      "multiplicity denom" => 1              |
|                                      "multiplicity" => 72                   |
|                                      "number extreme rays" => 16            |
|                                      "number support hyperplanes" => 24     |
|                                      "rank" => 7                            |
|                                      "size triangulation" => 69             |
|                                      "sum dets" => 72                       |
|                                                                             |
|o13 : RationalCone                                                           |
|-----------------------------------------------------------------------------|
|         }                                                                   |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|        }                                                                    |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|1, 1, 1)                                                                     |
|6)                                                                           |
+-----------------------------------------------------------------------------+
|i14 : set entries oo#"gen"===set hb                                          |
|                                                                             |
|o14 = true                                                                   |
+-----------------------------------------------------------------------------+

Note that for the comparison set (Macaulay2Doc), has to be used
because the order of the generators may
differ.------------------------------------------------------------------------
-------

To illustrate the third possibility we compute the Hilbert basis of the cone
given by the equations

1 1 1 -1 -1 -1  0  0  0
1 1 1  0  0  0 -1 -1 -1
0 1 1 -1  0  0 -1  0  0
1 0 1  0 -1  0  0 -1  0
1 1 0  0  0 -1  0  0 -1
0 1 1  0 -1  0  0  0 -1
1 1 0  0 -1  0 -1  0  0

(this is the solution cone for a 3x3 magic square). To this end one has to
choose type 5.
+-----------------------------------------------------------------------------+
|i15 : eq=matrix {{1, 1, 1, -1, -1, -1,  0,  0,  0}, {1, 1, 1,  0,  0,  0, -1,|
|                                                                             |
|               7        9                                                    |
|o15 : Matrix ZZ  <--- ZZ                                                     |
|-----------------------------------------------------------------------------|
|-1, -1}, {0, 1, 1, -1,  0,  0, -1,  0,  0}, {1, 0, 1,  0, -1,  0,  0, -1,    |
|-----------------------------------------------------------------------------|
|0}, {1, 1, 0,  0,  0, -1,  0,  0, -1}, {0, 1, 1,  0, -1,  0,  0,  0, -1}, {1,|
|-----------------------------------------------------------------------------|
|1, 0,  0, -1,  0, -1,  0,  0}};                                              |
+-----------------------------------------------------------------------------+
|i16 : normaliz(eq,"equations")                                               |
|                                                                             |
|o16 = RationalCone{"gen" => | 0 2 1 2 1 0 1 0 2 |                            |
|                            | 1 0 2 2 1 0 0 2 1 |                            |
|                            | 1 1 1 1 1 1 1 1 1 |                            |
|                            | 1 2 0 0 1 2 2 0 1 |                            |
|                            | 2 0 1 0 1 2 1 2 0 |                            |
|                   "inv" => HashTable{"" => (1, 1, 1)                        |
|                                      "class group" => (1, 2, 2)             |
|                                      "degree 1 elements" => 5               |
|                                      "dim max subspace" => 0                |
|                                      "embedding dim" => 9                   |
|                                      "external index" => 1                  |
|                                      "graded" => true                       |
|                                      "grading denom" => 1                   |
|                                      "grading" => (0, 0, 0, 0, 1, 0, 0, 0,  |
|                                      "hilbert basis elements" => 5          |
|                                      "hilbert quasipolynomial denom" => 1   |
|                                      "hilbert series denom" => (1, 1, 1)    |
|                                      "hilbert series num" => (1, 2, 1)      |
|                                      "inhomogeneous" => false               |
|                                      "multiplicity denom" => 1              |
|                                      "multiplicity" => 4                    |
|                                      "number extreme rays" => 4             |
|                                      "number support hyperplanes" => 4      |
|                                      "rank" => 3                            |
|                                      "size triangulation" => 2              |
|                                      "sum dets" => 4                        |
|                                                                             |
|o16 : RationalCone                                                           |
|-----------------------------------------------------------------------------|
|   }                                                                         |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|  }                                                                          |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|                                                                             |
|0)                                                                           |
+-----------------------------------------------------------------------------+
Again the rows of this matrix are the elements of the Hilbert basis.

The lattice points, Ehrhart series and the support hyperplanes of an integral polytope.
***************************************************************************************

The lattice points of the integral polytope with the 4 vertices

 (0,0,0),  (2,0,0),  (0,3,0),  (0,0,5)

in \RR^3 are to be computed. This can be done using the function
ehrhartRing.
+-----------------------------------------------------------------------------+
|i1 : R=ZZ/37[x,y,z];                                                         |
+-----------------------------------------------------------------------------+
|i2 : L={x^0,x^2,y^3,z^5};                                                    |
+-----------------------------------------------------------------------------+
|i3 : (l,e)=ehrhartRing L;                                                    |
+-----------------------------------------------------------------------------+
|i4 : l                                                                       |
|                                                                             |
|     ZZ        2   3   4   5             2     3   2   2    3             2  |
|o4 = --[1, z, z , z , z , z , y, y*z, y*z , y*z , y , y z, y , x, x*z, x*z , |
|     37                                                                      |
|                                                                             |
|                            ZZ                                               |
|o4 : monomial subalgebra of --[x..z, a]                                      |
|                            37                                               |
|-----------------------------------------------------------------------------|
|      2                                                                      |
|x*y, x ]                                                                     |
+-----------------------------------------------------------------------------+
|i5 : e                                                                       |
|                                                                             |
|     ZZ          2    3    4    5                  2      3    2    2        |
|o5 = --[a, z*a, z a, z a, z a, z a, y*a, y*z*a, y*z a, y*z a, y a, y z*a,    |
|     37                                                                      |
|                                                                             |
|                            ZZ                                               |
|o5 : monomial subalgebra of --[x..z, a]                                      |
|                            37                                               |
|-----------------------------------------------------------------------------|
| 3                  2           2      2 4 2                                 |
|y a, x*a, x*z*a, x*z a, x*y*a, x a, x*y z a ]                                |
+-----------------------------------------------------------------------------+
|i6 : flatten \ exponents \ gens l                                            |
|                                                                             |
|o6 = {{0, 0, 0, 0}, {0, 0, 1, 0}, {0, 0, 2, 0}, {0, 0, 3, 0}, {0, 0, 4, 0},  |
|     ------------------------------------------------------------------------|
|     {0, 0, 5, 0}, {0, 1, 0, 0}, {0, 1, 1, 0}, {0, 1, 2, 0}, {0, 1, 3, 0},   |
|     ------------------------------------------------------------------------|
|     {0, 2, 0, 0}, {0, 2, 1, 0}, {0, 3, 0, 0}, {1, 0, 0, 0}, {1, 0, 1, 0},   |
|     ------------------------------------------------------------------------|
|     {1, 0, 2, 0}, {1, 1, 0, 0}, {2, 0, 0, 0}}                               |
|                                                                             |
|o6 : List                                                                    |
+-----------------------------------------------------------------------------+

The lattice points of the polytope are the exponent vectors of the generators
of the first subalgebra, that can be obtained with exponents (Macaulay2Doc),
if necessary. Note that in this example there were no
free auxiliary variable in the ring, so a new variable a was added, whence at
first the exponents have four components. The exponent vectors of the
generators of the second subalgebra are the generators of the Ehrhart semigroup
(the semigroup determined by the polytope).

It is also possible to call Normaliz directly to do this computation by using
the function normaliz. It takes a matrix as input, whose rows
are the vertices of the polytope, and the type for the computation. It returns
an object of type RationalCone, that gives access to the
lattice points via the key " gen".
+------------------------------------------------+
|i7 : M=matrix {{0,0,0},{2,0,0},{0,3,0},{0,0,5}};|
|                                                |
|              4        3                        |
|o7 : Matrix ZZ  <--- ZZ                         |
+------------------------------------------------+
|i8 : (normaliz(M,"polytope"))#"gen"             |
|                                                |
|o8 = | 0 0 0 1 |                                |
|     | 0 0 1 1 |                                |
|     | 0 0 2 1 |                                |
|     | 0 0 3 1 |                                |
|     | 0 0 4 1 |                                |
|     | 0 0 5 1 |                                |
|     | 0 1 0 1 |                                |
|     | 0 1 1 1 |                                |
|     | 0 1 2 1 |                                |
|     | 0 1 3 1 |                                |
|     | 0 2 0 1 |                                |
|     | 0 2 1 1 |                                |
|     | 0 3 0 1 |                                |
|     | 1 0 0 1 |                                |
|     | 1 0 1 1 |                                |
|     | 1 0 2 1 |                                |
|     | 1 1 0 1 |                                |
|     | 2 0 0 1 |                                |
|     | 1 2 4 2 |                                |
|                                                |
|              19        4                       |
|o8 : Matrix ZZ   <--- ZZ                        |
+------------------------------------------------+

torusInvariants -- ring of invariants of torus action
*****************************************************

Synopsis
========

  * Usage:
        torusInvariants(T,R)
  * Inputs:
      * a matrix (Macaulay2Doc), matrix (a_{ij}) of the action
      * a ring (Macaulay2Doc),  the ring on which the action takes
        place
  * Outputs:
      * an instance of the type MonomialSubalgebra,
        the ring of invariants R^T

Description
===========

 Let T=(K^*)^r be the r-dimensional torus acting on the polynomial ring
R=K[X_1,\ldots,X_n] diagonally. Such an action can be described as follows:
there are integers a_{ij}, i=1,\ldots,r, j=1,\ldots,n, such that
(\lambda_1,\ldots,\lambda_r)\in T acts by the substitution

X_j\mapsto \lambda_1^{a_{1j}}*\ldots*\lambda_r^{a_{rj}}X_j,    j=1,\ldots,n.

The function takes the matrix (a_{ij}) as input and computes the ring of
invariants R^T=\{f\in R: \lambda f=f for all \lambda \in T\}.

This method can be used with the options allComputations,
and grading.
+-----------------------------------------+
|i1 : R=QQ[x,y,z,w];                      |
+-----------------------------------------+
|i2 : T=matrix({{-1,-1,2,0},{1,1,-2,-1}});|
|                                         |
|              2        4                 |
|o2 : Matrix ZZ  <--- ZZ                  |
+-----------------------------------------+
|i3 : torusInvariants(T,R)                |
|                                         |
|         2           2                   |
|o3 = QQ[y z, x*y*z, x z]                 |
|                                         |
|o3 : monomial subalgebra of R            |
+-----------------------------------------+

See also
========

  * finiteDiagInvariants -- ring of invariants of
    a finite group action
  * diagInvariants -- ring of invariants of a
    diagonalizable group action

Ways to use torusInvariants :
=============================

  * "torusInvariants(Matrix,Ring)"

For the programmer
==================

The object torusInvariants, is a method function with options (Macaulay2Doc).

vars(MonomialSubalgebra) -- row matrix of the generators of a monomial subalgebra
*********************************************************************************

Synopsis
========

  * Function: vars (Macaulay2Doc),
  * Usage:
        vars S
  * Inputs:
      * an instance of the type MonomialSubalgebra,
  * Outputs:
      * a matrix (Macaulay2Doc),  with one row whose entries are
        the generators of the monomial subalgebra S

Description
===========

+-------------------------------------------------+
|i1 : R=ZZ/37[x,y,z];                             |
+-------------------------------------------------+
|i2 : S=createMonomialSubalgebra {x^2*y, x*z, z^3}|
|                                                 |
|     ZZ  2         3                             |
|o2 = --[x y, x*z, z ]                            |
|     37                                          |
|                                                 |
|o2 : monomial subalgebra of R                    |
+-------------------------------------------------+
|i3 : vars S                                      |
|                                                 |
|o3 = | x2y xz z3 |                               |
|                                                 |
|             1       3                           |
|o3 : Matrix R  <--- R                            |
+-------------------------------------------------+

See also
========

  * generators(MonomialSubalgebra),
    -- generators of a monomial subalgebra

Ways to use this method:
========================

  * vars(MonomialSubalgebra) -- row matrix
    of the generators of a monomial subalgebra

writeNmzData -- creates an input file for Normaliz
**************************************************

Description
===========

This function creates an input file for Normaliz containing one or several
matrices, whose rows are considered according to the type:
  * integral closure, normalization: generators of a rational cone
  * polytope:   lattice points spanning a polytope
  * rees_algebra:   exponent vectors of monomials generating an ideal
  * inequalities, equations, congruences:   constraints defining the cone to be
    computed
  * inhom_inequalities, inhom_equations, inhom_congruences:   inhomogeneous
    constraints defining the cone to be computed
  * normal_toric_ideal:  generators of a lattice ideal
  * grading:  a grading which gives positive degree to all generators
For a more detailed list see the Normaliz documentation.

Ways to use writeNmzData :
==========================

  * writeNmzData(List) -- creates an input file
    for Normaliz with several matrices
  * writeNmzData(Matrix,String), --
    creates an input file for Normaliz with one matrix
  * writeNmzData(Matrix,ZZ) (missing documentation)

For the programmer
==================

The object writeNmzData, is a method function (Macaulay2Doc).

writeNmzData(List) -- creates an input file for Normaliz with several matrices
******************************************************************************

Synopsis
========

  * Function: writeNmzData,
  * Usage:
        writeNmzData L
  * Inputs:
      * containing pairs (mat,nmzType), a list (Macaulay2Doc),

Description
===========

This function writes an input file for Normaliz containing several matrices.
The input is a list consisting of pairs (mat,nmzType), each is handled as in
writeNmzData, but all written into the same input file. If
no filename has been specified, an error occurs.
+-------------------------------------------------------+
|i1 : nmzFilename="example"; -- to keep the files       |
+-------------------------------------------------------+
|i2 : hy=(matrix {{1, -1, 0},{1, 1, -2}},"inequalities")|
|                                                       |
|o2 = (| 1 -1 0  |, inequalities)                       |
|      | 1 1  -2 |                                      |
|                                                       |
|o2 : Sequence                                          |
+-------------------------------------------------------+
|i3 : eq=(matrix {{1, 2, 3},{2, 2, 3}},"equations")     |
|                                                       |
|o3 = (| 1 2 3 |, equations)                            |
|      | 2 2 3 |                                        |
|                                                       |
|o3 : Sequence                                          |
+-------------------------------------------------------+
|i4 : cg=(matrix {{9, 8, 7},{7, 6, 5}},"congruences")   |
|                                                       |
|o4 = (| 9 8 7 |, congruences)                          |
|      | 7 6 5 |                                        |
|                                                       |
|o4 : Sequence                                          |
+-------------------------------------------------------+
|i5 : writeNmzData {hy, eq, cg};                        |
+-------------------------------------------------------+
|i6 : get ("example.in")                                |
|                                                       |
|o6 = 2                                                 |
|     3                                                 |
|     1 -1 0                                            |
|     1 1 -2                                            |
|     inequalities                                      |
|     2                                                 |
|     3                                                 |
|     1 2 3                                             |
|     2 2 3                                             |
|     equations                                         |
|     2                                                 |
|     3                                                 |
|     9 8 7                                             |
|     7 6 5                                             |
|     congruences                                       |
+-------------------------------------------------------+
|i7 : rmNmzFiles();                                     |
+-------------------------------------------------------+

Ways to use this method:
========================

  * writeNmzData(List) -- creates an input file
    for Normaliz with several matrices

writeNmzData(Matrix,String) -- creates an input file for Normaliz with one matrix
*********************************************************************************

Synopsis
========

  * Function: writeNmzData,
  * Usage:
        writeNmzData(mat, nmzType)
  * Inputs:
      * a matrix (Macaulay2Doc), whose rows are interpreted
        according to the type
      * a string (Macaulay2Doc), the type
  * Consequences:
      * an input file filename.in is written, using the last filename created

Description
===========

This function creates an input file for Normaliz with a single input matrix and
its type. If no filename has been specified, an error occurs.

+------------------------------------------------+
|i1 : nmzFilename="example"; -- to keep the files|
+------------------------------------------------+
|i2 : mat=matrix({{1,2,3},{4,5,6},{7,8,10}})     |
|                                                |
|o2 = | 1 2 3  |                                 |
|     | 4 5 6  |                                 |
|     | 7 8 10 |                                 |
|                                                |
|              3        3                        |
|o2 : Matrix ZZ  <--- ZZ                         |
+------------------------------------------------+
|i3 : writeNmzData(mat,"normalization")          |
+------------------------------------------------+
|i4 : get ("example.in")                         |
|                                                |
|o4 = 3                                          |
|     3                                          |
|     1 2 3                                      |
|     4 5 6                                      |
|     7 8 10                                     |
|     normalization                              |
+------------------------------------------------+
|i5 : rmNmzFiles();                              |
+------------------------------------------------+

See also
========

  * readNmzData -- reads an output file of Normaliz
    containing one matrix

Ways to use this method:
========================

  * writeNmzData(Matrix,String), --
    creates an input file for Normaliz with one matrix