Goto Chapter: Top 1 2 3 4 Bib Ind

### 2 Functions

In this chapter we describe the functions offered by NormalizInterface. All functions supplied by this package start with "Nmz". For examples see the chapter Examples.

#### 2.1 Create a NmzCone

To create a cone object use NmzCone.

##### 2.1-1 NmzCone
 ‣ NmzCone( list ) ( function )

Returns: NmzCone

Creates a NmzCone. The list argument should contain an even number of elements, alternating between a string and a integer matrix. The string has to correspond to a Normaliz input type string and the following matrix will be interpreted as input of that type.

Currently the following strings are recognized:

• integral_closure,

• polyhedron,

• normalization,

• polytope,

• rees_algebra,

• inequalities,

• strict_inequalities,

• signs,

• strict_signs,

• equations,

• congruences,

• inhom_inequalities,

• inhom_equations,

• inhom_congruences,

• dehomogenization,

• lattice_ideal,

• grading,

• excluded_faces,

• lattice,

• saturation,

• cone,

• offset,

• vertices,

• support_hyperplanes,

• cone_and_lattice,

• subspace.

See the Normaliz manual for a detailed description.

gap> cone := NmzCone(["integral_closure",[[2,1],[1,3]]]);
<a Normaliz cone>


#### 2.2 Use a NmzCone

##### 2.2-1 NmzHasConeProperty
 ‣ NmzHasConeProperty( cone, property ) ( function )

Returns: whether the cone has already computed the given property

See NmzConeProperty (2.2-6) for a list of recognized properties.

gap> NmzHasConeProperty(cone, "ExtremeRays");
false


##### 2.2-2 NmzKnownConeProperties
 ‣ NmzKnownConeProperties( cone ) ( function )

Returns: a list of strings representing the known (computed) cone properties

Given a Normaliz cone object, return a list of all properties already computed for the cone.

gap> NmzKnownConeProperties(cone);
[ "Generators", "OriginalMonoidGenerators", "Sublattice" ]


##### 2.2-3 NmzSetVerboseDefault
 ‣ NmzSetVerboseDefault( verboseFlag ) ( function )

Returns: the previous verbosity

Set the global default verbosity state in libnormaliz. This will influence all NmzCone created afterwards, but not any existing ones.

See also NmzSetVerbose (2.2-4)

##### 2.2-4 NmzSetVerbose
 ‣ NmzSetVerbose( cone, verboseFlag ) ( function )

Returns: the previous verbosity

Set the verbosity state for a cone.

See also NmzSetVerboseDefault (2.2-3)

##### 2.2-5 NmzCompute
 ‣ NmzCompute( cone[, propnames] ) ( function )

Returns: a boolean indicating success

Start computing properties of the given cone. The first parameter indicates a cone object, the second parameter is either a single string, or a list of strings, which indicate what should be computed.

The single parameter version is equivalent to NmzCone(cone, ["DefaultMode"]). See NmzConeProperty (2.2-6) for a list of recognized properties.

gap> NmzKnownConeProperties(cone);
[ "Generators", "OriginalMonoidGenerators", "Sublattice" ]
gap> NmzCompute(cone, ["SupportHyperplanes", "IsPointed"]);
true
gap> NmzKnownConeProperties(cone);
[ "Generators", "ExtremeRays", "SupportHyperplanes", "IsPointed",
"IsDeg1ExtremeRays", "OriginalMonoidGenerators", "Sublattice",
"MaximalSubspace" ]
gap> NmzCompute(cone);
true
gap> NmzKnownConeProperties(cone);
[ "Generators", "ExtremeRays", "SupportHyperplanes", "TriangulationSize",
"TriangulationDetSum", "HilbertBasis", "IsPointed", "IsDeg1ExtremeRays",
"IsIntegrallyClosed", "OriginalMonoidGenerators", "Sublattice",
"ClassGroup", "MaximalSubspace"]


##### 2.2-6 NmzConeProperty
 ‣ NmzConeProperty( cone, property ) ( function )

