1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859
|
% !TeX spellcheck = en_US
\section{The input file}\label{input}
The input file \ttt{<project>.in} consists of items. There are several types of them:
\begin{arab}
\item definition of the ambient space,
\item matrices with integer or rational entries (depending on the type),
\item vectors with integer entries,
\item constraints in tabular or symbolic format,
\item a polynomial,
\item computation goals and algorithmic variants,
\item numerical parameters,
\item number field definition,
\item input types for fusion rings,
\item comments.
\end{arab}
An item cannot include another item. In particular, comments can only be inserted between other items, but not within another item. Matrices and vectors can have two different formats, plain and formatted.
Matrices and vectors are classified by the following attributes:
\begin{arab}
\item generators, constraints, accessory,
\item cone/polyhedron, (affine) lattice,
\item homogeneous, inhomogeneous.
\end{arab}
The line structure is irrelevant for the interpretation of the input, but it is advisable to use it for the readability of the input file.
The input syntax of Normaliz~2 can still be used. It is explained in Appendix~\ref{OldSyntax}.
\subsection{Input items}
\subsubsection{The ambient space and lattice}
The ambient space is specified as follows:
\begin{Verbatim}
amb_space <d>
\end{Verbatim}
where \ttt{<d>} stands for the dimension $d$ of the ambient vector space $\RR^d$ in which the geometric objects live. The \emph{ambient lattice} $\AA$ is set to $\ZZ^d$.
Alternatively one can define the ambient space implicitly by
\begin{Verbatim}
amb_space auto
\end{Verbatim}
In this case the dimension of the ambient space is determined by Normaliz from the first formatted vector or matrix in the input file. It is clear that any input item that requires the knowledge of the dimension can only follow the first formatted vector or matrix.
\emph{In the following the letter $\mathbf{d}$ will always denote the dimension set with} \verb|amb_space|.
An example:
\begin{Verbatim}
amb_space 5
\end{Verbatim}
indicates that polyhedra and lattices are subobjects of $\RR^5$. The ambient lattice is $\ZZ^5$.
\emph{The first non-comment input item must specify the ambient space.}
\subsubsection{Plain vectors}
A plain vector is built as follows:
\begin{Verbatim}
<T>
<x>
\end{Verbatim}
\ttt{<T>} denotes the type and \ttt{<x>} is the vector itself. The number of components is determined by the type of the vector and the dimension of the ambient space. At present, all vectors have length $d$.
Example:
\begin{Verbatim}
grading
1 0 0
\end{Verbatim}
Normaliz allows also the input of sparse vectors. Sparse input is signalized by the key word \verb|sparse| as the first entry. It is followed by entries of type \verb|<col>:<val>| where \verb|<col>| denotes the column and \verb|<val>| the value in that column. (The unspecified columns have entry $0$.) A sparse vector is terminated by the character \verb|;| .
Example:
\begin{Verbatim}
grading
sparse 1:1;
\end{Verbatim}
One can also set a range of entries in sparse vectors like in
\begin{Verbatim}
grading
sparse 1:1 3..5:-1 7:1;
\end{Verbatim}
which produces the vector $(1,0,-1,-1,-1,0, 1, 0 \dots,0)$.
For unit vectors vectors there exists a shortcuts. Example:
\begin{Verbatim}
total_degree
unit_vector 25
\end{Verbatim}
\subsubsection{Formatted vectors}
A formatted vector is built as follows:
\begin{Verbatim}
<T>
[ <x> ]
\end{Verbatim}
where \ttt{<T>} denotes the type and \ttt{<x>} is the vector itself. The components can be separated by white space, commas or semicolons. An example showing all possibilities (not recommended):
\begin{Verbatim}
grading
[1,0; 0 5]
\end{Verbatim}
\subsubsection{Plain matrices}
A plain matrix is built as follows:
\begin{Verbatim}
<T> <m>
<x_1>
...
<x_m>
\end{Verbatim}
Here \ttt{<T>} denotes the type of the matrix, \ttt{<m>} the number of rows, and \ttt{<x\_1>},\dots,\ttt{<x\_m>} are the rows. Some types allow rational and floating point matrix entries, others are restricted to integers; see Sections~\ref{rational_input} and~\ref{decimal_input}.
The number of columns is implicitly defined by the dimension of the ambient space and the type of the matrix. Example (with \verb|amb_space 3|):
\begin{Verbatim}
cone 3
1/3 2 3
4 5 6
11 12/7 13/21
\end{Verbatim}
Normaliz allows the input of matrices in transposed form:
\begin{Verbatim}
<T> transpose <n>
<x_1>
...
<x_m>
\end{Verbatim}
Note that \verb|<n>| is now the number of \emph{columns} of the matrix that follows it (assumed to be the number of input vectors). The number of rows is determined by the dimension of the ambient space and the type of the matrix. Example:
\begin{Verbatim}
cone transpose 3
1 0 3/2
0 1/9 4
\end{Verbatim}
is equivalent to
\begin{Verbatim}
cone 3
1 0
0 1/9
3/2 4
\end{Verbatim}
Like vectors, matrices have a sparse input variant, again signalized by the key word \verb|sparse|. The rows are sparse vectors with entries \verb|<col>:<val>|, and each row is concluded by the character \verb|;|. Also here one can set a range of coordinates to the same value:
Example:
\begin{Verbatim}
inequalities 2 sparse
1:1 2:-1;
3-5:-1;
\end{Verbatim}
chooses the $3\times 3$ unit matrix as a matrix of type \verb|inequalities|. Note that also in case of transposed matrices, sparse entry is row by row.
\emph{Matrices may have zero rows.} Such empty matrices like
\begin{Verbatim}
inhom_inequalities 0
\end{Verbatim}
can be used to make the input inhomogeneous (Section~\ref{inhom_inp}) or to avoid the automatic choice of the positive orthant in certain cases (Section~\ref{default}). (The empty \verb|inhom_inequalities| have both effects simultaneously.) Apart from these effects, empty matrices have no influence on the computation.
\subsubsection{Formatted matrices}
A formatted matrix is built as follows:
\begin{Verbatim}
<T>
[ [<x_1>]
...
[<x_m>] ]
\end{Verbatim}
Here \ttt{<T>} denotes the type of the matrix and \verb|<x_1>|,\dots,\verb|<x_m>| are vectors. Legal separators are white space, commas and semicolons. An example showing all possibilities (not really recommended):
\begin{Verbatim}
cone [
[ 2 1][3/7 4];
[0 1],
[9 10] [11 12/13]
]
\end{Verbatim}
Similarly as plain matrices, formatted matrices can be given in transposed form, and they can be empty.
\subsubsection{Constraints in tabular format}\label{const_syntax}
This input type is somewhat closer to standard notation than the encoding of constraints in matrices. The general type of equations and inequalities is
\begin{Verbatim}
<x> <rel> <rhs>;
\end{Verbatim}
where \verb|<x>| denotes a vector of length $d$, \verb|<rel>| is one of the relations \verb|=|, \verb|<=|, \verb|>=|, \verb|<|, \verb|>| and \verb|<rhs>| is a number.
Congruences have the form
\begin{Verbatim}
<x> ~ <int> (<mod>);
\end{Verbatim}
where \verb|<mod>| is a nonzero integer.
Examples:
\begin{Verbatim}
1/2 -2 >= 0.5
1 -1/7 = 0
-1 1 ~ 7 (9)
\end{Verbatim}
Note: all numbers and relation signs must be separated by white space.
\subsubsection{Constraints in symbolic format}\label{symb_syntax}
This input type is even closer to standard notation than the encoding of constraints in matrices or in tabular format. It is especially useful if the constraints are sparse. Instead of assigning a value to a coordinate via its position in a vector, it uses coordinates named \verb|x[<n>]| where \verb|<n>| is the index of the coordinate. The index is counted from $1$.
The general type of equations and inequalities is
\begin{Verbatim}
<lhs> <rel> <rhs>;
\end{Verbatim}
where \verb|<lhs>| and \verb|<rhs>| denote affine linear function of the \verb|x<n>| with rational coefficients.
As above, \verb|<rel>| is one of the relations \verb|=|, \verb|<=|, \verb|>=|, \verb|<|, \verb|>|. (Both \verb|<lhs>| and \verb|<rhs>| must be nonempty.) Note the terminating semicolon.
Congruences have the form
\begin{Verbatim}
<lhs> ~ <rhs> (<mod>);
\end{Verbatim}
where \verb|<mod>| is a nonzero integer and \verb|<lhs>| and \verb|<rhs>| are affine linear functions with integer coefficients.
Examples:
\begin{Verbatim}
1/3x[1] >= 2x[2] + 5;
x[1]+1=1/4x[2] ;
-x[1] + x[2] ~ 7 (9);
\end{Verbatim}
There is no need to insert white space for separation, but it may be inserted anywhere where it does not disrupt numbers or relation signs.
\subsubsection{Polynomials}\label{poly_input}
For the computation of weighted Ehrhart series and integrals Normaliz needs the input of a polynomial with rational coefficients. Moreover, one can apply polynomial constraints to lattice points in polytopes. A polynomial is first read as a string. For the computation the string is converted by the input function of CoCoALib~\cite{CoCoA}. Therefore any string representing a valid CoCoA expression is allowed. However, the names of the indeterminates are fixed: \verb|x[1]|,\dots,\verb|x[<N>| where \verb|<N>]| is the value of \verb|amb_space|. The polynomial must be concluded by a semicolon.
Example:
\begin{Verbatim}
(x[1]+1)*(x[1]+2)*(x[1]+3)*(x[1]+4)*(x[1]+5)*
(x[2]+1)*(x[3]+1)*(x[4]+1)*(x[5]+1)*(x[6]+1)*(x[7]+1)*
(x[8]+1)*(x[8]+2)*(x[8]+3)*(x[8]+4)*(x[8]+5)*1/14400;
(x[1]*x[2]*x[3]*x[4])^2*(x[1]-x[2])^2*(x[1]-x[3])^2*
(x[1]-x[4])^2*(x[2]-x[3])^2*(x[2]-x[4])^2*(x[3]-x[4])^2;
\end{Verbatim}
\subsubsection{Rational numbers}\label{rational_input}
Rational numbers are allowed in input matrices, but not in all. They are \emph{not} allowed in vectors and in matrices containing lattice generators and in congruences, namely in
\begin{Verbatim}
lattice cone_and_lattice offset open_facets
congruences inhom_congruences rees_algebra lattice_ideal
grading dehomogenization signs strict_signs
\end{Verbatim}
They are allowed in \verb|saturation| since it defines the intersection of the vector space generated by the rows of the matrix with the integral lattice.
Avoid negative numbers as denominators.
Normaliz first reduces the input numbers to lowest terms. Then each row of a matrix is multiplied by the least common multiple of the denominators of its entries. In all applications in which the original monoid generators play a role, one should use only integers in input matrices to avoid any ambiguity.
\subsubsection{Decimal fractions and floating point numbers}\label{decimal_input}
Normaliz accepts decimal fractions and floating point numbers in its input files. These are precisely converted to ordinary fractions (or integers). Examples:
\begin{Verbatim}
1.1 --> 11/10 0.5 --> 1/2 -.1e1 --> -1
\end{Verbatim}
It is not allowed to combine an ordinary fraction and a decimal fraction in the same number. In other words, expressions like \verb|1.0/2| are not allowed.
\subsubsection{Numbers in algebraic extensions of $\QQ$}\label{numberfield_input}
Their format is explained in Section~\ref{alg_ex} together with the definition of number fields.
\subsubsection{Numerical parameters}
Their input has the form
\begin{Verbatim}
<parameter> <n>
\end{Verbatim}
where \verb|<n>| is the value assigned to \verb|<parameter>|.
\subsubsection{Computation goals and algorithmic variants}\label{subsecGoals}
These are single or compound words, such as
\begin{Verbatim}
HilbertBasis
Multiplicity
\end{Verbatim}
The file can contain several computation goals, as in this example.
\subsubsection{Input types for fusion rings}
See Appendix \ref{fusion_rings}.
\subsubsection{Comments}
A comment has the form
\begin{Verbatim}
/* <text> */
\end{Verbatim}
where \ttt{<text>} stands for the text of the comment. It can have arbitrary length and stretch over several lines. Example:
\begin{Verbatim}
/* This is a comment
*/
\end{Verbatim}
Comments are only allowed at places where also a new keyword would be allowed, especially not between the entries of a matrix or a vector. Comments can not be nested.
\subsubsection{Restrictions}
Input items can be combined quite freely, but there are some restrictions:
\begin{arab}
\item The types
\begin{center}
\ttt {cone, cone\_and\_lattice, polytope, rees\_algebra}
\end{center}
exclude each other mutually.
\item The input type \verb|subspace| excludes \verb|polytope| and \verb|rees_algebra|.
\item The types
\begin{center}
\ttt {lattice}, \ttt{saturation}, \ttt{cone\_and\_lattice}
\end{center}
exclude each other mutually.
\item \verb|polytope| can not be combined with \verb|grading|.
\item The only type that can be combined with \ttt{lattice\_ideal} is \ttt{grading}.
\item The following types cannot be combined with inhomogeneous types or \verb|dehomogenization|:
\begin{center}
\ttt{polytope, rees\_algebra, excluded\_faces}
\end{center}
\item The following types cannot be combined with inhomogeneous types:
\begin{center}
\ttt{dehomogenization}
\end{center}
\item Special restrictions apply for the input type \verb|open_facets|; see Section \ref{open_facets}.
\item Special rules apply if precomputed data are used. See Section~\ref{precomputed_data}.
\item For restrictions that apply to algebraic polyhedra see Section~\ref{Algebraic}. Similar restrictions apply if the input types \ttt{rational\_lattice} and \ttt{rational\_offset} are used (see Section~\ref{ratlat}).
\item The input types \verb|monoid|, \verb|toric_ideal|, \verb|normal_toric_ideal| and \verb|lattice_ideal| alloow only \verb|grading| as a further input type.
\end{arab}
A non-restriction: the same type can appear several times. This is useful if one wants to combine different formats, for example
\begin{Verbatim}
inequalities 2 sparse
1:1;
1:1 3:-1;
inequalities 2
1 1 0 1
1 -1 -1 0
\end{Verbatim}
\subsubsection{Homogeneous and inhomogeneous input}\label{inhom_inp}
Apart from the restrictions listed in the previous section, homogeneous and inhomogeneous types can be combined as well as generators and constraints. A single inhomogeneous type or \verb|dehomogenization| in the input triggers an inhomogeneous computation. The input item of inhomogeneous type may be an empty matrix.
\subsubsection{Default values}\label{default}
If there is no lattice defining item, Normaliz (virtually) inserts the the unit matrix as an input item of type \ttt{lattice}. If there is no cone defining item, the unit matrix is (additionally) inserted as an input item of type \ttt{cone}.
If the input is inhomogeneous, then Normaliz provides default values for vertices and the offset as follows:
\begin{arab}
\item If there is an input matrix type \verb|lattice|, but no \ttt{offset}, then the offset $0$ is inserted.
\item If there is an input matrix of type cone, but no \ttt{vertices}, then the vertex $0$ is inserted.
\end{arab}
\textbf{An important point.}\enspace If the input does not contain any cone generators or inequalities, Normaliz automatically assumes that you want to compute in the positive orthant. In order to avoid this you can use the directive
\begin{itemize}
\itemtt[no\_pos\_orth\_def]
\end{itemize}
Equivalently you can add an empty matrix of \verb|inequalities|, \verb|inhom_inequalities| or \verb|strict_inequalities|. This will not affect the results.
\subsubsection{Normaliz takes intersections}
The input may contain several cone defining items and several lattice defining items. We consider homogeneous input for simplicity. Inhomogeneous input is made homogeneous anyway.
One can subdivide the input items defining cones and lattices as follows:
\begin{enumerate}
\item cone generators: together they generate a cone $C_1$;
\item cone constraints, namely inequalities and equations: they define the cone $C_2$;
\item lattice generators: they generate the sublattice $L_1$ and the vector subspace $U_1=\RR L1$;
\item lattice constraints, namely equations and congruences: they define the sublattice $L_2$ and the vector subspace $U_2=\RR L_2$.
\end{enumerate}
The cone defined by all these data is C=$C_1\cap C_2\cap U_1\cap U_2$. The lattice defined by them is $\RR C\cap L_1\cap L_2$.
\subsection{Homogeneous generators}
\subsubsection{Cones}\label{cone_synt}
The main type is \verb|cone|. The other two types are added for special computations.
\begin{itemize}
\itemtt[cone] is a matrix with $d$ columns. Every row represents a vector, and they define the cone generated by them. Section~\ref{cone_ex}, \verb|2cone.in|
\itemtt[subspace] is a matrix with $d$ columns. The linear subspace generated by the rows is added to the cone. Section~\ref{subspace}.
\itemtt[polytope] is a matrix with $d-1$ columns. It is internally converted to \verb|cone| extending each row by an entry $1$. Section~\ref{polytope_ex}, \verb|polytope.in|. This input type automatically sets \verb|NoGradingDenom| and defines the grading $(0,\dots,0,1)$. Not allowed in combination with inhomogeneous types.
\itemtt[rees\_algebra] is a matrix with $d-1$ columns. It is internally converted to type \verb|cone| in two steps: (i) each row is extended by an entry $1$ to length $d$. (ii) The first $d-1$ unit vectors of length $d$ are appended. Section~\ref{Rees}, \verb|MonIdeal.in|. Not allowed in combination with inhomogeneous types.
\itemtt[extreme\_rays] is a matrix with $d$ columns. See Section~\ref{precomputed_data} for its use.
\itemtt[maximal\_subspace] is a matrix with $d$ columns. See Section~\ref{precomputed_data} for its use.
\end{itemize}
Moreover, it is possible to define a cone and a lattice by the same matrix:
\begin{itemize}
\itemtt[cone\_and\_lattice] The vectors of the matrix with $d$ columns define both a cone and a lattice. Section~\ref{normalization_ex}, \verb|A443.in|.
If \verb|subspace| is used in combination with \verb|cone_and_lattice|, then the sublattice generated by its rows is added to the lattice generated by \verb|cone_and_lattice|.
\end{itemize}
The Normaliz~2 types \verb|integral_closure| and \verb|normalization| can still be used. They are synonyms for \verb|cone| and \verb|cone_and_lattice|, respectively.
\subsubsection{Lattices}
There are $5$ types. With the exception of \ttt{rational\_lattice} and \ttt{saturation} their entries are integers.
\begin{itemize}
\itemtt[lattice] is a matrix with $d$ columns. Every row represents a vector, and they define the lattice generated by them. Section~\ref{latt_ex}, \verb|3x3magiceven_lat.in|.
\itemtt[rational\_lattice] is a matrix with $d$ columns. Its entries can be fractions. Every row represents a vector, and they define the sublattice of $\QQ^d$ generated by them. See Section~\ref{ratlat}, \verb|ratlat_2.in|.
\itemtt[saturation] is a matrix with $d$ columns. Every row represents a vector, and they define the lattice $U\cap \ZZ^d$ where $U$ is the subspace generated by them. Section~\ref{latt_ex}, \verb|3x3magic_sat.in|. (If the vectors are integral, then $U\cap \ZZ^d$ is the saturation of the lattice generated by them.)
\itemtt[cone\_and\_lattice] See Section~\ref{cone_synt}.
\itemtt[generated\_lattice] is a matrix with $d$ columns. See Section~\ref{precomputed_data} for its use.
\itemtt[hilbert\_basis\_rec\_cone] is a matrix with $d$ columns. It contains the precomputed Hilbert basis of the recession cone. See Section \ref{HB_rec_cone}.
\end{itemize}
\subsubsection{Affine monoids}
\begin{itemize}
\itemtt[monoid] is a matrix with $d$ columns. Every row represents a vector, and they generate a submonoid of $\ZZ$. See Section \ref{AffMon}, \verb|monoid.in|, \verb|A443monoid.in|.
\end{itemize}
\subsection{Homogeneous Constraints}
The coefficients $\xi_i$ of the constraints are rational numbers unless indicated otherwise.
\subsubsection{Cones}\label{HomConstrCone}
\begin{itemize}
\itemtt[inequalities] is a matrix with $d$ columns. Every row $(\xi_1,\dots,\xi_d)$ represents a homogeneous inequality
$$
\xi_1x_1+\dots+\xi_dx_d\ge 0
$$
for the vectors $(x_1,\dots,x_d)\in\RR^d$. Sections~\ref{ineq_ex},~\ref{rat_ineq}, \verb|2cone_ineq.in|, \verb|poly_ineq.in|
\itemtt[equations] is a matrix with $d$ columns. Every row $(\xi_1,\dots,\xi_d)$ represents an equation
$$
\xi_1x_1+\dots+\xi_dx_d= 0
$$
for the vectors $(x_1,\dots,x_d)\in\RR^d$. Section~\ref{eq_ex}, \verb|3x3magic.in|
\itemtt[signs] is a vector with $d$ entries in $\{-1,0,1\}$.
It stands for a matrix of type \verb|inequalities| composed of the sign inequalities $x_i\ge 0$ for the entry $1$ at the $i$-th component and the inequality $x_i\le 0$ for the entry $-1$. The entry $0$ does not impose an inequality. See Section~\ref{sign_ex}, \verb|InhomCongSigns.in|.
\itemtt[excluded\_faces] is a matrix with $d$ columns. Every row $(\xi_1,\dots,\xi_d)$ represents an inequality
$$
\xi_1x_1+\dots+\xi_dx_d> 0
$$
for the vectors $(x_1,\dots,x_d)\in\RR^d$. It is considered as a homogeneous input type though it defines inhomogeneous inequalities. The faces of the cone excluded by the inequalities are excluded from the Hilbert series computation, but \verb|excluded_faces| behave like \verb|inequalities| in almost every other respect.
Section~\ref{excluded_ex}, \verb|CondorcetSemi.in|. Also see Section~\ref{semi_open}.
\itemtt[support\_hyperplanes] is a matrix with $d$ columns. See Section~\ref{precomputed_data}.
\end{itemize}
A useful shortcut:
\begin{itemize}
\itemtt[nonnegative] inserts the sign inequalities $x_i\ge 0$ for all coordinates. See \verb|Condorcet.in|.
\end{itemize}
\subsubsection{Lattices}
\begin{itemize}
\itemtt[congruences] is a matrix with $d+1$ columns. Each row $(\xi_1,\dots,\xi_d,c)$ represents a congruence
$$
\xi_1z_1+\dots+\xi_dz_d\equiv 0 \mod c, \qquad \xi_i,c\in\ZZ,
$$
for the elements $(z_1,\dots,z_d)\in\ZZ^d$. Section~\ref{cong_ex}, \verb|3x3magiceven.in|.
\end{itemize}
\subsection{Inhomogeneous generators}
\subsubsection{Polyhedra}
\begin{itemize}
\itemtt[vertices] is a matrix with $d+1$ columns. Each row $(p_1,\dots,p_d,q)$, $q>0$, specifies a generator of a polyhedron (not necessarily a vertex), namely
$$
v_i=\biggl(\frac{p_{1}}{q},\dots,\frac{p_{n}}{q}\biggr), \qquad p_i\in\QQ,q\in\QQ_{>0},
$$
Section~\ref{polyh_ex}, \verb|InhomIneq_gen.in|
\textbf{Note:}\enspace \verb|vertices| and \verb|cone| together define a polyhedron. If \verb|vertices| is present in the input, then the default choice for \verb|cone| is the empty matrix.
\end{itemize}
The format of \verb|vertices| was introduced when Normaliz only accepted integer numbers in its input. There is no need for an extra denominator anymore, but for backward compatibility the format has not been changed.
The Normaliz~2 input type \verb|polyhedron| can still be used.
\subsubsection{Affine lattices}
\begin{itemize}
\itemtt[offset] is a vector with $d$ integer entries. It defines the origin of the affine lattice.
Section~\ref{offset_ex}, \verb|InhomCongLat.in|.
\itemtt[rational\_offset] is a vector with $d$ rational entries. It defines the origin of the rational affine lattice.
Section~\ref{ratlat}, \verb|ratlat_2.in|.
\end{itemize}
\textbf{Note:}\enspace \verb|offset| and \verb|lattice| (or \verb|saturation|) together define an affine lattice. If \verb|offset| is present in the input, then the default choice for \verb|lattice| is the empty matrix.
\subsection{Inhomogeneous constraints}
\subsubsection{Polyhedra}
\begin{itemize}
\itemtt[inhom\_inequalities] is a matrix with $d+1$ columns. We consider inequalities
$$
\xi_1x_1+\dots+\xi_dx_d\ge \eta,
$$
rewritten as
$$
\xi_1x_1+\dots+\xi_dx_d+(-\eta) \ge 0
$$
and then represented by the input vectors
$$
(\xi_1,\dots,\xi_d,-\eta).
$$
Section~\ref{inhom_ineq_ex}, \verb|InhomIneq.in|.
\itemtt[inhom\_equations] is a matrix with $d+1$ columns. We consider equations
$$
\xi_1x_1+\dots+\xi_dx_d= \eta,
$$
rewritten as
$$
\xi_1x_1+\dots+\xi_dx_d+(-\eta) = 0
$$
and then represented by the input vectors
$$
(\xi_1,\dots,\xi_d,-\eta).
$$
See Section~\ref{inhom_eq_ex}\verb|NumSemi.in|.
\itemtt[strict\_inequalities] is a matrix with $d$ columns. We consider inequalities
$$
\xi_1x_1+\dots+\xi_dx_d\ge 1,
$$
represented by the input vectors
$$
(\xi_1,\dots,\xi_d).
$$
Section~\ref{strict_ex}, \verb|2cone_int.in|.
\itemtt[strict\_signs] is a vector with $d$ components in $\{-1,0,1\}$. It is the ``strict'' counterpart to \verb|signs|. An entry $1$ in component $i$ represents the inequality $x_i>0$, an entry $-1$ the opposite inequality, whereas $0$ imposes no condition on $x_i$. Section~\ref{strict_signs_ex}, \verb|Condorcet_one.in|
\itemtt[inhom\_excluded\_faces] is a matrix with $d+1$ columns. Every row $(\xi_1,\dots,\xi_d,-\eta)$ represents an inequality
$$
\xi_1x_1+\dots+\xi_dx_d> \eta
$$
for the vectors $(x_1,\dots,x_d)\in\RR^d$. The faces of the polyhedron excluded by the inequalities are excluded from the Hilbert and Ehrhart series series computation, but \verb|inhom_excluded_faces| behave like \verb|inhom_inequalities| in almost every other respect. See Section~\ref{semi_open}.
\end{itemize}
\subsubsection{Affine lattices}
\begin{itemize}
\itemtt[inhom\_congruences] We consider a matrix with $d+2$ columns. Each row $(\xi_1,\dots,\xi_d,-\eta,c)$ represents a congruence
$$
\xi_1z_1+\dots+\xi_dz_d\equiv \eta \mod c, \qquad \xi_i,\eta,c\in\ZZ,
$$
for the elements $(z_1,\dots,z_d)\in\ZZ^d$. Section~\ref{ChinRem}, \verb|InhomCongSigns.in|.
\end{itemize}
\subsection{Tabular constraints}
\begin{itemize}
\itemtt[constraints <n>] allows the input of \verb|<n>| equations, inequalities and congruences in a format that is close to standard notation. As for matrix types the keyword \verb|constraints| is followed by the number of constraints. The syntax of tabular constraints has been described in Section~\ref{cone_synt}. If $(\xi_1,\dots,\xi_d)$ is the vector on the left hand side and $\eta$ the number on the right hand side, then the constraint defines the set of vectors $(x_1,\dots,x_d)$ such that the relation
$$
\xi_1x_1+\dots +\xi_dx_d \texttt{ rel } \eta
$$
is satisfied, where \verb|rel| can take the values $=,\leq,\geq,<,>$ with the represented by input strings \verb|=,<=,>=,<,>|, respectively.
Tabular constraints cannot be used for \verb|excluded_faces| or \verb|inhom_excluded_faces|.
A further choice for \verb|rel| is \verb|~|. It represents a congruence $\equiv$ and requires the additional input of a modulus: the right hand side becomes $\eta (c)$. It represents the congruence
$$
\xi_1x_1+\dots \xi_dx_d \equiv \eta \pmod c.
$$
Sections~\ref{strict_ex}, \verb|2cone_int.in|, \ref{cong_ex}, \ttt{3x3magiceven.in}, \ref{inhom_ineq_ex}, \verb|InhomIneq.in|.
\end{itemize}
A right hand side $\neq 0$ makes the input inhomogeneous, as well as the relations $<$ and $>$. Strict inequalities are always understood as conditions for integers. So
$$
\xi_1x_1+\dots +\xi_dx_d < \eta
$$
is interpreted as
$$
\xi_1x_1+\dots \xi_dx_d \le \eta-1,
$$
\subsubsection{Forced homogeneity}
It is often more natural to write constraints in inhomogeneous form, even when one wants the computation to be homogeneous. The type \verb|constraints| does not allow this. Therefore we have introduced
\begin{itemize}
\itemtt[hom\_constraints] for the input of equations, non-strict inequalities and congruences in the same format as \verb|constraints|, except that these constraints are meant to be for a homogeneous computation. It is clear that the left hand side has only $d-1$ entries now. See Section~\ref{rat_ineq}, \verb|poly_hom_const.in|.
\end{itemize}
\subsection{Symbolic constraints}
The input syntax is
\begin{itemize}
\itemtt[constraints <n> symbolic] where \verb|<n>| is the number of constraints in symbolic form that follow.
\end{itemize}
The constraints have the form described in Section~\ref{symb_syntax}. Note that every symbolic constraint (including the last) must be terminated by a semicolon.
See Sections~\ref{inhom_eq_ex}, \verb|NumSemi.in|, \ref{ChinRem}, \verb|InhomCong.in|.
The interpretation of homogeneity follows the same rules as for tabular constraints. The variant \verb|hom_constraints| is allowed and works as for tabular constraints.
\subsection{Blocking the coordinate transformation}
For certain tasks Normaliz must perform a coordinate transformation. Without an option blocking it, it is performed if at least one of the following is contained in the input:
\begin{enumerate}
\item[(1)] generators,
\item[(3)]equations,
\item[(2)] congruemces.
\end{enumerate}
It is difficult for Normaliz to predict whether the coordinate transformation is really necessary. The main task for which it is superfluous is the computation of lattice points by project-and-lift, provided there are only equations, inequalities and congruences in the input. In case (1) the coordinate transformation cannot be blocked, and an attempt to do it will result in an \ttt{BadInputException}.
You can always ask for
\begin{itemize}
\itemtt[convert\_equations]
\end{itemize}
namely into inequalities. This is a harmless step, and it will often block the coordinate transformation in the input phase. This does not completely avoid the coordinate transformation in case (3). Then the directive
\begin{itemize}
\itemtt[no\_coord\_transf]
\end{itemize}
can be used. It implies \verb|convert_equations|.
The coordinate transformation tries to simplify the coordinate system by LLL reduction, at least in low dimensions. This can be an arithmetically dangerous step. Adding \ttt{NoLLL} to your cone properties may be useful then.
\subsection{Polynomial constraints}\label{poly_const_input}
Normaliz can apply polynomial constraints to lattice points in polytopes. The input syntax is
\begin{itemize}
\itemtt[polynomial\_equations <n>]
\itemtt[polynomial\_inequalities <n>]
\end{itemize}
where \verb|<n>| is the number of polynomials that follow. The equations defined by a polynomial $f$ is always given by $f(x)= 0$, and the inequality is $f(x) \ge 0$. Therefore no relation signs or ``right hand sides'' are allowed.Don't forget to conclude every polynomial by a semicolon.
See \verb|pet.in|, \verb|baby.in| and Section \ref{poly_const}.
\subsection{Binomial ideals}\label{relations}
There are three types of input for binomial ideals. The rows of the matrices coming with these input types represent binomials. The representation of binomials by vectors is discussed in Section \ref{markov}.
The input types differ in the object computed from them.
\begin{itemize}
\itemtt[lattice\_ideal] is an integer matrix with $d$ columns. The object computed from the binomials in it is the smallest lattice ideal containing them. Section~\ref{lattice_ideal}, \verb|non_toric.in|.
\itemtt[toric\_ideal] is an integer matrix with $d$ columns. The object computed from the binomials in it is the smallest toric ideal containing them and the toric ring whose defining ideal the latter is. Section~\ref{toric_ideal}, \verb|toric_ideal.in|.
\itemtt[normal\_toric\_ideal] is an integer matrix with $d$ columns. The object computed from the binomials in it is the the normalization of the toric ring it defines. Section~\ref{normal_toric_ideal}, \verb|normal_toric_ideal.in|.
\end{itemize}
\subsection{Unit vectors and unit matrix}\label{unit_vectors}
A grading or a dehomogenization is often given by a unit vector:
\begin{itemize}
\itemtt[unit\_vector <n>] represents the $n$-th unit vector in $\RR^d$ where $n$ is the number given by \verb|<n>|.
\end{itemize}
This shortcut cannot be used as a row of a matrix. It can be used whenever a single vector is asked for, namely after \verb|grading|, \verb|dehomogenization|, \verb|signs| and \verb|strict_signs|. See Section~\ref{rational}, \verb|rational.in|.
The unit matrix can be given to every input type that expects a matrix:
\begin{itemize}
\itemtt[unit\_matrix]
\end{itemize}
Example:
\begin{Verbatim}
cone unit_matrix
\end{Verbatim}
The number of rows is defined by \verb|amb_space| and the type of the matrix, as usual.
\subsection{Grading}\label{grading}
This type is accessory. A $\ZZ$-valued grading can be specified in two ways:
\begin{arab}
\item \emph{explicitly} by including a grading in the input, or
\item \emph{implicitly}. In this case Normaliz checks whether
the extreme integral generators of the monoid lie in an
(affine) hyperplane $A$ given by an equation $\lambda(x)=1$ with a $\ZZ$-linear form $\lambda$. If so, then $\lambda$ is used as the grading.\smallskip
\emph{Implicit gradings are only possible for homogeneous computations.}\smallskip
If the attempt to find an implicit grading causes an arithmetic overflow and \texttt{verbose} has been set (say, by the option\texttt{-c}), then Normaliz issues the warning
\begin{Verbatim}
Giving up the check for a grading
\end{Verbatim}
If you really need this check, rerun Normaliz with a bigger integer type.
\end{arab}
Explicit definition of a grading:
\begin{itemize}
\itemtt[grading] is a vector of length $d$ representing the linear form that gives the grading. Section~\ref{rational}, \verb|rational.in|.
\itemtt[total\_degree] represents a vector of length $d$ with all entries equal to $1$. Section~\ref{Condorcet}, \verb|Condorcet.in|.
\end{itemize}
Before Normaliz can apply the degree, it must be restricted
to the effective lattice $\EE$. Even if the entries of the
grading vector are coprime, it often happens that all degrees
of vectors in $\EE$ are divisible by a greatest common divisor
$ g>1$. Then $g$ is extracted from the degrees, and it will
appear as \ttt{denominator} in the output file.
Normaliz checks whether all generators of the (recession) monoid have
positive degree (after passage to the quotient modulo the unit group in the nonpointed case).
Vertices of polyhedra may have degrees $\le 0$.
\subsubsection{With binomial ideal input}\label{grad_lattid}
In this case the unit vectors correspond to generators of the
monoid. Therefore the degrees assigned to them must be
positive. Moreover, the vectors in the input represent binomial
relations, and these must be homogeneous. In other words, both
monomials in a binomial must have the same degree. This amounts
to the condition that the input vectors have degree $0$.
Normaliz checks this condition.
\subsection{Dehomogenization}
Like \verb|grading| this is an accessory type.
Inhomogeneous input for objects in $\RR^d$ is homogenized by an additional coordinate and then computed in $\RR^{d+1}$, but with the additional condition $x_{d+1}\ge 0$, and then dehomogenizing all results: the substitution $x_{d+1}=1$ acts as the \emph{dehomogenization}, and the inhomogeneous input types implicitly choose this dehomogenization.
Like the grading, one can define the dehomogenization explicitly:
\begin{itemize}
\itemtt[dehomogenization] is a vector of length $d$ representing the linear form $\delta$.
\end{itemize}
The dehomogenization can be any linear form $\delta$ satisfying the condition $\delta(x)\ge 0$ on the cone that is truncated. (In combination with constraints, the condition $\delta(x)\ge 0$ is automatically satisfied since $\delta$ is added to the constraints.)
The input type \verb|dehomogenization| can only be combined with homogeneous input types, but makes the computation inhomogeneous, resulting in inhomogeneous output. The polyhedron computed is the intersection of the cone $\CC$ (and the lattice $\EE$) with the hyperplane given by $\delta(x)=1$, and the recession cone is $\CC\cap\{x:\delta(x)=0\}$.
A potential application is the adaptation of other input formats to Normaliz. The output must then be interpreted accordingly.
Section~\ref{dehom_ex}, \verb|dehomogenization.in|.
\subsection{Weight vector for Gröbner bases}
For the computation of Gröbner bases one can specify a weight vector by
\begin{itemize}
\itemtt[gb\_weight]
\end{itemize}
It is a vecor with nonnegative entries for \verb|Lex| as a tiebreaker and positive entries for \verb|RevLeX| (default choice). The length depends on the type of input. See Section \ref{markov} for a discussion and examples.
\subsection{Open facets}\label{open_facets}
The input type \verb|open_facets| is similar to \verb|strict_inequalities|. However, it allows to apply strict inequalities that are not yet known. This makes only sense for simplicial polyhedra where a facet can be identified by the generator that does \emph{not} lie in it.
\begin{itemize}
\itemtt[open\_facets] is a vector with entries $\in \{0,1\}$.
\end{itemize}
The restrictions for the use of open facets are the following:
\begin{arab}
\item Only the input types \verb|cone,| \verb|vertices| and \verb|grading| can appear together with \verb|open_facets|.
\item The vectors in \verb|cone| are linearly independent.
\item There is at most one vertex.
\end{arab}
The number of vectors in \verb|cone| may be smaller than $d$, but \verb|open_facets| must have $d$ entries.
\verb|open_facets| make the computation inhomogeneous. They are interpreted as follows. Let $v$ be the vertex---if there are no \verb|vertices|, then $v$ is the origin. The shifted $C'=v+C$ is cut out by affine-linear inequalities $\lambda_i(x)\ge 0$ with coprime integer coefficients. We number these in such a way that $\lambda_i(v+c_i)\neq 0$ for the generators $c_i$ of $C$ (in the input order), $i=1,\dots,n$. Then all subsequent computations are applied to the shifted cone $C''=v'+C$ defined by the inequalities
$$
\lambda_i(x)\ge u_i
$$
where the vector $(u_1,\dots,u_d)$ is given by \verb|open_facets|. (If $\dim C<d$, then the entries $u_j$ with $j> \dim C$ are ignored.)
That $1$ indicates ``open'' is in accordance with its use for the disjoint decomposition; see Section~\ref{Disjoint}. Section~\ref{LattPointsFPE} discusses an example.
\subsection{Coordinates for projection}
The coordinates of a projection of the cone can be chosen by
\begin{itemize}
\itemtt[projection\_coordinates] It is a $0$-$1$ vector of length $d$.
\end{itemize}
The entries $1$ mark the coordinates of the image of the projection. The other coordinates give the kernel of the projection. See Section~\ref{Proj_cone} for an example.
\subsection{Numerical parameters}
Certain numerical parameters used by Normaliz can (only) be set in the input file.
\subsubsection{Degree bound for series expansion}
It can be set by
\begin{itemize}
\itemtt[expansion\_degree <n>]
\end{itemize}
where \verb|<n>| is the number of coefficients to be computed and printed. See Section~\ref{expansion}.
\subsubsection{Number of significant coefficients of the quasipolynomial}
It can be set by
\begin{itemize}
\itemtt[nr\_coeff\_quasipol <n>]
\end{itemize}
where \verb|<n>| is the number of highest coefficients to be printed. See Section~\ref{highest_coeff}.
\subsubsection{Codimension bound for the face lattice}
It can be set by
\begin{itemize}
\itemtt[face\_codim\_bound <n>]
\end{itemize}
where \verb|<n>| is the bound for the codimension of the faces to be computed.
\subsubsection{Degree bounds for Markov and Gröbbner bases}
\begin{itemize}
\itemtt[gb\_degree\_bound <n>] sets the upper bound \verb|<n>| for Markov and Gröbner bases,
\itemtt[gb\_min\_degree <n>] sets the lower bound \verb|<n>| for Markov and Gröbner bases.
\end{itemize}
\subsubsection{Number of digits for fixed precision}
The computation of vilumes by signed decomposition can be done with a fixed precision. It is et by
\begin{itemize}
\itemtt[decimal\_digits <n>]
\end{itemize}
where \verb|<n>| sets the precision to $10^{-n}$.
\subsubsection{Block size for distributed computation}
See Appendix \ref{distr_comp} for an explanation. It is set by
\begin{itemize}
\itemtt[block\_size\_hollow\_tri <n>]
\end{itemize}
\subsection{Pointedness}
Since version~3.1 Normaliz can also compute nonpointed cones and polyhedra without vertices.
\subsection{The zero cone}\label{zero}
The zero cone with an empty Hilbert basis is a legitimate
object for Normaliz. Nevertheless a warning message is issued
if the zero cone is encountered.
|