diff --git a/books/bookvol10.4.pamphlet b/books/bookvol10.4.pamphlet
index b7f9567..bc21eea 100644
--- a/books/bookvol10.4.pamphlet
+++ b/books/bookvol10.4.pamphlet
@@ -4342,6 +4342,321 @@ CommonDenominator(R, Q, A): Exports == Implementation where
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package COMPFACT ComplexFactorization}
+\pagehead{ComplexFactorization}{COMPFACT}
+\pagepic{ps/v104complexfactorization.ps}{COMPFACT}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package COMPFACT ComplexFactorization>>=
+)abbrev package COMPFACT ComplexFactorization
+++ Author:
+++ Date Created:
+++ Date Last Updated:
+++ Basic Functions:
+++ Related Constructors: Complex, UnivariatePolynomial
+++ Also See:
+++ AMS Classifications:
+++ Keywords: complex, polynomial factorization, factor
+++ References:
+ComplexFactorization(RR,PR) : C == T where
+  RR   :    EuclideanDomain   -- R is Z or Q
+  PR   :    UnivariatePolynomialCategory Complex RR
+  R    ==>  Complex RR
+  I    ==>  Integer
+  RN   ==>  Fraction I
+  GI   ==>  Complex I
+  GRN  ==>  Complex RN
+
+
+  C  == with
+
+     factor        :   PR   ->  Factored PR
+       ++ factor(p) factorizes the polynomial p with complex coefficients.
+
+  T  == add
+     SUP    ==> SparseUnivariatePolynomial
+     fUnion ==> Union("nil", "sqfr", "irred", "prime")
+     FF     ==> Record(flg:fUnion, fctr:PR, xpnt:Integer)
+     SAEF   :=  SimpleAlgebraicExtensionAlgFactor(SUP RN,GRN,SUP GRN)
+     UPCF2  :=  UnivariatePolynomialCategoryFunctions2(R,PR,GRN,SUP GRN)
+     UPCFB  :=  UnivariatePolynomialCategoryFunctions2(GRN,SUP GRN,R,PR)
+
+     myMap(r:R) : GRN ==
+       R is GI   =>
+         cr :GI := r pretend GI
+         complex((real cr)::RN,(imag cr)::RN)
+       R is GRN  => r pretend GRN
+
+     compND(cc:GRN):Record(cnum:GI,cden:Integer) ==
+       ccr:=real cc
+       cci:=imag cc
+       dccr:=denom ccr
+       dcci:=denom cci
+       ccd:=lcm(dccr,dcci)
+       [complex(((ccd exquo dccr)::Integer)*numer ccr,
+                ((ccd exquo dcci)::Integer)*numer cci),ccd]
+
+     conv(f:SUP GRN) :Record(convP:SUP GI, convD:RN) ==
+       pris:SUP GI :=0
+       dris:Integer:=1
+       dris1:Integer:=1
+       pdris:Integer:=1
+       for i in 0..(degree f) repeat
+         (cf:= coefficient(f,i)) = 0 => "next i"
+         cdf:=compND cf
+         dris:=lcm(cdf.cden,dris1)
+         pris:=((dris exquo dris1)::Integer)*pris +
+               ((dris exquo cdf.cden)::Integer)*
+                 monomial(cdf.cnum,i)$(SUP GI)
+         dris1:=dris
+       [pris,dris::RN]
+
+     backConv(ffr:Factored SUP GRN) : Factored PR ==
+       R is GRN =>
+         makeFR((unit ffr) pretend PR,[[f.flg,(f.fctr) pretend PR,f.xpnt]
+                                        for f in factorList ffr])
+       R is GI  =>
+         const:=unit ffr
+         ris: List FF :=[]
+         for ff in factorList ffr repeat
+           fact:=primitivePart(conv(ff.fctr).convP)
+           expf:=ff.xpnt
+           ris:=cons([ff.flg,fact pretend PR,expf],ris)
+           lc:GRN := myMap leadingCoefficient(fact pretend PR)
+           const:= const*(leadingCoefficient(ff.fctr)/lc)**expf
+         uconst:GI:= compND(coefficient(const,0)).cnum
+         makeFR((uconst pretend R)::PR,ris)
+
+
+     factor(pol : PR)  : Factored PR ==
+       ratPol:SUP GRN := 0
+       ratPol:=map(myMap,pol)$UPCF2
+       ffr:=factor ratPol
+       backConv ffr
+
+@
+<<COMPFACT.dotabb>>=
+"COMPFACT" [color="#FF4488",href="bookvol10.4.pdf#nameddest=COMPFACT"]
+"COMPCAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=COMPCAT"]
+"COMPFACT" -> "COMPCAT"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package COMPLEX2 ComplexFunctions2}
+\pagehead{ComplexFunctions2}{COMPLEX2}
+\pagepic{ps/v104complexfunctions2.ps}{COMPLEX2}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package COMPLEX2 ComplexFunctions2>>=
+)abbrev package COMPLEX2 ComplexFunctions2
+++ Author:
+++ Date Created:
+++ Date Last Updated:
+++ Basic Functions:
+++ Related Constructors:
+++ Also See:
+++ AMS Classifications:
+++ Keywords:
+++ References:
+++ Description:
+++   This package extends maps from underlying rings to maps between
+++   complex over those rings.
+ComplexFunctions2(R:CommutativeRing, S:CommutativeRing): with
+    map:     (R -> S, Complex R) -> Complex S
+      ++ map(f,u) maps f onto real and imaginary parts of u.
+ == add
+    map(fn, gr) == complex(fn real gr, fn imag gr)
+
+@
+<<COMPLEX2.dotabb>>=
+"COMPLEX2" [color="#FF4488",href="bookvol10.4.pdf#nameddest=COMPLEX2"]
+"BMODULE" [color="#4488FF",href="bookvol10.2.pdf#nameddest=BMODULE"]
+"COMPLEX2" -> "BMODULE"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package CINTSLPE ComplexIntegerSolveLinearPolynomialEquation}
+\pagehead{ComplexIntegerSolveLinearPolynomialEquation}{CINTSLPE}
+\pagepic{ps/v104complexintegersolvelinearpolynomialequation.ps}{CINTSLPE}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package CINTSLPE ComplexIntegerSolveLinearPolynomialEquation>>=
+)abbrev package CINTSLPE ComplexIntegerSolveLinearPolynomialEquation
+++ Author: James Davenport
+++ Date Created: 1990
+++ Date Last Updated:
+++ Basic Functions:
+++ Related Constructors:
+++ Also See:
+++ AMS Classifications:
+++ Keywords:
+++ References:
+++ Description:
+++ This package provides the generalized euclidean algorithm which is
+++ needed as the basic step for factoring polynomials.
+ComplexIntegerSolveLinearPolynomialEquation(R,CR): C == T
+ where
+  CP ==> SparseUnivariatePolynomial CR
+  R:IntegerNumberSystem
+  CR:ComplexCategory(R)
+  C == with
+      solveLinearPolynomialEquation: (List CP,CP) -> Union(List CP,"failed")
+                   ++ solveLinearPolynomialEquation([f1, ..., fn], g)
+                   ++ where (fi relatively prime to each other)
+                   ++ returns a list of ai such that
+                   ++ g = sum ai prod fj (j \= i) or
+                   ++ equivalently g/prod fj = sum (ai/fi)
+                   ++ or returns "failed" if no such list exists
+  T == add
+      oldlp:List CP := []
+      slpePrime:R:=(2::R)
+      oldtable:Vector List CP := empty()
+      solveLinearPolynomialEquation(lp,p) ==
+         if (oldlp ^= lp) then
+            -- we have to generate a new table
+            deg:= _+/[degree u for u in lp]
+            ans:Union(Vector List CP,"failed"):="failed"
+            slpePrime:=67108859::R   -- 2**26 -5 : a prime
+                 -- a good test case for this package is
+                 --  (good question?)
+            while (ans case "failed") repeat
+              ans:=tablePow(deg,complex(slpePrime,0),lp)$GenExEuclid(CR,CP)
+              if (ans case "failed") then
+                 slpePrime:=  slpePrime-4::R
+                 while not prime?(slpePrime)$IntegerPrimesPackage(R) repeat
+                   slpePrime:= slpePrime-4::R
+            oldtable:=(ans:: Vector List CP)
+         answer:=solveid(p,complex(slpePrime,0),oldtable)
+         answer
+
+@
+<<CINTSLPE.dotabb>>=
+"CINTSLPE" [color="#FF4488",href="bookvol10.4.pdf#nameddest=CINTSLPE"]
+"COMPCAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=COMPCAT"]
+"CINTSLPE" -> "COMPCAT"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package COMPLPAT ComplexPattern}
+\pagehead{ComplexPattern}{COMPLPAT}
+\pagepic{ps/v104complexpattern.ps}{COMPLPAT}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package COMPLPAT ComplexPattern>>=
+)abbrev package COMPLPAT ComplexPattern
+++ Author: Barry Trager
+++ Date Created: 30 Nov 1995
+++ Date Last Updated:
+++ Basic Functions:
+++ Related Constructors:
+++ Also See:
+++ AMS Classifications:
+++ Keywords: complex, patterns
+++ References:
+++ Description:
+++ This package supports converting complex expressions to patterns
+ComplexPattern(R, S, CS) : C == T where
+    R: SetCategory
+    S: Join(ConvertibleTo Pattern R, CommutativeRing)
+    CS: ComplexCategory S
+    C == with
+       convert: CS -> Pattern R
+	  ++ convert(cs) converts the complex expression cs to a pattern
+
+    T == add
+
+       ipat : Pattern R := patternVariable("%i"::Symbol, true, false, false)
+
+       convert(cs) ==
+          zero? imag cs => convert real cs
+          convert real cs + ipat * convert imag cs
+
+@
+<<COMPLPAT.dotabb>>=
+"COMPLPAT" [color="#FF4488",href="bookvol10.4.pdf#nameddest=COMPLPAT"]
+"COMPCAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=COMPCAT"]
+"COMPLPAT" -> "COMPCAT"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package CPMATCH ComplexPatternMatch}
+\pagehead{ComplexPatternMatch}{CPMATCH}
+\pagepic{ps/v104complexpatternmatch.ps}{CPMATCH}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package CPMATCH ComplexPatternMatch>>=
+)abbrev package CPMATCH ComplexPatternMatch
+++ Author: Barry Trager
+++ Date Created: 30 Nov 1995
+++ Date Last Updated:
+++ Basic Functions:
+++ Related Constructors:
+++ Also See:
+++ AMS Classifications:
+++ Keywords: complex, pattern matching
+++ References:
+++ Description:
+++ This package supports matching patterns involving complex expressions
+ComplexPatternMatch(R, S, CS) : C == T where
+    R: SetCategory
+    S: Join(PatternMatchable R, CommutativeRing)
+    CS: ComplexCategory S
+    PMRS ==> PatternMatchResult(R, CS)
+    PS   ==> Polynomial S
+    C == with
+       if PS has PatternMatchable(R) then
+           patternMatch: (CS, Pattern R, PMRS) -> PMRS
+             ++ patternMatch(cexpr, pat, res) matches the pattern pat to the
+             ++ complex expression cexpr. res contains the variables of pat
+             ++ which are already matched and their matches.
+
+    T == add
+
+       import PatternMatchPushDown(R, S, CS)
+       import PatternMatchResultFunctions2(R, PS, CS)
+       import PatternMatchResultFunctions2(R, CS, PS)
+
+       ivar : PS := "%i"::Symbol::PS
+
+       makeComplex(p:PS):CS ==
+          up := univariate p
+	  degree up > 1 => error "not linear in %i"
+	  icoef:=leadingCoefficient(up)
+          rcoef:=leadingCoefficient(reductum p)
+	  complex(rcoef,icoef)
+
+       makePoly(cs:CS):PS == real(cs)*ivar + imag(cs)::PS
+
+       if PS has PatternMatchable(R) then
+          patternMatch(cs, pat, result) ==
+	     zero? imag cs =>
+                patternMatch(real cs, pat, result)
+             map(makeComplex,
+                patternMatch(makePoly cs, pat, map(makePoly, result)))
+
+@
+<<CPMATCH.dotabb>>=
+"CPMATCH" [color="#FF4488",href="bookvol10.4.pdf#nameddest=CPMATCH"]
+"COMPCAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=COMPCAT"]
+"CPMATCH" -> "COMPCAT"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{package CRFP ComplexRootFindingPackage}
 \pagehead{ComplexRootFindingPackage}{CRFP}
 \pagepic{ps/v104complexrootfindingpackage.ps}{CRFP}{1.00}