Returns: the result of the computation, type depends on the property

Triggers the computation of the property of the cone and returns the result. If the property was already known, it is not recomputed. Currently the following strings are recognized as properties:

• Generators see NmzGenerators (2.3-10),

• ExtremeRays see NmzExtremeRays (2.3-9),

• VerticesOfPolyhedron see NmzVerticesOfPolyhedron (2.3-38),

• SupportHyperplanes see NmzSupportHyperplanes (2.3-33),

• TriangulationSize see NmzTriangulationSize (2.3-36),

• TriangulationDetSum see NmzTriangulationDetSum (2.3-35),

• Triangulation see NmzTriangulation (2.3-34),

• Multiplicity see NmzMultiplicity (2.3-28),

• RecessionRank see NmzRecessionRank (2.3-31),

• AffineDim see NmzAffineDim (2.3-1),

• ModuleRank see NmzModuleRank (2.3-27),

• HilbertBasis see NmzHilbertBasis (2.3-13),

• ModuleGenerators see NmzModuleGenerators (2.3-25),

• Deg1Elements see NmzDeg1Elements (2.3-4),

• HilbertSeries see NmzHilbertSeries (2.3-15),

• HilbertQuasiPolynomial see NmzHilbertQuasiPolynomial (2.3-14),

• Grading see NmzGrading (2.3-12),

• IsPointed see NmzIsPointed (2.3-22),

• IsDeg1ExtremeRays see NmzIsDeg1ExtremeRays (2.3-17),

• IsDeg1HilbertBasis see NmzIsDeg1HilbertBasis (2.3-18),

• IsIntegrallyClosed see NmzIsIntegrallyClosed (2.3-21),

• OriginalMonoidGenerators see NmzOriginalMonoidGenerators (2.3-29),

• IsReesPrimary see NmzIsReesPrimary (2.3-23),

• ReesPrimaryMultiplicity see NmzReesPrimaryMultiplicity (2.3-32),

• ExcludedFaces see NmzExcludedFaces (2.3-8),

• Dehomogenization see NmzDehomogenization (2.3-5),

• InclusionExclusionData see NmzInclusionExclusionData (2.3-16),

• ClassGroup see NmzClassGroup (2.3-2),

• ModuleGeneratorsOverOriginalMonoid see NmzModuleGeneratorsOverOriginalMonoid (2.3-26),

• Sublattice computes the efficient sublattice and returns a bool signaling whether the computation was successful. Actual data connected to it can be accessed by NmzRank (2.3-30), NmzEquations (2.3-7), NmzCongruences (2.3-3), and NmzBasisChange (2.3-51).

Additionally also the following compute options are accepted as property. They modify what and how should be computed, and return True after a successful computation.

• Approximate approximate the rational polytope by an integral polytope, currently only useful in combination with Deg1Elements.

• BottomDecomposition use the best possible triangulation (with respect to the sum of determinants) using the given generators.

• DefaultMode try to compute what is possible and do not throw an exception when something cannot be computed.

• DualModeactivates the dual algorithm for the computation of the Hilbert basis and degree 1 elements. Includes HilbertBasis, unless Deg1Elements is set. Often a good choice if you start from constraints.

• KeepOrder forbids to reorder the generators. Blocks BottomDecomposition.

All the properties above can be given to NmzCompute (2.2-5). There you can combine different properties, e.g. give some properties that you would like to know and add some compute options.

See the Normaliz manual for a detailed description.

##### 2.2-7 NmzPrintConeProperties
 ‣ NmzPrintConeProperties( cone ) ( function )

Print an overview of all known properties of the given cone, as well as their values.

#### 2.3 Cone properties

##### 2.3-1 NmzAffineDim
 ‣ NmzAffineDim( cone ) ( function )

Returns: the affine dimension

The affine dimension of the polyhedron in inhomogeneous computations. Its computation is triggered if necessary.

This is an alias for NmzConeProperty( cone, "AffineDim" ); see NmzConeProperty (2.2-6).

