code:
@ifclear singularmanual
@heading More information about @sc{Singular}: Comments, Questions, Bug Reports
More and up-to-date information about @sc{Singular} is always available
from
@display
@uref{http://www.singular.uni-kl.de}.
@end display
We very much welcome any comments, questions, and bug reports. Please
contact us at
@display
@email{singular@@mathematik.uni-kl.de}.
@end display
@end ifclear

repo_name: mthl/texinfo

license: mit


code:
@ifclear singularmanual
This is the README file for lib2doc.
@end ifclear

@code{lib2doc} is a utility to generate the stand-alone documentation for
a @sc{Singular} library in various formats.

The @code{lib2doc} utility should be used by developers of @sc{Singular}
libraries to check the generation of the documentation of their
libraries.

@code{lib2doc} can be downloaded from @*
@url{ftp://www.mathematik.uni-kl.de/pub/Math/Singular/misc/lib2doc.tar.gz}

@strong{Important:}
@*To use @code{lib2doc}, you need
to have @code{perl} (version 5 or
higher), @code{texinfo} (version 3.12 or higher)  and @code{Singular}
and @code{libparse} (version 1-3-4 or higher) installed on your system.

To generate the documentation for a library, follow these steps:
@enumerate
@item
Unpack lib2doc.tar.gz
@smallexample
gzip -dc  lib2doc.tar.gz | tar -pxf -
@end smallexample
and
@smallexample
cd lib2doc
@end smallexample

@item
Edit the beginning of the file @code{Makefile}, filling in the values for
@code{SINGULAR} and @code{LIBPARSE}. Check also the values of @code{PERL}
and @code{LATEX2HTML}.

@item
Copy your library to the current directory:
@smallexample
cp <path-where-your-lib-is>/mylib.lib .
@end smallexample

@item
Now you can run the following commands:
@table @code
@item make mylib.hlp
Generates the file @code{mylib.hlp} -- the info file for the documentation
of @code{mylib.lib}. This file can be viewed with
@smallexample
info -f mylib.hlp
@end smallexample
@item make mylib.dvi
Generates the file @code{mylib.dvi} -- the dvi file for the documentation
of @code{mylib.lib}. This file can be viewed with
@smallexample
xdvi mylib.dvi
@end smallexample
@item make mylib.ps
Generates the file @code{mylib.ps} -- the PostScript file for the documentation
of @code{mylib.lib}. This file can be viewed with (for example)
@smallexample
ghostview mylib.dvi
@end smallexample
@item make mylib.html
Generates the file @code{mylib.html} -- the HTML file for the documentation
of @code{mylib.lib}. This file can be viewed with (for example)
@smallexample
netscape mylib.html
@end smallexample
@item make clean
Deletes all generated files.
@end table

Note that you can safely ignore messages complaining about undefined
references.

@end enumerate


code:
\documentclass[a4paper,german]{article}
\usepackage[german]{babel}
\usepackage{a4wide}
%\usepackage{pandora}
%\usepackage{amsmath}
%\usepackage{amsfonts}
%\usepackage{amssymb}
%\usepackage{mathptm}
\usepackage{epsfig}
%\usepackage{changebar}
%\usepackage{float}
%\usepackage[isolatin]{inputenc}

% Abs�tze: kein Einr�cken, vertikaler Abstand
\setlength{\parindent}{0pt}
\setlength{\parskip}{5pt plus 2pt minus 1pt}
\sloppy

% Keine Seitenzahlen
\pagestyle{empty}

\begin{document}
% \fontsize{20.74}{23}\selectfont

\begin{center}
% {\Large \verb?http://www.mathematik.uni-kl.de/~zca/Singular?}\\
%\vspace{-4ex}
\begin{figure}[h]
\noindent
\centering\epsfig{file=singlogo,width=15cm}
\end{figure}

% \vspace{3ex}
    {\Large A Computer Algebra System for Polynomial Computations}

\vspace{15ex}

\Huge{\textbf{User Manual}}

\huge{for \textsc{Singular} Version 1.3.6}

\vspace{5ex}

\Large{By G.-M.~Greuel, G.~Pfister, and H.~Sch\"onemann}
\end{center}

\begin{center}
  \large{With contributions by} \\
\large{O.~Bachmann, T.~Siebert, T.~Wichmann, W.~Pohl,
A.~Fr\"ubis-Kr\"uger, W.~Decker, S.~Endra\ss, C.~ Gorzel, H.~ Grassmann,
A.~Heydtmann, D.~Hillebrand, C.~Jung, U.~Klein, K.~Kr\"uger, M.~Lamm,
B.~Martin, M.~ Messollen, W.~ Neumann, T.~N\"ussler, J.~Schmidt, M.~Schulze, R.
Stobbe, M.~Wenk.}
\end{center}

\vspace{20ex}

\begin{center}
  \large{
    URL: \verb?http://www.mathematik.uni-kl.de/~zca/Singular? \\
    email: \verb?singular@mathematik.uni-kl.de?\\
    Fachbereich Mathematik \\
    Zentrum f\"ur Computeralgebra \\
    Universit\"at Kaiserslautern \\
    D-67653 Kaiserslautern \\
    Germany}
\end{center}
\end{document}


code:
@comment -*-texinfo-*-
@comment This file was generated by doc2tex.pl from math.doc
@comment DO NOT EDIT DIRECTLY, BUT EDIT math.doc INSTEAD
@comment Id: math.tex,v 1.1 2003/08/08 14:27:06 pertusus Exp $
@comment this file contains the mathematical background of Singular

@c The following directives are necessary for proper compilation
@c with emacs (C-c C-e C-r).  Please keep it as it is.  Since it
@c is wrapped in `@ignore' and `@end ignore' it does not harm `tex' or
@c `makeinfo' but is a great help in editing this file (emacs
@c ignores the `@ignore').
@ignore
%**start
\input texinfo.tex
@setfilename math.hlp
@node Top, Mathematical background
@menu
* General concepts::
@end menu
@node Mathematical background, SINGULAR libraries, Examples, Top
@chapter Mathematical background
%**end
@end ignore

This chapter introduces some of the mathematical notions and definitions used
throughout the manual. It is mostly a collection of the
most prominent definitions and properties. For details, please, refer to
some articles or text books (see @ref{References}).

@menu
* Standard bases::
* Hilbert function::
* Syzygies and resolutions::
* Characteristic sets::
* Gauss-Manin connection::
* Toric ideals and integer programming::
* References::
@end menu
@c ---------------------------------------------------------------------------
@node Standard bases, Hilbert function, ,Mathematical background
@section Standard bases
@cindex Standard bases

@subheading Definition
@tex
Let $R = \hbox{Loc}_< K[\underline{x}]$ and let $I$ be a submodule of $R^r$.
Note that for r=1 this means that $I$ is an ideal in $R$.
Denote by $L(I)$ the submodule of $R^r$ generated by the leading terms
of elements of $I$, i.e. by $\left\{L(f) \mid f \in I\right\}$.
Then $f_1, \ldots, f_s \in I$ is called a {\bf standard basis} of $I$
if $L(f_1), \ldots, L(f_s)$ generate $L(I)$.
@end tex
@ifinfo
Let R = Loc K[x] and let I be a submodule of $R^r$.
Denote by L(I) the submodule of R^r generated by the leading terms
of elements in $I$, i.e. by @{ L(f) | f in I@}.
Then f_1, @dots{}, f_s in I is called a @strong{standard basis} of I
if L(f_1), @dots{}, L(f_s) generate L(I).
@end ifinfo

@subheading Properties
@table @asis
@item normal form:
@cindex Normal form
@tex
A function $\hbox{NF} : R^r \times \{G \mid G\ \hbox{ a standard
basis}\} \to R^r, (p,G) \mapsto \hbox{NF}(p|G)$, is called a {\bf normal
form} if for any $p \in R^r$ and any standard basis $G$ the following
holds: if $\hbox{NF}(p|G) \not= 0$ then $L(g)$ does not divide
$L(\hbox{NF}(p|G))$ for all $g \in G$.

\noindent
$\hbox{NF}(p|G)$ is called a {\bf normal form of} $p$ {\bf with
respect to} $G$ (note that such a function is not unique).
@end tex
@ifinfo
A function NF : R^r x @{G | G a standard basis@} -> R^r, (p,G) ->
NF(p|G), is called a @strong{normal form} if for any p in R^r and any
standard basis G the following holds: if NF(p|G) <> 0 then L(g) does not
divide L(NF(p|G)) for all g in G.
@*NF(p|G) is called a @strong{normal form} of p with respect to G (note
that such a function is not unique).
@end ifinfo
@item ideal membership:
@cindex Ideal membership
@tex
For a standard basis $G$ of $I$ the following holds:
$f \in I$ if and only if $\hbox{NF}(f,G) = 0$.
@end tex
@ifinfo
For a standart basis G of I the following holds:
f in I if and only if NF(f,G) = 0.
@end ifinfo
@item Hilbert function:
@tex
Let \hbox{$I \subseteq K[\underline{x}]^r$} be a homogeneous module, then the Hilbert function
$H_I$ of $I$ (see below)
and the Hilbert function $H_{L(I)}$ of the leading module $L(I)$
coincide, i.e.,
$H_I=H_{L(I)}$.
@end tex
@ifinfo
Let I in K[x]^r be a homogeneous ideal, then the Hilbert function H_I of I
and the Hilbert function H_L(I) of the leading ideal L(I) coincide.
@end ifinfo
@end table

@c ---------------------------------------------------------------------------
@node Hilbert function, Syzygies and resolutions, Standard bases, Mathematical background
@section Hilbert function
@cindex Hilbert function
@cindex Hilbert series
@tex
Let M $=\bigoplus_i M_i$ be a graded module over $K[x_1,..,x_n]$ with
respect to weights $(w_1,..w_n)$.
The {\bf Hilbert function} of $M$, $H_M$, is defined (on the integers) by
$$H_M(k) :=dim_K M_k.$$
The {\bf Hilbert-Poincare series}  of $M$ is the power series
$$\hbox{HP}_M(t) :=\sum_{i=-\infty}^\infty
H_M(i)t^i=\sum_{i=-\infty}^\infty dim_K M_i \cdot t^i.$$
It turns out that $\hbox{HP}_M(t)$ can be written in two useful ways
for weights $(1,..,1)$:
$$\hbox{HP}_M(t)={Q(t)\over (1-t)^n}={P(t)\over (1-t)^{dim(M)}}$$
where $Q(t)$ and $P(t)$ are polynomials in ${\bf Z}[t]$.
$Q(t)$ is called the {\bf first Hilbert series},
and $P(t)$ the {\bf second Hilbert series}.
If \hbox{$P(t)=\sum_{k=0}^N a_k t^k$}, and \hbox{$d = dim(M)$},
then \hbox{$H_M(s)=\sum_{k=0}^N a_k$ ${d+s-k-1}\choose{d-1}$}
(the {\bf Hilbert polynomial}) for $s \ge N$.
@end tex
@ifinfo
Let M =(+) M_i be a graded module over K[x_1,...,x_n] with
respect to weights (w_1,..w_n).
The Hilbert function of M H_M is defined by
@display
H_M(k)=dim_K M_k.
@end display
The Hilbert-Poincare series  of M is the power series
@display
HP_M(t)=sum_i dim_K (M_i)*t^i.
@end display
It turns out that HP_M(t) can be written in two useful ways
for weights $(1,..,1)$:
@display
H_M(t)=Q(t)/(1-t)^n=P(t)/(1-t)^dim(M).
@end display
where Q(t) and P(t) are polynomials in Z[t].
Q(t) is called the first Hilbert series, and P(t) the second Hilbert series.
If P(t)=sum_(k=0)^N a_k t^k, and d=dim(M),
then
@display
H_M(s)=sum_(k=0)^N a_k binomial(d+s-k-1,d-1) (the Hilbert polynomial)
@end display
for s >= N.
@end ifinfo
@*
@*
@tex
Generalizing these to quasihomogeneous modules we get
$$\hbox{HP}_M(t)={Q(t)\over {\Pi_{i=1}^n(1-t^{w_i})}}$$
where $Q(t)$ is a polynomial in ${\bf Z}[t]$.
$Q(t)$ is called the {\bf first (weighted) Hilbert series} of M.
@end tex
@ifinfo
Generalizing these to quasihomogeneous modules we get
@display
H_M(t)=Q(t)/Prod((1-t)^(w_i)).
@end display
where Q(t) is a polynomial in Z[t].
Q(t) is called the first (weighted) Hilbert series of M.
@end ifinfo

@c ---------------------------------------------------------------------------
@node Syzygies and resolutions, Characteristic sets, Hilbert function, Mathematical background
@section Syzygies and resolutions
@cindex Syzygies and resolutions

@subheading Syzygies
@tex
Let $R$ be a quotient of $\hbox{Loc}_< K[\underline{x}]$ and let \hbox{$I=(g_1, ..., g_s)$} be a submodule of $R^r$.
Then the {\bf module of syzygies} (or {\bf 1st syzygy module}, {\bf module of relations}) of $I$, syz($I$), is defined to be the kernel of the map \hbox{$R^s \rightarrow R^r,\; \sum_{i=1}^s w_ie_i \mapsto \sum_{i=1}^s w_ig_i$.}
@end tex
@ifinfo
Let R be a quotient of Loc K[x] and let I=(g_1, ..., g_s) be a submodule
of R^r.
Then the @strong{module of syzygies} (or @strong{1st syzygy module}, @strong{module of relations}) of I, syz(I), is defined to be the kernel of the map
@display
R^s --> R^r,
w_1*e_1 + ... + w_s*e_s -> w_1*g_1 + ... + w_s*g_s.
@end display
@end ifinfo

The @strong{k-th syzygy module} is defined inductively to be the module
of syzygies of the
@tex
$(k-1)$-st
@end tex
@ifinfo
(k-1)-st
@end ifinfo
 syzygy module.

@tex
Note, that the syzygy modules of $I$ depend on a choice of generators $g_1, ..., g_s$.
But one can show that they depend on $I$ uniquely up to direct summands.
@end tex
@ifinfo
Note, that the syzygy modules of I depend on a choice of generators g_1, ..., g_s.
But one can show that they depend on I uniquely up to direct summands.
@end ifinfo

@table @code
@item @strong{Example:}
@smallexample
@c reused example Syzygies math.doc:213
  ring R= 0,(u,v,x,y,z),dp;
  ideal i=ux, vx, uy, vy;
  print(syz(i));
@expansion{} -y,0, -v,0,
@expansion{} 0, -y,u, 0,
@expansion{} x, 0, 0, -v,
@expansion{} 0, x, 0, u
@c end example Syzygies math.doc:213
@end smallexample
@end table

@subheading Free resolutions
@tex
Let $I=(g_1,...,g_s)\subseteq R^r$ and $M= R^r/I$.
A {\bf free resolution of $M$} is a long exact sequence
$$...\longrightarrow F_2 \buildrel{A_2}\over{\longrightarrow} F_1
\buildrel{A_1}\over{\longrightarrow} F_0\longrightarrow M\longrightarrow
0,$$
@end tex
@ifinfo
Let I=(g_1,...,g_s) in R^r and M=R^r/I.  A free resolution of M is a
long exact sequence
@display
...--> F2 --A2-> F1 --A1-> F0-->M-->0,
@end display
@end ifinfo
@*where the columns of the matrix
@tex
$A_1$
@end tex
@ifinfo
A_1
@end ifinfo
generate
@ifinfo
@math{I}
@end ifinfo
@tex
$I$
@end tex
. Note, that resolutions need not to be finite (i.e., of
finite length). The Hilbert Syzygy Theorem states, that for
@tex
$R=\hbox{Loc}_< K[\underline{x}]$
@end tex
@ifinfo
R=Loc K[x]
@end ifinfo
there exists a ("minimal") resolution of length not exceeding the number of
variables.

@table @code
@item @strong{Example:}
@smallexample
@c reused example Free_resolutions math.doc:257
  ring R= 0,(u,v,x,y,z),dp;
  ideal I = ux, vx, uy, vy;
  resolution resI = mres(I,0); resI;
@expansion{}  1      4      4      1
@expansion{} R <--  R <--  R <--  R
@expansion{}
@expansion{} 0      1      2      3
@expansion{}
  // The matrix A_1 is given by
  print(matrix(resI[1]));
@expansion{} vy,uy,vx,ux
  // We see that the columns of A_1 generate I.
  // The matrix A_2 is given by
  print(matrix(resI[3]));
@expansion{} u,
@expansion{} -v,
@expansion{} -x,
@expansion{} y
@c end example Free_resolutions math.doc:257
@end smallexample
@end table

@subheading Betti numbers and regularity
@cindex Betti number
@cindex regularity
@tex
Let $R$ be a graded ring (e.g., $R = \hbox{Loc}_< K[\underline{x}]$) and
let $I \subset R^r$ be a graded submodule. Let
$$
  R^r = \bigoplus_a R\cdot e_{a,0} \buildrel A_1 \over \longleftarrow
        \bigoplus_a R\cdot e_{a,1} \longleftarrow \ldots \longleftarrow
        \bigoplus_a R\cdot e_{a,n} \longleftarrow 0
$$
be a minimal free resolution of $R^n/I$ considered with homogeneous maps
of degree 0. Then the {\bf graded Betti number} $b_{i,j}$ of $R^r/I$ is
the minimal number of generators $e_{a,j}$ in degree $i+j$ of the $j$-th
syzygy module of $R^r/I$ (i.e., the $(j-1)$-st syzygy module of
$I$). Note, that by definition the $0$-th syzygy module of $R^r/I$ is $R^r$
and the 1st syzygy module of $R^r/I$ is $I$.
@end tex
@ifinfo
Let R be a graded ring (e.g., R = K[x]) and let I in R^r be a graded
submodule. Let
@display
R^r = (+) K[x]e(a,0) <--- (+) K[x]e(a,1)
            <--- @dots{} <--- (+) K[x]e(a,n) <--- 0
@end display
be a minimal free resolution of R^n/I considered with homogeneous maps
of degree 0. Then the @strong{graded Betti number} b_i,j of R^r/I is the
minimal number of generators e_a,j in degree i+j of the j-th syzygy
module of R^r/I (i.e., the (j-1)-st syzygy module of I). Note, that by
definition the 0th syzygy module of R^r/I is R^r and the 1st syzygy module
of R^r/I is I.
@end ifinfo

The @strong{regularity} of
@ifinfo
@math{I}
@end ifinfo
@tex
$I$
@end tex
 is the smallest integer
@ifinfo
@math{s}
@end ifinfo
@tex
$s$
@end tex

such that
@tex
$$
    \hbox{deg}(e_{a,j}) \le s+j-1 \quad \hbox{for all $j$.}
$$
@end tex
@ifinfo
@display
deg(e(a,j)) <= s+j-1    for all j.
@end display
@end ifinfo

@table @code
@item @strong{Example:}
@smallexample
@c reused example Betti_numbers_and_regularity math.doc:319
  ring R= 0,(u,v,x,y,z),dp;
  ideal I = ux, vx, uy, vy;
  resolution resI = mres(I,0); resI;
@expansion{}  1      4      4      1
@expansion{} R <--  R <--  R <--  R
@expansion{}
@expansion{} 0      1      2      3
@expansion{}
  // the betti number:
  print(betti(resI), "betti");
@expansion{}            0     1     2     3
@expansion{} ------------------------------
@expansion{}     0:     1     -     -     -
@expansion{}     1:     -     4     4     1
@expansion{} ------------------------------
@expansion{} total:     1     4     4     1
  // the regularity:
  regularity(resI);
@expansion{} 2
@c end example Betti_numbers_and_regularity math.doc:319
@end smallexample
@end table
@c ---------------------------------------------------------------------------
@node Characteristic sets, Gauss-Manin connection, Syzygies and resolutions, Mathematical background
@section Characteristic sets
@cindex Characteristic sets

@tex
Let $<$ be the lexicographical ordering on $R=K[x_1,...,x_n]$ with $x_1
< ... < x_n$.
For $f \in R$ let lvar($f$) (the leading variable of $f$) be the largest
variable in $f$,
i.e., if $f=a_s(x_1,...,x_{k-1})x_k^s+...+a_0(x_1,...,x_{k-1})$ for some
$k \leq n$ then lvar$(f)=x_k$.

Moreover, let
\hbox{ini}$(f):=a_s(x_1,...,x_{k-1})$. The pseudo remainder
$r=\hbox{prem}(g,f)$ of $g$ with respect to $f$ is
defined by the equality $\hbox{ini}(f)^a\cdot g = qf+r$ with
$\hbox{deg}_{lvar(f)}(r)<\hbox{deg}_{lvar(f)}(f)$ and $a$
minimal.

A set $T=\{f_1,...,f_r\} \subset R$ is called triangular if
$\hbox{lvar}(f_1)<...<\hbox{lvar}(f_r)$. Moreover, let $ U \subset T $,
then $(T,U)$ is called a triangular system, if $T$ is a triangular set
such that $\hbox{ini}(T)$ does not vanish on $V(T) \setminus V(U)
(=:V(T\setminus U))$.

$T$ is called irreducible if for every $i$ there are no
$d_i$,$f_i'$,$f_i''$ such that
$$   \hbox{lvar}(d_i)<\hbox{lvar}(f_i) =
\hbox{lvar}(f_i')=\hbox{lvar}(f_i''),$$
$$   0 \not\in \hbox{prem}(\{ d_i, \hbox{ini}(f_i'),
\hbox{ini}(f_i'')\},\{ f_1,...,f_{i-1}\}),$$
$$\hbox{prem}(d_if_i-f_i'f_i'',\{f_1,...,f_{i-1}\})=0.$$
Furthermore, $(T,U)$ is called irreducible if $T$ is irreducible.

The main result on triangular sets is the following:
let $G=\{g_1,...,g_s\} \subset R$ then there are irreducible triangular sets $T_1,...,T_l$
such that $V(G)=\bigcup_{i=1}^{l}(V(T_i\setminus I_i))$
where $I_i=\{\hbox{ini}(f) \mid f \in T_i \}$. Such a set
$\{T_1,...,T_l\}$ is called an {\bf irreducible characteristic series} of
the ideal $(G)$.
@end tex
@ifinfo
Let > be the lexicographical ordering on R=K[x_1,...,x_n] with x_1<...<x_n .
For f in R let lvar(f) (the leading variable of f) be the largest
variable in lead(f) (the leading term of f with respect to >),
i.e., if f=a_s(x_1,...,x_(k-1))x_k^s+...+a_0(x_1,...,x_(k-1)) for some
k<=n then lvar(f)=x_k.

Moreover, let ini(f):=a_s(x_1,...,x_(k-1)). The pseudo remainder
r=prem(g,f) of g with respect to f is defined by ini(f)^a*g=q*f+r with
the property deg_(lvar(f))(r)<deg_(lvar(f))(f), @code{a} minimal.

A set T=@{f_1,...,f_r@} in R is called triangular if lvar(f_1)<...<lvar(f_r).

(T,U) is called a triangular system, if U is a subset of T and
if T is a triangular set such that ini(T)
does not vanish on the zero-set of T \ zero-set of U
( =:Zero(T\U)).

T is called irreducible if for every i there are no d_i,f_i',f_i'' with
the property:
@display
lvar(d_i)<lvar(f_i)
lvar(f_i')=lvar(f_i'')=lvar(f_i)
0 not in prem(@{ d_i, ini(f_i'), ini(f_i'')@},@{ f_1,...,f_(i-1)@})
@end display
such that prem(d_i*f_i-f_i'*f_i'',@{f_1,...,f_(i-1)@})=0.

(T,U) is called irreducible if T is irreducible.

The main result on triangular sets is the following: let
G=@{g_1,...,g_s@} then there are irreducible triangular sets T_1,...,T_l
such that Zero(G)=Union(i=1,...,l: Zero(T_i\I_i)) where I_i=@{ini(f), f
in T_i @}.  Such a set @{T_1,...,T_l@} is called an @strong{irreducibel
characteristic series} of the ideal (G).
@end ifinfo

@table @code
@item @strong{Example:}
@smallexample
@c reused example Characteristic_sets math.doc:411
  ring R= 0,(x,y,z,u),dp;
  ideal i=-3zu+y2-2x+2,
          -3x2u-4yz-6xz+2y2+3xy,
          -3z2u-xu+y2z+y;
  print(char_series(i));
@expansion{} _[1,1],3x2z-y2+2yz,3x2u-3xy-2y2+2yu,
@expansion{} x,     -y+2z,      -2y2+3yu-4
@c end example Characteristic_sets math.doc:411
@end smallexample
@end table
@c ---------------------------------------------------------------------------
@node Gauss-Manin connection, Toric ideals and integer programming, Characteristic sets, Mathematical background
@section Gauss-Manin connection
@cindex Gauss-Manin connection

@c the following text contain too much math code, so there are
@c tex and info versions of it. It end just before the introducing text
@c to the first example.

@tex
Let $f\colon(C^{n+1},0)\rightarrow(C,0)$ be a complex isolated hypersurface singularity given by a polynomial with algebraic coefficients which we also denote by $f$.
Let $O=C[x_0,\ldots,x_n]_{(x_0,\ldots,x_n)}$ be the local ring at the origin and $J_f$ the Jacobian ideal of $f$.

A {\bf Milnor representative} of $f$ defines a differentiable fibre bundle over the punctured disc with fibres of homotopy type of $\mu$ $n$-spheres.
The $n$-th cohomology bundle is a flat vector bundle of dimension $n$ and carries a natural flat connection with covariant derivative $\partial_t$.
The {\bf monodromy operator} is the action of a positively oriented generator of the fundamental group of the puctured disc on the Milnor fibre.
Sections in the cohomology bundle of {\bf moderate growth} at $0$ form a regular $D=C\{t\}[\partial_t]$-module $G$, the {\bf Gauss-Manin connection}.

By integrating along flat multivalued families of cycles, one can consider fibrewise global holomorphic differential forms as elements of $G$.
This factors through an inclusion of the {\bf Brieskorn lattice} $H'':=\Omega^{n+1}_{C^{n+1},0}/df\wedge d\Omega^{n-1}_{C^{n+1},0}$ in $G$.

The $D$-module structure defines the {\bf V-filtration} $V$ on $G$ by $V^\alpha:=\sum_{\beta\ge\alpha}C\{t\}ker(t\partial_t-\beta)^{n+1}$.
The Brieskorn lattice defines the {\bf Hodge filtration} $F$ on $G$ by $F_k=\partial_t^kH''$ which comes from the {\bf mixed Hodge structure} on the Milnor fibre.
Note that $F_{-1}=H'$.

The induced V-filtration on the Brieskorn lattice determines the {\bf singularity spectrum} $Sp$ by $Sp(\alpha):=\dim_CGr_V^\alpha Gr^F_0G$.
The spectrum consists of $\mu$ rational numbers $\alpha_1,\dots,\alpha_\mu$ such that $e^{2\pi i\alpha_1},\dots,e^{2\pi i\alpha_\mu}$ are the eigenvalues of the monodromy.
These {\bf spectral numbers} lie in the open interval $(-1,n)$, symmetric about the midpoint $(n-1)/2$.

The spectrum is constant under $\mu$-constant deformations and has the following semicontinuity property:
The number of spectral numbers in an interval $(a,a+1]$ of all singularities of a small deformation of $f$ is greater or equal to that of f in this interval.
For semiquasihomogeneous singularities, this also holds for intervals of the form $(a,a+1)$.

Two given isolated singularities $f$ and $g$ determine two spectra and from these spectra we get an integer.
This integer is the maximal positive integer $k$ such that the semicontinuity holds for the spectrum of $f$ and $k$ times the spectrum of $g$.
These numbers give bounds for the maximal number of isolated singularities of a specific type on a hypersurface $X\subset{P}^n$ of degree $d$:
such a hypersurface has a smooth hyperplane section, and the complement is a small deformation of a cone over this hyperplane section.
The cone itself being a $\mu$-constant deformation of $x_0^d+\dots+x_n^d=0$, the singularities are bounded by the spectrum of $x_0^d+\dots+x_n^d$.

Using the library {\tt gaussman.lib} one can compute the {\bf monodromy}, the V-filtration on $H''/H'$, and the spectrum.
@end tex

@ifinfo
Let f:(C^(n+1),0)--->(C,0) be a complex isolated hypersurface singularity given by a polynomial with algebraic coefficients which we also denote by f.
Let O=C[x_0,...,x_n]_(x_0,...,x_n) be the local ring at the origin and J_f the Jacobian ideal of f.

A @strong{Milnor representative} of f defines a differentiable fibre bundle over the punctured disc with fibres of homotopy type of mu n-spheres.
The n-th cohomology bundle is a flat vector bundle of dimension n and carries a natural flat connection with covariant derivative d_t.
The @strong{monodromy operator} is the action of a positively oriented generator of the fundamental group of the puctured disc on the Milnor fibre.
Sections in the cohomology bundle of @strong{moderate growth} at 0 form a regular D=C@{t@}[d_t]-module G, the @strong{Gauss-Manin connection}.

By integrating along flat multivalued families of cycles, one can consider fibrewise global holomorphic differential forms as elements of G.
This factors through an inclusion of the @strong{Brieskorn lattice} H'':=Omega^(n+1)_(C^(n+1),0)/df*dOmega^(n-1)_(C^(n+1),0) in G.

The D-module structure defines the @strong{V-filtration} V on G by V^a:=sum_(b>=a)C@{t@}ker(t*d_t-b)^(n+1).
The Brieskorn lattice defines the @strong{Hodge filtration} F on G by F_k=d_t^kH'' which comes from the @strong{mixed Hodge structure} on the Milnor fibre.
Note that F_(-1)=H'.

The induced V-filtration on the Brieskorn lattice determines the @strong{singularity spectrum} Sp by Sp(a):=dim_CGr_V^a Gr^F_0G.
The spectrum consists of mu rational numbers a_1,...,a_mu such that exp(2*pi*i*a_1),...,exp(2*pi*i*a_mu) are the eigenvalues of the monodromy.
These @strong{spectral numbers} lie in the open interval (-1,n), symmetric about the midpoint (n-1)/2.

The spectrum is constant under mu-constant deformations and has the following semicontinuity property:
The number of spectral numbers in an interval (a,a+1] of all singularities of a small deformation of f is greater or equal to that of f in this interval.
For semiquasihomogeneous singularities, this also holds for intervals of the form (a,a+1).

Two given isolated singularities f and g determine two spectra and from these spectra we get an integer.
This integer is the maximal positive integer k such that the semicontinuity holds for the spectrum of f and k times the spectrum of g.
These numbers give bounds for the maximal number of isolated singularties of a specific type on a hypersurface X in P^n of degree d:
such a hypersurface has a smooth hyperplane section, and the complement is a small deformation of a cone over this hyperplane section.
The cone itself being a mu-constant deformation of x_0^d+...+x_n^d=0, the singularities are bounded by the spectrum of x_0^d+...+x_n^d.

Using the library @code{gaussman.lib} one can compute the @strong{monodromy}, the V-filtration on H''/H', and the spectrum.
@end ifinfo

Let us consider as an example
@ifinfo
@math{f=x^5+x^2y^2+y^5}
@end ifinfo
@tex
$f=x^5+x^2y^2+y^5$
@end tex
.
First, we compute a matrix
@ifinfo
@math{M}
@end ifinfo
@tex
$M$
@end tex
 such that
@tex
$\exp(2\pi iM)$
@end tex
@ifinfo
exp(-2*pi*i*M)
@end ifinfo
is a monodromy matrix of
@ifinfo
@math{f}
@end ifinfo
@tex
$f$
@end tex
 and the Jordan normal form of
@ifinfo
@math{M}
@end ifinfo
@tex
$M$
@end tex
:
@smallexample
@c reused example Gauss-Manin_connection math.doc:505
  LIB "gaussman.lib";
  ring R=0,(x,y),ds;
  poly f=x5+x2y2+y5;
  list l=monodromy(f);
  matrix M=jordanmatrix(l[1],l[2],l[3]);
  print(M);
@expansion{} 1/2,0,  0,   0,   0,   0,   0,0,    0,    0,    0,
@expansion{} 1,  1/2,0,   0,   0,   0,   0,0,    0,    0,    0,
@expansion{} 0,  0,  7/10,0,   0,   0,   0,0,    0,    0,    0,
@expansion{} 0,  0,  0,   7/10,0,   0,   0,0,    0,    0,    0,
@expansion{} 0,  0,  0,   0,   9/10,0,   0,0,    0,    0,    0,
@expansion{} 0,  0,  0,   0,   0,   9/10,0,0,    0,    0,    0,
@expansion{} 0,  0,  0,   0,   0,   0,   1,0,    0,    0,    0,
@expansion{} 0,  0,  0,   0,   0,   0,   0,11/10,0,    0,    0,
@expansion{} 0,  0,  0,   0,   0,   0,   0,0,    11/10,0,    0,
@expansion{} 0,  0,  0,   0,   0,   0,   0,0,    0,    13/10,0,
@expansion{} 0,  0,  0,   0,   0,   0,   0,0,    0,    0,    13/10
@c end example Gauss-Manin_connection math.doc:505
@end smallexample

Now, we compute the V-filtration on
@ifinfo
@math{H''/H'}
@end ifinfo
@tex
$H''/H'$
@end tex
 and the spectrum:
@smallexample
@c reused example Gauss-Manin_connection_1 math.doc:517
  LIB "gaussman.lib";
  ring R=0,(x,y),ds;
  poly f=x5+x2y2+y5;
  list l=vfilt(f);
  print(l[1]);
@expansion{} -1/2,
@expansion{} -3/10,
@expansion{} -1/10,
@expansion{} 0,
@expansion{} 1/10,
@expansion{} 3/10,
@expansion{} 1/2
  print(l[2]);
@expansion{} 1,2,2,1,2,2,1
  print(l[3]);
@expansion{} [1]:
@expansion{}    _[1]=gen(11)
@expansion{} [2]:
@expansion{}    _[1]=gen(10)
@expansion{}    _[2]=gen(6)
@expansion{} [3]:
@expansion{}    _[1]=gen(9)
@expansion{}    _[2]=gen(4)
@expansion{} [4]:
@expansion{}    _[1]=gen(5)
@expansion{} [5]:
@expansion{}    _[1]=gen(3)
@expansion{}    _[2]=gen(8)
@expansion{} [6]:
@expansion{}    _[1]=gen(2)
@expansion{}    _[2]=gen(7)
@expansion{} [7]:
@expansion{}    _[1]=gen(1)
  print(l[4]);
@expansion{} y5,
@expansion{} y4,
@expansion{} y3,
@expansion{} y2,
@expansion{} xy,
@expansion{} y,
@expansion{} x4,
@expansion{} x3,
@expansion{} x2,
@expansion{} x,
@expansion{} 1
@c end example Gauss-Manin_connection_1 math.doc:517
@end smallexample
Here @code{l[1]} contains the spectral numbers, @code{l[2]} the corresponding multiplicities, @code{l[3]} a
@ifinfo
@math{C}
@end ifinfo
@tex
$C$
@end tex
-basis of the V-filtration on
@ifinfo
@math{H''/H'}
@end ifinfo
@tex
$H''/H'$
@end tex
 in terms of the monomial basis of
@tex
$O/J_f\cong H''/H'$
@end tex
@ifinfo
O/J_f~=H''/H'
@end ifinfo
in @code{l[4]}.

@tex
If the principal part of $f$ is $C$-nondegenerate, one can compute the spectrum using the library {\tt spectrum.lib}.
In this case, the V-filtration on $H''$ coincides with the Newton-filtration on $H''$ which allows to compute the spectrum more efficiently.
@end tex

@ifinfo
If the principal part of f is C-nondegenerate, one can compute the spectrum using the library @code{spectrum.lib}.
In this case, the V-filtration on H'' coincides with the Newton-filtration on H'' which allows to compute the spectrum more efficiently.
@end ifinfo

Let us calculate one specific example, the maximal number
of triple points of type
@tex
$\tilde{E}_6$ on a surface $X\subset{P}^3$
@end tex
@ifinfo
E~_6 on a surface X in P^3
@end ifinfo
of degree seven.
This calculation can be done over the rationals.
So choose a local ordering on
@ifinfo
@math{Q[x,y,z]}
@end ifinfo
@tex
$Q[x,y,z]$
@end tex
. Here we take the
negative degree lexicographical ordering which is denoted
@code{ds} in @sc{Singular}:

@smallexample
@c reused example Gauss-Manin_connection_2 math.doc:562
ring r=0,(x,y,z),ds;
LIB "spectrum.lib";
poly f=x^7+y^7+z^7;
list s1=spectrumnd( f );
s1;
@expansion{} [1]:
@expansion{}    _[1]=-4/7
@expansion{}    _[2]=-3/7
@expansion{}    _[3]=-2/7
@expansion{}    _[4]=-1/7
@expansion{}    _[5]=0
@expansion{}    _[6]=1/7
@expansion{}    _[7]=2/7
@expansion{}    _[8]=3/7
@expansion{}    _[9]=4/7
@expansion{}    _[10]=5/7
@expansion{}    _[11]=6/7
@expansion{}    _[12]=1
@expansion{}    _[13]=8/7
@expansion{}    _[14]=9/7
@expansion{}    _[15]=10/7
@expansion{}    _[16]=11/7
@expansion{} [2]:
@expansion{}    1,3,6,10,15,21,25,27,27,25,21,15,10,6,3,1
@c end example Gauss-Manin_connection_2 math.doc:562
@end smallexample

The command @code{spectrumnd(f)} computes the spectrum of
@ifinfo
@math{f}
@end ifinfo
@tex
$f$
@end tex
 and
returns a list with six entries:
The Milnor number
@tex
$\mu(f)$, the geometric genus $p_g(f)$
@end tex
@ifinfo
mu(f), the geometric genus p_g(f)
@end ifinfo
and the number of different spectrum numbers.
The other three entries are of type @code{intvec}.
They contain the numerators, denominators and
multiplicities of the spectrum numbers. So
@tex
$x^7+y^7+z^7=0$
@end tex
@ifinfo
x^7+y^7+z^7=0
@end ifinfo
has Milnor number 216 and geometrical
genus 35. Its spectrum consists of the 16 different rationals
@*
@tex
${3 \over 7}, {4 \over 7}, {5 \over 7}, {6 \over 7}, {1 \over 1},
{8 \over 7}, {9 \over 7}, {10 \over 7}, {11 \over 7}, {12 \over 7},
{13 \over 7}, {2 \over 1}, {15 \over 7}, {16 \over 7}, {17 \over 7},
{18 \over 7}$
@end tex
@ifinfo
3/7, 4/7, 5/7, 6/7, 1, 8/7, 9/7, 10/7, 11/7, 12/7, 13/7, 2, 15/7, 16/7, 17/7,
18/7
@end ifinfo
@*appearing with multiplicities
@*1,3,6,10,15,21,25,27,27,25,21,15,10,6,3,1.

@tex
The singularities of type $\tilde{E}_6$ form a
$\mu$-constant one parameter family given by
$x^3+y^3+z^3+\lambda xyz=0,\quad \lambda^3\neq-27$.
@end tex
@ifinfo
The singularities of type E~_6 form a
mu-constant one parameter family given by
x^3+y^3+z^3+lambda xyz=0, lambda^3 <> -27.
@end ifinfo
Therefore they have all the same spectrum, which we compute
for
@tex
$x^3+y^3+z^3$.
@end tex
@ifinfo
@math{x^3+y^3+z^3}.
@end ifinfo

@smallexample
poly g=x^3+y^3+z^3;
list s2=spectrumnd(g);
s2;
@expansion{} [1]:
@expansion{}    8
@expansion{} [2]:
@expansion{}    1
@expansion{} [3]:
@expansion{}    4
@expansion{} [4]:
@expansion{}    1,4,5,2
@expansion{} [5]:
@expansion{}    1,3,3,1
@expansion{} [6]:
@expansion{}    1,3,3,1
@end smallexample
Evaluating semicontinuity is very easy:
@smallexample
semicont(s1,s2);
@expansion{} 18
@end smallexample

This tells us that there are at most 18 singularities of type
@tex
$\tilde{E}_6$ on a septic in $P^3$. But $x^7+y^7+z^7$
@end tex
@ifinfo
E~_6 on a septic in P^3. But x^7+y^7+z^7
@end ifinfo
is semiquasihomogeneous (sqh), so we can also apply the stronger
form of semicontinuity:

@smallexample
semicontsqh(s1,s2);
@expansion{} 17
@end smallexample

So in fact a septic has at most 17 triple points of type
@tex
$\tilde{E}_6$.
@end tex
@ifinfo
E~_6.
@end ifinfo

Note that @code{spectrumnd(f)} works only if
@ifinfo
@math{f}
@end ifinfo
@tex
$f$
@end tex
 has nondegenerate
principal part. In fact @code{spectrumnd} will detect a degenerate
principal part in many cases and print out an error message.
However if it is known in advance that
@ifinfo
@math{f}
@end ifinfo
@tex
$f$
@end tex
 has nondegenerate
principal part, then the spectrum may be computed much faster
using @code{spectrumnd(f,1)}.

@c ---------------------------------------------------------------------------
@node Toric ideals and integer programming, References, Gauss-Manin connection, Mathematical background
@section Toric ideals and integer programming
@cindex Toric ideals and integer programming

@include ti_ip.tex

@c ---------------------------------------------------------------------------
@node References, , Toric ideals and integer programming, Mathematical background
@section References
@cindex References

The Centre for Computer Algebra Kaiserslautern publishes a series of preprints
which are electronically available at
@code{http://www.mathematik.uni-kl.de/~zca/Reports_on_ca}.
Other sources to check are @code{http://symbolicnet.mcs.kent.edu/},
@code{http://www.can.nl/},... and the following list of books:

@subheading Text books on computational algebraic geometry
@itemize @bullet

@item
Adams, W.; Loustaunau, P.: An Introduction to Gr@"obner Bases. Providence, RI,
AMS, 1996

@item
Becker, T.; Weisspfenning, V.:
Gr@"obner Bases - A Computational Approach to Commutative Algebra. Springer, 1993

@item
Cohen, H.:
A Course in Computational Algebraic Number Theory,
Springer, 1995

@item
Cox, D.; Little, J.; O'Shea, D.:
Ideals, Varieties and Algorithms. Springer, 1996

@item
Eisenbud, D.: Commutative Algebra with a View Toward Algebraic Geometry.
Springer, 1995

@item
Greuel, G.-M.; Pfister, G.: A SINGULAR Introduction to Commuative Algebra, Springer, 2002

@item
Mishra, B.: Algorithmic Algebra, Texts and Monographs in Computer Science.
Springer, 1993
@item
Sturmfels, B.: Algorithms in Invariant Theory. Springer 1993

@item
Vasconcelos, W.: Computational Methods in Commutative Algebra and Algebraic
Geometry. Springer, 1998
@end itemize

@subheading Descriptions of algorithms
@itemize @bullet
@item
Bareiss, E.:
Sylvester's identity and multistep integer-preserving Gaussian elimination.
Math. Comp. 22 (1968), 565-578

@item
Campillo, A.: Algebroid curves in positive characteristic. SLN 813, 1980

@item
Chou, S.:
Mechanical Geometry Theorem Proving.
D.Reidel Publishing Company, 1988

@item
Decker, W.; Greuel, G.-M.; Pfister, G.:
Primary decomposition: algorithms and
comparisons.  Preprint, Univ. Kaiserslautern, 1998.
To appear in: Greuel, G.-M.; Matzat, B. H.; Hiss, G. (Eds.),
Algorithmic Algebra and Number Theory. Springer Verlag, Heidelberg, 1998

@item
Decker, W.; Greuel, G.-M.; de Jong, T.; Pfister, G.:
The normalization: a new algorithm,
implementation and comparisons. Preprint, Univ. Kaiserslautern, 1998

@item
Decker, W.; Heydtmann, A.; Schreyer, F. O.: Generating a Noetherian Normalization of
the Invariant Ring of a Finite Group, 1997, to appear in Journal of
Symbolic Computation

@item
@tex
Faug\`ere,
@end tex
@ifinfo
Faugere,
@end ifinfo
J. C.; Gianni, P.; Lazard, D.; Mora, T.: Efficient computation
of zero-dimensional
Gr@"obner bases by change of ordering. Journal of Symbolic Computation, 1989

@item
Gr@"abe, H.-G.: On factorized Gr@"obner bases, Univ. Leipzig, Inst. f@"ur
Informatik, 1994

@item
Grassmann, H.; Greuel, G.-M.; Martin, B.; Neumann,
W.; Pfister, G.; Pohl, W.; Sch@"onemann, H.; Siebert, T.:  On an
implementation of standard bases and syzygies in  @sc{Singular}.
Proceedings of the Workshop  Computational Methods in Lie theory in AAECC (1995)

@item
Greuel, G.-M.; Pfister, G.:
Advances and improvements in the theory of standard bases and
syzygies. Arch. d. Math. 63(1995)

@item
Kemper; Generating Invariant Rings of Finite Groups over Arbitrary
Fields. 1996, to appear in Journal of Symbolic Computation

@item
Kemper and Steel: Some Algorithms in Invariant Theory of Finite Groups. 1997

@item
Lee, H.R.; Saunders, B.D.: Fraction Free Gaussian Elimination for
Sparse Matrices. Journal of Symbolic Computation (1995) 19, 393-402

@item
Sch@"onemann, H.:
Algorithms in @sc{Singular},
Reports on Computer Algebra 2(1996), Kaiserslautern

@item
Siebert, T.:
On strategies and implementations for computations of free resolutions.
Reports on Computer Algebra 8(1996), Kaiserslautern

@item
Wang, D.:
Characteristic Sets and Zero Structure of Polynomial Sets.
Lecture Notes, RISC Linz, 1989
@end itemize


code:
@comment -*-texinfo-*-
@comment This file was generated by doc2tex.pl from pdata.doc
@comment DO NOT EDIT DIRECTLY, BUT EDIT pdata.doc INSTEAD
@comment Id: pdata.tex,v 1.1 2003/08/08 14:27:06 pertusus Exp $
@comment this file contains the "Polynomial data" appendix.

@c The following directives are necessary for proper compilation
@c with emacs (C-c C-e C-r).  Please keep it as it is.  Since it
@c is wrapped in `@ignore' and `@end ignore' it does not harm `tex' or
@c `makeinfo' but is a great help in editing this file (emacs
@c ignores the `@ignore').
@ignore
%**start
\input texinfo.tex
@setfilename pdata.hlp
@node Top, Polynomial data
@menu
* Polynomial data::
@end menu
@node Polynomial data, Examples, Mathematical background, Top
@chapter Polynomial data
%**end
@end ignore

@menu
* Representation of mathematical objects::
* Monomial orderings::
@end menu

@c -----------------------------------------------------------------
@node Representation of mathematical objects,Monomial orderings,,Polynomial data
@section Representation of mathematical objects
@cindex mathematical objects
@cindex representation, math objects

@sc{Singular} distinguishes between objects which do not belong to a ring
and those which belong to a specific ring (see @ref{Rings and orderings}).
We comment only on the latter ones.

Internally all ring-dependent objects are polynomials or structures built from
polynomials (and some additional information).
Note that @sc{Singular} stores (and hence prints) a polynomial automatically
w.r.t@:. the monomial ordering.

Hence, in order to define such an object in @sc{Singular},
one has to give a list of polynomials in a specific format.

For ideals, resp.@: matrices, this is straight forward:
The user gives a list of polynomials
which generate the ideal, resp.@: which are the entries of the matrix.
(The number of rows and columns has to be given when creating the matrix.)

A vector  in @sc{Singular} is always an element of a free module over the
basering. It is given as a list of polynomials in one of the following
formats
@tex
$[f_1,...,f_n]$ or $f_1*gen(1)+...+f_n*gen(n)$, where $gen(i)$
@end tex
@ifinfo
[f_1,...,f_n] or f_1*gen(1)+...+f_n*gen(n), where gen(i)
@end ifinfo
denotes the i-th canonical generator of a free module (with 1 at place i and
0 everywhere else).
Both forms are equivalent. A vector is internally represented in
the second form with the
@tex
$gen(i)$
@end tex
@ifinfo
gen(i)
@end ifinfo
being "special" ring variables, ordered accordingly to the monomial ordering.
Therefore, the form
@tex
$[f_1,...,f_n]$
@end tex
@ifinfo
[f_1,...,f_n]
@end ifinfo
is given as output only if the monomial ordering gives priority to the
component, i.e@:., is of the form @code{(c,...)} (see @ref{Module
orderings}).  However, in any case the procedure @code{show} from the
library @code{inout.lib} displays the bracket format.

A vector
@tex
$v=[f_1,...,f_n]$
@end tex
@ifinfo
v=[f_1,...,f_n]
@end ifinfo
should always be considered as a column vector in a free module
of rank equal to
@tex
nrows($v$)
@end tex
@ifinfo
nrows(v)
@end ifinfo
where
@tex
nrows($v$)
@end tex
@ifinfo
nrows(v)
@end ifinfo
is equal to the maximal index
@tex
$r$
@end tex
@ifinfo
r
@end ifinfo
such that
@tex
$f_r \not= 0$.
@end tex
@ifinfo
f_r<>0.
@end ifinfo
This is due to the fact, that internally
@tex
$v$
@end tex
@ifinfo
v
@end ifinfo
is a polynomial in a sparse representation, i.e.,
@tex
$f_i*gen(i)$
@end tex
@ifinfo
f_i*gen(i)
@end ifinfo
is not stored if
@tex
$f_i=0$
@end tex
@ifinfo
f_i=0
@end ifinfo
(for reasons of efficiency), hence the last 0-entries of
@tex
$v$
@end tex
@ifinfo
v
@end ifinfo
are lost.
Only more complex structures are able to keep the rank.

A module
@tex
$M$
@end tex
@ifinfo
M
@end ifinfo
in @sc{Singular} is given by a list of vectors
@tex
$v_1,...,v_k$
@end tex
@ifinfo
v_1,....v_k
@end ifinfo
which generate the module as a submodule of the free module of rank
equal to
@tex
nrows($M$)
@end tex
@ifinfo
nrows(M)
@end ifinfo
which is the maximum of
@tex
nrows($v_i$).
@end tex
@ifinfo
nrows(v_i).
@end ifinfo

If one wants to create a module with a larger rank than given by its
generators, one has to use the command @code{attrib(M,"rank",r)} (see
@ref{attrib}, @ref{nrows}) or to define a matrix first, then converting it
into a module.  Modules in @sc{Singular} are almost the same as
matrices, they may be considered as sparse representations of matrices.
A module of a matrix is generated by the columns of the matrix and a
matrix of a module has as columns the generators of the module.  These
conversions preserve the rank and the number of generators, resp@:. the
number of rows and columns.

By the above remarks it might appear that @sc{Singular} is only able to handle
submodules of a free module. However, this is not true. @sc{Singular}
can compute with any finitely generated module over the basering
@tex
$R$.
@end tex
@ifinfo
R.
@end ifinfo
Such a module, say
@tex
$N$,
@end tex
@ifinfo
N,
@end ifinfo
is not represented by its generators but by its
(generators and) relations. This means that
@tex
$N = R^n/M$ where $n$
@end tex
@ifinfo
N = R^n/M where n
@end ifinfo
is the number of generators of
@tex
$N$ and $M \subseteq R^n$
@end tex
@ifinfo
N and M in R^n
@end ifinfo
is the module of relations.
In other words, defining  a module
@tex
$M$
@end tex
@ifinfo
M
@end ifinfo
as a submodule of a free module
@tex
$R^n$
@end tex
@ifinfo
R^n
@end ifinfo
can also be considered as the definition of
@tex
$N = R^n/M$.
@end tex
@ifinfo
N=R^n/M.
@end ifinfo

Note that most functions, when applied to a module
@tex
$M$,
@end tex
@ifinfo
M,
@end ifinfo
really deal with
@tex
$M$.
@end tex
@ifinfo
M.
@end ifinfo
However, there are some functions which deal with
@tex
$N = R^n/M$ instead of $M$.
@end tex
@ifinfo
N=R^n/M instead of M.
@end ifinfo

For example, @code{std(M)} computes a standard basis of
@tex
$M$
@end tex
@ifinfo
M
@end ifinfo
(and thus gives another representation of
@tex
$N$ as $N = R^n/$std($M$)).
@end tex
@ifinfo
N as N=R^n/std(M)).
@end ifinfo
However, @code{dim(M)}, resp.@: @code{vdim(M)}, returns
@tex
dim$(R^n/M)$, resp.@: dim$_k(R^n/M)$
@end tex
@ifinfo
dim(R^n/M), resp.@: dim_k(R^n/M)
@end ifinfo
(if M is given by a standard basis).

The function @code{syz(M)}  returns the first syzygy module of
@tex
$M$,
@end tex
@ifinfo
M,
@end ifinfo
i.e@:., the module
of relations of the given generators of
@tex
$M$
@end tex
@ifinfo
M
@end ifinfo
which is equal to the second syzygy module of
@tex
$N$.
@end tex
@ifinfo
N.
@end ifinfo
Refer to the description of each function in
@ref{Functions} to get information which module the function deals with.

The numbering in @code{res} and other commands for computing resolutions
refers to a resolution of
@tex
$N = R^n/M$
@end tex
@ifinfo
N=R^n/M
@end ifinfo
(see @ref{res}; @ref{Syzygies and resolutions}).

It is possible to compute in any field which is a valid ground field in
@sc{Singular}.  For doing so, one has to define a ring with the desired
ground field and at least one variable. The elements of the field are of
type number, but may also be considered as polynomials (of degree
0). Large computations should be faster if the elements of the field are
defined as numbers.

The above remarks do also apply to quotient rings. Polynomial data are
stored internally in the same manner, the only difference is that this
polynomial representation is in general not unique. @code{reduce(f,std(0))}
computes a normal form of a polynomial f in a quotient ring (cf.@:
@ref{reduce}).

@c -----------------------------------------------------------------
@node Monomial orderings,,Representation of mathematical objects,Polynomial data
@section Monomial orderings
@cindex Monomial orderings

@menu
* Introduction to orderings::
* General definitions for orderings::
* Global orderings::
* Local orderings::
* Module orderings::
* Matrix orderings::
* Product orderings::
* Extra weight vector::
@end menu

@c --------------------------------------------------------------------------
@node Introduction to orderings, General definitions for orderings, , Monomial orderings
@subsection Introduction to orderings
@cindex orderings introduction
@cindex term orderings introduction
@cindex monomial orderings introduction

@sc{Singular} offers a great variety of monomial orderings which provide
an enormous functionality, if used diligently. However, this
flexibility might also be confusing for the novice user.  Therefore, we
recommend to those not familiar with monomial orderings to generally use
the ordering @code{dp} for computations in the polynomial ring
@tex
$K[x_1,\ldots,x_n]$,
@end tex
@ifinfo
K[x1,...,xn],
@end ifinfo
resp.@:  @code{ds} for computations in the localization
@tex
$\hbox{Loc}_{(x)}K[x_1,\ldots,x_n]$.
@end tex
@ifinfo
Loc_(x)K[x1,...,xn].
@end ifinfo

For inhomogeneous input ideals,  standard (resp.@: groebner) bases
computations are generally faster
with the orderings
@tex
$\hbox{Wp}(w_1, \ldots, w_n)$
@end tex
@ifinfo
Wp(w_1, ..., w_n)
@end ifinfo
(resp.@:
@tex
$\hbox{Ws}(w_1, \ldots, w_n)$)
@end tex
@ifinfo
Ws(w_1, ..., w_n))
@end ifinfo
if the input is quasihomogeneous w.r.t. the weights
@tex
$w_1$, $\ldots$, $w_n$ of $x_1$, $\ldots$, $x_n$.
@end tex
@ifinfo
w_1, ..., w_n of x_1, ..., x_n.
@end ifinfo

If the output needs to be "triangular" (resp.@: "block-triangular"), the
lexicographical ordering @code{lp} (resp.@: lexicographical
block-orderings) need to be used. However, these orderings usually
result in much less efficient computations.

@c --------------------------------------------------------------------------
@node General definitions for orderings, Global orderings, Introduction to orderings, Monomial orderings
@subsection General definitions for orderings
@cindex orderings
@cindex term orderings
@cindex monomial orderings

@tex
A monomial ordering (term ordering) on $K[x_1, \ldots, x_n]$ is
a total ordering $<$ on the
set of monomials (power products) $\{x^\alpha \mid \alpha \in \bf{N}^n\}$
which is compatible with the
natural semigroup structure, i.e., $x^\alpha < x^\beta$ implies $x^\gamma
x^\alpha < x^\gamma x^\beta$ for any $\gamma \in \bf{N}^n$.
We do not require
$<$ to be  a well ordering.
@end tex
@ifinfo
A monomial ordering (term ordering) on K[x_1, ..., x_n] is
a total ordering < on the
set of monomials (power products) @{x^a | a in N^n@}
which is compatible with the
natural semigroup structure, i.e., x^a < x^b implies x^c*x^a < x^c*x^b for any
c in N^n.
We do not require
< to be  a well ordering.
@end ifinfo
@ifset singularmanual
 See the literature cited in @ref{References}.
@end ifset

It is known that any monomial ordering can be represented by a matrix
@tex
$M$ in $GL(n,R)$,
@end tex
@ifinfo
M in GL(n,R),
@end ifinfo
but, of course, only integer coefficients are of relevance in
practice.

@tex
Global orderings are well orderings (i.e.,  \hbox{$1 < x_i$} for each variable
$x_i$), local orderings satisfy $1 > x_i$ for each variable.   If some variables are ordered globally and others locally we
call it a mixed ordering.   Local or mixed orderings are not well orderings.

Let $K$ be the ground field, \hbox{$x = (x_1, \ldots, x_n)$} the
variables and $<$ a monomial ordering, then Loc $K[x]$ denotes the
localization of $K[x]$ with respect to the multiplicatively closed set $$\{1 +
g \mid g = 0 \hbox{ or } g \in K[x]\backslash \{0\} \hbox{ and }L(g) <
1\}.$$   Here, $L(g)$
denotes the leading monomial of $g$, i.e., the biggest monomial of $g$ with
respect to $<$.   The result of any computation which uses standard basis
computations has to be interpreted in Loc $K[x]$.
@end tex
@ifinfo
Global orderings are well orderings (i.e., 1 < x_i for each variable
x_i), local orderings satisfy 1 > x_i for each variable.
If some variables are ordered globally and others locally we
call it a mixed ordering.   Local or mixed orderings are not well orderings.

If K is the ground field, x = (x_1, @dots{}, x_n) the
variables and < a monomial ordering, then Loc K[x] denotes the
localization of K[x] with respect to the multiplicatively closed set @{1 +
g | g = 0 or g in K[x]\@{0@} and L(g) < 1@}.   L(g)
denotes the leading monomial of g, i.e., the biggest monomial of g with
respect to <.   The result of any computation which uses standard basis
computations has to be interpreted in Loc K[x].
@end ifinfo

Note that the definition of a ring includes the definition of its
monomial ordering (see
@ref{Rings and orderings}). @sc{Singular} offers the monomial orderings
described in the following sections.

@c --------------------------------------------------------------------------
@node Global orderings, Local orderings, General definitions for orderings, Monomial orderings
@subsection Global orderings
@cindex Global orderings
@cindex orderings, global

@tex
For all these orderings: Loc $K[x]$ = $K[x]$
@end tex
@ifinfo
For all these orderings: Loc K[x] = K[x]
@end ifinfo

@table @asis
@item lp:
lexicographical ordering:
@cindex lp, global ordering
@cindex lexicographical ordering
@*
@ifinfo
x^a < x^b  <==> there is an i,  1 <= i <= n :
@* a_1 = b_1, @dots{}, a_(i-1) = b_(i-1), a_i < b_i.
@end ifinfo
@tex
$x^\alpha < x^\beta  \Leftrightarrow  \exists\; 1 \le i \le n :
\alpha_1 = \beta_1, \ldots, \alpha_{i-1} = \beta_{i-1}, \alpha_i <
\beta_i$.
@end tex
@item rp:
reverse lexicographical ordering:
@cindex rp, global ordering
@cindex reverse lexicographical ordering
@*
@ifinfo
x^a < x^b  <==> there is an i,  1 <= i <= n :
@*     a_n = b_n, @dots{}, a_(i+1) = b_(i+1), a_i > b_i.
@end ifinfo
@tex
$x^\alpha < x^\beta  \Leftrightarrow  \exists\; 1 \le i \le n :
\alpha_n = \beta_n,
    \ldots, \alpha_{i+1} = \beta_{i+1}, \alpha_i > \beta_i.$
@end tex
@item dp:
degree reverse lexicographical ordering:
@cindex degree reverse lexicographical ordering
@cindex dp, global ordering
@*
@ifinfo
let deg(x^a) = a_1 + @dots{} + a_n, then
@end ifinfo
@tex
let $\deg(x^\alpha) = \alpha_1 + \cdots + \alpha_n,$ then
@end tex
@ifinfo
@*x^a < x^b <==>
@* deg(x^a) < deg(x^b),
@* or
@* deg(x^a) = deg(x^b) and there exist an i, 1 <= i <= n:
@*     a_n = b_n, @dots{}, a_(i+1) = b_(i+1), a_i > b_i.
@end ifinfo
@tex
    $x^\alpha < x^\beta \Leftrightarrow \deg(x^\alpha) < \deg(x^\beta)$ or
@end tex
@iftex
@*
@end iftex
@tex
    \phantom{$x^\alpha < x^\beta \Leftrightarrow $}$ \deg(x^\alpha) =
    \deg(x^\beta)$ and $\exists\ 1 \le i \le n: \alpha_n = \beta_n,
    \ldots, \alpha_{i+1} = \beta_{i+1}, \alpha_i > \beta_i.$
@end tex
@item Dp:
degree lexicographical ordering:
@cindex degree lexicographical ordering
@cindex Dp, global ordering
@*
@ifinfo
let deg(x^a) = a_1 + @dots{} + a_n, then
@end ifinfo
@tex
let $\deg(x^\alpha) = \alpha_1 + \cdots + \alpha_n,$ then
@end tex
@ifinfo
@*x^a < x^b <==>
@* deg(x^a) < deg(x^b)
@* or
@* deg(x^a) = deg(x^b) and there exist an i, 1 <= i <= n:
@*     a_1 = b_1, @dots{}, a_(i-1) = b_(i-1), a_i < b_i.
@end ifinfo
@tex
    $x^\alpha < x^\beta \Leftrightarrow \deg(x^\alpha) < \deg(x^\beta)$ or
@end tex
@iftex
@*
@end iftex
@tex
    \phantom{ $x^\alpha < x^\beta \Leftrightarrow $} $\deg(x^\alpha) =
    \deg(x^\beta)$ and $\exists\ 1 \le i \le n:\alpha_1 = \beta_1,
    \ldots, \alpha_{i-1} = \beta_{i-1}, \alpha_i < \beta_i.$
@end tex
@item wp:
weighted reverse lexicographical ordering:
@cindex weighted reverse lexicographical ordering
@cindex wp, global ordering
@*
@ifinfo
 wp(w_1, @dots{}, w_n), w_i  positive integers,
@end ifinfo
@tex
let $w_1, \ldots, w_n$ be positive integers. Then ${\tt wp}(w_1, \ldots,
w_n)$
@end tex
 is defined as @code{dp}
 but with
@ifinfo
  deg(x^a) = w_1 a_1 + @dots{} + w_n a_n.
@end ifinfo
@tex
$\deg(x^\alpha) = w_1 \alpha_1 + \cdots + w_n\alpha_n.$
@end tex
@item Wp:
weighted lexicographical ordering:
@cindex weighted lexicographical ordering
@cindex WP, global ordering
@*
@ifinfo
 Wp(w_1, @dots{}, w_n), w_i  positive integers,
@end ifinfo
@tex
let $w_1, \ldots, w_n$ be positive integers. Then ${\tt Wp}(w_1, \ldots,
w_n)$
@end tex
 is defined as @code{Dp}
 but with
@ifinfo
  deg(x^a) = w_1 a_1 + @dots{} + w_n a_n.
@end ifinfo
@tex
$\deg(x^\alpha) = w_1 \alpha_1 + \cdots + w_n\alpha_n.$
@end tex
@end table
@c --------------------------------------------------------------------------
@node Local orderings, Module orderings, Global orderings, Monomial orderings
@subsection Local orderings
@cindex Local orderings
@cindex orderings, local

For ls, ds, Ds and, if the weights are positive integers, also for ws and
Ws,  we have
@ifinfo
Loc K[x] = K[x]_(x),
@end ifinfo
@tex
Loc $K[x]$ = $K[x]_{(x)}$,
@end tex
 the localization of
@tex
$K[x]$
@end tex
@ifinfo
K[x]
@end ifinfo
at the maximal ideal
@ifinfo
 (x_1, @dots{}, x_n).
@end ifinfo
@tex
\ $(x_1, ..., x_n)$.
@end tex

@table @asis
@item ls:
negative lexicographical ordering:
@cindex negative lexicographical ordering
@cindex ls, local ordering
@*
@ifinfo
x^a < x^b  <==> there is an i,  1 <= i <= n :
@* a_1 = b_1, @dots{}, a_(i-1) = b_(i-1), a_i > b_i.
@end ifinfo
@tex
$x^\alpha < x^\beta  \Leftrightarrow  \exists\; 1 \le i \le n :
\alpha_1 = \beta_1, \ldots, \alpha_{i-1} = \beta_{i-1}, \alpha_i >
\beta_i$.
@end tex
@item ds:
negative degree reverse lexicographical ordering:
@cindex negative degree reverse lexicographical ordering
@cindex ds, local ordering
@*
@ifinfo
let deg(x^a) = a_1 + @dots{} + a_n, then
@end ifinfo
@tex
let $\deg(x^\alpha) = \alpha_1 + \cdots + \alpha_n,$ then
@end tex
@ifinfo
@*x^a < x^b <==>
@* deg(x^a) > deg(x^b)
@* or
@* deg(x^a) = deg(x^b) and there exist an i, 1 <= i <= n:
@*     a_n = b_n, @dots{}, a_(i+1) = b_(i+1), a_i > b_i.
@end ifinfo
@tex
    $x^\alpha < x^\beta \Leftrightarrow \deg(x^\alpha) > \deg(x^\beta)$ or
@end tex
@iftex
@*
@end iftex
@tex
    \phantom{ $x^\alpha < x^\beta \Leftrightarrow$}$ \deg(x^\alpha) =
    \deg(x^\beta)$ and $\exists\ 1 \le i \le n: \alpha_n = \beta_n,
    \ldots, \alpha_{i+1} = \beta_{i+1}, \alpha_i > \beta_i.$
@end tex
@item Ds:
negative degree lexicographical ordering:
@cindex negative degree lexicographical ordering
@cindex Ds, local ordering
@*
@ifinfo
let deg(x^a) = a_1 + @dots{} + a_n, then
@end ifinfo
@tex
let $\deg(x^\alpha) = \alpha_1 + \cdots + \alpha_n,$ then
@end tex
@ifinfo
x^a < x^b <==>
@* deg(x^a) > deg(x^b)
@* or
@* deg(x^a) = deg(x^b) and there exist an i, 1 <= i <= n:
@*     a_1 = b_1, @dots{}, a_(i-1) = b_(i-1), a_i < b_i.
@end ifinfo
@tex
    $x^\alpha < x^\beta \Leftrightarrow \deg(x^\alpha) > \deg(x^\beta)$ or
@end tex
@iftex
@*
@end iftex
@tex
    \phantom{ $ x^\alpha < x^\beta \Leftrightarrow$}$ \deg(x^\alpha) =
    \deg(x^\beta)$ and $\exists\ 1 \le i \le n:\alpha_1 = \beta_1,
    \ldots, \alpha_{i-1} = \beta_{i-1}, \alpha_i < \beta_i.$
@end tex
@item ws:
(general) weighted reverse lexicographical ordering:
@cindex general weighted reverse lexicographical ordering
@cindex local weighted reverse lexicographical ordering
@cindex ws, local ordering
@*
@ifinfo
 ws(w_1, @dots{}, w_n), w_1
@end ifinfo
@tex
${\tt ws}(w_1, \ldots, w_n),\; w_1$
@end tex
 a nonzero integer,
@ifinfo
w_2,@dots{},w_n
@end ifinfo
@tex
$w_2,\ldots,w_n$
@end tex
 any integer (including 0),
 is defined as @code{ds}
 but with
@ifinfo
  deg(x^a) = w_1 a_1 + @dots{} + w_n a_n.
@end ifinfo
@tex
$\deg(x^\alpha) = w_1 \alpha_1 + \cdots + w_n\alpha_n.$
@end tex
@item Ws:
(general) weighted lexicographical ordering:
@cindex general weighted lexicographical ordering
@cindex local weighted lexicographical ordering
@cindex Ws, local ordering
@*
@ifinfo
 Ws(w_1, @dots{}, w_n), w_1
@end ifinfo
@tex
${\tt Ws}(w_1, \ldots, w_n),\; w_1$
@end tex
 a nonzero integer,
@ifinfo
w_2,@dots{},w_n
@end ifinfo
@tex
$w_2,\ldots,w_n$
@end tex
 any integer (including 0),
 is defined as @code{Ds}
 but with
@ifinfo
  deg(x^a) = w_1 a_1 + @dots{} + w_n a_n.
@end ifinfo
@tex
$\deg(x^\alpha) = w_1 \alpha_1 + \cdots + w_n\alpha_n.$
@end tex
@end table

@c --------------------------------------------------------------------------
@node Module orderings, Matrix orderings, Local orderings, Monomial orderings
@subsection Module orderings
@cindex Module orderings

@sc{Singular} offers also orderings on the set of ``monomials''
@ifinfo
@{ x^a*gen(i) | a in N^n, 1 <= i <= r @} in Loc K[x]^r = Loc K[x]gen(1)
+ @dots{} + Loc K[x]gen(r), where gen(1), @dots{}, gen(r) denote the canonical
generators of Loc K[x]^r, the r-fold direct sum of Loc K[x].
@end ifinfo
@tex
$\{ x^a e_i  \mid  a \in N^n, 1 \leq i \leq r \}$ in Loc $K[x]^r$ = Loc
$K[x]e_1
+ \ldots +$Loc $K[x]e_r$, where $e_1, \ldots, e_r$ denote the canonical
generators of Loc $K[x]^r$, the r-fold direct sum of Loc $K[x]$.
(The function {\tt gen(i)} yields $e_i$).
@end tex

We have two possibilities: either to give priority to the component of a
vector in
@ifinfo
Loc K[x]^r
@end ifinfo
@tex
 Loc $K[x]^r$
@end tex
or (which is the default in @sc{Singular}) to give priority
to the coefficients.
The orderings @code{(<,c)} and @code{(<,C)} give priority to the
coefficients; whereas
@code{(c,<)} and @code{(C,<)} give priority to the components.
@*Let < be any of the monomial orderings of
@tex
Loc $K[x]$
@end tex
@ifinfo
Loc K[x]
@end ifinfo
as above.

@table @asis
@item (<,C):
@cindex C, module ordering
@cindex module ordering C
@ifinfo
<_m = (<,C) denotes the module ordering (giving priority to the coefficients):
@* x^a*gen(i) <_m x^b*gen(j) <==>
@* x^a < x^b
@* or
@* x^a = x^b  and  i < j.
@end ifinfo
@tex
$<_m = (<,C)$ denotes the module ordering (giving priority to the coefficients):
@end tex
@*
@tex
\quad  \quad  $x^\alpha e_i <_m x^\beta e_j \Leftrightarrow x^\alpha <
x^\beta$ or ($x^\alpha = x^\beta $ and $ i < j$).
@end tex

@strong{Example:}
@smallexample
@c computed example Module_orderings pdata.doc:849
  ring r = 0, (x,y,z), ds;
  // the same as ring r = 0, (x,y,z), (ds, C);
  [x+y2,z3+xy];
@expansion{} x*gen(1)+xy*gen(2)+y2*gen(1)+z3*gen(2)
  [x,x,x];
@expansion{} x*gen(3)+x*gen(2)+x*gen(1)
@c end example Module_orderings pdata.doc:849
@end smallexample

@item (C,<):
@ifinfo
<_m = (C, <) denotes the module ordering (giving priority to the
component):
@* x^a*gen(i) <_m x^b*gen(j) <==>
@* i<j
@* or
@* i = j and x^a < x^b.
@end ifinfo
@tex
$<_m = (C, <)$ denotes the module ordering (giving priority to the component):
@end tex
@iftex
@*
@end iftex
@tex
\quad \quad   $x^\alpha e_i <_m x^\beta e_j \Leftrightarrow i < j$ or ($
i = j $ and $ x^\alpha < x^\beta $).
@end tex

@strong{Example:}
@smallexample
@c computed example Module_orderings_1 pdata.doc:879
  ring r = 0, (x,y,z), (C,lp);
  [x+y2,z3+xy];
@expansion{} xy*gen(2)+z3*gen(2)+x*gen(1)+y2*gen(1)
  [x,x,x];
@expansion{} x*gen(3)+x*gen(2)+x*gen(1)
@c end example Module_orderings_1 pdata.doc:879
@end smallexample

@item (<,c):
@cindex c, module ordering
@cindex module ordering c
@ifinfo
<_m = (<,c) denotes the module ordering (giving priority to the coefficients):
@* x^a*gen(i) <_m x^b*gen(j) <==>
@* x^a < x^b
@* or
@* x^a = x^b  and  i > j.
@end ifinfo
@tex
$<_m = (<,c)$ denotes the module ordering (giving priority to the coefficients):
@end tex
@iftex
@*
@end iftex
@tex
\quad \quad $x^\alpha e_i <_m x^\beta e_j \Leftrightarrow x^\alpha <
x^\beta$ or ($x^\alpha = x^\beta $ and $ i > j$).
@end tex

@strong{Example:}
@smallexample
@c computed example Module_orderings_2 pdata.doc:909
  ring r = 0, (x,y,z), (lp,c);
  [x+y2,z3+xy];
@expansion{} xy*gen(2)+x*gen(1)+y2*gen(1)+z3*gen(2)
  [x,x,x];
@expansion{} x*gen(1)+x*gen(2)+x*gen(3)
@c end example Module_orderings_2 pdata.doc:909
@end smallexample

@item (c,<):
@ifinfo
<_m = (c, <) denotes the module ordering (giving priority to the
component):
@* x^a*gen(i) <_m x^b*gen(j) <==>
@* i>j
@* or
@* i = j and x^a < x^b.
@end ifinfo
@tex
$<_m = (c, <)$ denotes the module ordering (giving priority to the component):
@end tex
@iftex
@*
@end iftex
@tex
\quad \quad   $x^\alpha e_i <_m x^\beta e_j \Leftrightarrow i > j$ or ($
i = j $ and $ x^\alpha < x^\beta $).
@end tex

@strong{Example:}
@smallexample
@c computed example Module_orderings_3 pdata.doc:938
  ring r = 0, (x,y,z), (c,lp);
  [x+y2,z3+xy];
@expansion{} [x+y2,xy+z3]
  [x,x,x];
@expansion{} [x,x,x]
@c end example Module_orderings_3 pdata.doc:938
@end smallexample
@end table

@ifinfo
The output of a vector v in K[x]^r with components v_1,
@dots{}, v_r has the format v_1 * gen(1) + @dots{} + v_r * gen(r)
@end ifinfo
@tex
The output of a vector $v$ in $K[x]^r$ with components $v_1,
\ldots, v_r$ has the format $v_1 * gen(1) + \ldots + v_r * gen(r)$
@end tex
(up to permutation) unless the ordering starts with @code{c}.
@ifinfo
In this case a vector is written as [v_1, @dots{}, v_r].
@end ifinfo
@tex
In this case a vector is written as $[v_1, \ldots, v_r]$.
@end tex
In all cases @sc{Singular} can read input in both formats.

@c --------------------------------------------------------------------------
@node Matrix orderings, Product orderings, Module orderings, Monomial orderings
@subsection Matrix orderings
@cindex Matrix orderings
@cindex orderings, M
@cindex M, ordering

Let
@tex
$M$
@end tex
@ifinfo
M
@end ifinfo
be an invertible
@tex
$(n \times n)$-matrix
@end tex
@ifinfo
(n x n)-matrix
@end ifinfo
 with integer coefficients and
@ifinfo
M_1, @dots{}, M_n the rows of M.
@end ifinfo
@tex
$M_1, \ldots, M_n$ the rows of $M$.
@end tex

The M-ordering < is defined as follows:
@*
@ifinfo
x^a < x^b <==> there exists an i: 1 <= i <= n :
M_1*a = M_1*b, @dots{}, M_(i-1)*a = M_(i-1)*b, M_i*a < M_i*b.
@end ifinfo
@tex
\quad \quad $x^a < x^b \Leftrightarrow \exists\  1 \leq i \leq n :
M_1 a = \; M_1 b, \ldots, M_{i-1} a = \; M_{i-1} b$ and $M_i a < \; M_i b$.
@end tex

Thus,
@ifinfo
x^a < x^b
if and only if M*a is smaller than M*b
@end ifinfo
@tex
$x^a < x^b$
if and only if $M a$ is smaller than $M b$
@end tex
with respect to the lexicographical ordering.

The following matrices represent (for 3 variables) the global and
local orderings defined above (note that the matrix is not uniquely determined
by the ordering):

@ifinfo
@table @asis
@item lp:
 1   0   0
@* 0   1   0
@* 0   0   1
@item dp:
 1   1   1
@* 0   0  -1
@* 0  -1   0
@item Dp:
 1   1   1
@* 1   0   0
@* 0   1   0
@item wp(1,2,3):
 1   2   3
@* 0   0  -1
@* 0  -1   0
@item Wp(1,2,3):
 1   2   3
@* 1   0   0
@* 0   1   0
@item ls:
-1   0   0
@* 0  -1   0
@* 0   0  -1
@item ds:
-1  -1  -1
@* 0   0  -1
@* 0  -1   0
@item Ds:
-1  -1  -1
@* 1   0   0
@* 0   1   0
@item ws(1,2,3):
-1  -2  -3
@* 0   0  -1
@* 0  -1   0
@item Ws(1,2,3):
-1  -2  -3
@* 1   0   0
@* 0   1   0
@end table
@end ifinfo
@tex

$\quad$ lp:
$\left(\matrix{
 1 & 0 & 0 \cr
 0 & 1 & 0 \cr
 0 & 0 & 1 \cr
 }\right)$
\quad dp:
$\left(\matrix{
 1 & 1 & 1 \cr
 0 & 0 &-1 \cr
 0 &-1 & 0 \cr
 }\right)$
\quad Dp:
$\left(\matrix{
 1 & 1 & 1 \cr
 1 & 0 & 0 \cr
 0 & 1 & 0 \cr
 }\right)$

$\quad$ wp(1,2,3):
$\left(\matrix{
 1 & 2 & 3 \cr
 0 & 0 &-1 \cr
 0 &-1 & 0 \cr
 }\right)$
\quad Wp(1,2,3):
$\left(\matrix{
 1 & 2 & 3 \cr
 1 & 0 & 0 \cr
 0 & 1 & 0 \cr
 }\right)$

$\quad$ ls:
$\left(\matrix{
-1 & 0 & 0 \cr
 0 &-1 & 0 \cr
 0 & 0 &-1 \cr
 }\right)$
\quad ds:
$\left(\matrix{
-1 &-1 &-1 \cr
 0 & 0 &-1 \cr
 0 &-1 & 0 \cr
 }\right)$
\quad Ds:
$\left(\matrix{
-1 &-1 &-1 \cr
 1 & 0 & 0 \cr
 0 & 1 & 0 \cr
 }\right)$

$\quad$ ws(1,2,3):
$\left(\matrix{
-1 &-2 &-3 \cr
 0 & 0 &-1 \cr
 0 &-1 & 0 \cr
 }\right)$
\quad Ws(1,2,3):
$\left(\matrix{
-1 &-2 &-3 \cr
 1 & 0 & 0 \cr
 0 & 1 & 0 \cr
 }\right)$
@end tex

Product orderings (see next section) represented by  a matrix:

@ifinfo
@table @asis
@item (dp(3), wp(1,2,3)):
1  1  1  0  0  0
@*0  0  -1  0  0  0
@*0  -1  0  0  0  0
@*0  0  0  1  2  3
@*0  0  0  0  0  -1
@*0  0  0  0  -1  0
@item (Dp(3), ds(3)):
1  1  1  0  0  0
@*1  0  0  0  0  0
@*0  1  0  0  0  0
@*0  0  0  -1  -1  -1
@*0  0  0  0  0  -1
@*0  0  0  0  -1  0
@end table
@end ifinfo
@tex
$\quad$ (dp(3), wp(1,2,3)):
$\left(\matrix{
1&  1&  1&  0&  0&  0 \cr
0&  0&  -1&  0&  0&  0 \cr
0&  -1&  0&  0&  0&  0 \cr
0&  0&  0&  1&  2&  3 \cr
0&  0&  0&  0&  0&  -1 \cr
0&  0&  0&  0&  -1&  0 \cr
 }\right)$

$\quad$ (Dp(3), ds(3)):
$\left(\matrix{
1&  1&  1&  0&  0&  0 \cr
1&  0&  0&  0&  0&  0 \cr
0&  1&  0&  0&  0&  0 \cr
0&  0&  0&  -1&  -1&  -1 \cr
0&  0&  0&  0&  0&  -1 \cr
0&  0&  0&  0&  -1&  0 \cr
 }\right)$
@end tex

Orderings with extra weight vector (see below) represented by  a matrix:

@ifinfo
@table @asis
@item (dp(3), a(1,2,3),dp(3)):
1  1  1  0  0  0
@*0  0  -1  0  0  0
@*0  -1  0  0  0  0
@*0  0  0  1  2  3
@*0  0  0  1  1  1
@*0  0  0  0  0  -1
@*0  0  0  0  -1  0
@item (a(1,2,3,4,5),Dp(3), ds(3)):
1  2  3  4  5  0
@*1  1  1  0  0  0
@*1  0  0  0  0  0
@*0  1  0  0  0  0
@*0  0  0  -1  -1  -1
@*0  0  0  0  0  -1
@*0  0  0  0  -1  0
@end table
@end ifinfo
@tex
$\quad$ (dp(3), a(1,2,3),dp(3)):
$\left(\matrix{
1&  1&  1&  0&  0&  0 \cr
0&  0&  -1&  0&  0&  0 \cr
0&  -1&  0&  0&  0&  0 \cr
0&  0&  0&  1&  2&  3 \cr
0&  0&  0&  1&  1&  1 \cr
0&  0&  0&  0&  0&  -1 \cr
0&  0&  0&  0&  -1&  0 \cr
 }\right)$

$\quad$ (a(1,2,3,4,5),Dp(3), ds(3)):
$\left(\matrix{
1&  2&  3&  4&  5&  0 \cr
1&  1&  1&  0&  0&  0 \cr
1&  0&  0&  0&  0&  0 \cr
0&  1&  0&  0&  0&  0 \cr
0&  0&  0&  -1&  -1&  -1 \cr
0&  0&  0&  0&  0 & -1 \cr
0&  0&  0&  0&  -1&  0 \cr
 }\right)$
@end tex

@*@strong{Example}:
@smallexample
@c computed example Matrix_orderings pdata.doc:1219
  ring r = 0, (x,y,z), M(1, 0, 0,   0, 1, 0,   0, 0, 1);
@c end example Matrix_orderings pdata.doc:1219
@end smallexample
@*which may also be written as:
@smallexample
@c computed example Matrix_orderings_1 pdata.doc:1225
  intmat m[3][3]=1, 0, 0, 0, 1, 0, 0, 0, 1;
  m;
@expansion{} 1,0,0,
@expansion{} 0,1,0,
@expansion{} 0,0,1
  ring r = 0, (x,y,z), M(m);
  r;
@expansion{} //   characteristic : 0
@expansion{} //   number of vars : 3
@expansion{} //        block   1 : ordering M
@expansion{} //                  : names    x y z
@expansion{} //                  : weights  1 0 0
@expansion{} //                  : weights  0 1 0
@expansion{} //                  : weights  0 0 1
@expansion{} //        block   2 : ordering C
@c end example Matrix_orderings_1 pdata.doc:1225
@end smallexample

If the ring has
@tex
$n$
@end tex
@ifinfo
n
@end ifinfo
variables and the matrix contains less than
@tex
$n \times n$
@end tex
@ifinfo
n x n
@end ifinfo
entries an error message is given, if there are more entries,
the last ones are ignored.

@strong{WARNING:} @sc{Singular}
does not check whether the matrix has full rank.   In such a case some
computations might not terminate, others might give a nonsense result.

Having these matrix orderings @sc{Singular} can compute standard bases for
any monomial ordering which is compatible with the natural semigroup structure.
In practice the global and local orderings together with block orderings should be
sufficient in most cases. These orderings are faster than the corresponding
matrix orderings, since evaluating a matrix product is time consuming.

@c --------------------------------------------------------------------------
@node Product orderings, Extra weight vector, Matrix orderings, Monomial orderings
@subsection Product orderings
@cindex Product orderings
@cindex orderings, product

Let
@ifinfo
x = (x_1, @dots{}, x_n) = x(1..n) and y = (y_1, @dots{}, y_m) =
y(1..m)
@end ifinfo
@tex
$x = (x_1, \ldots, x_n)$ and $y = (y_1, \ldots, y_m)$
@end tex
be two ordered sets of variables,
@ifinfo
<_1 a monomial
ordering on K[x] and <_2 a monomial ordering on K[y].   The product
ordering (or block ordering) < = (<_1,<_2) on K[x,y] is the following:
@*x^a y^b < x^A y^B <==>
@*x^a <_1 x^A
@*or
@*x^a = x^A  and  y^b <_2 y^B.
@end ifinfo
@iftex
@tex
$<_1$ a monomial
ordering on $K[x]$ and $<_2$ a monomial ordering on $K[y]$.   The product
ordering (or block ordering) $<\ := (<_1,<_2)$ on $K[x,y]$ is the following:
@end tex
@*
@tex
\quad \quad $x^a y^b < x^A y^B \Leftrightarrow x^a <_1 x^A $ or ($x^a =
x^A$ and $y^b <_2 y^B$).
@end tex
@end iftex

Inductively one defines the product ordering of more than two monomial
orderings.

In @sc{Singular}, any of the above global orderings, local orderings or matrix
orderings may be combined (in an arbitrary manner and length) to a product
ordering.   E.g., @code{(lp(3), M(1, 2, 3, 1, 1, 1, 1, 0, 0), ds(4),
ws(1,2,3))}
defines: @code{lp} on the first 3 variables, the matrix ordering
@code{M(1, 2, 3, 1, 1, 1, 1, 0, 0)} on the next 3 variables,
@code{ds} on the next 4 variables and
@code{ws(1,2,3)} on the last 3 variables.

@c --------------------------------------------------------------
@node Extra weight vector,  , Product orderings, Monomial orderings
@subsection Extra weight vector
@cindex Extra weight vector
@cindex a, ordering
@cindex orderings, a

@ifinfo
a(w_1, @dots{}, w_n),
@end ifinfo
@tex
${\tt a}(w_1, \ldots, w_n),\; $
@end tex
@ifinfo
w_1,@dots{},w_n
@end ifinfo
@tex
$w_1,\ldots,w_n$
@end tex
any integers (including 0), defines
@ifinfo
  deg(x^a) = w_1 a_1 + @dots{} + w_n a_n
@end ifinfo
@tex
$\deg(x^\alpha) = w_1 \alpha_1 + \cdots + w_n\alpha_n$
@end tex
and
@*
@ifinfo
deg(x^a) < deg(x^b) ==> x^a < x^b
@end ifinfo
@tex
    $$\deg(x^\alpha) < \deg(x^\beta) \Rightarrow x^\alpha < x^\beta,$$
@end tex
@ifinfo
@*
deg(x^a) > deg(x^b) ==> x^a > x^b.
@end ifinfo
@tex
    $$\deg(x^\alpha) > \deg(x^\beta) \Rightarrow x^\alpha > x^\beta. $$
@end tex
@*An extra weight vector does not define a monomial ordering by itself:
it can only be used in combination with other orderings
to insert an extra line of weights into the ordering
matrix.

@*@strong{Example}:
@smallexample
ring r = 0, (x,y,z),  (a(1,2,3),wp(4,5,2));
ring s = 0, (x,y,z),  (a(1,2,3),dp);
ring q = 0, (a,b,c,d),(lp(1),a(1,2,3),ds);
@end smallexample


code:
@comment -*-texinfo-*-
@comment This file was generated by doc2tex.pl from platform.doc
@comment DO NOT EDIT DIRECTLY, BUT EDIT platform.doc INSTEAD
@comment Id: platform.tex,v 1.1 2003/08/08 14:27:06 pertusus Exp $
@comment this file contains Release notes and various howto's

@c The following directives are necessary for proper compilation
@c with emacs (C-c C-e C-r).  Please keep it as it is.  Since it
@c is wrapped in `@ignore' and `@end ignore' it does not harm `tex' or
@c `makeinfo' but is a great help in editing this file (emacs
@c ignores the `@ignore').
@ignore
%**start
\input texinfo.tex
@setfilename platform.hlp
@node Installation and Platform Specifics
@menu
* Installation and Platform Specifics::
@end menu
@node Installation and Platform Specifics, Index, SINGULAR libraries, Top
@chapter Installation and Platform Specifics
%**end
@end ignore

@menu
* News and changes::
* Downloading instructions::
* Unix installation instructions::
* Windows installation instructions::
* Macintosh installation instructions::
@end menu

@c ----------------------------------------------------------
@node News and changes, Downloading instructions,,Release Notes
@section News and changes
@cindex news
@cindex changes

@include NEWS.texi

@c ----------------------------------------------------------
@node Downloading instructions, Unix installation instructions, News and changes, Release Notes
@section Downloading instructions
@cindex downloading
@cindex instructions, downloading
@cindex howto, download

@sc{Singular} is available as binary program for most common hard-
and software platforms. Release versions of @sc{Singular} can be
downloaded with ftp from our FTP site
@display
@uref{ftp://www.mathematik.uni-kl.de/pub/Math/Singular/},
@end display
or, using your favorite WWW browser, from
@display
@uref{http://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/}.
@end display

@include README_download.texi

@c ----------------------------------------------------------
@node Unix installation instructions, Windows installation instructions,Downloading instructions, Release Notes
@section Unix installation instructions
@cindex Unix installation
@cindex instructions, Unix installation
@cindex howto, install on Unix

@include INSTALL_unix.texi

@c ----------------------------------------------------------
@node Windows installation instructions, Macintosh installation instructions, Unix installation instructions, Release Notes
@section Windows installation instructions
@cindex Windows installation
@cindex instructions, Windows installation
@cindex howto, install on Windows

@include INSTALL_win.texi

@c ----------------------------------------------------------
@node Macintosh installation instructions,,Windows installation instructions, Release Notes
@section Macintosh installation instructions
@cindex Macintosh installation
@cindex instructions, Macintosh installation
@cindex howto, install on Macintosh

For the SINGULAR version for Mac OS X refer to the Unix section.
The SINGULAR version for Mac OS 9 is available as
`ftp://www.mathematik.uni-kl.de/pub/Math/Singular/MAC/classic/Singular-@value{VERSION}-html.sea.hqx'
(documentation) and
`ftp://www.mathematik.uni-kl.de/pub/Math/Singular/MAC/classic/Singular-@value{VERSION}-ppc-MPW.sea.hqx'
(binaries and libraries).  The file
`ftp://www.mathematik.uni-kl.de/pub/Math/Singular/MAC/classic/INSTALL_mac.txt'
gives details on how to finish the installation.

@include INSTALL_mac.texi