% from 22.5.96 hk
% user packages, invariants 

\section{Polynomial Invariants Package} %----------

This package contains functions and procedures for the reduction of 
$G$-invariant polynomials for any given group of permutations and 
substitutions, respectively. The reduction method finds a representation 
of a given polynomial in terms of a basis of the ring of 
$G$-invariant polynomials.
The algorithms are based on the the classical theorem of 
E.~Noether \cite{Noether16} and on recent results of G\"obel 
\cite{Goebel92,Goebel95}. 
\index{polynomial invariants}
\index{invariant polynomials}
\index{substitutions}
\index{permutations}
\index{Noether}

The algorithmic approach is a generalization of the 
classical algorithm for symmetric polynomials presented, 
for example, in \cite{Becker93}, section 10.7, 
or \cite{Sturmfels93}, section 1.1.
In contrary to the method of Noether, 
our rewriting technique works independent of the given ground ring.

The algorithms have been implemented by M. G\"obel  
(diploma thesis \cite{Goebel92} and DFG-project: Algorithmische 
Ideal- und Eliminationstheorie) at the university of Passau under the
guidance of V. Weispfenning and H. Kredel.

The invariant package consists of three modules for rewriting
permutation invariant polynomials ($GSYMFUIN$, $GSYMFURN$, $NOETHER$)
and one module for rewriting substitution group invariant polynomials
($SUBST$). The modules contain algorithms for 
\begin{itemize}
\item information and help for the user,
\item input and output of permutation and substitution groups,
\item generation of orbit polynomials,
\item checking of invariant properties of polynomials,
\item unique separation of polynomials in invariant and remainder 
      polynomials,
\item computation of representations and reduction of 
      invariant polynomials, and 
\item checking of representation and reduction results.
\end{itemize}
The algorithms can be used interactively in the interpreter 
environment of MAS. 

The following sections give a short description of 
the implemented MAS procedures and show some examples. 


\subsection{Permutation Invariant Polynomials}

The modules in this section use for the 
representation of $G$-invariant polynomials the 
following definition of an orbit polynomial:
\begin{eqnarray*}
orbit_{G}(t) = \sum_{s \in \{\pi(t) \, \mid \, \pi \in G\}} s
\end{eqnarray*}
A permutation group $G$ is stored as the list of generating permutations.
The order of $G$ is computed over the number of terms of 
$orbit(X_1^{n-1} X_2^{n-2} \ldots X_{n-1})$.

A description of the algorithms in Section~\ref{G.1} and Section~\ref{G.2}
can be found in \cite{Goebel92}. The algorithms in Section~\ref{G.3} are
based on the proof of Noether's theorem \cite{Noether16} as described 
in \cite{Kraft84}.


\subsection{The Integer Case (Module GSYMFUIN)}
\label{G.1}

\begin{deflist}{GSYSPG}
\item[GSYINF()]
      The procedure writes information about this package 
      to the output stream.
      \index{GSYINF}
\item[GSYPGR(N: GAMMAINT): LIST]
      The procedure reads the generating elements of a permutation 
      group operating on $N$ variables from the input stream. 
      \index{GSYPGR}
\item[GSYPGW(G: LIST)]
      The procedure writes the generating elements of the permutation 
      group $G$ to the output stream.
      \index{GSYPGW}
\item[GSYSPG(N: GAMMAINT): LIST]
      The procedure computes the generating elements for 
      the symmetric group operating on $N$ variables.
      \index{GSYSPG}
\item[GSYORD(G: LIST): GAMMAINT]
      The procedure computes the order of the permutation group $G$.
      \index{GSYORD}
\item[GSYNSP(G: LIST)]
      The procedure computes the number of special orbits for the 
      permutation group $G$.
      \index{GSYNSP}
\item[GINORP(G, MO: LIST): LIST]
      The procedure computes the $G$-invariant orbit of
      the monomial $MO$.
      \index{GINORP}
%\item[GINOPL(G, ML: LIST): LIST]
%      The procedure computes the $G$-invariant orbit list
%      from the monomial list $ML$.
%      \index{GINOPL}
\item[GINCUT(G, Pol: LIST; VAR Pol1, Pol2: LIST)] \mbox{ }\\
      The procedure performs a unique separation of the 
      polynomial $Pol$ w.r.t.\ the term order in a $G$-invariant
      polynomial $Pol1$ and a remainder polynomial $Pol2$.
      \index{GINCUT}
