\documentclass[11pt]{article}
\newcommand{\bg}{Gr\"obner basis }
\newcommand{\gb}{Gr\"obner basis }
\newcommand{\hs}{Hilbert series }
\newcommand{\ps}{Poincar\'{e} series }
\newtheorem{exm}{Example\\}
\title{Bergman interface: technical details}
\date{}
\author{J\"{o}rgen Backelin,  Svetlana Cojocaru, Victor Ufnarovski}
\begin{document}
\maketitle



{\bf Question I}


\vspace{0.5cm} {\it What kind of objects you plan to work with?}

\begin{enumerate}
\item Graded, commutative.
\item Non-graded, commutative.
\item Graded, non-commutative. 
\item Non-graded, non-commutative.
\end{enumerate}

{\bf Actions}:

\begin{enumerate}
\item Settings: (setobjecttype ring) (commify). Skip questions II and III.
       Save the following information: it is permitted to compute \gb 
and Hilbert series only.

\item Non-graded, commutative. Ask about the homogenizing variable name:

\vspace{0.5cm} {\it Please, write the name for the homogenising variable 
or press  Enter if you don't need it.}\\

Save the answer. The name of the homogenising variable should be added
in the end of the variable list.
Settings: (setobjecttype ring)\\ 
(commify)\\
(homogeniseinput).\\
 Skip questions II and III.
 Save information: it is permitted to compute \gb and Hilbert  series only.
\item Graded, non-commutative. Ask about the homogenising variable name.
      Settings: (noncommify)
\item Non-graded, non-commutative. No setup. The only admissible 
procedure is rabbit, it makes all the necessary settings by itself.
Skip questions II,  III, IV. It is permitted to ask about characteristic, 
coefficients, variables. After these questions the specific rabbit dialog
starts.

\end{enumerate}

{\bf Question II}


\vspace{0.5cm} {\it Do you plan to work with} 

\begin{enumerate}
\item Rings only
\item Modules
\item Bimodules.
\end{enumerate}


{\bf Actions.}

\begin{enumerate}
\item Rings only: (setobjecttype ring)
\item Modules:     (setobjecttype module)
\item Bimodules:   (setobjecttype twomodules)
\end{enumerate}


{\bf Question III}



\vspace{0.5cm} {\it Do you plan to calculate}

\begin{enumerate}
\item \gb only
\item \gb and Anick resolution
\item \gb and Betti numbers
\item \gb, Anick resolution and Betti numbers.
\end{enumerate}

{\bf Actions}: No settings, save information only to use it after.

\vspace{0.5cm}
{\bf Question IV }


\vspace{0.5cm} {\it Which ordering do you plan to have by default?}

The answer variants will be yielded depending of the selections
made in questions I and III.

\begin{itemize}
\item If the variant ``commutative'' was selected, the following two variants
will be displayed:

1.DEG-REVLEX \\
2.DEG-LEX\\
{\bf Actions}: the corresponding ordering setup.
\item If the variants ``non-commutative, graded'' and \gb calculations only 
were selected, the following  variants will be displayed:

1.DEG-LEX\\  
2.ELIMLEFTLEX \\
3.INVELIMLEFTLEX\\

{\bf Actions}: the corresponding ordering setup:\\
(deglexify)\\
(elimorder)\\
(invelimorder)\\

\item If the question III was answered by a variant, different from the
``\gb only'' the question about ordering is skipped.\\
{\bf Actions}: (deglexify)

\item  If the variant``non-commutative, non-graded''  
was selected the question about ordering is skipped.

{\bf Actions}: setting (HOMOGELIMORDER)

\end{itemize}

\vspace{0.5cm}
{\bf Question V}
\vspace{0.5cm}

We come to this dialog from all of  the branches.
Depending on the answer on the Question II (type of object) we shall
ask:\\
1.The first question if the object type is  RING.\\
2.Both the first and second questions if the object type is MODULE\\
3.All three questions if TWOMODULES.

\vspace{0.5cm} {\it Please, write the names  for ring variables separated by 
commas if you want them to be fixed  or press Enter if you do not want to 
fix the names.}

\vspace{0.5cm} {\it Please, write the names  for right module variables 
separated by commas 
if you want them to be fixed  or press Enter if you do not want to fix the 
names.}

\vspace{0.5cm} {\it Please, write the names  for left module variables 
separated by commas 
if you want them to be fixed  or press Enter if you do not want to fix the 
names.}

{\bf Actions}: save the list of variables and use them to form the ``vars'' 
list. Don't forget to append the homogenising variable if it is was 
established.
Count the number of module variables (separately right and left).
Assign the corresponding value to the variables nrmodgen and nlmodgen by
(setq nrmodgen r) and (setq nlmodgen l), where $r$ is the number of 
the right module variables, $l$ is the number of the left module variables.

\vspace{0.5cm}
{\bf Question VI}

\vspace{0.5cm} {\it Do you want to assign weights?
If yes, write the weights separated by commas in the same order as the 
corresponding variables. 
If not, press Enter (all the weights will be equal to 1).}

This question will be asked if Question III was answered by \gb only.
In all another cases it should be skipped.

{\bf Action}: (setweights ...)

\vspace{0.5cm}
{\bf Question VII}

{\it Input the maximal degree of calculation or press Enter if there is no 
restrictions.}

Ask always. 

{\bf Action}: (setmaxdeg ...)

\vspace{0.5cm}
{\bf Question VIII}

Questions are asked always in correspondence with the interface document.

\vspace{0.5cm} {\it Input the characteristic you prefer to work with (zero or 
a prime number).}

If the answer was ``zero'' the next will be asked additionally.

\begin{enumerate} 
\item  Very short numbers only (one byte)
\item  Usual integers and rationals (one word)
\item  Probably long numbers.
\item  All type of numbers.
\end{enumerate}

If the selected characteristic p is larger than 2, the last question 
will be the following:

\vspace{0.5cm} {\it Do you want to use a logarithm table for the  
characteristic p?}
 
{\bf Action}: (on bignum) in the case of large numbers in characteristics zero.
(on modlogs) and (setmodulus p) in the case of prime characteristics.

\vspace{0.5cm}
{\bf Question VIII}

Will be asked if the Question 1 was answered by ``non-commutaive, non-graded''.

\vspace{0.5cm} {\it Please write the start value for jumps in rabbit 
(0 if you want to decide this during the session)}


\vspace{0.5cm} {\it Please write the step value for jumps in rabbit 
(0 if you want to decide this during the session)}


\vspace{0.5cm} {\it Please write the end value for jumps in 
rabbit (0 if you want to decide this during the session).}

{\bf Action}: Prepare a call: (rabbit startdeg stepdeg finishdeg) according
to answers.

\vspace{0.5cm}
{\bf Question IX}
\vspace{0.5cm} {\it Do you plan to calculate Hilbert series?:}

\begin{enumerate}
\item Yes.
\item No.
\end{enumerate}

{\bf Action}: Save the information, it will be used for the next questions.

{\bf Question IX}

\vspace{0.5cm} {\it Select the input format for relations:}

\begin{enumerate}

\item Lisp form.
\item Algebraic form.
\end{enumerate}

{\bf Action}: Set (lispforminput) or (algforminput) correspondingly.
Don't forget to put (lispforminputend) after the list of polynomials in
Lisp form.



{\bf Question X}


\vspace{0.5cm} {\it Select the output format for \gb}


\begin{enumerate}

\item Lisp form.
\item Algebraic form.
\item McCaulay algebraic form.
\end{enumerate}

{\bf Actions}: Set the variable algoutmode

\begin{enumerate}
\item (setalgoutmode lisp)
\item (setalgoutmode alg)
\item (setalgoutmode macaulay)

\end{enumerate}

{\bf Question XI}

If the ``commutative'' mode and Hilbert series calculations were selected
it is necessary to ask:

\vspace{0.5cm} {\it Select the output format for Hilbert series}


\begin{enumerate}
\item Power series
\item Rational function

{\bf Actions}: Nothing in the first  case. Save information in the case
the second variant was selected.

\end{enumerate}

{\bf Question XII}

\vspace{0.5cm} {\it What do you want before the calculations start?}

\begin{enumerate}
\item Suggest to change some options.
\item  Ask about the missing options only.
\item  Never ask, take all default options and missing ones from the
selected previous session.
\end{enumerate}

{\bf Actions}: save information and use it when the session starts.

{\bf Question XIII}

\vspace{0.5cm} {\it What do you want after the calculations?}


\begin{enumerate} 
\item Exit from bergman.
\item  Ask about new input and start new calculations.
\item  Suggest to change options before new calculations.
\item  Remain in Bergman  leaving dialog and waiting new LISP-command.
\end{enumerate}


{\bf Actions}: save information and use it when the session finishes.

{\bf Question XIV}

See the questions related to the input-output dialog in the interface 
document.

\end{document}

\section{Input dialog}


The user can predefine the source for input to skip the corresponding question
during the session. Possible choices are:

\vspace{0.5cm} {\it Please choose the source for the input:}


\begin{enumerate} 
\item Screen.
\item  File, including LISP-commands.
\item  File with the relations only.
\item  Batch file.
\end{enumerate}

The last one means that there will be a list of input files and their names
will be listed in some special batch file.

If the input will be not from the screen the name of the corresponding
file will be asked:

\vspace{0.5cm} {\it Write the name of the input  commands/relations/batch file if you
want to fix it or press the Enter if you prefer to decide this during 
the session.}



\section{Output dialog}


The user can also fix the name of the output files. Note that input 
in this case should be from the file too. The alternatives are the following.

\vspace{0.5cm} {\it Please choose the place for output:}


\begin{enumerate} 
\item On the screen only.
\item  In the files with the same name as input file with different extension.
\item  In the files with some fixed names.
\item  In the files with the names chosen during the session.
\end{enumerate}

Of course, you will be asked about the fixed names you want to use.

Beside that the following question is important:

\vspace{0.5cm} {\it What do you plan to do with the existing files:}


\begin{enumerate} 
\item  Overwrite them.
\item  Leave them unchanged and inform about it.
\item  Suggest to use another name or exit.
\item  Depends on the type of file.
\end{enumerate}

The last option means that the user starts the same dialog for every type
of output file (\gb file, Hilbert series file, Anick resolution etc.) 
separately.

\end{document}