% from 10.7.1992 hk
% user packages, syzygies

\newcommand{\modul}{\mbox{\rm modul}}

\section{Linear Equations and Modules over Polynomial rings} %----------

\index{syzygies}\index{module! of syzygies}\index{syzygy module}

This section we discuss the problem of solving 
linear polynomial equations, respectively systems of linear 
polynomial equations. 
These methods can be used to solve the ideal intersection and 
the ideal quotient problem. 
Finally we discuss the problem of finding canonical bases for 
submodules of modules over polynomial rings using 
the method of partial Gr\"obner bases.
We will describe only the commutative case, but 
the problem can also be solved in the non-commutative 
solvable type polynomial ring case for the corresponding 
left and right problems. 
For a complete treatment of the commutative case see \cite{Becker93},  
for the non-commutative case see \cite{Kre92}. 

Let $R = \K\lbrack X_1, \ldots, X_n \rbrack$ 
be a polynomial ring over a field $\K$ 
with respect to an admissible term order $<$. 
For the non-commutative cases let 
$R = \K\lbrace X_1, \ldots, X_n; Q \rbrace$ 
be a solvable polynomial ring over a field $\K$ with 
respect to a $*$-compatible admissible term order $<$ 
and commutator relations $Q$. 
By $R^m$ we denote the free module over $R$, 
i.e.\ the $m$ fold cartesian product of $R$ together with a 
module structure. 


\subsection{Linear Equations and Syzygies} %---------

A system of linear equations over $\R$ 
in the variables $Y_1, \ldots, Y_m$ (disjoint to $X_1, \ldots, X_n$) 
with coefficients $f_{ij}$, $g_{i} \in R$, $1 \leq i \leq k$, 
$1 \leq j \leq m$ is a system of equations of the following form:
$$
  \begin{array}{ccccc}
        f_{11} Y_1 & + \ldots + & f_{1m} Y_m & = & g_1    \\ 
        \vdots     &   \ddots   & \vdots     & = & \vdots \\ 
        f_{k1} Y_1 & + \ldots + & f_{km} Y_m & = & g_k
  \end{array}
  \eqno (*)
$$
By a solution of the system of equations $(*)$ we mean 
any $m$ tuple $(h_1, \ldots, h_m) \in R^m$, such that 
$$
  \begin{array}{ccccc}
        f_{11} h_1 & + \ldots + & f_{1m} h_m & = & g_1    \\ 
        \vdots     &   \ddots   & \vdots     & = & \vdots \\ 
        f_{k1} h_1 & + \ldots + & f_{km} h_m & = & g_k
  \end{array}
$$
holds. 

A method to find a solution is the following.
\begin{enumerate}
\item Find a solution for a single {\em homogeneous} equation, 
      i.e.\ let $k = 1$ and $g_1 = 0$ in $(*)$:
      $$
         f_{1} Y_1 + \ldots + f_{m} Y_m = 0. 
      $$
      Solutions to this problem are called {\em syzygies}. 
      The set of all such solutions forms a submodule of $R^m$. 
      Using Gr\"obner bases technics one can find a generating set 
      for this submodule (see below). 
      If $\{f_{1}, \ldots, f_{m} \}$ does not already form a 
      Gr\"obner base we first solve the problem for the 
      corresponding Gr\"obner base and the use some transformation
      to obtain the solution for the original problem. 
\item Find a solution for a single {\em inhomogeneous} equation, 
      i.e.\ let $k = 1$ and $g_1 \neq 0$ in $(*)$:
      $$
         f_{1} Y_1 + \ldots + f_{m} Y_m = g.
      $$
      One particular solution to this problem is found 
      by the ideal membership test 
      $g \in \ideal(f_{1}, \ldots, f_{m})$ 
      and the representation of $g$ as element of the 
      ideal generated by $f_{1}, \ldots, f_{m}$.
      There is a solution to this problem, 
      iff $g$ is contained in this ideal. 
      The set of all solutions is then the set of 
      sums of solutions of the homogeneous system and the 
      particular solution of the inhomogeneous system.
\item In the general case we reduce the problem to a single 
      equation problem, using an embeding of the problem to 
      a polynomial ring in $Z_1, \ldots, Z_k$ new variables 
      and by multiplication of the $i$-th equation with $Z_i$ 
      and summing up the rows. 
      $$
        ( f_{11} Z_1 + \ldots + f_{k1} Z_k ) Y_1 
        + \ldots + 
        ( f_{1m} Z_1 + \ldots + f_{km} Z_k ) Y_m
        = ( g_1 Z_1 + \ldots + g_k Z_k )
        \eqno (**)
      $$
      Then we can solve this equation with the methods described in 
      1) and 2) above in a way such that the solutions are free of 
      the variables $Z_1, \ldots, Z_k$. The later method is the method of
      partial Gr\"obner bases and is discussed in the next section. 
      Then it can be shown that 
      $(h_1, \ldots, h_m)$ is a solution of $(*)$ iff
      $(h_1, \ldots, h_m)$ is a solution of $(**)$.
\end{enumerate}
In more detail the first problem is solved as follows. 

Let $S$ be a ring. $P = \{ p_1, \ldots, p_m \}$ be a finite 
subset of $S$. Let 
$$
   M_P = \{ (h_1, \ldots, h_m ) \in S^m \ : \
             h_1 p_1 + \ldots + h_m p_m = 0 \}.
$$
$M_P$ is called {\em module of syzygies for $P$}. 
The elements of $M_P$ are called {\em syzygies of $P$} 
and $M_P$ is a submodule of the free module $R^m$. 