\item[GINCHK(G, Base, Pol: LIST): LIST]
      The procedure computes the original polynomial from the 
      representation polynomial $Pol$ and the head term list $Base$
      of the $G$-invariant base polynomials. 
      The algorithm could be used to check a representation.   
      \index{GINCHK}
\item[GINRED(G, Pol: LIST; VAR Base, BasePol, RemPol: LIST)] \mbox{ }\\
      The procedure computes the polynomial $BasePol$ which is 
      the $G$-invariant polynomial representation w.r.t. the 
      base polynomials and the unique remainder polynomial $RemPol$ 
      from the polynomial $Pol$. The head term list of the base
      polynomials are stored in $Base$.
      \index{GINRED}
\item[GINBAS(G: LIST): LIST]
      The procedure computes the head term list of the $G$-invariant 
      base polynomials for the permutation group $G$.
      \index{GINBAS}
\end{deflist}

\subsection{The Rational Case (Module GSYMFURN)}
\label{G.2}

\begin{deflist}{GSYSPG}
\item[GRNORP(G, MO: LIST): LIST]
      See GINORP, rational case.
      \index{GRNORP}
%\item[GRNOPL(G, ML: LIST): LIST]
%      See GINOPL, rational case.
%      \index{GRNOPL}
\item[GRNCUT(G, Pol: LIST; VAR Pol1, Pol2: LIST)]
      See GINCUT, rational case.
      \index{GRNCUT}
\item[GRNCHK(G, Base, Pol: LIST): LIST]
      See GINCHK, rational case.
      \index{GRNCHK}
\item[GRNRED(G, Pol: LIST; VAR Base, BasePol, RemPol: LIST)] \mbox{ }\\
      See GINRED, rational case.
      \index{GRNRED}
\item[GRNBAS(G: LIST): LIST]
      See GINBAS, rational case.
      \index{GRNBAS}
\item[GRNGGB(G: LIST): LIST]
      The procedure computes the head term list of the 
      $G$-invariant base polynomials 
      for the permutation group $G$ using Buchberger's algorithm
      (cf. \cite{Goebel93}).
      \index{GRNGGB}
\end{deflist}