##### 2.3-2 NmzClassGroup
 ‣ NmzClassGroup( cone ) ( function )

Returns: the class group in a special format

A normal affine monoid $$M$$ has a well-defined divisor class group. It is naturally isomorphic to the divisor class group of $$K[M]$$ where $$K$$ is a field (or any unique factorization domain). We represent it as a vector where the first entry is the rank. It is followed by sequence of pairs of entries $$n,m$$. Such two entries represent a free cyclic summand $$(\mathbb{Z}/n\mathbb{Z})^m$$. Not allowed in inhomogeneous computations.

This is an alias for NmzConeProperty( cone, "ClassGroup" ); see NmzConeProperty (2.2-6).

##### 2.3-3 NmzCongruences
 ‣ NmzCongruences( cone ) ( function )

Returns: a matrix whose rows represent the congruences

The equations, congruences and support hyperplanes together describe the lattice points of the cone.

This is part of the cone property "Sublattice".

##### 2.3-4 NmzDeg1Elements
 ‣ NmzDeg1Elements( cone ) ( function )

Returns: a matrix whose rows are the degree 1 elements

Requires the presence of a grading. Not allowed in inhomogeneous computations.

This is an alias for NmzConeProperty( cone, "Deg1Elements" ); see NmzConeProperty (2.2-6).

##### 2.3-5 NmzDehomogenization
 ‣ NmzDehomogenization( cone ) ( function )

Returns: the dehomgenization vector

Only for inhomogeneous computations.

This is an alias for NmzConeProperty( cone, "Dehomogenization" ); see NmzConeProperty (2.2-6).

##### 2.3-6 NmzEmbeddingDimension
 ‣ NmzEmbeddingDimension( cone ) ( function )

Returns: the embedding dimension of the cone

The embedding dimension is the dimension of the space in which the computation is done. It is the number of components of the output vectors. This value is always known directly after the creation of the cone.

##### 2.3-7 NmzEquations
 ‣ NmzEquations( cone ) ( function )

Returns: a matrix whose rows represent the equations

The equations cut out the linear space generated by the cone. The equations, congruences and support hyperplanes together describe the lattice points of the cone.

##### 2.3-8 NmzExcludedFaces
 ‣ NmzExcludedFaces( cone ) ( function )

Returns: a matrix whose rows represent the excluded faces

This is an alias for NmzConeProperty( cone, "ExcludedFaces" ); see NmzConeProperty (2.2-6).

##### 2.3-9 NmzExtremeRays
 ‣ NmzExtremeRays( cone ) ( function )

Returns: a matrix whose rows are the extreme rays

This is an alias for NmzConeProperty( cone, "ExtremeRays" ); see NmzConeProperty (2.2-6).

##### 2.3-10 NmzGenerators
 ‣ NmzGenerators( cone ) ( function )

Returns: a matrix whose rows are the generators of cone

This is an alias for NmzConeProperty( cone, "Generators" ); see NmzConeProperty (2.2-6).

##### 2.3-11 NmzGeneratorOfInterior
 ‣ NmzGeneratorOfInterior( cone ) ( function )

Returns: a vector representing the generator of the interior of cone

If cone is Gorenstein, this function returns the generator of the interior of cone. If cone is not Gorenstein, an error is raised.

 ‣ NmzGrading( cone ) ( function )

This is an alias for NmzConeProperty( cone, "Grading" ); see NmzConeProperty (2.2-6).

##### 2.3-13 NmzHilbertBasis
 ‣ NmzHilbertBasis( cone ) ( function )

Returns: a matrix whose rows are the Hilbert basis elements

This is an alias for NmzConeProperty( cone, "HilbertBasis" ); see NmzConeProperty (2.2-6).

##### 2.3-14 NmzHilbertQuasiPolynomial
 ‣ NmzHilbertQuasiPolynomial( cone ) ( function )

Returns: the Hilbert function as a quasipolynomial

