# Singular

#### D.4.19.15 normaliz

Procedure from library `normaliz.lib` (see normaliz_lib).

Usage:
normaliz(intmat sgr,int nmz_mode);
normaliz(intmat sgr, int nmz_mode, intmat sgr2, int nmz_mode2, ...);

Return:
The function applies Normaliz to the parameter sgr in the mode set by nmz_mode. The function returns the intmat defined by the file with suffix gen.

It is also possible to give more than one pair of matrix and mode. In this case all matrices and modes are used.

In this version one must use the old numerical types of input matrices according to the following table:

`0: cone`
`1: cone_and_lattice`
`2: polytope`
`3: rees_algebra`
`4: inequalities`
`5: equations`
`6: congruences`
`10: lattice_ideal`
`20: grading`

In the next version all input types of Normaliz 3.0 will be accessible via their names. See the Normaliz manual for more information.

Note:
You will find procedures for many applications of Normaliz in this library, so the explicit call of this procedure may not be necessary.

Example:
 ```LIB "normaliz.lib"; ring R=0,(x,y,z),dp; intmat M[3][2]=3,1, 3,2, 1,3; normaliz(M,1); ==> 1,1, ==> 1,2, ==> 1,3, ==> 2,1, ==> 3,1 intmat Hyperplanes[2][3] = 2,-1,0, // 2x-y >= 0 1, 1,0; // x+y >= 0 intmat Equation[1][3] = 0,1,-1; // y = z intmat Congruence[1][4] = 1,0,0,3; // x = 0 (3) normaliz(Hyperplanes,4,Equation,5,Congruence,6); ==> 3,-3,-3, ==> 3,-2,-2, ==> 3,-1,-1, ==> 3,0,0, ==> 3,1,1, ==> 3,2,2, ==> 3,3,3, ==> 3,4,4, ==> 3,5,5, ==> 3,6,6 ```