% from 18.3.1992 hk
% user packages, universal GB 

\section{Universal Gr\"obner Bases} %----------

\index{universal Gr\"obner base}\index{Gr\"obner base! universal}
Universal Gr\"obner bases are ideal bases, which 
are Gr\"obner bases with respect to {\bf any} admissible 
term order. The problem is here to find algorithmically 
all different term orders on a given set of terms. 
We qoute from the introduction of \cite{Wei87a} who 
developed the theory. The implementation is based on an 
ALDES/SAC-2 program developed by \cite{Belka92}.  

A {\it universal Gr\"obner basis} is a finite basis
for a polynomial ideal that has the Gr\"obner property with respect
to all admissible term-orders. Let $R$ be a commutative polynomial
ring over a field $K$, or more generally a non-commutative polynomial
ring of solvable type over $K$ (see \cite{KW88}). We show, how to
construct and characterize left, right, two-sided, and reduced universal
Gr\"obner bases in $R$. Moreover, we extend the upper complexity bounds
in \cite{Wei88} to the construction of {\it universal} Gr\"obner
bases. Finally, we prove the stability of universal Gr\"obner bases
under specialization of coefficients.
All these results have counterparts for polynomial rings over
commutative regular rings (compare \cite{Wei87b}).

The construction of {\it Gr\"obner
bases} initiated in \cite{Buchb70} has proved to be of great
importance in the algorithmic theory of commutative polynomial ideals
(compare \cite{Buchb85,MM86}). Recently, the method and its
applications have been extended to one- and two-sided ideals in certain
non-commutative polynomial rings (see \cite{AL88,KW88};
compare also \cite{Mo85,Mo86} for an analysis of the
problem in general non-commutative polynomial rings).

In all these cases, the construction of a Gr\"obner basis depends on the
choice of an {\it admissible order} on the set $T$ of {\it terms}. In
many considerations -- and in all present implementations -- this
choice is restricted to a few basic types of admissible orders, such as
{\it pure lexicographic} and {\it total degree orders}. The set of $all$
such orders is, however, huge: It has the cardinality of the continuum.
An algebraic characterization of all these orders has been given in
\cite{Rob85}; more recently, the author has given an alternative
characterization in terms of linear forms with coefficients in a
finitely generated ordered field (see \cite{Wei87}). It is
particularly suitable for computational purposes.

As a consequence, only countably many admissible orders are decidable
(as binary relations), while the majority (continuum many) are
undecidable. So strictly speaking, the Buchberger method for constructing
Gr\"obner bases is {\it algorithmic} only {\it relative to the admissible
order} under consideration.          

This raises the following natural {\it question}: What is the nature of
the dependence of a Gr\"obner basis on an admissible order? In a
recent paper \cite{Schw88}, N. Schwartz proves some remarkable facts
concerning this question: He shows the existence of {\it universal
Gr\"obner bases}, i.e. of ideal bases that have the Gr\"obner property
({\it confluence} of the induced reduction relation) for {\it all}
admissible orders. Moreover, he shows that the Gr\"obner property
is locally constant under the Zariski topology on the space of admissible
orders. This means that if $G$ is a Gr\"obner basis with respect to
the admissible order $<$ then it is also a Gr\"obner bases for all
admissible orders $<'$ in some neighborhood of $<$. His
results are {\it totally non-constructive, and apply to commutative
polynomials only.}             

The {\it purpose of this note} is to prove corresponding facts for
the much more general situation of
non-commutative polynomial rings of solvable type
studied in \cite{AL88} and \cite{KW88}, and also for
commutative polynomial rings over commutative regular rings (see
\cite{Wei87b}). Moreover, our proofs yield {\it constructions} of
universal Gr\"obner bases together with {\it upper complexity bounds}
for these constructions. Our arguments are based on a use of {\it
K\"onig's tree lemma} in combination with the results in \cite{Wei75} 
and \cite{Wei87}, which in turn employ {\it logical compactness,
a decision procedure for algebraically closed fields, the
Tarski principle for real closed fields},
and the {\it polynomial time solvability of the restricted open
hemisphere problem} (see \cite{GJ78}, pp. 246, 339).

The most important {\it consequence} concerning the question posed
above is the following: Given a finite ideal basis $F$(in any of the
polynomial rings mentioned above); then all reduced (one- and
two-sided) Gr\"obner bases $G$ for the ideal generated by $F$, as well
as a (reduced) universal Gr\"obner basis for this ideal, can be
constructed using only finitely many decidable admissible orders,
that can be found effectively.

For {\it commutative polynomials over fields} this fact was proved by
a different method also in a recent preprint by \cite{MoRo88}; 
the special case of {\it two} variables
was solved independently by \cite{Sche87} as well.
Both papers have came to the author's attention only at the EUROCAL'87
conference, June 1987, -- well after completion of the research for
of the present note and the submission of its results.
(The note was first presented at a mathematical
colloquium, University of M\"unchen, January 1987.)

Our last result in this very general setting concerns the {\it
stability} of Gr\"obner bases and universal Gr\"obner bases {\it under
variation or specialization of the coefficients} in the given ideal
basis: We provide a `universal' construction of (universal)
Gr\"obner bases for ideal bases with indeterminate coefficients, and
show that the (universal) Gr\"obner bases resulting from specializations
of these coefficients in a field will be the same within a
Zariski-constructible set. For a very special case, a more specific
result in this direction has been presented at EUROCAL'87 by 
\cite{Gianni87} and \cite{Kalkb87}.
 
This ends the authors intruduction and 
we turn now to the discussion of an example. 

\subsection{Example} %-------------

The following is an example of an input data set 
for universal Gr\"obner bases. 
It can be read in with the known input command 
\begin{verbatim}
      IN("data set name").
\end{verbatim}
from the MAS prompt. 

The statement 
\begin{verbatim}
      UGBBIN(). 
\end{verbatim}
\index{UGBBIN}
calls the main routine of the universal Gr\"obner base package of 
Tijani Belkahia. All options and inputs are exactly the same as described 
in his ``Diplomarbeit'' \cite{Belka92}. 

The input consists of several parts, which are discussed in the sequel. 
\begin{enumerate} 
\item The first part consists of the variable 
      declaration `\verb/(u0,u1,u2)/'. 
      Note, that no term order is defined after the variable list. 
\item The next input part consists of a list of polynomials 
      which constitute the ideal base, 
      for which an universal Gr\"obner base 
      is requested. 
      The syntax of such a list is that of an distributive rational 
      polynomial list as described in section \ref{dip.alg}, 
      \ref{poly.ebnf}, algorithm \verb/DIRLRD/.
\item Then follows an optional part, which controls printing 
      of intermediate results.  
      \begin{description}
      \item[Y] Print information and intermediate results. 
      \item[N] Do not print information and intermediate results. 
      \end{description}
\item The last input is the string `\verb/EXEC UGB ../'. 
      Note, the required double period at the end of the string. 
      This string requestes the computations and options as described 
      in the following complete list. 
      \begin{description}
      \item[UGB] compute an universal Gr\"obner base. 
      \item[PUGB] compute an universal Gr\"obner base 
                  using precomputed linear forms of term orders. 
      \item[LF] compute all linear froms, i.e. all term orders 
                for the set of terms of the given input polynomials.  
      \item[PLF] compute all linear froms, i.e. all term orders 
                for the set of terms of the given input polynomials 
                using precomputed linear forms of term orders. 
      \end{description}
      Further explanations of the options are described 
      in \cite{Belka92}. 

      The precomputed linear forms are contained in some subdirectory 
      of the \verb/examples/ directory and are named 
      \verb/LINFORM.LADEi/, where \verb/i/ $=1,2,3,4$. 
      The algorithm tries to predict the number of required linear forms 
      which are read and used. But the prediction is in some cases 
      too pessimistic, 
      i.e. there are possibly much more precomputed linear forms 
      than required for the construction of an universal Gr\"obner base.
      So the usage of this option can slowdown the computation. 
      However, if the numbers of precomputed and required linear forms 
      agree the computation will be much faster using the 
      precomputed term orders (linear forms). 
\end{enumerate}


{\footnotesize %-------------------------
\begin{verbatim} 
      UGBBIN(). 
            (u0,u1,u2)

            (
            ( 2 u1**2 + u0**2 - u0 ),
            ( 2 u1 u2 + 2 u0 u1 - u1 ),
            ( 2 u2 + 2 u1 + u0 - 1 )
            )

            Y.
            EXEC UGB ..
\end{verbatim}
}

The output is the same (except for letter case) as of the 
ALDES/SAC-2 version.  

{\footnotesize %-------------------------
\begin{verbatim} 
       MAS: Die eingegebenen Polynome sind 

                 ( 2 u1**2 + u0**2 - u0 )                  
                 ( 2 u1 u2 +2 u0 u1 - u1 )                  
                 ( 2 u2 +2 u1 + u0 -1 )                  
        
       Zwischenausgaben ... JA
        
       Option ... UGB
        
       Die Liste der Terme als ganzzahlige Tupel ist 
        
       ((0,2,0),(0,0,2),(0,0,1),(1,1,0),(0,1,1),(0,1,0),(1,0,0),(0,0,0))
        
       Projektionen ...         
       Dimension ... 2        
       Gradschranke dieser Dimension ist 8        
       Dimension ... 1        
       Gradschranke dieser Dimension ist 4        
       Die berechneten Linearformen sind 31        
       Ordne die Polynome nach den Linearformen        
       Reduktionsschritt        
       es sind 2 neue Terme entstanden
        
       Projektionen ...         
       Dimension ... 2        
       Gradschranke dieser Dimension ist 6        
       Dimension ... 1        
       Gradschranke dieser Dimension ist 6        
       Die disjunkten Linearformen sind 59 Linearformen          
       Neue Linearformen entstanden                 
       Ordne die Polynome nach den neuen Linearformen        
       Es ist nur ein neuer Term entstanden
        
       Projektionen ...         
       Dimension ... 2        
       Gradschranke dieser Dimension ist 10        
       Dimension ... 1        
       Gradschranke dieser Dimension ist 6        
       Die disjunkten Linearformen sind 89 Linearformen          
       Neue Linearformen entstanden                
       Ordne die Polynome nach den neuen Linearformen        
       Es ist nur ein neuer Term entstanden
        
       Projektionen ...         
       Dimension ... 2        
       Gradschranke dieser Dimension ist 8        
       Dimension ... 1        
       Gradschranke dieser Dimension ist 8        
       Die disjunkten Linearformen sind 96 Linearformen          
       Neue Linearformen entstanden                 
       Ordne die Polynome nach den neuen Linearformen        
       Es ist nur ein neuer Term entstanden
        
       Projektionen ...         
       Dimension ... 2        
       Gradschranke dieser Dimension ist 6        
       Dimension ... 1        
       Gradschranke dieser Dimension ist 8        
       Die disjunkten Linearformen sind 111 Linearformen          
       Neue Linearformen entstanden                 
       Ordne die Polynome nach den neuen Linearformen
        
              ************************************        
                     Universelle Groebnerbasis        
              ************************************
        
                 ( 4 u0**2 u2 -4 u0 u2 +2/3 u0**2 -2/3 u0 )                  
                 ( 2 u0 u1 +2 u0**2 -2 u0 )                  
                 ( -6 u0**3 +10 u0**2 -4 u0 )                  
                 ( 4 u0 u1 +4 u0**2 -4 u0 )                  
                 ( 2 u2 +2 u1 + u0 -1 )                  
                 ( 2 u1 u2 +2 u0 u1 - u1 )                  
                 ( 2 u1**2 + u0**2 - u0 )                  
                 ( -4 u2**2 -6 u0 u2 +4 u2 -2 u0**2 +3 u0 -1 )         
                 ( -2 u0 u2 + u0**2 - u0 )                  
                 ( -12 u0**3 +20 u0**2 -8 u0 )                  
                 ( 6 u0**2 u1 -4 u0 u1 )
                  
       7 garbage collections, 1615139 cells reclaimed, in 1068 milliseconds.
       1699287 cells used, in 6023 milliseconds.
       256512 cells allocated. Total time 7091 milliseconds.
\end{verbatim}
}

This example needed less than 60 seconds 
on a PC 486/33/8 running OS/2 2.1. 
This is the end of the universal Gr\"obner base example. 


%\section{} %----------

%{\footnotesize %-------------------------
%\begin{verbatim} 
%\end{verbatim}
%}
%{\footnotesize %-------------------------
%\begin{verbatim} 
%\end{verbatim}
%}