The Hilbert function counts the lattice points degreewise. The result is a quasipolynomial $$Q$$, that is, a polynomial with periodic coefficients. It is given as list of polynomials $$P_0, \ldots, P_{(p-1)}$$ such that $$Q(i) = P_{(i \bmod p)} (i)$$.

This is an alias for NmzConeProperty( cone, "HilbertQuasiPolynomial" ); see NmzConeProperty (2.2-6).

##### 2.3-15 NmzHilbertSeries
 ‣ NmzHilbertSeries( cone ) ( function )

Returns: the Hilbert series as rational function

The result consists of a list with two entries. The first is the numerator polynomial. In inhomogeneous computations this can also be a Laurent polynomial. The second list entry represents the denominator. It is a list of pairs $$[k_i, l_i]$$. Such a pair represents the factor $$(1-t^{k_i})^{l_i}$$.

This is an alias for NmzConeProperty( cone, "HilbertSeries" ); see NmzConeProperty (2.2-6).

##### 2.3-16 NmzInclusionExclusionData
 ‣ NmzInclusionExclusionData( cone ) ( function )

Returns: inclusion-exclusion data

List of faces which are internally have been used in the inclusion-exclusion scheme. Given as a list pairs. The first pair entry is a key of generators contained in the face (compare also NmzTriangulation (2.3-34)) and the multiplicity with which it was considered. Only available with excluded faces or strict constraints as input.

This is an alias for NmzConeProperty( cone, "InclusionExclusionData" ); see NmzConeProperty (2.2-6).

##### 2.3-17 NmzIsDeg1ExtremeRays
 ‣ NmzIsDeg1ExtremeRays( cone ) ( function )

Returns: true if all extreme rays have degree 1; false otherwise

This is an alias for NmzConeProperty( cone, "IsDeg1ExtremeRays" ); see NmzConeProperty (2.2-6).

##### 2.3-18 NmzIsDeg1HilbertBasis
 ‣ NmzIsDeg1HilbertBasis( cone ) ( function )

Returns: true if all Hilbert basis elements have degree 1; false otherwise

This is an alias for NmzConeProperty( cone, "IsDeg1HilbertBasis" ); see NmzConeProperty (2.2-6).

##### 2.3-19 NmzIsGorenstein
 ‣ NmzIsGorenstein( cone ) ( function )

Returns: whether the cone is Gorenstein

Returns true if cone is Gorenstein, false otherwise.

##### 2.3-20 NmzIsInhomogeneous
 ‣ NmzIsInhomogeneous( cone ) ( function )

Returns: whether the cone is inhomogeneous

This value is always known directly after the creation of the cone.

##### 2.3-21 NmzIsIntegrallyClosed
 ‣ NmzIsIntegrallyClosed( cone ) ( function )

Returns: true if the cone is integrally closed; false otherwise

It is integrally closed when the Hilbert basis is a subset of the original monoid generators. So it is only computable if we have original monoid generators.

This is an alias for NmzConeProperty( cone, "IsIntegrallyClosed" ); see NmzConeProperty (2.2-6).

##### 2.3-22 NmzIsPointed
 ‣ NmzIsPointed( cone ) ( function )

Returns: true if the cone is pointed; false otherwise

This is an alias for NmzConeProperty( cone, "IsPointed" ); see NmzConeProperty (2.2-6).

##### 2.3-23 NmzIsReesPrimary
 ‣ NmzIsReesPrimary( cone ) ( function )

Returns: true if is the monomial ideal is primary to the irrelevant maximal ideal, false otherwise

Only used with the input type rees_algebra.

This is an alias for NmzConeProperty( cone, "IsReesPrimary" ); see NmzConeProperty (2.2-6).

##### 2.3-24 NmzMaximalSubspace
 ‣ NmzMaximalSubspace( cone ) ( function )

Returns: a matrix whose rows generate the maximale linear subspace

This is an alias for NmzConeProperty( cone, "MaximalSubspace" ); see NmzConeProperty (2.2-6).

