

%    \section{WHAT IS THIS CHAPTER ABOUT?}
 %   There are three top--of-the--top level procedures for
% calculating Gr\"{o}bner basis in the
% different situations. They are

%  \begin{itemize} {\bf
%  \item simple
%   \item ncpbhgroebner
%  \item modulehseries }
%  \end{itemize}

%  In every of them you have some choices. You can switch between
%  \begin{itemize}
%  \item commutative and noncommutative case
%  \item zero or prime characteristic
%  \item  screen or file input (output)
%  \end{itemize}

%  Besides that you may select
%  \begin{itemize}
%  \item type of information about series,
%  \item form of input (output),
%  \item ordering,
%  \item weights.   
%   \end{itemize}


%  There are three different mechanisms to do your choices:
%  either you call appropriate procedure, or you assign
%  some value to appropriate global variable or switch
%  a corresponding flag.
%   \begin{exm} For example \end{exm}
%   \begin{itemize}
%   \item the  call of  procedure

%   {\bf (noncommify)}

%   selects noncommutativity

%   \item the  assignment

%   {\bf (setq algoutmode 'alg)}

%   selects algebraic form as output

%   \item the flag switching 

%   {\bf (on  modlogarithms)}

%   selects a strategy of the calculations in the prime characteristic
%   using "logarithms tables."
%   \end{itemize}
 

% The following sections  should explain user how to use main procedures,
% variables and flags. First we explain main part of them by the examples
%  on the conceptual level, and then give a complete list in the
%  alphabetical order.
 
\section{The top--of--the--top level procedures}\label{procsimple}
\subsection {Procedure  {\bf simple}}

Procedure \index{simple} {\bf simple}  is already familiar to reader.
It can be applied both in the commutative and noncommutative
case. By default {\bf bergman} works in the commutative mode. To
turn off commutativity one need to call
\index{noncommify}

{\bf (noncommify)}

To return to the commutative case  it is sufficient to call \index{commify}

{\bf (commify)}

{\bf Simple} is called as a procedure with 0, 1, or 2 file names as
arguments (file names be given
in explicit form.) If you give no argument, the procedure assumes
that you want to give input in "algebraic form" (see below subsection
\ref{inputform}) and prompts
you for this. If you give arguments, and the first argument is the
name of an existing file, this is read, and it is assumed that it
(inter alia) contains the input (in one or another form).  If file
does not exists, procedure works as if there were 0 names. Note,
that if input file contains {\bf (noncommify)} or {\bf (commify),}
the procedure
will work in the corresponding mode (and save it after returning).

 If there
is a second argument, the output is put there. However, if there is
an existing file with this name, it is NOT overwritten and the
procedure inform you about its existence and finish its work
without doing something else.

{\bf Stagsimple} \index{stagsimple} works similarly, but calls on the Staggered linear basis
Algorithm With Substance (SAWS). It thus may only be used in the
commutative case. It takes 0, 1, 2, or 3 arguments; the last two
are for output of the s.a.w.s. deduced Gr\"{o}bner basis and for the
reduced Gr\"{o}bner basis, respectively. In some cases it works
more efficient than {\bf simple}.
%(see Chapter \ref{SAWS} about
%more details).

\subsection{Procedure {\bf ncpbhgroebner}}
{\bf Ncpbhgroebner} \index{ncpbhgroebner} always takes 4 arguments, which should evaluate to
 file
 names.
 The first file is the input file (which must exist).
 The second one  will be the Gr\"{o}bner basis output file. It must {\bf not
exist} before the call to {\bf ncpbhgroebner.}
 On the third and fourth files the double \index{Poincar\'{e} series}
 Poincar\'{e}-Betti series and
the \index{Hilbert series} Hilbert series of the associated monomial ring will be output.
Existing files are overwritten. The output will be done degree by
degree, whence you may read partial results while the calculations
continue (and interrupt the calculations without losing the lower
degree results). Note that the ring and its associated monomial
ring have the same Hilbert series, while the double Poincar\'{e}-Betti
series only fulfill a termwise inequality; due to the existence of
a certain spectral sequence, the coefficients in the P.-B. series
of the associated ring can never be less than the corresponding
coefficients for the `true' ring
%(read more in the Chapter
%\ref{MATH-APP} about mathematical details).

Note that default output mode is Lisp--mode, so do not forget to
change it if you don't like it using,  for example

{\bf (setq  algoutmode 'alg)}


\subsection{Procedure {\bf modulehseries}} \index{modulehseries}

{\bf Modulehseries} deals with Gr\"{o}bner basis and Hilbert series calculations
for non-commutative modules. It should be loaded by\\
{\bf (load hseries)}. \index{hseries}\\
It is made as a top level procedure based
on some other top level procedures: {\bf degreeoutprepare, groebnerinit,
groebnerkernel, groebnerfinish} \index{degreeoutprepare} \index{groebnerinit}
\index{groebnerkernel} \index{groebnerfinish} etc. It is called as a procedure with
0, 2, 3 or 4 file names as arguments. (It is a FEXPR, which means that
the file names be given in explicit form.) If you give no argument, the
procedure assumes that you want to give input in "algebraic form"  and prompts
you for this. If you give two arguments, both of them should be names
of existing files. It is assumed that they contain the input. The first
argument is to contain the value of maximal degree (indicated by
{\bf setq  maxdeg degree}), the number of module generators (giving by
\index{nmodgen} {\bf setq nmodgen number}), both ring and module generators and ring relations
only. The second argument contains module relations. 
If there is a third file it will be the Gr\"{o}bner basis output file.
On the fourth file the Hilbert series  will be output. Existing files are
overwritten. 

































































































