% from 18.3.1992 hk
% user packages non-com 

\section{Non-commutative Gr\"obner bases and centers} %----------

\label{ncaxiom.sec}
\index{computing in solvable polynomial rings}
\index{solvable polynomial ring, computing in}

In this section we discuss the background for a package which implements 
the theory of Kandri-Rody and Weispfenning \cite{KW88} 
(abbreviated by KW in the sequel). 
The implementation is based on an earlier 
implementation in the ALDES / SAC-2 system \cite{CoL80}.
For a treatment of the theory of solvable polynomial rings, 
including the case of non-commutative coefficient domains, 
and Gr\"obner bases see \cite{Kre92}. 

A solvable polynomial ring is an ordinary commutative polynomial ring 
$R = \K\lbrack X_1,$ $\ldots,$ $X_n\rbrack$
equipped with a new non-commutative multiplication $*$.
The field $\K$ is assumed to be commutative and to commute 
with the indeterminates $X_1, \ldots, X_n$.
The set $T$ of terms (power-products of indeterminates)
is supposed to be linearly ordered by an admissible order $<_T$ 
which is compatible with the new multiplication $*$. 
For a fixed term order $<_T$, $(R,*)$ is a
solvable polynomial ring if the following axioms are satisfied:

{\bf Axioms:} (KW 1.2.)
\label{isp.def}
\begin{enumerate}
\item $(R, 0, 1, +, -, *)$ is an associative ring with $1$.
\item For all $a, b \in \K$, $1 \le h \le i \le j \le k \le n$,
      $t \in T(X_i, \ldots, X_j)$,
      \begin{enumerate}
      \item $a*b t = b t * a = a b t$,
      \item $X_h * b t = b X_h t$,
      \item $b t * X_k = b t X_k$.
      \end{enumerate}
\item For all $1 \le i \le j \le n$ there exist 
      $0 \neq c_{ij} \in \K$ and $p_{ij} \in R$
      such that 
      $$X_j * X_i = c_{ij} X_i X_j + p_{ij}$$
      and $p_{ij} <_T X_i X_j$.
\end{enumerate}

For commutator relations $Q$ as in axiom (3), 
solvable polynomial rings will be denoted by 
$$
  R = \K\lbrace X_1, \ldots, X_n; Q \rbrace.
$$
By the following lemmas, the computation of the $*$-product 
is extended to arbitrary polynomials in $R$.
For the proofs and further details see the original work 
and \cite{Kre90}, \cite{Kre92}.

\begin{lemma}(KW 1.3.)
\label{icpr.lem}
Let $R = \K\lbrace X_1, \ldots, X_n, Q \rbrace$ be a solvable 
polynomial ring, let $1 \leq i \leq n$ and let
$f \in \K\lbrack X_1, \ldots, X_i \rbrack$,
$g \in \K\lbrack X_i, \ldots, X_n \rbrack$.
Then 
$$f * g = f \cdot g.$$
\end{lemma}

\begin{lemma}(KW 1.4.)
\label{ipr.lem}
Let $R = \K\lbrace X_1, \ldots, X_n, Q \rbrace$ be a solvable 
polynomial ring, 
let $<_T$ be a $*$-compatible admissible term order, 
and let $f, g \in R$. Then there exists an $h \in R$
such that 
$$ f * g = c \cdot f \cdot g + h$$
and $h <_T f \cdot g$. 
Moreover, $c$ and $h$ are uniquely determined by $f$ and $g$.
\end{lemma}
%Notation $c = fctr(f,g)$.

\index{implementation}
In the implementation we use an ordinary 
commutative distributive polynomial representation.
Actually the Distributive Polynomial System of 
\cite{GK83}, implemented in the SAC-2 / ALDES system is used.
The non-commutative product $*$ is defined via relations, 
which are elements of a free associative algebra. 
These relations are represented as triples $(u, v, p)$ of
(commutative) terms $u, v$ and a (commutative) polynomial $p$, 
such that $u*v = p$ and $p$ is of the form $c \cdot u \cdot v + p'$. 
Besides the defining relations between variables of the 
non-commutative product, many relations between powers of 
variables and terms are derived during computation. 
These relations are incrementaly stored in a so called relation table. 
Each time a product of terms is to be computed
the relation table is scanned for an applicable relation. 
Missing relations between variables are treated as if the 
two variables commute.

Using the non-commutative product algorithm, the input-routines 
for polynomials can be setup to respect the order of 
variables in the products. 
For the rest of the Gr\"obner base algorithms 
the existing ones from the Buchberger algorithm system of 
\cite{GK83a} could be used as a starting point.
However great care was inorder to assure that for no algorithm 
the input parameters where interchanged. 
Further the non-commutative product may modify the 
leading coefficients of the product polynomials,
so the order of computation steps had also to be checked. 
It is known, that not all criteria derived by Buchberger for 
the detection of unnecessary reductions are valid in the
non-commutative case. The valid criterion BBEC is 
implemented as in the commutative case and leads to
similar improvements of computing time.
The computation of two-sided Gr\"obner bases
uses an improved way of including right variable 
multiples during the main Buchberger loop instead of
iterating the left Buchberger algorithm on 
bases given by right variable multiples of polynomials.


\subsection{Relation Tables} %------------------ 

The non-commutative polynomials are represented as ordinary commutative
polynomials. A polynomial in distributive
representation is a list of so called exponent vectors and so called
base coefficients. The coefficient field \K\ is the field of 
rational numbers $\Q$ in the current implementation. 

The commutator relations from \ref{isp.def}(3) 
are implemented as triples of commutative polynomials.
More precisely a relation 
$X_j * X_i = c_{ij} X_i X_j + p_{ij}$
for some $1 \le i \le j \le n$ is
represented as triple
$$( X_j, X_i, c_{ij} X_i X_j + p_{ij})$$
of distributive polynomials.
Missing relations between variables are treated as if the relation 
$X_j * X_i = X_i X_j$ was specified,
that means as if a relation with 
$c_{ij} = 1$ and $p_{ij} = 0$ was defined.

The set of all commutator relations is stored in a list 
called {\em relation table}. 
So that in order to compute the product 
$X_j * X_i$ one has to look for a triple
starting with $(X_j,X_i,p)$ and 
the take the third polynomial in this triple.
\index{relation table}
\label{sec.rt}
The relation table must be maintained through 
recursive applications of the $*$-product algorithm 
and we want to use all computed 
relations to be accessible at any time 
during further recursive calls. 
This table is implemented as a list of
distributive polynomials:
\begin{displaymath}
  T = ( u_1, v_1, p_1, \ldots, u_t, v_t, p_t )
\end{displaymath}
where the $u_i = X_{j_i}^{e_i}$,
$v_i = X_{k_i}^{l_i}$ and
$p_i = c_i \cdot X_{k_i}^{l_i} \cdot X_{j_i}^{e_i} + p_i'$.
The table entries are partially ordered
with respect to divisibility
of the relation heads ($u_i,v_i$).

{\bf Definition:}
\label{rt.cond}
If $T$ is a relation table, then the following condition holds:
\begin{quote}
 for all $1 \leq i \leq t$ there does 
 not exist $1 \leq i < j \leq t$ such that 
      $u_i \ \vert \ u_j$ and $v_i \ \vert \ v_j$. 
\end{quote}
This means that heads which are `later' in the table may divide
relation heads, which come 'earlier' in the table.
If $T$ is empty at the beginning, 
in this case {\bf all} variables commute, then
no non-commuting relation will
ever be computed during \verb/DINPPR/ and $T$ will remain empty.
The search for a product relation goes from left
to right in the list so one finds a relation with maximal exponents.
The search is successful, if both exponents of $u_i$ and $v_i$
divide the exponents of the relation we look for.
If no relation matches, we assume the variables to commute,
i.e.\ we assume $c=1$ and $p=0$.


\subsection{Left and Two-sided Gr\"obner Bases} %------------

With the definition of a suitable (left/right) reduction 
most concepts of commutative Gr\"obner bases carry over to 
solvable polynomial rings.  
\index{left Gr\"obner base}\index{two-sided Gr\"obner base}
\index{Gr\"obner base! left}\index{Gr\"obner base! two-sided}


{\bf Definition:} (Left Reduction)
\label{htred.def}
Let $R$ be a solvable polynomial ring.
Let $p \in R$, $t \in T$. Then the {\em left reduction}
$\longrightarrow_{t,p} \ \subseteq \  R \times R$ 
is defined as follows:
\begin{quote}
      For $f, f' \in R$, $t \in T(f)$,  
      $f \longrightarrow_{t,p} f'$ iff  
      there exists $u \in T$ such that 
      $t = u \cdot \HT(p) = \HT(u*p)$ and 
      $$f' = f - a_u * u * p,$$
      where $a_u \in \K^*$ is the unique element of $\K^*$ 
      such that $\mbox{coeff}(t,f) = a_u * \mbox{coeff}(t,u*p)$. 
\end{quote}
By construction $t \not\in T(f')$.
If for certain $f$, $t$ no such $u$ exists, 
then $t$ in $T(f)$ is called {\em irreducible wrt.\ $p$}.

If the left reduction relation $\longrightarrow_G$ 
(for some finite subset $G \subset R$)  
is confluent, then $G$ is called a {\em left Gr\"obner base}.
And the following theorem indicates the construction of 
left Gr\"obner bases using left S-polynomials. 

\begin{theorem}
\label{lGB.theo}
Let $G$ be a finite subset of $R$, then the following
assertions are equivalent.
\begin{enumerate}
\item $G$ is a left Gr\"obner base.
\item For all $f \in \ideal_l(G)$, $f \longrightarrow_G^* 0$. 
\item For all $h \in H = \{ LSP(f,g) \ : \ f, g \in G, f \neq g \}$,
      $h \longrightarrow_G^* 0$.
\end{enumerate}
\end{theorem}

Let $\ideal_t(P)$ denote the two-sided ideal 
generated by $P \subseteq R$. 
The main key to the construction of two-sided Gr\"obner bases 
of two-sided ideals is contained in the following lemma. 

\begin{lemma}
\label{lrtgb.prop}
Let $G$ be a left Gr\"obner base in $R$, then 
$\ideal_l(G) = \ideal_t(G)$ implies 
$\ideal_r(G) = \ideal_t(G)$.
\end{lemma}

The construction of two-sided Gr\"obner bases 
using left Gr\"obner bases is indicated in the following theorem. 

\begin{theorem}
\label{tGB.theo}
Let $G$ be a finite subset of $R$. Then the following 
assertions are equivalent:
\begin{enumerate}
\item $G$ is a left Gr\"obner base and $\ideal_l(G) = \ideal_t(G)$,
\item For all $f \in R$ with $f \in \ideal_t(G)$: 
      $f \longrightarrow_G^* 0$,
\item $G$ is a left Gr\"obner base and 
      for all $1 \leq i \leq n$, $p \in G$: 
      $p * X_i \longrightarrow_G^* 0$,
\end{enumerate}
\end{theorem}


\subsubsection{Examples} %-----------------------

The algorithms have already been discussed in section 
\ref{ncalg.sec} and we continue with the discussion of examples. 
\label{ncex.sec}
The listing of an example is given in table \ref{masinp.exm}.  The
input of non-commutative polynomials consists of two steps:
\begin{enumerate}
\item the input of the commutator relations
      together with the list of variables of the 
      polynomial ring and the desired term order, 
\item the input of the non-commutative polynomials itself. 
\end{enumerate}

The commutator relations are a list of commuting polynomials
which are read by the MAS function \verb/PREAD/.
\verb/PREAD/ reads from the current input stream and 
returns a list of distributive rational polynomials in
internal representation. 
See section \ref{dip.alg} for more details on \verb/PREAD/. 
\verb/PREAD/ expects the following items:

The variable list: `\verb/(a, x, y)/'.
A variable name may consist of a alpha-numerical 
character sequence starting with a letter.
All variables occurring in the polynomials must be specified.

The desired term order: `\verb/L/'.
The term order may be one of the following:
\begin{description}
      \item[L] for the inverse lexicographical term order
      \item[G] for the inverse graduated term order
      \item[polynomial list] a list of univariate 
           (integral) polynomials in the 
           variable \verb/T/ (this name is fixed). 
           See \ref{dip.alg} for details.
\end{description}
There is no check if the term order is compatible 
with the commutator relations or if the
linear form defines an admissible term order. 

The commutator relations themselves:
`\verb/( y ), ( x ), ( x y + a )/'. This relation 
is interpreted as $y * x = x y + a$. 
Not specified relations are interpreted as if the 
variables commute. In this example $a$ commutes 
both with $x$ and $y$. 
The relations must be given as a list (!) of polynomial triples.

The second input consists of the non-commutative polynomials.
\verb/NPREAD/ takes as input a relation table and 
reads a list (!) of polynomials from the current input stream. 
The output is a list of distributive rational polynomials.
\verb/**/ denotes exponentiation, the multiplication 
operator \verb/*/ may be omitted.
That means \verb/x y/ denotes \verb/x * y/. 
All multiplications of variables mean the non-commutative $*$-product.
It is possible to specify also more complex polynomial
expressions. See \ref{poly.ebnf} for the accepted syntax.
Be sure to include enough parenthesis to avoid ambiguities.

\begin{table}[htp]
{\footnotesize
\begin{verbatim}
             (* Commutator relations: *)
             t:=PREAD().
             (a,x,y) L
             (
             ( y ), ( x ), ( x y + a ), 
             )
             PWRITE(t). 
 
             (* Non-commutative polynomials: *)
             p:=NPREAD(t).
             (
             ( y**3 + x**2 y + x y ),
             ( x**2 + x )
             )
             PWRITE(p).
 
             c:=LIRRSET(t,p). (* Left Normalform *) 
             PWRITE(c).
 
             c:=LGBASE(t,p,1). (* Left G-base *)
             PWRITE(c).
 
             c:=TSGBASE(t,p,1). (* Two sided G-base *)
             PWRITE(c).
\end{verbatim}
}
\caption{Computing example input}
\label{masinp.exm}
\end{table}

Next three of the above discussed algorithms are called. 
The produced output is shown in 
tables \ref{masolis.exm}, \ref{masolgb.exm} and \ref{masotgb.exm}. 
In any case the output polynomials are printed
to the current output stream with the procedure \verb/PWRITE/.
\verb/PWRITE/ prints the actual variable list, the actual term order and 
the list of polynomials, each polynomials starting on a new line.

\verb/LIRRSET/:
The input parameters are `\verb/t/' the relation table
and `\verb/p/' the polynomial list.
The output `\verb/c/' is the left irreducible 
set of the input, it is listed in table \ref{masolis.exm}. 

\begin{table}[htp]
\begin{verbatim}
      Polynomial in the variables: (a,x,y)
      Term ordering:  inverse lexicographical.
      Polynomial list: 
                (  y**3 -2 a x - a )
                (  x**2 + x )
\end{verbatim}
\caption{Computing example left irreducible set}
\label{masolis.exm}
\end{table}

\verb/LGBASE/:
The input parameters are `\verb/t/' the relation table,
`\verb/p/' the polynomial list and 
`\verb/1/' a trace flag.
The output `\verb/c/' is the left Gr\"obner base 
of the input, it is listed in table \ref{masolgb.exm}.
 
\begin{table}[htp]
\begin{verbatim}
      Polynomial in the variables: (a,x,y)
      Term ordering:  inverse lexicographical.
      Polynomial list: 
                  a**2 
                (  x**2 + x )
                  a y**2 
                (  y**3 -2 a x - a )
\end{verbatim}
\caption{Computing example left Gr\"obner base}
\label{masolgb.exm}
\end{table}

\verb/TSGBASE/:
The input parameters are `\verb/t/' the relation table
and `\verb/p/' the polynomial list.
The output `\verb/c/' is the two-sided Gr\"obner base 
of the input, it is listed in table \ref{masotgb.exm}.

\begin{table}[htp]
\begin{verbatim}
      Polynomial in the variables: (a,x,y)
      Term ordering:  inverse lexicographical.
      Polynomial list: 
                  a 
                (  x**2 + x )
                  y**3 
\end{verbatim}
\caption{Computing example two-sided Gr\"obner base}
\label{masotgb.exm}
\end{table}


Next we reproduce a summary table \ref{stat.tab} of computing times 
for several variants of the above algorithms on various machines. 
The systems and machines are ALDES on IBM 9370/VM, 
MAS on an Atari 1040 ST (8 Mhz), an PC AT/386SX (16 Mhz) 
and an IBM RS600/520 (20 Mhz).
The timings are obtained with a fresh list of commutator
relations in each case and not in the sequence suggested
by the above input listing.

`DINLGB, - irred.' means that the algorithm
did not compute a reduced (irreducible) left GB.
`DINLGB, + irred.' means that the algorithm
computed a reduced (irreducible) left GB.
`DINLGB, BBEC, + irr.' means that the algorithm
computed a reduced (irreducible) left GB and used the condition 
`BBEC' (Buchberger's criterion 2) to avoid unnecessary reductions.
In the later case $22$ polynomials have not been reduced according 
to the criterion from a total of $34$ S-polynomials.

The algorithms `DINCGB' and `DIN1GB' both compute two-sided reduced 
Gr\"obner Bases. `DIN1GB' denotes the MAS algorithm corresponding 
to the algorithm `GROEBNER' of \cite{KW88}. 
`DINCGB' is superior to `DIN1GB' due to the fact, 
that the polynomials $p * X_i$ are added to 
the base at the beginning of the computation, so much more
polynomials will be reducible later on.
`DINCGB, BBEC' means that the algorithm
computed a reduced (irreducible) two-sided GB and used the 
condition `BBEC' to avoid unnecessary reductions.
In the later case $9$ polynomials have not been reduced according 
to the criterion from a total of $14$ S-polynomials.


\begin{table}[htpb] \centering
\begin{tabular}{|l|r|r|r|r|} \hline
 Algorithm & IBM 9370/VM      & Atari ST & AT/386sx  & IBM RS6000 \\
           & ALDES/SAC-2      & MAS      & MAS          & MAS \\
\hline
 DINLIS               &  0.03   & $<$ 1.0  & $<$ 1.0    & 0.03 \\
 DINLGB, - irred.     &  1.47   &          &            & \\
 DINLGB, + irred.     &  1.47   &    18.0  &     13.0   & 1.30 \\
 DINLGB, BBEC + irr   &         &     6.0  &            & 0.47 \\
 DIN1GB               &  1.93   &          &            & \\
 DINCGB               &  0.58   &     8.0  &      5.0   & 0.45 \\
 DINCGB, BBEC         &         &     4.0  &            & 0.23 \\
\hline
\end{tabular}
\\
{\footnotesize
Computing time in seconds.
}
\caption{Computing Time Summary: Gr\"obner Bases}
\label{stat.tab}
\end{table}


\subsection{Center of solvable polynomial rings} %-------------

\newcommand{\Cen}{\mbox{\rm Cen}}
\label{cent.sec}\index{center}
The center of a solvable polynomial ring consists exactly of 
the polynomials which commute with all variables.
Further elements in the center may be computed and
non-commuting variables have only trivial centralizer 
in case the underlying ring has characteristic zero. 

Let \R\ be a (commutative) ring with $1$ over a field \K.
Let $S = \R \lbrace X_1, \ldots, X_n; Q \rbrace$ be a solvable polynomial 
ring over \R\ in the variables $X_1, \ldots, X_n$,
such that the coefficients commute with the variables
(i.e.\ $c_{ai} = 1$ and $p_{ai}= 0$ 
for $1 \leq i \leq n$, $0 \neq a \in \R$).


{\bf Definition:} \label{cen.def}
Let $S$ be a ring. The {\em center of $S$} is the 
set of all elements of $S$ which commute with all elements of $S$:
$$
   \Cen(S) = \{ a \in S \ : \
       a b = b a \mbox{ for all } b \in S \}.
$$
Let $I$ be a subset of $S$. The {\em centralizer of $I$ in $S$}
is the set of all elements of $S$ which commute with 
all elements of $I$:
$$
   \Cen_S(I) = \{ a \in S \ : \
       a b = b a \mbox{\rm \ for\  all\ } b \in I \}.
$$
\index{center}\index{centralizer}


\begin{proposition}
\label{center.prop}
Let $S = \R\lbrace X_1, \ldots, X_n; Q \rbrace$ be a 
solvable polynomial ring over a commutative field \R\ in the 
variables $X_1, \ldots, X_n$. Let $X = \{ X_1, \ldots, X_n \}$. 
Then 
$$
   \Cen(S) = \Cen_S(X).
$$
\end{proposition}

\index{computation! center}
\index{center! computation}

Proposition \ref{center.prop} provides a means to determine 
elements in the center up to any degree bound. 
One takes a polynomial $f$ with 
indeterminate coefficients, then a necessary and sufficient
condition for $f \in \Cen(S)$ 
is that $f$ must commute with all variables $X_i$, $i=1,\ldots,n$.
This gives a system of linear equations for the 
coefficients of $f$. Solving it answers the question 
if for some values of the coefficients $f \in \Cen(S)$. 


\begin{proposition}
\label{cenpol.prop}
Let $S = \R\lbrace X_1, \ldots, X_n; Q \rbrace$ be a 
solvable polynomial ring over \R\ in the variables $X_1, \ldots, X_n$. 
Let $X = \{ X_1, \ldots, X_n \}$. 

Given a finite set of terms T' = $\{ t_1, \ldots, t_k \}$ $k \in \N$
in $T(X_1,\ldots, X_n)$, then 
there is an algorithm, which decides if there is a polynomial 
$$
  f = \sum_{i=1}^{k} a_i t_i \   \in  \ \Cen(S)
$$
for some $a_i \in \R$, $1 \leq i \leq k$.
Moreover the algorithm determines all such polynomials. 
\end{proposition}

\subsubsection{Example: Centers of Enveloping Algebras} %--------------

We include some examples of the computation of centers of 
enveloping algebras of some finite dimensional Lie algebras 
over the rational numbers. 
The examples are taken from \cite{Pat76} and compared to their 
results. The enumeration of the Lie algebras is as follows:
$A_{i,j}$ denotes the $j$-th Lie algebra of dimension $i$.
The examples are contained in tables 
\ref{a32.exa}, \ref{a34.exa}, \ref{a39.exa}, \ref{a41.exa} 
and \ref{a61.exa}.
Note that we only present examples which 
have polynomial invariants. Actually there are also 
rational functions and analytical functions which are 
invariant under the commutator product of the Lie algebra 
(see example \ref{a32.exa}). 

In the examples we list 
\begin{enumerate} 
\item the defining commutator relations 
      of the enveloping algebra of a Lie algebra,
\item the statement for the generation of the terms, 
%      and the generated terms, 
\item the center polynomial with parametric 
      coefficients,
\item the specialized center polynomials, 
\item the computing time on an Atari 1040 ST.
\end{enumerate} 

The input syntax is as described in subsection \ref{ncex.sec}. 
\verb/CenterPol/ denotes the `driver' algorithm, 
which calls \verb/DINCCP/ and then specializes the 
coefficients to obtain a $\Q$-vectorspace basis of the center.
\verb/EVLGIL/ takes a list of exponents $(e_1, \ldots, e_n)$ and 
delivers a set of terms with exponents $(a_1, \ldots, a_n)$ 
with $0 \leq a_i \leq e_i$ for $1 \leq i \leq n$. 
\verb/EVLGTD/ has inputs $(n,d,E)$, where 
$n$ is the number of variables, $d$ is the total degree 
and $E$ is a list of already computed terms (used for 
internal recursion).
It returns a list $(E_0, \ldots, E_d)$ where 
each $E_i$ is a list of exponents of terms in $n$ variables 
and of total degree exactly $i$. 

The output further shows the names of the parameter variables 
in the coefficients, then the full center polynomial with 
parametric coefficients and then the specialized polynomials.
The computing times are splitted into the 
time for input `\verb/read =/', 
time for evaluation `\verb/eval =/',
time for output `\verb/print =/' 
and time spend in garbage collection `\verb/gc =/'.
The first three times do not include garbage collection times.
The computing times are summarized also in table \ref{cent.tab}.


\begin{table}[htpb]
{\footnotesize
\begin{verbatim}
     (* Commutator relations: *) t:=PREAD().
     (e1,e2,e3) G
     (
     ( e3 ), ( e1 ), ( e1 e3 - e1 ), 
     ( e3 ), ( e2 ), ( e2 e3 - e2 ), 
     )
     (*generate terms. *) e:=EVLGIL(LIST(1,1,1)). 
     (*compute polynomial in the center. *) x:=CenterPol(t,e).

     Parameters: (X1)
 
     Center polynomial: 
                X1 
 
     Specialized center polynomials: 
                1 
 
     Time: read = 0, eval = 4, print = 0, gc = 0.
\end{verbatim}
}
\caption{Lie Algebra: $A_{3,2}$}
\label{a32.exa}
\end{table}

Note, that in example \ref{a32.exa} we do not find a polynomial in the 
center. But Patera {\em et.\ al.} show that there are 
analytic functions, which are invariant under the commutator product 
in the Lie algebra. Namely $e_1 \exp(- \frac{e_2}{e_1})$.
 

%------------
\begin{table}[htpb]
{\footnotesize
\begin{verbatim}
     (* Commutator relations: *) t:=PREAD().
     (e1,e2,e3) G
     (
     ( e3 ), ( e1 ), ( e1 e3 - e1 ), 
     ( e3 ), ( e2 ), ( e2 e3 + e2 ), 
     )
     (*generate terms. *)
     e:=EVLGTD(3,2,NIL). e:=INV(e). e:=FIRST(e). 
     (*compute polynomial in the center. *) x:=CenterPol(t,e).
 
     Parameters: (X1)
 
     Center polynomial: 
                 X1 e1 e2 
 
     Specialized center polynomials: 
                 e1 e2 

     Time: read = 0, eval = 4, print = 0, gc = 0.
\end{verbatim}
}
\caption{Lie Algebra: $A_{3,4}$}
\label{a34.exa}
\end{table}

In example \ref{a34.exa} we do not obtain the 
constants of $\Q$ respectively the specialized polynomial $1$, 
since we did not ask for it. We only asked for polynomials 
in the center of homogeneous total degree $2$. 

 
%------------
\begin{table}[htpb]
{\footnotesize
\begin{verbatim}
     (* Commutator relations: *) t:=PREAD().
     (e1,e2,e3) G
     (
     ( e2 ), ( e1 ), ( e1 e2 - e3 ), 
     ( e3 ), ( e2 ), ( e2 e3 - e1 ), 
     ( e3 ), ( e1 ), ( e1 e3 + e2 ), 
     )
     (*generate terms. *) e:=EVLGIL(LIST(2,2,2)). 
     (*compute polynomial in the center. *) x:=CenterPol(t,e).
 
     Parameters: (X1,X2)
 
     Center polynomial: 
                 (  X2 e3**2 + X2 e2**2 + X2 e1**2 + X1 )
 
     Specialized center polynomials: 
                 (  e3**2 + e2**2 + e1**2 )
                 1 

     Time: read = 0, eval = 64, print = 0, gc = 16.
\end{verbatim}
}
\caption{Lie Algebra: $A_{3,9}$}
\label{a39.exa}
\end{table}


%------------
\begin{table}[htpb]
{\footnotesize
\begin{verbatim}
     (* Commutator relations: *) t:=PREAD().
     (e1,e2,e3,e4) G
     (
     ( e4 ), ( e2 ), ( e2 e4 - e1 ), 
     ( e4 ), ( e3 ), ( e3 e4 - e2 ), 
     )
     (*generate terms. *) e:=EVLGIL(LIST(0,1,2,1)). 
     (*compute polynomial in the center. *) x:=CenterPol(t,e).
 
     Parameters: (X1,X2,X3)
 
     Center polynomial: 
                 ( -2 X3 e1 e3 + X3 e2**2 + X2 e1 + X1 )
 
     Specialized center polynomials: 
                 ( -2 e1 e3 + e2**2 )
                 e1 
                 1 

     Time: read = 0, eval = 6, print = 0, gc = 8.
\end{verbatim}
}
\caption{Lie Algebra: $A_{4,1}$}
\label{a41.exa}
\end{table}


%------------
\begin{table}[htpb]
{\footnotesize
\begin{verbatim}
     (* Commutator relations: *) t:=PREAD().
     (e1,e2,e3,e4,e5,e6) G
     (
     ( e2 ), ( e1 ), ( e1 e2 - e3 ), 
     ( e3 ), ( e1 ), ( e1 e3 - e4 ), 
     ( e5 ), ( e1 ), ( e1 e5 - e6 ), 
     )
     (*generate terms. *) e:=EVLGIL(INV(LIST(0,1,2,1,1,1))). 
     (*compute polynomial in the center. *) x:=CenterPol(t,e).
 
     Parameters: (X1,X2,X3,X4,X5,X6,X7)
 
     Center polynomial: 
                 ( -2 X7 e2 e4 e6 + X7 e3**2 e6 + X6 e4 e6 - 
                    X5 e3 e6 + X5 e4 e5 -2 X4 e2 e4 + X4 e3**2 + 
                    X3 e6 + X2 e4 + X1 )
 
     Specialized center polynomials: 
                 ( -2 e2 e4 e6 + e3**2 e6 )
                 e4 e6 
                 ( - e3 e6 + e4 e5 )
                 ( -2 e2 e4 + e3**2 )
                 e6 
                 e4 
                 1 

     Time: read = 0, eval = 140, print = 0, gc = 24.
\end{verbatim}
}
\caption{Lie Algebra: $A_{6,1}$}
\label{a61.exa}
\end{table}

In example \ref{a61.exa} we obtain more polynomials 
than \cite{Pat76}. But observe, that 
the first polynomial is the product of polynomials 
4 and 5 and the second polynomial is 
the product of the polynomials 5 and 6. 
This raises the question of canonical bases 
for subrings. 

A summary of the above examples including computing times 
for MAS on an Atari 1040 ST is contained in the next
table \ref{cent.tab}. 
We list the respective Lie algebra in column one, 
the dimension of the Lie algebra in column 2, 
then the total degree and the exponents as input to 
the term generating algorithm. 
The last column contains the computing times. 
The column entitled `polynomials' contains before the slash `/' 
the number of specialized polynomials as produced by the 
algorithms and after the slash the number of polynomials 
as listed in \cite{Pat76}. 


\begin{table}[htpb] \centering
\begin{tabular}{|c|c|c|c|c|r|} \hline
 Lie Algebra & dim & total    & exponents & polynomials & time  \\
             &     & degree   &           &             & \\
\hline
 $A_{3,2}$   &  3  & $\leq 3$ & $(1,1,1)$       & 1/2   &   4 \\
 $A_{3,4}$   &  3  & $= 2$    &                 & 1/2   &   4 \\
 $A_{3,9}$   &  3  & $\leq 6$ & $(2,2,2)$       & 2/2   &  64 \\

 $A_{4,1}$   &  4  & $\leq 4$ & $(0,1,2,1)$     & 3/3   &   6 \\
 $A_{6,1}$   &  6  & $\leq 6$ & $(0,1,2,1,1,1)$ & 7/5   & 140 \\
\hline
\end{tabular}
\\
{\footnotesize
Computing time in seconds.
}
\caption{Computing Time Summary: Center}
\label{cent.tab}
\end{table}

\clearpage

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

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