##### 2.3-25 NmzModuleGenerators
 ‣ NmzModuleGenerators( cone ) ( function )

Returns: a matrix whose rows are the module generators

This is an alias for NmzConeProperty( cone, "ModuleGenerators" ); see NmzConeProperty (2.2-6).

##### 2.3-26 NmzModuleGeneratorsOverOriginalMonoid
 ‣ NmzModuleGeneratorsOverOriginalMonoid( cone ) ( function )

Returns: a matrix whose rows are the module generators over the original monoid

A minimal system of generators of the integral closure over the original monoid. Requires the existence of original monoid generators. Not allowed in inhomogeneous computations.

This is an alias for NmzConeProperty( cone, "ModuleGeneratorsOverOriginalMonoid" ); see NmzConeProperty (2.2-6).

##### 2.3-27 NmzModuleRank
 ‣ NmzModuleRank( cone ) ( function )

Returns: the rank of the module of lattice points in the polyhedron as a module over the recession monoid

Only for inhomogeneous computations.

This is an alias for NmzConeProperty( cone, "ModuleRank" ); see NmzConeProperty (2.2-6).

##### 2.3-28 NmzMultiplicity
 ‣ NmzMultiplicity( cone ) ( function )

This is an alias for NmzConeProperty( cone, "Multiplicity" ); see NmzConeProperty (2.2-6).

##### 2.3-29 NmzOriginalMonoidGenerators
 ‣ NmzOriginalMonoidGenerators( cone ) ( function )

Returns: a matrix whose rows are the original monoid generators

This is an alias for NmzConeProperty( cone, "OriginalMonoidGenerators" ); see NmzConeProperty (2.2-6).

##### 2.3-30 NmzRank
 ‣ NmzRank( cone ) ( function )

Returns: the rank of the cone

This value is the rank of the lattice generated by the lattice points of the cone.

This is part of the cone property "Sublattice".

##### 2.3-31 NmzRecessionRank
 ‣ NmzRecessionRank( cone ) ( function )

Returns: the rank of the recession cone

Only for inhomogeneous computations.

This is an alias for NmzConeProperty( cone, "RecessionRank" ); see NmzConeProperty (2.2-6).

##### 2.3-32 NmzReesPrimaryMultiplicity
 ‣ NmzReesPrimaryMultiplicity( cone ) ( function )

the multiplicity of a monomial ideal, provided it is primary to the maximal ideal generated by the indeterminates. Used only with the input type rees_algebra.

This is an alias for NmzConeProperty( cone, "ReesPrimaryMultiplicity" ); see NmzConeProperty (2.2-6).

##### 2.3-33 NmzSupportHyperplanes
 ‣ NmzSupportHyperplanes( cone ) ( function )

Returns: a matrix whose rows represent the support hyperplanes

The equations cut out the linear space generated by the cone. The equations, congruences and support hyperplanes together describe the lattice points of the cone.

This is an alias for NmzConeProperty( cone, "SupportHyperplanes" ); see NmzConeProperty (2.2-6).

##### 2.3-34 NmzTriangulation
 ‣ NmzTriangulation( cone ) ( function )

Returns: the triangulation

This returns a list of the maximal simplicial cones in a triangulation, i.e., a list of cones dividing the cone into simplicial cones. Each cone in the list is represented by a pair. The first entry of such a pair is the key of the simplex, i.e., a list of integers $$a_1,\dots,a_n$$ referring to the NmzGenerators (2.3-10) (counting from 0) which are used in this simplicial cone. The second entry of each pair in the list is the absolute value of the determinant of the generator matrix of the simplicial cone.

This is an alias for NmzConeProperty( cone, "Triangulation" ); see NmzConeProperty (2.2-6).

##### 2.3-35 NmzTriangulationDetSum
 ‣ NmzTriangulationDetSum( cone ) ( function )

Returns: sum of the absolute values of the determinants of the simplicial cones in the used triangulation

This is an alias for NmzConeProperty( cone, "TriangulationDetSum" ); see NmzConeProperty (2.2-6).

