next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Normaliz :: normaliz(Matrix,ZZ)

normaliz(Matrix,ZZ) -- calls Normaliz

Synopsis

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 writeNmzData, and decides what the program will do:

  • type 0: Computes the Hilbert basis of the rational cone generated by the rows with respect to the ambient lattice ℤn;
  • type 1: The same as 0, but with respect to the sublattice of ℤn generated by the rows;
  • type 2: Computes the integral points in the polytope spanned by the rows and its Ehrhart semigroup (the semigroup determined by the polytope);
  • type 3: Computes the integral closure of the Rees algebra of the ideal generated by the monomials with exponent vectors the rows;
  • type 4: Computes the Hilbert basis of the rational cone in ℝm given by the system of homogeneous inequalities mat x ≥ 0;
  • type 5: Computes the Hilbert basis of the rational cone given by the nonnegative solutions of the homogeneous system mat x = 0.
  • type 6: 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 (xi1,…,xin,c) represents a congruence xi1z1+…+xinzn ≡ 0 modc.
  • type 10: Computes the monoid as a quotient of ℤ+n modulo a system of congruences (in the semigroup sense) defined by the rows of the input matrix.

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, -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}};

              7        9
o2 : Matrix ZZ  <--- ZZ
i3 : rc=normaliz(eq,5);
i4 : rc#"gen"

o4 = | 1 2 0 0 1 2 2 0 1 |
     | 2 0 1 0 1 2 1 2 0 |
     | 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 |

              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 (see also getNumInvs). It can also be used with the option grading.

i5 : arc=normaliz(allComputations=>true,eq,5);
i6 : arc#"gen"

o6 = | 1 2 0 0 1 2 2 0 1 |
     | 2 0 1 0 1 2 1 2 0 |
     | 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 |

              5        9
o6 : Matrix ZZ  <--- ZZ
i7 : arc#"ext"

o7 = | 1 2 0 0 1 2 2 0 1 |
     | 2 0 1 0 1 2 1 2 0 |
     | 0 2 1 2 1 0 1 0 2 |
     | 1 0 2 2 1 0 0 2 1 |

              4        9
o7 : Matrix ZZ  <--- ZZ
i8 : arc#"inv"

o8 = HashTable{ => (1, 1, 1)                         }
               degree 1 elements => 5
               embedding dim => 9
               graded => true
               grading => (0, 0, 0, 0, 1, 0, 0, 0, 0)
               grading denom => 1
               hilbert basis elements => 5
               hilbert quasipolynomial denom => 1
               hilbert series denom => (1, 1, 1)
               hilbert series num => (1, 2, 1)
               index => 2
               inhomogeneous => false
               multiplicity => 4
               multiplicity denom => 1
               number extreme rays => 4
               number support hyperplanes => 4
               rank => 3
               size triangulation => 2
               sum dets => 4

o8 : HashTable

See also