\subsection{Noether's Theorem (Module NOETHER)}
\label{G.3}

\begin{deflist}{GSYSPG}
\item[NOEINF()]
      The procedure writes information about this package to 
      the output stream.
      \index{NOEINF}
\item[NOENSP(G: LIST)]
      The procedure computes the number of base polynomials of
      Noether for the permutation group $G$.
      \index{NOENSP}
%\item[NOEL32(N, K: GAMMAINT): LIST]
%      The procedure computes a representation of $S_K = \sum_{i=1}^N X_i^K$
%      as a polynomial in $S_N$, \ldots, $S_2$, $S_1$
%      (cf. lemma 3.2 in \cite{Goebel92}).
%      \index{NOEL32}
%\item[NOESRT(Pol: LIST): LIST]
%      The procedure sorts the polynomial Pol, which is in noetherian 
%      representation w.r.t. the lexicographical term order and the 
%      given term order.
%      \index{NOESRT}
%\item[NOEPOW(G: LIST; K: GAMMAINT): LIST]
%      The procedure computes the list of orbit polynomials and
%      ($z_1$, \ldots, $z_n$)-terms of the polynomial $S_K$ w.r.t. 
%      the permutation group $G$.
%      \index{NOEPOW}
%\item[NOEPSM(Pol1, Pol2: LIST): LIST]
%      The procedure computes the sum of the polynomials $Pol1$ 
%      and $Pol2$ in noetherian representation.
%      \index{NOEPSM}
%\item[NOEPPR(Pol1, Pol2, TERM: LIST): LIST]
%      The procedure computes the product of the polynomials $Pol1$ 
%      and $Pol2$ in noetherian representation and removes 
%      non-necessary ($z_1$, \ldots, $z_n$)-terms.
%      \index{NOEPPR}
%\item[NOEPIP(Pol, FACT: LIST): LIST]
%      The procedure computes the product of the polynomial $Pol$ in 
%      noetherian representation and a rational number FACT.
%      \index{NOEPIP}
%\item[NOEPRM(Pol, TERM: LIST): LIST]
%      The procedure removes non-necessary 
%      ($z_1$, \ldots, $z_n$)-terms from the polynomial $Pol$.
%      \index{NOEPRM}
\item[NOERED(G, Pol: LIST; VAR Base, BasePol, RemPol: LIST)] \mbox{ }\\
      The procedure computes the polynomial $BasePol$, which is 
      the $G$-invariant polynomial representation w.r.t. the 
      base polynomials and the unique remainder polynomial $RemPol$ 
      from the polynomial $Pol$ by Noether's theorem \cite{Noether16}.
      The head term list of the base
      polynomials are stored in $Base$.
      \index{NOERED}
\end{deflist}


\subsection{Substitution Invariant Polynomials (Module SUBST)}

The modules in this section use for the 
representation of $G$-invariant polynomials the 
following definition of an orbit polynomial:
\begin{eqnarray*}
orbit_{G}(t) = \sum_{\pi \in G} \pi(s)
\end{eqnarray*}
A substitution group $G$ is stored as the list of all substitutions.
The order of $G$ is the length of the list of substitutions.

The algorithms are based on the proof of Noether's 
theorem~\cite{Noether16} as described in \cite{Kraft84}.

\begin{deflist}{GSYSPG}
\item[SUBINF()]
      The procedure writes information about the package 
      to the output stream.
      \index{SUBINF}
\item[SUBSGR(N: GAMMAINT): LIST]
      The procedure reads the generating elements of a substitution 
      group with $N$ variables from the input stream. 
      Then the list of all substitutions of the specified group 
      will be computed and returned.
      \index{SUBSGR}
\item[SUBSGW(G: LIST)]
      The procedure writes the elements of the substitution 
      group $G$ to the output stream.
      \index{SUBSGW}
\item[SUBORD(G: LIST): GAMMAINT]
      The procedure computes the order of the substitution group $G$.
      \index{SUBORD}
\item[SUBORP(G, MO: LIST): LIST]
      The procedure computes the $G$-invariant orbit of the monomial $MO$.
      \index{SUBORP}
%\item[SUBOPL(G, ML: LIST): LIST]
%      The procedure computes the $G$-invariant orbit list
%      from the monomial list $ML$.
%      \index{SUBOPL}
\item[SUBSYM(G, Pol: LIST): GAMMAINT]
      The procedure returns $1$, if $Pol$ is $G$-invariant and 
      otherwise $0$.
      \index{SUBSYM}
\item[SUBCHK(G, Base, Pol: LIST): LIST]
      See GINCHK, substitution group case.
      \index{SUBCHK}
%\item[SUBPOW(G: LIST; K: GAMMAINT): LIST]
%      The procedure computes the list of orbits and
%      ($z_1$, \ldots, $z_n$)-terms of the polynomial $S_K$ w.r.t. the
%      substitution group $G$.
%      \index{SUBPOW}
\item[SUBRED(G, Pol: LIST; VAR Base, BasePol: LIST)] \mbox{ }\\
      The procedure computes the polynomial $BasePol$, which is 
      the $G$-invariant polynomial representation w.r.t. the 
      base polynomials from the $G$-invariant polynomial $Pol$ 
      by Noether's theorem \cite{Noether16}.
      The head term list of the base
      polynomials are stored in $Base$.
      \index{SUBRED}
\end{deflist}


\subsection{Examples} %--------------------------

\subsubsection{Basis polynomials} %--------------------------

The example computes a complete set of basis polynomials
for the given permutation group by using Buchberger's algorithm
\cite{Goebel93} \verb/GRNGGB/.

{\footnotesize %-------------------------
\begin{verbatim} 
       pg := GSYPGR(6).
       (1 2 3 5 6 4) 
       (2 3 1 4 5 6)
       ().
       
       base := GRNGGB(pg).
\end{verbatim}
}
\verb/pg/ denotes the permutation group PG 
generated by \verb/(1 2 3 5 6 4)/ and \verb/(2 3 1 4 5 6)/.
\verb/base/ denotes the rational PG-symmetric base polynomials. 

{\footnotesize %-------------------------
\begin{verbatim} 
       ANS: ((1 2 3 5 6 4) (2 3 1 4 5 6))
        
       GRNGGB working... (Term 1/1): (0,0,1,0,0,0)
       GRNGGB working... (Term 2/2): (0,0,0,0,0,1)
       GRNGGB working... (Term 3/3): (0,1,1,0,0,0)
       GRNGGB working... (Term 5/4): (0,0,0,0,1,1)
       GRNGGB working... (Term 6/5): (1,1,1,0,0,0)
       GRNGGB working... (Term 9/6): (0,0,0,1,1,1)
       GRNGGB working... (Term 16/7): (1,0,2,0,0,0)
       GRNGGB working... (Term 20/8): (0,0,0,1,0,2)
        
       GRNGGB exit (BASE): (((0,0,1,0,0,0),(1,1)),((0,0,0,0,0,1),(1,1)),
       ((0,1,1,0,0,0),(1,1)),((0,0,0,0,1,1),(1,1)),((1,1,1,0,0,0),(1,1)),
       ((0,0,0,1,1,1),(1,1)),((1,0,2,0,0,0),(1,1)),((0,0,0,1,0,2),(1,1)))
       Number of special polynomials: 555
       Number of base polynomials:    8

       ANS: (((0 0 1 0 0 0) (1 1)) ((0 0 0 0 0 1) (1 1)) ((0 1 1 0 0 0) 
       (1 1)) ((0 0 0 0 1 1) (1 1)) ((1 1 1 0 0 0) (1 1)) ((0 0 0 1 1 1) 
       (1 1)) ((1 0 2 0 0 0) (1 1)) ((0 0 0 1 0 2) (1 1)))
\end{verbatim}
}

\subsubsection{Noether's Theorem} %--------------------------

The example computes a representation for
the polynomial $5 \cdot orbit_{Z_4}(X_1^2 X_2^2 X_4)$ 
over the rationals. Both, the theorem of Noether \cite{Noether16}
and the rewriting technique for permutation invariant 
polynomials \cite{Goebel92} are used.

{\footnotesize %-------------------------
\begin{verbatim} 
       pg := GSYPGR(4).
       (2,3,4,1)
       ().
       
       f := GRNORP(pg,FIRST(GSRREAD())).
       (x1,x2,x3,x4) S (x1**2 x2**2 x4).
       
       NOERED(pg,f,a,b,c). 
       z := GRNCHK(pg,a,b). 
       PWRITE(LIST(f)). 
       xl := VLREAD().
       (x1,x2,x3,x4).
       DIRLWR(a,xl,0).
       sl := VLREAD().
       (s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11).
       DIRPWR(b,sl,5).
       
       GRNRED(pg,f,a,b,c).
       z := GRNCHK(pg,a,b).
       DIRLWR(a,xl,0).       
       sl := VLREAD().
       (s1,s2,s3,s4,s5,s6,s7).
       DIRPWR(b,sl,5).
\end{verbatim}
}

After getting the permutation group \verb/pg/  
the next example computes in five steps the following objects.
{\em First}, with \verb/GRNORP/ the rational PG-symmetric orbit polynomial 
\verb/f/ of the monomial \verb/(x1**2 x2**2 x4)/ 
w.r.t. the permuation group \verb/pg/ generated by \verb/(2,3,4,1)/.
{\em Second}, with \verb/NOERED/ the PG-symmetric polynomial \verb/b/ 
(which is the PG-symmetric polynomial representation w.r.t. the base 
polynomials \verb/a/) and the remainder polynomial \verb/c/ from the 
rational polynomial \verb/f/ w.r.t. to the permutation group \verb/pg/ 
after the theorem of E. Noether.
{\em Third}, with \verb/GRNCHK/ the original polynomial \verb/z/ from the 
polynomial \verb/b/ and the PG-symmetric base polynomials \verb/a/ with 
respect to the permutation group \verb/pg/. 
{\em Fourth}, with \verb/GRNRED/ the PG-symmetric polynomial \verb/b/, 
which is the PG-symmetric polynomial reconstruction with respect to the 
base polynomials \verb/a/, and the remainder polynomial \verb/c/ are 
computed from the polynomial \verb/f/ with respect to the
permutation group \verb/pg/.
{\em Fifth}, with \verb/GRNCHK/ the original polynomial \verb/z/ from 
the polynomial \verb/b/ and the PG-symmetric base polynomials \verb/a/ 
with respect to the permutation group \verb/pg/. 

{\footnotesize %-------------------------
\begin{verbatim} 
       SKP ((0,0,0,5),(-1,24),(0,0,1,3),(5,12),(0,1,0,2),(-5,6),(0,0,2,1),
       (-5,8),(1,0,0,1),(5,4),(0,1,1,0),(5,6))
       HT = (0,0,0,5)
       HT = (0,0,1,3)
       HT = (0,1,0,2)
       HT = (0,0,2,1)
       HT = (1,0,0,1)
       HT = (0,1,1,0)
        
       NOERED exit (BASE): (((0,0,2,2),(1,1)),((1,0,1,2),(1,1)),((1,1,0,2),
       (1,1)),((0,0,1,2),(1,1)),((0,1,0,2),(1,1)),((1,0,0,2),(1,1)),((0,0,
       0,2),(1,1)),((0,1,1,1),(1,1)),((0,0,1,1),(1,1)),((0,1,0,1),(1,1)),
       ((0,0,0,1),(1,1)))
       NOERED exit (BASEPOL): ((0,0,0,0,0,0,0,0,0,0,5),(-1,24),(0,0,0,0,0,
       0,0,0,0,1,3),(1,6),(0,0,0,0,0,0,0,0,1,0,3),(1,4),(0,0,0,0,0,0,1,0,
       0,0,3),(1,12),(0,0,0,0,0,0,0,1,0,0,2),(-1,3),(0,0,0,0,0,1,0,0,0,0,2),
       (-1,4),(0,0,0,0,1,0,0,0,0,0,2),(-1,12),(0,0,0,1,0,0,0,0,0,0,2),(-1,6),
       (0,0,0,0,0,0,0,0,1,1,1),(-1,3),(0,0,0,0,0,0,1,0,0,1,1),(-1,6),
       (0,0,0,0,0,0,0,0,2,0,1),(-1,4),(0,0,0,0,0,0,1,0,1,0,1),(-1,12),
       (0,0,0,0,0,0,2,0,0,0,1),(-1,24),(0,0,1,0,0,0,0,0,0,0,1),(1,2),(0,1,0,
       0,0,0,0,0,0,0,1),(1,2),(1,0,0,0,0,0,0,0,0,0,1),(1,4),(0,0,0,1,0,0,0,
       0,0,1,0),(1,3),(0,0,0,0,0,0,0,1,1,0,0),(1,3),(0,0,0,0,0,1,0,0,1,0,0),
       (1,6),(0,0,0,0,0,1,1,0,0,0,0),(1,12),(0,0,0,0,1,0,1,0,0,0,0),(1,12))
       NOERED exit (REMPOL): 0

       ANS: ((1 0 2 2) (1 1) (2 1 0 2) (1 1) (0 2 2 1) (1 1) (2 2 1 0) (1 1))
        
       Polynomial in the variables: (x1,x2,x3,x4)
       Term ordering: 
       Polynomial list: 
                 (  x1**2 x2**2 x4 + x1**2 x3 x4**2 + x1 x2**2 x3**
                 2 + x2 x3**2 x4**2 )

       ANS: ((56 1) (56 2) (56 3) (56 4))
        
       MAS: 
                   x1**2 x2**2 
                   x1**2 x2 x4 
                   x1**2 x3 x4 
                   x1**2 x2 
                   x1**2 x3 
                   x1**2 x4 
                   x1**2 
                   x1 x2 x3 
                   x1 x2 
                   x1 x3 
                   x1 
                  
       ANS: ((46 1) (46 2) (46 3) (46 4) (46 5) (46 6) (46 7) (46 8) (46 9) 
       (46 1 0) (46 1 1))
        
       MAS: ( -0.04167 s1**5 +0.16667 s1**3 s2 +0.25000 s1**3 s3 +0.08333 
       s1**3 s5 -0.33333 s1**2 s4 -0.25000 s1**2 s6 -0.08333 s1**2 s7 
       -0.16667 s1**2 s8 -0.33333 s1 s2 s3 -0.16667 s1 s2 s5 -0.25000 
       s1 s3**2 -0.08333 s1 s3 s5 -0.04167 s1 s5**2 +0.50000 s1 s9 +0.50000 
       s1 s10 +0.25000 s1 s11 +0.33333 s2 s8 +0.33333 s3 s4 +0.16667 s3 s6 
       +0.08333 s5 s6 +0.08333 s5 s7 )
        
       GRNRED working... (BASE) (((1,0,2,2),(1,1)))
       HT = (1,0,2,2)
       C/R = 8/7 XLS = (0,0,(-1,2),0,(1,2),0,0,(1,2))
       GRNRED working... (BASE) (((0,2,1,2),(1,1)),((1,1,1,2),(1,1)),
       ((1,1,0,2),(1,1)),((1,0,0,2),(1,1)),((0,1,1,1),(1,1)),((0,0,1,1),
       (1,1)),((0,1,0,1),(1,1)),((0,0,0,1),(1,1)))
       ...
       GRNRED working... (BASE) (((1,1,0,2),(1,1)),((1,0,0,2),(1,1)),
       ((1,1,1,1),(1,1)),((0,1,1,1),(1,1)),((0,0,1,1),(1,1)),((0,1,0,1),
       (1,1)),((0,0,0,1),(1,1)))
       HT = (0,0,0,1)
        
       GRNRED exit (BASE): (((1,1,0,2),(1,1)),((1,0,0,2),(1,1)),((1,1,1,1),
       (1,1)),((0,1,1,1),(1,1)),((0,0,1,1),(1,1)),((0,1,0,1),(1,1)),
       ((0,0,0,1),(1,1)))
       GRNRED exit (BASE_POL): ((0,0,1,0,0,0,1),(-1,1),(1,0,0,0,0,0,1),
       (1,2),(0,0,0,1,0,1,0),(-1,2),(0,1,0,0,0,1,0),(-1,2),(0,0,0,1,1,0,0),
       (1,2))
       GRNRED exit (REM_POL): 0
        
       ANS: ((1 0 2 2) (1 1) (2 1 0 2) (1 1) (0 2 2 1) (1 1) (2 2 1 0) (1 1))
       MAS: 
                   x1**2 x3 x4 
                   x1**2 x4 
                   x1 x2 x3 x4 
                   x1 x2 x3 
                   x1 x2 
                   x1 x3 
                   x1 

       ANS: ((46 1) (46 2) (46 3) (46 4) (46 5) (46 6) (46 7))
        
       MAS: ( - s1 s5 +0.50000 s1 s7 -0.50000 s2 s4 -0.50000 s2 s6 +0.50000 s3 s4 )
\end{verbatim}
}

\subsubsection{Substitution Invariant Polynomials} %-----------------

The example computes a representation for
the polynomial $orbit_{Z_4}(X_1^2 X_2^2 X_4)$
over the rationals. The fist reduction algorithm
treats $Z_4$ as permutation group and the second
reduction works with $Z_4$ stored as substitution group.

{\footnotesize %-------------------------
\begin{verbatim} 
       pg := GSYPGR(4). 
       (2,3,4,1)
       ().
       sg := SUBSGR(4).
       ((0,1,0,0), (0,0,1,0), (0,0,0,1), (1,0,0,0))
       ().
       
       f := GRNORP(pg, FIRST(GSRREAD())).
       (x1,x2,x3,x4) S (x1**2 x2**2 x4).
       
       NOERED(pg,f,a1,b1,c1).
       ff := GRNCHK(pg,a1,b1).
       
       SUBRED(sg,f,a2,b2,c2).
       ff := SUBCHK(sg,a2,b2).
\end{verbatim}
}

After getting the permutation group \verb/pg/ and a subgroup \verb/sg/, 
the next example computes in three steps the following objects. 
{\em First}, with \verb/GRNORP/ the rational PG-symmetric orbit polynomial 
\verb/f/ of the monomial \verb/(x1**2 x2**2 x4)/ 
w.r.t. the permuation group \verb/pg/ generated by \verb/(2,3,4,1)/.
{\em Second}, with \verb/NOERED/ the PG-symmetric polynomial \verb/b1/ 
(which is the PG-symmetric polynomial representation w.r.t. the base 
polynomials \verb/a1/) and the remainder polynomial \verb/c2/ from the 
rational polynomial \verb/f/ w.r.t. to the permutation group \verb/pg/ 
after the theorem of E. Noether.
{\em Third}, with \verb/GRNCHK/ the original polynomial \verb/ff/ from the 
polynomial \verb/b1/ and the PG-symmetric base polynomials \verb/a1/ with 
respect to the permutation group \verb/pg/. 
{\em Fourth}, with \verb/SUBRED/ SG-symmetric polynomial \verb/b2/ 
(which is the SG-symmetric polynomial representation w.r.t. the 
base polynomials \verb/a2/) and the remainder polynomial \verb/c2/ from 
the rational polynomial \verb/f/ w.r.t. to the substitution group \verb/sg/ 
after the theorem of E. Noether.
{\em Fifth}, with \verb/SUBCHK/ the original polynomial \verb/ff/ from 
the polynomial \verb/b2/ and the PG-symmetric base polynomials \verb/a2/ 
with respect to the substitution group \verb/sg/. 

{\footnotesize %-------------------------
\begin{verbatim} 
       ANS: ((2 3 4 1))
        
       MAS: 
       1 2 3 
       ANS: ((((1 1) 0 0 0) (0 (1 1) 0 0) (0 0 (1 1) 0) (0 0 0 (1 1))) 
       ((0 0 0 (1 1)) ((1 1) 0 0 0) (0 (1 1) 0 0) (0 0 (1 1) 0)) 
       ((0 0 (1 1) 0) (0 0 0 (1 1)) ((1 1) 0 0 0) (0 (1 1) 0 0)) 
       ((0 (1 1) 0 0) (0 0 (1 1) 0) (0 0 0 (1 1)) ((1 1) 0 0 0)))
        
       Enter polynomial list: 
       ANS: ((1 0 2 2) (1 1) (2 1 0 2) (1 1) (0 2 2 1) (1 1) (2 2 1 0) (1 1))
        
       SKP ((0,0,0,5),(-1,24),(0,0,1,3),(5,12),(0,1,0,2),(-5,6),(0,0,2,1),
       (-5,8),(1,0,0,1),(5,4),(0,1,1,0),(5,6))
       HT = (0,0,0,5)
       HT = (0,0,1,3)
       HT = (0,1,0,2)
       HT = (0,0,2,1)
       HT = (1,0,0,1)
       HT = (0,1,1,0)
        
       NOERED exit (BASE): (((0,0,2,2),(1,1)),((1,0,1,2),(1,1)),((1,1,0,2),
       (1,1)),((0,0,1,2),(1,1)),((0,1,0,2),(1,1)),((1,0,0,2),(1,1)),
       ((0,0,0,2),(1,1)),((0,1,1,1),(1,1)),((0,0,1,1),(1,1)),((0,1,0,1),
       (1,1)),((0,0,0,1),(1,1)))
       NOERED exit (BASEPOL): ((0,0,0,0,0,0,0,0,0,0,5),(-1,24),(0,0,0,0,
       0,0,0,0,0,1,3),(1,6),(0,0,0,0,0,0,0,0,1,0,3),(1,4),(0,0,0,0,0,0,
       1,0,0,0,3),(1,12),(0,0,0,0,0,0,0,1,0,0,2),(-1,3),(0,0,0,0,0,1,0,
       0,0,0,2),(-1,4),(0,0,0,0,1,0,0,0,0,0,2),(-1,12),(0,0,0,1,0,0,0,
       0,0,0,2),(-1,6),(0,0,0,0,0,0,0,0,1,1,1),(-1,3),(0,0,0,0,0,0,1,0,
       0,1,1),(-1,6),(0,0,0,0,0,0,0,0,2,0,1),(-1,4),(0,0,0,0,0,0,1,0,
       1,0,1),(-1,12),(0,0,0,0,0,0,2,0,0,0,1),(-1,24),(0,0,1,0,0,0,0,
       0,0,0,1),(1,2),(0,1,0,0,0,0,0,0,0,0,1),(1,2),(1,0,0,0,0,0,0,0,
       0,0,1),(1,4),(0,0,0,1,0,0,0,0,0,1,0),(1,3),(0,0,0,0,0,0,0,1,1,
       0,0),(1,3),(0,0,0,0,0,1,0,0,1,0,0),(1,6),(0,0,0,0,0,1,1,0,0,0,
       0),(1,12),(0,0,0,0,1,0,1,0,0,0,0),(1,12))
       NOERED exit (REMPOL): 0
        
       ANS: ((1 0 2 2) (1 1) (2 1 0 2) (1 1) (0 2 2 1) (1 1) (2 2 1 0) (1 1))
        
       SKP ((0,0,0,5),(-1,24),(0,0,1,3),(5,12),(0,1,0,2),(-5,6),(0,0,2,1),
       (-5,8),(1,0,0,1),(5,4),(0,1,1,0),(5,6))
       HT = (0,0,0,5)
       HT = (0,0,1,3)
       HT = (0,1,0,2)
       HT = (0,0,2,1)
       HT = (1,0,0,1)
       HT = (0,1,1,0)
       ...
       SKP ((0,0,0,5),(-1,24),(0,0,1,3),(5,12),(0,1,0,2),(-5,6),
       (0,0,2,1),(-5,8),(1,0,0,1),(5,4),(0,1,1,0),(5,6))
       HT = (0,0,0,5)
       HT = (0,0,1,3)
       HT = (0,1,0,2)
       HT = (0,0,2,1)
       HT = (1,0,0,1)
       HT = (0,1,1,0)
       SUBRED exit (BASE): (((0,0,2,2),(1,1)),((1,0,1,2),(1,1)),((1,1,0,2),
       (1,1)),((0,0,1,2),(1,1)),((0,1,0,2),(1,1)),((1,0,0,2),(1,1)),((0,
       0,0,2),(1,1)),((0,1,1,1),(1,1)),((0,0,1,1),(1,1)),((0,1,0,1),(1,1)),
       ((0,0,0,1),(1,1)))
       SUBRED exit (BASEPOL): ((0,0,0,0,0,0,0,0,0,0,5),(-128,3),(0,0,0,0,
       0,0,0,0,0,1,3),(64,3),(0,0,0,0,0,0,0,0,1,0,3),(64,1),(0,0,0,0,0,0,
       1,0,0,0,3),(64,3),(0,0,0,0,0,0,0,1,0,0,2),(-64,3),(0,0,0,0,0,1,0,0,
       0,0,2),(-16,1),(0,0,0,0,1,0,0,0,0,0,2),(-16,3),(0,0,0,1,0,0,0,0,0,
       0,2),(-32,3),(0,0,0,0,0,0,0,0,1,1,1),(-32,3),(0,0,0,0,0,0,1,0,0,1,
       1),(-16,3),(0,0,0,0,0,0,0,0,2,0,1),(-16,1),(0,0,0,0,0,0,1,0,1,0,1),
       (-16,3),(0,0,0,0,0,0,2,0,0,0,1),(-8,3),(0,0,1,0,0,0,0,0,0,0,1),(8,1),
       (0,1,0,0,0,0,0,0,0,0,1),(8,1),(1,0,0,0,0,0,0,0,0,0,1),(4,1),(0,0,0,
       1,0,0,0,0,0,1,0),(8,3),(0,0,0,0,0,0,0,1,1,0,0),(16,3),(0,0,0,0,0,1,
       0,0,1,0,0),(8,3),(0,0,0,0,0,1,1,0,0,0,0),(4,3),(0,0,0,0,1,0,1,0,0,0,
       0),(4,3))
       SUBRED exit (REMPOL): 0
        
       ANS: ((1 0 2 2) (1 1) (2 1 0 2) (1 1) (0 2 2 1) (1 1) (2 2 1 0) (1 1))
\end{verbatim}
}

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

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