##### 2.3-36 NmzTriangulationSize
 ‣ NmzTriangulationSize( cone ) ( function )

Returns: the number of simplicial cones in the used triangulation

This is an alias for NmzConeProperty( cone, "TriangulationSize" ); see NmzConeProperty (2.2-6).

##### 2.3-37 NmzVerticesFloat
 ‣ NmzVerticesFloat( cone ) ( function )

Returns: a matrix whose rows are the vertices of the polyhedron cone with float coordinates

The rows of this matrix represent the vertices of cone, printed as floats for better readability. The result might be inexact, and should therefore not be used for computations.

##### 2.3-38 NmzVerticesOfPolyhedron
 ‣ NmzVerticesOfPolyhedron( cone ) ( function )

Returns: a matrix whose rows are the vertices of the polyhedron

This is an alias for NmzConeProperty( cone, "VerticesOfPolyhedron" ); see NmzConeProperty (2.2-6).

##### 2.3-39 NmzConeDecomposition
 ‣ NmzConeDecomposition( cone ) ( function )

This is an alias for NmzConeProperty( cone, "ConeDecomposition" );

##### 2.3-40 NmzEmbeddingDim
 ‣ NmzEmbeddingDim( cone ) ( function )

This is an alias for NmzConeProperty( cone, "EmbeddingDim" );

##### 2.3-41 NmzExternalIndex
 ‣ NmzExternalIndex( cone ) ( function )

This is an alias for NmzConeProperty( cone, "ExternalIndex" );

 ‣ NmzGradingDenom( cone ) ( function )

This is an alias for NmzConeProperty( cone, "GradingDenom" );

##### 2.3-43 NmzIntegerHull
 ‣ NmzIntegerHull( cone ) ( function )

This is an alias for NmzConeProperty( cone, "IntegerHull" );

##### 2.3-44 NmzInternalIndex
 ‣ NmzInternalIndex( cone ) ( function )

This is an alias for NmzConeProperty( cone, "InternalIndex" );

##### 2.3-45 NmzStanleyDec
 ‣ NmzStanleyDec( cone ) ( function )

This is an alias for NmzConeProperty( cone, "StanleyDec" );

##### 2.3-46 NmzSublattice
 ‣ NmzSublattice( cone ) ( function )

This is an alias for NmzConeProperty( cone, "Sublattice" );

##### 2.3-47 NmzUnitGroupIndex
 ‣ NmzUnitGroupIndex( cone ) ( function )

This is an alias for NmzConeProperty( cone, "UnitGroupIndex" );

##### 2.3-48 NmzWeightedEhrhartQuasiPolynomial
 ‣ NmzWeightedEhrhartQuasiPolynomial( cone ) ( function )

This is an alias for NmzConeProperty( cone, "NmzWeightedEhrhartQuasiPolynomial" );

##### 2.3-49 NmzWeightedEhrhartSeries
 ‣ NmzWeightedEhrhartSeries( cone ) ( function )

This is an alias for NmzConeProperty( cone, "NmzWeightedEhrhartSeries" );

##### 2.3-50 NmzWitnessNotIntegrallyClosed
 ‣ NmzWitnessNotIntegrallyClosed( cone ) ( function )

This is an alias for NmzConeProperty( cone, "WitnessNotIntegrallyClosed" );

##### 2.3-51 NmzBasisChange
 ‣ NmzBasisChange( cone ) ( function )

Returns: a record describing the basis change

The result record r has three components: r.Embedding, r.Projection, and r.Annihilator, where the embedding A and the projection B are matrices, and the annihilator c is an integer. They represent the mapping into the effective lattice $$\mathbb{Z}^n \to \mathbb{Z}^r, u \mapsto (uB)/c$$ and the inverse operation $$\mathbb{Z}^r \to \mathbb{Z}^n, v \mapsto vA$$.

This is part of the cone property "Sublattice".

Goto Chapter: Top 1 2 3 4 Bib Ind

generated by GAPDoc2HTML