@@ -11318,6 +11633,1669 @@ ErrorFunctions() : Exports == Implementation where
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package GBEUCLID EuclideanGroebnerBasisPackage}
+<<EuclideanGroebnerBasisPackage.input>>=
+)spool EuclideanGroebnerBasisPackage.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 24
+a1:DMP([y,x],INT):= (9*x**2 + 5*x - 3)+ y*(3*x**2 + 2*x + 1)
+--R
+--R            2                2
+--R   (1)  3y x  + 2y x + y + 9x  + 5x - 3
+--R                       Type: DistributedMultivariatePolynomial([y,x],Integer)
+--E 1
+
+--S 2 of 24
+a2:DMP([y,x],INT):= (6*x**3 - 2*x**2 - 3*x +3) + y*(2*x**3 - x - 1)
+--R
+--R            3               3     2
+--R   (2)  2y x  - y x - y + 6x  - 2x  - 3x + 3
+--R                       Type: DistributedMultivariatePolynomial([y,x],Integer)
+--E 2
+
+--S 3 of 24
+a3:DMP([y,x],INT):= (3*x**3 + 2*x**2) + y*(x**3 + x**2)
+--R
+--R           3      2     3     2
+--R   (3)  y x  + y x  + 3x  + 2x
+--R                       Type: DistributedMultivariatePolynomial([y,x],Integer)
+--E 3
+
+--S 4 of 24
+an:=[a1,a2,a3]
+--R
+--R   (4)
+--R        2                2               3               3     2
+--R   [3y x  + 2y x + y + 9x  + 5x - 3, 2y x  - y x - y + 6x  - 2x  - 3x + 3,
+--R       3      2     3     2
+--R    y x  + y x  + 3x  + 2x ]
+--R                  Type: List DistributedMultivariatePolynomial([y,x],Integer)
+--E 4
+
+--S 5 of 24
+euclideanGroebner(an)
+--R
+--R                                2            3     2
+--R   (5)  [y x - y + x + 3,2y + 2x  - 3x - 6,2x  - 5x  - 5x]
+--R                  Type: List DistributedMultivariatePolynomial([y,x],Integer)
+--E 5
+
+--S 6 of 24
+euclideanGroebner(an,"redcrit")
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R         2               2
+--R   - 2y x  - y x - y - 6x  - 3x + 3
+--R
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R   y x - y + x + 3
+--R
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R          2
+--R   4y + 4x  - 6x - 12
+--R
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R       3      2
+--R   - 4x  + 10x  + 10x
+--R
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R          2
+--R   2y + 2x  - 3x - 6
+--R
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R   0
+--R
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R       3     2
+--R   - 2x  + 5x  + 5x
+--R
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R   0
+--R
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R   0
+--R
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R   0
+--R
+--R
+--R       THE GROEBNER BASIS over EUCLIDEAN DOMAIN
+--R
+--R                                2            3     2
+--R   (6)  [y x - y + x + 3,2y + 2x  - 3x - 6,2x  - 5x  - 5x]
+--R                  Type: List DistributedMultivariatePolynomial([y,x],Integer)
+--E 6
+
+--S 7 of 24
+euclideanGroebner(an,"info")
+--R
+--R   you choose option  -info-
+--R   abbrev. for the following information strings are
+--R     ci  =>  Leading monomial  for critpair calculation
+--R     tci =>  Number of terms of polynomial i
+--R     cj  =>  Leading monomial  for critpair calculation
+--R     tcj =>  Number of terms of polynomial j
+--R     c   =>  Leading monomial of critpair polynomial
+--R     tc  =>  Number of terms of critpair polynomial
+--R     rc  =>  Leading monomial of redcritpair polynomial
+--R     trc =>  Number of terms of redcritpair polynomial
+--R     tF  =>  Number of polynomials in reduction list F
+--R     tD  =>  Number of critpairs still to do
+--R
+--R
+--R
+--R
+--R
+--R            3               3              2              2
+--R   [[ci= y x ,tci= 7,cj= y x ,tcj= 4,c= y x ,tc= 6,rc= y x ,trc= 6,tH= 3,tD= 3]]
+--R
+--R
+--R            2               2
+--R   [[ci= y x ,tci= 6,cj= y x ,tcj= 6,c= y x,tc= 4,rc= y x,trc= 4,tH= 1,tD= 3]]
+--R
+--R
+--R            2
+--R   [[ci= y x ,tci= 6,cj= y x,tcj= 4,c= y x,tc= 5,rc= y,trc= 4,tH= 2,tD= 3]]
+--R
+--R
+--R                                                 3
+--R   [[ci= y x,tci= 4,cj= y,tcj= 4,c= y,tc= 5,rc= x ,trc= 3,tH= 3,tD= 3]]
+--R
+--R
+--R            2
+--R   [[ci= y x ,tci= 6,cj= y x,tcj= 4,c= y x,tc= 5,rc= y,trc= 4,tH= 3,tD= 4]]
+--R
+--R
+--R   [[ci= y,tci= 4,cj= y,tcj= 4,c= 0,tc= 0,rc= 0,trc= 0,tH= 3,tD= 3]]
+--R
+--R
+--R                                                 3
+--R   [[ci= y x,tci= 4,cj= y,tcj= 4,c= y,tc= 5,rc= x ,trc= 3,tH= 3,tD= 3]]
+--R
+--R
+--R          3             3
+--R   [[ci= x ,tci= 3,cj= x ,tcj= 3,c= 0,tc= 0,rc= 0,trc= 0,tH= 3,tD= 2]]
+--R
+--R
+--R            3                             2
+--R   [[ci= y x ,tci= 4,cj= y x,tcj= 4,c= y x ,tc= 3,rc= 0,trc= 0,tH= 3,tD= 1]]
+--R
+--R
+--R                       3              2
+--R   [[ci= y,tci= 4,cj= x ,tcj= 3,c= y x ,tc= 5,rc= 0,trc= 0,tH= 3,tD= 0]]
+--R
+--R
+--R     There are
+--R
+--R   3
+--R
+--R     Groebner Basis Polynomials.
+--R
+--R
+--R       THE GROEBNER BASIS over EUCLIDEAN DOMAIN
+--R
+--R                                2            3     2
+--R   (7)  [y x - y + x + 3,2y + 2x  - 3x - 6,2x  - 5x  - 5x]
+--R                  Type: List DistributedMultivariatePolynomial([y,x],Integer)
+--E 7
+
+--S 8 of 24
+euclideanGroebner(an,"info","redcrit")
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R         2               2
+--R   - 2y x  - y x - y - 6x  - 3x + 3
+--R
+--R
+--R
+--R   you choose option  -info-
+--R   abbrev. for the following information strings are
+--R     ci  =>  Leading monomial  for critpair calculation
+--R     tci =>  Number of terms of polynomial i
+--R     cj  =>  Leading monomial  for critpair calculation
+--R     tcj =>  Number of terms of polynomial j
+--R     c   =>  Leading monomial of critpair polynomial
+--R     tc  =>  Number of terms of critpair polynomial
+--R     rc  =>  Leading monomial of redcritpair polynomial
+--R     trc =>  Number of terms of redcritpair polynomial
+--R     tF  =>  Number of polynomials in reduction list F
+--R     tD  =>  Number of critpairs still to do
+--R
+--R
+--R
+--R
+--R
+--R            3               3              2              2
+--R   [[ci= y x ,tci= 7,cj= y x ,tcj= 4,c= y x ,tc= 6,rc= y x ,trc= 6,tH= 3,tD= 3]]
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R   y x - y + x + 3
+--R
+--R
+--R
+--R            2               2
+--R   [[ci= y x ,tci= 6,cj= y x ,tcj= 6,c= y x,tc= 4,rc= y x,trc= 4,tH= 1,tD= 3]]
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R          2
+--R   4y + 4x  - 6x - 12
+--R
+--R
+--R
+--R            2
+--R   [[ci= y x ,tci= 6,cj= y x,tcj= 4,c= y x,tc= 5,rc= y,trc= 4,tH= 2,tD= 3]]
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R       3      2
+--R   - 4x  + 10x  + 10x
+--R
+--R
+--R
+--R                                                 3
+--R   [[ci= y x,tci= 4,cj= y,tcj= 4,c= y,tc= 5,rc= x ,trc= 3,tH= 3,tD= 3]]
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R          2
+--R   2y + 2x  - 3x - 6
+--R
+--R
+--R
+--R            2
+--R   [[ci= y x ,tci= 6,cj= y x,tcj= 4,c= y x,tc= 5,rc= y,trc= 4,tH= 3,tD= 4]]
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R   0
+--R
+--R
+--R
+--R   [[ci= y,tci= 4,cj= y,tcj= 4,c= 0,tc= 0,rc= 0,trc= 0,tH= 3,tD= 3]]
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R       3     2
+--R   - 2x  + 5x  + 5x
+--R
+--R
+--R
+--R                                                 3
+--R   [[ci= y x,tci= 4,cj= y,tcj= 4,c= y,tc= 5,rc= x ,trc= 3,tH= 3,tD= 3]]
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R   0
+--R
+--R
+--R
+--R          3             3
+--R   [[ci= x ,tci= 3,cj= x ,tcj= 3,c= 0,tc= 0,rc= 0,trc= 0,tH= 3,tD= 2]]
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R   0
+--R
+--R
+--R
+--R            3                             2
+--R   [[ci= y x ,tci= 4,cj= y x,tcj= 4,c= y x ,tc= 3,rc= 0,trc= 0,tH= 3,tD= 1]]
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R   0
+--R
+--R
+--R
+--R                       3              2
+--R   [[ci= y,tci= 4,cj= x ,tcj= 3,c= y x ,tc= 5,rc= 0,trc= 0,tH= 3,tD= 0]]
+--R
+--R
+--R     There are
+--R
+--R   3
+--R
+--R     Groebner Basis Polynomials.
+--R
+--R
+--R       THE GROEBNER BASIS over EUCLIDEAN DOMAIN
+--R
+--R                                2            3     2
+--R   (8)  [y x - y + x + 3,2y + 2x  - 3x - 6,2x  - 5x  - 5x]
+--R                  Type: List DistributedMultivariatePolynomial([y,x],Integer)
+--E 8
+
+--S 9 of 24
+b1:HDMP([y,x],INT):= (9*x**2 + 5*x - 3)+ y*(3*x**2 + 2*x + 1)
+--R
+--R            2            2
+--R   (9)  3y x  + 2y x + 9x  + y + 5x - 3
+--R            Type: HomogeneousDistributedMultivariatePolynomial([y,x],Integer)
+--E 9
+
+--S 10 of 24
+b2:HDMP([y,x],INT):= (6*x**3 - 2*x**2 - 3*x +3) + y*(2*x**3 - x - 1)
+--R
+--R             3     3           2
+--R   (10)  2y x  + 6x  - y x - 2x  - y - 3x + 3
+--R            Type: HomogeneousDistributedMultivariatePolynomial([y,x],Integer)
+--E 10
+
+--S 11 of 24
+b3:HDMP([y,x],INT):= (3*x**3 + 2*x**2) + y*(x**3 + x**2)
+--R
+--R            3      2     3     2
+--R   (11)  y x  + y x  + 3x  + 2x
+--R            Type: HomogeneousDistributedMultivariatePolynomial([y,x],Integer)
+--E 11
+
+--S 12 of 24
+bn:=[b1,b2,b3]
+--R
+--R   (12)
+--R        2            2                   3     3           2
+--R   [3y x  + 2y x + 9x  + y + 5x - 3, 2y x  + 6x  - y x - 2x  - y - 3x + 3,
+--R       3      2     3     2
+--R    y x  + y x  + 3x  + 2x ]
+--R       Type: List HomogeneousDistributedMultivariatePolynomial([y,x],Integer)
+--E 12
+
+--S 13 of 24
+euclideanGroebner(bn)
+--R
+--R            2                                 2
+--R   (13)  [2y  - 5y - 8x - 3,y x - y + x + 3,2x  + 2y - 3x - 6]
+--R       Type: List HomogeneousDistributedMultivariatePolynomial([y,x],Integer)
+--E 13
+
+--S 14 of 24
+euclideanGroebner(bn,"redcrit")
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R         2           2
+--R   - 2y x  - y x - 6x  - y - 3x + 3
+--R
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R   y x - y + x + 3
+--R
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R     2
+--R   4x  + 4y - 6x - 12
+--R
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R     2
+--R   2x  + 2y - 3x - 6
+--R
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R   0
+--R
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R       2
+--R   - 2y  + 5y + 8x + 3
+--R
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R   0
+--R
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R   0
+--R
+--R
+--R       THE GROEBNER BASIS over EUCLIDEAN DOMAIN
+--R
+--R            2                                 2
+--R   (14)  [2y  - 5y - 8x - 3,y x - y + x + 3,2x  + 2y - 3x - 6]
+--R       Type: List HomogeneousDistributedMultivariatePolynomial([y,x],Integer)
+--E 14
+
+--S 15 of 24
+euclideanGroebner(bn,"info")
+--R
+--R   you choose option  -info-
+--R   abbrev. for the following information strings are
+--R     ci  =>  Leading monomial  for critpair calculation
+--R     tci =>  Number of terms of polynomial i
+--R     cj  =>  Leading monomial  for critpair calculation
+--R     tcj =>  Number of terms of polynomial j
+--R     c   =>  Leading monomial of critpair polynomial
+--R     tc  =>  Number of terms of critpair polynomial
+--R     rc  =>  Leading monomial of redcritpair polynomial
+--R     trc =>  Number of terms of redcritpair polynomial
+--R     tF  =>  Number of polynomials in reduction list F
+--R     tD  =>  Number of critpairs still to do
+--R
+--R
+--R
+--R
+--R
+--R            3               3              2              2
+--R   [[ci= y x ,tci= 7,cj= y x ,tcj= 4,c= y x ,tc= 6,rc= y x ,trc= 6,tH= 3,tD= 3]]
+--R
+--R
+--R            2               2
+--R   [[ci= y x ,tci= 6,cj= y x ,tcj= 6,c= y x,tc= 4,rc= y x,trc= 4,tH= 1,tD= 3]]
+--R
+--R
+--R            2                                         2
+--R   [[ci= y x ,tci= 6,cj= y x,tcj= 4,c= y x,tc= 5,rc= x ,trc= 4,tH= 2,tD= 3]]
+--R
+--R
+--R            2                                         2
+--R   [[ci= y x ,tci= 6,cj= y x,tcj= 4,c= y x,tc= 5,rc= x ,trc= 4,tH= 2,tD= 3]]
+--R
+--R
+--R          2             2
+--R   [[ci= x ,tci= 4,cj= x ,tcj= 4,c= 0,tc= 0,rc= 0,trc= 0,tH= 2,tD= 2]]
+--R
+--R
+--R                         2            2            2
+--R   [[ci= y x,tci= 4,cj= x ,tcj= 4,c= y ,tc= 5,rc= y ,trc= 4,tH= 3,tD= 2]]
+--R
+--R
+--R                         2            2
+--R   [[ci= y x,tci= 4,cj= y ,tcj= 4,c= y ,tc= 5,rc= 0,trc= 0,tH= 3,tD= 1]]
+--R
+--R
+--R            3                             2
+--R   [[ci= y x ,tci= 4,cj= y x,tcj= 4,c= y x ,tc= 3,rc= 0,trc= 0,tH= 3,tD= 0]]
+--R
+--R
+--R     There are
+--R
+--R   3
+--R
+--R     Groebner Basis Polynomials.
+--R
+--R
+--R       THE GROEBNER BASIS over EUCLIDEAN DOMAIN
+--R
+--R            2                                 2
+--R   (15)  [2y  - 5y - 8x - 3,y x - y + x + 3,2x  + 2y - 3x - 6]
+--R       Type: List HomogeneousDistributedMultivariatePolynomial([y,x],Integer)
+--E 15
+
+--S 16 of 24
+euclideanGroebner(bn,"info","redcrit")
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R         2           2
+--R   - 2y x  - y x - 6x  - y - 3x + 3
+--R
+--R
+--R
+--R   you choose option  -info-
+--R   abbrev. for the following information strings are
+--R     ci  =>  Leading monomial  for critpair calculation
+--R     tci =>  Number of terms of polynomial i
+--R     cj  =>  Leading monomial  for critpair calculation
+--R     tcj =>  Number of terms of polynomial j
+--R     c   =>  Leading monomial of critpair polynomial
+--R     tc  =>  Number of terms of critpair polynomial
+--R     rc  =>  Leading monomial of redcritpair polynomial
+--R     trc =>  Number of terms of redcritpair polynomial
+--R     tF  =>  Number of polynomials in reduction list F
+--R     tD  =>  Number of critpairs still to do
+--R
+--R
+--R
+--R
+--R
+--R            3               3              2              2
+--R   [[ci= y x ,tci= 7,cj= y x ,tcj= 4,c= y x ,tc= 6,rc= y x ,trc= 6,tH= 3,tD= 3]]
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R   y x - y + x + 3
+--R
+--R
+--R
+--R            2               2
+--R   [[ci= y x ,tci= 6,cj= y x ,tcj= 6,c= y x,tc= 4,rc= y x,trc= 4,tH= 1,tD= 3]]
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R     2
+--R   4x  + 4y - 6x - 12
+--R
+--R
+--R
+--R            2                                         2
+--R   [[ci= y x ,tci= 6,cj= y x,tcj= 4,c= y x,tc= 5,rc= x ,trc= 4,tH= 2,tD= 3]]
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R     2
+--R   2x  + 2y - 3x - 6
+--R
+--R
+--R
+--R            2                                         2
+--R   [[ci= y x ,tci= 6,cj= y x,tcj= 4,c= y x,tc= 5,rc= x ,trc= 4,tH= 2,tD= 3]]
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R   0
+--R
+--R
+--R
+--R          2             2
+--R   [[ci= x ,tci= 4,cj= x ,tcj= 4,c= 0,tc= 0,rc= 0,trc= 0,tH= 2,tD= 2]]
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R       2
+--R   - 2y  + 5y + 8x + 3
+--R
+--R
+--R
+--R                         2            2            2
+--R   [[ci= y x,tci= 4,cj= x ,tcj= 4,c= y ,tc= 5,rc= y ,trc= 4,tH= 3,tD= 2]]
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R   0
+--R
+--R
+--R
+--R                         2            2
+--R   [[ci= y x,tci= 4,cj= y ,tcj= 4,c= y ,tc= 5,rc= 0,trc= 0,tH= 3,tD= 1]]
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R   0
+--R
+--R
+--R
+--R            3                             2
+--R   [[ci= y x ,tci= 4,cj= y x,tcj= 4,c= y x ,tc= 3,rc= 0,trc= 0,tH= 3,tD= 0]]
+--R
+--R
+--R     There are
+--R
+--R   3
+--R
+--R     Groebner Basis Polynomials.
+--R
+--R
+--R       THE GROEBNER BASIS over EUCLIDEAN DOMAIN
+--R
+--R            2                                 2
+--R   (16)  [2y  - 5y - 8x - 3,y x - y + x + 3,2x  + 2y - 3x - 6]
+--R       Type: List HomogeneousDistributedMultivariatePolynomial([y,x],Integer)
+--E 16
+
+--S 17 of 24
+c1:GDMP([y,x],INT,DIRPROD(2,NNI)):= (9*x**2 + 5*x - 3)+ y*(3*x**2 + 2*x + 1)
+--R
+--R             2                2
+--R   (17)  3y x  + 2y x + y + 9x  + 5x - 3
+--RType: GeneralDistributedMultivariatePolynomial([y,x],Integer,DirectProduct(2,NonNegativeInteger))
+--E 17
+
+--S 18 of 24
+c2:GDMP([y,x],INT,DIRPROD(2,NNI)):= (6*x**3 - 2*x**2 - 3*x +3) + y*(2*x**3 - x - 1)
+--R
+--R             3               3     2
+--R   (18)  2y x  - y x - y + 6x  - 2x  - 3x + 3
+--RType: GeneralDistributedMultivariatePolynomial([y,x],Integer,DirectProduct(2,NonNegativeInteger))
+--E 18
+
+--S 19 of 24
+c3:GDMP([y,x],INT,DIRPROD(2,NNI)):= (3*x**3 + 2*x**2) + y*(x**3 + x**2)
+--R
+--R            3      2     3     2
+--R   (19)  y x  + y x  + 3x  + 2x
+--RType: GeneralDistributedMultivariatePolynomial([y,x],Integer,DirectProduct(2,NonNegativeInteger))
+--E 19
+
+--S 20 of 24
+cn:=[c1,c2,c3]
+--R
+--R   (20)
+--R        2                2               3               3     2
+--R   [3y x  + 2y x + y + 9x  + 5x - 3, 2y x  - y x - y + 6x  - 2x  - 3x + 3,
+--R       3      2     3     2
+--R    y x  + y x  + 3x  + 2x ]
+--RType: List GeneralDistributedMultivariatePolynomial([y,x],Integer,DirectProduct(2,NonNegativeInteger))
+--E 20
+
+--S 21 of 24
+euclideanGroebner(cn)
+--R
+--R                                 2            3     2
+--R   (21)  [y x - y + x + 3,2y + 2x  - 3x - 6,2x  - 5x  - 5x]
+--RType: List GeneralDistributedMultivariatePolynomial([y,x],Integer,DirectProduct(2,NonNegativeInteger))
+--E 21
+
+--S 22 of 24
+euclideanGroebner(cn,"redcrit")
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R         2               2
+--R   - 2y x  - y x - y - 6x  - 3x + 3
+--R
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R   y x - y + x + 3
+--R
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R          2
+--R   4y + 4x  - 6x - 12
+--R
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R       3      2
+--R   - 4x  + 10x  + 10x
+--R
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R          2
+--R   2y + 2x  - 3x - 6
+--R
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R   0
+--R
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R       3     2
+--R   - 2x  + 5x  + 5x
+--R
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R   0
+--R
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R   0
+--R
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R   0
+--R
+--R
+--R       THE GROEBNER BASIS over EUCLIDEAN DOMAIN
+--R
+--R                                 2            3     2
+--R   (22)  [y x - y + x + 3,2y + 2x  - 3x - 6,2x  - 5x  - 5x]
+--RType: List GeneralDistributedMultivariatePolynomial([y,x],Integer,DirectProduct(2,NonNegativeInteger))
+--E 22
+
+--S 23 of 24
+euclideanGroebner(cn,"info")
+--R
+--R   you choose option  -info-
+--R   abbrev. for the following information strings are
+--R     ci  =>  Leading monomial  for critpair calculation
+--R     tci =>  Number of terms of polynomial i
+--R     cj  =>  Leading monomial  for critpair calculation
+--R     tcj =>  Number of terms of polynomial j
+--R     c   =>  Leading monomial of critpair polynomial
+--R     tc  =>  Number of terms of critpair polynomial
+--R     rc  =>  Leading monomial of redcritpair polynomial
+--R     trc =>  Number of terms of redcritpair polynomial
+--R     tF  =>  Number of polynomials in reduction list F
+--R     tD  =>  Number of critpairs still to do
+--R
+--R
+--R
+--R
+--R
+--R            3               3              2              2
+--R   [[ci= y x ,tci= 7,cj= y x ,tcj= 4,c= y x ,tc= 6,rc= y x ,trc= 6,tH= 3,tD= 3]]
+--R
+--R
+--R            2               2
+--R   [[ci= y x ,tci= 6,cj= y x ,tcj= 6,c= y x,tc= 4,rc= y x,trc= 4,tH= 1,tD= 3]]
+--R
+--R
+--R            2
+--R   [[ci= y x ,tci= 6,cj= y x,tcj= 4,c= y x,tc= 5,rc= y,trc= 4,tH= 2,tD= 3]]
+--R
+--R
+--R                                                 3
+--R   [[ci= y x,tci= 4,cj= y,tcj= 4,c= y,tc= 5,rc= x ,trc= 3,tH= 3,tD= 3]]
+--R
+--R
+--R            2
+--R   [[ci= y x ,tci= 6,cj= y x,tcj= 4,c= y x,tc= 5,rc= y,trc= 4,tH= 3,tD= 4]]
+--R
+--R
+--R   [[ci= y,tci= 4,cj= y,tcj= 4,c= 0,tc= 0,rc= 0,trc= 0,tH= 3,tD= 3]]
+--R
+--R
+--R                                                 3
+--R   [[ci= y x,tci= 4,cj= y,tcj= 4,c= y,tc= 5,rc= x ,trc= 3,tH= 3,tD= 3]]
+--R
+--R
+--R          3             3
+--R   [[ci= x ,tci= 3,cj= x ,tcj= 3,c= 0,tc= 0,rc= 0,trc= 0,tH= 3,tD= 2]]
+--R
+--R
+--R            3                             2
+--R   [[ci= y x ,tci= 4,cj= y x,tcj= 4,c= y x ,tc= 3,rc= 0,trc= 0,tH= 3,tD= 1]]
+--R
+--R
+--R                       3              2
+--R   [[ci= y,tci= 4,cj= x ,tcj= 3,c= y x ,tc= 5,rc= 0,trc= 0,tH= 3,tD= 0]]
+--R
+--R
+--R     There are
+--R
+--R   3
+--R
+--R     Groebner Basis Polynomials.
+--R
+--R
+--R       THE GROEBNER BASIS over EUCLIDEAN DOMAIN
+--R
+--R                                 2            3     2
+--R   (23)  [y x - y + x + 3,2y + 2x  - 3x - 6,2x  - 5x  - 5x]
+--RType: List GeneralDistributedMultivariatePolynomial([y,x],Integer,DirectProduct(2,NonNegativeInteger))
+--E 23
+
+--S 24 of 24
+euclideanGroebner(cn,"info","redcrit")
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R         2               2
+--R   - 2y x  - y x - y - 6x  - 3x + 3
+--R
+--R
+--R
+--R   you choose option  -info-
+--R   abbrev. for the following information strings are
+--R     ci  =>  Leading monomial  for critpair calculation
+--R     tci =>  Number of terms of polynomial i
+--R     cj  =>  Leading monomial  for critpair calculation
+--R     tcj =>  Number of terms of polynomial j
+--R     c   =>  Leading monomial of critpair polynomial
+--R     tc  =>  Number of terms of critpair polynomial
+--R     rc  =>  Leading monomial of redcritpair polynomial
+--R     trc =>  Number of terms of redcritpair polynomial
+--R     tF  =>  Number of polynomials in reduction list F
+--R     tD  =>  Number of critpairs still to do
+--R
+--R
+--R
+--R
+--R
+--R            3               3              2              2
+--R   [[ci= y x ,tci= 7,cj= y x ,tcj= 4,c= y x ,tc= 6,rc= y x ,trc= 6,tH= 3,tD= 3]]
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R   y x - y + x + 3
+--R
+--R
+--R
+--R            2               2
+--R   [[ci= y x ,tci= 6,cj= y x ,tcj= 6,c= y x,tc= 4,rc= y x,trc= 4,tH= 1,tD= 3]]
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R          2
+--R   4y + 4x  - 6x - 12
+--R
+--R
+--R
+--R            2
+--R   [[ci= y x ,tci= 6,cj= y x,tcj= 4,c= y x,tc= 5,rc= y,trc= 4,tH= 2,tD= 3]]
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R       3      2
+--R   - 4x  + 10x  + 10x
+--R
+--R
+--R
+--R                                                 3
+--R   [[ci= y x,tci= 4,cj= y,tcj= 4,c= y,tc= 5,rc= x ,trc= 3,tH= 3,tD= 3]]
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R          2
+--R   2y + 2x  - 3x - 6
+--R
+--R
+--R
+--R            2
+--R   [[ci= y x ,tci= 6,cj= y x,tcj= 4,c= y x,tc= 5,rc= y,trc= 4,tH= 3,tD= 4]]
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R   0
+--R
+--R
+--R
+--R   [[ci= y,tci= 4,cj= y,tcj= 4,c= 0,tc= 0,rc= 0,trc= 0,tH= 3,tD= 3]]
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R       3     2
+--R   - 2x  + 5x  + 5x
+--R
+--R
+--R
+--R                                                 3
+--R   [[ci= y x,tci= 4,cj= y,tcj= 4,c= y,tc= 5,rc= x ,trc= 3,tH= 3,tD= 3]]
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R   0
+--R
+--R
+--R
+--R          3             3
+--R   [[ci= x ,tci= 3,cj= x ,tcj= 3,c= 0,tc= 0,rc= 0,trc= 0,tH= 3,tD= 2]]
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R   0
+--R
+--R
+--R
+--R            3                             2
+--R   [[ci= y x ,tci= 4,cj= y x,tcj= 4,c= y x ,tc= 3,rc= 0,trc= 0,tH= 3,tD= 1]]
+--R
+--R
+--R
+--R    reduced Critpair - Polynom :
+--R
+--R
+--R   0
+--R
+--R
+--R
+--R                       3              2
+--R   [[ci= y,tci= 4,cj= x ,tcj= 3,c= y x ,tc= 5,rc= 0,trc= 0,tH= 3,tD= 0]]
+--R
+--R
+--R     There are
+--R
+--R   3
+--R
+--R     Groebner Basis Polynomials.
+--R
+--R
+--R       THE GROEBNER BASIS over EUCLIDEAN DOMAIN
+--R
+--R                                 2            3     2
+--R   (24)  [y x - y + x + 3,2y + 2x  - 3x - 6,2x  - 5x  - 5x]
+--RType: List GeneralDistributedMultivariatePolynomial([y,x],Integer,DirectProduct(2,NonNegativeInteger))
+--E 24
+
+)spool
+)lisp (bye)
+@
+<<EuclideanGroebnerBasisPackage.help>>=
+====================================================================
+euclideanGroebner examples
+====================================================================
+
+Example to call euclideanGroebner:
+
+  a1:DMP([y,x],INT):= (9*x**2 + 5*x - 3)+ y*(3*x**2 + 2*x + 1)
+  a2:DMP([y,x],INT):= (6*x**3 - 2*x**2 - 3*x +3) + y*(2*x**3 - x - 1)
+  a3:DMP([y,x],INT):= (3*x**3 + 2*x**2) + y*(x**3 + x**2)
+  an:=[a1,a2,a3]
+  euclideanGroebner(an)
+
+This will return the weak euclidean Groebner basis set.
+All reductions are total reductions.
+
+You can get more information by providing a second argument.
+To get the reduced critical pairs do:
+
+  euclideanGroebner(an,"redcrit")
+
+You can get other information by calling:
+
+  euclideanGroebner(an,"info")
+
+which returns:
+   ci  =>  Leading monomial  for critpair calculation
+   tci =>  Number of terms of polynomial i
+   cj  =>  Leading monomial  for critpair calculation
+   tcj =>  Number of terms of polynomial j
+   c   =>  Leading monomial of critpair polynomial
+   tc  =>  Number of terms of critpair polynomial
+   rc  =>  Leading monomial of redcritpair polynomial
+   trc =>  Number of terms of redcritpair polynomial
+   tH  =>  Number of polynomials in reduction list H
+   tD  =>  Number of critpairs still to do
+
+The three argument form returns all of the information:
+
+  euclideanGroebner(an,"info","redcrit")
+
+
+The term ordering is determined by the polynomial type used. 
+Suggested types include
+   DistributedMultivariatePolynomial
+   HomogeneousDistributedMultivariatePolynomial
+   GeneralDistributedMultivariatePolynomial
+ 
+See Also:
+o )display operations euclideanGroebner
+o )show EuclideanGroebnerBasisPackage
+o )show DistributedMultivariatePolynomial
+o )show HomogeneousDistributedMultivariatePolynomial
+o )show GeneralDistributedMultivariatePolynomial
+
+@
+\pagehead{EuclideanGroebnerBasisPackage}{GBEUCLID}
+\pagepic{ps/v104euclideangroebnerbasispackage.ps}{GBEUCLID}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package GBEUCLID EuclideanGroebnerBasisPackage>>=
+)abbrev package GBEUCLID EuclideanGroebnerBasisPackage
+++ Authors: Gebauer, Moeller
+++ Date Created: 12-1-86
+++ Date Last Updated: 2-28-91
+++ Basic Functions:
+++ Related Constructors: Ideal, IdealDecompositionPackage, GroebnerPackage
+++ Also See:
+++ AMS Classifications:
+++ Keywords: groebner basis, polynomial ideal, euclidean domain
+++ References:
+++ Description: \spadtype{EuclideanGroebnerBasisPackage} computes groebner
+++ bases for polynomial ideals over euclidean domains.
+++ The basic computation provides
+++ a distinguished set of generators for these ideals.
+++ This basis allows an easy test for membership: the operation
+++ \spadfun{euclideanNormalForm} returns zero on ideal members. The string 
+++ "info" and "redcrit" can be given as additional args to provide 
+++ incremental information during the computation. If "info" is given,
+++  a computational summary is given for each s-polynomial. If "redcrit" 
+++ is given, the reduced critical pairs are printed. The term ordering
+++ is determined by the polynomial type used. Suggested types include
+++ \spadtype{DistributedMultivariatePolynomial},
+++ \spadtype{HomogeneousDistributedMultivariatePolynomial},
+++ \spadtype{GeneralDistributedMultivariatePolynomial}.
+ 
+EuclideanGroebnerBasisPackage(Dom, Expon, VarSet, Dpol): T == C where
+ 
+ Dom: EuclideanDomain
+ Expon: OrderedAbelianMonoidSup
+ VarSet: OrderedSet
+ Dpol: PolynomialCategory(Dom, Expon, VarSet)
+ 
+ T== with
+ 
+     euclideanNormalForm: (Dpol, List(Dpol) )  ->  Dpol
+       ++ euclideanNormalForm(poly,gb) reduces the polynomial poly modulo the
+       ++ precomputed groebner basis gb giving a canonical representative
+       ++ of the residue class.
+     euclideanGroebner: List(Dpol) -> List(Dpol)
+       ++ euclideanGroebner(lp) computes a groebner basis for a polynomial 
+       ++ ideal over a euclidean domain generated by the list of polys lp.
+       ++
+       ++X a1:DMP([y,x],INT):= (9*x**2 + 5*x - 3)+ y*(3*x**2 + 2*x + 1)
+       ++X a2:DMP([y,x],INT):= (6*x**3 - 2*x**2 - 3*x +3) + y*(2*x**3 - x - 1)
+       ++X a3:DMP([y,x],INT):= (3*x**3 + 2*x**2) + y*(x**3 + x**2)
+       ++X an:=[a1,a2,a3]
+       ++X euclideanGroebner(an)
+
+     euclideanGroebner: (List(Dpol), String) -> List(Dpol)
+       ++ euclideanGroebner(lp, infoflag) computes a groebner basis 
+       ++ for a polynomial ideal over a euclidean domain
+       ++ generated by the list of polynomials lp.
+       ++ During computation, additional information is printed out
+       ++ if infoflag is given as 
+       ++ either "info" (for summary information) or
+       ++ "redcrit" (for reduced critical pairs)
+       ++
+       ++X a1:DMP([y,x],INT):= (9*x**2 + 5*x - 3)+ y*(3*x**2 + 2*x + 1)
+       ++X a2:DMP([y,x],INT):= (6*x**3 - 2*x**2 - 3*x +3) + y*(2*x**3 - x - 1)
+       ++X a3:DMP([y,x],INT):= (3*x**3 + 2*x**2) + y*(x**3 + x**2)
+       ++X an:=[a1,a2,a3]
+       ++X euclideanGroebner(an,"redcrit")
+       ++X euclideanGroebner(an,"info")
+
+     euclideanGroebner: (List(Dpol), String, String ) -> List(Dpol)
+       ++ euclideanGroebner(lp, "info", "redcrit") computes a groebner basis
+       ++ for a polynomial ideal generated by the list of polynomials lp.
+       ++ If the second argument is "info", 
+       ++ a summary is given of the critical pairs.
+       ++ If the third argument is "redcrit", critical pairs are printed.
+       ++
+       ++X a1:DMP([y,x],INT):= (9*x**2 + 5*x - 3)+ y*(3*x**2 + 2*x + 1)
+       ++X a2:DMP([y,x],INT):= (6*x**3 - 2*x**2 - 3*x +3) + y*(2*x**3 - x - 1)
+       ++X a3:DMP([y,x],INT):= (3*x**3 + 2*x**2) + y*(x**3 + x**2)
+       ++X an:=[a1,a2,a3]
+       ++X euclideanGroebner(an,"info","redcrit")
+
+ C== add
+   Ex ==> OutputForm
+   lc ==> leadingCoefficient
+   red ==> reductum
+
+   import OutputForm
+ 
+   ------  Definition list of critPair
+   ------  lcmfij is now lcm of headterm of poli and polj
+   ------  lcmcij is now lcm of of lc poli and lc polj
+ 
+   critPair ==>Record(lcmfij: Expon, lcmcij: Dom, poli:Dpol, polj: Dpol )
+   Prinp    ==> Record( ci:Dpol,tci:Integer,cj:Dpol,tcj:Integer,c:Dpol,
+                tc:Integer,rc:Dpol,trc:Integer,tH:Integer,tD:Integer)
+ 
+   ------  Definition of intermediate functions
+ 
+   strongGbasis: (List(Dpol), Integer, Integer) -> List(Dpol)
+   eminGbasis: List(Dpol) -> List(Dpol)
+   ecritT: (critPair ) -> Boolean
+   ecritM: (Expon, Dom, Expon, Dom) -> Boolean
+   ecritB: (Expon, Dom, Expon, Dom, Expon, Dom) -> Boolean
+   ecrithinH: (Dpol, List(Dpol)) -> Boolean
+   ecritBonD: (Dpol, List(critPair)) -> List(critPair)
+   ecritMTondd1:(List(critPair)) -> List(critPair)
+   ecritMondd1:(Expon, Dom, List(critPair)) -> List(critPair)
+   crithdelH: (Dpol, List(Dpol)) -> List(Dpol)
+   eupdatF: (Dpol, List(Dpol) ) -> List(Dpol)
+   updatH: (Dpol, List(Dpol), List(Dpol), List(Dpol) ) -> List(Dpol)
+   sortin: (Dpol, List(Dpol) ) -> List(Dpol)
+   eRed: (Dpol, List(Dpol), List(Dpol) )  ->  Dpol
+   ecredPol: (Dpol, List(Dpol) ) -> Dpol
+   esPol: (critPair) -> Dpol
+   updatD: (List(critPair), List(critPair)) -> List(critPair)
+   lepol: Dpol -> Integer
+   prinshINFO : Dpol -> Void
+   prindINFO: (critPair, Dpol, Dpol,Integer,Integer,Integer) -> Integer
+   prinpolINFO: List(Dpol) -> Void
+   prinb: Integer -> Void
+ 
+   ------    MAIN ALGORITHM GROEBNER ------------------------
+   euclideanGroebner( Pol: List(Dpol) ) ==
+     eminGbasis(strongGbasis(Pol,0,0))
+ 
+   euclideanGroebner( Pol: List(Dpol), xx1: String) ==
+     xx1 = "redcrit" =>
+       eminGbasis(strongGbasis(Pol,1,0))
+     xx1 = "info" =>
+       eminGbasis(strongGbasis(Pol,2,1))
+     print("   "::Ex)
+     print("WARNING: options are - redcrit and/or info - "::Ex)
+     print("         you didn't type them correct"::Ex)
+     print("         please try again"::Ex)
+     print("   "::Ex)
+     []
+ 
+   euclideanGroebner( Pol: List(Dpol), xx1: String, xx2: String) ==
+     (xx1 = "redcrit" and xx2 = "info") or
+      (xx1 = "info" and xx2 = "redcrit")   =>
+       eminGbasis(strongGbasis(Pol,1,1))
+     xx1 = "redcrit" and xx2 = "redcrit" =>
+       eminGbasis(strongGbasis(Pol,1,0))
+     xx1 = "info" and xx2 = "info" =>
+       eminGbasis(strongGbasis(Pol,2,1))
+     print("   "::Ex)
+     print("WARNING:  options are - redcrit and/or info - "::Ex)
+     print("          you didn't type them correct"::Ex)
+     print("          please try again "::Ex)
+     print("   "::Ex)
+     []
+ 
+   ------    calculate basis
+ 
+   strongGbasis(Pol: List(Dpol),xx1: Integer, xx2: Integer ) ==
+     dd1, D : List(critPair)
+ 
+     ---------   create D and Pol
+ 
+     Pol1:= sort( (degree #1 > degree #2) or
+                    ((degree #1 = degree #2 ) and
+                       sizeLess?(leadingCoefficient #2,leadingCoefficient #1)),
+                 Pol)
+     Pol:= [first(Pol1)]
+     H:= Pol
+     Pol1:= rest(Pol1)
+     D:= nil
+     while ^null Pol1 repeat
+        h:= first(Pol1)
+        Pol1:= rest(Pol1)
+        en:= degree(h)
+        lch:= lc h
+        dd1:= [[sup(degree(x), en), lcm(leadingCoefficient x, lch), x, h]$critPair
+            for x in Pol]
+        D:= updatD(ecritMTondd1(sort((#1.lcmfij < #2.lcmfij) or
+                                      (( #1.lcmfij = #2.lcmfij ) and
+                                        ( sizeLess?(#1.lcmcij,#2.lcmcij)) ),
+                                     dd1)), ecritBonD(h,D))
+        Pol:= cons(h, eupdatF(h, Pol))
+        ((en = degree(first(H))) and (leadingCoefficient(h) = leadingCoefficient(first(H)) ) ) =>
+              " go to top of while "
+        H:= updatH(h,H,crithdelH(h,H),[h])
+        H:= sort((degree #1 > degree #2) or
+                ((degree #1 = degree #2 ) and
+                  sizeLess?(leadingCoefficient #2,leadingCoefficient #1)), H)
+     D:= sort((#1.lcmfij < #2.lcmfij) or
+             (( #1.lcmfij = #2.lcmfij ) and
+               ( sizeLess?(#1.lcmcij,#2.lcmcij)) ) ,D)
+     xx:= xx2
+ 
+     --------  loop
+ 
+     while ^null D repeat
+         D0:= first D
+         ep:=esPol(D0)
+         D:= rest(D)
+         eh:= ecredPol(eRed(ep,H,H),H)
+         if xx1 = 1 then
+               prinshINFO(eh)
+         eh = 0 =>
+              if xx2 = 1 then
+                  ala:= prindINFO(D0,ep,eh,#H, #D, xx)
+                  xx:= 2
+              " go to top of while "
+         eh := unitCanonical eh
+         e:= degree(eh)
+         leh:= lc eh
+         dd1:= [[sup(degree(x), e), lcm(leadingCoefficient x, leh), x, eh]$critPair
+            for x in Pol]
+         D:= updatD(ecritMTondd1(sort( (#1.lcmfij <
+              #2.lcmfij) or (( #1.lcmfij = #2.lcmfij ) and
+               ( sizeLess?(#1.lcmcij,#2.lcmcij)) ), dd1)), ecritBonD(eh,D))
+         Pol:= cons(eh,eupdatF(eh,Pol))
+         ^ecrithinH(eh,H) or
+           ((e = degree(first(H))) and (leadingCoefficient(eh) = leadingCoefficient(first(H)) ) ) =>
+              if xx2 = 1 then
+                  ala:= prindINFO(D0,ep,eh,#H, #D, xx)
+                  xx:= 2
+              " go to top of while "
+         H:= updatH(eh,H,crithdelH(eh,H),[eh])
+         H:= sort( (degree #1 > degree #2) or
+             ((degree #1 = degree #2 ) and
+                 sizeLess?(leadingCoefficient #2,leadingCoefficient #1)), H)
+         if xx2 = 1 then
+           ala:= prindINFO(D0,ep,eh,#H, #D, xx)
+           xx:= 2
+           " go to top of while "
+     if xx2 = 1 then
+       prinpolINFO(Pol)
+       print("    THE GROEBNER BASIS over EUCLIDEAN DOMAIN"::Ex)
+     if xx1 = 1 and xx2 ^= 1 then
+       print("    THE GROEBNER BASIS over EUCLIDEAN DOMAIN"::Ex)
+     H
+ 
+             --------------------------------------
+ 
+             --- erase multiple of e in D2 using crit M
+ 
+   ecritMondd1(e: Expon, c: Dom, D2: List(critPair))==
+      null D2 => nil
+      x:= first(D2)
+      ecritM(e,c, x.lcmfij, lcm(leadingCoefficient(x.poli), leadingCoefficient(x.polj)))
+         => ecritMondd1(e, c, rest(D2))
+      cons(x, ecritMondd1(e, c, rest(D2)))
+ 
+            -------------------------------
+ 
+   ecredPol(h: Dpol, F: List(Dpol) ) ==
+        h0:Dpol:= 0
+        null F => h
+        while h ^= 0 repeat
+           h0:= h0 + monomial(leadingCoefficient(h),degree(h))
+           h:= eRed(red(h), F, F)
+        h0
+             ----------------------------
+ 
+             --- reduce dd1 using crit T and crit M
+ 
+   ecritMTondd1(dd1: List(critPair))==
+           null dd1 => nil
+           f1:= first(dd1)
+           s1:= #(dd1)
+           cT1:= ecritT(f1)
+           s1= 1 and cT1 => nil
+           s1= 1 => dd1
+           e1:= f1.lcmfij
+           r1:= rest(dd1)
+           f2:= first(r1)
+           e1 = f2.lcmfij and f1.lcmcij = f2.lcmcij =>
+              cT1 =>   ecritMTondd1(cons(f1, rest(r1)))
+              ecritMTondd1(r1)
+           dd1 := ecritMondd1(e1, f1.lcmcij, r1)
+           cT1 => ecritMTondd1(dd1)
+           cons(f1, ecritMTondd1(dd1))
+ 
+             -----------------------------
+ 
+             --- erase elements in D fullfilling crit B
+ 
+   ecritBonD(h:Dpol, D: List(critPair))==
+         null D => nil
+         x:= first(D)
+         x1:= x.poli
+         x2:= x.polj
+         ecritB(degree(h), leadingCoefficient(h), degree(x1),leadingCoefficient(x1),degree(x2),leadingCoefficient(x2)) =>
+           ecritBonD(h, rest(D))
+         cons(x, ecritBonD(h, rest(D)))
+ 
+             -----------------------------
+ 
+             --- concat F and h and erase multiples of h in F
+ 
+   eupdatF(h: Dpol, F: List(Dpol)) ==
+       null F => nil
+       f1:= first(F)
+       ecritM(degree h, leadingCoefficient(h), degree f1, leadingCoefficient(f1))
+           => eupdatF(h, rest(F))
+       cons(f1, eupdatF(h, rest(F)))
+ 
+             -----------------------------
+             --- concat H and h and erase multiples of h in H
+ 
+   updatH(h: Dpol, H: List(Dpol), Hh: List(Dpol), Hhh: List(Dpol)) ==
+       null H => append(Hh,Hhh)
+       h1:= first(H)
+       hlcm:= sup(degree(h1), degree(h))
+       plc:= extendedEuclidean(leadingCoefficient(h), leadingCoefficient(h1))
+       hp:= monomial(plc.coef1,subtractIfCan(hlcm, degree(h))::Expon)*h +
+            monomial(plc.coef2,subtractIfCan(hlcm, degree(h1))::Expon)*h1
+       (ecrithinH(hp, Hh) and ecrithinH(hp, Hhh)) =>
+         hpp:= append(rest(H),Hh)
+         hp:= ecredPol(eRed(hp,hpp,hpp),hpp)
+         updatH(h, rest(H), crithdelH(hp,Hh),cons(hp,crithdelH(hp,Hhh)))
+       updatH(h, rest(H), Hh,Hhh)
+ 
+             --------------------------------------------------
+             ---- delete elements in cons(h,H)
+ 
+   crithdelH(h: Dpol, H: List(Dpol))==
+        null H => nil
+        h1:= first(H)
+        dh1:= degree h1
+        dh:= degree h
+        ecritM(dh, lc h, dh1, lc h1) => crithdelH(h, rest(H))
+        dh1 = sup(dh,dh1) =>
+           plc:= extendedEuclidean( lc h1, lc h)
+           cons(plc.coef1*h1 + monomial(plc.coef2,subtractIfCan(dh1,dh)::Expon)*h,
+               crithdelH(h,rest(H)))
+        cons(h1, crithdelH(h,rest(H)))
+ 
+   eminGbasis(F: List(Dpol)) ==
+        null F => nil
+        newbas := eminGbasis rest F
+        cons(ecredPol( first(F), newbas),newbas)
+ 
+             ------------------------------------------------
+             --- does h belong to H
+ 
+   ecrithinH(h: Dpol, H: List(Dpol))==
+        null H  => true
+        h1:= first(H)
+        ecritM(degree h1, lc h1, degree h, lc h) => false
+        ecrithinH(h, rest(H))
+ 
+            -----------------------------
+            --- calculate  euclidean S-polynomial of a critical pair
+ 
+   esPol(p:critPair)==
+      Tij := p.lcmfij
+      fi := p.poli
+      fj := p.polj
+      lij:= lcm(leadingCoefficient(fi), leadingCoefficient(fj))
+      red(fi)*monomial((lij exquo leadingCoefficient(fi))::Dom,
+                        subtractIfCan(Tij, degree fi)::Expon) -
+        red(fj)*monomial((lij exquo leadingCoefficient(fj))::Dom,
+                         subtractIfCan(Tij, degree fj)::Expon)
+ 
+            ----------------------------
+ 
+            --- euclidean reduction mod F
+ 
+   eRed(s: Dpol, H: List(Dpol), Hh: List(Dpol)) ==
+     ( s = 0 or null H ) => s
+     f1:= first(H)
+     ds:= degree s
+     lf1:= leadingCoefficient(f1)
+     ls:= leadingCoefficient(s)
+     e: Union(Expon, "failed")
+     (((e:= subtractIfCan(ds, degree f1))  case "failed" ) or sizeLess?(ls, lf1) ) =>
+        eRed(s, rest(H), Hh)
+     sdf1:= divide(ls, lf1)
+     q1:= sdf1.quotient
+     sdf1.remainder = 0 =>
+        eRed(red(s) - monomial(q1,e)*reductum(f1), Hh, Hh)
+     eRed(s -(monomial(q1, e)*f1), rest(H), Hh)
+ 
+            ----------------------------
+ 
+            --- crit T  true, if e1 and e2 are disjoint
+ 
+   ecritT(p: critPair) ==
+          pi:= p.poli
+          pj:= p.polj
+          ci:= lc pi
+          cj:= lc pj
+          (p.lcmfij = degree pi + degree pj) and  (p.lcmcij = ci*cj)
+ 
+            ----------------------------
+ 
+            --- crit M - true, if lcm#2 multiple of lcm#1
+ 
+   ecritM(e1: Expon, c1: Dom, e2: Expon, c2: Dom) ==
+     en: Union(Expon, "failed")
+     ((en:=subtractIfCan(e2, e1)) case "failed") or
+       ((c2 exquo c1) case "failed") => false
+     true
+            ----------------------------
+ 
+            --- crit B - true, if eik is a multiple of eh and eik ^equal
+            ---          lcm(eh,ei) and eik ^equal lcm(eh,ek)
+ 
+   ecritB(eh:Expon, ch: Dom, ei:Expon, ci: Dom, ek:Expon, ck: Dom) ==
+       eik:= sup(ei, ek)
+       cik:= lcm(ci, ck)
+       ecritM(eh, ch, eik, cik) and
+             ^ecritM(eik, cik, sup(ei, eh), lcm(ci, ch)) and
+                ^ecritM(eik, cik, sup(ek, eh), lcm(ck, ch))
+ 
+            -------------------------------
+ 
+            --- reduce p1 mod lp
+ 
+   euclideanNormalForm(p1: Dpol, lp: List(Dpol))==
+       eRed(p1, lp, lp)
+ 
+            ---------------------------------
+ 
+            ---  insert element in sorted list
+ 
+   sortin(p1: Dpol, lp: List(Dpol))==
+      null lp => [p1]
+      f1:= first(lp)
+      elf1:= degree(f1)
+      ep1:= degree(p1)
+      ((elf1 < ep1) or ((elf1 = ep1) and
+        sizeLess?(leadingCoefficient(f1),leadingCoefficient(p1)))) =>
+         cons(f1,sortin(p1, rest(lp)))
+      cons(p1,lp)
+ 
+   updatD(D1: List(critPair), D2: List(critPair)) ==
+      null D1 => D2
+      null D2 => D1
+      dl1:= first(D1)
+      dl2:= first(D2)
+      (dl1.lcmfij  <  dl2.lcmfij) => cons(dl1, updatD(D1.rest, D2))
+      cons(dl2, updatD(D1, D2.rest))
+ 
+            ----  calculate number of terms of polynomial
+ 
+   lepol(p1:Dpol)==
+      n: Integer
+      n:= 0
+      while p1 ^= 0 repeat
+         n:= n + 1
+         p1:= red(p1)
+      n
+ 
+            ----  print blanc lines
+ 
+   prinb(n: Integer)==
+        for i in 1..n repeat messagePrint("    ")
+ 
+            ----  print reduced critpair polynom
+ 
+   prinshINFO(h: Dpol)==
+           prinb(2)
+           messagePrint(" reduced Critpair - Polynom :")
+           prinb(2)
+           print(h::Ex)
+           prinb(2)
+ 
+            -------------------------------
+ 
+            ----  print info string
+ 
+   prindINFO(cp: critPair, ps: Dpol, ph: Dpol, i1:Integer,
+             i2:Integer, n:Integer) ==
+       ll: List Prinp
+       a: Dom
+       cpi:= cp.poli
+       cpj:= cp.polj
+       if n = 1 then
+        prinb(1)
+        messagePrint("you choose option  -info-  ")
+        messagePrint("abbrev. for the following information strings are")
+        messagePrint("  ci  =>  Leading monomial  for critpair calculation")
+        messagePrint("  tci =>  Number of terms of polynomial i")
+        messagePrint("  cj  =>  Leading monomial  for critpair calculation")
+        messagePrint("  tcj =>  Number of terms of polynomial j")
+        messagePrint("  c   =>  Leading monomial of critpair polynomial")
+        messagePrint("  tc  =>  Number of terms of critpair polynomial")
+        messagePrint("  rc  =>  Leading monomial of redcritpair polynomial")
+        messagePrint("  trc =>  Number of terms of redcritpair polynomial")
+        messagePrint("  tF  =>  Number of polynomials in reduction list F")
+        messagePrint("  tD  =>  Number of critpairs still to do")
+        prinb(4)
+        n:= 2
+       prinb(1)
+       a:= 1
+       ph = 0  =>
+          ps = 0 =>
+            ll:= [[monomial(a,degree(cpi)),lepol(cpi),monomial(a,degree(cpj)),
+             lepol(cpj),ps,0,ph,0,i1,i2]$Prinp]
+            print(ll::Ex)
+            prinb(1)
+            n
+          ll:= [[monomial(a,degree(cpi)),lepol(cpi),
+            monomial(a,degree(cpj)),lepol(cpj),monomial(a,degree(ps)),
+             lepol(ps), ph,0,i1,i2]$Prinp]
+          print(ll::Ex)
+          prinb(1)
+          n
+       ll:= [[monomial(a,degree(cpi)),lepol(cpi),
+            monomial(a,degree(cpj)),lepol(cpj),monomial(a,degree(ps)),
+             lepol(ps),monomial(a,degree(ph)),lepol(ph),i1,i2]$Prinp]
+       print(ll::Ex)
+       prinb(1)
+       n
+ 
+            -------------------------------
+ 
+            ----  print the groebner basis polynomials
+ 
+   prinpolINFO(pl: List(Dpol))==
+       n:Integer
+       n:= #pl
+       prinb(1)
+       n = 1 =>
+         print("  There is 1  Groebner Basis Polynomial "::Ex)
+         prinb(2)
+       print("  There are "::Ex)
+       prinb(1)
+       print(n::Ex)
+       prinb(1)
+       print("  Groebner Basis Polynomials. "::Ex)
+       prinb(2)
+ 
+
+@
+<<GBEUCLID.dotabb>>=
+"GBEUCLID" [color="#FF4488",href="bookvol10.4.pdf#nameddest=GBEUCLID"]
+"PFECAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=PFECAT"]
+"STRING" [color="#88FF44",href="bookvol10.3.pdf#nameddest=STRING"]
+"GBEUCLID" -> "PFECAT"
+"GBEUCLID" -> "STRING"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{package EVALCYC EvaluateCycleIndicators}
 \pagehead{EvaluateCycleIndicators}{EVALCYC}
 \pagepic{ps/v104evaluatecycleindicators.ps}{EVALCYC}{1.00}
@@ -12656,17 +14634,6 @@ e04AgentsPackage(): E == I where
 \chapter{Chapter F}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{package FR2 FactoredFunctions2}
-\pagehead{FactoredFunctions2}{FR2}
-\pagepic{ps/v104FactoredFunctions2.ps}{FR2}{1.00}
-
-{\bf Exports:}\\
-\begin{tabular}{lllll}
-\end{tabular}
-
-<<FR2.dotabb>>=
-"FR2" [color="#FF4488",href="bookvol10.4.pdf#nameddest=FR2"]
-
-@
 <<FactoredFunctions2.input>>=
 -- fr.spad.pamphlet FactoredFunctions2.input
 )spool FactoredFunctions2.output
@@ -12779,6 +14746,13 @@ o )show FactoredFunctions2
 o $AXIOM/doc/src/algebra/fr.spad.dvi
 
 @
+\pagehead{FactoredFunctions2}{FR2}
+\pagepic{ps/v104FactoredFunctions2.ps}{FR2}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
 <<package FR2 FactoredFunctions2>>=
 )abbrev package FR2 FactoredFunctions2
 ++ Author: Robert S. Sutor
@@ -18505,6 +20479,1444 @@ FunctionSpaceUnivariatePolynomialFactor(R, F, UP):
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \chapter{Chapter G}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package GALFACTU GaloisGroupFactorizationUtilities}
+\pagehead{GaloisGroupFactorizationUtilities}{GALFACTU}
+\pagepic{ps/v104galoisgroupfactorizationutilities.ps}{GALFACTU}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package GALFACTU GaloisGroupFactorizationUtilities>>=
+)abbrev package GALFACTU GaloisGroupFactorizationUtilities
+++ Author: Frederic Lehobey
+++ Date Created: 30 June 1994
+++ Date Last Updated: 19 October 1995
+++ Basic Functions:
+++ Related Constructors:
+++ Also See:
+++ AMS Classifications:
+++ Keywords:
+++ References: 
+++ [1] Bernard Beauzamy, Products of polynomials and a priori estimates for
+++ coefficients in polynomial decompositions: a sharp result,
+++ J. Symbolic Computation (1992) 13, 463-472
+++ [2] David W. Boyd, Bounds for the Height of a Factor of a Polynomial in
+++ Terms of Bombieri's Norms: I. The Largest Factor,
+++ J. Symbolic Computation (1993) 16, 115-130
+++ [3] David W. Boyd, Bounds for the Height of a Factor of a Polynomial in
+++ Terms of Bombieri's Norms: II. The Smallest Factor,
+++ J. Symbolic Computation (1993) 16, 131-145
+++ [4] Maurice Mignotte, Some Useful Bounds,
+++ Computing, Suppl. 4, 259-263 (1982), Springer-Verlag
+++ [5] Donald E. Knuth, The Art of Computer Programming, Vol. 2, (Seminumerical
+++ Algorithms) 1st edition, 2nd printing, Addison-Wesley 1971, p. 397-398
+++ [6] Bernard Beauzamy, Vilmar Trevisan and Paul S. Wang, Polynomial 
+++ Factorization: Sharp Bounds, Efficient Algorithms,
+++ J. Symbolic Computation (1993) 15, 393-413
+++ [7] Augustin-Lux Cauchy, Exercices de Math\'ematiques Quatri\`eme Ann\'ee.
+++ De Bure Fr\`eres, Paris 1829 (reprinted Oeuvres, II S\'erie, Tome IX,
+++ Gauthier-Villars, Paris, 1891).
+++ Description: 
+++ \spadtype{GaloisGroupFactorizationUtilities} provides functions
+++ that will be used by the factorizer.
+
+GaloisGroupFactorizationUtilities(R,UP,F): Exports == Implementation where
+  R : Ring
+  UP : UnivariatePolynomialCategory R
+  F : Join(FloatingPointSystem,RetractableTo(R),Field,
+   TranscendentalFunctionCategory,ElementaryFunctionCategory)
+  N ==> NonNegativeInteger
+  P ==> PositiveInteger
+  Z ==> Integer
+ 
+  Exports ==> with
+    beauzamyBound: UP -> Z -- See [1]
+      ++ beauzamyBound(p) returns a bound on the larger coefficient of any
+      ++ factor of p.
+    bombieriNorm: UP -> F -- See [1]
+      ++ bombieriNorm(p) returns quadratic Bombieri's norm of p.
+    bombieriNorm: (UP,P) -> F -- See [2] and [3]
+      ++ bombieriNorm(p,n) returns the nth Bombieri's norm of p.
+    rootBound: UP -> Z -- See [4] and [5]
+      ++ rootBound(p) returns a bound on the largest norm of the complex roots
+      ++ of p.
+    singleFactorBound: (UP,N) -> Z -- See [6]
+      ++ singleFactorBound(p,r) returns a bound on the infinite norm of
+      ++ the factor of p with smallest Bombieri's norm. r is a lower bound
+      ++ for the number of factors of p. p shall be of degree higher or equal
+      ++ to 2.
+    singleFactorBound: UP -> Z -- See [6]
+      ++ singleFactorBound(p,r) returns a bound on the infinite norm of
+      ++ the factor of p with smallest Bombieri's norm. p shall be of degree
+      ++ higher or equal to 2.
+    norm: (UP,P) -> F
+      ++ norm(f,p) returns the lp norm of the polynomial f.
+    quadraticNorm: UP -> F
+      ++ quadraticNorm(f) returns the l2 norm of the polynomial f.
+    infinityNorm: UP -> F
+      ++ infinityNorm(f) returns the maximal absolute value of the coefficients
+      ++ of the polynomial f.
+    height: UP -> F
+      ++ height(p) returns the maximal absolute value of the coefficients of
+      ++ the polynomial p.
+    length: UP -> F
+      ++ length(p) returns the sum of the absolute values of the coefficients
+      ++ of the polynomial p.
+
+  Implementation ==> add
+
+    import GaloisGroupUtilities(F)
+
+    height(p:UP):F == infinityNorm(p)
+
+    length(p:UP):F == norm(p,1)
+
+    norm(f:UP,p:P):F ==
+      n : F := 0
+      for c in coefficients f repeat
+        n := n+abs(c::F)**p
+      nthRoot(n,p::N)
+
+    quadraticNorm(f:UP):F == norm(f,2)
+
+    infinityNorm(f:UP):F ==
+      n : F := 0
+      for c in coefficients f repeat
+        n := max(n,c::F)
+      n
+
+    singleFactorBound(p:UP,r:N):Z == -- See [6]
+      n : N := degree p
+      r := max(2,r)
+      n < r => error "singleFactorBound: Bad arguments."
+      nf : F := n :: F
+      num : F := nthRoot(bombieriNorm(p),r)
+      if F has Gamma: F -> F then
+        num := num*nthRoot(Gamma(nf+1$F),2*r)
+        den : F := Gamma(nf/((2*r)::F)+1$F)
+      else
+        num := num*(2::F)**(5/8+n/2)*exp(1$F/(4*nf))
+        den : F := (pi()$F*nf)**(3/8)
+      safeFloor( num/den )
+
+    singleFactorBound(p:UP):Z == singleFactorBound(p,2) -- See [6]
+
+    rootBound(p:UP):Z == -- See [4] and [5]
+      n := degree p
+      zero? n => 0
+      lc := abs(leadingCoefficient(p)::F)
+      b1 : F := 0 -- Mignotte
+      b2 : F := 0 -- Knuth
+      b3 : F := 0 -- Zassenhaus in [5]
+      b4 : F := 0 -- Cauchy in [7]
+      c : F := 0
+      cl : F := 0
+      for i in 1..n repeat
+        c := abs(coefficient(p,(n-i)::N)::F)
+        b1 := max(b1,c)
+        cl := c/lc
+        b2 := max(b2,nthRoot(cl,i))
+        b3 := max(b3,nthRoot(cl/pascalTriangle(n,i),i))
+        b4 := max(b4,nthRoot(n*cl,i))
+      min(1+safeCeiling(b1/lc),min(safeCeiling(2*b2),min(safeCeiling(b3/
+       (nthRoot(2::F,n)-1)),safeCeiling(b4))))
+
+    beauzamyBound(f:UP):Z == -- See [1]
+      d := degree f
+      zero? d => safeFloor bombieriNorm f
+      safeFloor( (bombieriNorm(f)*(3::F)**(3/4+d/2))/
+       (2*sqrt(pi()$F*(d::F))) )
+
+    bombieriNorm(f:UP,p:P):F == -- See [2] and [3]
+      d := degree f
+      b := abs(coefficient(f,0)::F)
+      if zero? d then return b
+       else b := b**p
+      b := b+abs(leadingCoefficient(f)::F)**p
+      dd := (d-1) quo 2
+      for i in 1..dd repeat
+        b := b+(abs(coefficient(f,i)::F)**p+abs(coefficient(f,(d-i)::N)::F)**p)
+         /pascalTriangle(d,i)
+      if even? d then
+        dd := dd+1
+        b := b+abs(coefficient(f, dd::N)::F)**p/pascalTriangle(d,dd)
+      nthRoot(b,p::N)
+
+    bombieriNorm(f:UP):F == bombieriNorm(f,2) -- See [1]
+
+@
+<<GALFACTU.dotabb>>=
+"GALFACTU" [color="#FF4488",href="bookvol10.4.pdf#nameddest=GALFACTU"]
+"PFECAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=PFECAT"]
+"GALFACTU" -> "PFECAT"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package GALFACT GaloisGroupFactorizer}
+\pagehead{GaloisGroupFactorizer}{GALFACT}
+\pagepic{ps/v104galoisgroupfactorizer.ps}{GALFACT}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package GALFACT GaloisGroupFactorizer>>=
+)abbrev package GALFACT GaloisGroupFactorizer
+++ Author: Frederic Lehobey
+++ Date Created: 28 June 1994
+++ Date Last Updated: 11 July 1997
+++ Basic Operations: factor
+++ Related Domains:
+++ Also See:
+++ AMS Classifications:
+++ Keywords: factorization
+++ Examples:
+++ References:
+++ [1] Bernard Beauzamy, Vilmar Trevisan and Paul S. Wang, Polynomial 
+++ Factorization: Sharp Bounds, Efficient Algorithms,
+++ J. Symbolic Computation (1993) 15, 393-413
+++ [2] John Brillhart, Note on Irreducibility Testing,
+++ Mathematics of Computation, vol. 35, num. 35, Oct. 1980, 1379-1381
+++ [3] David R. Musser, On the Efficiency of a Polynomial Irreducibility Test,
+++ Journal of the ACM, Vol. 25, No. 2, April 1978, pp. 271-282
+++ Description: \spadtype{GaloisGroupFactorizer} provides functions
+++ to factor resolvents.
+-- improvements to do :
+--   + reformulate the lifting problem in completeFactor -- See [1] (hard)
+--   + implement algorithm RC -- See [1] (easy)
+--   + use Dedekind's criterion to prove sometimes irreducibility (easy)
+--     or even to improve early detection of true factors (hard)
+--   + replace Sets by Bits
+GaloisGroupFactorizer(UP): Exports == Implementation where
+  Z ==> Integer
+  UP: UnivariatePolynomialCategory Z
+  N ==> NonNegativeInteger
+  P ==> PositiveInteger
+  CYC ==> CyclotomicPolynomialPackage()
+  SUPZ ==> SparseUnivariatePolynomial Z
+
+  ParFact ==> Record(irr: UP, pow: Z)
+  FinalFact ==> Record(contp: Z, factors: List ParFact)
+  DDRecord ==> Record(factor: UP, degree: Z) -- a Distinct-Degree factor
+  DDList ==> List DDRecord
+  MFact ==> Record(prime: Z,factors: List UP) -- Modular Factors
+  LR ==> Record(left: UP, right: UP) -- Functional decomposition
+
+  Exports ==> with
+    makeFR: FinalFact -> Factored UP
+      ++ makeFR(flist) turns the final factorization of henselFact into a
+      ++ \spadtype{Factored} object.
+    degreePartition: DDList -> Multiset N
+      ++ degreePartition(ddfactorization) returns the degree partition of
+      ++ the polynomial f modulo p where ddfactorization is the distinct
+      ++ degree factorization of f computed by 
+      ++ \spadfunFrom{ddFact}{ModularDistinctDegreeFactorizer}
+      ++ for some prime p.
+    musserTrials: () -> P
+      ++ musserTrials() returns the number of primes that are tried in
+      ++ \spadfun{modularFactor}.
+    musserTrials: P -> P
+      ++ musserTrials(n) sets to n the number of primes to be tried in
+      ++ \spadfun{modularFactor} and returns the previous value.
+    stopMusserTrials: () -> P
+      ++ stopMusserTrials() returns the bound on the number of factors for
+      ++ which \spadfun{modularFactor} stops to look for an other prime. You
+      ++ will have to remember that the step of recombining the extraneous
+      ++ factors may take up to \spad{2**stopMusserTrials()} trials. 
+    stopMusserTrials: P -> P
+      ++ stopMusserTrials(n) sets to n the bound on the number of factors for
+      ++ which \spadfun{modularFactor} stops to look for an other prime. You
+      ++ will have to remember that the step of recombining the extraneous
+      ++ factors may take up to \spad{2**n} trials. Returns the previous
+      ++ value.
+    numberOfFactors: DDList -> N
+      ++ numberOfFactors(ddfactorization) returns the number of factors of 
+      ++ the polynomial f modulo p where ddfactorization is the distinct
+      ++ degree factorization of f computed by 
+      ++ \spadfunFrom{ddFact}{ModularDistinctDegreeFactorizer}
+      ++ for some prime p.
+    modularFactor: UP -> MFact
+      ++ modularFactor(f) chooses a "good" prime and returns the factorization
+      ++ of f modulo this prime in a form that may be used by
+      ++ \spadfunFrom{completeHensel}{GeneralHenselPackage}. If prime is zero
+      ++ it means that f has been proved to be irreducible over the integers
+      ++ or that f is a unit (i.e. 1 or -1).
+      ++ f shall be primitive (i.e. content(p)=1) and square free (i.e.
+      ++ without repeated factors).
+    useSingleFactorBound?: () -> Boolean
+      ++ useSingleFactorBound?() returns \spad{true} if algorithm with single
+      ++ factor bound is used for factorization, \spad{false} for algorithm
+      ++ with overall bound.
+    useSingleFactorBound: Boolean -> Boolean
+      ++ useSingleFactorBound(b) chooses the algorithm to be used by the
+      ++ factorizers: \spad{true} for algorithm with single
+      ++ factor bound, \spad{false} for algorithm with overall bound.
+      ++ Returns the previous value.
+    useEisensteinCriterion?: () -> Boolean
+      ++ useEisensteinCriterion?() returns \spad{true} if factorizers
+      ++ check Eisenstein's criterion before factoring.
+    useEisensteinCriterion: Boolean -> Boolean
+      ++ useEisensteinCriterion(b) chooses whether factorizers check
+      ++ Eisenstein's criterion before factoring: \spad{true} for
+      ++ using it, \spad{false} else. Returns the previous value.
+    eisensteinIrreducible?: UP -> Boolean
+      ++ eisensteinIrreducible?(p) returns \spad{true} if p can be
+      ++ shown to be irreducible by Eisenstein's criterion,
+      ++ \spad{false} is inconclusive.
+    tryFunctionalDecomposition?: () -> Boolean
+      ++ tryFunctionalDecomposition?() returns \spad{true} if
+      ++ factorizers try functional decomposition of polynomials before
+      ++ factoring them.
+    tryFunctionalDecomposition: Boolean -> Boolean
+      ++ tryFunctionalDecomposition(b) chooses whether factorizers have
+      ++ to look for functional decomposition of polynomials
+      ++ (\spad{true}) or not (\spad{false}). Returns the previous value.
+    factor: UP -> Factored UP
+      ++ factor(p) returns the factorization of p over the integers.
+    factor: (UP,N) -> Factored UP
+      ++ factor(p,r) factorizes the polynomial p using the single factor bound
+      ++ algorithm and knowing that p has at least r factors.
+    factor: (UP,List N) -> Factored UP
+      ++ factor(p,listOfDegrees) factorizes the polynomial p using the single
+      ++ factor bound algorithm and knowing that p has for possible 
+      ++ splitting of its degree listOfDegrees.
+    factor: (UP,List N,N) -> Factored UP
+      ++ factor(p,listOfDegrees,r) factorizes the polynomial p using the single
+      ++ factor bound algorithm, knowing that p has for possible 
+      ++ splitting of its degree listOfDegrees and that p has at least r
+      ++ factors.
+    factor: (UP,N,N) -> Factored UP
+      ++ factor(p,d,r) factorizes the polynomial p using the single
+      ++ factor bound algorithm, knowing that d divides the degree of all 
+      ++ factors of p and that p has at least r factors.
+    factorSquareFree: UP -> Factored UP
+      ++ factorSquareFree(p) returns the factorization of p which is supposed
+      ++ not having any repeated factor (this is not checked).
+    factorSquareFree: (UP,N) -> Factored UP
+      ++ factorSquareFree(p,r) factorizes the polynomial p using the single
+      ++ factor bound algorithm and knowing that p has at least r factors.
+      ++ f is supposed not having any repeated factor (this is not checked).
+    factorSquareFree: (UP,List N) -> Factored UP
+      ++ factorSquareFree(p,listOfDegrees) factorizes the polynomial p using
+      ++ the single factor bound algorithm and knowing that p has for possible 
+      ++ splitting of its degree listOfDegrees.
+      ++ f is supposed not having any repeated factor (this is not checked).
+    factorSquareFree: (UP,List N,N) -> Factored UP
+      ++ factorSquareFree(p,listOfDegrees,r) factorizes the polynomial p using
+      ++ the single factor bound algorithm, knowing that p has for possible 
+      ++ splitting of its degree listOfDegrees and that p has at least r
+      ++ factors.
+      ++ f is supposed not having any repeated factor (this is not checked).
+    factorSquareFree: (UP,N,N) -> Factored UP
+      ++ factorSquareFree(p,d,r) factorizes the polynomial p using the single
+      ++ factor bound algorithm, knowing that d divides the degree of all 
+      ++ factors of p and that p has at least r factors.
+      ++ f is supposed not having any repeated factor (this is not checked).
+    factorOfDegree: (P,UP) -> Union(UP,"failed")
+      ++ factorOfDegree(d,p) returns a factor of p of degree d.
+    factorOfDegree: (P,UP,N) -> Union(UP,"failed")
+      ++ factorOfDegree(d,p,r) returns a factor of p of degree
+      ++ d knowing that p has at least r factors.
+    factorOfDegree: (P,UP,List N) -> Union(UP,"failed")
+      ++ factorOfDegree(d,p,listOfDegrees) returns a factor 
+      ++ of p of degree d knowing that p has for possible splitting of its
+      ++ degree listOfDegrees.
+    factorOfDegree: (P,UP,List N,N) -> Union(UP,"failed")
+      ++ factorOfDegree(d,p,listOfDegrees,r) returns a factor 
+      ++ of p of degree d knowing that p has for possible splitting of its
+      ++ degree listOfDegrees, and that p has at least r factors.
+    factorOfDegree: (P,UP,List N,N,Boolean) -> Union(UP,"failed")
+      ++ factorOfDegree(d,p,listOfDegrees,r,sqf) returns a
+      ++ factor of p of degree d knowing that p has for possible splitting of
+      ++ its degree listOfDegrees, and that p has at least r factors.
+      ++ If \spad{sqf=true} the polynomial is assumed to be square free (i.e. 
+      ++ without repeated factors).
+    henselFact: (UP,Boolean) -> FinalFact
+      ++ henselFact(p,sqf) returns the factorization of p, the result
+      ++ is a Record such that \spad{contp=}content p,
+      ++ \spad{factors=}List of irreducible factors of p with exponent.
+      ++ If \spad{sqf=true} the polynomial is assumed to be square free (i.e. 
+      ++ without repeated factors).
+    btwFact: (UP,Boolean,Set N,N) -> FinalFact
+      ++ btwFact(p,sqf,pd,r) returns the factorization of p, the result
+      ++ is a Record such that \spad{contp=}content p,
+      ++ \spad{factors=}List of irreducible factors of p with exponent.
+      ++ If \spad{sqf=true} the polynomial is assumed to be square free (i.e. 
+      ++ without repeated factors).
+      ++ pd is the \spadtype{Set} of possible degrees. r is a lower bound for
+      ++ the number of factors of p. Please do not use this function in your
+      ++ code because its design may change.
+
+  Implementation ==> add
+
+    fUnion ==> Union("nil", "sqfr", "irred", "prime")
+    FFE ==> Record(flg:fUnion, fctr:UP, xpnt:Z) -- Flag-Factor-Exponent
+    DDFact ==> Record(prime:Z, ddfactors:DDList) -- Distinct Degree Factors
+    HLR ==> Record(plist:List UP, modulo:Z) -- HenselLift Record
+
+    mussertrials: P := 5
+    stopmussertrials: P := 8
+    usesinglefactorbound: Boolean := true
+    tryfunctionaldecomposition: Boolean := true
+    useeisensteincriterion: Boolean := true
+
+    useEisensteinCriterion?():Boolean == useeisensteincriterion
+
+    useEisensteinCriterion(b:Boolean):Boolean ==
+      (useeisensteincriterion,b) := (b,useeisensteincriterion)
+      b
+
+    tryFunctionalDecomposition?():Boolean == tryfunctionaldecomposition
+
+    tryFunctionalDecomposition(b:Boolean):Boolean ==
+      (tryfunctionaldecomposition,b) := (b,tryfunctionaldecomposition)
+      b
+
+    useSingleFactorBound?():Boolean == usesinglefactorbound
+
+    useSingleFactorBound(b:Boolean):Boolean ==
+      (usesinglefactorbound,b) := (b,usesinglefactorbound)
+      b
+
+    stopMusserTrials():P == stopmussertrials
+
+    stopMusserTrials(n:P):P ==
+      (stopmussertrials,n) := (n,stopmussertrials)
+      n
+
+    musserTrials():P == mussertrials
+
+    musserTrials(n:P):P ==
+      (mussertrials,n) := (n,mussertrials)
+      n
+
+    import GaloisGroupFactorizationUtilities(Z,UP,Float)
+
+    import GaloisGroupPolynomialUtilities(Z,UP)
+
+    import IntegerPrimesPackage(Z)
+    import IntegerFactorizationPackage(Z)
+
+    import ModularDistinctDegreeFactorizer(UP)
+
+    eisensteinIrreducible?(f:UP):Boolean ==
+      rf := reductum f
+      c: Z := content rf
+      zero? c => false
+      unit? c => false
+      lc := leadingCoefficient f
+      tc := lc
+      while not zero? rf repeat
+        tc := leadingCoefficient rf
+        rf := reductum rf
+      for p in factors(factor c)$Factored(Z) repeat
+--        if (one? p.exponent) and (not zero? (lc rem p.factor)) and
+        if (p.exponent = 1) and (not zero? (lc rem p.factor)) and
+         (not zero? (tc rem ((p.factor)**2))) then return true
+      false
+
+    numberOfFactors(ddlist:DDList):N ==
+      n: N := 0
+      d: Z := 0
+      for dd in ddlist repeat
+        n := n +
+          zero? (d := degree(dd.factor)::Z) => 1
+          (d quo dd.degree)::N
+      n
+
+    -- local function, returns the a Set of shifted elements
+    shiftSet(s:Set N,shift:N):Set N == set [ e+shift for e in parts s ]
+
+    -- local function, returns the "reductum" of an Integer (as chain of bits)
+    reductum(n:Z):Z == n-shift(1,length(n)-1)
+
+    -- local function, returns an integer with level lowest bits set to 1
+    seed(level:Z):Z == shift(1,level)-1
+
+    -- local function, returns the next number (as a chain of bit) for
+    -- factor reconciliation of a given level (which is the number of
+    -- extraneaous factors involved) or "End of level" if not any
+    nextRecNum(levels:N,level:Z,n:Z):Union("End of level",Z) ==
+      if (l := length n)<levels then return(n+shift(1,l-1))
+      (n=shift(seed(level),levels-level)) => "End of level"
+      b: Z := 1
+      while ((l-b) = (lr := length(n := reductum n)))@Boolean repeat b := b+1
+      reductum(n)+shift(seed(b+1),lr)
+
+    -- local function, return the set of N, 0..n
+    fullSet(n:N):Set N == set [ i for i in 0..n ]
+
+    modularFactor(p:UP):MFact ==
+--      not one? abs(content(p)) => 
+      not (abs(content(p)) = 1) => 
+       error "modularFactor: the polynomial is not primitive."
+      zero? (n := degree p) => [0,[p]]
+
+      -- declarations --
+      cprime: Z := 2
+      trials: List DDFact := empty()
+      d: Set N := fullSet(n)
+      dirred: Set N := set [0,n]
+      s: Set N := empty()
+      ddlist: DDList := empty()
+      degfact: N := 0
+      nf: N := stopmussertrials+1
+      i: Z
+
+      -- Musser, see [3] --
+      diffp := differentiate p
+      for i in 1..mussertrials | nf>stopmussertrials repeat
+        -- test 1: cprime divides leading coefficient
+        -- test 2: "bad" primes: (in future: use Dedekind's Criterion)
+        while (zero? ((leadingCoefficient p) rem cprime)) or
+         (not zero? degree gcd(p,diffp,cprime)) repeat
+          cprime := nextPrime(cprime)
+        ddlist := ddFact(p,cprime)
+        -- degree compatibility: See [3] --
+        s := set [0]
+        for f in ddlist repeat
+          degfact := f.degree::N
+          if not zero? degfact then 
+            for j in 1..(degree(f.factor) quo degfact) repeat
+              s := union(s, shiftSet(s,degfact))
+        trials := cons([cprime,ddlist]$DDFact,trials)
+        d := intersect(d, s)
+        d = dirred => return [0,[p]] -- p is irreducible
+        cprime := nextPrime(cprime)
+        nf := numberOfFactors ddlist
+
+      -- choose the one with the smallest number of factors
+      choice := first trials
+      nfc := numberOfFactors(choice.ddfactors)
+      for t in rest trials repeat
+        nf := numberOfFactors(t.ddfactors)
+        if nf<nfc or ((nf=nfc) and (t.prime>choice.prime)) then
+          nfc := nf
+          choice := t
+      cprime := choice.prime
+      -- HenselLift$GHENSEL expects the degree 0 factor first 
+      [cprime,separateFactors(choice.ddfactors,cprime)]
+
+    degreePartition(ddlist:DDList):Multiset N ==
+      dp: Multiset N := empty()
+      d: N := 0
+      dd: N := 0
+      for f in ddlist repeat
+        zero? (d := degree(f.factor)) => dp := insert!(0,dp)
+        dd := f.degree::N
+        dp := insert!(dd,dp,d quo dd)
+      dp
+
+    import GeneralHenselPackage(Z,UP)
+    import UnivariatePolynomialDecompositionPackage(Z,UP)
+    import BrillhartTests(UP) -- See [2]
+
+    -- local function, finds the factors of f primitive, square-free, with
+    -- positive leading coefficient and non zero trailing coefficient,
+    -- using the overall bound technique. If pdecomp is true then look
+    -- for a functional decomposition of f.
+    henselfact(f:UP,pdecomp:Boolean):List UP ==
+      if brillhartIrreducible? f or
+       (useeisensteincriterion => eisensteinIrreducible? f ; false)
+      then return [f]
+      cf: Union(LR,"failed")
+      if pdecomp and tryfunctionaldecomposition then
+        cf := monicDecomposeIfCan f
+      else
+        cf := "failed"
+      cf case "failed" =>
+        m := modularFactor f
+        zero? (cprime := m.prime) => m.factors
+        b: P := (2*leadingCoefficient(f)*beauzamyBound(f)) :: P
+        completeHensel(f,m.factors,cprime,b)
+      lrf := cf::LR
+      "append"/[ henselfact(g(lrf.right),false) for g in
+       henselfact(lrf.left,true) ]
+
+    -- local function, returns the complete factorization of its arguments,
+    -- using the single-factor bound technique 
+    completeFactor(f:UP,lf:List UP,cprime:Z,pk:P,r:N,d:Set N):List UP ==
+      lc := leadingCoefficient f
+      f0 := coefficient(f,0)
+      ltrue: List UP := empty()
+      found? := true
+      degf: N := 0
+      degg: N := 0
+      g0: Z := 0
+      g: UP := 0
+      rg: N := 0
+      nb: Z := 0
+      lg: List UP := empty()
+      b: P := 1
+      dg: Set N := empty()
+      llg: HLR := [empty(),0]
+      levels: N := #lf
+      level: Z := 1
+      ic: Union(Z,"End of level") := 0
+      i: Z := 0
+      while level<levels repeat
+        -- try all possible factors with degree in d
+        ic := seed(level)
+        while ((not found?) and (ic case Z)) repeat
+          i := ic::Z
+          degg := 0
+          g0 := 1 -- LC algorithm
+          for j in 1..levels repeat
+            if bit?(i,j-1) then
+              degg := degg+degree lf.j
+              g0 := g0*coefficient(lf.j,0) -- LC algorithm
+          g0 := symmetricRemainder(lc*g0,pk) -- LC algorithm
+          if member?(degg,d) and (((lc*f0) exquo g0) case Z) then 
+            --                       LC algorithm
+            g := lc::UP -- build the possible factor -- LC algorithm
+            for j in 1..levels repeat if bit?(i,j-1) then g := g*lf.j
+            g := primitivePart reduction(g,pk)
+            f1 := f exquo g
+            if f1 case UP then -- g is a true factor
+              found? := true
+              -- remove the factors of g from lf
+              nb := 1
+              for j in 1..levels repeat
+                if bit?(i,j-1) then 
+                  swap!(lf,j,nb)
+                  nb := nb+1
+              lg := lf
+              lf := rest(lf,level::N)
+              setrest!(rest(lg,(level-1)::N),empty()$List(UP))
+              f := f1::UP
+              lc := leadingCoefficient f
+              f0 := coefficient(f,0)
+              -- is g irreducible?
+              dg := select(#1<=degg,d)
+              if not(dg=set [0,degg]) then -- implies degg >= 2
+                rg := max(2,r+level-levels)::N
+                b := (2*leadingCoefficient(g)*singleFactorBound(g,rg)) :: P
+                if b>pk and (not brillhartIrreducible?(g)) and
+                  (useeisensteincriterion => not eisensteinIrreducible?(g) ;
+                  true)
+                then
+                  -- g may be reducible
+                  llg := HenselLift(g,lg,cprime,b)
+                  gpk: P := (llg.modulo)::P 
+                  -- In case exact factorisation has been reached by
+                  -- HenselLift before coefficient bound.
+                  if gpk<b then
+                    lg := llg.plist
+                  else
+                    lg := completeFactor(g,llg.plist,cprime,gpk,rg,dg)
+                else lg := [ g ] -- g irreducible
+              else lg := [ g ] -- g irreducible
+              ltrue := append(ltrue,lg)
+              r := max(2,(r-#lg))::N
+              degf := degree f
+              d := select(#1<=degf,d)
+              if degf<=1 then -- lf exhausted
+--                if one? degf then
+                if (degf = 1) then
+                  ltrue := cons(f,ltrue)
+                return ltrue -- 1st exit, all factors found
+              else -- can we go on with the same pk?
+                b := (2*lc*singleFactorBound(f,r)) :: P
+                if b>pk then -- unlucky: no we can't
+                  llg := HenselLift(f,lf,cprime,b) -- I should reformulate
+                   -- the lifting probleme, but hadn't time for that.
+                   -- In any case, such case should be quite exceptional.
+                  lf := llg.plist
+                  pk := (llg.modulo)::P
+                  -- In case exact factorisation has been reached by
+                  -- HenselLift before coefficient bound.
+                  if pk<b then return append(lf,ltrue) -- 2nd exit
+                  level := 1
+          ic := nextRecNum(levels,level,i)
+        if found? then
+          levels := #lf
+          found? := false
+        if not (ic case Z) then level := level+1
+      cons(f,ltrue) -- 3rd exit, the last factor was irreducible but not "true"
+
+    -- local function, returns the set of elements "divided" by an integer
+    divideSet(s:Set N, n:N):Set N ==
+      l: List N := [ 0 ]
+      for e in parts s repeat
+        if (ee := (e exquo n)$N) case N then l := cons(ee::N,l)
+      set(l)
+
+    -- Beauzamy-Trevisan-Wang FACTOR, see [1] with some refinements
+    -- and some differences. f is assumed to be primitive, square-free
+    -- and with positive leading coefficient. If pdecomp is true then
+    -- look for a functional decomposition of f. 
+    btwFactor(f:UP,d:Set N,r:N,pdecomp:Boolean):List UP ==
+      df := degree f
+      not (max(d) = df) => error "btwFact: Bad arguments"
+      reverse?: Boolean := false
+      negativelc?: Boolean := false
+
+      (d = set [0,df]) => [ f ]
+      if abs(coefficient(f,0))<abs(leadingCoefficient(f)) then
+        f := reverse f
+        reverse? := true
+      brillhartIrreducible? f or 
+       (useeisensteincriterion => eisensteinIrreducible?(f) ; false) =>
+        if reverse? then [ reverse f ] else [ f ]
+      if leadingCoefficient(f)<0 then
+        f := -f
+        negativelc? := true
+      cf: Union(LR,"failed")
+      if pdecomp and tryfunctionaldecomposition then
+        cf := monicDecomposeIfCan f
+      else
+        cf := "failed"
+      if cf case "failed" then
+        m := modularFactor f
+        zero? (cprime := m.prime) => 
+          if reverse? then
+            if negativelc? then return [ -reverse f ]
+            else return [ reverse f ]
+          else if negativelc? then return [ -f ]
+               else return [ f ]
+        if noLinearFactor? f then d := remove(1,d)
+        lc := leadingCoefficient f
+        f0 := coefficient(f,0)
+        b: P := (2*lc*singleFactorBound(f,r)) :: P -- LC algorithm
+        lm := HenselLift(f,m.factors,cprime,b)
+        lf := lm.plist
+        pk: P := (lm.modulo)::P
+        if ground? first lf then lf := rest lf
+        -- in case exact factorisation has been reached by HenselLift
+        -- before coefficient bound
+        if not pk < b then lf := completeFactor(f,lf,cprime,pk,r,d)
+      else
+        lrf := cf::LR
+        dh := degree lrf.right
+        lg := btwFactor(lrf.left,divideSet(d,dh),2,true)
+        lf: List UP := empty()
+        for i in 1..#lg repeat
+          g := lg.i
+          dgh := (degree g)*dh
+          df := subtractIfCan(df,dgh)::N
+          lfg := btwFactor(g(lrf.right),
+           select(#1<=dgh,d),max(2,r-df)::N,false)
+          lf := append(lf,lfg)
+          r := max(2,r-#lfg)::N
+      if reverse? then lf := [ reverse(fact) for fact in lf ]
+      for i in 1..#lf repeat
+        if leadingCoefficient(lf.i)<0 then lf.i := -lf.i
+        -- because we assume f with positive leading coefficient
+      lf
+
+    makeFR(flist:FinalFact):Factored UP ==
+      ctp := factor flist.contp
+      fflist: List FFE := empty()
+      for ff in flist.factors repeat
+        fflist := cons(["prime", ff.irr, ff.pow]$FFE, fflist)
+      for fc in factorList ctp repeat
+        fflist := cons([fc.flg, fc.fctr::UP, fc.xpnt]$FFE, fflist)
+      makeFR(unit(ctp)::UP, fflist)
+
+    import IntegerRoots(Z)
+
+    -- local function, factorizes a quadratic polynomial
+    quadratic(p:UP):List UP ==
+      a := leadingCoefficient p
+      b := coefficient(p,1)
+      d := b**2-4*a*coefficient(p,0)
+      r := perfectSqrt(d)
+      r case "failed" => [p]
+      b := b+(r::Z)
+      a := 2*a
+      d := gcd(a,b)
+--      if not one? d then
+      if not (d = 1) then
+        a := a quo d
+        b := b quo d
+      f: UP := monomial(a,1)+monomial(b,0)
+      cons(f,[(p exquo f)::UP])
+
+    isPowerOf2(n:Z): Boolean ==
+       n = 1 => true
+       qr: Record(quotient: Z, remainder: Z) := divide(n,2)
+       qr.remainder = 1 => false
+       isPowerOf2 qr.quotient
+
+    subMinusX(supPol: SUPZ): UP ==
+       minusX: SUPZ := monomial(-1,1)$SUPZ
+       unmakeSUP(elt(supPol,minusX)$SUPZ)
+
+    henselFact(f:UP, sqf:Boolean):FinalFact ==
+      factorlist: List(ParFact) := empty()
+
+      -- make m primitive
+      c: Z := content f
+      f := (f exquo c)::UP
+
+      -- make the leading coefficient positive
+      if leadingCoefficient f < 0 then
+        c := -c
+        f := -f
+
+      -- is x**d factor of f
+      if (d := minimumDegree f) > 0 then
+        f := monicDivide(f,monomial(1,d)).quotient
+        factorlist := [[monomial(1,1),d]$ParFact]
+
+      d := degree f
+
+      -- is f constant?
+      zero? d => [c,factorlist]$FinalFact
+
+      -- is f linear?
+--      one? d => [c,cons([f,1]$ParFact,factorlist)]$FinalFact
+      (d = 1) => [c,cons([f,1]$ParFact,factorlist)]$FinalFact
+
+      lcPol: UP := leadingCoefficient(f) :: UP
+
+      -- is f cyclotomic (x**n - 1)?
+      -lcPol = reductum(f) =>    -- if true, both will = 1
+        for fac in map(unmakeSUP(#1)$UP,
+         cyclotomicDecomposition(d)$CYC)$ListFunctions2(SUPZ,UP) repeat 
+          factorlist := cons([fac,1]$ParFact,factorlist)
+        [c,factorlist]$FinalFact
+
+      -- is f odd cyclotomic (x**(2*n+1) + 1)?
+      odd?(d) and (lcPol = reductum(f)) =>
+        for sfac in cyclotomicDecomposition(d)$CYC repeat
+           fac := subMinusX sfac
+           if leadingCoefficient fac < 0 then fac := -fac
+           factorlist := cons([fac,1]$ParFact,factorlist)
+        [c,factorlist]$FinalFact
+
+      -- is the poly of the form x**n + 1 with n a power of 2?
+      -- if so, then irreducible
+      isPowerOf2(d) and (lcPol = reductum(f)) =>
+        factorlist := cons([f,1]$ParFact,factorlist)
+        [c,factorlist]$FinalFact
+
+      -- other special cases to implement...
+
+      -- f is square-free :
+      sqf => [c, append([[pf,1]$ParFact for pf in henselfact(f,true)],
+       factorlist)]$FinalFact
+
+      -- f is not square-free :
+      sqfflist := factors squareFree f
+      for sqfr in sqfflist repeat
+        mult := sqfr.exponent
+        sqff := sqfr.factor
+        d := degree sqff
+--        one? d => factorlist := cons([sqff,mult]$ParFact,factorlist)
+        (d = 1) => factorlist := cons([sqff,mult]$ParFact,factorlist)
+        d=2 =>
+          factorlist := append([[pf,mult]$ParFact for pf in quadratic(sqff)],
+           factorlist)
+        factorlist := append([[pf,mult]$ParFact for pf in
+         henselfact(sqff,true)],factorlist) 
+      [c,factorlist]$FinalFact
+
+    btwFact(f:UP, sqf:Boolean, fd:Set N, r:N):FinalFact ==
+      d := degree f
+      not(max(fd)=d) => error "btwFact: Bad arguments"
+      factorlist: List(ParFact) := empty()
+
+      -- make m primitive
+      c: Z := content f
+      f := (f exquo c)::UP
+
+      -- make the leading coefficient positive
+      if leadingCoefficient f < 0 then
+        c := -c
+        f := -f
+
+      -- is x**d factor of f
+      if (maxd := minimumDegree f) > 0 then
+        f := monicDivide(f,monomial(1,maxd)).quotient
+        factorlist := [[monomial(1,1),maxd]$ParFact]
+        r := max(2,r-maxd)::N
+        d := subtractIfCan(d,maxd)::N
+        fd := select(#1<=d,fd)
+
+      -- is f constant?
+      zero? d => [c,factorlist]$FinalFact
+
+      -- is f linear?
+--      one? d => [c,cons([f,1]$ParFact,factorlist)]$FinalFact
+      (d = 1) => [c,cons([f,1]$ParFact,factorlist)]$FinalFact
+
+      lcPol: UP := leadingCoefficient(f) :: UP
+
+      -- is f cyclotomic (x**n - 1)?
+      -lcPol = reductum(f) =>    -- if true, both will = 1
+        for fac in map(unmakeSUP(#1)$UP,
+         cyclotomicDecomposition(d)$CYC)$ListFunctions2(SUPZ,UP) repeat 
+          factorlist := cons([fac,1]$ParFact,factorlist)
+        [c,factorlist]$FinalFact
+
+      -- is f odd cyclotomic (x**(2*n+1) + 1)?
+      odd?(d) and (lcPol = reductum(f)) =>
+        for sfac in cyclotomicDecomposition(d)$CYC repeat
+           fac := subMinusX sfac
+           if leadingCoefficient fac < 0 then fac := -fac
+           factorlist := cons([fac,1]$ParFact,factorlist)
+        [c,factorlist]$FinalFact
+
+      -- is the poly of the form x**n + 1 with n a power of 2?
+      -- if so, then irreducible
+      isPowerOf2(d) and (lcPol = reductum(f)) =>
+        factorlist := cons([f,1]$ParFact,factorlist)
+        [c,factorlist]$FinalFact
+
+      -- other special cases to implement...
+
+      -- f is square-free :
+      sqf => [c, append([[pf,1]$ParFact for pf in btwFactor(f,fd,r,true)],
+       factorlist)]$FinalFact
+
+      -- f is not square-free :
+      sqfflist := factors squareFree(f)
+--      if one?(#(sqfflist)) then -- indeed f was a power of a square-free 
+      if ((#(sqfflist)) = 1) then -- indeed f was a power of a square-free 
+        r := max(r quo ((first sqfflist).exponent),2)::N
+      else
+        r := 2
+      for sqfr in sqfflist repeat
+        mult := sqfr.exponent
+        sqff := sqfr.factor
+        d := degree sqff
+--        one? d => 
+        (d = 1) => 
+          factorlist := cons([sqff,mult]$ParFact,factorlist)
+          maxd := (max(fd)-mult)::N
+          fd := select(#1<=maxd,fd)
+        d=2 =>
+          factorlist := append([[pf,mult]$ParFact for pf in quadratic(sqff)],
+           factorlist)
+          maxd := (max(fd)-2*mult)::N
+          fd := select(#1<=maxd,fd)
+        factorlist := append([[pf,mult]$ParFact for pf in 
+         btwFactor(sqff,select(#1<=d,fd),r,true)],factorlist)
+        maxd := (max(fd)-d*mult)::N
+        fd := select(#1<=maxd,fd)
+      [c,factorlist]$FinalFact
+
+    factor(f:UP):Factored UP ==
+      makeFR
+        usesinglefactorbound => btwFact(f,false,fullSet(degree f),2)
+        henselFact(f,false)
+
+    -- local function, returns true if the sum of the elements of the list
+    -- is not the degree.
+    errorsum?(d:N,ld:List N):Boolean == not (d = +/ld)
+
+    -- local function, turns list of degrees into a Set
+    makeSet(ld:List N):Set N ==
+      s := set [0]
+      for d in ld repeat s := union(s,shiftSet(s,d))
+      s
+      
+    factor(f:UP,ld:List N,r:N):Factored UP ==
+      errorsum?(degree f,ld) => error "factor: Bad arguments"
+      makeFR btwFact(f,false,makeSet(ld),r)
+
+    factor(f:UP,r:N):Factored UP == makeFR btwFact(f,false,fullSet(degree f),r)
+    
+    factor(f:UP,ld:List N):Factored UP == factor(f,ld,2)
+
+    factor(f:UP,d:N,r:N):Factored UP ==
+      n := (degree f) exquo d
+      n case "failed" => error "factor: Bad arguments"
+      factor(f,new(n::N,d)$List(N),r)
+
+    factorSquareFree(f:UP):Factored UP ==
+      makeFR
+        usesinglefactorbound => btwFact(f,true,fullSet(degree f),2)
+        henselFact(f,true)
+
+    factorSquareFree(f:UP,ld:List(N),r:N):Factored UP ==
+      errorsum?(degree f,ld) => error "factorSquareFree: Bad arguments"
+      makeFR btwFact(f,true,makeSet(ld),r)
+
+    factorSquareFree(f:UP,r:N):Factored UP ==
+      makeFR btwFact(f,true,fullSet(degree f),r)
+    
+    factorSquareFree(f:UP,ld:List N):Factored UP == factorSquareFree(f,ld,2)
+
+    factorSquareFree(f:UP,d:N,r:N):Factored UP ==
+      n := (degree f) exquo d
+      n case "failed" => error "factorSquareFree: Bad arguments"
+      factorSquareFree(f,new(n::N,d)$List(N),r)
+
+    factorOfDegree(d:P,p:UP,ld:List N,r:N,sqf:Boolean):Union(UP,"failed") ==
+      dp := degree p
+      errorsum?(dp,ld) => error "factorOfDegree: Bad arguments"
+--      (one? (d::N)) and noLinearFactor?(p) => "failed"
+      ((d::N) = 1) and noLinearFactor?(p) => "failed"
+      lf := btwFact(p,sqf,makeSet(ld),r).factors
+      for f in lf repeat
+        degree(f.irr)=d => return f.irr
+      "failed"
+
+    factorOfDegree(d:P,p:UP,ld:List N,r:N):Union(UP,"failed") ==
+      factorOfDegree(d,p,ld,r,false)
+
+    factorOfDegree(d:P,p:UP,r:N):Union(UP,"failed") ==
+      factorOfDegree(d,p,new(degree p,1)$List(N),r,false)
+
+    factorOfDegree(d:P,p:UP,ld:List N):Union(UP,"failed") ==
+      factorOfDegree(d,p,ld,2,false)
+
+    factorOfDegree(d:P,p:UP):Union(UP,"failed") ==
+      factorOfDegree(d,p,new(degree p,1)$List(N),2,false)
+
+@
+<<GALFACT.dotabb>>=
+"GALFACT" [color="#FF4488",href="bookvol10.4.pdf#nameddest=GALFACT"]
+"FSAGG" [color="#4488FF",href="bookvol10.2.pdf#nameddest=FSAGG"]
+"GALFACT" -> "FSAGG"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package GALPOLYU GaloisGroupPolynomialUtilities}
+\pagehead{GaloisGroupPolynomialUtilities}{GALPOLYU}
+\pagepic{ps/v104galoisgrouppolynomialutilities.ps}{GALPOLYU}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package GALPOLYU GaloisGroupPolynomialUtilities>>=
+)abbrev package GALPOLYU GaloisGroupPolynomialUtilities
+++ Author: Frederic Lehobey
+++ Date Created: 30 June 1994
+++ Date Last Updated: 15 July 1994
+++ Basic Operations:
+++ Related Domains:
+++ Also See:
+++ AMS Classifications:
+++ Keywords:
+++ Examples:
+++ References:
+++ Description: \spadtype{GaloisGroupPolynomialUtilities} provides useful
+++ functions for univariate polynomials which should be added to 
+++ \spadtype{UnivariatePolynomialCategory} or to \spadtype{Factored}
+++ (July 1994).
+
+GaloisGroupPolynomialUtilities(R,UP): Exports == Implementation where
+  R : Ring
+  UP : UnivariatePolynomialCategory R
+  N ==> NonNegativeInteger
+  P ==> PositiveInteger
+
+  Exports ==> with
+    monic?: UP -> Boolean
+      ++ monic?(p) tests if p is monic (i.e. leading coefficient equal to 1).
+    unvectorise: Vector R -> UP
+      ++ unvectorise(v) returns the polynomial which has for coefficients the
+      ++ entries of v in the increasing order.
+    reverse: UP -> UP
+      ++ reverse(p) returns the reverse polynomial of p.
+    scaleRoots: (UP,R) -> UP
+      ++ scaleRoots(p,c) returns the polynomial which has c times the roots
+      ++ of p.
+    shiftRoots: (UP,R) -> UP
+      ++ shiftRoots(p,c) returns the polynomial which has for roots c added 
+      ++ to the roots of p.
+    degreePartition: Factored UP -> Multiset N
+      ++ degreePartition(f) returns the degree partition (i.e. the multiset
+      ++ of the degrees of the irreducible factors) of
+      ++ the polynomial f.
+    factorOfDegree: (P, Factored UP) -> UP
+      ++ factorOfDegree(d,f) returns a factor of degree d of the factored
+      ++ polynomial f. Such a factor shall exist.
+    factorsOfDegree: (P, Factored UP) -> List UP
+      ++ factorsOfDegree(d,f) returns the factors of degree d of the factored
+      ++ polynomial f.
+
+  Implementation ==> add
+
+    import Factored UP
+
+    factorsOfDegree(d:P,r:Factored UP):List UP ==
+      lfact : List UP := empty()
+      for fr in factors r | degree(fr.factor)=(d::N) repeat
+        for i in 1..fr.exponent repeat
+          lfact := cons(fr.factor,lfact)
+      lfact
+
+    factorOfDegree(d:P,r:Factored UP):UP ==
+      factor : UP := 0
+      for i in 1..numberOfFactors r repeat
+        factor := nthFactor(r,i)
+        if degree(factor)=(d::N) then return factor
+      error "factorOfDegree: Bad arguments"
+
+    degreePartition(r:Factored UP):Multiset N ==
+      multiset([ degree(nthFactor(r,i)) for i in 1..numberOfFactors r ])
+
+--    monic?(p:UP):Boolean == one? leadingCoefficient p
+    monic?(p:UP):Boolean == (leadingCoefficient p) = 1
+
+    unvectorise(v:Vector R):UP ==
+      p : UP := 0
+      for i in 1..#v repeat p := p + monomial(v(i),(i-1)::N)
+      p
+
+    reverse(p:UP):UP ==
+      r : UP := 0
+      n := degree(p)
+      for i in 0..n repeat r := r + monomial(coefficient(p,(n-i)::N),i)
+      r
+
+    scaleRoots(p:UP,c:R):UP ==
+--      one? c => p
+      (c = 1) => p
+      n := degree p
+      zero? c => monomial(leadingCoefficient p,n)
+      r : UP := 0
+      mc : R := 1
+      for i in n..0 by -1 repeat
+        r := r + monomial(mc*coefficient(p,i),i)
+        mc := mc*c
+      r
+
+    import UnivariatePolynomialCategoryFunctions2(R,UP,UP,
+     SparseUnivariatePolynomial UP)
+
+    shiftRoots(p:UP,c:R):UP == elt(map(coerce,p),monomial(1,1)$UP-c::UP)::UP
+
+@
+<<GALPOLYU.dotabb>>=
+"GALPOLYU" [color="#FF4488",href="bookvol10.4.pdf#nameddest=GALPOLYU"]
+"PFECAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=PFECAT"]
+"GALPOLYU" -> "PFECAT"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package GALUTIL GaloisGroupUtilities}
+\pagehead{GaloisGroupUtilities}{GALUTIL}
+\pagepic{ps/v104galoisgrouputilities.ps}{GALUTIL}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package GALUTIL GaloisGroupUtilities>>=
+)abbrev package GALUTIL GaloisGroupUtilities
+++ Author: Frederic Lehobey
+++ Date Created: 29 June 1994
+++ Date Last Updated: 30 June 1994 
+++ Basic Functions:
+++ Related Constructors:
+++ Also See:
+++ AMS Classifications:
+++ Keywords:
+++ References:
+++ Description: 
+++ \spadtype{GaloisGroupUtilities} provides several useful functions.
+
+GaloisGroupUtilities(R): Exports == Implementation where
+  N ==> NonNegativeInteger
+  Z ==> Integer
+  R : Ring
+
+  Exports ==> with
+    pascalTriangle: (N,Z) -> R
+      ++ pascalTriangle(n,r) returns the binomial coefficient
+      ++ \spad{C(n,r)=n!/(r! (n-r)!)}
+      ++ and stores it in a table to prevent recomputation.
+    rangePascalTriangle: N -> N
+      ++ rangePascalTriangle(n) sets the maximal number of lines which
+      ++ are stored and returns the previous value.
+    rangePascalTriangle: () -> N
+      ++ rangePascalTriangle() returns the maximal number of lines stored.
+    sizePascalTriangle: () -> N
+      ++ sizePascalTriangle() returns the number of entries currently stored
+      ++ in the table.
+    fillPascalTriangle: () -> Void
+      ++ fillPascalTriangle() fills the stored table.
+
+    if R has FloatingPointSystem then
+      safeCeiling: R -> Z
+        ++ safeCeiling(x) returns the integer which is greater than any integer
+        ++ with the same floating point number representation.
+      safeFloor: R -> Z
+        ++ safeFloor(x) returns the integer which is lower or equal to the
+        ++ largest integer which has the same floating point number
+        ++ representation.
+      safetyMargin: N -> N
+        ++ safetyMargin(n) sets to n the number of low weight digits we do not
+        ++ trust in the floating point representation and returns the previous
+        ++ value (for use by \spadfun{safeCeiling}).
+      safetyMargin: () -> N
+        ++ safetyMargin() returns the number of low weight digits we do not
+        ++ trust in the floating point representation (used by 
+        ++ \spadfun{safeCeiling}).
+
+  Implementation ==> add
+
+    if R has FloatingPointSystem then
+      safetymargin : N := 6
+      
+      safeFloor(x:R):Z ==
+        if (shift := order(x)-precision()$R+safetymargin) >= 0 then
+          x := x+float(1,shift)
+        retract(floor(x))@Z
+
+      safeCeiling(x:R):Z ==
+        if (shift := order(x)-precision()$R+safetymargin) >= 0 then
+          x := x+float(1,shift)
+        retract(ceiling(x))@Z
+
+      safetyMargin(n:N):N == 
+        (safetymargin,n) := (n,safetymargin)
+        n
+
+      safetyMargin():N == safetymargin
+
+    pascaltriangle : FlexibleArray(R) := empty()
+    ncomputed : N := 3
+    rangepascaltriangle : N := 216
+
+    pascalTriangle(n:N, r:Z):R ==
+      negative? r => 0
+      (d := n-r) < r => pascalTriangle(n,d)
+      zero? r => 1$R
+--      one? r => n :: R
+      (r = 1) => n :: R
+      n > rangepascaltriangle => 
+       binomial(n,r)$IntegerCombinatoricFunctions(Z) :: R
+      n <= ncomputed =>
+        m := divide(n-4,2)
+        mq := m.quotient
+        pascaltriangle((mq+1)*(mq+m.remainder)+r-1)
+      -- compute the missing lines
+      for i in (ncomputed+1)..n repeat
+        for j in 2..(i quo 2) repeat
+          pascaltriangle := concat!(pascaltriangle,pascalTriangle((i-1) 
+           :: N, j-1)+pascalTriangle((i-1) :: N,j))
+        ncomputed := i
+      pascalTriangle(n,r)
+
+    rangePascalTriangle(n:N):N ==
+      if n<ncomputed then
+        if n<3 then
+          pascaltriangle := delete!(pascaltriangle,1..#pascaltriangle)
+          ncomputed := 3
+        else
+          d := divide(n-3,2)
+          dq := d.quotient
+          pascaltriangle := delete!(pascaltriangle,((dq+1)*(dq+d.remainder)
+           +1)..#pascaltriangle)
+          ncomputed := n
+      (rangepascaltriangle,n) := (n,rangepascaltriangle)
+      n
+
+    rangePascalTriangle():N == rangepascaltriangle
+
+    sizePascalTriangle():N == #pascaltriangle
+
+    fillPascalTriangle():Void == pascalTriangle(rangepascaltriangle,2)
+
+@
+<<GALUTIL.dotabb>>=
+"GALUTIL" [color="#FF4488",href="bookvol10.4.pdf#nameddest=GALUTIL"]
+"A1AGG" [color="#4488FF",href="bookvol10.2.pdf#nameddest=A1AGG"]
+"GALUTIL" -> "A1AGG"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package GAUSSFAC GaussianFactorizationPackage}
+\pagehead{GaussianFactorizationPackage}{GAUSSFAC}
+\pagepic{ps/v104gaussianfactorizationpackage.ps}{GAUSSFAC}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package GAUSSFAC GaussianFactorizationPackage>>=
+)abbrev package GAUSSFAC GaussianFactorizationPackage
+++ Author: Patrizia Gianni
+++ Date Created: Summer 1986
+++ Date Last Updated:
+++ Basic Functions:
+++ Related Constructors:
+++ Also See:
+++ AMS Classifications:
+++ Keywords:
+++ References:
+++ Description: Package for the factorization of complex or gaussian
+++ integers.
+GaussianFactorizationPackage() : C == T
+ where
+  NNI  ==  NonNegativeInteger
+  Z      ==> Integer
+  ZI     ==> Complex Z
+  FRZ    ==> Factored ZI
+  fUnion ==> Union("nil", "sqfr", "irred", "prime")
+  FFE    ==> Record(flg:fUnion, fctr:ZI, xpnt:Integer)
+
+  C  == with
+     factor      :     ZI     ->     FRZ
+       ++ factor(zi) produces the complete factorization of the complex
+       ++ integer zi.
+     sumSquares  :     Z      ->    List Z
+       ++ sumSquares(p) construct \spad{a} and b such that \spad{a**2+b**2}
+       ++ is equal to
+       ++ the integer prime p, and otherwise returns an error.
+       ++ It will succeed if the prime number p is 2 or congruent to 1
+       ++ mod 4.
+     prime?      :     ZI     ->    Boolean
+       ++ prime?(zi) tests if the complex integer zi is prime.
+
+  T  == add
+     import IntegerFactorizationPackage Z
+
+     reduction(u:Z,p:Z):Z ==
+       p=0 => u
+       positiveRemainder(u,p)
+
+     merge(p:Z,q:Z):Union(Z,"failed") ==
+       p = q => p
+       p = 0 => q
+       q = 0 => p
+       "failed"
+
+     exactquo(u:Z,v:Z,p:Z):Union(Z,"failed") ==
+        p=0 => u exquo v
+        v rem p = 0 => "failed"
+        positiveRemainder((extendedEuclidean(v,p,u)::Record(coef1:Z,coef2:Z)).coef1,p)
+
+     FMod := ModularRing(Z,Z,reduction,merge,exactquo)
+
+     fact2:ZI:= complex(1,1)
+
+             ----  find the solution of x**2+1 mod q  ----
+     findelt(q:Z) : Z ==
+       q1:=q-1
+       r:=q1
+       r1:=r exquo 4
+       while ^(r1 case "failed") repeat
+         r:=r1::Z
+         r1:=r exquo 2
+       s : FMod := reduce(1,q)
+       qq1:FMod :=reduce(q1,q)
+       for i in 2.. while (s=1 or s=qq1) repeat
+         s:=reduce(i,q)**(r::NNI)
+       t:=s
+       while t^=qq1 repeat
+         s:=t
+         t:=t**2
+       s::Z
+
+
+     ---- write p, congruent to 1 mod 4, as a sum of two squares ----
+     sumsq1(p:Z) : List Z ==
+       s:= findelt(p)
+       u:=p
+       while u**2>p repeat
+         w:=u rem s
+         u:=s
+         s:=w
+       [u,s]
+
+            ---- factorization of an integer  ----
+     intfactor(n:Z) : Factored ZI ==
+       lfn:= factor n
+       r : List FFE :=[]
+       unity:ZI:=complex(unit lfn,0)
+       for term in (factorList lfn) repeat
+         n:=term.fctr
+         exp:=term.xpnt
+         n=2 =>
+           r :=concat(["prime",fact2,2*exp]$FFE,r)
+           unity:=unity*complex(0,-1)**(exp rem 4)::NNI
+
+         (n rem 4) = 3 => r:=concat(["prime",complex(n,0),exp]$FFE,r)
+
+         sz:=sumsq1(n)
+         z:=complex(sz.1,sz.2)
+         r:=concat(["prime",z,exp]$FFE,
+                 concat(["prime",conjugate(z),exp]$FFE,r))
+       makeFR(unity,r)
+
+           ---- factorization of a gaussian number  ----
+     factor(m:ZI) : FRZ ==
+       m=0 => primeFactor(0,1)
+       a:= real m
+
+       (b:= imag m)=0 => intfactor(a) :: FRZ
+
+       a=0 =>
+         ris:=intfactor(b)
+         unity:= unit(ris)*complex(0,1)
+         makeFR(unity,factorList ris)
+
+       d:=gcd(a,b)
+       result : List FFE :=[]
+       unity:ZI:=1$ZI
+
+       if d^=1 then
+         a:=(a exquo d)::Z
+         b:=(b exquo d)::Z
+         r:= intfactor(d)
+         result:=factorList r
+         unity:=unit r
+         m:=complex(a,b)
+
+       n:Z:=a**2+b**2
+       factn:= factorList(factor n)
+       part:FFE:=["prime",0$ZI,0]
+       for term in factn repeat
+         n:=term.fctr
+         exp:=term.xpnt
+         n=2 =>
+           part:= ["prime",fact2,exp]$FFE
+           m:=m quo (fact2**exp:NNI)
+           result:=concat(part,result)
+
+         (n rem 4) = 3 =>
+           g0:=complex(n,0)
+           part:= ["prime",g0,exp quo 2]$FFE
+           m:=m quo g0
+           result:=concat(part,result)
+
+         z:=gcd(m,complex(n,0))
+         part:= ["prime",z,exp]$FFE
+         z:=z**(exp:NNI)
+         m:=m quo z
+         result:=concat(part,result)
+
+       if m^=1 then unity:=unity * m
+       makeFR(unity,result)
+
+           ----  write p prime like sum of two squares  ----
+     sumSquares(p:Z) : List Z ==
+       p=2 => [1,1]
+       p rem 4 ^= 1 => error "no solutions"
+       sumsq1(p)
+
+
+     prime?(a:ZI) : Boolean ==
+        n : Z := norm a
+        n=0 => false            -- zero
+        n=1 => false            -- units
+        prime?(n)$IntegerPrimesPackage(Z)  => true
+        re : Z := real a
+        im : Z := imag a
+        re^=0 and im^=0 => false
+        p : Z := abs(re+im)     -- a is of the form p, -p, %i*p or -%i*p
+        p rem 4 ^= 3 => false
+        -- return-value true, if p is a rational prime,
+        -- and false, otherwise
+        prime?(p)$IntegerPrimesPackage(Z)
+
+@
+<<GAUSSFAC.dotabb>>=
+"GAUSSFAC" [color="#FF4488",href="bookvol10.4.pdf#nameddest=GAUSSFAC"]
+"COMPCAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=COMPCAT"]
+"GAUSSFAC" -> "COMPCAT"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{package GENMFACT GeneralizedMultivariateFactorize}
 \pagehead{GeneralizedMultivariateFactorize}{GENMFACT}
 \pagepic{ps/v104generalizedmultivariatefactorize.ps}{GENMFACT}{1.00}
@@ -28209,6 +31621,11 @@ UnivariatePolynomialCommonDenominator(R, Q, UP): Exports == Impl where
 <<package CHARPOL CharacteristicPolynomialPackage>>
 <<package COMBF CombinatorialFunction>>
 <<package CDEN CommonDenominator>>
+<<package COMPFACT ComplexFactorization>>
+<<package COMPLEX2 ComplexFunctions2>>
+<<package CINTSLPE ComplexIntegerSolveLinearPolynomialEquation>>
+<<package COMPLPAT ComplexPattern>>
+<<package CPMATCH ComplexPatternMatch>>
 <<package CRFP ComplexRootFindingPackage>>
 <<package CMPLXRT ComplexRootPackage>>
 <<package CTRIGMNP ComplexTrigonometricManipulations>>
@@ -28238,6 +31655,7 @@ UnivariatePolynomialCommonDenominator(R, Q, UP): Exports == Impl where
 <<package ELFUTS EllipticFunctionsUnivariateTaylorSeries>>
 <<package EQ2 EquationFunctions2>>
 <<package ERROR ErrorFunctions>>
+<<package GBEUCLID EuclideanGroebnerBasisPackage>>
 <<package EVALCYC EvaluateCycleIndicators>>
 <<package ESCONT ExpertSystemContinuityPackage>>
 <<package ESCONT1 ExpertSystemContinuityPackage1>>
@@ -28278,6 +31696,11 @@ UnivariatePolynomialCommonDenominator(R, Q, UP): Exports == Impl where
 <<package FS2UPS FunctionSpaceToUnivariatePowerSeries>>
 <<package FSUPFACT FunctionSpaceUnivariatePolynomialFactor>>
 
+<<package GALFACTU GaloisGroupFactorizationUtilities>>
+<<package GALFACT GaloisGroupFactorizer>>
+<<package GALPOLYU GaloisGroupPolynomialUtilities>>
+<<package GALUTIL GaloisGroupUtilities>>
+<<package GAUSSFAC GaussianFactorizationPackage>>
 <<package GENMFACT GeneralizedMultivariateFactorize>>
 
 <<package HB HallBasis>>
diff --git a/books/bookvol4.pamphlet b/books/bookvol4.pamphlet
index e02268a..70d411d 100644
--- a/books/bookvol4.pamphlet
+++ b/books/bookvol4.pamphlet
@@ -2233,7 +2233,7 @@ and the Type field has been moved toward the center of the line.
 The ``See Also:'' section lists the domain with the ``show'' command
 and the path to the source file in dvi format.
 
-\subsection{adding help documentation in Makefile}
+\subsection{Adding help documentation in Makefile}
 
 There is a section in the src/algebra/Makefile.pamphlet that reads:
 \begin{verbatim}
@@ -2244,25 +2244,45 @@ which is essentially a list of all of the algebra help files. Each item
 in this list refers to a stanza that looks like:
 
 \begin{verbatim}
-${HELP}/AssociationList.help: ${IN}/list.spad.pamphlet
-	@echo 7000 create AssociationList.help from ${IN}/list.spad.pamphlet
-	@${TANGLE} -R"AssociationList.help" ${IN}/list.spad.pamphlet \
+${HELP}/AssociationList.help: ${BOOKS}/bookvol10.3.pamphlet
+	@echo 7000 create AssociationList.help from \
+           ${BOOKS}/bookvol10.3.pamphlet
+	@${TANGLE} -R"AssociationList.help" ${BOOKS}/bookvol10.3.pamphlet \
             >${HELP}/AssociationList.help
 	@cp ${HELP}/AssociationList.help ${HELP}/ALIST.help
-	@${TANGLE} -R"AssociationList.input" ${IN}/list.spad.pamphlet \
+	@${TANGLE} -R"AssociationList.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/AssociationList.input
+	@echo "AssociationList (ALIST)" >>${HELPFILE}
 \end{verbatim}
 
 Notice that the first line has an connection between the help file and 
-the spad file that contains it. The second line gives debugging output
-containing a unique number. The third line extracts the help file. The
-fourth line copies the file with the long name of the domain to a file
+the spad file that contains it. 
+
+The second line gives debugging output containing a unique number for
+console debugging purposes of failed builds.
+
+The third line extracts the help file. These help files are part of
+the algebra books (bookvol10.2, bookvol10.3, and bookvol10.4). The
+chunkname is the same as the Category, Domain, or Package.
+
+The fourth line copies the file with the long name of the domain to a file
 with the abbreviation of the domain so the user can query the domain
-with either form.
+with either form using help.
+
+The fifth line creates a regression test file for the help file. In the
+algebra each help file has an associated regression test file to test
+all of the function calls shown in the help page. These files are
+copied to the intermediate directory for regression testing.
+
+The sixth line adds a line to the HELPFILE (see the variable in
+the src/algebra/Makefile). This HELPFILE is concatenated onto the
+final help.help file in the MNT/doc/spadhelp directory. Thus, when
+a user types )help with no argument they see a list of domains which
+contain help information.
 
 \subsection{Using help documentation for regression testing}
 
-The last line extracts an input test file for the algebra. In general
+The fifth line extracts an input test file for the algebra. In general
 each help file is used to create an input test file for regression testing.
 
 There is a Makefile variable called REGRESS in the algebra Makefile:
@@ -4383,11 +4403,116 @@ vector thus:
 Again we rerun the failing function and now tpd1 contains the
 domain vector for the domain CHAR:
 
+\section{How to make graphs in algebra books}
+dot -Tps <pic >books/ps/domain.ps
 
+where file pic contains something like:
 
+\begin{verbatim}
+digraph pic {
+ fontsize=10;
+ bgcolor="#FFFF66";
+ node [shape=box, color=white, style=filled];
 
+"OrderlyDifferentialVariable"
+ [color=lightblue,href="bookvol10.3.pdf#nameddest=ODVAR"];
 
+}
+\end{verbatim}
 
+\section{Graphviz file creation}
+The graphviz output used on the website is a scaled vector graphics
+file (SVG). The dot command to output this file is:
+\begin{verbatim}
+  dot -Tsvg:cg <pic >pic.svg
+\end{verbatim}
+The SVG file that gets generated has the following preamble.
+\begin{verbatim}
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
+ "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd" [
+ <!ATTLIST svg xmlns:xlink CDATA #FIXED "http://www.w3.org/1999/xlink">
+]>
+<!-- Generated by dot version 2.8 (Thu Sep 14 20:34:11 UTC 2006)
+     For user: (root) root -->
+<!-- Title: AxiomSept2008 Pages: 1 -->
+<svg width="3960pt" height="2312pt"
+ viewBox = "0 0 3960 2312"
+ xmlns="http://www.w3.org/2000/svg" 
+ xmlns:xlink="http://www.w3.org/1999/xlink">
+\end{verbatim}
+There are two pieces of information that are important. First,
+we need to add the following text by removing the trailing
+$>$ character from the svg tag and replacing it with the 
+following block. This block exports some javascript functions
+that we use to scale the graphics.
+\begin{verbatim}
+ onload="RunScript(evt)">
+<script type="text/ecmascript">
+<![CDATA[
+var g_element;
+var SVGDoc;
+var SVGRoot;
+function setDimension(w,h) {
+  SVGDoc.documentElement.setAttribute("width",w);
+  SVGDoc.documentElement.setAttribute("height",h);
+}
+function setScale(sw,sh) {
+  g_element.setAttribute("transform","scale("+sw+" "+sh+")");
+}
+function RunScript(LoadEvent) {
+  top.SVGsetDimension=setDimension;
+  top.SVGsetScale=setScale;
+  SVGDoc=LoadEvent.target.ownerDocument;
+  g_element=SVGDoc.getElementById("graph0");
+}
+]]>
+</script>
+\end{verbatim}
+A second item of interest is the viewbox line which gives us the
+width and height information. We use this information to place
+the graph on the web page. A simple example of the web page
+looks follows. We need to replace the X and Y sizes with the
+sizes from the viewbox above.
+\begin{verbatim}
+<html>
+<head>
+<title>Axiom Abbreviated Category and Domain graph</title>
+<script type="text/javascript">
+var W3CDOM = (document.createElement && document.getElementsByTagName);
+window.onload 	= init;
+function init(evt) {
+	SVGscale(0.5);
+}
+function SVGscale(scale) {
+	window.SVGsetDimension(8162*scale, 3068*scale);
+	window.SVGsetScale(scale,scale);	
+	var box 	= document.getElementById('svgid');
+	box.width  	= 8162*scale;
+	box.height 	= 3068*scale;
+}
+</script>
+
+</head>
+<body>
+<h1>Axiom Abbreviated Category and Domain graph</h1>	
+<div>
+	choose here: 
+	<a href="#" onclick="SVGscale(0.1);">0.1</a> or
+	<a href="#" onclick="SVGscale(0.25);">0.25</a> or
+	<a href="#" onclick="SVGscale(0.5);">0.5</a> or 
+	<a href="#" onclick="SVGscale(1);">1.0</a> or 
+	<a href="#" onclick="SVGscale(1.5);">1.5</a> or ...
+</div>
+<div>
+  <object id='svgid' data="dotabb.svg" type="image/svg+xml" 
+   width="8162" height="3068" wmode="transparent" style="overflow:hidden;" />
+  </object>
+</div>
+
+</body>
+</html>
+\end{verbatim}
 \section{Makefile}
 This book is actually a literate program\cite{2} and can contain 
 executable source code. In particular, the Makefile for this book
diff --git a/books/ps/v104complexfactorization.ps b/books/ps/v104complexfactorization.ps
new file mode 100644
index 0000000..06f80cd
--- /dev/null
+++ b/books/ps/v104complexfactorization.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 136 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 100 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% COMPFACT
+gsave
+[ /Rect [ 0 72 92 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=COMPFACT) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 92 108 moveto
+2.84217e-14 108 lineto
+7.10543e-15 72 lineto
+92 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 92 108 moveto
+2.84217e-14 108 lineto
+7.10543e-15 72 lineto
+92 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+8 85.9 moveto 76 (COMPFACT) alignedtext
+grestore
+% COMPCAT
+gsave
+[ /Rect [ 4 0 88 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=COMPCAT) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 88 36 moveto
+4 36 lineto
+4 1.06581e-14 lineto
+88 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 88 36 moveto
+4 36 lineto
+4 1.06581e-14 lineto
+88 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+12 13.9 moveto 68 (COMPCAT) alignedtext
+grestore
+% COMPFACT->COMPCAT
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 46 72 moveto
+46 64 46 55 46 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 49.5001 46 moveto
+46 36 lineto
+42.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 49.5001 46 moveto
+46 36 lineto
+42.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 136 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104complexfunctions2.ps b/books/ps/v104complexfunctions2.ps
new file mode 100644
index 0000000..ec1aec3
--- /dev/null
+++ b/books/ps/v104complexfunctions2.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 134 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 98 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% COMPLEX2
+gsave
+[ /Rect [ 0 72 90 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=COMPLEX2) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 90 108 moveto
+2.84217e-14 108 lineto
+7.10543e-15 72 lineto
+90 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 90 108 moveto
+2.84217e-14 108 lineto
+7.10543e-15 72 lineto
+90 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+8 85.9 moveto 74 (COMPLEX2) alignedtext
+grestore
+% BMODULE
+gsave
+[ /Rect [ 2 0 88 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=BMODULE) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 88 36 moveto
+2 36 lineto
+2 1.06581e-14 lineto
+88 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 88 36 moveto
+2 36 lineto
+2 1.06581e-14 lineto
+88 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+10 13.9 moveto 70 (BMODULE) alignedtext
+grestore
+% COMPLEX2->BMODULE
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 45 72 moveto
+45 64 45 55 45 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 48.5001 46 moveto
+45 36 lineto
+41.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 48.5001 46 moveto
+45 36 lineto
+41.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 134 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104complexintegersolvelinearpolynomialequation.ps b/books/ps/v104complexintegersolvelinearpolynomialequation.ps
new file mode 100644
index 0000000..5193ea0
--- /dev/null
+++ b/books/ps/v104complexintegersolvelinearpolynomialequation.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 128 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 92 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% CINTSLPE
+gsave
+[ /Rect [ 2 72 82 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=CINTSLPE) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 82 108 moveto
+2 108 lineto
+2 72 lineto
+82 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 82 108 moveto
+2 108 lineto
+2 72 lineto
+82 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+9.5 85.9 moveto 65 (CINTSLPE) alignedtext
+grestore
+% COMPCAT
+gsave
+[ /Rect [ 0 0 84 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=COMPCAT) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 84 36 moveto
+2.84217e-14 36 lineto
+7.10543e-15 1.06581e-14 lineto
+84 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 84 36 moveto
+2.84217e-14 36 lineto
+7.10543e-15 1.06581e-14 lineto
+84 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+8 13.9 moveto 68 (COMPCAT) alignedtext
+grestore
+% CINTSLPE->COMPCAT
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 42 72 moveto
+42 64 42 55 42 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 45.5001 46 moveto
+42 36 lineto
+38.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 45.5001 46 moveto
+42 36 lineto
+38.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 128 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104complexpattern.ps b/books/ps/v104complexpattern.ps
new file mode 100644
index 0000000..cfd31fe
--- /dev/null
+++ b/books/ps/v104complexpattern.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 132 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 96 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% COMPLPAT
+gsave
+[ /Rect [ 0 72 88 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=COMPLPAT) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 88 108 moveto
+2.84217e-14 108 lineto
+7.10543e-15 72 lineto
+88 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 88 108 moveto
+2.84217e-14 108 lineto
+7.10543e-15 72 lineto
+88 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+8 85.9 moveto 72 (COMPLPAT) alignedtext
+grestore
+% COMPCAT
+gsave
+[ /Rect [ 2 0 86 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=COMPCAT) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 86 36 moveto
+2 36 lineto
+2 1.06581e-14 lineto
+86 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 86 36 moveto
+2 36 lineto
+2 1.06581e-14 lineto
+86 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+10 13.9 moveto 68 (COMPCAT) alignedtext
+grestore
+% COMPLPAT->COMPCAT
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 44 72 moveto
+44 64 44 55 44 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 47.5001 46 moveto
+44 36 lineto
+40.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 47.5001 46 moveto
+44 36 lineto
+40.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 132 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104complexpatternmatch.ps b/books/ps/v104complexpatternmatch.ps
new file mode 100644
index 0000000..bc47b53
--- /dev/null
+++ b/books/ps/v104complexpatternmatch.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 128 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 92 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% CPMATCH
+gsave
+[ /Rect [ 1 72 83 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=CPMATCH) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 83 108 moveto
+1 108 lineto
+1 72 lineto
+83 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 83 108 moveto
+1 108 lineto
+1 72 lineto
+83 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+8.5 85.9 moveto 67 (CPMATCH) alignedtext
+grestore
+% COMPCAT
+gsave
+[ /Rect [ 0 0 84 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=COMPCAT) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 84 36 moveto
+2.84217e-14 36 lineto
+7.10543e-15 1.06581e-14 lineto
+84 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 84 36 moveto
+2.84217e-14 36 lineto
+7.10543e-15 1.06581e-14 lineto
+84 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+8 13.9 moveto 68 (COMPCAT) alignedtext
+grestore
+% CPMATCH->COMPCAT
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 42 72 moveto
+42 64 42 55 42 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 45.5001 46 moveto
+42 36 lineto
+38.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 45.5001 46 moveto
+42 36 lineto
+38.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 128 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104euclideangroebnerbasispackage.ps b/books/ps/v104euclideangroebnerbasispackage.ps
new file mode 100644
index 0000000..76bf74b
--- /dev/null
+++ b/books/ps/v104euclideangroebnerbasispackage.ps
@@ -0,0 +1,326 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 194 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 158 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% GBEUCLID
+gsave
+[ /Rect [ 32 72 118 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=GBEUCLID) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 118 108 moveto
+32 108 lineto
+32 72 lineto
+118 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 118 108 moveto
+32 108 lineto
+32 72 lineto
+118 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+39.5 85.9 moveto 71 (GBEUCLID) alignedtext
+grestore
+% PFECAT
+gsave
+[ /Rect [ 0 0 66 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=PFECAT) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 66 36 moveto
+2.24404e-14 36 lineto
+8.44116e-15 1.06581e-14 lineto
+66 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 66 36 moveto
+2.24404e-14 36 lineto
+8.44116e-15 1.06581e-14 lineto
+66 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+7.5 13.9 moveto 51 (PFECAT) alignedtext
+grestore
+% GBEUCLID->PFECAT
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 64 72 moveto
+59 64 54 54 48 45 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 50.916 43.0418 moveto
+43 36 lineto
+44.7969 46.4414 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 50.916 43.0418 moveto
+43 36 lineto
+44.7969 46.4414 lineto
+closepath stroke
+grestore
+% STRING
+gsave
+[ /Rect [ 84 0 150 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.3.pdf#nameddest=STRING) >>
+  /Subtype /Link
+/ANN pdfmark
+0.273 0.733 1.000 nodecolor
+newpath 150 36 moveto
+84 36 lineto
+84 1.06581e-14 lineto
+150 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.273 0.733 1.000 nodecolor
+newpath 150 36 moveto
+84 36 lineto
+84 1.06581e-14 lineto
+150 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+92 13.9 moveto 50 (STRING) alignedtext
+grestore
+% GBEUCLID->STRING
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 86 72 moveto
+91 64 96 54 102 45 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 105.203 46.4414 moveto
+107 36 lineto
+99.084 43.0418 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 105.203 46.4414 moveto
+107 36 lineto
+99.084 43.0418 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 194 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104galoisgroupfactorizationutilities.ps b/books/ps/v104galoisgroupfactorizationutilities.ps
new file mode 100644
index 0000000..a66c86c
--- /dev/null
+++ b/books/ps/v104galoisgroupfactorizationutilities.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 134 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 98 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% GALFACTU
+gsave
+[ /Rect [ 0 72 90 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=GALFACTU) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 90 108 moveto
+2.84217e-14 108 lineto
+7.10543e-15 72 lineto
+90 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 90 108 moveto
+2.84217e-14 108 lineto
+7.10543e-15 72 lineto
+90 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+8 85.9 moveto 74 (GALFACTU) alignedtext
+grestore
+% PFECAT
+gsave
+[ /Rect [ 12 0 78 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=PFECAT) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 78 36 moveto
+12 36 lineto
+12 1.06581e-14 lineto
+78 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 78 36 moveto
+12 36 lineto
+12 1.06581e-14 lineto
+78 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+19.5 13.9 moveto 51 (PFECAT) alignedtext
+grestore
+% GALFACTU->PFECAT
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 45 72 moveto
+45 64 45 55 45 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 48.5001 46 moveto
+45 36 lineto
+41.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 48.5001 46 moveto
+45 36 lineto
+41.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 134 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104galoisgroupfactorizer.ps b/books/ps/v104galoisgroupfactorizer.ps
new file mode 100644
index 0000000..5f8f324
--- /dev/null
+++ b/books/ps/v104galoisgroupfactorizer.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 124 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 88 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% GALFACT
+gsave
+[ /Rect [ 0 72 80 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=GALFACT) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 80 108 moveto
+2.13163e-14 108 lineto
+7.10543e-15 72 lineto
+80 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 80 108 moveto
+2.13163e-14 108 lineto
+7.10543e-15 72 lineto
+80 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+8 85.9 moveto 64 (GALFACT) alignedtext
+grestore
+% FSAGG
+gsave
+[ /Rect [ 9 0 71 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=FSAGG) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 71 36 moveto
+9 36 lineto
+9 1.06581e-14 lineto
+71 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 71 36 moveto
+9 36 lineto
+9 1.06581e-14 lineto
+71 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+17 13.9 moveto 46 (FSAGG) alignedtext
+grestore
+% GALFACT->FSAGG
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 40 72 moveto
+40 64 40 55 40 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 43.5001 46 moveto
+40 36 lineto
+36.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 43.5001 46 moveto
+40 36 lineto
+36.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 124 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104galoisgrouppolynomialutilities.ps b/books/ps/v104galoisgrouppolynomialutilities.ps
new file mode 100644
index 0000000..fed81d2
--- /dev/null
+++ b/books/ps/v104galoisgrouppolynomialutilities.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 134 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 98 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% GALPOLYU
+gsave
+[ /Rect [ 0 72 90 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=GALPOLYU) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 90 108 moveto
+2.84217e-14 108 lineto
+7.10543e-15 72 lineto
+90 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 90 108 moveto
+2.84217e-14 108 lineto
+7.10543e-15 72 lineto
+90 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+8 85.9 moveto 74 (GALPOLYU) alignedtext
+grestore
+% PFECAT
+gsave
+[ /Rect [ 12 0 78 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=PFECAT) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 78 36 moveto
+12 36 lineto
+12 1.06581e-14 lineto
+78 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 78 36 moveto
+12 36 lineto
+12 1.06581e-14 lineto
+78 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+19.5 13.9 moveto 51 (PFECAT) alignedtext
+grestore
+% GALPOLYU->PFECAT
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 45 72 moveto
+45 64 45 55 45 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 48.5001 46 moveto
+45 36 lineto
+41.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 48.5001 46 moveto
+45 36 lineto
+41.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 134 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104galoisgrouputilities.ps b/books/ps/v104galoisgrouputilities.ps
new file mode 100644
index 0000000..fe1f56d
--- /dev/null
+++ b/books/ps/v104galoisgrouputilities.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 120 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 84 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% GALUTIL
+gsave
+[ /Rect [ 0 72 76 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=GALUTIL) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 76 108 moveto
+2.82205e-14 108 lineto
+7.17829e-15 72 lineto
+76 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 76 108 moveto
+2.82205e-14 108 lineto
+7.17829e-15 72 lineto
+76 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+7.5 85.9 moveto 61 (GALUTIL) alignedtext
+grestore
+% A1AGG
+gsave
+[ /Rect [ 7 0 69 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=A1AGG) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 69 36 moveto
+7 36 lineto
+7 1.06581e-14 lineto
+69 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 69 36 moveto
+7 36 lineto
+7 1.06581e-14 lineto
+69 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+14.5 13.9 moveto 47 (A1AGG) alignedtext
+grestore
+% GALUTIL->A1AGG
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 38 72 moveto
+38 64 38 55 38 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 41.5001 46 moveto
+38 36 lineto
+34.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 41.5001 46 moveto
+38 36 lineto
+34.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 120 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104gaussianfactorizationpackage.ps b/books/ps/v104gaussianfactorizationpackage.ps
new file mode 100644
index 0000000..62921a4
--- /dev/null
+++ b/books/ps/v104gaussianfactorizationpackage.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 132 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 96 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% GAUSSFAC
+gsave
+[ /Rect [ 0 72 88 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=GAUSSFAC) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 88 108 moveto
+2.84217e-14 108 lineto
+7.10543e-15 72 lineto
+88 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 88 108 moveto
+2.84217e-14 108 lineto
+7.10543e-15 72 lineto
+88 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+8 85.9 moveto 72 (GAUSSFAC) alignedtext
+grestore
+% COMPCAT
+gsave
+[ /Rect [ 2 0 86 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=COMPCAT) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 86 36 moveto
+2 36 lineto
+2 1.06581e-14 lineto
+86 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 86 36 moveto
+2 36 lineto
+2 1.06581e-14 lineto
+86 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+10 13.9 moveto 68 (COMPCAT) alignedtext
+grestore
+% GAUSSFAC->COMPCAT
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 44 72 moveto
+44 64 44 55 44 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 47.5001 46 moveto
+44 36 lineto
+40.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 47.5001 46 moveto
+44 36 lineto
+40.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 132 152
+end
+restore
+%%EOF
diff --git a/changelog b/changelog
index e960397..ca1a76a 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,29 @@
+20090130 tpd books/bookvol4.pamphlet document spadhelp
+20090130 tpd src/Makefile remove parallel input testing
+20090130 tpd src/algebra/Makefile fix spadhelp
+20090130 tpd src/doc/Makefile pick up the spadhelp changes dynamically
+20090130 tpd src/doc/spadhelp remove the static help list
+20090130 tpd src/algebra/Makefile remove spad files
+20090130 tpd src/algebra/gbeuclid.spad removed
+20090130 tpd books/ps/v104euclideangroebnerbasispackage.ps added
+20090130 tpd src/algebra/Makefile EuclideanGroebnerBasisPackage.regress added
+20090130 tpd src/algebra/Makefile EuclideanGroebnerBasisPackage.help added
+20090130 tpd src/algebra/gaussian.spad removed
+20090130 tpd books/ps/v104complexintegersolvelinearpolynomialequation.ps
+20090130 tpd books/ps/v104complexfactorization.ps added
+20090130 tpd books/ps/v104complexfunctions2.ps added
+20090130 tpd books/ps/v104complexpatternmatch.ps added
+20090130 tpd books/ps/v104complexpattern.ps added
+20090130 tpd src/algebra/gaussfac.spad removed
+20090130 tpd books/ps/v104gaussianfactorizationpackage.ps added
+20090130 tpd src/algebra/galutil.spad removed
+20090130 tpd books/ps/v104galoisgrouputilities.ps added
+20090130 tpd src/algebra/galpolyu.spad removed
+20090130 tpd books/ps/v104galoisgrouppolynomialutilities.ps added
+20090130 tpd src/algebra/galfactu.spad removed
+20090130 tpd books/ps/v104galoisgroupfactorizationutilities.ps added
+20090130 tpd src/algebra/galfact.spad removed
+20090130 tpd books/ps/v104galoisgroupfactorizer.ps added
 20090129 tpd src/axiom-website/patches.html 20090129.01.mxr.patch
 20090129 mxr src/interp/i-funsel.boot document mmCost
 20090128 tpd src/axiom-website/patches.html 20090128.01.tpd.patch
diff --git a/src/Makefile.pamphlet b/src/Makefile.pamphlet
index 0a5d484..34820b0 100644
--- a/src/Makefile.pamphlet
+++ b/src/Makefile.pamphlet
@@ -303,7 +303,8 @@ inputdir: ${SRC}/input/Makefile
 	@mkdir -p ${INT}/input
 	@mkdir -p ${MNT}/${SYS}/input
 	@mkdir -p ${MNT}/${SYS}/doc/src/input
-	@(cd input ; ${ENV} ${MAKE} -j 10)
+	@(cd input ; ${ENV} ${MAKE} )
+#	@(cd input ; ${ENV} ${MAKE} -j 10)
 
 ${SRC}/input/Makefile: ${SRC}/input/Makefile.pamphlet
 	@echo 34 making ${SRC}/input/Makefile from \
diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet
index 19de3f1..54b0720 100644
--- a/src/algebra/Makefile.pamphlet
+++ b/src/algebra/Makefile.pamphlet
@@ -15771,9 +15771,7 @@ We need to figure out which mlift.spad to keep.
 <<environment>>=
 
 SPADFILES= \
- ${OUTSRC}/galfact.spad ${OUTSRC}/galfactu.spad ${OUTSRC}/galpolyu.spad \
- ${OUTSRC}/galutil.spad ${OUTSRC}/gaussfac.spad ${OUTSRC}/gaussian.spad \
- ${OUTSRC}/gbeuclid.spad ${OUTSRC}/gbintern.spad ${OUTSRC}/gb.spad \
+ ${OUTSRC}/gbintern.spad ${OUTSRC}/gb.spad \
  ${OUTSRC}/gdirprod.spad ${OUTSRC}/geneez.spad \
  ${OUTSRC}/generic.spad ${OUTSRC}/genufact.spad ${OUTSRC}/genups.spad \
  ${OUTSRC}/ghensel.spad ${OUTSRC}/gpgcd.spad \
@@ -15880,9 +15878,7 @@ ALDORFILES= \
 
 DOCFILES= \
  ${DOC}/exposed.lsp.dvi \
- ${DOC}/galfact.spad.dvi ${DOC}/galfactu.spad.dvi ${DOC}/galpolyu.spad.dvi \
- ${DOC}/galutil.spad.dvi ${DOC}/gaussfac.spad.dvi ${DOC}/gaussian.spad.dvi \
- ${DOC}/gbeuclid.spad.dvi ${DOC}/gbintern.spad.dvi ${DOC}/gb.spad.dvi \
+ ${DOC}/gbintern.spad.dvi ${DOC}/gb.spad.dvi \
  ${DOC}/gdirprod.spad.dvi ${DOC}/geneez.spad.dvi \
  ${DOC}/generic.spad.dvi ${DOC}/genufact.spad.dvi ${DOC}/genups.spad.dvi \
  ${DOC}/ghensel.spad.dvi ${DOC}/gpgcd.spad.dvi \
@@ -16569,6 +16565,8 @@ make to process this file.
 This keeps the regression test list in the algebra Makefile.
 
 <<environment>>=
+HELPFILE=${INT}/doc/help.helplist
+
 SPADHELP=\
  ${HELP}/AssociationList.help        ${HELP}/BalancedBinaryTree.help \
  ${HELP}/BasicOperator.help          ${HELP}/BinaryExpansion.help \
@@ -16581,6 +16579,7 @@ SPADHELP=\
  ${HELP}/EqTable.help                ${HELP}/Equation.help \
  ${HELP}/Expression.help \
  ${HELP}/DistributedMultivariatePolynomial.help \
+ ${HELP}/EuclideanGroebnerBasisPackage.help \
  ${HELP}/Factored.help               ${HELP}/FactoredFunctions2.help \
  ${HELP}/File.help                   ${HELP}/FileName.help \
  ${HELP}/FlexibleArray.help          ${HELP}/Float.help \
@@ -16647,6 +16646,7 @@ REGRESS=\
  DistributedMultivariatePolynomial.regress \
  EqTable.regress                Equation.regress \
  Expression.regress \
+ EuclideanGroebnerBasisPackage.regress \
  Factored.regress               FactoredFunctions2.regress \
  File.regress                   FileName.regress \
  FlexibleArray.regress          Float.regress \
@@ -16723,6 +16723,7 @@ ${HELP}/AssociationList.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/AssociationList.help ${HELP}/ALIST.help
 	@${TANGLE} -R"AssociationList.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/AssociationList.input
+	@echo "AssociationList (ALIST)" >>${HELPFILE}
 
 ${HELP}/BalancedBinaryTree.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7001 create BalancedBinaryTree.help from \
@@ -16732,6 +16733,7 @@ ${HELP}/BalancedBinaryTree.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/BalancedBinaryTree.help ${HELP}/BBTREE.help
 	@${TANGLE} -R"BalancedBinaryTree.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/BalancedBinaryTree.input
+	@echo "BalancedBinaryTree (BBTREE)" >>${HELPFILE}
 
 ${HELP}/BasicOperator.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7002 create BasicOperator.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -16740,6 +16742,7 @@ ${HELP}/BasicOperator.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/BasicOperator.help ${HELP}/BOP.help
 	@${TANGLE} -R"BasicOperator.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/BasicOperator.input
+	@echo "BasicOperator (BOP)" >>${HELPFILE}
 
 ${HELP}/BinaryExpansion.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7003 create BinaryExpansion.help from \
@@ -16749,6 +16752,7 @@ ${HELP}/BinaryExpansion.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/BinaryExpansion.help ${HELP}/BINARY.help
 	@${TANGLE} -R"BinaryExpansion.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/BinaryExpansion.input
+	@echo "BinaryExpansion (BINARY)" >>${HELPFILE}
 
 ${HELP}/BinarySearchTree.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7004 create BinarySearchTree.help from \
@@ -16758,6 +16762,7 @@ ${HELP}/BinarySearchTree.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/BinarySearchTree.help ${HELP}/BSTREE.help
 	@${TANGLE} -R"BinarySearchTree.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/BinarySearchTree.input
+	@echo "BinarySearchTree (BSTREE)" >>${HELPFILE}
 
 ${HELP}/CardinalNumber.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7005 create CardinalNumber.help from \
@@ -16767,6 +16772,7 @@ ${HELP}/CardinalNumber.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/CardinalNumber.help ${HELP}/CARD.help
 	@${TANGLE} -R"CardinalNumber.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/CardinalNumber.input
+	@echo "CardinalNumber (CARD)" >>${HELPFILE}
 
 ${HELP}/CartesianTensor.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7006 create CartesianTensor.help from \
@@ -16776,6 +16782,7 @@ ${HELP}/CartesianTensor.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/CartesianTensor.help ${HELP}/CARTEN.help
 	@${TANGLE} -R"CartesianTensor.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/CartesianTensor.input
+	@echo "CartesianTensor (CARTEN)" >>${HELPFILE}
 
 ${HELP}/Character.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7007 create Character.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -16784,6 +16791,7 @@ ${HELP}/Character.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/Character.help ${HELP}/CHAR.help
 	@${TANGLE} -R"Character.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/Character.input
+	@echo "Character (CHAR)" >>${HELPFILE}
 
 ${HELP}/CharacterClass.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7008 create CharacterClass.help from \
@@ -16793,6 +16801,7 @@ ${HELP}/CharacterClass.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/CharacterClass.help ${HELP}/CCLASS.help
 	@${TANGLE} -R"CharacterClass.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/CharacterClass.input
+	@echo "CharacterClass (CCLASS)" >>${HELPFILE}
 
 ${HELP}/CliffordAlgebra.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7009 create CliffordAlgebra.help from \
@@ -16802,6 +16811,7 @@ ${HELP}/CliffordAlgebra.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/CliffordAlgebra.help ${HELP}/CLIF.help
 	@${TANGLE} -R"CliffordAlgebra.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/CliffordAlgebra.input
+	@echo "CliffordAlgebra (CLIF)" >>${HELPFILE}
 
 ${HELP}/Complex.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7010 create Complex.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -16810,6 +16820,7 @@ ${HELP}/Complex.help: ${BOOKS}/bookvol10.3.pamphlet
 	@-cp ${HELP}/Complex.help ${HELP}/COMPLEX.help
 	@${TANGLE} -R"Complex.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/Complex.input
+	@echo "Complex (COMPLEX)" >>${HELPFILE}
 
 ${HELP}/ContinuedFraction.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7011 create ContinuedFraction.help from \
@@ -16819,6 +16830,7 @@ ${HELP}/ContinuedFraction.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/ContinuedFraction.help ${HELP}/CONTFRAC.help
 	@${TANGLE} -R"ContinuedFraction.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/ContinuedFraction.input
+	@echo "ContinuedFraction (CONTFRAC)" >>${HELPFILE}
 
 ${HELP}/CycleIndicators.help: ${BOOKS}/bookvol10.4.pamphlet
 	@echo 7012 create CycleIndicators.help from \
@@ -16828,6 +16840,7 @@ ${HELP}/CycleIndicators.help: ${BOOKS}/bookvol10.4.pamphlet
 	@cp ${HELP}/CycleIndicators.help ${HELP}/CYCLES.help
 	@${TANGLE} -R"CycleIndicators.input" ${BOOKS}/bookvol10.4.pamphlet \
             >${INPUT}/CycleIndicators.input
+	@echo "CycleIndicators (CYCLES)" >>${HELPFILE}
 
 ${HELP}/DeRhamComplex.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7013 create DeRhamComplex.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -16836,6 +16849,7 @@ ${HELP}/DeRhamComplex.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/DeRhamComplex.help ${HELP}/DERHAM.help
 	@${TANGLE} -R"DeRhamComplex.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/DeRhamComplex.input
+	@echo "DeRhamComplex (DERHAM)" >>${HELPFILE}
 
 ${HELP}/DecimalExpansion.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7014 create DecimalExpansion.help from \
@@ -16845,6 +16859,7 @@ ${HELP}/DecimalExpansion.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/DecimalExpansion.help ${HELP}/DECIMAL.help
 	@${TANGLE} -R"DecimalExpansion.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/DecimalExpansion.input
+	@echo "DecimalExpansion (DECIMAL)" >>${HELPFILE}
 
 ${HELP}/DistributedMultivariatePolynomial.help: \
             ${BOOKS}/bookvol10.3.pamphlet
@@ -16857,6 +16872,7 @@ ${HELP}/DistributedMultivariatePolynomial.help: \
 	@${TANGLE} -R"DistributedMultivariatePolynomial.input" \
            ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/DistributedMultivariatePolynomial.input
+	@echo "DistributedMultivariatePolynomial (DMP)" >>${HELPFILE}
 
 ${HELP}/DoubleFloat.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7016 create DoubleFloat.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -16865,6 +16881,7 @@ ${HELP}/DoubleFloat.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/DoubleFloat.help ${HELP}/DFLOAT.help
 	@${TANGLE} -R"DoubleFloat.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/DoubleFloat.input
+	@echo "DoubleFloat (DFLOAT)" >>${HELPFILE}
 
 ${HELP}/EqTable.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7017 create EqTable.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -16873,6 +16890,7 @@ ${HELP}/EqTable.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/EqTable.help ${HELP}/EQTBL.help
 	@${TANGLE} -R"EqTable.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/EqTable.input
+	@echo "EqTable (EQTBL)" >>${HELPFILE}
 
 ${HELP}/Equation.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7018 create Equation.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -16881,14 +16899,28 @@ ${HELP}/Equation.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/Equation.help ${HELP}/EQ.help
 	@${TANGLE} -R"Equation.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/Equation.input
+	@echo "Equation (EQ)" >>${HELPFILE}
+
+${HELP}/EuclideanGroebnerBasisPackage.help: ${BOOKS}/bookvol10.4.pamphlet
+	@echo 7020 create EuclideanGroebnerBasisPackage.help from \
+            ${BOOKS}/bookvol10.4.pamphlet
+	@${TANGLE} -R"EuclideanGroebnerBasisPackage.help" \
+            ${BOOKS}/bookvol10.4.pamphlet \
+            >${HELP}/EuclideanGroebnerBasisPackage.help
+	@cp ${HELP}/EuclideanGroebnerBasisPackage.help ${HELP}/GBEUCLID.help
+	@${TANGLE} -R"EuclideanGroebnerBasisPackage.input" \
+            ${BOOKS}/bookvol10.4.pamphlet \
+            >${INPUT}/EuclideanGroebnerBasisPackage.input
+	@echo "EuclideanGroebnerBasisPackage (GBEUCLID)" >>${HELPFILE}
 
 ${HELP}/Expression.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7018 create Expression.help from ${BOOKS}/bookvol10.3.pamphlet
 	@${TANGLE} -R"Expression.help" ${BOOKS}/bookvol10.3.pamphlet \
             >${HELP}/Expression.help
-	@cp ${HELP}/Expression.help ${HELP}/EQ.help
+	@cp ${HELP}/Expression.help ${HELP}/EXPR.help
 	@${TANGLE} -R"Expression.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/Expression.input
+	@echo "Expression (EXPR)" >>${HELPFILE}
 
 ${HELP}/Factored.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7019 create Factored.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -16897,6 +16929,7 @@ ${HELP}/Factored.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/Factored.help ${HELP}/FR.help
 	@${TANGLE} -R"Factored.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/Factored.input
+	@echo "Factored (FR)" >>${HELPFILE}
 
 ${HELP}/FactoredFunctions2.help: ${BOOKS}/bookvol10.4.pamphlet
 	@echo 7020 create FactoredFunctions2.help from \
@@ -16906,6 +16939,7 @@ ${HELP}/FactoredFunctions2.help: ${BOOKS}/bookvol10.4.pamphlet
 	@cp ${HELP}/FactoredFunctions2.help ${HELP}/FR2.help
 	@${TANGLE} -R"FactoredFunctions2.input" ${BOOKS}/bookvol10.4.pamphlet \
             >${INPUT}/FactoredFunctions2.input
+	@echo "FactoredFunctions2 (FR2)" >>${HELPFILE}
 
 ${HELP}/File.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7021 create File.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -16914,6 +16948,7 @@ ${HELP}/File.help: ${BOOKS}/bookvol10.3.pamphlet
 	@-cp ${HELP}/File.help ${HELP}/FILE.help
 	@${TANGLE} -R"File.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/File.input
+	@echo "File (FILE)" >>${HELPFILE}
 
 ${HELP}/FileName.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7022 create FileName.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -16922,6 +16957,7 @@ ${HELP}/FileName.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/FileName.help ${HELP}/FNAME.help
 	@${TANGLE} -R"FileName.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/FileName.input
+	@echo "FileName (FNAME)" >>${HELPFILE}
 
 ${HELP}/FlexibleArray.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7023 create FlexibleArray.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -16930,6 +16966,7 @@ ${HELP}/FlexibleArray.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/FlexibleArray.help ${HELP}/FARRAY.help
 	@${TANGLE} -R"FlexibleArray.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/FlexibleArray.input
+	@echo "FlexibleArray (FARRAY)" >>${HELPFILE}
 
 ${HELP}/Float.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7024 create Float.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -16938,14 +16975,16 @@ ${HELP}/Float.help: ${BOOKS}/bookvol10.3.pamphlet
 	@-cp ${HELP}/Float.help ${HELP}/FLOAT.help
 	@${TANGLE} -R"Float.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/Float.input
+	@echo "Float (FLOAT)" >>${HELPFILE}
 
 ${HELP}/Fraction.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7025 create Fraction.help from ${BOOKS}/bookvol10.3.pamphlet
 	@${TANGLE} -R"Fraction.help" ${BOOKS}/bookvol10.3.pamphlet \
             >${HELP}/Fraction.help
-	@cp ${HELP}/Fraction.help ${HELP}/FR.help
+	@cp ${HELP}/Fraction.help ${HELP}/FRAC.help
 	@${TANGLE} -R"Fraction.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/Fraction.input
+	@echo "Fraction (FRAC)" >>${HELPFILE}
 
 ${HELP}/FullPartialFractionExpansion.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7026 create FullPartialFractionExpansion.help from \
@@ -16957,6 +16996,7 @@ ${HELP}/FullPartialFractionExpansion.help: ${BOOKS}/bookvol10.3.pamphlet
 	@${TANGLE} -R"FullPartialFractionExpansion.input" \
             ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/FullPartialFractionExpansion.input
+	@echo "FullPartialFractionExpansion (FPARFRAC)" >>${HELPFILE}
 
 ${HELP}/GeneralDistributedMultivariatePolynomial.help: \
             ${BOOKS}/bookvol10.3.pamphlet
@@ -16970,6 +17010,7 @@ ${HELP}/GeneralDistributedMultivariatePolynomial.help: \
 	@${TANGLE} -R"GeneralDistributedMultivariatePolynomial.input" \
            ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/GeneralDistributedMultivariatePolynomial.input
+	@echo "GeneralDistributedMultivariatePolynomial (GDMP)" >>${HELPFILE}
 
 ${HELP}/GeneralSparseTable.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7028 create GeneralSparseTable.help from \
@@ -16979,6 +17020,7 @@ ${HELP}/GeneralSparseTable.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/GeneralSparseTable.help ${HELP}/GSTBL.help
 	@${TANGLE} -R"GeneralSparseTable.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/GeneralSparseTable.input
+	@echo "GeneralSparseTable (GSTBL)" >>${HELPFILE}
 
 ${HELP}/GroebnerFactorizationPackage.help: ${IN}/groebf.spad.pamphlet
 	@echo 7029 create GroebnerFactorizationPackage.help \
@@ -16990,6 +17032,7 @@ ${HELP}/GroebnerFactorizationPackage.help: ${IN}/groebf.spad.pamphlet
 	@${TANGLE} -R"GroebnerFactorizationPackage.input" \
            ${IN}/groebf.spad.pamphlet \
             >${INPUT}/GroebnerFactorizationPackage.input
+	@echo "GroebnerFactorizationPackage (GBF)" >>${HELPFILE}
 
 ${HELP}/Heap.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7030 create Heap.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -16998,6 +17041,7 @@ ${HELP}/Heap.help: ${BOOKS}/bookvol10.3.pamphlet
 	@-cp ${HELP}/Heap.help ${HELP}/HEAP.help
 	@${TANGLE} -R"Heap.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/Heap.input
+	@echo "Heap (HEAP)" >>${HELPFILE}
 
 ${HELP}/HexadecimalExpansion.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7031 create HexadecimalExpansion.help \
@@ -17008,6 +17052,7 @@ ${HELP}/HexadecimalExpansion.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/HexadecimalExpansion.help  ${HELP}/HEXADEC.help
 	@${TANGLE} -R"HexadecimalExpansion.input" \
            ${BOOKS}/bookvol10.3.pamphlet >${INPUT}/HexadecimalExpansion.input
+	@echo "HexadecimalExpansion (HEXADEC)" >>${HELPFILE}
 
 ${HELP}/HomogeneousDistributedMultivariatePolynomial.help: \
             ${BOOKS}/bookvol10.3.pamphlet
@@ -17021,6 +17066,8 @@ ${HELP}/HomogeneousDistributedMultivariatePolynomial.help: \
 	@${TANGLE} -R"HomogeneousDistributedMultivariatePolynomial.input" \
            ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/HomogeneousDistributedMultivariatePolynomial.input
+	@echo "HomogeneousDistributedMultivariatePolynomial (HDMP)" \
+            >>${HELPFILE}
 
 ${HELP}/Integer.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7033 create Integer.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -17029,6 +17076,7 @@ ${HELP}/Integer.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/Integer.help ${HELP}/INT.help
 	@${TANGLE} -R"Integer.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/Integer.input
+	@echo "Integer (INT)" >>${HELPFILE}
 
 ${HELP}/IntegerLinearDependence.help: ${IN}/lindep.spad.pamphlet
 	@echo 7034 create IntegerLinearDependence.help from \
@@ -17040,6 +17088,7 @@ ${HELP}/IntegerLinearDependence.help: ${IN}/lindep.spad.pamphlet
 	@${TANGLE} -R"IntegerLinearDependence.input" \
            ${IN}/lindep.spad.pamphlet \
             >${INPUT}/IntegerLinearDependence.input
+	@echo "IntegerLinearDependence (ZLINDEP)" >>${HELPFILE}
 
 ${HELP}/IntegerNumberTheoryFunctions.help: ${IN}/numtheor.spad.pamphlet
 	@echo 7035 create IntegerNumberTheoryFunctions.help \
@@ -17052,6 +17101,7 @@ ${HELP}/IntegerNumberTheoryFunctions.help: ${IN}/numtheor.spad.pamphlet
 	@${TANGLE} -R"IntegerNumberTheoryFunctions.input" \
            ${IN}/numtheor.spad.pamphlet \
             >${INPUT}/IntegerNumberTheoryFunctions.input
+	@echo "IntegerNumberTheoryFunctions (INTHEORY)" >>${HELPFILE}
 
 ${HELP}/Kernel.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7036 create Kernel.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -17060,6 +17110,7 @@ ${HELP}/Kernel.help: ${BOOKS}/bookvol10.3.pamphlet
 	@-cp ${HELP}/Kernel.help ${HELP}/KERNEL.help
 	@${TANGLE} -R"Kernel.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/Kernel.input
+	@echo "Kernel (KERNEL)" >>${HELPFILE}
 
 ${HELP}/KeyedAccessFile.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7037 create KeyedAccessFile.help from \
@@ -17069,6 +17120,7 @@ ${HELP}/KeyedAccessFile.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/KeyedAccessFile.help ${HELP}/KAFILE.help
 	@${TANGLE} -R"KeyedAccessFile.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/KeyedAccessFile.input
+	@echo "KeyedAccessFile (KAFILE)" >>${HELPFILE}
 
 ${HELP}/LexTriangularPackage.help: ${IN}/zerodim.spad.pamphlet
 	@echo 7038 create LexTriangularPackage.help from \
@@ -17078,6 +17130,7 @@ ${HELP}/LexTriangularPackage.help: ${IN}/zerodim.spad.pamphlet
 	@cp ${HELP}/LexTriangularPackage.help ${HELP}/LEXTRIPK.help
 	@${TANGLE} -R"LexTriangularPackage.input" ${IN}/zerodim.spad.pamphlet \
             >${INPUT}/LexTriangularPackage.input
+	@echo "LexTriangularPackage (LEXTRIPK)" >>${HELPFILE}
 
 ${HELP}/Library.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7039 create Library.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -17086,6 +17139,7 @@ ${HELP}/Library.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/Library.help ${HELP}/LIB.help
 	@${TANGLE} -R"Library.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/Library.input
+	@echo "Library (LIB)" >>${HELPFILE}
 
 ${HELP}/LieExponentials.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7040 create LieExponentials.help from \
@@ -17097,6 +17151,7 @@ ${HELP}/LieExponentials.help: ${BOOKS}/bookvol10.3.pamphlet
 	@${TANGLE} -R"LieExponentials.input" \
             ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/LieExponentials.input
+	@echo "LieExponentials (LEXP)" >>${HELPFILE}
 
 ${HELP}/LiePolynomial.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7041 create LiePolynomial.help from \
@@ -17108,6 +17163,7 @@ ${HELP}/LiePolynomial.help: ${BOOKS}/bookvol10.3.pamphlet
 	@${TANGLE} -R"LiePolynomial.input" \
             ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/LiePolynomial.input
+	@echo "LiePolynomial (LPOLY)" >>${HELPFILE}
 
 ${HELP}/LinearOrdinaryDifferentialOperator.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7042 create LinearOrdinaryDifferentialOperator.help \
@@ -17119,6 +17175,7 @@ ${HELP}/LinearOrdinaryDifferentialOperator.help: ${BOOKS}/bookvol10.3.pamphlet
 	@${TANGLE} -R"LinearOrdinaryDifferentialOperator.input" \
            ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/LinearOrdinaryDifferentialOperator.input
+	@echo "LinearOrdinaryDifferentialOperator (LODO)" >>${HELPFILE}
 
 ${HELP}/LinearOrdinaryDifferentialOperator1.help: \
       ${BOOKS}/bookvol10.3.pamphlet
@@ -17131,6 +17188,7 @@ ${HELP}/LinearOrdinaryDifferentialOperator1.help: \
 	@${TANGLE} -R"LinearOrdinaryDifferentialOperator1.input" \
            ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/LinearOrdinaryDifferentialOperator1.input
+	@echo "LinearOrdinaryDifferentialOperator1 (LODO1)" >>${HELPFILE}
 
 ${HELP}/LinearOrdinaryDifferentialOperator2.help: \
      ${BOOKS}/bookvol10.3.pamphlet
@@ -17143,6 +17201,7 @@ ${HELP}/LinearOrdinaryDifferentialOperator2.help: \
 	@${TANGLE} -R"LinearOrdinaryDifferentialOperator2.input" \
            ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/LinearOrdinaryDifferentialOperator2.input
+	@echo "LinearOrdinaryDifferentialOperator2 (LODO2)" >>${HELPFILE}
 
 ${HELP}/List.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7045 create List.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -17151,6 +17210,7 @@ ${HELP}/List.help: ${BOOKS}/bookvol10.3.pamphlet
 	@-cp ${HELP}/List.help ${HELP}/LIST.help
 	@${TANGLE} -R"List.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/List.input
+	@echo "List (LIST)" >>${HELPFILE}
 
 ${HELP}/LyndonWord.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7046 create LyndonWord.help from \
@@ -17162,6 +17222,7 @@ ${HELP}/LyndonWord.help: ${BOOKS}/bookvol10.3.pamphlet
 	@${TANGLE} -R"LyndonWord.input" \
             ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/LyndonWord.input
+	@echo "LyndonWord (LWORD)" >>${HELPFILE}
 
 ${HELP}/Magma.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7047 create Magma.help from \
@@ -17173,6 +17234,7 @@ ${HELP}/Magma.help: ${BOOKS}/bookvol10.3.pamphlet
 	@${TANGLE} -R"Magma.input" \
             ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/Magma.input
+	@echo "Magma (MAGMA)" >>${HELPFILE}
 
 ${HELP}/MakeFunction.help: ${IN}/mkfunc.spad.pamphlet
 	@echo 7048 create MakeFunction.help from ${IN}/mkfunc.spad.pamphlet
@@ -17181,6 +17243,7 @@ ${HELP}/MakeFunction.help: ${IN}/mkfunc.spad.pamphlet
 	@cp ${HELP}/MakeFunction.help ${HELP}/MKFUNC.help
 	@${TANGLE} -R"MakeFunction.input" ${IN}/mkfunc.spad.pamphlet \
             >${INPUT}/MakeFunction.input
+	@echo "MakeFunction (MKFUNC)" >>${HELPFILE}
 
 ${HELP}/MappingPackage1.help: ${IN}/mappkg.spad.pamphlet
 	@echo 7049 create MappingPackage1.help from ${IN}/mappkg.spad.pamphlet
@@ -17189,6 +17252,7 @@ ${HELP}/MappingPackage1.help: ${IN}/mappkg.spad.pamphlet
 	@cp ${HELP}/MappingPackage1.help ${HELP}/MAPPKG1.help
 	@${TANGLE} -R"MappingPackage1.input" ${IN}/mappkg.spad.pamphlet \
             >${INPUT}/MappingPackage1.input
+	@echo "MappingPackage1 (MAPPKG1)" >>${HELPFILE}
 
 ${HELP}/MappingPackage2.help: ${IN}/mappkg.spad.pamphlet
 	@echo 7050 create MappingPackage2.help from ${IN}/mappkg.spad.pamphlet
@@ -17197,6 +17261,7 @@ ${HELP}/MappingPackage2.help: ${IN}/mappkg.spad.pamphlet
 	@cp ${HELP}/MappingPackage2.help ${HELP}/MAPPKG2.help
 	@${TANGLE} -R"MappingPackage2.input" ${IN}/mappkg.spad.pamphlet \
             >${INPUT}/MappingPackage2.input
+	@echo "MappingPackage2 (MAPPKG2)" >>${HELPFILE}
 
 ${HELP}/MappingPackage3.help: ${IN}/mappkg.spad.pamphlet
 	@echo 7051 create MappingPackage3.help from ${IN}/mappkg.spad.pamphlet
@@ -17205,6 +17270,7 @@ ${HELP}/MappingPackage3.help: ${IN}/mappkg.spad.pamphlet
 	@cp ${HELP}/MappingPackage3.help ${HELP}/MAPPKG3.help
 	@${TANGLE} -R"MappingPackage3.input" ${IN}/mappkg.spad.pamphlet \
             >${INPUT}/MappingPackage3.input
+	@echo "MappingPackage3 (MAPPKG3)" >>${HELPFILE}
 
 ${HELP}/Matrix.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7052 create Matrix.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -17213,6 +17279,7 @@ ${HELP}/Matrix.help: ${BOOKS}/bookvol10.3.pamphlet
 	@-cp ${HELP}/Matrix.help ${HELP}/MATRIX.help
 	@${TANGLE} -R"Matrix.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/Matrix.input
+	@echo "Matrix (MATRIX)" >>${HELPFILE}
 
 ${HELP}/Multiset.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7053 create Multiset.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -17221,6 +17288,7 @@ ${HELP}/Multiset.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/Multiset.help ${HELP}/MSET.help
 	@${TANGLE} -R"Multiset.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/Multiset.input
+	@echo "Multiset (MSET)" >>${HELPFILE}
 
 ${HELP}/MultivariatePolynomial.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7054 create MultivariatePolynomial.help from \
@@ -17232,6 +17300,7 @@ ${HELP}/MultivariatePolynomial.help: ${BOOKS}/bookvol10.3.pamphlet
 	@${TANGLE} -R"MultivariatePolynomial.input" \
             ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/MultivariatePolynomial.input
+	@echo "MultivariatePolynomial (MPOLY)" >>${HELPFILE}
 
 ${HELP}/None.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7055 create None.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -17240,6 +17309,7 @@ ${HELP}/None.help: ${BOOKS}/bookvol10.3.pamphlet
 	@-cp ${HELP}/None.help ${HELP}/NONE.help
 	@${TANGLE} -R"None.input" ${BOOKS}/bookvol10.3.pamphlet \
              >${INPUT}/None.input
+	@echo "None (NONE)" >>${HELPFILE}
 
 ${HELP}/Octonion.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7056 create Octonion.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -17248,6 +17318,7 @@ ${HELP}/Octonion.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/Octonion.help ${HELP}/OCT.help
 	@${TANGLE} -R"Octonion.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/Octonion.input
+	@echo "Octonion (OCT)" >>${HELPFILE}
 
 ${HELP}/OneDimensionalArray.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7057 create OneDimensionalArray.help from \
@@ -17258,6 +17329,7 @@ ${HELP}/OneDimensionalArray.help: ${BOOKS}/bookvol10.3.pamphlet
 	@${TANGLE} -R"OneDimensionalArray.input"  \
             ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/OneDimensionalArray.input
+	@echo "OneDimensionalArray (ARRAY1)" >>${HELPFILE}
 
 ${HELP}/Operator.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7058 create Operator.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -17266,6 +17338,7 @@ ${HELP}/Operator.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/Operator.help ${HELP}/OP.help
 	@${TANGLE} -R"Operator.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/Operator.input
+	@echo "Operator (OP)" >>${HELPFILE}
 
 ${HELP}/OrderedVariableList.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7059 create OrderedVariableList.help from \
@@ -17277,6 +17350,7 @@ ${HELP}/OrderedVariableList.help: ${BOOKS}/bookvol10.3.pamphlet
 	@${TANGLE} -R"OrderedVariableList.input" \
             ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/OrderedVariableList.input
+	@echo "OrderedVariableList (OVAR)" >>${HELPFILE}
 
 ${HELP}/OrderlyDifferentialPolynomial.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7060 create OrderlyDifferentialPolynomial.help from \
@@ -17288,6 +17362,7 @@ ${HELP}/OrderlyDifferentialPolynomial.help: ${BOOKS}/bookvol10.3.pamphlet
 	@${TANGLE} -R"OrderlyDifferentialPolynomial.input" \
             ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/OrderlyDifferentialPolynomial.input
+	@echo "OrderlyDifferentialPolynomial (ODPOL)" >>${HELPFILE}
 
 ${HELP}/PartialFraction.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7061 create PartialFraction.help from \
@@ -17297,6 +17372,7 @@ ${HELP}/PartialFraction.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/PartialFraction.help ${HELP}/PFR.help
 	@${TANGLE} -R"PartialFraction.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/PartialFraction.input
+	@echo "PartialFraction (PFR)" >>${HELPFILE}
 
 ${HELP}/Permanent.help: ${IN}/perman.spad.pamphlet
 	@echo 7062 create Permanent.help from ${IN}/perman.spad.pamphlet
@@ -17305,6 +17381,7 @@ ${HELP}/Permanent.help: ${IN}/perman.spad.pamphlet
 	@cp ${HELP}/Permanent.help ${HELP}/PERMAN.help
 	@${TANGLE} -R"Permanent.input" ${IN}/perman.spad.pamphlet \
             >${INPUT}/Permanent.input
+	@echo "Permanent (PERMAN)" >>${HELPFILE}
 
 ${HELP}/Permutation.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7063 create Permutation.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -17313,6 +17390,7 @@ ${HELP}/Permutation.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/Permutation.help ${HELP}/PERM.help
 	@${TANGLE} -R"Permutation.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/Permutation.input
+	@echo "Permutation (PERM)" >>${HELPFILE}
 
 ${HELP}/PlaneAlgebraicCurvePlot.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7064 create PlaneAlgebraicCurvePlot.help from \
@@ -17324,6 +17402,7 @@ ${HELP}/PlaneAlgebraicCurvePlot.help: ${BOOKS}/bookvol10.3.pamphlet
 	@${TANGLE} -R"PlaneAlgebraicCurvePlot.input" \
            ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/PlaneAlgebraicCurvePlot.input
+	@echo "PlaneAlgebraicCurvePlot (ACPLOT)" >>${HELPFILE}
 
 ${HELP}/Plot.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7064 create Plot.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -17332,6 +17411,7 @@ ${HELP}/Plot.help: ${BOOKS}/bookvol10.3.pamphlet
 	@-cp ${HELP}/Plot.help ${HELP}/PLOT.help
 	@${TANGLE} -R"Plot.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/Plot.input
+	@echo "Plot (PLOT)" >>${HELPFILE}
 
 ${HELP}/Polynomial.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7065 create Polynomial.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -17340,6 +17420,7 @@ ${HELP}/Polynomial.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/Polynomial.help ${HELP}/POLY.help
 	@${TANGLE} -R"Polynomial.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/Polynomial.input
+	@echo "Polynomial (POLY)" >>${HELPFILE}
 
 ${HELP}/Quaternion.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7066 create Quaternion.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -17348,6 +17429,7 @@ ${HELP}/Quaternion.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/Quaternion.help ${HELP}/QUAT.help
 	@${TANGLE} -R"Quaternion.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/Quaternion.input
+	@echo "Quaternion (QUAT)" >>${HELPFILE}
 
 ${HELP}/RadixExpansion.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7067 create RadixExpansion.help from \
@@ -17357,6 +17439,7 @@ ${HELP}/RadixExpansion.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/RadixExpansion.help ${HELP}/RADIX.help
 	@${TANGLE} -R"RadixExpansion.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/RadixExpansion.input
+	@echo "RadixExpansion (RADIX)" >>${HELPFILE}
 
 ${HELP}/RealClosure.help: ${BOOKS}/bookvol10.3.pamphlet 
 	@echo 7068 create RealClosure.help from ${BOOKS}/bookvol10.3.pamphlet 
@@ -17365,6 +17448,7 @@ ${HELP}/RealClosure.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/RealClosure.help ${HELP}/RECLOS.help
 	@${TANGLE} -R"RealClosure.input" ${BOOKS}/bookvol10.3.pamphlet  \
             >${INPUT}/RealClosure.input
+	@echo "RealClosure (RECLOS)" >>${HELPFILE}
 
 ${HELP}/RealSolvePackage.help: ${BOOKS}/bookvol10.4.pamphlet 
 	@echo 7069 create RealSolvePackage.help from \
@@ -17374,6 +17458,7 @@ ${HELP}/RealSolvePackage.help: ${BOOKS}/bookvol10.4.pamphlet
 	@cp ${HELP}/RealSolvePackage.help ${HELP}/REALSOLV.help
 	@${TANGLE} -R"RealSolvePackage.input" ${BOOKS}/bookvol10.4.pamphlet  \
             >${INPUT}/RealSolvePackage.input
+	@echo "RealSolvePackage (REALSOLV)" >>${HELPFILE}
 
 ${HELP}/RegularTriangularSet.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7070 create RegularTriangularSet.help from \
@@ -17385,6 +17470,7 @@ ${HELP}/RegularTriangularSet.help: ${BOOKS}/bookvol10.3.pamphlet
 	@${TANGLE} -R"RegularTriangularSet.input" \
           ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/RegularTriangularSet.input
+	@echo "RegularTriangularSet (REGSET)" >>${HELPFILE}
 
 ${HELP}/RomanNumeral.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7071 create RomanNumeral.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -17393,6 +17479,7 @@ ${HELP}/RomanNumeral.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/RomanNumeral.help ${HELP}/ROMAN.help
 	@${TANGLE} -R"RomanNumeral.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/RomanNumeral.input
+	@echo "RomanNumeral (ROMAN)" >>${HELPFILE}
 
 ${HELP}/Segment.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7072 create Segment.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -17401,15 +17488,17 @@ ${HELP}/Segment.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/Segment.help ${HELP}/SEG.help
 	@${TANGLE} -R"Segment.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/Segment.input
+	@echo "Segment (SEG)" >>${HELPFILE}
 
 ${HELP}/SegmentBinding.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7072 create SegmentBinding.help from \
            ${BOOKS}/bookvol10.3.pamphlet
 	@${TANGLE} -R"SegmentBinding.help" ${BOOKS}/bookvol10.3.pamphlet \
            >${HELP}/SegmentBinding.help
-	@cp ${HELP}/SegmentBinding.help ${HELP}/SEG.help
+	@cp ${HELP}/SegmentBinding.help ${HELP}/SEGBIND.help
 	@${TANGLE} -R"SegmentBinding.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/SegmentBinding.input
+	@echo "SegmentBinding (SEGBIND)" >>${HELPFILE}
 
 ${HELP}/Set.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7073 create Set.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -17418,6 +17507,7 @@ ${HELP}/Set.help: ${BOOKS}/bookvol10.3.pamphlet
 	@-cp ${HELP}/Set.help ${HELP}/SET.help
 	@${TANGLE} -R"Set.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/Set.input
+	@echo "Set (SET)" >>${HELPFILE}
 
 ${HELP}/SingleInteger.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7074 create SingleInteger.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -17426,6 +17516,7 @@ ${HELP}/SingleInteger.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/SingleInteger.help ${HELP}/SINT.help
 	@${TANGLE} -R"SingleInteger.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/SingleInteger.input
+	@echo "SingleInteger (SINT)" >>${HELPFILE}
 
 ${HELP}/SparseTable.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7075 create SparseTable.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -17434,6 +17525,7 @@ ${HELP}/SparseTable.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/SparseTable.help ${HELP}/STBL.help
 	@${TANGLE} -R"SparseTable.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/SparseTable.input
+	@echo "SparseTable (STBL)" >>${HELPFILE}
 
 ${HELP}/SquareMatrix.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7076 create SquareMatrix.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -17442,6 +17534,7 @@ ${HELP}/SquareMatrix.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/SquareMatrix.help ${HELP}/SQMATRIX.help
 	@${TANGLE} -R"SquareMatrix.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/SquareMatrix.input
+	@echo "SquareMatrix (SQMATRIX)" >>${HELPFILE}
 
 ${HELP}/SquareFreeRegularTriangularSet.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7077 create SquareFreeRegularTriangularSet.help from \
@@ -17453,6 +17546,7 @@ ${HELP}/SquareFreeRegularTriangularSet.help: ${BOOKS}/bookvol10.3.pamphlet
 	@${TANGLE} -R"SquareFreeRegularTriangularSet.input" \
             ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/SquareFreeRegularTriangularSet.input
+	@echo "SquareFreeRegularTriangularSet (SREGSET)" >>${HELPFILE}
 
 ${HELP}/Stream.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7078 create Stream.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -17461,6 +17555,7 @@ ${HELP}/Stream.help: ${BOOKS}/bookvol10.3.pamphlet
 	@-cp ${HELP}/Stream.help ${HELP}/STREAM.help
 	@${TANGLE} -R"Stream.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/Stream.input
+	@echo "Stream (STREAM)" >>${HELPFILE}
 
 ${HELP}/String.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7079 create String.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -17469,6 +17564,7 @@ ${HELP}/String.help: ${BOOKS}/bookvol10.3.pamphlet
 	@-cp ${HELP}/String.help ${HELP}/STRING.help
 	@${TANGLE} -R"String.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/String.input
+	@echo "String (STRING)" >>${HELPFILE}
 
 ${HELP}/StringTable.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7080 create StringTable.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -17477,6 +17573,7 @@ ${HELP}/StringTable.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/StringTable.help ${HELP}/STRTBL.help
 	@${TANGLE} -R"StringTable.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/StringTable.input
+	@echo "StringTable (STRTBL)" >>${HELPFILE}
 
 ${HELP}/Symbol.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7081 create Symbol.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -17485,6 +17582,7 @@ ${HELP}/Symbol.help: ${BOOKS}/bookvol10.3.pamphlet
 	@-cp ${HELP}/Symbol.help ${HELP}/SYMBOL.help
 	@${TANGLE} -R"Symbol.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/Symbol.input
+	@echo "Symbol (SYMBOL)" >>${HELPFILE}
 
 ${HELP}/Table.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7082 create Table.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -17493,6 +17591,7 @@ ${HELP}/Table.help: ${BOOKS}/bookvol10.3.pamphlet
 	@-cp ${HELP}/Table.help ${HELP}/TABLE.help
 	@${TANGLE} -R"Table.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/Table.input
+	@echo "Table (TABLE)" >>${HELPFILE}
 
 ${HELP}/TextFile.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7083 create TextFile.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -17501,6 +17600,7 @@ ${HELP}/TextFile.help: ${BOOKS}/bookvol10.3.pamphlet
 	@-cp ${HELP}/TextFile.help ${HELP}/TEXTFILE.help
 	@${TANGLE} -R"TextFile.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/TextFile.input
+	@echo "TextFile (TEXTFILE)" >>${HELPFILE}
 
 ${HELP}/TwoDimensionalArray.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7084 create TwoDimensionalArray.help from \
@@ -17511,6 +17611,7 @@ ${HELP}/TwoDimensionalArray.help: ${BOOKS}/bookvol10.3.pamphlet
 	@${TANGLE} -R"TwoDimensionalArray.input" \
             ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/TwoDimensionalArray.input
+	@echo "TwoDimensionalArray (ARRAY2)" >>${HELPFILE}
 
 ${HELP}/TwoDimensionalViewport.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7085 create TwoDimensionalViewport.help from \
@@ -17520,6 +17621,7 @@ ${HELP}/TwoDimensionalViewport.help: ${BOOKS}/bookvol10.3.pamphlet
            >${HELP}/TwoDimensionalViewport.help 
 	@cp ${HELP}/TwoDimensionalViewport.help ${HELP}/VIEW2D.help
 # Note:no input regression file due to graphics
+	@echo "TwoDimensionalViewport (VIEW2D)" >>${HELPFILE}
 
 ${HELP}/UnivariatePolynomial.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7086 create UnivariatePolynomial.help from \
@@ -17531,6 +17633,7 @@ ${HELP}/UnivariatePolynomial.help: ${BOOKS}/bookvol10.3.pamphlet
 	@${TANGLE} -R"UnivariatePolynomial.input" \
            ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/UnivariatePolynomial.input
+	@echo "UnivariatePolynomial (UP)" >>${HELPFILE}
 
 ${HELP}/UniversalSegment.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7087 create UniversalSegment.help from \
@@ -17540,6 +17643,7 @@ ${HELP}/UniversalSegment.help: ${BOOKS}/bookvol10.3.pamphlet
 	@cp ${HELP}/UniversalSegment.help ${HELP}/UNISEG.help
 	@${TANGLE} -R"UniversalSegment.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/UniversalSegment.input
+	@echo "UniversalSegment (UNISEG)" >>${HELPFILE}
 
 ${HELP}/Vector.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7088 create Vector.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -17548,6 +17652,7 @@ ${HELP}/Vector.help: ${BOOKS}/bookvol10.3.pamphlet
 	@-cp ${HELP}/Vector.help ${HELP}/VECTOR.help
 	@${TANGLE} -R"Vector.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/Vector.input
+	@echo "Vector (VECTOR)" >>${HELPFILE}
 
 ${HELP}/Void.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7089 create Void.help from ${BOOKS}/bookvol10.3.pamphlet
@@ -17556,6 +17661,7 @@ ${HELP}/Void.help: ${BOOKS}/bookvol10.3.pamphlet
 	@-cp ${HELP}/Void.help ${HELP}/VOID.help
 	@${TANGLE} -R"Void.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/Void.input
+	@echo "Void (VOID)" >>${HELPFILE}
 
 ${HELP}/WuWenTsunTriangularSet.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7090 create WuWenTsunTriangularSet.help from \
@@ -17567,6 +17673,7 @@ ${HELP}/WuWenTsunTriangularSet.help: ${BOOKS}/bookvol10.3.pamphlet
 	@${TANGLE} -R"WuWenTsunTriangularSet.input" \
             ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/WuWenTsunTriangularSet.input
+	@echo "WuWenTsunTriangularSet (WUTSET)" >>${HELPFILE}
 
 ${HELP}/XPBWPolynomial.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7091 create XPBWPolynomial.help from \
@@ -17578,6 +17685,7 @@ ${HELP}/XPBWPolynomial.help: ${BOOKS}/bookvol10.3.pamphlet
 	@${TANGLE} -R"XPBWPolynomial.input" \
             ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/XPBWPolynomial.input
+	@echo "XPBWPolynomial (XPBWPOLY)" >>${HELPFILE}
 
 ${HELP}/XPolynomial.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7092 create XPolynomial.help from \
@@ -17589,6 +17697,7 @@ ${HELP}/XPolynomial.help: ${BOOKS}/bookvol10.3.pamphlet
 	@${TANGLE} -R"XPolynomial.input" \
             ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/XPolynomial.input
+	@echo "XPolynomial (XPOLY)" >>${HELPFILE}
 
 ${HELP}/XPolynomialRing.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7093 create XPolynomialRing.help from \
@@ -17600,6 +17709,7 @@ ${HELP}/XPolynomialRing.help: ${BOOKS}/bookvol10.3.pamphlet
 	@${TANGLE} -R"XPolynomialRing.input" \
             ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/XPolynomialRing.input
+	@echo "XPolynomialRing (XPR)" >>${HELPFILE}
 
 ${HELP}/ZeroDimensionalSolvePackage.help: ${IN}/zerodim.spad.pamphlet
 	@echo 7094 create ZeroDimensionalSolvePackage.help from \
diff --git a/src/algebra/galfact.spad.pamphlet b/src/algebra/galfact.spad.pamphlet
deleted file mode 100644
index 8d9a6a0..0000000
--- a/src/algebra/galfact.spad.pamphlet
+++ /dev/null
@@ -1,862 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/algebra galfact.spad}
-\author{Frederic Lehobey}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package GALFACT GaloisGroupFactorizer}
-<<package GALFACT GaloisGroupFactorizer>>=
-)abbrev package GALFACT GaloisGroupFactorizer
-++ Author: Frederic Lehobey
-++ Date Created: 28 June 1994
-++ Date Last Updated: 11 July 1997
-++ Basic Operations: factor
-++ Related Domains:
-++ Also See:
-++ AMS Classifications:
-++ Keywords: factorization
-++ Examples:
-++ References:
-++ [1] Bernard Beauzamy, Vilmar Trevisan and Paul S. Wang, Polynomial 
-++ Factorization: Sharp Bounds, Efficient Algorithms,
-++ J. Symbolic Computation (1993) 15, 393-413
-++ [2] John Brillhart, Note on Irreducibility Testing,
-++ Mathematics of Computation, vol. 35, num. 35, Oct. 1980, 1379-1381
-++ [3] David R. Musser, On the Efficiency of a Polynomial Irreducibility Test,
-++ Journal of the ACM, Vol. 25, No. 2, April 1978, pp. 271-282
-++ Description: \spadtype{GaloisGroupFactorizer} provides functions
-++ to factor resolvents.
--- improvements to do :
---   + reformulate the lifting problem in completeFactor -- See [1] (hard)
---   + implement algorithm RC -- See [1] (easy)
---   + use Dedekind's criterion to prove sometimes irreducibility (easy)
---     or even to improve early detection of true factors (hard)
---   + replace Sets by Bits
-GaloisGroupFactorizer(UP): Exports == Implementation where
-  Z ==> Integer
-  UP: UnivariatePolynomialCategory Z
-  N ==> NonNegativeInteger
-  P ==> PositiveInteger
-  CYC ==> CyclotomicPolynomialPackage()
-  SUPZ ==> SparseUnivariatePolynomial Z
-
-  ParFact ==> Record(irr: UP, pow: Z)
-  FinalFact ==> Record(contp: Z, factors: List ParFact)
-  DDRecord ==> Record(factor: UP, degree: Z) -- a Distinct-Degree factor
-  DDList ==> List DDRecord
-  MFact ==> Record(prime: Z,factors: List UP) -- Modular Factors
-  LR ==> Record(left: UP, right: UP) -- Functional decomposition
-
-  Exports ==> with
-    makeFR: FinalFact -> Factored UP
-      ++ makeFR(flist) turns the final factorization of henselFact into a
-      ++ \spadtype{Factored} object.
-    degreePartition: DDList -> Multiset N
-      ++ degreePartition(ddfactorization) returns the degree partition of
-      ++ the polynomial f modulo p where ddfactorization is the distinct
-      ++ degree factorization of f computed by 
-      ++ \spadfunFrom{ddFact}{ModularDistinctDegreeFactorizer}
-      ++ for some prime p.
-    musserTrials: () -> P
-      ++ musserTrials() returns the number of primes that are tried in
-      ++ \spadfun{modularFactor}.
-    musserTrials: P -> P
-      ++ musserTrials(n) sets to n the number of primes to be tried in
-      ++ \spadfun{modularFactor} and returns the previous value.
-    stopMusserTrials: () -> P
-      ++ stopMusserTrials() returns the bound on the number of factors for
-      ++ which \spadfun{modularFactor} stops to look for an other prime. You
-      ++ will have to remember that the step of recombining the extraneous
-      ++ factors may take up to \spad{2**stopMusserTrials()} trials. 
-    stopMusserTrials: P -> P
-      ++ stopMusserTrials(n) sets to n the bound on the number of factors for
-      ++ which \spadfun{modularFactor} stops to look for an other prime. You
-      ++ will have to remember that the step of recombining the extraneous
-      ++ factors may take up to \spad{2**n} trials. Returns the previous
-      ++ value.
-    numberOfFactors: DDList -> N
-      ++ numberOfFactors(ddfactorization) returns the number of factors of 
-      ++ the polynomial f modulo p where ddfactorization is the distinct
-      ++ degree factorization of f computed by 
-      ++ \spadfunFrom{ddFact}{ModularDistinctDegreeFactorizer}
-      ++ for some prime p.
-    modularFactor: UP -> MFact
-      ++ modularFactor(f) chooses a "good" prime and returns the factorization
-      ++ of f modulo this prime in a form that may be used by
-      ++ \spadfunFrom{completeHensel}{GeneralHenselPackage}. If prime is zero
-      ++ it means that f has been proved to be irreducible over the integers
-      ++ or that f is a unit (i.e. 1 or -1).
-      ++ f shall be primitive (i.e. content(p)=1) and square free (i.e.
-      ++ without repeated factors).
-    useSingleFactorBound?: () -> Boolean
-      ++ useSingleFactorBound?() returns \spad{true} if algorithm with single
-      ++ factor bound is used for factorization, \spad{false} for algorithm
-      ++ with overall bound.
-    useSingleFactorBound: Boolean -> Boolean
-      ++ useSingleFactorBound(b) chooses the algorithm to be used by the
-      ++ factorizers: \spad{true} for algorithm with single
-      ++ factor bound, \spad{false} for algorithm with overall bound.
-      ++ Returns the previous value.
-    useEisensteinCriterion?: () -> Boolean
-      ++ useEisensteinCriterion?() returns \spad{true} if factorizers
-      ++ check Eisenstein's criterion before factoring.
-    useEisensteinCriterion: Boolean -> Boolean
-      ++ useEisensteinCriterion(b) chooses whether factorizers check
-      ++ Eisenstein's criterion before factoring: \spad{true} for
-      ++ using it, \spad{false} else. Returns the previous value.
-    eisensteinIrreducible?: UP -> Boolean
-      ++ eisensteinIrreducible?(p) returns \spad{true} if p can be
-      ++ shown to be irreducible by Eisenstein's criterion,
-      ++ \spad{false} is inconclusive.
-    tryFunctionalDecomposition?: () -> Boolean
-      ++ tryFunctionalDecomposition?() returns \spad{true} if
-      ++ factorizers try functional decomposition of polynomials before
-      ++ factoring them.
-    tryFunctionalDecomposition: Boolean -> Boolean
-      ++ tryFunctionalDecomposition(b) chooses whether factorizers have
-      ++ to look for functional decomposition of polynomials
-      ++ (\spad{true}) or not (\spad{false}). Returns the previous value.
-    factor: UP -> Factored UP
-      ++ factor(p) returns the factorization of p over the integers.
-    factor: (UP,N) -> Factored UP
-      ++ factor(p,r) factorizes the polynomial p using the single factor bound
-      ++ algorithm and knowing that p has at least r factors.
-    factor: (UP,List N) -> Factored UP
-      ++ factor(p,listOfDegrees) factorizes the polynomial p using the single
-      ++ factor bound algorithm and knowing that p has for possible 
-      ++ splitting of its degree listOfDegrees.
-    factor: (UP,List N,N) -> Factored UP
-      ++ factor(p,listOfDegrees,r) factorizes the polynomial p using the single
-      ++ factor bound algorithm, knowing that p has for possible 
-      ++ splitting of its degree listOfDegrees and that p has at least r
-      ++ factors.
-    factor: (UP,N,N) -> Factored UP
-      ++ factor(p,d,r) factorizes the polynomial p using the single
-      ++ factor bound algorithm, knowing that d divides the degree of all 
-      ++ factors of p and that p has at least r factors.
-    factorSquareFree: UP -> Factored UP
-      ++ factorSquareFree(p) returns the factorization of p which is supposed
-      ++ not having any repeated factor (this is not checked).
-    factorSquareFree: (UP,N) -> Factored UP
-      ++ factorSquareFree(p,r) factorizes the polynomial p using the single
-      ++ factor bound algorithm and knowing that p has at least r factors.
-      ++ f is supposed not having any repeated factor (this is not checked).
-    factorSquareFree: (UP,List N) -> Factored UP
-      ++ factorSquareFree(p,listOfDegrees) factorizes the polynomial p using
-      ++ the single factor bound algorithm and knowing that p has for possible 
-      ++ splitting of its degree listOfDegrees.
-      ++ f is supposed not having any repeated factor (this is not checked).
-    factorSquareFree: (UP,List N,N) -> Factored UP
-      ++ factorSquareFree(p,listOfDegrees,r) factorizes the polynomial p using
-      ++ the single factor bound algorithm, knowing that p has for possible 
-      ++ splitting of its degree listOfDegrees and that p has at least r
-      ++ factors.
-      ++ f is supposed not having any repeated factor (this is not checked).
-    factorSquareFree: (UP,N,N) -> Factored UP
-      ++ factorSquareFree(p,d,r) factorizes the polynomial p using the single
-      ++ factor bound algorithm, knowing that d divides the degree of all 
-      ++ factors of p and that p has at least r factors.
-      ++ f is supposed not having any repeated factor (this is not checked).
-    factorOfDegree: (P,UP) -> Union(UP,"failed")
-      ++ factorOfDegree(d,p) returns a factor of p of degree d.
-    factorOfDegree: (P,UP,N) -> Union(UP,"failed")
-      ++ factorOfDegree(d,p,r) returns a factor of p of degree
-      ++ d knowing that p has at least r factors.
-    factorOfDegree: (P,UP,List N) -> Union(UP,"failed")
-      ++ factorOfDegree(d,p,listOfDegrees) returns a factor 
-      ++ of p of degree d knowing that p has for possible splitting of its
-      ++ degree listOfDegrees.
-    factorOfDegree: (P,UP,List N,N) -> Union(UP,"failed")
-      ++ factorOfDegree(d,p,listOfDegrees,r) returns a factor 
-      ++ of p of degree d knowing that p has for possible splitting of its
-      ++ degree listOfDegrees, and that p has at least r factors.
-    factorOfDegree: (P,UP,List N,N,Boolean) -> Union(UP,"failed")
-      ++ factorOfDegree(d,p,listOfDegrees,r,sqf) returns a
-      ++ factor of p of degree d knowing that p has for possible splitting of
-      ++ its degree listOfDegrees, and that p has at least r factors.
-      ++ If \spad{sqf=true} the polynomial is assumed to be square free (i.e. 
-      ++ without repeated factors).
-    henselFact: (UP,Boolean) -> FinalFact
-      ++ henselFact(p,sqf) returns the factorization of p, the result
-      ++ is a Record such that \spad{contp=}content p,
-      ++ \spad{factors=}List of irreducible factors of p with exponent.
-      ++ If \spad{sqf=true} the polynomial is assumed to be square free (i.e. 
-      ++ without repeated factors).
-    btwFact: (UP,Boolean,Set N,N) -> FinalFact
-      ++ btwFact(p,sqf,pd,r) returns the factorization of p, the result
-      ++ is a Record such that \spad{contp=}content p,
-      ++ \spad{factors=}List of irreducible factors of p with exponent.
-      ++ If \spad{sqf=true} the polynomial is assumed to be square free (i.e. 
-      ++ without repeated factors).
-      ++ pd is the \spadtype{Set} of possible degrees. r is a lower bound for
-      ++ the number of factors of p. Please do not use this function in your
-      ++ code because its design may change.
-
-  Implementation ==> add
-
-    fUnion ==> Union("nil", "sqfr", "irred", "prime")
-    FFE ==> Record(flg:fUnion, fctr:UP, xpnt:Z) -- Flag-Factor-Exponent
-    DDFact ==> Record(prime:Z, ddfactors:DDList) -- Distinct Degree Factors
-    HLR ==> Record(plist:List UP, modulo:Z) -- HenselLift Record
-
-    mussertrials: P := 5
-    stopmussertrials: P := 8
-    usesinglefactorbound: Boolean := true
-    tryfunctionaldecomposition: Boolean := true
-    useeisensteincriterion: Boolean := true
-
-    useEisensteinCriterion?():Boolean == useeisensteincriterion
-
-    useEisensteinCriterion(b:Boolean):Boolean ==
-      (useeisensteincriterion,b) := (b,useeisensteincriterion)
-      b
-
-    tryFunctionalDecomposition?():Boolean == tryfunctionaldecomposition
-
-    tryFunctionalDecomposition(b:Boolean):Boolean ==
-      (tryfunctionaldecomposition,b) := (b,tryfunctionaldecomposition)
-      b
-
-    useSingleFactorBound?():Boolean == usesinglefactorbound
-
-    useSingleFactorBound(b:Boolean):Boolean ==
-      (usesinglefactorbound,b) := (b,usesinglefactorbound)
-      b
-
-    stopMusserTrials():P == stopmussertrials
-
-    stopMusserTrials(n:P):P ==
-      (stopmussertrials,n) := (n,stopmussertrials)
-      n
-
-    musserTrials():P == mussertrials
-
-    musserTrials(n:P):P ==
-      (mussertrials,n) := (n,mussertrials)
-      n
-
-    import GaloisGroupFactorizationUtilities(Z,UP,Float)
-
-    import GaloisGroupPolynomialUtilities(Z,UP)
-
-    import IntegerPrimesPackage(Z)
-    import IntegerFactorizationPackage(Z)
-
-    import ModularDistinctDegreeFactorizer(UP)
-
-    eisensteinIrreducible?(f:UP):Boolean ==
-      rf := reductum f
-      c: Z := content rf
-      zero? c => false
-      unit? c => false
-      lc := leadingCoefficient f
-      tc := lc
-      while not zero? rf repeat
-        tc := leadingCoefficient rf
-        rf := reductum rf
-      for p in factors(factor c)$Factored(Z) repeat
---        if (one? p.exponent) and (not zero? (lc rem p.factor)) and
-        if (p.exponent = 1) and (not zero? (lc rem p.factor)) and
-         (not zero? (tc rem ((p.factor)**2))) then return true
-      false
-
-    numberOfFactors(ddlist:DDList):N ==
-      n: N := 0
-      d: Z := 0
-      for dd in ddlist repeat
-        n := n +
-          zero? (d := degree(dd.factor)::Z) => 1
-          (d quo dd.degree)::N
-      n
-
-    -- local function, returns the a Set of shifted elements
-    shiftSet(s:Set N,shift:N):Set N == set [ e+shift for e in parts s ]
-
-    -- local function, returns the "reductum" of an Integer (as chain of bits)
-    reductum(n:Z):Z == n-shift(1,length(n)-1)
-
-    -- local function, returns an integer with level lowest bits set to 1
-    seed(level:Z):Z == shift(1,level)-1
-
-    -- local function, returns the next number (as a chain of bit) for
-    -- factor reconciliation of a given level (which is the number of
-    -- extraneaous factors involved) or "End of level" if not any
-    nextRecNum(levels:N,level:Z,n:Z):Union("End of level",Z) ==
-      if (l := length n)<levels then return(n+shift(1,l-1))
-      (n=shift(seed(level),levels-level)) => "End of level"
-      b: Z := 1
-      while ((l-b) = (lr := length(n := reductum n)))@Boolean repeat b := b+1
-      reductum(n)+shift(seed(b+1),lr)
-
-    -- local function, return the set of N, 0..n
-    fullSet(n:N):Set N == set [ i for i in 0..n ]
-
-    modularFactor(p:UP):MFact ==
---      not one? abs(content(p)) => 
-      not (abs(content(p)) = 1) => 
-       error "modularFactor: the polynomial is not primitive."
-      zero? (n := degree p) => [0,[p]]
-
-      -- declarations --
-      cprime: Z := 2
-      trials: List DDFact := empty()
-      d: Set N := fullSet(n)
-      dirred: Set N := set [0,n]
-      s: Set N := empty()
-      ddlist: DDList := empty()
-      degfact: N := 0
-      nf: N := stopmussertrials+1
-      i: Z
-
-      -- Musser, see [3] --
-      diffp := differentiate p
-      for i in 1..mussertrials | nf>stopmussertrials repeat
-        -- test 1: cprime divides leading coefficient
-        -- test 2: "bad" primes: (in future: use Dedekind's Criterion)
-        while (zero? ((leadingCoefficient p) rem cprime)) or
-         (not zero? degree gcd(p,diffp,cprime)) repeat
-          cprime := nextPrime(cprime)
-        ddlist := ddFact(p,cprime)
-        -- degree compatibility: See [3] --
-        s := set [0]
-        for f in ddlist repeat
-          degfact := f.degree::N
-          if not zero? degfact then 
-            for j in 1..(degree(f.factor) quo degfact) repeat
-              s := union(s, shiftSet(s,degfact))
-        trials := cons([cprime,ddlist]$DDFact,trials)
-        d := intersect(d, s)
-        d = dirred => return [0,[p]] -- p is irreducible
-        cprime := nextPrime(cprime)
-        nf := numberOfFactors ddlist
-
-      -- choose the one with the smallest number of factors
-      choice := first trials
-      nfc := numberOfFactors(choice.ddfactors)
-      for t in rest trials repeat
-        nf := numberOfFactors(t.ddfactors)
-        if nf<nfc or ((nf=nfc) and (t.prime>choice.prime)) then
-          nfc := nf
-          choice := t
-      cprime := choice.prime
-      -- HenselLift$GHENSEL expects the degree 0 factor first 
-      [cprime,separateFactors(choice.ddfactors,cprime)]
-
-    degreePartition(ddlist:DDList):Multiset N ==
-      dp: Multiset N := empty()
-      d: N := 0
-      dd: N := 0
-      for f in ddlist repeat
-        zero? (d := degree(f.factor)) => dp := insert!(0,dp)
-        dd := f.degree::N
-        dp := insert!(dd,dp,d quo dd)
-      dp
-
-    import GeneralHenselPackage(Z,UP)
-    import UnivariatePolynomialDecompositionPackage(Z,UP)
-    import BrillhartTests(UP) -- See [2]
-
-    -- local function, finds the factors of f primitive, square-free, with
-    -- positive leading coefficient and non zero trailing coefficient,
-    -- using the overall bound technique. If pdecomp is true then look
-    -- for a functional decomposition of f.
-    henselfact(f:UP,pdecomp:Boolean):List UP ==
-      if brillhartIrreducible? f or
-       (useeisensteincriterion => eisensteinIrreducible? f ; false)
-      then return [f]
-      cf: Union(LR,"failed")
-      if pdecomp and tryfunctionaldecomposition then
-        cf := monicDecomposeIfCan f
-      else
-        cf := "failed"
-      cf case "failed" =>
-        m := modularFactor f
-        zero? (cprime := m.prime) => m.factors
-        b: P := (2*leadingCoefficient(f)*beauzamyBound(f)) :: P
-        completeHensel(f,m.factors,cprime,b)
-      lrf := cf::LR
-      "append"/[ henselfact(g(lrf.right),false) for g in
-       henselfact(lrf.left,true) ]
-
-    -- local function, returns the complete factorization of its arguments,
-    -- using the single-factor bound technique 
-    completeFactor(f:UP,lf:List UP,cprime:Z,pk:P,r:N,d:Set N):List UP ==
-      lc := leadingCoefficient f
-      f0 := coefficient(f,0)
-      ltrue: List UP := empty()
-      found? := true
-      degf: N := 0
-      degg: N := 0
-      g0: Z := 0
-      g: UP := 0
-      rg: N := 0
-      nb: Z := 0
-      lg: List UP := empty()
-      b: P := 1
-      dg: Set N := empty()
-      llg: HLR := [empty(),0]
-      levels: N := #lf
-      level: Z := 1
-      ic: Union(Z,"End of level") := 0
-      i: Z := 0
-      while level<levels repeat
-        -- try all possible factors with degree in d
-        ic := seed(level)
-        while ((not found?) and (ic case Z)) repeat
-          i := ic::Z
-          degg := 0
-          g0 := 1 -- LC algorithm
-          for j in 1..levels repeat
-            if bit?(i,j-1) then
-              degg := degg+degree lf.j
-              g0 := g0*coefficient(lf.j,0) -- LC algorithm
-          g0 := symmetricRemainder(lc*g0,pk) -- LC algorithm
-          if member?(degg,d) and (((lc*f0) exquo g0) case Z) then 
-            --                       LC algorithm
-            g := lc::UP -- build the possible factor -- LC algorithm
-            for j in 1..levels repeat if bit?(i,j-1) then g := g*lf.j
-            g := primitivePart reduction(g,pk)
-            f1 := f exquo g
-            if f1 case UP then -- g is a true factor
-              found? := true
-              -- remove the factors of g from lf
-              nb := 1
-              for j in 1..levels repeat
-                if bit?(i,j-1) then 
-                  swap!(lf,j,nb)
-                  nb := nb+1
-              lg := lf
-              lf := rest(lf,level::N)
-              setrest!(rest(lg,(level-1)::N),empty()$List(UP))
-              f := f1::UP
-              lc := leadingCoefficient f
-              f0 := coefficient(f,0)
-              -- is g irreducible?
-              dg := select(#1<=degg,d)
-              if not(dg=set [0,degg]) then -- implies degg >= 2
-                rg := max(2,r+level-levels)::N
-                b := (2*leadingCoefficient(g)*singleFactorBound(g,rg)) :: P
-                if b>pk and (not brillhartIrreducible?(g)) and
-                  (useeisensteincriterion => not eisensteinIrreducible?(g) ;
-                  true)
-                then
-                  -- g may be reducible
-                  llg := HenselLift(g,lg,cprime,b)
-                  gpk: P := (llg.modulo)::P 
-                  -- In case exact factorisation has been reached by
-                  -- HenselLift before coefficient bound.
-                  if gpk<b then
-                    lg := llg.plist
-                  else
-                    lg := completeFactor(g,llg.plist,cprime,gpk,rg,dg)
-                else lg := [ g ] -- g irreducible
-              else lg := [ g ] -- g irreducible
-              ltrue := append(ltrue,lg)
-              r := max(2,(r-#lg))::N
-              degf := degree f
-              d := select(#1<=degf,d)
-              if degf<=1 then -- lf exhausted
---                if one? degf then
-                if (degf = 1) then
-                  ltrue := cons(f,ltrue)
-                return ltrue -- 1st exit, all factors found
-              else -- can we go on with the same pk?
-                b := (2*lc*singleFactorBound(f,r)) :: P
-                if b>pk then -- unlucky: no we can't
-                  llg := HenselLift(f,lf,cprime,b) -- I should reformulate
-                   -- the lifting probleme, but hadn't time for that.
-                   -- In any case, such case should be quite exceptional.
-                  lf := llg.plist
-                  pk := (llg.modulo)::P
-                  -- In case exact factorisation has been reached by
-                  -- HenselLift before coefficient bound.
-                  if pk<b then return append(lf,ltrue) -- 2nd exit
-                  level := 1
-          ic := nextRecNum(levels,level,i)
-        if found? then
-          levels := #lf
-          found? := false
-        if not (ic case Z) then level := level+1
-      cons(f,ltrue) -- 3rd exit, the last factor was irreducible but not "true"
-
-    -- local function, returns the set of elements "divided" by an integer
-    divideSet(s:Set N, n:N):Set N ==
-      l: List N := [ 0 ]
-      for e in parts s repeat
-        if (ee := (e exquo n)$N) case N then l := cons(ee::N,l)
-      set(l)
-
-    -- Beauzamy-Trevisan-Wang FACTOR, see [1] with some refinements
-    -- and some differences. f is assumed to be primitive, square-free
-    -- and with positive leading coefficient. If pdecomp is true then
-    -- look for a functional decomposition of f. 
-    btwFactor(f:UP,d:Set N,r:N,pdecomp:Boolean):List UP ==
-      df := degree f
-      not (max(d) = df) => error "btwFact: Bad arguments"
-      reverse?: Boolean := false
-      negativelc?: Boolean := false
-
-      (d = set [0,df]) => [ f ]
-      if abs(coefficient(f,0))<abs(leadingCoefficient(f)) then
-        f := reverse f
-        reverse? := true
-      brillhartIrreducible? f or 
-       (useeisensteincriterion => eisensteinIrreducible?(f) ; false) =>
-        if reverse? then [ reverse f ] else [ f ]
-      if leadingCoefficient(f)<0 then
-        f := -f
-        negativelc? := true
-      cf: Union(LR,"failed")
-      if pdecomp and tryfunctionaldecomposition then
-        cf := monicDecomposeIfCan f
-      else
-        cf := "failed"
-      if cf case "failed" then
-        m := modularFactor f
-        zero? (cprime := m.prime) => 
-          if reverse? then
-            if negativelc? then return [ -reverse f ]
-            else return [ reverse f ]
-          else if negativelc? then return [ -f ]
-               else return [ f ]
-        if noLinearFactor? f then d := remove(1,d)
-        lc := leadingCoefficient f
-        f0 := coefficient(f,0)
-        b: P := (2*lc*singleFactorBound(f,r)) :: P -- LC algorithm
-        lm := HenselLift(f,m.factors,cprime,b)
-        lf := lm.plist
-        pk: P := (lm.modulo)::P
-        if ground? first lf then lf := rest lf
-        -- in case exact factorisation has been reached by HenselLift
-        -- before coefficient bound
-        if not pk < b then lf := completeFactor(f,lf,cprime,pk,r,d)
-      else
-        lrf := cf::LR
-        dh := degree lrf.right
-        lg := btwFactor(lrf.left,divideSet(d,dh),2,true)
-        lf: List UP := empty()
-        for i in 1..#lg repeat
-          g := lg.i
-          dgh := (degree g)*dh
-          df := subtractIfCan(df,dgh)::N
-          lfg := btwFactor(g(lrf.right),
-           select(#1<=dgh,d),max(2,r-df)::N,false)
-          lf := append(lf,lfg)
-          r := max(2,r-#lfg)::N
-      if reverse? then lf := [ reverse(fact) for fact in lf ]
-      for i in 1..#lf repeat
-        if leadingCoefficient(lf.i)<0 then lf.i := -lf.i
-        -- because we assume f with positive leading coefficient
-      lf
-
-    makeFR(flist:FinalFact):Factored UP ==
-      ctp := factor flist.contp
-      fflist: List FFE := empty()
-      for ff in flist.factors repeat
-        fflist := cons(["prime", ff.irr, ff.pow]$FFE, fflist)
-      for fc in factorList ctp repeat
-        fflist := cons([fc.flg, fc.fctr::UP, fc.xpnt]$FFE, fflist)
-      makeFR(unit(ctp)::UP, fflist)
-
-    import IntegerRoots(Z)
-
-    -- local function, factorizes a quadratic polynomial
-    quadratic(p:UP):List UP ==
-      a := leadingCoefficient p
-      b := coefficient(p,1)
-      d := b**2-4*a*coefficient(p,0)
-      r := perfectSqrt(d)
-      r case "failed" => [p]
-      b := b+(r::Z)
-      a := 2*a
-      d := gcd(a,b)
---      if not one? d then
-      if not (d = 1) then
-        a := a quo d
-        b := b quo d
-      f: UP := monomial(a,1)+monomial(b,0)
-      cons(f,[(p exquo f)::UP])
-
-    isPowerOf2(n:Z): Boolean ==
-       n = 1 => true
-       qr: Record(quotient: Z, remainder: Z) := divide(n,2)
-       qr.remainder = 1 => false
-       isPowerOf2 qr.quotient
-
-    subMinusX(supPol: SUPZ): UP ==
-       minusX: SUPZ := monomial(-1,1)$SUPZ
-       unmakeSUP(elt(supPol,minusX)$SUPZ)
-
-    henselFact(f:UP, sqf:Boolean):FinalFact ==
-      factorlist: List(ParFact) := empty()
-
-      -- make m primitive
-      c: Z := content f
-      f := (f exquo c)::UP
-
-      -- make the leading coefficient positive
-      if leadingCoefficient f < 0 then
-        c := -c
-        f := -f
-
-      -- is x**d factor of f
-      if (d := minimumDegree f) > 0 then
-        f := monicDivide(f,monomial(1,d)).quotient
-        factorlist := [[monomial(1,1),d]$ParFact]
-
-      d := degree f
-
-      -- is f constant?
-      zero? d => [c,factorlist]$FinalFact
-
-      -- is f linear?
---      one? d => [c,cons([f,1]$ParFact,factorlist)]$FinalFact
-      (d = 1) => [c,cons([f,1]$ParFact,factorlist)]$FinalFact
-
-      lcPol: UP := leadingCoefficient(f) :: UP
-
-      -- is f cyclotomic (x**n - 1)?
-      -lcPol = reductum(f) =>    -- if true, both will = 1
-        for fac in map(unmakeSUP(#1)$UP,
-         cyclotomicDecomposition(d)$CYC)$ListFunctions2(SUPZ,UP) repeat 
-          factorlist := cons([fac,1]$ParFact,factorlist)
-        [c,factorlist]$FinalFact
-
-      -- is f odd cyclotomic (x**(2*n+1) + 1)?
-      odd?(d) and (lcPol = reductum(f)) =>
-        for sfac in cyclotomicDecomposition(d)$CYC repeat
-           fac := subMinusX sfac
-           if leadingCoefficient fac < 0 then fac := -fac
-           factorlist := cons([fac,1]$ParFact,factorlist)
-        [c,factorlist]$FinalFact
-
-      -- is the poly of the form x**n + 1 with n a power of 2?
-      -- if so, then irreducible
-      isPowerOf2(d) and (lcPol = reductum(f)) =>
-        factorlist := cons([f,1]$ParFact,factorlist)
-        [c,factorlist]$FinalFact
-
-      -- other special cases to implement...
-
-      -- f is square-free :
-      sqf => [c, append([[pf,1]$ParFact for pf in henselfact(f,true)],
-       factorlist)]$FinalFact
-
-      -- f is not square-free :
-      sqfflist := factors squareFree f
-      for sqfr in sqfflist repeat
-        mult := sqfr.exponent
-        sqff := sqfr.factor
-        d := degree sqff
---        one? d => factorlist := cons([sqff,mult]$ParFact,factorlist)
-        (d = 1) => factorlist := cons([sqff,mult]$ParFact,factorlist)
-        d=2 =>
-          factorlist := append([[pf,mult]$ParFact for pf in quadratic(sqff)],
-           factorlist)
-        factorlist := append([[pf,mult]$ParFact for pf in
-         henselfact(sqff,true)],factorlist) 
-      [c,factorlist]$FinalFact
-
-    btwFact(f:UP, sqf:Boolean, fd:Set N, r:N):FinalFact ==
-      d := degree f
-      not(max(fd)=d) => error "btwFact: Bad arguments"
-      factorlist: List(ParFact) := empty()
-
-      -- make m primitive
-      c: Z := content f
-      f := (f exquo c)::UP
-
-      -- make the leading coefficient positive
-      if leadingCoefficient f < 0 then
-        c := -c
-        f := -f
-
-      -- is x**d factor of f
-      if (maxd := minimumDegree f) > 0 then
-        f := monicDivide(f,monomial(1,maxd)).quotient
-        factorlist := [[monomial(1,1),maxd]$ParFact]
-        r := max(2,r-maxd)::N
-        d := subtractIfCan(d,maxd)::N
-        fd := select(#1<=d,fd)
-
-      -- is f constant?
-      zero? d => [c,factorlist]$FinalFact
-
-      -- is f linear?
---      one? d => [c,cons([f,1]$ParFact,factorlist)]$FinalFact
-      (d = 1) => [c,cons([f,1]$ParFact,factorlist)]$FinalFact
-
-      lcPol: UP := leadingCoefficient(f) :: UP
-
-      -- is f cyclotomic (x**n - 1)?
-      -lcPol = reductum(f) =>    -- if true, both will = 1
-        for fac in map(unmakeSUP(#1)$UP,
-         cyclotomicDecomposition(d)$CYC)$ListFunctions2(SUPZ,UP) repeat 
-          factorlist := cons([fac,1]$ParFact,factorlist)
-        [c,factorlist]$FinalFact
-
-      -- is f odd cyclotomic (x**(2*n+1) + 1)?
-      odd?(d) and (lcPol = reductum(f)) =>
-        for sfac in cyclotomicDecomposition(d)$CYC repeat
-           fac := subMinusX sfac
-           if leadingCoefficient fac < 0 then fac := -fac
-           factorlist := cons([fac,1]$ParFact,factorlist)
-        [c,factorlist]$FinalFact
-
-      -- is the poly of the form x**n + 1 with n a power of 2?
-      -- if so, then irreducible
-      isPowerOf2(d) and (lcPol = reductum(f)) =>
-        factorlist := cons([f,1]$ParFact,factorlist)
-        [c,factorlist]$FinalFact
-
-      -- other special cases to implement...
-
-      -- f is square-free :
-      sqf => [c, append([[pf,1]$ParFact for pf in btwFactor(f,fd,r,true)],
-       factorlist)]$FinalFact
-
-      -- f is not square-free :
-      sqfflist := factors squareFree(f)
---      if one?(#(sqfflist)) then -- indeed f was a power of a square-free 
-      if ((#(sqfflist)) = 1) then -- indeed f was a power of a square-free 
-        r := max(r quo ((first sqfflist).exponent),2)::N
-      else
-        r := 2
-      for sqfr in sqfflist repeat
-        mult := sqfr.exponent
-        sqff := sqfr.factor
-        d := degree sqff
---        one? d => 
-        (d = 1) => 
-          factorlist := cons([sqff,mult]$ParFact,factorlist)
-          maxd := (max(fd)-mult)::N
-          fd := select(#1<=maxd,fd)
-        d=2 =>
-          factorlist := append([[pf,mult]$ParFact for pf in quadratic(sqff)],
-           factorlist)
-          maxd := (max(fd)-2*mult)::N
-          fd := select(#1<=maxd,fd)
-        factorlist := append([[pf,mult]$ParFact for pf in 
-         btwFactor(sqff,select(#1<=d,fd),r,true)],factorlist)
-        maxd := (max(fd)-d*mult)::N
-        fd := select(#1<=maxd,fd)
-      [c,factorlist]$FinalFact
-
-    factor(f:UP):Factored UP ==
-      makeFR
-        usesinglefactorbound => btwFact(f,false,fullSet(degree f),2)
-        henselFact(f,false)
-
-    -- local function, returns true if the sum of the elements of the list
-    -- is not the degree.
-    errorsum?(d:N,ld:List N):Boolean == not (d = +/ld)
-
-    -- local function, turns list of degrees into a Set
-    makeSet(ld:List N):Set N ==
-      s := set [0]
-      for d in ld repeat s := union(s,shiftSet(s,d))
-      s
-      
-    factor(f:UP,ld:List N,r:N):Factored UP ==
-      errorsum?(degree f,ld) => error "factor: Bad arguments"
-      makeFR btwFact(f,false,makeSet(ld),r)
-
-    factor(f:UP,r:N):Factored UP == makeFR btwFact(f,false,fullSet(degree f),r)
-    
-    factor(f:UP,ld:List N):Factored UP == factor(f,ld,2)
-
-    factor(f:UP,d:N,r:N):Factored UP ==
-      n := (degree f) exquo d
-      n case "failed" => error "factor: Bad arguments"
-      factor(f,new(n::N,d)$List(N),r)
-
-    factorSquareFree(f:UP):Factored UP ==
-      makeFR
-        usesinglefactorbound => btwFact(f,true,fullSet(degree f),2)
-        henselFact(f,true)
-
-    factorSquareFree(f:UP,ld:List(N),r:N):Factored UP ==
-      errorsum?(degree f,ld) => error "factorSquareFree: Bad arguments"
-      makeFR btwFact(f,true,makeSet(ld),r)
-
-    factorSquareFree(f:UP,r:N):Factored UP ==
-      makeFR btwFact(f,true,fullSet(degree f),r)
-    
-    factorSquareFree(f:UP,ld:List N):Factored UP == factorSquareFree(f,ld,2)
-
-    factorSquareFree(f:UP,d:N,r:N):Factored UP ==
-      n := (degree f) exquo d
-      n case "failed" => error "factorSquareFree: Bad arguments"
-      factorSquareFree(f,new(n::N,d)$List(N),r)
-
-    factorOfDegree(d:P,p:UP,ld:List N,r:N,sqf:Boolean):Union(UP,"failed") ==
-      dp := degree p
-      errorsum?(dp,ld) => error "factorOfDegree: Bad arguments"
---      (one? (d::N)) and noLinearFactor?(p) => "failed"
-      ((d::N) = 1) and noLinearFactor?(p) => "failed"
-      lf := btwFact(p,sqf,makeSet(ld),r).factors
-      for f in lf repeat
-        degree(f.irr)=d => return f.irr
-      "failed"
-
-    factorOfDegree(d:P,p:UP,ld:List N,r:N):Union(UP,"failed") ==
-      factorOfDegree(d,p,ld,r,false)
-
-    factorOfDegree(d:P,p:UP,r:N):Union(UP,"failed") ==
-      factorOfDegree(d,p,new(degree p,1)$List(N),r,false)
-
-    factorOfDegree(d:P,p:UP,ld:List N):Union(UP,"failed") ==
-      factorOfDegree(d,p,ld,2,false)
-
-    factorOfDegree(d:P,p:UP):Union(UP,"failed") ==
-      factorOfDegree(d,p,new(degree p,1)$List(N),2,false)
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
---    - Redistributions of source code must retain the above copyright
---      notice, this list of conditions and the following disclaimer.
---
---    - Redistributions in binary form must reproduce the above copyright
---      notice, this list of conditions and the following disclaimer in
---      the documentation and/or other materials provided with the
---      distribution.
---
---    - Neither the name of The Numerical ALgorithms Group Ltd. nor the
---      names of its contributors may be used to endorse or promote products
---      derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package GALFACT GaloisGroupFactorizer>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/galfactu.spad.pamphlet b/src/algebra/galfactu.spad.pamphlet
deleted file mode 100644
index f7dacfe..0000000
--- a/src/algebra/galfactu.spad.pamphlet
+++ /dev/null
@@ -1,214 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/algebra galfactu.spad}
-\author{Frederic Lehobey}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package GALFACTU GaloisGroupFactorizationUtilities}
-<<package GALFACTU GaloisGroupFactorizationUtilities>>=
-)abbrev package GALFACTU GaloisGroupFactorizationUtilities
-++ Author: Frederic Lehobey
-++ Date Created: 30 June 1994
-++ Date Last Updated: 19 October 1995
-++ Basic Functions:
-++ Related Constructors:
-++ Also See:
-++ AMS Classifications:
-++ Keywords:
-++ References: 
-++ [1] Bernard Beauzamy, Products of polynomials and a priori estimates for
-++ coefficients in polynomial decompositions: a sharp result,
-++ J. Symbolic Computation (1992) 13, 463-472
-++ [2] David W. Boyd, Bounds for the Height of a Factor of a Polynomial in
-++ Terms of Bombieri's Norms: I. The Largest Factor,
-++ J. Symbolic Computation (1993) 16, 115-130
-++ [3] David W. Boyd, Bounds for the Height of a Factor of a Polynomial in
-++ Terms of Bombieri's Norms: II. The Smallest Factor,
-++ J. Symbolic Computation (1993) 16, 131-145
-++ [4] Maurice Mignotte, Some Useful Bounds,
-++ Computing, Suppl. 4, 259-263 (1982), Springer-Verlag
-++ [5] Donald E. Knuth, The Art of Computer Programming, Vol. 2, (Seminumerical
-++ Algorithms) 1st edition, 2nd printing, Addison-Wesley 1971, p. 397-398
-++ [6] Bernard Beauzamy, Vilmar Trevisan and Paul S. Wang, Polynomial 
-++ Factorization: Sharp Bounds, Efficient Algorithms,
-++ J. Symbolic Computation (1993) 15, 393-413
-++ [7] Augustin-Lux Cauchy, Exercices de Math\'ematiques Quatri\`eme Ann\'ee.
-++ De Bure Fr\`eres, Paris 1829 (reprinted Oeuvres, II S\'erie, Tome IX,
-++ Gauthier-Villars, Paris, 1891).
-++ Description: 
-++ \spadtype{GaloisGroupFactorizationUtilities} provides functions
-++ that will be used by the factorizer.
-
-GaloisGroupFactorizationUtilities(R,UP,F): Exports == Implementation where
-  R : Ring
-  UP : UnivariatePolynomialCategory R
-  F : Join(FloatingPointSystem,RetractableTo(R),Field,
-   TranscendentalFunctionCategory,ElementaryFunctionCategory)
-  N ==> NonNegativeInteger
-  P ==> PositiveInteger
-  Z ==> Integer
- 
-  Exports ==> with
-    beauzamyBound: UP -> Z -- See [1]
-      ++ beauzamyBound(p) returns a bound on the larger coefficient of any
-      ++ factor of p.
-    bombieriNorm: UP -> F -- See [1]
-      ++ bombieriNorm(p) returns quadratic Bombieri's norm of p.
-    bombieriNorm: (UP,P) -> F -- See [2] and [3]
-      ++ bombieriNorm(p,n) returns the nth Bombieri's norm of p.
-    rootBound: UP -> Z -- See [4] and [5]
-      ++ rootBound(p) returns a bound on the largest norm of the complex roots
-      ++ of p.
-    singleFactorBound: (UP,N) -> Z -- See [6]
-      ++ singleFactorBound(p,r) returns a bound on the infinite norm of
-      ++ the factor of p with smallest Bombieri's norm. r is a lower bound
-      ++ for the number of factors of p. p shall be of degree higher or equal
-      ++ to 2.
-    singleFactorBound: UP -> Z -- See [6]
-      ++ singleFactorBound(p,r) returns a bound on the infinite norm of
-      ++ the factor of p with smallest Bombieri's norm. p shall be of degree
-      ++ higher or equal to 2.
-    norm: (UP,P) -> F
-      ++ norm(f,p) returns the lp norm of the polynomial f.
-    quadraticNorm: UP -> F
-      ++ quadraticNorm(f) returns the l2 norm of the polynomial f.
-    infinityNorm: UP -> F
-      ++ infinityNorm(f) returns the maximal absolute value of the coefficients
-      ++ of the polynomial f.
-    height: UP -> F
-      ++ height(p) returns the maximal absolute value of the coefficients of
-      ++ the polynomial p.
-    length: UP -> F
-      ++ length(p) returns the sum of the absolute values of the coefficients
-      ++ of the polynomial p.
-
-  Implementation ==> add
-
-    import GaloisGroupUtilities(F)
-
-    height(p:UP):F == infinityNorm(p)
-
-    length(p:UP):F == norm(p,1)
-
-    norm(f:UP,p:P):F ==
-      n : F := 0
-      for c in coefficients f repeat
-        n := n+abs(c::F)**p
-      nthRoot(n,p::N)
-
-    quadraticNorm(f:UP):F == norm(f,2)
-
-    infinityNorm(f:UP):F ==
-      n : F := 0
-      for c in coefficients f repeat
-        n := max(n,c::F)
-      n
-
-    singleFactorBound(p:UP,r:N):Z == -- See [6]
-      n : N := degree p
-      r := max(2,r)
-      n < r => error "singleFactorBound: Bad arguments."
-      nf : F := n :: F
-      num : F := nthRoot(bombieriNorm(p),r)
-      if F has Gamma: F -> F then
-        num := num*nthRoot(Gamma(nf+1$F),2*r)
-        den : F := Gamma(nf/((2*r)::F)+1$F)
-      else
-        num := num*(2::F)**(5/8+n/2)*exp(1$F/(4*nf))
-        den : F := (pi()$F*nf)**(3/8)
-      safeFloor( num/den )
-
-    singleFactorBound(p:UP):Z == singleFactorBound(p,2) -- See [6]
-
-    rootBound(p:UP):Z == -- See [4] and [5]
-      n := degree p
-      zero? n => 0
-      lc := abs(leadingCoefficient(p)::F)
-      b1 : F := 0 -- Mignotte
-      b2 : F := 0 -- Knuth
-      b3 : F := 0 -- Zassenhaus in [5]
-      b4 : F := 0 -- Cauchy in [7]
-      c : F := 0
-      cl : F := 0
-      for i in 1..n repeat
-        c := abs(coefficient(p,(n-i)::N)::F)
-        b1 := max(b1,c)
-        cl := c/lc
-        b2 := max(b2,nthRoot(cl,i))
-        b3 := max(b3,nthRoot(cl/pascalTriangle(n,i),i))
-        b4 := max(b4,nthRoot(n*cl,i))
-      min(1+safeCeiling(b1/lc),min(safeCeiling(2*b2),min(safeCeiling(b3/
-       (nthRoot(2::F,n)-1)),safeCeiling(b4))))
-
-    beauzamyBound(f:UP):Z == -- See [1]
-      d := degree f
-      zero? d => safeFloor bombieriNorm f
-      safeFloor( (bombieriNorm(f)*(3::F)**(3/4+d/2))/
-       (2*sqrt(pi()$F*(d::F))) )
-
-    bombieriNorm(f:UP,p:P):F == -- See [2] and [3]
-      d := degree f
-      b := abs(coefficient(f,0)::F)
-      if zero? d then return b
-       else b := b**p
-      b := b+abs(leadingCoefficient(f)::F)**p
-      dd := (d-1) quo 2
-      for i in 1..dd repeat
-        b := b+(abs(coefficient(f,i)::F)**p+abs(coefficient(f,(d-i)::N)::F)**p)
-         /pascalTriangle(d,i)
-      if even? d then
-        dd := dd+1
-        b := b+abs(coefficient(f, dd::N)::F)**p/pascalTriangle(d,dd)
-      nthRoot(b,p::N)
-
-    bombieriNorm(f:UP):F == bombieriNorm(f,2) -- See [1]
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
---    - Redistributions of source code must retain the above copyright
---      notice, this list of conditions and the following disclaimer.
---
---    - Redistributions in binary form must reproduce the above copyright
---      notice, this list of conditions and the following disclaimer in
---      the documentation and/or other materials provided with the
---      distribution.
---
---    - Neither the name of The Numerical ALgorithms Group Ltd. nor the
---      names of its contributors may be used to endorse or promote products
---      derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package GALFACTU GaloisGroupFactorizationUtilities>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/galpolyu.spad.pamphlet b/src/algebra/galpolyu.spad.pamphlet
deleted file mode 100644
index 2e57320..0000000
--- a/src/algebra/galpolyu.spad.pamphlet
+++ /dev/null
@@ -1,156 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/algebra galpolyu.spad}
-\author{Frederic Lehobey}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package GALPOLYU GaloisGroupPolynomialUtilities}
-<<package GALPOLYU GaloisGroupPolynomialUtilities>>=
-)abbrev package GALPOLYU GaloisGroupPolynomialUtilities
-++ Author: Frederic Lehobey
-++ Date Created: 30 June 1994
-++ Date Last Updated: 15 July 1994
-++ Basic Operations:
-++ Related Domains:
-++ Also See:
-++ AMS Classifications:
-++ Keywords:
-++ Examples:
-++ References:
-++ Description: \spadtype{GaloisGroupPolynomialUtilities} provides useful
-++ functions for univariate polynomials which should be added to 
-++ \spadtype{UnivariatePolynomialCategory} or to \spadtype{Factored}
-++ (July 1994).
-
-GaloisGroupPolynomialUtilities(R,UP): Exports == Implementation where
-  R : Ring
-  UP : UnivariatePolynomialCategory R
-  N ==> NonNegativeInteger
-  P ==> PositiveInteger
-
-  Exports ==> with
-    monic?: UP -> Boolean
-      ++ monic?(p) tests if p is monic (i.e. leading coefficient equal to 1).
-    unvectorise: Vector R -> UP
-      ++ unvectorise(v) returns the polynomial which has for coefficients the
-      ++ entries of v in the increasing order.
-    reverse: UP -> UP
-      ++ reverse(p) returns the reverse polynomial of p.
-    scaleRoots: (UP,R) -> UP
-      ++ scaleRoots(p,c) returns the polynomial which has c times the roots
-      ++ of p.
-    shiftRoots: (UP,R) -> UP
-      ++ shiftRoots(p,c) returns the polynomial which has for roots c added 
-      ++ to the roots of p.
-    degreePartition: Factored UP -> Multiset N
-      ++ degreePartition(f) returns the degree partition (i.e. the multiset
-      ++ of the degrees of the irreducible factors) of
-      ++ the polynomial f.
-    factorOfDegree: (P, Factored UP) -> UP
-      ++ factorOfDegree(d,f) returns a factor of degree d of the factored
-      ++ polynomial f. Such a factor shall exist.
-    factorsOfDegree: (P, Factored UP) -> List UP
-      ++ factorsOfDegree(d,f) returns the factors of degree d of the factored
-      ++ polynomial f.
-
-  Implementation ==> add
-
-    import Factored UP
-
-    factorsOfDegree(d:P,r:Factored UP):List UP ==
-      lfact : List UP := empty()
-      for fr in factors r | degree(fr.factor)=(d::N) repeat
-        for i in 1..fr.exponent repeat
-          lfact := cons(fr.factor,lfact)
-      lfact
-
-    factorOfDegree(d:P,r:Factored UP):UP ==
-      factor : UP := 0
-      for i in 1..numberOfFactors r repeat
-        factor := nthFactor(r,i)
-        if degree(factor)=(d::N) then return factor
-      error "factorOfDegree: Bad arguments"
-
-    degreePartition(r:Factored UP):Multiset N ==
-      multiset([ degree(nthFactor(r,i)) for i in 1..numberOfFactors r ])
-
---    monic?(p:UP):Boolean == one? leadingCoefficient p
-    monic?(p:UP):Boolean == (leadingCoefficient p) = 1
-
-    unvectorise(v:Vector R):UP ==
-      p : UP := 0
-      for i in 1..#v repeat p := p + monomial(v(i),(i-1)::N)
-      p
-
-    reverse(p:UP):UP ==
-      r : UP := 0
-      n := degree(p)
-      for i in 0..n repeat r := r + monomial(coefficient(p,(n-i)::N),i)
-      r
-
-    scaleRoots(p:UP,c:R):UP ==
---      one? c => p
-      (c = 1) => p
-      n := degree p
-      zero? c => monomial(leadingCoefficient p,n)
-      r : UP := 0
-      mc : R := 1
-      for i in n..0 by -1 repeat
-        r := r + monomial(mc*coefficient(p,i),i)
-        mc := mc*c
-      r
-
-    import UnivariatePolynomialCategoryFunctions2(R,UP,UP,
-     SparseUnivariatePolynomial UP)
-
-    shiftRoots(p:UP,c:R):UP == elt(map(coerce,p),monomial(1,1)$UP-c::UP)::UP
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
---    - Redistributions of source code must retain the above copyright
---      notice, this list of conditions and the following disclaimer.
---
---    - Redistributions in binary form must reproduce the above copyright
---      notice, this list of conditions and the following disclaimer in
---      the documentation and/or other materials provided with the
---      distribution.
---
---    - Neither the name of The Numerical ALgorithms Group Ltd. nor the
---      names of its contributors may be used to endorse or promote products
---      derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package GALPOLYU GaloisGroupPolynomialUtilities>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/galutil.spad.pamphlet b/src/algebra/galutil.spad.pamphlet
deleted file mode 100644
index 8873a5e..0000000
--- a/src/algebra/galutil.spad.pamphlet
+++ /dev/null
@@ -1,173 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/algebra galutil.spad}
-\author{Frederic Lehobey}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package GALUTIL GaloisGroupUtilities}
-<<package GALUTIL GaloisGroupUtilities>>=
-)abbrev package GALUTIL GaloisGroupUtilities
-++ Author: Frederic Lehobey
-++ Date Created: 29 June 1994
-++ Date Last Updated: 30 June 1994 
-++ Basic Functions:
-++ Related Constructors:
-++ Also See:
-++ AMS Classifications:
-++ Keywords:
-++ References:
-++ Description: 
-++ \spadtype{GaloisGroupUtilities} provides several useful functions.
-
-GaloisGroupUtilities(R): Exports == Implementation where
-  N ==> NonNegativeInteger
-  Z ==> Integer
-  R : Ring
-
-  Exports ==> with
-    pascalTriangle: (N,Z) -> R
-      ++ pascalTriangle(n,r) returns the binomial coefficient
-      ++ \spad{C(n,r)=n!/(r! (n-r)!)}
-      ++ and stores it in a table to prevent recomputation.
-    rangePascalTriangle: N -> N
-      ++ rangePascalTriangle(n) sets the maximal number of lines which
-      ++ are stored and returns the previous value.
-    rangePascalTriangle: () -> N
-      ++ rangePascalTriangle() returns the maximal number of lines stored.
-    sizePascalTriangle: () -> N
-      ++ sizePascalTriangle() returns the number of entries currently stored
-      ++ in the table.
-    fillPascalTriangle: () -> Void
-      ++ fillPascalTriangle() fills the stored table.
-
-    if R has FloatingPointSystem then
-      safeCeiling: R -> Z
-        ++ safeCeiling(x) returns the integer which is greater than any integer
-        ++ with the same floating point number representation.
-      safeFloor: R -> Z
-        ++ safeFloor(x) returns the integer which is lower or equal to the
-        ++ largest integer which has the same floating point number
-        ++ representation.
-      safetyMargin: N -> N
-        ++ safetyMargin(n) sets to n the number of low weight digits we do not
-        ++ trust in the floating point representation and returns the previous
-        ++ value (for use by \spadfun{safeCeiling}).
-      safetyMargin: () -> N
-        ++ safetyMargin() returns the number of low weight digits we do not
-        ++ trust in the floating point representation (used by 
-        ++ \spadfun{safeCeiling}).
-
-  Implementation ==> add
-
-    if R has FloatingPointSystem then
-      safetymargin : N := 6
-      
-      safeFloor(x:R):Z ==
-        if (shift := order(x)-precision()$R+safetymargin) >= 0 then
-          x := x+float(1,shift)
-        retract(floor(x))@Z
-
-      safeCeiling(x:R):Z ==
-        if (shift := order(x)-precision()$R+safetymargin) >= 0 then
-          x := x+float(1,shift)
-        retract(ceiling(x))@Z
-
-      safetyMargin(n:N):N == 
-        (safetymargin,n) := (n,safetymargin)
-        n
-
-      safetyMargin():N == safetymargin
-
-    pascaltriangle : FlexibleArray(R) := empty()
-    ncomputed : N := 3
-    rangepascaltriangle : N := 216
-
-    pascalTriangle(n:N, r:Z):R ==
-      negative? r => 0
-      (d := n-r) < r => pascalTriangle(n,d)
-      zero? r => 1$R
---      one? r => n :: R
-      (r = 1) => n :: R
-      n > rangepascaltriangle => 
-       binomial(n,r)$IntegerCombinatoricFunctions(Z) :: R
-      n <= ncomputed =>
-        m := divide(n-4,2)
-        mq := m.quotient
-        pascaltriangle((mq+1)*(mq+m.remainder)+r-1)
-      -- compute the missing lines
-      for i in (ncomputed+1)..n repeat
-        for j in 2..(i quo 2) repeat
-          pascaltriangle := concat!(pascaltriangle,pascalTriangle((i-1) 
-           :: N, j-1)+pascalTriangle((i-1) :: N,j))
-        ncomputed := i
-      pascalTriangle(n,r)
-
-    rangePascalTriangle(n:N):N ==
-      if n<ncomputed then
-        if n<3 then
-          pascaltriangle := delete!(pascaltriangle,1..#pascaltriangle)
-          ncomputed := 3
-        else
-          d := divide(n-3,2)
-          dq := d.quotient
-          pascaltriangle := delete!(pascaltriangle,((dq+1)*(dq+d.remainder)
-           +1)..#pascaltriangle)
-          ncomputed := n
-      (rangepascaltriangle,n) := (n,rangepascaltriangle)
-      n
-
-    rangePascalTriangle():N == rangepascaltriangle
-
-    sizePascalTriangle():N == #pascaltriangle
-
-    fillPascalTriangle():Void == pascalTriangle(rangepascaltriangle,2)
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
---    - Redistributions of source code must retain the above copyright
---      notice, this list of conditions and the following disclaimer.
---
---    - Redistributions in binary form must reproduce the above copyright
---      notice, this list of conditions and the following disclaimer in
---      the documentation and/or other materials provided with the
---      distribution.
---
---    - Neither the name of The Numerical ALgorithms Group Ltd. nor the
---      names of its contributors may be used to endorse or promote products
---      derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package GALUTIL GaloisGroupUtilities>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/gaussfac.spad.pamphlet b/src/algebra/gaussfac.spad.pamphlet
deleted file mode 100644
index 1b1e319..0000000
--- a/src/algebra/gaussfac.spad.pamphlet
+++ /dev/null
@@ -1,233 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/algebra gaussfac.spad}
-\author{Patrizia Gianni}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package GAUSSFAC GaussianFactorizationPackage}
-<<package GAUSSFAC GaussianFactorizationPackage>>=
-)abbrev package GAUSSFAC GaussianFactorizationPackage
-++ Author: Patrizia Gianni
-++ Date Created: Summer 1986
-++ Date Last Updated:
-++ Basic Functions:
-++ Related Constructors:
-++ Also See:
-++ AMS Classifications:
-++ Keywords:
-++ References:
-++ Description: Package for the factorization of complex or gaussian
-++ integers.
-GaussianFactorizationPackage() : C == T
- where
-  NNI  ==  NonNegativeInteger
-  Z      ==> Integer
-  ZI     ==> Complex Z
-  FRZ    ==> Factored ZI
-  fUnion ==> Union("nil", "sqfr", "irred", "prime")
-  FFE    ==> Record(flg:fUnion, fctr:ZI, xpnt:Integer)
-
-  C  == with
-     factor      :     ZI     ->     FRZ
-       ++ factor(zi) produces the complete factorization of the complex
-       ++ integer zi.
-     sumSquares  :     Z      ->    List Z
-       ++ sumSquares(p) construct \spad{a} and b such that \spad{a**2+b**2}
-       ++ is equal to
-       ++ the integer prime p, and otherwise returns an error.
-       ++ It will succeed if the prime number p is 2 or congruent to 1
-       ++ mod 4.
-     prime?      :     ZI     ->    Boolean
-       ++ prime?(zi) tests if the complex integer zi is prime.
-
-  T  == add
-     import IntegerFactorizationPackage Z
-
-     reduction(u:Z,p:Z):Z ==
-       p=0 => u
-       positiveRemainder(u,p)
-
-     merge(p:Z,q:Z):Union(Z,"failed") ==
-       p = q => p
-       p = 0 => q
-       q = 0 => p
-       "failed"
-
-     exactquo(u:Z,v:Z,p:Z):Union(Z,"failed") ==
-        p=0 => u exquo v
-        v rem p = 0 => "failed"
-        positiveRemainder((extendedEuclidean(v,p,u)::Record(coef1:Z,coef2:Z)).coef1,p)
-
-     FMod := ModularRing(Z,Z,reduction,merge,exactquo)
-
-     fact2:ZI:= complex(1,1)
-
-             ----  find the solution of x**2+1 mod q  ----
-     findelt(q:Z) : Z ==
-       q1:=q-1
-       r:=q1
-       r1:=r exquo 4
-       while ^(r1 case "failed") repeat
-         r:=r1::Z
-         r1:=r exquo 2
-       s : FMod := reduce(1,q)
-       qq1:FMod :=reduce(q1,q)
-       for i in 2.. while (s=1 or s=qq1) repeat
-         s:=reduce(i,q)**(r::NNI)
-       t:=s
-       while t^=qq1 repeat
-         s:=t
-         t:=t**2
-       s::Z
-
-
-     ---- write p, congruent to 1 mod 4, as a sum of two squares ----
-     sumsq1(p:Z) : List Z ==
-       s:= findelt(p)
-       u:=p
-       while u**2>p repeat
-         w:=u rem s
-         u:=s
-         s:=w
-       [u,s]
-
-            ---- factorization of an integer  ----
-     intfactor(n:Z) : Factored ZI ==
-       lfn:= factor n
-       r : List FFE :=[]
-       unity:ZI:=complex(unit lfn,0)
-       for term in (factorList lfn) repeat
-         n:=term.fctr
-         exp:=term.xpnt
-         n=2 =>
-           r :=concat(["prime",fact2,2*exp]$FFE,r)
-           unity:=unity*complex(0,-1)**(exp rem 4)::NNI
-
-         (n rem 4) = 3 => r:=concat(["prime",complex(n,0),exp]$FFE,r)
-
-         sz:=sumsq1(n)
-         z:=complex(sz.1,sz.2)
-         r:=concat(["prime",z,exp]$FFE,
-                 concat(["prime",conjugate(z),exp]$FFE,r))
-       makeFR(unity,r)
-
-           ---- factorization of a gaussian number  ----
-     factor(m:ZI) : FRZ ==
-       m=0 => primeFactor(0,1)
-       a:= real m
-
-       (b:= imag m)=0 => intfactor(a) :: FRZ
-
-       a=0 =>
-         ris:=intfactor(b)
-         unity:= unit(ris)*complex(0,1)
-         makeFR(unity,factorList ris)
-
-       d:=gcd(a,b)
-       result : List FFE :=[]
-       unity:ZI:=1$ZI
-
-       if d^=1 then
-         a:=(a exquo d)::Z
-         b:=(b exquo d)::Z
-         r:= intfactor(d)
-         result:=factorList r
-         unity:=unit r
-         m:=complex(a,b)
-
-       n:Z:=a**2+b**2
-       factn:= factorList(factor n)
-       part:FFE:=["prime",0$ZI,0]
-       for term in factn repeat
-         n:=term.fctr
-         exp:=term.xpnt
-         n=2 =>
-           part:= ["prime",fact2,exp]$FFE
-           m:=m quo (fact2**exp:NNI)
-           result:=concat(part,result)
-
-         (n rem 4) = 3 =>
-           g0:=complex(n,0)
-           part:= ["prime",g0,exp quo 2]$FFE
-           m:=m quo g0
-           result:=concat(part,result)
-
-         z:=gcd(m,complex(n,0))
-         part:= ["prime",z,exp]$FFE
-         z:=z**(exp:NNI)
-         m:=m quo z
-         result:=concat(part,result)
-
-       if m^=1 then unity:=unity * m
-       makeFR(unity,result)
-
-           ----  write p prime like sum of two squares  ----
-     sumSquares(p:Z) : List Z ==
-       p=2 => [1,1]
-       p rem 4 ^= 1 => error "no solutions"
-       sumsq1(p)
-
-
-     prime?(a:ZI) : Boolean ==
-        n : Z := norm a
-        n=0 => false            -- zero
-        n=1 => false            -- units
-        prime?(n)$IntegerPrimesPackage(Z)  => true
-        re : Z := real a
-        im : Z := imag a
-        re^=0 and im^=0 => false
-        p : Z := abs(re+im)     -- a is of the form p, -p, %i*p or -%i*p
-        p rem 4 ^= 3 => false
-        -- return-value true, if p is a rational prime,
-        -- and false, otherwise
-        prime?(p)$IntegerPrimesPackage(Z)
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
---    - Redistributions of source code must retain the above copyright
---      notice, this list of conditions and the following disclaimer.
---
---    - Redistributions in binary form must reproduce the above copyright
---      notice, this list of conditions and the following disclaimer in
---      the documentation and/or other materials provided with the
---      distribution.
---
---    - Neither the name of The Numerical ALgorithms Group Ltd. nor the
---      names of its contributors may be used to endorse or promote products
---      derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package GAUSSFAC GaussianFactorizationPackage>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/gaussian.spad.pamphlet b/src/algebra/gaussian.spad.pamphlet
deleted file mode 100644
index 1d804e6..0000000
--- a/src/algebra/gaussian.spad.pamphlet
+++ /dev/null
@@ -1,303 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/algebra gaussian.spad}
-\author{Barry Trager, James Davenport}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package COMPLPAT ComplexPattern}
-<<package COMPLPAT ComplexPattern>>=
-)abbrev package COMPLPAT ComplexPattern
-++ Author: Barry Trager
-++ Date Created: 30 Nov 1995
-++ Date Last Updated:
-++ Basic Functions:
-++ Related Constructors:
-++ Also See:
-++ AMS Classifications:
-++ Keywords: complex, patterns
-++ References:
-++ Description:
-++ This package supports converting complex expressions to patterns
-ComplexPattern(R, S, CS) : C == T where
-    R: SetCategory
-    S: Join(ConvertibleTo Pattern R, CommutativeRing)
-    CS: ComplexCategory S
-    C == with
-       convert: CS -> Pattern R
-	  ++ convert(cs) converts the complex expression cs to a pattern
-
-    T == add
-
-       ipat : Pattern R := patternVariable("%i"::Symbol, true, false, false)
-
-       convert(cs) ==
-          zero? imag cs => convert real cs
-          convert real cs + ipat * convert imag cs
-
-@
-\section{package CPMATCH ComplexPatternMatch}
-<<package CPMATCH ComplexPatternMatch>>=
-)abbrev package CPMATCH ComplexPatternMatch
-++ Author: Barry Trager
-++ Date Created: 30 Nov 1995
-++ Date Last Updated:
-++ Basic Functions:
-++ Related Constructors:
-++ Also See:
-++ AMS Classifications:
-++ Keywords: complex, pattern matching
-++ References:
-++ Description:
-++ This package supports matching patterns involving complex expressions
-ComplexPatternMatch(R, S, CS) : C == T where
-    R: SetCategory
-    S: Join(PatternMatchable R, CommutativeRing)
-    CS: ComplexCategory S
-    PMRS ==> PatternMatchResult(R, CS)
-    PS   ==> Polynomial S
-    C == with
-       if PS has PatternMatchable(R) then
-           patternMatch: (CS, Pattern R, PMRS) -> PMRS
-             ++ patternMatch(cexpr, pat, res) matches the pattern pat to the
-             ++ complex expression cexpr. res contains the variables of pat
-             ++ which are already matched and their matches.
-
-    T == add
-
-       import PatternMatchPushDown(R, S, CS)
-       import PatternMatchResultFunctions2(R, PS, CS)
-       import PatternMatchResultFunctions2(R, CS, PS)
-
-       ivar : PS := "%i"::Symbol::PS
-
-       makeComplex(p:PS):CS ==
-          up := univariate p
-	  degree up > 1 => error "not linear in %i"
-	  icoef:=leadingCoefficient(up)
-          rcoef:=leadingCoefficient(reductum p)
-	  complex(rcoef,icoef)
-
-       makePoly(cs:CS):PS == real(cs)*ivar + imag(cs)::PS
-
-       if PS has PatternMatchable(R) then
-          patternMatch(cs, pat, result) ==
-	     zero? imag cs =>
-                patternMatch(real cs, pat, result)
-             map(makeComplex,
-                patternMatch(makePoly cs, pat, map(makePoly, result)))
-
-@
-\section{package COMPLEX2 ComplexFunctions2}
-<<package COMPLEX2 ComplexFunctions2>>=
-)abbrev package COMPLEX2 ComplexFunctions2
-++ Author:
-++ Date Created:
-++ Date Last Updated:
-++ Basic Functions:
-++ Related Constructors:
-++ Also See:
-++ AMS Classifications:
-++ Keywords:
-++ References:
-++ Description:
-++   This package extends maps from underlying rings to maps between
-++   complex over those rings.
-ComplexFunctions2(R:CommutativeRing, S:CommutativeRing): with
-    map:     (R -> S, Complex R) -> Complex S
-      ++ map(f,u) maps f onto real and imaginary parts of u.
- == add
-    map(fn, gr) == complex(fn real gr, fn imag gr)
-
-@
-\section{package COMPFACT ComplexFactorization}
-<<package COMPFACT ComplexFactorization>>=
-)abbrev package COMPFACT ComplexFactorization
-++ Author:
-++ Date Created:
-++ Date Last Updated:
-++ Basic Functions:
-++ Related Constructors: Complex, UnivariatePolynomial
-++ Also See:
-++ AMS Classifications:
-++ Keywords: complex, polynomial factorization, factor
-++ References:
-ComplexFactorization(RR,PR) : C == T where
-  RR   :    EuclideanDomain   -- R is Z or Q
-  PR   :    UnivariatePolynomialCategory Complex RR
-  R    ==>  Complex RR
-  I    ==>  Integer
-  RN   ==>  Fraction I
-  GI   ==>  Complex I
-  GRN  ==>  Complex RN
-
-
-  C  == with
-
-     factor        :   PR   ->  Factored PR
-       ++ factor(p) factorizes the polynomial p with complex coefficients.
-
-  T  == add
-     SUP    ==> SparseUnivariatePolynomial
-     fUnion ==> Union("nil", "sqfr", "irred", "prime")
-     FF     ==> Record(flg:fUnion, fctr:PR, xpnt:Integer)
-     SAEF   :=  SimpleAlgebraicExtensionAlgFactor(SUP RN,GRN,SUP GRN)
-     UPCF2  :=  UnivariatePolynomialCategoryFunctions2(R,PR,GRN,SUP GRN)
-     UPCFB  :=  UnivariatePolynomialCategoryFunctions2(GRN,SUP GRN,R,PR)
-
-     myMap(r:R) : GRN ==
-       R is GI   =>
-         cr :GI := r pretend GI
-         complex((real cr)::RN,(imag cr)::RN)
-       R is GRN  => r pretend GRN
-
-     compND(cc:GRN):Record(cnum:GI,cden:Integer) ==
-       ccr:=real cc
-       cci:=imag cc
-       dccr:=denom ccr
-       dcci:=denom cci
-       ccd:=lcm(dccr,dcci)
-       [complex(((ccd exquo dccr)::Integer)*numer ccr,
-                ((ccd exquo dcci)::Integer)*numer cci),ccd]
-
-     conv(f:SUP GRN) :Record(convP:SUP GI, convD:RN) ==
-       pris:SUP GI :=0
-       dris:Integer:=1
-       dris1:Integer:=1
-       pdris:Integer:=1
-       for i in 0..(degree f) repeat
-         (cf:= coefficient(f,i)) = 0 => "next i"
-         cdf:=compND cf
-         dris:=lcm(cdf.cden,dris1)
-         pris:=((dris exquo dris1)::Integer)*pris +
-               ((dris exquo cdf.cden)::Integer)*
-                 monomial(cdf.cnum,i)$(SUP GI)
-         dris1:=dris
-       [pris,dris::RN]
-
-     backConv(ffr:Factored SUP GRN) : Factored PR ==
-       R is GRN =>
-         makeFR((unit ffr) pretend PR,[[f.flg,(f.fctr) pretend PR,f.xpnt]
-                                        for f in factorList ffr])
-       R is GI  =>
-         const:=unit ffr
-         ris: List FF :=[]
-         for ff in factorList ffr repeat
-           fact:=primitivePart(conv(ff.fctr).convP)
-           expf:=ff.xpnt
-           ris:=cons([ff.flg,fact pretend PR,expf],ris)
-           lc:GRN := myMap leadingCoefficient(fact pretend PR)
-           const:= const*(leadingCoefficient(ff.fctr)/lc)**expf
-         uconst:GI:= compND(coefficient(const,0)).cnum
-         makeFR((uconst pretend R)::PR,ris)
-
-
-     factor(pol : PR)  : Factored PR ==
-       ratPol:SUP GRN := 0
-       ratPol:=map(myMap,pol)$UPCF2
-       ffr:=factor ratPol
-       backConv ffr
-
-@
-\section{package CINTSLPE ComplexIntegerSolveLinearPolynomialEquation}
-<<package CINTSLPE ComplexIntegerSolveLinearPolynomialEquation>>=
-)abbrev package CINTSLPE ComplexIntegerSolveLinearPolynomialEquation
-++ Author: James Davenport
-++ Date Created: 1990
-++ Date Last Updated:
-++ Basic Functions:
-++ Related Constructors:
-++ Also See:
-++ AMS Classifications:
-++ Keywords:
-++ References:
-++ Description:
-++ This package provides the generalized euclidean algorithm which is
-++ needed as the basic step for factoring polynomials.
-ComplexIntegerSolveLinearPolynomialEquation(R,CR): C == T
- where
-  CP ==> SparseUnivariatePolynomial CR
-  R:IntegerNumberSystem
-  CR:ComplexCategory(R)
-  C == with
-      solveLinearPolynomialEquation: (List CP,CP) -> Union(List CP,"failed")
-                   ++ solveLinearPolynomialEquation([f1, ..., fn], g)
-                   ++ where (fi relatively prime to each other)
-                   ++ returns a list of ai such that
-                   ++ g = sum ai prod fj (j \= i) or
-                   ++ equivalently g/prod fj = sum (ai/fi)
-                   ++ or returns "failed" if no such list exists
-  T == add
-      oldlp:List CP := []
-      slpePrime:R:=(2::R)
-      oldtable:Vector List CP := empty()
-      solveLinearPolynomialEquation(lp,p) ==
-         if (oldlp ^= lp) then
-            -- we have to generate a new table
-            deg:= _+/[degree u for u in lp]
-            ans:Union(Vector List CP,"failed"):="failed"
-            slpePrime:=67108859::R   -- 2**26 -5 : a prime
-                 -- a good test case for this package is
-                 --  (good question?)
-            while (ans case "failed") repeat
-              ans:=tablePow(deg,complex(slpePrime,0),lp)$GenExEuclid(CR,CP)
-              if (ans case "failed") then
-                 slpePrime:=  slpePrime-4::R
-                 while not prime?(slpePrime)$IntegerPrimesPackage(R) repeat
-                   slpePrime:= slpePrime-4::R
-            oldtable:=(ans:: Vector List CP)
-         answer:=solveid(p,complex(slpePrime,0),oldtable)
-         answer
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
---    - Redistributions of source code must retain the above copyright
---      notice, this list of conditions and the following disclaimer.
---
---    - Redistributions in binary form must reproduce the above copyright
---      notice, this list of conditions and the following disclaimer in
---      the documentation and/or other materials provided with the
---      distribution.
---
---    - Neither the name of The Numerical ALgorithms Group Ltd. nor the
---      names of its contributors may be used to endorse or promote products
---      derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package COMPLPAT ComplexPattern>>
-<<package CPMATCH ComplexPatternMatch>>
-<<package COMPLEX2 ComplexFunctions2>>
-<<package COMPFACT ComplexFactorization>>
-<<package CINTSLPE ComplexIntegerSolveLinearPolynomialEquation>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/gbeuclid.spad.pamphlet b/src/algebra/gbeuclid.spad.pamphlet
deleted file mode 100644
index 0ff28e4..0000000
--- a/src/algebra/gbeuclid.spad.pamphlet
+++ /dev/null
@@ -1,596 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/algebra gbeuclid.spad}
-\author{Rudiger Gebauer, Michael Moeller}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\begin{verbatim}
---------- EUCLIDEAN GROEBNER BASIS PACKAGE  ---------------
----------
-----------           version 12.01.1986
----------
----------    Example to call euclideanGroebner:
----------
----------  a1:DMP[y,x]I:= (9*x**2 + 5*x - 3)+ y*(3*x**2 + 2*x + 1)
----------  a2:DMP[y,x]I:= (6*x**3 - 2*x**2 - 3*x +3) + y*(2*x**3 - x - 1)
----------  a3:DMP[y,x]I:= (3*x**3 + 2*x**2) + y*(x**3 + x**2)
----------
----------      an:=[a1,a2,a3]
----------
----------      euclideanGroebner(an,info)
----------
--------------------------------------------------------------------------
----------
----------    euclideanGroebner   ->  calculate weak euclGbasis
----------
----------    all reductions are TOTAL reductions
----------
----------    use string " redcrit "  and you get the reduced critpairs
----------                            printed
----------
----------    use string " info "     and you get information about
----------
----------        ci  =>  Leading monomial  for critpair calculation
----------        tci =>  Number of terms of polynomial i
----------        cj  =>  Leading monomial  for critpair calculation
----------        tcj =>  Number of terms of polynomial j
----------        c   =>  Leading monomial of critpair polynomial
----------        tc  =>  Number of terms of critpair polynomial
----------        rc  =>  Leading monomial of redcritpair polynomial
----------        trc =>  Number of terms of redcritpair polynomial
----------        tH  =>  Number of polynomials in reduction list H
----------        tD  =>  Number of critpairs still to do
----------
-\end{verbatim}
-\section{package GBEUCLID EuclideanGroebnerBasisPackage}
-<<package GBEUCLID EuclideanGroebnerBasisPackage>>=
-)abbrev package GBEUCLID EuclideanGroebnerBasisPackage
-++ Authors: Gebauer, Moeller
-++ Date Created: 12-1-86
-++ Date Last Updated: 2-28-91
-++ Basic Functions:
-++ Related Constructors: Ideal, IdealDecompositionPackage, GroebnerPackage
-++ Also See:
-++ AMS Classifications:
-++ Keywords: groebner basis, polynomial ideal, euclidean domain
-++ References:
-++ Description: \spadtype{EuclideanGroebnerBasisPackage} computes groebner
-++ bases for polynomial ideals over euclidean domains.
-++ The basic computation provides
-++ a distinguished set of generators for these ideals.
-++ This basis allows an easy test for membership: the operation
-++ \spadfun{euclideanNormalForm} returns zero on ideal members. The string 
-++ "info" and "redcrit" can be given as additional args to provide 
-++ incremental information during the computation. If "info" is given,
-++  a computational summary is given for each s-polynomial. If "redcrit" 
-++ is given, the reduced critical pairs are printed. The term ordering
-++ is determined by the polynomial type used. Suggested types include
-++ \spadtype{DistributedMultivariatePolynomial},
-++ \spadtype{HomogeneousDistributedMultivariatePolynomial},
-++ \spadtype{GeneralDistributedMultivariatePolynomial}.
- 
-EuclideanGroebnerBasisPackage(Dom, Expon, VarSet, Dpol): T == C where
- 
- Dom: EuclideanDomain
- Expon: OrderedAbelianMonoidSup
- VarSet: OrderedSet
- Dpol: PolynomialCategory(Dom, Expon, VarSet)
- 
- T== with
- 
-     euclideanNormalForm: (Dpol, List(Dpol) )  ->  Dpol
-       ++ euclideanNormalForm(poly,gb) reduces the polynomial poly modulo the
-       ++ precomputed groebner basis gb giving a canonical representative
-       ++ of the residue class.
-     euclideanGroebner: List(Dpol) -> List(Dpol)
-       ++ euclideanGroebner(lp) computes a groebner basis for a polynomial ideal
-       ++ over a euclidean domain generated by the list of polynomials lp.
-     euclideanGroebner: (List(Dpol), String) -> List(Dpol)
-       ++ euclideanGroebner(lp, infoflag) computes a groebner basis 
-       ++ for a polynomial ideal over a euclidean domain
-       ++ generated by the list of polynomials lp.
-       ++ During computation, additional information is printed out
-       ++ if infoflag is given as 
-       ++ either "info" (for summary information) or
-       ++ "redcrit" (for reduced critical pairs)
-     euclideanGroebner: (List(Dpol), String, String ) -> List(Dpol)
-       ++ euclideanGroebner(lp, "info", "redcrit") computes a groebner basis
-       ++ for a polynomial ideal generated by the list of polynomials lp.
-       ++ If the second argument is "info", a summary is given of the critical pairs.
-       ++ If the third argument is "redcrit", critical pairs are printed.
- C== add
-   Ex ==> OutputForm
-   lc ==> leadingCoefficient
-   red ==> reductum
-
-   import OutputForm
- 
-   ------  Definition list of critPair
-   ------  lcmfij is now lcm of headterm of poli and polj
-   ------  lcmcij is now lcm of of lc poli and lc polj
- 
-   critPair ==>Record(lcmfij: Expon, lcmcij: Dom, poli:Dpol, polj: Dpol )
-   Prinp    ==> Record( ci:Dpol,tci:Integer,cj:Dpol,tcj:Integer,c:Dpol,
-                tc:Integer,rc:Dpol,trc:Integer,tH:Integer,tD:Integer)
- 
-   ------  Definition of intermediate functions
- 
-   strongGbasis: (List(Dpol), Integer, Integer) -> List(Dpol)
-   eminGbasis: List(Dpol) -> List(Dpol)
-   ecritT: (critPair ) -> Boolean
-   ecritM: (Expon, Dom, Expon, Dom) -> Boolean
-   ecritB: (Expon, Dom, Expon, Dom, Expon, Dom) -> Boolean
-   ecrithinH: (Dpol, List(Dpol)) -> Boolean
-   ecritBonD: (Dpol, List(critPair)) -> List(critPair)
-   ecritMTondd1:(List(critPair)) -> List(critPair)
-   ecritMondd1:(Expon, Dom, List(critPair)) -> List(critPair)
-   crithdelH: (Dpol, List(Dpol)) -> List(Dpol)
-   eupdatF: (Dpol, List(Dpol) ) -> List(Dpol)
-   updatH: (Dpol, List(Dpol), List(Dpol), List(Dpol) ) -> List(Dpol)
-   sortin: (Dpol, List(Dpol) ) -> List(Dpol)
-   eRed: (Dpol, List(Dpol), List(Dpol) )  ->  Dpol
-   ecredPol: (Dpol, List(Dpol) ) -> Dpol
-   esPol: (critPair) -> Dpol
-   updatD: (List(critPair), List(critPair)) -> List(critPair)
-   lepol: Dpol -> Integer
-   prinshINFO : Dpol -> Void
-   prindINFO: (critPair, Dpol, Dpol,Integer,Integer,Integer) -> Integer
-   prinpolINFO: List(Dpol) -> Void
-   prinb: Integer -> Void
- 
-   ------    MAIN ALGORITHM GROEBNER ------------------------
-   euclideanGroebner( Pol: List(Dpol) ) ==
-     eminGbasis(strongGbasis(Pol,0,0))
- 
-   euclideanGroebner( Pol: List(Dpol), xx1: String) ==
-     xx1 = "redcrit" =>
-       eminGbasis(strongGbasis(Pol,1,0))
-     xx1 = "info" =>
-       eminGbasis(strongGbasis(Pol,2,1))
-     print("   "::Ex)
-     print("WARNING: options are - redcrit and/or info - "::Ex)
-     print("         you didn't type them correct"::Ex)
-     print("         please try again"::Ex)
-     print("   "::Ex)
-     []
- 
-   euclideanGroebner( Pol: List(Dpol), xx1: String, xx2: String) ==
-     (xx1 = "redcrit" and xx2 = "info") or
-      (xx1 = "info" and xx2 = "redcrit")   =>
-       eminGbasis(strongGbasis(Pol,1,1))
-     xx1 = "redcrit" and xx2 = "redcrit" =>
-       eminGbasis(strongGbasis(Pol,1,0))
-     xx1 = "info" and xx2 = "info" =>
-       eminGbasis(strongGbasis(Pol,2,1))
-     print("   "::Ex)
-     print("WARNING:  options are - redcrit and/or info - "::Ex)
-     print("          you didn't type them correct"::Ex)
-     print("          please try again "::Ex)
-     print("   "::Ex)
-     []
- 
-   ------    calculate basis
- 
-   strongGbasis(Pol: List(Dpol),xx1: Integer, xx2: Integer ) ==
-     dd1, D : List(critPair)
- 
-     ---------   create D and Pol
- 
-     Pol1:= sort( (degree #1 > degree #2) or
-                    ((degree #1 = degree #2 ) and
-                       sizeLess?(leadingCoefficient #2,leadingCoefficient #1)),
-                 Pol)
-     Pol:= [first(Pol1)]
-     H:= Pol
-     Pol1:= rest(Pol1)
-     D:= nil
-     while ^null Pol1 repeat
-        h:= first(Pol1)
-        Pol1:= rest(Pol1)
-        en:= degree(h)
-        lch:= lc h
-        dd1:= [[sup(degree(x), en), lcm(leadingCoefficient x, lch), x, h]$critPair
-            for x in Pol]
-        D:= updatD(ecritMTondd1(sort((#1.lcmfij < #2.lcmfij) or
-                                      (( #1.lcmfij = #2.lcmfij ) and
-                                        ( sizeLess?(#1.lcmcij,#2.lcmcij)) ),
-                                     dd1)), ecritBonD(h,D))
-        Pol:= cons(h, eupdatF(h, Pol))
-        ((en = degree(first(H))) and (leadingCoefficient(h) = leadingCoefficient(first(H)) ) ) =>
-              " go to top of while "
-        H:= updatH(h,H,crithdelH(h,H),[h])
-        H:= sort((degree #1 > degree #2) or
-                ((degree #1 = degree #2 ) and
-                  sizeLess?(leadingCoefficient #2,leadingCoefficient #1)), H)
-     D:= sort((#1.lcmfij < #2.lcmfij) or
-             (( #1.lcmfij = #2.lcmfij ) and
-               ( sizeLess?(#1.lcmcij,#2.lcmcij)) ) ,D)
-     xx:= xx2
- 
-     --------  loop
- 
-     while ^null D repeat
-         D0:= first D
-         ep:=esPol(D0)
-         D:= rest(D)
-         eh:= ecredPol(eRed(ep,H,H),H)
-         if xx1 = 1 then
-               prinshINFO(eh)
-         eh = 0 =>
-              if xx2 = 1 then
-                  ala:= prindINFO(D0,ep,eh,#H, #D, xx)
-                  xx:= 2
-              " go to top of while "
-         eh := unitCanonical eh
-         e:= degree(eh)
-         leh:= lc eh
-         dd1:= [[sup(degree(x), e), lcm(leadingCoefficient x, leh), x, eh]$critPair
-            for x in Pol]
-         D:= updatD(ecritMTondd1(sort( (#1.lcmfij <
-              #2.lcmfij) or (( #1.lcmfij = #2.lcmfij ) and
-               ( sizeLess?(#1.lcmcij,#2.lcmcij)) ), dd1)), ecritBonD(eh,D))
-         Pol:= cons(eh,eupdatF(eh,Pol))
-         ^ecrithinH(eh,H) or
-           ((e = degree(first(H))) and (leadingCoefficient(eh) = leadingCoefficient(first(H)) ) ) =>
-              if xx2 = 1 then
-                  ala:= prindINFO(D0,ep,eh,#H, #D, xx)
-                  xx:= 2
-              " go to top of while "
-         H:= updatH(eh,H,crithdelH(eh,H),[eh])
-         H:= sort( (degree #1 > degree #2) or
-             ((degree #1 = degree #2 ) and
-                 sizeLess?(leadingCoefficient #2,leadingCoefficient #1)), H)
-         if xx2 = 1 then
-           ala:= prindINFO(D0,ep,eh,#H, #D, xx)
-           xx:= 2
-           " go to top of while "
-     if xx2 = 1 then
-       prinpolINFO(Pol)
-       print("    THE GROEBNER BASIS over EUCLIDEAN DOMAIN"::Ex)
-     if xx1 = 1 and xx2 ^= 1 then
-       print("    THE GROEBNER BASIS over EUCLIDEAN DOMAIN"::Ex)
-     H
- 
-             --------------------------------------
- 
-             --- erase multiple of e in D2 using crit M
- 
-   ecritMondd1(e: Expon, c: Dom, D2: List(critPair))==
-      null D2 => nil
-      x:= first(D2)
-      ecritM(e,c, x.lcmfij, lcm(leadingCoefficient(x.poli), leadingCoefficient(x.polj)))
-         => ecritMondd1(e, c, rest(D2))
-      cons(x, ecritMondd1(e, c, rest(D2)))
- 
-            -------------------------------
- 
-   ecredPol(h: Dpol, F: List(Dpol) ) ==
-        h0:Dpol:= 0
-        null F => h
-        while h ^= 0 repeat
-           h0:= h0 + monomial(leadingCoefficient(h),degree(h))
-           h:= eRed(red(h), F, F)
-        h0
-             ----------------------------
- 
-             --- reduce dd1 using crit T and crit M
- 
-   ecritMTondd1(dd1: List(critPair))==
-           null dd1 => nil
-           f1:= first(dd1)
-           s1:= #(dd1)
-           cT1:= ecritT(f1)
-           s1= 1 and cT1 => nil
-           s1= 1 => dd1
-           e1:= f1.lcmfij
-           r1:= rest(dd1)
-           f2:= first(r1)
-           e1 = f2.lcmfij and f1.lcmcij = f2.lcmcij =>
-              cT1 =>   ecritMTondd1(cons(f1, rest(r1)))
-              ecritMTondd1(r1)
-           dd1 := ecritMondd1(e1, f1.lcmcij, r1)
-           cT1 => ecritMTondd1(dd1)
-           cons(f1, ecritMTondd1(dd1))
- 
-             -----------------------------
- 
-             --- erase elements in D fullfilling crit B
- 
-   ecritBonD(h:Dpol, D: List(critPair))==
-         null D => nil
-         x:= first(D)
-         x1:= x.poli
-         x2:= x.polj
-         ecritB(degree(h), leadingCoefficient(h), degree(x1),leadingCoefficient(x1),degree(x2),leadingCoefficient(x2)) =>
-           ecritBonD(h, rest(D))
-         cons(x, ecritBonD(h, rest(D)))
- 
-             -----------------------------
- 
-             --- concat F and h and erase multiples of h in F
- 
-   eupdatF(h: Dpol, F: List(Dpol)) ==
-       null F => nil
-       f1:= first(F)
-       ecritM(degree h, leadingCoefficient(h), degree f1, leadingCoefficient(f1))
-           => eupdatF(h, rest(F))
-       cons(f1, eupdatF(h, rest(F)))
- 
-             -----------------------------
-             --- concat H and h and erase multiples of h in H
- 
-   updatH(h: Dpol, H: List(Dpol), Hh: List(Dpol), Hhh: List(Dpol)) ==
-       null H => append(Hh,Hhh)
-       h1:= first(H)
-       hlcm:= sup(degree(h1), degree(h))
-       plc:= extendedEuclidean(leadingCoefficient(h), leadingCoefficient(h1))
-       hp:= monomial(plc.coef1,subtractIfCan(hlcm, degree(h))::Expon)*h +
-            monomial(plc.coef2,subtractIfCan(hlcm, degree(h1))::Expon)*h1
-       (ecrithinH(hp, Hh) and ecrithinH(hp, Hhh)) =>
-         hpp:= append(rest(H),Hh)
-         hp:= ecredPol(eRed(hp,hpp,hpp),hpp)
-         updatH(h, rest(H), crithdelH(hp,Hh),cons(hp,crithdelH(hp,Hhh)))
-       updatH(h, rest(H), Hh,Hhh)
- 
-             --------------------------------------------------
-             ---- delete elements in cons(h,H)
- 
-   crithdelH(h: Dpol, H: List(Dpol))==
-        null H => nil
-        h1:= first(H)
-        dh1:= degree h1
-        dh:= degree h
-        ecritM(dh, lc h, dh1, lc h1) => crithdelH(h, rest(H))
-        dh1 = sup(dh,dh1) =>
-           plc:= extendedEuclidean( lc h1, lc h)
-           cons(plc.coef1*h1 + monomial(plc.coef2,subtractIfCan(dh1,dh)::Expon)*h,
-               crithdelH(h,rest(H)))
-        cons(h1, crithdelH(h,rest(H)))
- 
-   eminGbasis(F: List(Dpol)) ==
-        null F => nil
-        newbas := eminGbasis rest F
-        cons(ecredPol( first(F), newbas),newbas)
- 
-             ------------------------------------------------
-             --- does h belong to H
- 
-   ecrithinH(h: Dpol, H: List(Dpol))==
-        null H  => true
-        h1:= first(H)
-        ecritM(degree h1, lc h1, degree h, lc h) => false
-        ecrithinH(h, rest(H))
- 
-            -----------------------------
-            --- calculate  euclidean S-polynomial of a critical pair
- 
-   esPol(p:critPair)==
-      Tij := p.lcmfij
-      fi := p.poli
-      fj := p.polj
-      lij:= lcm(leadingCoefficient(fi), leadingCoefficient(fj))
-      red(fi)*monomial((lij exquo leadingCoefficient(fi))::Dom,
-                        subtractIfCan(Tij, degree fi)::Expon) -
-        red(fj)*monomial((lij exquo leadingCoefficient(fj))::Dom,
-                         subtractIfCan(Tij, degree fj)::Expon)
- 
-            ----------------------------
- 
-            --- euclidean reduction mod F
- 
-   eRed(s: Dpol, H: List(Dpol), Hh: List(Dpol)) ==
-     ( s = 0 or null H ) => s
-     f1:= first(H)
-     ds:= degree s
-     lf1:= leadingCoefficient(f1)
-     ls:= leadingCoefficient(s)
-     e: Union(Expon, "failed")
-     (((e:= subtractIfCan(ds, degree f1))  case "failed" ) or sizeLess?(ls, lf1) ) =>
-        eRed(s, rest(H), Hh)
-     sdf1:= divide(ls, lf1)
-     q1:= sdf1.quotient
-     sdf1.remainder = 0 =>
-        eRed(red(s) - monomial(q1,e)*reductum(f1), Hh, Hh)
-     eRed(s -(monomial(q1, e)*f1), rest(H), Hh)
- 
-            ----------------------------
- 
-            --- crit T  true, if e1 and e2 are disjoint
- 
-   ecritT(p: critPair) ==
-          pi:= p.poli
-          pj:= p.polj
-          ci:= lc pi
-          cj:= lc pj
-          (p.lcmfij = degree pi + degree pj) and  (p.lcmcij = ci*cj)
- 
-            ----------------------------
- 
-            --- crit M - true, if lcm#2 multiple of lcm#1
- 
-   ecritM(e1: Expon, c1: Dom, e2: Expon, c2: Dom) ==
-     en: Union(Expon, "failed")
-     ((en:=subtractIfCan(e2, e1)) case "failed") or
-       ((c2 exquo c1) case "failed") => false
-     true
-            ----------------------------
- 
-            --- crit B - true, if eik is a multiple of eh and eik ^equal
-            ---          lcm(eh,ei) and eik ^equal lcm(eh,ek)
- 
-   ecritB(eh:Expon, ch: Dom, ei:Expon, ci: Dom, ek:Expon, ck: Dom) ==
-       eik:= sup(ei, ek)
-       cik:= lcm(ci, ck)
-       ecritM(eh, ch, eik, cik) and
-             ^ecritM(eik, cik, sup(ei, eh), lcm(ci, ch)) and
-                ^ecritM(eik, cik, sup(ek, eh), lcm(ck, ch))
- 
-            -------------------------------
- 
-            --- reduce p1 mod lp
- 
-   euclideanNormalForm(p1: Dpol, lp: List(Dpol))==
-       eRed(p1, lp, lp)
- 
-            ---------------------------------
- 
-            ---  insert element in sorted list
- 
-   sortin(p1: Dpol, lp: List(Dpol))==
-      null lp => [p1]
-      f1:= first(lp)
-      elf1:= degree(f1)
-      ep1:= degree(p1)
-      ((elf1 < ep1) or ((elf1 = ep1) and
-        sizeLess?(leadingCoefficient(f1),leadingCoefficient(p1)))) =>
-         cons(f1,sortin(p1, rest(lp)))
-      cons(p1,lp)
- 
-   updatD(D1: List(critPair), D2: List(critPair)) ==
-      null D1 => D2
-      null D2 => D1
-      dl1:= first(D1)
-      dl2:= first(D2)
-      (dl1.lcmfij  <  dl2.lcmfij) => cons(dl1, updatD(D1.rest, D2))
-      cons(dl2, updatD(D1, D2.rest))
- 
-            ----  calculate number of terms of polynomial
- 
-   lepol(p1:Dpol)==
-      n: Integer
-      n:= 0
-      while p1 ^= 0 repeat
-         n:= n + 1
-         p1:= red(p1)
-      n
- 
-            ----  print blanc lines
- 
-   prinb(n: Integer)==
-        for i in 1..n repeat messagePrint("    ")
- 
-            ----  print reduced critpair polynom
- 
-   prinshINFO(h: Dpol)==
-           prinb(2)
-           messagePrint(" reduced Critpair - Polynom :")
-           prinb(2)
-           print(h::Ex)
-           prinb(2)
- 
-            -------------------------------
- 
-            ----  print info string
- 
-   prindINFO(cp: critPair, ps: Dpol, ph: Dpol, i1:Integer,
-             i2:Integer, n:Integer) ==
-       ll: List Prinp
-       a: Dom
-       cpi:= cp.poli
-       cpj:= cp.polj
-       if n = 1 then
-        prinb(1)
-        messagePrint("you choose option  -info-  ")
-        messagePrint("abbrev. for the following information strings are")
-        messagePrint("  ci  =>  Leading monomial  for critpair calculation")
-        messagePrint("  tci =>  Number of terms of polynomial i")
-        messagePrint("  cj  =>  Leading monomial  for critpair calculation")
-        messagePrint("  tcj =>  Number of terms of polynomial j")
-        messagePrint("  c   =>  Leading monomial of critpair polynomial")
-        messagePrint("  tc  =>  Number of terms of critpair polynomial")
-        messagePrint("  rc  =>  Leading monomial of redcritpair polynomial")
-        messagePrint("  trc =>  Number of terms of redcritpair polynomial")
-        messagePrint("  tF  =>  Number of polynomials in reduction list F")
-        messagePrint("  tD  =>  Number of critpairs still to do")
-        prinb(4)
-        n:= 2
-       prinb(1)
-       a:= 1
-       ph = 0  =>
-          ps = 0 =>
-            ll:= [[monomial(a,degree(cpi)),lepol(cpi),monomial(a,degree(cpj)),
-             lepol(cpj),ps,0,ph,0,i1,i2]$Prinp]
-            print(ll::Ex)
-            prinb(1)
-            n
-          ll:= [[monomial(a,degree(cpi)),lepol(cpi),
-            monomial(a,degree(cpj)),lepol(cpj),monomial(a,degree(ps)),
-             lepol(ps), ph,0,i1,i2]$Prinp]
-          print(ll::Ex)
-          prinb(1)
-          n
-       ll:= [[monomial(a,degree(cpi)),lepol(cpi),
-            monomial(a,degree(cpj)),lepol(cpj),monomial(a,degree(ps)),
-             lepol(ps),monomial(a,degree(ph)),lepol(ph),i1,i2]$Prinp]
-       print(ll::Ex)
-       prinb(1)
-       n
- 
-            -------------------------------
- 
-            ----  print the groebner basis polynomials
- 
-   prinpolINFO(pl: List(Dpol))==
-       n:Integer
-       n:= #pl
-       prinb(1)
-       n = 1 =>
-         print("  There is 1  Groebner Basis Polynomial "::Ex)
-         prinb(2)
-       print("  There are "::Ex)
-       prinb(1)
-       print(n::Ex)
-       prinb(1)
-       print("  Groebner Basis Polynomials. "::Ex)
-       prinb(2)
- 
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
---    - Redistributions of source code must retain the above copyright
---      notice, this list of conditions and the following disclaimer.
---
---    - Redistributions in binary form must reproduce the above copyright
---      notice, this list of conditions and the following disclaimer in
---      the documentation and/or other materials provided with the
---      distribution.
---
---    - Neither the name of The Numerical ALgorithms Group Ltd. nor the
---      names of its contributors may be used to endorse or promote products
---      derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
- 
-<<package GBEUCLID EuclideanGroebnerBasisPackage>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/doc/Makefile.pamphlet b/src/doc/Makefile.pamphlet
index 13d39b9..e31c290 100644
--- a/src/doc/Makefile.pamphlet
+++ b/src/doc/Makefile.pamphlet
@@ -115,6 +115,7 @@ ${DVI}/spadhelp/spadhelp.files: ${IN}/spadhelp.pamphlet
           for i in ${SPADHELP} ; do \
             ${TANGLE} -R"$$i" ${IN}/spadhelp.pamphlet >$$i.help ; \
           done ; \
+          cat ${INT}/doc/help.helplist >>help.help ; \
           ls *.help >spadhelp.files )
 
 @
diff --git a/src/doc/spadhelp.pamphlet b/src/doc/spadhelp.pamphlet
index 21925ae..351564b 100644
--- a/src/doc/spadhelp.pamphlet
+++ b/src/doc/spadhelp.pamphlet
@@ -1482,59 +1482,6 @@ syntax        trace      undo       what       while
 
 Available algebra help topics are:
 
-AssociationList (ALIST)          BalancedBinaryTree (BBTREE)
-BasicOperator (BOP)              BinaryExpansion (BINARY)
-BinarySearchTree (BSTREE)        CardinalNumber (CARD)
-CartesianTensor (CARTEN)         Character (CHAR)
-CharacterClass (CCLASS)          CliffordAlgebra (CLIF)
-Complex (COMPLEX)                ContinuedFraction (CONTFRAC)
-CycleIndicators (CYCLES)         DeRhamComplex (DERHAM)
-DecimalExpansion (DECIMAL)       DistributedMultivariatePolynomial (DMP)
-DoubleFloat (DFLOAT)             EqTable (EQTBL)
-Equation (EQ)                    Factored (FR)
-FactoredFunctions2 (FR2)         File (FILE)
-FileName (FNAME)                 FlexibleArray (FARRAY)
-Float (FLOAT)                    Fraction (FR)
-FullPartialFractionExpansion (FPARFRAC)
-GeneralDistributedMultivariatePolynomial (GDMP)
-GeneralSparseTable (GSTBL)       GroebnerFactorizationPackage (GBF)
-Heap (HEAP)                      HexadecimalExpansion (HEXADEC)
-HomogeneousDistributedMultivariatePolynomial (HDMP)
-Integer (INT)                    IntegerLinearDependence (ZLINDEP)
-IntegerNumberTheoryFunctions (INTHEORY)
-Kernel (KERNEL)                  KeyedAccessFile (KAFILE)
-LexTriangularPackage (LEXTRIPK)  Library (LIB)
-LieExponentials (LEXP)           LiePolynomial (LPOLY)
-LinearOrdinaryDifferentialOperator (LODO)
-LinearOrdinaryDifferentialOperator1 (LODO1)
-LinearOrdinaryDifferentialOperator2 (LODO2)
-List (LIST)                      LyndonWord (LWORD)
-Magma (MAGMA)                    MakeFunction (MKFUNC)
-MappingPackage1 (MAPPKG1)        MappingPackage2 (MAPPKG2)
-MappingPackage3 (MAPPKG3)        Matrix (MATRIX)
-Multiset (MSET)                  MultivariatePolynomial (MPOLY)
-None (NONE)                      Octonion (OCT)
-OneDimensionalArray (ARRAY1)     Operator (OP)
-OrderedVariableList (OVAR)       OrderlyDifferentialPolynomial (ODPOL)
-PartialFraction (PFR)            Permanent (PERMAN)
-PlaneAlgebraicCurvePlot (ACPLOT) Polynomial (POLY)
-Quaternion (QUAT)                RadixExpansion (RADIX)
-RealClosure (RECLOS)             RealSolvePackage (REALSOLV)
-RegularTriangularSet (REGSET)    RomanNumeral (ROMAN)
-Segment (SEG)                    SegmentBinding (SEGBIND)
-Set (SET)                        SingleInteger (SINT)
-SparseTable (STBL)               SquareMatrix (SQMATRIX)
-SquareFreeRegularTriangularSet (SREGSET)
-Stream (STREAM)                  String (STRING)
-StringTable (STRTBL)             Symbol (SYMBOL)
-Table (TABLE)                    TextFile (TEXTFILE)
-TwoDimensionalArray (ARRAY2)     TwoDimensionalViewport (VIEW2D)
-UnivariatePolynomial (UP)        UniversalSegment (UNISEG)
-Vector (VECTOR)                  Void (VOID)
-WuWenTsunTriangularSet (WUTSET)  XPBWPolynomial (XPBWPOLY)
-XPolynomial (XPOLY)              XPolynomialRing (XPR)
-ZeroDimensionalSolvePackage (ZDSOLVE)
-
 @ 
 
 \section{command history}