Let $R$ be a polynomial ring with respect to an admissible term order. 
A set of polynomials is called {\em monic} 
if the head coefficients of all polynomials in the set are $1$.
Let $P = \{ p_1, \ldots, p_m \}$ be a monic Gr\"obner base in $R$. 
For $1 \leq i < j \leq m$ let 
$$
  f_{ij} = SPol(p_i,p_j) = a_{ij} u_{ij}   p_i - b_{ij} v_{ij}   p_j
$$ 
be the S-polynomials of all distinct pairs of elements of $P$;
with $0 \neq a_{ij}, b_{ij} \in \K$, $u_{ij}, v_{ij} \in T$ 
and $\HT(f_{ij}) < \HT(u_{ij}   p_i) = u_{ij} \HT(p_i) 
= v_{ij} \HT(p_j) = \HT(v_{ij}   p_j)$. 

Since $f_{ij} \in \ideal(P)$ and $P$ is a Gr\"obner base 
we have $f_{ij} \longrightarrow_P^*  0$. 
This reduction determines a representation 
of $f_{ij}$ from which terms belonging to the same 
$p_i$ can be combined to a polynomial $q_{ijk}$:
$$
   f_{ij} = \sum_{k=1}^{m} q_{ijk}   p_k
$$
with $q_{ijk} \in R$ and 
$\HT(q_{ijk}   p_k) = \HT(q_{ijk} p_k) \leq \HT(f_{ij})$.
Subtracting both representations of $f_{ij}$ we obtain 
a syzygy of $P$. More precisely let
$b_{ij} = ( r_{ij1}, \ldots, r_{ijm} ) \in R^m$ with
$$
   r_{ijk} = \left\{
             \begin{array}{ll}
                    q_{ijk}                 & k \neq i, j \\
                    q_{ijk} - a_{ij} u_{ij} & k = i \\
                    q_{ijk} + b_{ij} v_{ij} & k = j 
             \end{array}
             \right.
$$
then $B_P = \{ b_{ij} \ : \ 1 \leq i < j \leq m \}$ 
is a set of syzygies of $P$.

The next theorem says, that if this construction is applied to 
a Gr\"obner base $G$, then the $B_G$ is already a generating set 
for the module of syzygies. 

\begin{theorem}
\label{syzgen.theo}
Let $R$ be a polynomial ring with respect to an admissible term order.
Let $G$ be a monic Gr\"obner base in $R$ and 
let $B_G$ be the set of syzygies as defined before. 
Then $B_G$ generates $M_G$ as an $R$-module.
\end{theorem}

For arbitrary ideal bases, there is a `transformation' lemma for 
syzygies with respect to a Gr\"obner base to syzygies for an arbitrary 
ideal base. The fact was reported by \cite{Zac78} for commutative 
polynomial rings and was reported in \cite{AL88} for 
enveloping algebras of Lie algebras.

\begin{proposition}
Let $I$ be an ideal in a ring $R$ and let 
$F, G \subset R$, $F = \{ f_1, \ldots, f_m \}$, 
$G = \{ g_1, \ldots, g_l \}$ such that 
$I = \ideal(F) = \ideal(G)$. 
Let $X = ( q_{ij} )$ with $q_{ij} \in R$ for 
$1 \leq i \leq m$, $1 \leq j \leq l$ 
and $Y = ( p_{ij} )$ with $p_{ij} \in R$ for 
$1 \leq i \leq m$, $1 \leq j \leq l$ 
be the transformation matrices between the $F$ and $G$:
\begin{eqnarray*} 
  f_i & = & \sum_{j=1,\ldots,l} p_{ij} * g_j \ \  1 \leq i \leq m \\
  g_j & = & \sum_{i=1,\ldots,m} q_{ij} * f_i \ \  1 \leq j \leq l
\end{eqnarray*} 
If we consider the $F$ and $G$ also as vectors and denote
matrix transposition by $^t$, we can write more compactly:
$G^t = X F^t$ and $F^t = Y G^t$. 
Let $I_m$ denote the $m \times m$ unit matrix.
Let $B_G$ be a generator of $M_G$, 
then $B_F$ (in block matrix representation) defined by 
$$
    B_F = { I_m - Y X \choose  B_G X }
$$
is a generator of $M_F$. 
\end{proposition}
Note that for a Gr\"obner base $G$, $Y$ can be computed 
during the construction of $G$ and $X$ can be computed by reduction 
of the $f_i \in F$ wrt.\ $G$. 

By this we have the main ingredients for the solution of step 1) 
of the method above. Step 2) only requires some 
linear algebra to be seen to be correct and 
step 3) needs some results on partial Gr\"obner bases discussed 
later. We turn now to some applications, which can be solved using 
the methods in 1) above. 


\subsubsection{Ideal Intersection} %-----------------

\index{ideal! intersection}\index{intersection! ideal}

In this subsection we are going to reformulate the 
ideal intersection problem as syzygy problem. 
Another way to solve the ideal intersection problem is by 
the so called `tag variable' method. 
The main fact, using syzygies, is contained in the following lemma.

\begin{lemma}
Let $R$ be a polynomial ring and 
let $F_1 = \{ f_1, \ldots, f_r \} \subset R$,
$F_2 = \{ g_1, \ldots, g_s \} \subset R$.
Let $F = F_1 \cup F_2$ and let $B_F$ be a 
generating set for the module of syzygies of $F$.
Then 
$$ 
   \ideal(F_1) \cap \ideal(F_2) = \ideal(P) 
$$
where $P = \{ p_1, \ldots, p_k \} \subset R$ with 
$p_j = \sum_{i=1}^r h_{ij} f_{ij}$ 
for $1 \leq j \leq k = \vert B_F \vert$ and 
$( h_{1j}, \ldots, h_{rj}, h'_{1j}, \ldots, h'_{sj}) \in B_F$.
\end{lemma}

A special case of the ideal intersection problem 
is the question of the existence of left common multiples 
for two elements in a non-commutative ring. 
\index{left common multiples}\index{common multiples}\index{Ore condition}
That means, given $a, b \in R$ (ring), 
do there exist $b', a' \in R$ such that 
$$
  b' a = a' b \eqno (*)
$$ 
It is known that this problem 
is always positively solvable in a Noetherian domain.
If the ideal membership problem is solvable in such a ring, then 
the proof of this fact can be adapted to obtain an algorithm 
for the computation of such left common multiples. 

An other method to determine left common multiples is to 
consider the equation $(*)$ as an ideal intersection problem 
$S a \cap S b = \emptyset$ $?$ or directly as a syzygy problem
$b' a - a' b = 0$. 
The last way is persued and discussed e.g.\ in \cite{AL88}. 


\subsubsection{Ideal Quotient} %-----------------

\index{ideal! quotient}\index{quotient! ideal}
In this subsection we are going to define ideal quotients 
and show how ideal quotients can be computed using syzygy methods. 

Let $S$ be a ring. Let $I \subseteq S$ be an ideal, 
and let $J \subseteq S$ be a subset of $S$. 
Then the set 
$$
   I : J \  =  \ \{ h \in S \ : \ h g \in I \mbox{\rm\ for\ all\  }
                                  g \in J \}
$$
is called the {\em ideal quotient of $I$ by $J$}. 

$I : J$ is an ideal of $S$, since for 
$h_1 g \in I$, $h_2 g \in I$ and $f \in S$ 
also $(h_1 - h_2) g \in I$ and $f h_1 g \in I$ 
(because $I$ is an ideal) for all $g \in J$. 
If $I$ is an ideal generated by a finite subset 
$F = \{ f_1, \ldots, f_k \}$ of $S$, i.e.\ $I = \ideal(F)$,
then $\ideal(F) : J = 
\{ h \in S \ : \ \mbox{\rm\ exists\  } h_1, \ldots, h_k \in S, 
\mbox{\rm\ with\  } h g = h_1 f_1 + \ldots + h_k f_k 
\mbox{\rm\ for\ all\  } g \in J \}$. 
If moreover $S$ is commutative and $J = \ideal(G)$ is an ideal in 
$S$ generated by a set $G$ in $S$ then $I : J = I : G$.
This holds because $h g \in I$ for all $g \in J$ iff 
$h g_j \in I$ for all $g_j \in G$, since all $g \in J$ 
have a representation $g = \sum_j p_j g_j$ by elements of $G$ 
and since $S$ is commutative we also have 
$h g = h ( \sum_j p_j g_j ) = \sum_j p_j ( h g_j )$. 

If $G$ is a subset of $S$ and $I$ is an ideal in $S$, then 
$$
   I : G = \bigcap_{g \in G} I : \{ g \}. 
$$
This identity holds, since for ideals 
$h g \in I$ for all $g \in G$ if and only if 
$h \in I : \{ g \}$ for all $g \in G$. 
In particular for finite $G = \{  g_1, \ldots, g_k \}$ we have 
$I : G = \bigcap_{i=1,\ldots,k} I : \{ g_i \}$. 

Having reduced the problem of determination of ideal quotients 
to $I : \{ g \}$ (which we will simply denote by 
$I : g$) we now solve this problem using syzygies for 
polynomial rings $R$. 

\begin{lemma}
Let $R$ be a polynomial ring.
Let $I = \ideal(F)$ be an ideal in $R$ generated by a 
finite set $F = \{ f_1, \ldots, f_k \} \subseteq R$ and let $g \in R$. 
Let $F' = \{ g, f_1, \ldots, f_k \}$ and let $B_{F'}$ be a 
generating set for the module of syzygies of $F'$. 
If we let 
$$ 
   H = \{ h \in S \ : \ 
   \mbox{\rm\ exists\ } h_1, \ldots, h_k \in S, \mbox{\rm\ with\ }
   (h, h_1, \ldots, h_k) \in B_{F'} \}, 
$$
then $\ideal(H) = \ideal(F) : g$.
\end{lemma}


\subsection{Gradings and Partial Gr\"obner Bases} %-------------------

\index{graded structure}\index{structure! graded}

By a {\em grading} $\gamma$ of a polynomial ring 
$\K \lbrack X_1, \ldots, X_n \rbrack$ with set of terms $T$ 
we mean a monoid homomorphism
$$
  \gamma: (T,1,\cdot) \longrightarrow (\N, 0, +).
$$
This means that $\gamma$ is a mapping from 
$T$ to $\N$ such that 
$\gamma(1) = 0$ and $\gamma(s \cdot t) = \gamma(s) + \gamma(t)$ 
for $s, t \in T$.
For polynomials $0 \neq f \in \K \lbrack X_1, \ldots, X_n \rbrack$
we define the $\gamma$-degree of $f$, which will also be denoted by 
$\gamma(f)$, as 
$\gamma(f) = \max\{ \gamma(t) \ : \ t \in T(f) \}$. 
For solvable polynomial rings 
$R = \K \lbrace X_1, \ldots, X_n; Q, Q' \rbrace$ 
we define the $\gamma$-degree of $0 \neq f \in R$ 
by the $\gamma$-degree of $f$ as element of 
$\K \lbrack X_1, \ldots, X_n \rbrack$. 

A grading $\gamma$ on $T$ with {\em weights $a_1, \ldots, a_n \in \N$} 
can be defined as 
$$
  \gamma(t) = \gamma(X_1^{\nu_1} \ldots X_n^{\nu_n}) = 
  a_1 \nu_1 + \ldots + a_n \nu_n,
$$
where $t = X_1^{\nu_1} \ldots X_n^{\nu_n} \in T$.
Moreover since $\gamma$ is a homomorphism between $(T,1,\cdot)$ 
and $(\N,0,+)$ it can be shown, that any grading on $T$ arises 
from a linear form.
\index{linear form}\index{term order}
Moreover is holds, that $s \mid t$ implies 
$\gamma(s) \leq \gamma(t)$ for all $s, t \in T$.
And since a polynomial ring over a domain is a domain we have:
$\gamma(f g) = \gamma(f) + \gamma(g)$
for all $0 \neq f, g \in S$. 
By definition of the degrees of polynomials it holds also 
that $\gamma(f + g) \leq \max\{ \gamma(f), \gamma(g)\}$
for all $0 \neq f, g \in S$. 

We call an element $f$ of $R$ 
{\em homogeneous of degree $d$} if for all 
$t \in T(f)$ we have $\gamma(t) = d$ 
and we call it {\em homogeneous} if for all 
$t, s \in T(f)$ we have $\gamma(t) = \gamma(s)$. 
\index{homogeneous}
So every polynomial $f$ of $R$ can be represented as 
a (finite) sum of its homogeneous components:
$f = \sum_{i \in {\bf N}} f_i$,
where each $f_i$ is homogeneous of degree $i$. 
An ideal $I$ in $R$ is called 
{\em homogeneous} if it is generated by homogeneous elements. 
One can prove, that $I$ is homogeneous, {\em iff} with each
$f \in I$ it contains every homogeneous component of $f$. 
Homogeneous ideals are denoted by $\ideal^h(F)$. 
\index{homogeneous! ideal}\index{ideal! homogeneous}
A representation of a polynomial $f \in R$ 
with respect to a set of homogeneous polynomials $P$ 
defines a {\em homogeneous representation} 
of $f$ with respect to $P$.

Note that contrary to commutative polynomial rings 
homogeneity is in general not preserved under the $*$-product in 
solvable polynomial rings. 
This restricts the possible gradings to those which are 
so called {\em homogeneity compatible with $*$}. 
\index{homogeneity compatible}\index{compatible! homogeneity}
But it can be shown, that for the purpose of 
submodule Gr\"obner bases there exist gradings $\gamma$ which are 
homogeneity compatible with $*$. 

Let $R$ be polynomial ring with term order $\leq$, 
then a grading $\gamma$ on $R$ is called 
{\em compatible with $\leq$} if for all $s, t \in T$ 
$\gamma(s) \leq \gamma(t) \ \ \Longrightarrow \ \  s \leq t$.
Then it can be shown, that there exists a term order 
$\leq'$ on $R$ such that $\gamma$ is compatible with $\leq'$. 
But note that $\leq'$ may not be $*$-compatible. 


%\subsection{Partial Gr\"obner Bases} %-----------------------

\index{partial! Gr\"obner~base}\index{Gr\"obner base! partial}
\index{partial! reduction}\index{reduction! partial}

We are new prepared to state the main results of partial 
Gr\"obner bases. 

Let $F \subset R$ be a subset of a polynomial ring 
with a term order $\leq$ and a grading $\gamma$ which is 
compatible with $<$. 
For $d, e \in \N$ define 
$$
   F(d,e) = \{ f \in F \ : \ d \leq \gamma(f) < e \}
$$
and $F(d,\infty) = \{ f \in F \ : \ d \leq \gamma(f)\ \}$. 
For finite $F \subseteq R$ let the {\em $d$-restriction} 
of the reduction relation be defined as 
$$
  \longrightarrow_{d,F}\ = \ 
  \longrightarrow_{F}\ \cap \  R(0,d)^2.
$$

The definition of partial Gr\"obner bases is as follows. 
Let $R = \K \lbrack X_1, \ldots, X_n \rbrack$ be a 
polynomial ring, with respect to an admissible ordering, over a 
field $\K$ and with a grading $\gamma$ on $R$ which is 
compatible with $<$. 
Let $G \subset R$ be a finite subset of homogeneous polynomials 
of $R$ and let $d \in \N$.
If the reduction relation $\longrightarrow_{d,G}$ 
is confluent, then $G$ is a {\em $d$-Gr\"obner base}.


\begin{theorem}
Let $R = \K \lbrack X_1, \ldots, X_n \rbrack$ be a 
polynomial ring, with respect to an admissible 
ordering, over a field $\K$ 
and with a grading $\gamma$ on $R$ which is compatible with $<$. 
Let $G \subset R$ be a finite subset of homogeneous polynomials 
of $R$ and let $d \in \N$.
Then the following assertions are equivalent.
\begin{enumerate}
\item $G$ is a $d$-Gr\"obner base.
\item For all $f \in \ideal(G)(0,d)$, $f \longrightarrow_{d,G}^* 0$. 
\item For all $0 \neq f \in \ideal(G)(0,d)$, 
      $f \longrightarrow_{d,G} f'$.
\item For all 
      $h \in H(0,d) = \{ SP(f,g) \ : \ f, g \in G, f \neq g \}(0,d)$,
      $h \longrightarrow_{d,G}^* 0$.
\end{enumerate}
\end{theorem}

By a theorem we know, that for any finite $F \subset R$ of 
homogeneous polynomials one can construct a 
$d$-Gr\"obner base $G$ of $\ideal(F)(0,d)$. 
And the proof of this theorem presents the 
Buchberger algorithm for constructing $d$-Gr\"obner bases.
\index{Buchberger algorithm}\index{algorithm! Buchberger} 



\subsection{Modules over Polynomial Rings} %---------

\index{module}

In this subsection we consider submodules of free modules over 
polynomial rings. 
Let $R = \K \lbrack X_1, \ldots, X_n \rbrack$ be a 
polynomial ring, with respect to an admissible ordering, over a 
field $\K$. 
Let $M = R^m$ be a free $R$-module with canonical basis 
$u_1, \ldots, u_m$.
First we need to introduce some notation about generating sets 
of submodules. 

Let $M$ be an $R$-module. We say a sub module is 
{\em generated by a set $N$}, $N \subseteq M$ if it 
is of the form:
$$
   \modul(N) =
   \{ \ \sum_{i \in \Lambda} r_i a_i \ : \ r_i \in R, a_i \in N, 
                  \Lambda \mbox{\ finite\ } \}, \\
$$ 
If $N = \{ a_1, \ldots, a_n \} \subseteq M$ is finite, 
then we write also $\modul(a_1, \ldots, a_n)$ for $\modul(N)$. 
\index{submodule}\index{basis! submodule}\index{submodule! basis}

We can ask the questions: 
Let $N = \modul(a_1, \ldots, a_k)$ be a submodule of $M$ 
generated by $a_1, \ldots, a_k$, 
\begin{quote}
  given $a \in M$, is $a \in N$ $?$ \\
  given a finite generating set of a submodule $N$, 
  is there a canonical basis for $N$ $?$ 
\end{quote}

The questions are answered using the method of partial 
Gr\"obner bases. To apply these we need some preparations. 

Let $R = \K \lbrack X_1, \ldots, X_n \rbrack$, then 
we can embed the free module $R^m = \modul(u_1, \ldots, u_m) = M$ into 
a polynomial ring with $m$ additional variables:
\index{embedding}
\begin{eqnarray*}
  R^m & \hookrightarrow & R\lbrack Y_1, \ldots, Y_m \rbrack = 
      \K \lbrack X_1, \ldots, X_n, Y_1, \ldots, Y_m \rbrack = R_{nm} \\ 
   u_i & \mapsto & Y_i \ \ 1 \leq i \leq m.
\end{eqnarray*}
With the restriction of the multiplication in $R_{nm}$ 
to polynomials from $R$ with polynomials from $R_{nm}$. 
The restriction of the multiplication can be accomplished by 
a grading $\gamma$ on $R_{nm}$. 
We do this by defining $\gamma(X_i) = 0$ for $1 \leq i \leq n$, 
$\gamma(a) = 0$ for $0 \neq a \in \K$
and $\gamma(Y_j) = 1$ for $1 \leq j \leq m$.
Then $\gamma(f g) = 0 = \gamma(f) + \gamma(g)$ for 
all $0 \neq f, g \in R$. 
%---non-comm 

With this embbeding all results of partial reductions 
are available for free modules over polynomial rings. 
In particular for finite subsets $N$ of $R^m$ there exists a 
{\em submodule Gr\"obner base $G$} of $\modul(N)$, since by 
a theorem for homogeneous ideals there exists 
a partial $1$-Gr\"obner base for $N$ in $R_{nm}$. 
\index{submodule! Gr\"obner base}\index{Gr\"obner base! submodule}

Moreover there are several ways to order the variables, 
e.g.\ $X_i < Y_j$, $Y_j < X_i$ or according to some `weights'. 
This way has been persued e.g.\ by \cite{MM86}. 
There is also a way proposed by \cite{AK86} where the 
embedding into an extended polynomial ring is not required.

Furthermore we can find bases for the modules of syzygies 
for a submodule of $R^m$, since we can 
apply a partial version of the algorithm which generates 
the module of {\em syzygies} for a polynomial ring. 
\index{submodule! syzygies}\index{syzygies! submodule}


\subsection{Algorithms and Examples} %--------------------------

The main procedure \verb/SYHC/ computes a set of generators 
of the module of syzygies for a set of 
homogeneous commutative linear polynomial equations 
as sketched before. 
The main procedure \verb/SYHNL/ computes a set of generators of the 
left module of syzygies for set of 
non-commutative linear polynomial equations. 
The main procedure \verb/MGB/ computes a submodule Gr\"obner base 
from a set of generators of a submodule. 
The algorithms have been implemented by \cite{Phil91}. 

The computation takes place over the coefficient domain of the 
rational numbers. The term ordering may be any implemented term order. 
In case of a system of equations the problem is automatically reduced 
to a single equation problem by introducing new varaibles 
as sketched in step 3) before.
In case of the non-commutative versions of the procedures, the 
commutator relations must be supplied as additional input. 
The programs are contained in the Modula-2 libraries 
\verb/SYZHLP/, \verb/SYZFUNC/, \verb/SYZGB/ and \verb/SYZMAIN/.


\subsubsection{Commutative Problems} %--------------

In the following example we compute a generating set for 
the solutions to the single homogeneous equation 
$$
 ( 3 x^3- w ) Y_1 + ( -1/23 w z - x ) Y_2 + ( 4 w y^2 - x^2 ) Y_3 = 0. 
$$
The input consists first of the defining statements of the 
variables $w, x, y, z$, namely 
\verb/VL:=LIST("w","x","y","z")/ and \verb/xxx:=DIPVDEF(VL)/. 
Then the input equation is read by the 
procedure \verb/PM := MREAD(VL)/.
It consists of a list of polynomial lists 
(defining the coefficient matrix) of distributive rational 
polynomials. The polynomial syntax is as described in 
section \ref{dip.alg}.
The statement \verb/PMWR(PM, VL)/ prints the polynomial 
matrix to the current output stream. 
Then the statement \verb/SY:=SYHC(PM, 1, 0)/ requests the computation 
of the syzygies.
The second argument \verb/1/ requests the printing of intermediate 
output and the third argument \verb/0/ indicates, that no reduced 
(intermediate) Gr\"obner base and no reduced set of syzygies is to 
be computed. 
Then again \verb/PMWR(SY, VL)/ prints the 
list of polynomial lists to the current output stream. 
Finally the statement \verb/SYTHC(SY, PM, VL)/ tests whether 
all elements of \verb/SY/ are indeed a solution to the original 
problem.

%----1---
{\footnotesize %-------------------------
\begin{verbatim} 
     (* Linear homogeneous polynomial equation. *)

     (* Polynomial matrix *)
     VL:=LIST("w","x","y","z").  xxx:=DIPVDEF(VL). 
     PM := MREAD(VL).
     (
      ( 3 x**3- w, -1/23 w z - x, 4 w y**2 - x**2 ) 
     ) 
     PMWR(PM, VL).
 
     (* Syzygies: *)
     SY:=SYHC(PM, 1, 0).
     PMWR(SY, VL).
 
     (* Test Syzygies *)
     SYTHC(SY, PM, VL).
\end{verbatim}
}

The following output shows first the input 
polynomial lists, then a generating set for the 
module of syzygies as computed by \verb/SYHC/ with a 
computing time of $0.484$ seconds. 
Finally the result \verb/(0)/ of the test is shown. 

{\footnotesize %-------------------------
\begin{verbatim} 
     MAS: (
     (( 3 x**3 - w ), ( -1/23 w z - x ), ( 4 w y**2 - x**2 ))
     )

     Time: read = 16, eval = 484, print = 116, gc = 0.
     MAS: (
     (( -1/3 w z -23/3 x ), ( -23 x**3 +23/3 w ), 0), 
     (( -1/3 w y**2 +1/12 x**2 ),  0, ( 1/4 x**3 -1/12 w )), 
     ( 0,  0, 0), 
     (( -1/276 x z -1/3 y**2 ), ( - x**2 y**2 +1/12 x ), 
      ( -1/92 x**2 z -1/12 )), 
     (( 1/23 x**2 z**2 +4 x y**2 z ), ( 12 x**3 y**2 z - x**2 z ), 
      ( 3/23 x**3 z**2 + x z )), 
     ( 0,  0, 0), 
     ( 0, ( -92 w y**2 +23 x**2 ), ( - w z -23 x )), 
     (( -1/276 w z**2 -1/12 x z ), ( - w x y**2 z +1/12 w z ), 
      ( -1/92 w x z**2 -1/4 x**2 z )), 
     (( 1/23 w z**2 + x z ), 
      ( 12 w x y**2 z - w z -1104 w y**4 +276 x**2 y**2 ), 
      ( 3/23 w x z**2 -12 w y**2 z +3 x**2 z -276 x y**2 )), 
     ( 0, ( -92 w y**4 +23 x**2 y**2 ), ( - w y**2 z -23 x y**2 )), 
     (( -1/276 w z -1/12 x ), ( - w x y**2 +1/12 w ), 
      ( -1/92 w x z -1/4 x**2 )), 
     (( 1/23 w y**2 z**2 + x y**2 z ), 
      ( 12 w x y**4 z - w y**2 z -1104 w y**6 +276 x**2 y**4 ), 
      ( 3/23 w x y**2 z**2 -12 w y**4 z +3 x**2 y**2 z -276 x y**4 )), 
     ( 0,  0, 0), 
     (( 1/23 x z**2 +4 y**2 z ), ( 12 x**2 y**2 z - x z ), 
      ( 3/23 x**2 z**2 + z )), 
     (( 1/23 x y**2 z**2 +4 y**4 z ), ( 12 x**2 y**4 z - x y**2 z ), 
      ( 3/23 x**2 y**2 z**2 + y**2 z ))
     )
 
     SYZYGIEN-TEST:  (0)
     Time: read = 0, eval = 183, print = 0, gc = 0.
\end{verbatim}
}

The next example is taken from 
\cite{Buchb85} (example number 6.17). 
It askes for a generating set for 
the solutions to the single homogeneous equation 
$$
 ( x^2 y - x y ) Y_1 + ( x y^2 - x^2) Y_2 + 
 ( x^3 y - x^2 y + x^3 - x^2 ) Y_3 = 0.
$$
The input is as described in the previous example. 

%----2---
{\footnotesize %-------------------------
\begin{verbatim} 
     (* Linear homogeneous polynomial equation. *)
     (* Example 6.17 from Buchberger (ch 6). ------------ *) 

     (* Polynomial matrix *)
     VL:=LIST("x","y").  xxx:=DIPVDEF(VL). 
     PM := MREAD(VL).
     (
      ( x**2 y - x y, x y**2 - x**2, x**3 y - x**2 y + x**3 - x**2 ) 
     ) 
     PMWR(PM, VL).

     (* Syzygies: *)
     SY:=SYHC(PM, 1, 0).
     PMWR(SY, VL).
 
     (* Test Syzygies *)
     SYTHC(SY, PM, VL).
\end{verbatim}
}

The following output shows first the input 
polynomial lists, then a generating set for the 
module of syzygies as computed by \verb/SYHC/ with a 
computing time of $0.134$ seconds. 
Finally the result \verb/(0)/ of the test is shown.

{\footnotesize %-------------------------
\begin{verbatim} 
     MAS: (
     ((  x**2 y - x y ), (  x y**2 - x**2 ), 
      (  x**3 y - x**2 y + x**3 - x**2 ))
     )
 
     Time: read = 0, eval = 134, print = 33, gc = 0.
     MAS: (
     (( - y - x ), (  x -1 ),  1 ), 
     ( 0,  0, 0), 
     (( - x y - x ),  0,   y ), 
     ((  y + x**2 ), ( - x**2 +1 ), (  y - x -1 )), 
     (( - x y**2 + y + x**2 + x ), ( - x**2 +1 ), (  y**2 - x -1 )), 
     (( - x y - x ),  0,   y )
     )

     SYZYGIEN-TEST:  (0)
     Time: read = 0, eval = 50, print = 0, gc = 0.
\end{verbatim}
}


\subsubsection{Non-commutative Problems} %--------

In the following example from \cite{AL88} a generating set for 
the solutions of the single homogeneous equation 
$$
  Y_1 * ( x_1 x_2 ) + Y_2 * ( x_1 ) = 0
$$
is asked for in an enveloping algebra $R$ of a Lie algebra 
defined by the commutator relations
\begin{eqnarray*}
      x_2 x_1 - x_1 x_2 & = & + x_3, \\
      x_3 x_2 - x_2 x_3 & = & + x_1, \\ 
      x_3 x_1 - x_1 x_3 & = & - x_2.
\end{eqnarray*}

The input consists first of the defining statements of the 
variables $x_1, x_2$, the commutator relations \verb/T/ 
and then the polynomial matrix. 
The commutator relation syntax is as described in 
section \ref{ncdip.alg}.
The statement \verb/SY:=SYHNL(PM, 1, 0, T)/ 
requests the computation of a set of generators of the 
module of syzygies for a non-commutative linear polynomial equation. 
The first, second and third input is as described in the examples 
before and the fourth input \verb/T/ is the 
relation table of the commutator relations. 
The statement \verb/OREC(p1, p2, q1, q2, T)/ 
requests the computation of elements 
$q1$ and $q2$ $\in R$ such that $ q1 * p1 = q2 * p2 $. 


%----3---
{\footnotesize %-------------------------
\begin{verbatim} 
     (* Linear homogeneous polynomial equation. *)
     (* Example 1 from Apel Lassner (1988). -------------- *) 

     (* Commutator relations: *)
     VL:=LIST("x1","x2","x3").  xxx:=DIPVDEF(VL). 
     T := DIRLRD(VL).
     (
      ( x2 ), ( x1 ), ( x1 x2 - x3 ), 
      ( x3 ), ( x2 ), ( x2 x3 - x1 ), 
      ( x3 ), ( x1 ), ( x1 x3 + x2 ), 
     )
     PLWR(T, VL).

     (* Polynomial matrix: *)
     PM := NMREAD(VL, T).
     ( 
      ( x1 x2, x1 ) 
     )
     PMWR(PM, VL).

     (* Syzygies: *)
     SY:=SYHNL(PM, 1, 0, T).
     PMWR(SY, VL).
 
     (* Test Syzygies *)
     SYTHNL(SY, PM, VL, T).


     (* The same example with the Ore condition algorithm. *)
     P:=FIRST(PM). p1:=FIRST(P). p2:=FIRST(RED(P)). 

     (* Ore condition: *)
     OREC(p1,p2, q1, q2, T). 
     Q:=LIST(LIST(q1,q2)).
     PMWR(Q,VL). 

     (* Test Syzygies *)
     SYTHNL(Q, PM, VL, T).
\end{verbatim}
}

The corresponding output for the first problem shows first the input 
polynomial lists, then a generating set for the 
module of syzygies as computed by \verb/SYHNL/ with a 
computing time of $0.3$ seconds. 
Finally the result \verb/(0)/ of the test is shown.

{\footnotesize %-------------------------
\begin{verbatim} 
     MAS: (  x2 ,   x1 , ( - x3 + x1 x2 ),   x3 ,   x2 , 
            (  x2 x3 - x1 ),   x3 ,   x1 , (  x1 x3 + x2 ))
 
     MAS: (
     (  x1 x2 ,   x1 )
     )

     Time: read = 0, eval = 300, print = 34, gc = 0.
     MAS: (
     ( 0, 0), 
     (( 4 x1**2 x3 -4 x1**3 x2 -8 x1 x2 ), 
      ( 4 x1**3 x2**2 +4 x1 x2**2 +4 x1**3 +4 x1 )), 
     (( - x1**2 -1 ), (  x1 x3 + x1**2 x2 )), 
     ( 0, 0), 
     ((  x1**2 +1 ), ( - x1 x3 - x1**2 x2 )), 
     (( -17/3 x1 x3 +8/3 x1**2 x2 -2/3 x2 ), 
      ( 3 x3**2 +3 x1 x2 x3 -8/3 x1**2 x2**2 +10/3 x2**2 -17/3 x1**2 +1/3 ))
     )
 
     NEW RELATION =   x3**2  .*.   x1  = (  x1 x3**2 +2 x2 x3 - x1 )
     NEW RELATION =   x2**2  .*.   x1  = ( -2 x2 x3 + x1 x2**2 + x1 )

     N-SYZYGIEN-TEST:  (0)
     Time: read = 0, eval = 133, print = 0, gc = 0.
\end{verbatim}
}

The corresponding output for the second problem 
shows first two elements $q1, q2$ as computed by \verb/OREC/ 
with a computing time of $0.35$ seconds. 
Finally the result \verb/(0)/ of the test is shown.

{\footnotesize %-------------------------
\begin{verbatim} 
     Time: read = 17, eval = 350, print = 0, gc = 0.
     MAS: (
     (( 4 x1**2 x3 -17/3 x1 x3 -4 x1**3 x2 +8/3 x1**2 x2 -8 x1 x2 -2/3 x2 ), 
      ( 3 x3**2 +3 x1 x2 x3 +4 x1**3 x2**2 -8/3 x1**2 x2**2 +4 x1 x2**2 
        +10/3 x2**2 +4 x1**3 -17/3 x1**2 +4 x1 +1/3 ))
     )
 
     N-SYZYGIEN-TEST:  (0)
     Time: read = 0, eval = 116, print = 0, gc = 0.
\end{verbatim}
}


\subsubsection{Submodule Gr\"obner base} %--------

The following example is from Armbruster and is used in 
the classification of bifurkation problems \cite{AK86}. 
It asks for a submodule Gr\"obner base in a 
$\Q\lbrack u, v, l \rbrack$ module 
given by the following set of generators. 

$$
\begin{array}{lrrrrl}
       ( & 1        , &          2 , &         0, &     l^2 & ), \\
       ( & 0        , &    l +3 v  , &         0, &       u & ), \\
       ( & 1        , &           0, &         0, &     l^2 & ), \\
       ( &   l + v  , &           0, &         0, &       u & ), \\
       ( &  l^2     , &           0, &         0, &       v & ), \\
       ( &  u       , &           0, &         0, &   v l + v^2   & ), \\
       ( & 1        , &           0, &   l +3 v , &       0 & ), \\
       ( &  l^2     , &           0, &      2 u , &       v & ), \\
       ( & 0        , &          1 , &   l + v  , &       0 & ), \\
       ( & 0        , &        l^2 , &        u , &       0 & ), \\
       ( & 0        , &          v , &    u l^2 , &       0 & ), \\
       ( & 0        , &  v l + v^2 , &      u^2 , &       0 & )
\end{array}
$$

The input consists first of the defining statements of the 
variables $u, v, l$: \\
\verb/VL:=LIST("u","v","l")/ and \verb/xxx:=DIPVDEF(VL)/. 
Then the input submodule base is read by the 
procedure \verb/PM := MREAD(VL)/.
It consists of a list of polynomial lists 
(defining the elements which generate the submodule) 
of distributive rational polynomials. The polynomial syntax 
is as described in section \ref{dip.alg}.
The statement \verb/PMWR(PM, VL)/ prints the polynomial 
matrix to the current output stream. 
The statement \verb/QM:=MGB(PM, 0)/ requests the 
computation of a submodule Gr\"obner base. 
The second argument \verb/0/ requests that no intermediate output 
is to be printed. 
Then again \verb/PMWR(QM, VL)/ prints the 
list of polynomial lists to the current output stream. 

%----4--- 
{\footnotesize %-------------------------
\begin{verbatim} 
     (* Submodule Groebner bases. *)
     (* Example by Armbruster, bifurcation. *) 
 
     (* Polynomial matrix: *)
     VL:=LIST("u","v","l").  xxx:=DIPVDEF(VL). 
     PM := MREAD(VL).
     (
      (     ( 1 ),          ( 2 ),           0,       ( l**2 ) ),
      (         0,    ( l + 3 v ),           0,          ( u ) ),
      (     ( 1 ),              0,           0,       ( l**2 ) ),
      ( ( l + v ),              0,           0,          ( u ) ),
      (  ( l**2 ),              0,           0,          ( v ) ),
      (     ( u ),              0,           0, ( v l + v**2 ) ),
      (     ( 1 ),              0, ( l + 3 v ),              0 ),
      (  ( l**2 ),              0,     ( 2 u ),          ( v ) ),
      (         0,          ( 1 ),   ( l + v ),              0 ),
      (         0,       ( l**2 ),       ( u ),              0 ),
      (         0,          ( v ),  ( u l**2 ),              0 ),
      (         0, ( v l + v**2 ),    ( u**2 ),              0 ) 
     ) 
     PMWR(PM, VL).

     (* Submodule Groebner base: *)
     QM:=MGB(PM, 0).
     PMWR(QM, VL).
\end{verbatim}
}

The output shows first the repeated input tuples 
and then the computed module Gr\"obner base. 
The computing time of $28$ seconds (IBM RS6000) is much more, 
than the computing time of $8$ seconds (IBM 3081) reported by 
Armbruster. This might be due to the fact that different 
reduction strategies are used in both algorithms. 
 
{\footnotesize %-------------------------
\begin{verbatim} 
     MAS: (
     ( 1 ,  2 ,  0,   l**2 ), 
     ( 0, (  l +3 v ),  0,   u ), 
     ( 1 ,  0,  0,   l**2 ), 
     ((  l + v ),  0,  0,   u ), 
     (  l**2 ,  0,  0,   v ), 
     (  u ,  0,  0, (  v l + v**2 )), 
     ( 1 ,  0, (  l +3 v ), 0), 
     (  l**2 ,  0,  2 u ,   v ), 
     ( 0,  1 , (  l + v ), 0), 
     ( 0,   l**2 ,   u , 0), 
     ( 0,   v ,   u l**2 , 0), 
     ( 0, (  v l + v**2 ),   u**2 , 0)
     )

     Time: read = 0, eval = 27967, print = 17, gc = 0.
     MAS: (
     ( 0,  0,  0,   u ), 
     ( 0,  0,  0, (  v**4 - v )), 
     ( 0,  0,  0, (  v l + v**2 )), 
     ( 0,  0,  0, (  l**3 + v**3 )), 
     ( 0,  0,   u , 0), 
     ( 0,  0,   v ,  -1/2 l**2 ), 
     ( 0,  0,   l ,  1/2 l**2 ), 
     ( 0,  1 ,  0, 0), 
     ( 1 ,  0,  0,   l**2 )
     )
\end{verbatim}
}


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

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