diff --git a/books/bookvol10.2.pamphlet b/books/bookvol10.2.pamphlet
index 364a52a..b200ff8 100644
--- a/books/bookvol10.2.pamphlet
+++ b/books/bookvol10.2.pamphlet
@@ -499,7 +499,7 @@ digraph pic {
 \begin{itemize}
 \item {\bf \cross{ATTREG}{finiteAggregate}}
 is true if it is an aggregate with a finite number of elements.
-\item {\bf \cross{ATTREG}{commutative("*")}}
+\item {\bf \cross{ATTREG}{commutative(``*'')}}
 is true if it has an operation $"*": (D,D) -> D$
 which is commutative.
 \item {\bf \cross{ATTREG}{shallowlyMutable}}
@@ -729,7 +729,9 @@ digraph pic {
 \pagepic{ps/v102koerce.ps}{KOERCE}{1.00}
 
 {\bf See:}\\
+\pageto{DirectProductCategory}{DIRPCAT}
 \pageto{FortranProgramCategory}{FORTCAT}
+\pageto{PolynomialSetCategory}{PSETCAT}
 \pageto{SetCategory}{SETCAT}
 \pagefrom{Category}{CATEGORY}
 
@@ -771,6 +773,11 @@ CoercibleTo(S:Type): Category == with
 "CoercibleTo(OutputForm)" ->
     "CoercibleTo(a:Type)"
 
+"CoercibleTo(List(RecursivePolynomialCategory(Ring,OrderedAbelianMonoidSup(),OrderedSet()))"
+ [color=seagreen,href="bookvol10.2.pdf#nameddest=KOERCE"];
+"CoercibleTo(List(RecursivePolynomialCategory(Ring,OrderedAbelianMonoidSup(),OrderedSet()))"
+  -> "CoercibleTo(a:Type)"
+
 @
 <<KOERCE.dotpic>>=
 digraph pic {
@@ -862,7 +869,6 @@ digraph pic {
 \pageto{Collection}{CLAGG}
 \pageto{FunctionSpace}{FS}
 \pageto{MonogenicAlgebra}{MONOGEN}
-\pageto{PolynomialCategory}{POLYCAT}
 \pageto{QuotientFieldCategory}{QFCAT}
 \pageto{RealConstant}{REAL}
 \pageto{RealNumberSystem}{RNS}
@@ -2599,9 +2605,11 @@ digraph pic {
 \pagepic{ps/v102fullyretractableto.ps}{FRETRCT}{1.00}
 
 {\bf See:}\\
+\pageto{DirectProductCategory}{DIRPCAT}
 \pageto{FiniteAbelianMonoidRing}{FAMR}
 \pageto{FunctionSpace}{FS}
 \pageto{MonogenicAlgebra}{MONOGEN}
+\pageto{OctonionCategory}{OC}
 \pagefrom{RetractableTo}{RETRACT}
 
 {\bf Exports:}\\
@@ -3032,8 +3040,13 @@ digraph pic {
 \pageto{GradedModule}{GRMOD}
 \pageto{HomogeneousAggregate}{HOAGG}
 \pageto{IndexedDirectProductCategory}{IDPC}
+\pageto{NumericalIntegrationCategory}{NUMINT}
+\pageto{NumericalOptimizationCategory}{OPTCAT}
 \pageto{OrderedSet}{ORDSET}
+\pageto{OrdinaryDifferentialEquationsSolverCategory}{ODECAT}
+\pageto{PartialDifferentialEquationsSolverCategory}{PDECAT}
 \pageto{PatternMatchable}{PATMAB}
+\pageto{PolynomialSetCategory}{PSETCAT}
 \pageto{SemiGroup}{SGROUP}
 \pageto{SetAggregate}{SETAGG}
 \pageto{SExpressionCategory}{SEXCAT}
@@ -4081,6 +4094,7 @@ digraph pic {
 \pagepic{ps/v102fullyevalableover.ps}{FEVALAB}{0.75}
 
 {\bf See:}\\
+\pageto{OctonionCategory}{OC}
 \pageto{QuotientFieldCategory}{QFCAT}
 \pagefrom{Category}{CATEGORY}
 
@@ -4167,6 +4181,11 @@ FullyEvalableOver(R:SetCategory): Category == with
 "FullyEvalableOver(IntegralDomain)" ->
   "FullyEvalableOver(a:SetCategory)"
 
+"FullyEvalableOver(CommutativeRing)"
+ [color=seagreen,href="bookvol10.2.pdf#nameddest=FEVALAB"];
+"FullyEvalableOver(CommutativeRing)" ->
+  "FullyEvalableOver(a:SetCategory)"
+
 @
 <<FEVALAB.dotpic>>=
 digraph pic {
@@ -4348,6 +4367,7 @@ digraph pic {
 \pagepic{ps/v102finite.ps}{FINITE}{1.00}
 
 {\bf See:}\\
+\pageto{DirectProductCategory}{DIRPCAT}
 \pageto{FiniteFieldCategory}{FFIELDC}
 \pageto{OrderedFinite}{ORDFIN}
 \pagefrom{SetCategory}{SETCAT}
@@ -5408,6 +5428,433 @@ digraph pic {
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\pagehead{NumericalIntegrationCategory}{NUMINT}
+\pagepic{ps/v102numericalintegrationcategory.ps}{NUMINT}{1.00}
+
+{\bf See:}\\
+\pagefrom{SetCategory}{SETCAT}
+
+{\bf Exports:}\\
+\begin{tabular}{llll}
+\cross{NUMINT}{coerce} &
+\cross{NUMINT}{hash} &
+\cross{NUMINT}{latex} &
+\cross{NUMINT}{measure} \\
+\cross{NUMINT}{numericalIntegration} &
+\cross{NUMINT}{?=?} &
+\cross{NUMINT}{?\~{}=?} &
+\end{tabular}
+
+These are directly exported but not implemented:
+\begin{verbatim}
+ measure :
+  (RoutinesTable,
+   Record(fn: Expression DoubleFloat,
+          range: List Segment OrderedCompletion DoubleFloat,
+          abserr: DoubleFloat,
+          relerr: DoubleFloat)) ->
+     Record(measure: Float,explanations: String,extra: Result)
+ measure :
+  (RoutinesTable,
+   Record(var: Symbol,
+          fn: Expression DoubleFloat,
+          range: Segment OrderedCompletion DoubleFloat,
+          abserr: DoubleFloat,
+          relerr: DoubleFloat)) ->
+    Record(measure: Float,explanations: String,extra: Result)
+ numericalIntegration :
+  (Record(fn: Expression DoubleFloat,
+          range: List Segment OrderedCompletion DoubleFloat,
+          abserr: DoubleFloat,relerr: DoubleFloat),
+   Result) ->
+  Result
+ numericalIntegration :
+  (Record(var: Symbol,
+          fn: Expression DoubleFloat,
+          range: Segment OrderedCompletion DoubleFloat,
+          abserr: DoubleFloat,
+          relerr: DoubleFloat),
+   Result) ->
+  Result
+\end{verbatim}
+
+These exports come from \refto{SetCategory}():
+\begin{verbatim}
+ coerce : % -> OutputForm
+ hash : % -> SingleInteger            
+ latex : % -> String
+ ?=? : (%,%) -> Boolean               
+ ?~=? : (%,%) -> Boolean              
+\end{verbatim}
+
+<<category NUMINT NumericalIntegrationCategory>>=
+)abbrev category NUMINT NumericalIntegrationCategory
+++ Author: Brian Dupee
+++ Date Created: February 1994
+++ Date Last Updated: March 1996
+++ Description:
+++ \axiomType{NumericalIntegrationCategory} is the \axiom{category} for 
+++ describing the set of Numerical Integration \axiom{domains} with
+++ \axiomFun{measure} and \axiomFun{numericalIntegration}.
+
+EDFE   ==> Expression DoubleFloat
+SOCDFE ==> Segment OrderedCompletion DoubleFloat
+DFE    ==> DoubleFloat
+NIAE   ==> Record(var:Symbol,fn:EDFE,range:SOCDFE,abserr:DFE,relerr:DFE)
+MDNIAE ==> Record(fn:EDFE,range:List SOCDFE,abserr:DFE,relerr:DFE)
+NumericalIntegrationCategory(): Category == SetCategory with
+
+  measure:(RoutinesTable,NIAE) -> _
+   Record(measure:Float,explanations:String,extra:Result)
+    ++ measure(R,args) calculates an estimate of the ability of a particular
+    ++ method to solve a problem.  
+    ++
+    ++ This method may be either a specific NAG routine or a strategy (such
+    ++ as transforming the function from one which is difficult to one which
+    ++ is easier to solve).
+    ++
+    ++ It will call whichever agents are needed to perform analysis on the
+    ++ problem in order to calculate the measure. There is a parameter,
+    ++ labelled \axiom{sofar}, which would contain the best compatibility
+    ++ found so far.
+
+  numericalIntegration: (NIAE, Result) -> Result
+    ++ numericalIntegration(args,hints) performs the integration of the
+    ++ function given the strategy or method returned by \axiomFun{measure}.
+
+  measure:(RoutinesTable,MDNIAE) -> _
+   Record(measure:Float,explanations:String,extra:Result)
+    ++ measure(R,args) calculates an estimate of the ability of a particular
+    ++ method to solve a problem.  
+    ++
+    ++ This method may be either a specific NAG routine or a strategy (such
+    ++ as transforming the function from one which is difficult to one which
+    ++ is easier to solve).
+    ++
+    ++ It will call whichever agents are needed to perform analysis on the
+    ++ problem in order to calculate the measure. There is a parameter,
+    ++ labelled \axiom{sofar}, which would contain the best compatibility
+    ++ found so far.
+
+  numericalIntegration: (MDNIAE, Result) -> Result
+    ++ numericalIntegration(args,hints) performs the integration of the
+    ++ function given the strategy or method returned by \axiomFun{measure}.
+
+@
+<<NUMINT.dotabb>>=
+"NUMINT"
+ [color=lightblue,href="bookvol10.2.pdf#nameddest=NUMINT"];
+"NUMINT" -> "SETCAT"
+
+@
+<<NUMINT.dotfull>>=
+"NumericalIntegrationCategory()"
+ [color=lightblue,href="bookvol10.2.pdf#nameddest=NUMINT"];
+"NumericalIntegrationCategory()" -> "SetCategory()"
+
+@
+<<NUMINT.dotpic>>=
+digraph pic {
+ fontsize=10;
+ bgcolor="#FFFF66";
+ node [shape=box, color=white, style=filled];
+
+"NumericalIntegrationCategory()" [color=lightblue];
+"NumericalIntegrationCategory()" -> "SetCategory()"
+
+"SetCategory()" [color=lightblue];
+"SetCategory()" -> "BasicType()"
+"SetCategory()" -> "CoercibleTo(OutputForm)"
+
+"BasicType()" [color=lightblue];
+"BasicType()" -> "Category"
+
+"CoercibleTo(OutputForm)" [color=seagreen];
+"CoercibleTo(OutputForm)" -> "CoercibleTo(a:Type)"
+
+"CoercibleTo(a:Type)" [color=lightblue];
+"CoercibleTo(a:Type)" -> "Category"
+
+"Category" [color=lightblue];
+
+}
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\pagehead{NumericalOptimizationCategory}{OPTCAT}
+\pagepic{ps/v102numericaloptimizationcategory.ps}{OPTCAT}{1.00}
+
+{\bf See:}\\
+\pagefrom{SetCategory}{SETCAT}
+
+{\bf Exports:}\\
+\begin{tabular}{llll}
+\cross{OPTCAT}{coerce} &
+\cross{OPTCAT}{hash} &
+\cross{OPTCAT}{latex} &
+\cross{OPTCAT}{measure} \\
+\cross{OPTCAT}{numericalOptimization} &
+\cross{OPTCAT}{?=?} &
+\cross{OPTCAT}{?\~{}=?} &
+\end{tabular}
+
+These are directly exported but not implemented:
+\begin{verbatim}
+ measure :
+  (RoutinesTable,
+   Record(lfn: List Expression DoubleFloat,
+          init: List DoubleFloat)) ->
+    Record(measure: Float,explanations: String)
+ measure :
+  (RoutinesTable,
+   Record(fn: Expression DoubleFloat,
+          init: List DoubleFloat,
+          lb: List OrderedCompletion DoubleFloat,
+          cf: List Expression DoubleFloat,
+          ub: List OrderedCompletion DoubleFloat)) ->
+    Record(measure: Float,explanations: String)
+ numericalOptimization :
+  Record(fn: Expression DoubleFloat,
+         init: List DoubleFloat,
+         lb: List OrderedCompletion DoubleFloat,
+         cf: List Expression DoubleFloat,
+         ub: List OrderedCompletion DoubleFloat) ->
+   Result
+ numericalOptimization :
+  Record(lfn: List Expression DoubleFloat,
+         init: List DoubleFloat) ->
+   Result
+\end{verbatim}
+
+These exports come from \refto{SetCategory}():
+\begin{verbatim}
+ coerce : % -> OutputForm
+ hash : % -> SingleInteger            
+ latex : % -> String
+ ?=? : (%,%) -> Boolean               
+ ?~=? : (%,%) -> Boolean              
+\end{verbatim}
+
+<<category OPTCAT NumericalOptimizationCategory>>=
+)abbrev category OPTCAT NumericalOptimizationCategory
+++ Author: Brian Dupee
+++ Date Created: January 1996
+++ Date Last Updated: March 1996
+++ Description:
+++ \axiomType{NumericalOptimizationCategory} is the \axiom{category} for 
+++ describing the set of Numerical Optimization \axiom{domains} with
+++ \axiomFun{measure} and \axiomFun{optimize}.
+
+LDFH   ==> List DoubleFloat
+LEDFH  ==> List Expression DoubleFloat
+LSAH   ==> Record(lfn:LEDFH, init:LDFH)
+EDFH   ==> Expression DoubleFloat
+LOCDFH ==> List OrderedCompletion DoubleFloat
+NOAH   ==> Record(fn:EDFH, init:LDFH, lb:LOCDFH, cf:LEDFH, ub:LOCDFH)
+NumericalOptimizationCategory(): Category == SetCategory with
+  measure:(RoutinesTable,NOAH)->Record(measure:Float,explanations:String)
+    ++ measure(R,args) calculates an estimate of the ability of a particular
+    ++ method to solve an optimization problem.  
+    ++
+    ++ This method may be either a specific NAG routine or a strategy (such
+    ++ as transforming the function from one which is difficult to one which
+    ++ is easier to solve).
+    ++
+    ++ It will call whichever agents are needed to perform analysis on the
+    ++ problem in order to calculate the measure. There is a parameter,
+    ++ labelled \axiom{sofar}, which would contain the best compatibility
+    ++ found so far.
+
+  measure:(RoutinesTable,LSAH)->Record(measure:Float,explanations:String)
+    ++ measure(R,args) calculates an estimate of the ability of a particular
+    ++ method to solve an optimization problem.  
+    ++
+    ++ This method may be either a specific NAG routine or a strategy (such
+    ++ as transforming the function from one which is difficult to one which
+    ++ is easier to solve).
+    ++
+    ++ It will call whichever agents are needed to perform analysis on the
+    ++ problem in order to calculate the measure. There is a parameter,
+    ++ labelled \axiom{sofar}, which would contain the best compatibility
+    ++ found so far.
+
+  numericalOptimization:LSAH -> Result
+    ++ numericalOptimization(args) performs the optimization of the
+    ++ function given the strategy or method returned by \axiomFun{measure}.
+
+  numericalOptimization:NOAH -> Result
+    ++ numericalOptimization(args) performs the optimization of the
+    ++ function given the strategy or method returned by \axiomFun{measure}.
+
+@
+<<OPTCAT.dotabb>>=
+"OPTCAT"
+ [color=lightblue,href="bookvol10.2.pdf#nameddest=OPTCAT"];
+"OPTCAT" -> "SETCAT"
+
+@
+<<OPTCAT.dotfull>>=
+"NumericalOptimizationCategory()"
+ [color=lightblue,href="bookvol10.2.pdf#nameddest=OPTCAT"];
+"NumericalOptimizationCategory()" -> "SetCategory()"
+
+@
+<<OPTCAT.dotpic>>=
+digraph pic {
+ fontsize=10;
+ bgcolor="#FFFF66";
+ node [shape=box, color=white, style=filled];
+
+"NumericalOptimizationCategory()" [color=lightblue];
+"NumericalOptimizationCategory()" -> "SetCategory()"
+
+"SetCategory()" [color=lightblue];
+"SetCategory()" -> "BasicType()"
+"SetCategory()" -> "CoercibleTo(OutputForm)"
+
+"BasicType()" [color=lightblue];
+"BasicType()" -> "Category"
+
+"CoercibleTo(OutputForm)" [color=seagreen];
+"CoercibleTo(OutputForm)" -> "CoercibleTo(a:Type)"
+
+"CoercibleTo(a:Type)" [color=lightblue];
+"CoercibleTo(a:Type)" -> "Category"
+
+"Category" [color=lightblue];
+
+}
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\pagehead{OrdinaryDifferentialEquationsSolverCategory}{ODECAT}
+\pagepic{ps/v102ordinarydifferentialequationssolvercategory.ps}{ODECAT}{1.00}
+
+{\bf See:}\\
+\pagefrom{SetCategory}{SETCAT}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\cross{ODECAT}{coerce} &
+\cross{ODECAT}{hash} &
+\cross{ODECAT}{latex} &
+\cross{ODECAT}{measure} &
+\cross{ODECAT}{ODESolve} \\
+\cross{ODECAT}{?=?} &
+\cross{ODECAT}{?\~{}=?} 
+\end{tabular}
+
+These are directly exported but not implemented:
+\begin{verbatim}
+ ODESolve :
+  Record(xinit: DoubleFloat,
+         xend: DoubleFloat,
+         fn: Vector Expression DoubleFloat,
+         yinit: List DoubleFloat,
+         intvals: List DoubleFloat,
+         g: Expression DoubleFloat,
+         abserr: DoubleFloat,
+         relerr: DoubleFloat) ->
+   Result
+ measure : 
+  (RoutinesTable,
+   Record(xinit: DoubleFloat,
+          xend: DoubleFloat,
+          fn: Vector Expression DoubleFloat,
+          yinit: List DoubleFloat,
+          intvals: List DoubleFloat,
+          g: Expression DoubleFloat,
+          abserr: DoubleFloat,
+          relerr: DoubleFloat)) ->
+    Record(measure: Float,explanations: String)
+\end{verbatim}
+
+These exports come from \refto{SetCategory}():
+\begin{verbatim}
+ coerce : % -> OutputForm
+ hash : % -> SingleInteger             
+ latex : % -> String
+ ?=? : (%,%) -> Boolean                
+ ?~=? : (%,%) -> Boolean              
+\end{verbatim}
+
+<<category ODECAT OrdinaryDifferentialEquationsSolverCategory>>=
+)abbrev category ODECAT OrdinaryDifferentialEquationsSolverCategory
+++ Author: Brian Dupee
+++ Date Created: February 1995
+++ Date Last Updated: June 1995
+++ Basic Operations: 
+++ Description:
+++ \axiomType{OrdinaryDifferentialEquationsSolverCategory} is the 
+++ \axiom{category} for describing the set of ODE solver \axiom{domains} 
+++ with \axiomFun{measure} and \axiomFun{ODEsolve}.
+
+DFF   ==> DoubleFloat
+VEDFF ==> Vector Expression DoubleFloat
+LDFF  ==> List DoubleFloat
+EDFF  ==> Expression DoubleFloat
+ODEAF ==> Record(xinit:DFF,xend:DFF,fn:VEDFF,yinit:LDFF,intvals:LDFF,g:EDFF,abserr:DFF,relerr:DFF)
+OrdinaryDifferentialEquationsSolverCategory(): Category == SetCategory with
+
+  measure:(RoutinesTable,ODEAF) -> Record(measure:Float,explanations:String)
+    ++ measure(R,args) calculates an estimate of the ability of a particular
+    ++ method to solve a problem.  
+    ++
+    ++ This method may be either a specific NAG routine or a strategy (such
+    ++ as transforming the function from one which is difficult to one which
+    ++ is easier to solve).
+    ++
+    ++ It will call whichever agents are needed to perform analysis on the
+    ++ problem in order to calculate the measure. There is a parameter,
+    ++ labelled \axiom{sofar}, which would contain the best compatibility
+    ++ found so far.
+
+  ODESolve: ODEAF -> Result
+    ++ ODESolve(args) performs the integration of the
+    ++ function given the strategy or method returned by \axiomFun{measure}.
+
+@
+<<ODECAT.dotabb>>=
+"ODECAT"
+ [color=lightblue,href="bookvol10.2.pdf#nameddest=ODECAT"];
+"ODECAT" -> "SETCAT"
+
+@
+<<ODECAT.dotfull>>=
+"OrdinaryDifferentialEquationsSolverCategory()"
+ [color=lightblue,href="bookvol10.2.pdf#nameddest=ODECAT"];
+"OrdinaryDifferentialEquationsSolverCategory()" -> "SetCategory()"
+
+@
+<<ODECAT.dotpic>>=
+digraph pic {
+ fontsize=10;
+ bgcolor="#FFFF66";
+ node [shape=box, color=white, style=filled];
+
+"OrdinaryDifferentialEquationsSolverCategory()"
+ [color=lightblue,href="bookvol10.2.pdf#nameddest=ODECAT"];
+"OrdinaryDifferentialEquationsSolverCategory()" -> "SetCategory()"
+
+"SetCategory()" [color=lightblue];
+"SetCategory()" -> "BasicType()"
+"SetCategory()" -> "CoercibleTo(OutputForm)"
+
+"BasicType()" [color=lightblue];
+"BasicType()" -> "Category"
+
+"CoercibleTo(OutputForm)" [color=seagreen];
+"CoercibleTo(OutputForm)" -> "CoercibleTo(a:Type)"
+
+"CoercibleTo(a:Type)" [color=lightblue];
+"CoercibleTo(a:Type)" -> "Category"
+
+"Category" [color=lightblue];
+
+}
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \pagehead{OrderedSet}{ORDSET}
 \pagepic{ps/v102orderedset.ps}{ORDSET}{1.00}
 
@@ -5545,11 +5992,168 @@ digraph pic {
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\pagehead{PartialDifferentialEquationsSolverCategory}{PDECAT}
+\pagepic{ps/v102partialdifferentialequationssolvercategory.ps}{PDECAT}{1.00}
+
+{\bf See:}\\
+\pagefrom{SetCategory}{SETCAT}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\cross{PDECAT}{coerce} &
+\cross{PDECAT}{hash} &
+\cross{PDECAT}{latex} &
+\cross{PDECAT}{measure} &
+\cross{PDECAT}{PDESolve} \\
+\cross{PDECAT}{?=?} &
+\cross{PDECAT}{?\~{}=?} &
+\end{tabular}
+
+These are directly exported but not implemented:
+\begin{verbatim}
+ measure :
+ (RoutinesTable,
+  Record(pde: List Expression DoubleFloat,
+         constraints: 
+          List Record(start: DoubleFloat,
+                      finish: DoubleFloat,
+                      grid: NonNegativeInteger,
+                      boundaryType: Integer,
+                      dStart: Matrix DoubleFloat,
+                      dFinish: Matrix DoubleFloat),
+         f: List List Expression DoubleFloat,
+         st: String,
+         tol: DoubleFloat)) -> 
+    Record(measure: Float,explanations: String)
+ PDESolve : 
+  Record(pde: List Expression DoubleFloat,
+         constraints:
+          List Record(start: DoubleFloat,
+                      finish: DoubleFloat,
+                      grid: NonNegativeInteger,
+                      boundaryType: Integer,
+                      dStart: Matrix DoubleFloat,
+                      dFinish: Matrix DoubleFloat),
+         f: List List Expression DoubleFloat,
+         st: String,
+         tol: DoubleFloat) ->
+    Result
+\end{verbatim}
+
+These exports come from \refto{Dictionary}(S:SetCategory):
+\begin{verbatim}
+ coerce : % -> OutputForm
+ hash : % -> SingleInteger            
+ latex : % -> String
+ ?=? : (%,%) -> Boolean               
+ ?~=? : (%,%) -> Boolean              
+\end{verbatim}
+
+<<category PDECAT PartialDifferentialEquationsSolverCategory>>=
+)abbrev category PDECAT PartialDifferentialEquationsSolverCategory
+++ Author: Brian Dupee
+++ Date Created: February 1995
+++ Date Last Updated: June 1995
+++ Basic Operations: 
+++ Description:
+++ \axiomType{PartialDifferentialEquationsSolverCategory} is the 
+++ \axiom{category} for describing the set of PDE solver \axiom{domains} 
+++ with \axiomFun{measure} and \axiomFun{PDEsolve}.
+
+-- PDEA	==> Record(xmin:F,xmax:F,ymin:F,ymax:F,ngx:NNI,ngy:NNI,_
+--             pde:List Expression Float, bounds:List List Expression Float,_
+--             st:String, tol:DF)
+
+--  measure:(RoutinesTable,PDEA) -> Record(measure:F,explanations:String)
+--    ++ measure(R,args) calculates an estimate of the ability of a particular
+--    ++ method to solve a problem.  
+--    ++
+--    ++ This method may be either a specific NAG routine or a strategy (such
+--    ++ as transforming the function from one which is difficult to one which
+--    ++ is easier to solve).
+--    ++
+--    ++ It will call whichever agents are needed to perform analysis on the
+--    ++ problem in order to calculate the measure. There is a parameter,
+--    ++ labelled \axiom{sofar}, which would contain the best compatibility
+--    ++ found so far.
+
+--  PDESolve: PDEA -> Result
+--    ++ PDESolve(args) performs the integration of the
+--    ++ function given the strategy or method returned by \axiomFun{measure}.
+
+DFG   ==> DoubleFloat
+NNIG  ==> NonNegativeInteger
+INTG  ==> Integer
+MDFG  ==> Matrix DoubleFloat
+PDECG ==> Record(start:DFG, finish:DFG, grid:NNIG, boundaryType:INTG,
+                  dStart:MDFG, dFinish:MDFG)
+LEDFG ==> List Expression DoubleFloat
+PDEBG ==> Record(pde:LEDFG, constraints:List PDECG, f:List LEDFG, 
+                    st:String, tol:DFG)
+PartialDifferentialEquationsSolverCategory(): Category == SetCategory with
+
+  measure:(RoutinesTable,PDEBG) -> Record(measure:Float,explanations:String)
+    ++ measure(R,args) calculates an estimate of the ability of a particular
+    ++ method to solve a problem.  
+    ++
+    ++ This method may be either a specific NAG routine or a strategy (such
+    ++ as transforming the function from one which is difficult to one which
+    ++ is easier to solve).
+    ++
+    ++ It will call whichever agents are needed to perform analysis on the
+    ++ problem in order to calculate the measure. There is a parameter,
+    ++ labelled \axiom{sofar}, which would contain the best compatibility
+    ++ found so far.
+
+  PDESolve: PDEBG -> Result
+    ++ PDESolve(args) performs the integration of the
+    ++ function given the strategy or method returned by \axiomFun{measure}.
+
+@
+<<PDECAT.dotabb>>=
+"PDECAT"
+ [color=lightblue,href="bookvol10.2.pdf#nameddest=PDECAT"];
+"PDECAT" -> "SETCAT"
+
+@
+<<PDECAT.dotfull>>=
+"PartialDifferentialEquationsSolverCategory()"
+ [color=lightblue,href="bookvol10.2.pdf#nameddest=PDECAT"];
+"PartialDifferentialEquationsSolverCategory()" -> "SetCategory()"
+
+@
+<<PDECAT.dotpic>>=
+digraph pic {
+ fontsize=10;
+ bgcolor="#FFFF66";
+ node [shape=box, color=white, style=filled];
+
+"PartialDifferentialEquationsSolverCategory()" [color=lightblue];
+"PartialDifferentialEquationsSolverCategory()" -> "SetCategory()"
+
+"SetCategory()" [color=lightblue];
+"SetCategory()" -> "BasicType()"
+"SetCategory()" -> "CoercibleTo(OutputForm)"
+
+"BasicType()" [color=lightblue];
+"BasicType()" -> "Category"
+
+"CoercibleTo(OutputForm)" [color=seagreen];
+"CoercibleTo(OutputForm)" -> "CoercibleTo(a:Type)"
+
+"CoercibleTo(a:Type)" [color=lightblue];
+"CoercibleTo(a:Type)" -> "Category"
+
+"Category" [color=lightblue];
+
+}
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \pagehead{PatternMatchable}{PATMAB}
 \pagepic{ps/v102patternmatchable.ps}{PATMAB}{1.00}
 
 {\bf See:}\\
-\pageto{PolynomialCategory}{POLYCAT}
 \pageto{RealNumberSystem}{RNS}
 \pagefrom{SetCategory}{SETCAT}
 
@@ -7065,6 +7669,7 @@ digraph pic {
 {\bf See:}\\
 \pageto{DictionaryOperations}{DIOPS}
 \pageto{LinearAggregate}{LNAGG}
+\pageto{PolynomialSetCategory}{PSETCAT}
 \pageto{SetAggregate}{SETAGG}
 \pagefrom{ConvertibleTo}{KONVERT}
 \pagefrom{HomogeneousAggregate}{HOAGG}
@@ -7282,6 +7887,11 @@ Collection(S:Type): Category == HomogeneousAggregate(S) with
  [color=seagreen,href="bookvol10.2.pdf#nameddest=CLAGG"];
 "Collection(a:SetCategory)" -> "Collection(a:Type)"
 
+"Collection(RecursivePolynomialCategory(Ring,OrderedAbelianMonoidSup(),OrderedSet())"
+ [color=seagreen,href="bookvol10.2.pdf#nameddest=CLAGG"];
+"Collection(RecursivePolynomialCategory(Ring,OrderedAbelianMonoidSup(),OrderedSet())"
+  -> "Collection(a:Type)"
+
 @
 <<CLAGG.dotpic>>=
 digraph pic {
@@ -8231,6 +8841,7 @@ digraph pic {
 \pagepic{ps/v102indexedaggregate.ps}{IXAGG}{0.90}
 
 {\bf See:}\\
+\pageto{DirectProductCategory}{DIRPCAT}
 \pageto{LinearAggregate}{LNAGG}
 \pageto{TableAggregate}{TBAGG}
 \pagefrom{EltableAggregate}{ELTAGG}
@@ -11349,6 +11960,606 @@ digraph pic {
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\pagehead{PolynomialSetCategory}{PSETCAT}
+\pagepic{ps/v102polynomialsetcategory.ps}{PSETCAT}{0.30}
+
+{\bf See:}\\
+\pageto{TriangularSetCategory}{TSETCAT}
+\pagefrom{CoercibleTo}{KOERCE}
+\pagefrom{Collection}{CLAGG}
+\pagefrom{SetCategory}{SETCAT}
+
+{\bf Exports:}\\
+\begin{tabular}{lll}
+\cross{PSETCAT}{any?} &
+\cross{PSETCAT}{coerce} &
+\cross{PSETCAT}{collect} \\
+\cross{PSETCAT}{collectUnder} &
+\cross{PSETCAT}{collectUpper} &
+\cross{PSETCAT}{construct} \\
+\cross{PSETCAT}{convert} &
+\cross{PSETCAT}{copy} &
+\cross{PSETCAT}{count} \\
+\cross{PSETCAT}{empty} &
+\cross{PSETCAT}{empty?} &
+\cross{PSETCAT}{eq?} \\
+\cross{PSETCAT}{eval} &
+\cross{PSETCAT}{every?} &
+\cross{PSETCAT}{find} \\
+\cross{PSETCAT}{hash} &
+\cross{PSETCAT}{headRemainder} &
+\cross{PSETCAT}{latex} \\
+\cross{PSETCAT}{less?} &
+\cross{PSETCAT}{mainVariables} &
+\cross{PSETCAT}{mainVariable?} \\
+\cross{PSETCAT}{map} &
+\cross{PSETCAT}{map!} &
+\cross{PSETCAT}{member?} \\
+\cross{PSETCAT}{members} &
+\cross{PSETCAT}{more?} &
+\cross{PSETCAT}{mvar} \\
+\cross{PSETCAT}{parts} &
+\cross{PSETCAT}{reduce} &
+\cross{PSETCAT}{remainder} \\
+\cross{PSETCAT}{remove} &
+\cross{PSETCAT}{removeDuplicates} &
+\cross{PSETCAT}{retract} \\
+\cross{PSETCAT}{retractIfCan} &
+\cross{PSETCAT}{rewriteIdealWithHeadRemainder} &
+\cross{PSETCAT}{rewriteIdealWithRemainder} \\
+\cross{PSETCAT}{roughBase?} &
+\cross{PSETCAT}{roughEqualIdeals?} &
+\cross{PSETCAT}{roughSubIdeal?} \\
+\cross{PSETCAT}{roughUnitIdeal?} &
+\cross{PSETCAT}{sample} &
+\cross{PSETCAT}{select} \\
+\cross{PSETCAT}{size?} &
+\cross{PSETCAT}{sort} &
+\cross{PSETCAT}{triangular?} \\
+\cross{PSETCAT}{trivialIdeal?} &
+\cross{PSETCAT}{variables} &
+\cross{PSETCAT}{\#?} \\
+\cross{PSETCAT}{?\~{}=?} &
+\cross{PSETCAT}{?=?} &
+\end{tabular}
+
+{\bf Attributes Exported:}
+\begin{itemize}
+\item {\bf \cross{PSETCAT}{finiteAggregate}}
+is true if it is an aggregate with a finite number of elements.
+\item {\bf nil}
+\end{itemize}
+
+These are directly exported but not implemented:
+\begin{verbatim}
+ mvar : % -> VarSet
+ retract : List P -> %                
+ retractIfCan : List P -> Union(%,"failed")
+\end{verbatim}
+
+These are implemented by this category:
+\begin{verbatim}
+ collect : (%,VarSet) -> %
+ collectUnder : (%,VarSet) -> %       
+ collectUpper : (%,VarSet) -> %
+ headRemainder : (P,%) -> Record(num: P,den: R) if R has INTDOM
+ mainVariables : % -> List VarSet
+ mainVariable? : (VarSet,%) -> Boolean
+ remainder : (P,%) -> Record(rnum: R,polnum: P,den: R) if R has INTDOM
+ rewriteIdealWithHeadRemainder : (List P,%) -> List P if R has INTDOM
+ rewriteIdealWithRemainder : (List P,%) -> List P if R has INTDOM
+ roughBase? : % -> Boolean if R has INTDOM
+ roughEqualIdeals? : (%,%) -> Boolean if R has INTDOM
+ roughSubIdeal? : (%,%) -> Boolean if R has INTDOM
+ roughUnitIdeal? : % -> Boolean if R has INTDOM
+ sort : (%,VarSet) -> Record(under: %,floor: %,upper: %)
+ triangular? : % -> Boolean if R has INTDOM
+ trivialIdeal? : % -> Boolean         
+ variables : % -> List VarSet
+ ?=? : (%,%) -> Boolean               
+\end{verbatim}
+
+These exports come from \refto{SetCategory}():
+\begin{verbatim}
+ coerce : % -> OutputForm             
+ hash : % -> SingleInteger
+ latex : % -> String                  
+ ?~=? : (%,%) -> Boolean              
+\end{verbatim}
+
+These exports come from \refto{Collection}(P)\\
+where P:RecursivePolynomialCategory(R,E,V)\\
+where R:Ring, E:OrderedAbelianMonoidSup, V:OrderedSet
+\begin{verbatim}
+ any? : ((P -> Boolean),%) -> Boolean if $ has finiteAggregate
+ construct : List P -> %              
+ copy : % -> %
+ count : (P,%) -> NonNegativeInteger if P has SETCAT and $ has finiteAggregate
+ count : ((P -> Boolean),%) -> NonNegativeInteger if $ has finiteAggregate
+ empty : () -> %                      
+ empty? : % -> Boolean
+ eq? : (%,%) -> Boolean               
+ eval : (%,List Equation P) -> % if P has EVALAB P and P has SETCAT
+ eval : (%,Equation P) -> % if P has EVALAB P and P has SETCAT
+ eval : (%,P,P) -> % if P has EVALAB P and P has SETCAT
+ eval : (%,List P,List P) -> % if P has EVALAB P and P has SETCAT
+ every? : ((P -> Boolean),%) -> Boolean if $ has finiteAggregate
+ find : ((P -> Boolean),%) -> Union(P,"failed")
+ less? : (%,NonNegativeInteger) -> Boolean
+ map : ((P -> P),%) -> %              
+ map! : ((P -> P),%) -> % if $ has shallowlyMutable
+ member? : (P,%) -> Boolean if P has SETCAT and $ has finiteAggregate
+ members : % -> List P if $ has finiteAggregate
+ more? : (%,NonNegativeInteger) -> Boolean
+ parts : % -> List P if $ has finiteAggregate
+ reduce : (((P,P) -> P),%) -> P if $ has finiteAggregate
+ reduce : (((P,P) -> P),%,P,P) -> P if P has SETCAT and $ has finiteAggregate
+ reduce : (((P,P) -> P),%,P) -> P if $ has finiteAggregate
+ remove : (P,%) -> % if P has SETCAT and $ has finiteAggregate
+ remove : ((P -> Boolean),%) -> % if $ has finiteAggregate
+ removeDuplicates : % -> % if P has SETCAT and $ has finiteAggregate
+ sample : () -> %
+ select : ((P -> Boolean),%) -> % if $ has finiteAggregate
+ size? : (%,NonNegativeInteger) -> Boolean
+ #? : % -> NonNegativeInteger if $ has finiteAggregate
+\end{verbatim}
+
+These exports come from \refto{CoercibleTo}(List(P))\\
+where P:RecursivePolynomialCategory(R,E,V)\\
+where R:Ring, E:OrderedAbelianMonoidSup, V:OrderedSet
+\begin{verbatim}
+ coerce : % -> List P
+ convert : % -> InputForm if P has KONVERT INFORM
+\end{verbatim}
+
+These exports come from \refto{IntegralDomain}():
+\begin{verbatim}
+\end{verbatim}
+
+<<category PSETCAT PolynomialSetCategory>>=
+)abbrev category PSETCAT PolynomialSetCategory
+++ Author: Marc Moreno Maza
+++ Date Created: 04/26/1994
+++ Date Last Updated: 12/15/1998
+++ Basic Functions:
+++ Related Constructors:
+++ Also See: 
+++ AMS Classifications:
+++ Keywords: polynomial, multivariate, ordered variables set
+++ References:
+++ Description: A category for finite subsets of a polynomial ring.
+++ Such a set is only regarded as a set of polynomials and not 
+++ identified to the ideal it generates. So two distinct sets may 
+++ generate the same the ideal. Furthermore, for \spad{R} being an 
+++ integral domain, a set of polynomials may be viewed as a representation
+++ of the ideal it generates in the polynomial ring \spad{(R)^(-1) P}, 
+++ or the set of its zeros (described for instance by the radical of the 
+++ previous ideal, or a split of the associated affine variety) and so on. 
+++ So this category provides operations about those different notions.
+++ Version: 2 
+
+PolynomialSetCategory(R:Ring, E:OrderedAbelianMonoidSup,_
+  VarSet:OrderedSet, P:RecursivePolynomialCategory(R,E,VarSet)): Category == 
+    Join(SetCategory,Collection(P),CoercibleTo(List(P))) with
+     finiteAggregate
+     retractIfCan : List(P) -> Union($,"failed")
+         ++ \axiom{retractIfCan(lp)} returns an element of the domain 
+         ++ whose elements are the members of \axiom{lp} if such an element 
+         ++ exists, otherwise \axiom{"failed"} is returned.
+     retract : List(P) -> $
+         ++ \axiom{retract(lp)} returns an element of the domain whose elements
+         ++ are the members of \axiom{lp} if such an element exists, otherwise
+         ++ an error is produced.
+     mvar : $ -> VarSet
+         ++  \axiom{mvar(ps)} returns the main variable of the non constant 
+         ++ polynomial with the greatest main variable, if any, else an 
+         ++ error is returned.
+     variables : $ -> List VarSet
+         ++  \axiom{variables(ps)} returns the decreasingly sorted list of the
+         ++  variables which are variables of some polynomial in \axiom{ps}.
+     mainVariables : $  -> List VarSet
+         ++ \axiom{mainVariables(ps)} returns the decreasingly sorted list 
+         ++ of the variables which are main variables of some polynomial 
+         ++ in \axiom{ps}.
+     mainVariable? : (VarSet,$) -> Boolean
+         ++ \axiom{mainVariable?(v,ps)} returns true iff \axiom{v} is the 
+         ++ main variable of some polynomial in \axiom{ps}.
+     collectUnder : ($,VarSet) -> $
+         ++ \axiom{collectUnder(ps,v)} returns the set consisting of the 
+         ++ polynomials of \axiom{ps} with main variable less than \axiom{v}.
+     collect : ($,VarSet) -> $
+         ++ \axiom{collect(ps,v)}  returns the set consisting of the 
+         ++ polynomials of \axiom{ps} with \axiom{v} as main variable.
+     collectUpper : ($,VarSet) -> $
+         ++ \axiom{collectUpper(ps,v)} returns the set consisting of the 
+         ++ polynomials of \axiom{ps} with main variable greater 
+         ++ than \axiom{v}.
+     sort : ($,VarSet) -> Record(under:$,floor:$,upper:$)
+         ++ \axiom{sort(v,ps)} returns \axiom{us,vs,ws} such that \axiom{us}
+         ++ is \axiom{collectUnder(ps,v)}, \axiom{vs} is \axiom{collect(ps,v)}
+         ++ and \axiom{ws} is \axiom{collectUpper(ps,v)}. 
+     trivialIdeal?: $ -> Boolean
+         ++ \axiom{trivialIdeal?(ps)} returns true iff \axiom{ps} does
+         ++ not contain non-zero elements.
+     if R has IntegralDomain
+     then
+       roughBase? : $ -> Boolean
+           ++ \axiom{roughBase?(ps)} returns true iff for every pair 
+           ++ \axiom{{p,q}} of polynomials in \axiom{ps} their leading 
+           ++ monomials are relatively prime.
+       roughSubIdeal?  : ($,$) -> Boolean
+           ++  \axiom{roughSubIdeal?(ps1,ps2)} returns true iff it can proved 
+           ++ that all polynomials in  \axiom{ps1} lie in the ideal generated 
+           ++ by \axiom{ps2} in \axiom{\axiom{(R)^(-1) P}} without computing 
+           ++ Groebner bases.
+       roughEqualIdeals? : ($,$) -> Boolean
+           ++ \axiom{roughEqualIdeals?(ps1,ps2)} returns true iff it can
+           ++ proved that \axiom{ps1} and \axiom{ps2} generate the same ideal
+           ++ in \axiom{(R)^(-1) P} without computing Groebner bases.
+       roughUnitIdeal? : $ -> Boolean
+           ++ \axiom{roughUnitIdeal?(ps)} returns true iff \axiom{ps} contains
+           ++  some non null element lying in the base ring \axiom{R}.
+       headRemainder : (P,$) -> Record(num:P,den:R)
+           ++ \axiom{headRemainder(a,ps)} returns \axiom{[b,r]} such that the 
+           ++ leading monomial of \axiom{b} is reduced in the sense of 
+           ++ Groebner bases w.r.t. \axiom{ps} and \axiom{r*a - b} lies in 
+           ++ the ideal generated by \axiom{ps}.
+       remainder : (P,$) -> Record(rnum:R,polnum:P,den:R)
+           ++ \axiom{remainder(a,ps)} returns \axiom{[c,b,r]} such that 
+           ++ \axiom{b} is fully reduced in the sense of Groebner bases 
+           ++ w.r.t. \axiom{ps}, \axiom{r*a - c*b} lies in the ideal 
+           ++ generated by \axiom{ps}. Furthermore, if \axiom{R} is a 
+           ++ gcd-domain, \axiom{b} is primitive.
+       rewriteIdealWithHeadRemainder : (List(P),$) -> List(P)
+           ++ \axiom{rewriteIdealWithHeadRemainder(lp,cs)} returns \axiom{lr} 
+           ++ such that the leading monomial of every polynomial in \axiom{lr}
+           ++ is reduced in the sense of Groebner bases w.r.t. \axiom{cs} 
+           ++ and \axiom{(lp,cs)} and \axiom{(lr,cs)} generate the same 
+           ++ ideal in \axiom{(R)^(-1) P}.
+       rewriteIdealWithRemainder : (List(P),$) -> List(P)
+           ++ \axiom{rewriteIdealWithRemainder(lp,cs)} returns \axiom{lr} 
+           ++ such that every polynomial in \axiom{lr} is fully reduced in 
+           ++ the sense of Groebner bases w.r.t. \axiom{cs} and 
+           ++ \axiom{(lp,cs)} and \axiom{(lr,cs)} generate the same ideal 
+           ++ in \axiom{(R)^(-1) P}.
+       triangular? : $ -> Boolean
+           ++ \axiom{triangular?(ps)} returns true iff \axiom{ps} is a 
+           ++ triangular set, i.e. two distinct polynomials have distinct 
+           ++ main variables and no constant lies in \axiom{ps}.
+
+  add
+
+     NNI ==> NonNegativeInteger
+     B ==> Boolean
+
+     elements: $ -> List(P)
+
+     elements(ps:$):List(P) ==
+       lp : List(P) := members(ps)$$
+
+     variables1(lp:List(P)):(List VarSet) ==
+       lvars : List(List(VarSet)) := [variables(p)$P for p in lp]
+       sort(#1 > #2, removeDuplicates(concat(lvars)$List(VarSet)))
+
+     variables2(lp:List(P)):(List VarSet) ==
+       lvars : List(VarSet) := [mvar(p)$P for p in lp]
+       sort(#1 > #2, removeDuplicates(lvars)$List(VarSet))
+
+     variables (ps:$) ==
+       variables1(elements(ps))
+
+     mainVariables (ps:$) ==
+       variables2(remove(ground?,elements(ps)))
+
+     mainVariable? (v,ps) ==
+       lp : List(P) := remove(ground?,elements(ps))
+       while (not empty? lp) and (not (mvar(first(lp)) = v)) repeat
+         lp := rest lp
+       (not empty? lp)
+
+     collectUnder (ps,v) ==
+       lp : List P := elements(ps)
+       lq : List P := []
+       while (not empty? lp) repeat
+         p := first lp
+         lp := rest lp
+         if (ground?(p)) or (mvar(p) < v)
+           then
+             lq := cons(p,lq)
+       construct(lq)$$
+
+     collectUpper (ps,v) ==
+       lp : List P := elements(ps)
+       lq : List P := []
+       while (not empty? lp) repeat
+         p := first lp
+         lp := rest lp
+         if (not ground?(p)) and (mvar(p) > v)
+           then
+             lq := cons(p,lq)
+       construct(lq)$$
+
+     collect (ps,v) ==
+       lp : List P := elements(ps)
+       lq : List P := []
+       while (not empty? lp) repeat
+         p := first lp
+         lp := rest lp
+         if (not ground?(p)) and (mvar(p) = v)
+           then
+             lq := cons(p,lq)
+       construct(lq)$$
+
+     sort (ps,v) ==
+       lp : List P := elements(ps)
+       us : List P := []
+       vs : List P := []
+       ws : List P := []
+       while (not empty? lp) repeat
+         p := first lp
+         lp := rest lp
+         if (ground?(p)) or (mvar(p) < v)
+           then
+             us := cons(p,us)
+           else
+             if (mvar(p) = v)
+               then
+                 vs := cons(p,vs)
+               else
+                 ws := cons(p,ws)
+       [construct(us)$$,_
+        construct(vs)$$,_
+        construct(ws)$$]$Record(under:$,floor:$,upper:$)
+
+     ps1 = ps2 ==
+       {p for p in elements(ps1)} =$(Set P) {p for p in elements(ps2)}
+
+     exactQuo : (R,R) -> R
+
+     localInf? (p:P,q:P):B ==
+       degree(p) <$E degree(q)
+
+     localTriangular? (lp:List(P)):B ==
+       lp := remove(zero?, lp)
+       empty? lp => true
+       any? (ground?, lp) => false
+       lp := sort(mvar(#1)$P > mvar(#2)$P, lp)
+       p,q : P
+       p := first lp
+       lp := rest lp
+       while (not empty? lp) and (mvar(p) > mvar((q := first(lp)))) repeat
+         p := q
+         lp := rest lp
+       empty? lp
+
+     triangular? ps ==
+       localTriangular? elements ps
+
+     trivialIdeal? ps ==
+       empty?(remove(zero?,elements(ps))$(List(P)))$(List(P))
+
+     if R has IntegralDomain
+     then
+
+       roughUnitIdeal? ps ==
+         any?(ground?,remove(zero?,elements(ps))$(List(P)))$(List P)
+
+       relativelyPrimeLeadingMonomials? (p:P,q:P):B ==
+         dp : E := degree(p)
+         dq : E := degree(q)
+         (sup(dp,dq)$E =$E dp +$E dq)@B
+
+       roughBase? ps ==
+         lp := remove(zero?,elements(ps))$(List(P))
+         empty? lp => true
+         rB? : B := true
+         while (not empty? lp) and rB? repeat
+           p := first lp
+           lp := rest lp
+           copylp := lp
+           while (not empty? copylp) and rB? repeat
+             rB? := relativelyPrimeLeadingMonomials?(p,first(copylp))
+             copylp := rest copylp
+         rB?
+
+       roughSubIdeal?(ps1,ps2) ==
+         lp: List(P) := rewriteIdealWithRemainder(elements(ps1),ps2)
+         empty? (remove(zero?,lp))
+
+       roughEqualIdeals? (ps1,ps2) ==
+         ps1 =$$ ps2 => true
+         roughSubIdeal?(ps1,ps2) and roughSubIdeal?(ps2,ps1)
+
+     if (R has GcdDomain) and (VarSet has ConvertibleTo (Symbol))
+     then
+
+       LPR ==> List Polynomial R
+       LS ==> List Symbol
+
+       if R has EuclideanDomain
+         then
+           exactQuo(r:R,s:R):R ==
+             r quo$R s
+         else
+           exactQuo(r:R,s:R):R ==
+             (r exquo$R s)::R
+
+       headRemainder (a,ps) ==
+         lp1 : List(P) := remove(zero?, elements(ps))$(List(P))
+         empty? lp1 => [a,1$R]
+         any?(ground?,lp1) => [reductum(a),1$R]
+         r : R := 1$R
+         lp1 := sort(localInf?, reverse elements(ps))
+         lp2 := lp1
+         e : Union(E, "failed")
+         while (not zero? a) and (not empty? lp2) repeat
+           p := first lp2
+           if ((e:= subtractIfCan(degree(a),degree(p))) case E)
+             then
+               g := gcd((lca := leadingCoefficient(a)),_
+                        (lcp := leadingCoefficient(p)))$R
+               (lca,lcp) := (exactQuo(lca,g),exactQuo(lcp,g))
+               a := lcp * reductum(a) - monomial(lca, e::E)$P * reductum(p)
+               r := r * lcp
+               lp2 := lp1
+             else
+               lp2 := rest lp2
+         [a,r]
+
+       makeIrreducible! (frac:Record(num:P,den:R)):Record(num:P,den:R) ==
+         g := gcd(frac.den,frac.num)$P
+--         one? g => frac
+         (g = 1) => frac
+         frac.num := exactQuotient!(frac.num,g)
+         frac.den := exactQuo(frac.den,g)
+         frac
+
+       remainder (a,ps) ==
+         hRa := makeIrreducible! headRemainder (a,ps)
+         a := hRa.num
+         r : R := hRa.den
+         zero? a => [1$R,a,r]
+         b : P := monomial(1$R,degree(a))$P
+         c : R := leadingCoefficient(a)
+         while not zero?(a := reductum a) repeat
+           hRa := makeIrreducible!  headRemainder (a,ps)
+           a := hRa.num
+           r := r * hRa.den
+           g := gcd(c,(lca := leadingCoefficient(a)))$R
+           b := ((hRa.den) * exactQuo(c,g)) * b + _
+                 monomial(exactQuo(lca,g),degree(a))$P
+           c := g
+         [c,b,r]
+
+       rewriteIdealWithHeadRemainder(ps,cs) ==
+         trivialIdeal? cs => ps
+         roughUnitIdeal? cs => [0$P]
+         ps := remove(zero?,ps)
+         empty? ps => ps
+         any?(ground?,ps) => [1$P]
+         rs : List P := []
+         while not empty? ps repeat
+           p := first ps
+           ps := rest ps
+           p := (headRemainder(p,cs)).num
+           if not zero? p
+             then 
+               if ground? p
+                 then
+                   ps := []
+                   rs := [1$P]
+                 else
+                   primitivePart! p
+                   rs := cons(p,rs)
+         removeDuplicates rs
+
+       rewriteIdealWithRemainder(ps,cs) ==
+         trivialIdeal? cs => ps
+         roughUnitIdeal? cs => [0$P]
+         ps := remove(zero?,ps)
+         empty? ps => ps
+         any?(ground?,ps) => [1$P]
+         rs : List P := []
+         while not empty? ps repeat
+           p := first ps
+           ps := rest ps
+           p := (remainder(p,cs)).polnum
+           if not zero? p
+             then 
+               if ground? p
+                 then
+                   ps := []
+                   rs := [1$P]
+                 else
+                   rs := cons(unitCanonical(p),rs)
+         removeDuplicates rs
+
+@
+<<PSETCAT.dotabb>>=
+"PSETCAT"
+ [color=lightblue,href="bookvol10.2.pdf#nameddest=PSETCAT"];
+"PSETCAT" -> "KOERCE"
+"PSETCAT" -> "CLAGG"
+"PSETCAT" -> "SETCAT"
+
+@
+<<PSETCAT.dotfull>>=
+"PolynomialSetCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))"
+ [color=lightblue,href="bookvol10.2.pdf#nameddest=PSETCAT"];
+"PolynomialSetCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))"
+ -> "SetCategory()"
+"PolynomialSetCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))"
+ -> "Collection(RecursivePolynomialCategory(Ring,OrderedAbelianMonoidSup(),OrderedSet())"
+"PolynomialSetCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))"
+ -> "CoercibleTo(List(RecursivePolynomialCategory(Ring,OrderedAbelianMonoidSup(),OrderedSet()))"
+
+"PolynomialSetCategory(a:IntegralDomain,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))" 
+ [color=seagreen,href="bookvol10.2.pdf#nameddest=PSETCAT"];
+"PolynomialSetCategory(a:IntegralDomain,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))" 
+  -> "PolynomialSetCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))"
+
+@
+<<PSETCAT.dotpic>>=
+digraph pic {
+ fontsize=10;
+ bgcolor="#FFFF66";
+ node [shape=box, color=white, style=filled];
+
+"PolynomialSetCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))"
+ [color=lightblue];
+"PolynomialSetCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))"
+ -> "SetCategory()"
+"PolynomialSetCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))"
+ -> "Collection(RecursivePolynomialCategory(Ring,OrderedAbelianMonoidSup(),OrderedSet())"
+"PolynomialSetCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))"
+ -> "CoercibleTo(List(RecursivePolynomialCategory(Ring,OrderedAbelianMonoidSup(),OrderedSet()))"
+
+"CoercibleTo(List(RecursivePolynomialCategory(Ring,OrderedAbelianMonoidSup(),OrderedSet()))"
+ [color=seagreen];
+"CoercibleTo(List(RecursivePolynomialCategory(Ring,OrderedAbelianMonoidSup(),OrderedSet()))"
+  -> "CoercibleTo(a:Type)"
+
+"Collection(RecursivePolynomialCategory(Ring,OrderedAbelianMonoidSup(),OrderedSet())" [color=seagreen];
+"Collection(RecursivePolynomialCategory(Ring,OrderedAbelianMonoidSup(),OrderedSet())"
+  -> "Collection(a:Type)"
+
+"Collection(a:Type)" [color=lightblue];
+"Collection(a:Type)" -> "HomogeneousAggregate(a:Type)"
+"Collection(a:Type)" -> "ConvertibleTo(InputForm)"
+
+"SetCategory()" [color=lightblue];
+"SetCategory()" -> "BasicType()"
+"SetCategory()" -> "CoercibleTo(OutputForm)"
+
+"BasicType()" [color=lightblue];
+"BasicType()" -> "Category"
+
+"CoercibleTo(OutputForm)" [color=seagreen];
+"CoercibleTo(OutputForm)" -> "CoercibleTo(a:Type)"
+
+"CoercibleTo(a:Type)" [color=lightblue];
+"CoercibleTo(a:Type)" -> "Category"
+
+"HomogeneousAggregate(a:Type)" [color=lightblue];
+"HomogeneousAggregate(a:Type)" -> "Aggregate()"
+
+"Aggregate()" [color=lightblue];
+"Aggregate()" -> "Type()"
+
+"Type()" [color=lightblue];
+"Type()" -> "Category"
+
+"ConvertibleTo(InputForm)" [color="#00EE00"];
+"ConvertibleTo(InputForm)" -> "ConvertibleTo(a:Type)"
+
+"ConvertibleTo(a:Type)" [color="#00EE00"];
+"ConvertibleTo(a:Type)" -> "Category"
+
+"Category" [color=lightblue];
+}
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \pagehead{PriorityQueueAggregate}{PRQAGG}
 \pagepic{ps/v102priorityqueueaggregate.ps}{PRQAGG}{1.00}
 
@@ -15025,8 +16236,813 @@ digraph pic {
 }
 
 @
-\chapter{Category Layer 7}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\pagehead{TriangularSetCategory}{TSETCAT}
+\pagepic{ps/v102triangularsetcategory.ps}{TSETCAT}{0.35}
+
+{\bf See:}\\
+\pagefrom{PolynomialSetCategory}{PSETCAT}
+
+{\bf Exports:}\\
+\begin{tabular}{ll}
+\cross{TSETCAT}{algebraic?} &
+\cross{TSETCAT}{algebraicVariables} \\
+\cross{TSETCAT}{any?} &
+\cross{TSETCAT}{autoReduced?} \\
+\cross{TSETCAT}{basicSet} &
+\cross{TSETCAT}{coerce} \\
+\cross{TSETCAT}{coHeight} &
+\cross{TSETCAT}{collect} \\
+\cross{TSETCAT}{collectQuasiMonic} &
+\cross{TSETCAT}{collectUnder} \\
+\cross{TSETCAT}{collectUpper} &
+\cross{TSETCAT}{construct} \\
+\cross{TSETCAT}{convert} &
+\cross{TSETCAT}{copy} \\
+\cross{TSETCAT}{count} &
+\cross{TSETCAT}{degree} \\
+\cross{TSETCAT}{empty} &
+\cross{TSETCAT}{empty?} \\
+\cross{TSETCAT}{eq?} &
+\cross{TSETCAT}{eval} \\
+\cross{TSETCAT}{every?} &
+\cross{TSETCAT}{extend} \\
+\cross{TSETCAT}{extendIfCan} &
+\cross{TSETCAT}{find} \\
+\cross{TSETCAT}{first} &
+\cross{TSETCAT}{hash} \\
+\cross{TSETCAT}{headReduce} &
+\cross{TSETCAT}{headReduced?} \\
+\cross{TSETCAT}{headRemainder} &
+\cross{TSETCAT}{infRittWu?} \\
+\cross{TSETCAT}{initiallyReduce} &
+\cross{TSETCAT}{initiallyReduced?} \\
+\cross{TSETCAT}{initials} &
+\cross{TSETCAT}{last} \\
+\cross{TSETCAT}{latex} &
+\cross{TSETCAT}{less?} \\
+\cross{TSETCAT}{mainVariable?} &
+\cross{TSETCAT}{mainVariables} \\
+\cross{TSETCAT}{map} &
+\cross{TSETCAT}{map!} \\
+\cross{TSETCAT}{member?} &
+\cross{TSETCAT}{members} \\
+\cross{TSETCAT}{more?} &
+\cross{TSETCAT}{mvar} \\
+\cross{TSETCAT}{normalized?} &
+\cross{TSETCAT}{parts} \\
+\cross{TSETCAT}{quasiComponent} &
+\cross{TSETCAT}{reduce} \\
+\cross{TSETCAT}{reduced?} &
+\cross{TSETCAT}{reduceByQuasiMonic} \\
+\cross{TSETCAT}{remainder} &
+\cross{TSETCAT}{remove} \\
+\cross{TSETCAT}{removeDuplicates} &
+\cross{TSETCAT}{removeZero} \\
+\cross{TSETCAT}{rest} &
+\cross{TSETCAT}{retract} \\
+\cross{TSETCAT}{retractIfCan} &
+\cross{TSETCAT}{rewriteIdealWithHeadRemainder} \\
+\cross{TSETCAT}{rewriteIdealWithRemainder} &
+\cross{TSETCAT}{rewriteSetWithReduction} \\
+\cross{TSETCAT}{roughBase?} &
+\cross{TSETCAT}{roughEqualIdeals?} \\
+\cross{TSETCAT}{roughSubIdeal?} &
+\cross{TSETCAT}{roughUnitIdeal?} \\
+\cross{TSETCAT}{sample} &
+\cross{TSETCAT}{select} \\
+\cross{TSETCAT}{size?} &
+\cross{TSETCAT}{sort} \\
+\cross{TSETCAT}{stronglyReduce} &
+\cross{TSETCAT}{stronglyReduced?} \\
+\cross{TSETCAT}{triangular?} &
+\cross{TSETCAT}{trivialIdeal?} \\
+\cross{TSETCAT}{variables} &
+\cross{TSETCAT}{zeroSetSplit} \\
+\cross{TSETCAT}{zeroSetSplitIntoTriangularSystems} &
+\cross{TSETCAT}{\#?} \\
+\cross{TSETCAT}{?=?} &
+\cross{TSETCAT}{?\~{}=?} \\
+\end{tabular}
+
+{\bf Attributes Exported:}
+\begin{itemize}
+\item {\bf \cross{TSETCAT}{shallowlyMutable}}
+is true if its values have immediate components that are 
+updateable (mutable). Note: the properties of any component 
+domain are irrevelant to the shallowlyMutable proper.
+\item {\bf \cross{TSETCAT}{finiteAggregate}}
+is true if it is an aggregate with a finite number of elements.
+\item {\bf nil}
+\end{itemize}
+
+These are directly exported but not implemented:
+\begin{verbatim}
+ extendIfCan : (%,P) -> Union(%,"failed")
+ zeroSetSplit : List P -> List %      
+ zeroSetSplitIntoTriangularSystems :
+   List P -> List Record(close: %,open: List P)
+\end{verbatim}
+
+These are implemented by this category:
+\begin{verbatim}
+ algebraic? : (V,%) -> Boolean
+ algebraicVariables : % -> List V     
+ autoReduced? : (%,((P,List P) -> Boolean)) -> Boolean
+ basicSet :
+   (List P,(P -> Boolean),((P,P) -> Boolean)) ->
+     Union(Record(bas: %,top: List P),"failed")
+ basicSet : (List P,((P,P) -> Boolean)) ->
+   Union(Record(bas: %,top: List P),"failed")
+ coerce : % -> List P
+ coHeight : % -> NonNegativeInteger if V has FINITE
+ collectQuasiMonic : % -> %           
+ collectUnder : (%,V) -> %
+ collectUpper : (%,V) -> %            
+ construct : List P -> %
+ convert : % -> InputForm if P has KONVERT INFORM
+ degree : % -> NonNegativeInteger
+ extend : (%,P) -> %
+ first : % -> Union(P,"failed")       
+ headReduce : (P,%) -> P              
+ headReduced? : % -> Boolean
+ headReduced? : (P,%) -> Boolean      
+ infRittWu? : (%,%) -> Boolean
+ initiallyReduce : (P,%) -> P         
+ initiallyReduced? : % -> Boolean
+ initiallyReduced? : (P,%) -> Boolean
+ initials : % -> List P               
+ last : % -> Union(P,"failed")
+ mvar : % -> V                        
+ normalized? : % -> Boolean
+ normalized? : (P,%) -> Boolean       
+ quasiComponent : % -> Record(close: List P,open: List P)
+ reduce : (P,%,((P,P) -> P),((P,P) -> Boolean)) -> P
+ reduceByQuasiMonic : (P,%) -> P
+ reduced? : (P,%,((P,P) -> Boolean)) -> Boolean
+ removeZero : (P,%) -> P              
+ rest : % -> Union(%,"failed")
+ retractIfCan : List P -> Union(%,"failed")
+ rewriteSetWithReduction :
+    (List P,%,((P,P) -> P),((P,P) -> Boolean)) -> List P
+ select : (%,V) -> Union(P,"failed")
+ stronglyReduce : (P,%) -> P          
+ stronglyReduced? : % -> Boolean
+ stronglyReduced? : (P,%) -> Boolean
+ ?=? : (%,%) -> Boolean               
+\end{verbatim}
+
+These exports come from \refto{PolynomialSetCategory}(R,E,V,P)\\
+where R:IntegralDomain, E:OrderedAbelianMonoidSup,\\
+V:OrderedSet, P:RecursivePolynomialCategory(R,E,V)): 
+\begin{verbatim}
+ any? : ((P -> Boolean),%) -> Boolean if $ has finiteAggregate
+ coerce : % -> OutputForm             
+ collect : (%,V) -> %
+ copy : % -> %                        
+ count : ((P -> Boolean),%) -> NonNegativeInteger 
+   if $ has finiteAggregate
+ count : (P,%) -> NonNegativeInteger 
+   if P has SETCAT and $ has finiteAggregate
+ empty : () -> %                      
+ empty? : % -> Boolean
+ eq? : (%,%) -> Boolean               
+ eval : (%,List Equation P) -> % if P has EVALAB P and P has SETCAT
+ eval : (%,Equation P) -> % if P has EVALAB P and P has SETCAT
+ eval : (%,P,P) -> % if P has EVALAB P and P has SETCAT
+ eval : (%,List P,List P) -> % if P has EVALAB P and P has SETCAT
+ every? : ((P -> Boolean),%) -> Boolean if $ has finiteAggregate
+ find : ((P -> Boolean),%) -> Union(P,"failed")
+ hash : % -> SingleInteger
+ headRemainder : (P,%) -> Record(num: P,den: R) if R has INTDOM
+ latex : % -> String                  
+ less? : (%,NonNegativeInteger) -> Boolean
+ mainVariable? : (V,%) -> Boolean
+ mainVariables : % -> List V          
+ map : ((P -> P),%) -> %
+ map! : ((P -> P),%) -> % if $ has shallowlyMutable
+ member? : (P,%) -> Boolean 
+   if P has SETCAT and $ has finiteAggregate
+ members : % -> List P if $ has finiteAggregate
+ more? : (%,NonNegativeInteger) -> Boolean
+ parts : % -> List P if $ has finiteAggregate
+ reduce : (((P,P) -> P),%) -> P if $ has finiteAggregate
+ reduce : (((P,P) -> P),%,P) -> P if $ has finiteAggregate
+ reduce : (((P,P) -> P),%,P,P) -> P 
+   if P has SETCAT 
+   and $ has finiteAggregate
+ remainder : (P,%) -> Record(rnum: R,polnum: P,den: R) 
+   if R has INTDOM
+ remove : ((P -> Boolean),%) -> % if $ has finiteAggregate
+ remove : (P,%) -> % if P has SETCAT and $ has finiteAggregate
+ removeDuplicates : % -> % 
+   if P has SETCAT 
+   and $ has finiteAggregate
+ retract : List P -> %                
+ rewriteIdealWithHeadRemainder : (List P,%) -> List P 
+   if R has INTDOM
+ rewriteIdealWithRemainder : (List P,%) -> List P 
+   if R has INTDOM
+ roughBase? : % -> Boolean if R has INTDOM
+ roughEqualIdeals? : (%,%) -> Boolean if R has INTDOM
+ roughSubIdeal? : (%,%) -> Boolean if R has INTDOM
+ roughUnitIdeal? : % -> Boolean if R has INTDOM
+ sample : () -> %
+ select : ((P -> Boolean),%) -> % if $ has finiteAggregate
+ size? : (%,NonNegativeInteger) -> Boolean
+ sort : (%,V) -> Record(under: %,floor: %,upper: %)
+ triangular? : % -> Boolean if R has INTDOM
+ trivialIdeal? : % -> Boolean         
+ variables : % -> List V
+ #? : % -> NonNegativeInteger if $ has finiteAggregate
+ ?~=? : (%,%) -> Boolean
+\end{verbatim}
+
+<<category TSETCAT TriangularSetCategory>>=
+)abbrev category TSETCAT TriangularSetCategory
+++ Author: Marc Moreno Maza (marc@nag.co.uk)
+++ Date Created: 04/26/1994
+++ Date Last Updated: 12/15/1998
+++ Basic Functions:
+++ Related Constructors:
+++ Also See: 
+++ AMS Classifications:
+++ Keywords: polynomial, multivariate, ordered variables set
+++ Description:
+++ The category of triangular sets of multivariate polynomials
+++ with coefficients in an integral domain.
+++ Let \axiom{R} be an integral domain and \axiom{V} a finite ordered set of 
+++ variables, say \axiom{X1 < X2 < ... < Xn}.  
+++ A set \axiom{S} of polynomials in \axiom{R[X1,X2,...,Xn]} is triangular
+++ if no elements of \axiom{S} lies in \axiom{R}, and if two distinct 
+++ elements of \axiom{S} have distinct main variables. 
+++ Note that the empty set is a triangular set. A triangular set is not
+++ necessarily a (lexicographical) Groebner basis and the notion of 
+++ reduction related to triangular sets is based on the recursive view
+++ of polynomials. We recall this notion here and refer to [1] for more 
+++ details.
+++ A polynomial \axiom{P} is reduced w.r.t a non-constant polynomial 
+++ \axiom{Q} if the degree of \axiom{P} in the main variable of \axiom{Q} 
+++ is less than the main degree of \axiom{Q}.
+++ A polynomial \axiom{P} is reduced w.r.t a triangular set \axiom{T}
+++ if it is reduced w.r.t. every polynomial of \axiom{T}. \newline
+++ References :
+++  [1] P. AUBRY, D. LAZARD and M. MORENO MAZA "On the Theories
+++      of Triangular Sets" Journal of Symbol. Comp. (to appear)
+++ Version: 4.
+
+TriangularSetCategory(R:IntegralDomain,E:OrderedAbelianMonoidSup,_
+ V:OrderedSet,P:RecursivePolynomialCategory(R,E,V)): 
+         Category == 
+   PolynomialSetCategory(R,E,V,P) with 
+     finiteAggregate
+     shallowlyMutable
+
+     infRittWu? : ($,$) -> Boolean
+       ++ \axiom{infRittWu?(ts1,ts2)} returns true iff \axiom{ts2} has 
+       ++ higher rank than \axiom{ts1} in Wu Wen Tsun sense.
+     basicSet : (List P,((P,P)->Boolean)) -> _
+      Union(Record(bas:$,top:List P),"failed")
+       ++ \axiom{basicSet(ps,redOp?)} returns \axiom{[bs,ts]} where
+       ++ \axiom{concat(bs,ts)} is \axiom{ps} and \axiom{bs}
+       ++ is a basic set in Wu Wen Tsun sense of \axiom{ps} w.r.t 
+       ++ the reduction-test \axiom{redOp?}, if no non-zero constant 
+       ++ polynomial lie in \axiom{ps}, otherwise \axiom{"failed"} is returned.
+     basicSet : (List P,(P->Boolean),((P,P)->Boolean)) -> _
+      Union(Record(bas:$,top:List P),"failed")
+       ++ \axiom{basicSet(ps,pred?,redOp?)} returns the same as 
+       ++ \axiom{basicSet(qs,redOp?)}
+       ++ where \axiom{qs} consists of the polynomials of \axiom{ps}
+       ++ satisfying property \axiom{pred?}.
+     initials : $ -> List P
+       ++ \axiom{initials(ts)} returns the list of the non-constant initials
+       ++ of the members of \axiom{ts}.
+     degree : $ -> NonNegativeInteger
+       ++ \axiom{degree(ts)} returns the product of main degrees of the 
+       ++ members of \axiom{ts}.
+     quasiComponent : $ -> Record(close:List P,open:List P)
+       ++ \axiom{quasiComponent(ts)} returns \axiom{[lp,lq]} where \axiom{lp} 
+       ++ is the list of the members of \axiom{ts} and \axiom{lq}is 
+       ++ \axiom{initials(ts)}.
+     normalized? : (P,$) -> Boolean
+       ++ \axiom{normalized?(p,ts)} returns true iff \axiom{p} and all 
+       ++ its iterated initials have degree zero w.r.t. the main variables 
+       ++ of the polynomials of \axiom{ts}
+     normalized? : $  -> Boolean
+       ++ \axiom{normalized?(ts)} returns true iff for every axiom{p} in 
+       ++ \axiom{ts} we have \axiom{normalized?(p,us)} where \axiom{us} 
+       ++ is \axiom{collectUnder(ts,mvar(p))}.
+     reduced? : (P,$,((P,P) -> Boolean)) -> Boolean
+       ++ \axiom{reduced?(p,ts,redOp?)} returns true iff \axiom{p} is reduced 
+       ++ w.r.t.in the sense of the operation \axiom{redOp?}, that is if for 
+       ++ every \axiom{t} in \axiom{ts} \axiom{redOp?(p,t)} holds.
+     stronglyReduced? : (P,$) -> Boolean
+       ++ \axiom{stronglyReduced?(p,ts)} returns true iff \axiom{p} 
+       ++ is reduced w.r.t. \axiom{ts}.
+     headReduced? : (P,$) -> Boolean
+       ++ \axiom{headReduced?(p,ts)} returns true iff the head of \axiom{p} is 
+       ++ reduced w.r.t. \axiom{ts}.
+     initiallyReduced? : (P,$) -> Boolean
+       ++ \axiom{initiallyReduced?(p,ts)} returns true iff \axiom{p} and all 
+       ++ its iterated initials are reduced w.r.t. to the elements of 
+       ++ \axiom{ts} with the same main variable.
+     autoReduced? : ($,((P,List(P)) -> Boolean)) -> Boolean
+       ++ \axiom{autoReduced?(ts,redOp?)} returns true iff every element of 
+       ++ \axiom{ts} is reduced w.r.t to every other in the sense of 
+       ++ \axiom{redOp?}
+     stronglyReduced? : $ -> Boolean
+       ++ \axiom{stronglyReduced?(ts)} returns true iff every element of 
+       ++ \axiom{ts} is reduced w.r.t to any other element of \axiom{ts}.
+     headReduced? : $ -> Boolean
+       ++ headReduced?(ts) returns true iff the head of every element of 
+       ++ \axiom{ts} is reduced w.r.t to any other element of \axiom{ts}.
+     initiallyReduced? : $ -> Boolean
+       ++ initiallyReduced?(ts) returns true iff for every element \axiom{p} 
+       ++ of \axiom{ts}. \axiom{p} and all its iterated initials are reduced 
+       ++ w.r.t. to the other elements of \axiom{ts} with the same main 
+       ++ variable.
+     reduce : (P,$,((P,P) -> P),((P,P) -> Boolean) ) -> P
+       ++ \axiom{reduce(p,ts,redOp,redOp?)} returns a polynomial \axiom{r}  
+       ++ such that \axiom{redOp?(r,p)} holds for every \axiom{p} of 
+       ++ \axiom{ts} and there exists some product \axiom{h} of the initials 
+       ++ of the members of \axiom{ts} such that \axiom{h*p - r} lies in the 
+       ++ ideal generated by \axiom{ts}. The operation \axiom{redOp} must 
+       ++ satisfy the following conditions. For every \axiom{p} and \axiom{q} 
+       ++ we have  \axiom{redOp?(redOp(p,q),q)} and there exists an integer 
+       ++ \axiom{e} and a polynomial \axiom{f} such that 
+       ++ \axiom{init(q)^e*p = f*q + redOp(p,q)}. 
+     rewriteSetWithReduction : (List P,$,((P,P) -> P),((P,P) -> Boolean) ) ->_
+      List P
+       ++ \axiom{rewriteSetWithReduction(lp,ts,redOp,redOp?)} returns a list 
+       ++ \axiom{lq} of polynomials such that 
+       ++ \axiom{[reduce(p,ts,redOp,redOp?) for p in lp]} and \axiom{lp} 
+       ++ have the same zeros inside the regular zero set of \axiom{ts}. 
+       ++ Moreover, for every polynomial \axiom{q} in \axiom{lq} and every 
+       ++ polynomial \axiom{t} in \axiom{ts}
+       ++ \axiom{redOp?(q,t)} holds and there exists a polynomial \axiom{p}
+       ++ in the ideal generated by \axiom{lp} and a product \axiom{h} of 
+       ++ \axiom{initials(ts)} such that \axiom{h*p - r} lies in the ideal 
+       ++ generated by \axiom{ts}. 
+       ++ The operation \axiom{redOp} must satisfy the following conditions.
+       ++ For every \axiom{p} and \axiom{q} we have 
+       ++ \axiom{redOp?(redOp(p,q),q)}
+       ++ and there exists an integer \axiom{e} and a polynomial \axiom{f}
+       ++ such that \axiom{init(q)^e*p = f*q + redOp(p,q)}.
+     stronglyReduce : (P,$) -> P
+       ++ \axiom{stronglyReduce(p,ts)} returns a polynomial \axiom{r} such that
+       ++ \axiom{stronglyReduced?(r,ts)} holds and there exists some product 
+       ++ \axiom{h} of \axiom{initials(ts)}
+       ++ such that \axiom{h*p - r} lies in the ideal generated by \axiom{ts}.
+     headReduce : (P,$) -> P
+       ++ \axiom{headReduce(p,ts)} returns a polynomial \axiom{r}  such that 
+       ++ \axiom{headReduce?(r,ts)} holds and there exists some product 
+       ++ \axiom{h} of \axiom{initials(ts)} such that \axiom{h*p - r} lies 
+       ++ in the ideal generated by \axiom{ts}.
+     initiallyReduce : (P,$) -> P
+       ++ \axiom{initiallyReduce(p,ts)} returns a polynomial \axiom{r}  
+       ++ such that  \axiom{initiallyReduced?(r,ts)}
+       ++ holds and there exists some product \axiom{h} of \axiom{initials(ts)}
+       ++ such that \axiom{h*p - r} lies in the ideal generated by \axiom{ts}.
+     removeZero: (P, $) -> P
+       ++ \axiom{removeZero(p,ts)} returns \axiom{0} if \axiom{p} reduces
+       ++ to \axiom{0} by pseudo-division w.r.t \axiom{ts} otherwise
+       ++ returns a polynomial \axiom{q} computed from \axiom{p}
+       ++ by removing any coefficient in \axiom{p} reducing to \axiom{0}.
+     collectQuasiMonic: $ -> $
+       ++ \axiom{collectQuasiMonic(ts)} returns the subset of \axiom{ts}
+       ++ consisting of the polynomials with initial in \axiom{R}.
+     reduceByQuasiMonic: (P, $) -> P
+       ++ \axiom{reduceByQuasiMonic(p,ts)} returns the same as
+       ++ \axiom{remainder(p,collectQuasiMonic(ts)).polnum}.
+     zeroSetSplit : List P -> List $
+       ++ \axiom{zeroSetSplit(lp)} returns a list \axiom{lts} of triangular 
+       ++ sets such that the zero set of \axiom{lp} is the union of the 
+       ++ closures of the regular zero sets  of the members of \axiom{lts}.
+     zeroSetSplitIntoTriangularSystems : List P -> _
+      List Record(close:$,open:List P)
+       ++ \axiom{zeroSetSplitIntoTriangularSystems(lp)} returns a list of 
+       ++ triangular systems \axiom{[[ts1,qs1],...,[tsn,qsn]]} such that the 
+       ++ zero set of \axiom{lp} is the union of the closures of the 
+       ++ \axiom{W_i} where \axiom{W_i} consists of the zeros of \axiom{ts} 
+       ++ which do not cancel any polynomial in \axiom{qsi}.
+     first : $ -> Union(P,"failed")
+       ++ \axiom{first(ts)} returns the polynomial of \axiom{ts} with 
+       ++ greatest main variable if \axiom{ts} is not empty, otherwise 
+       ++ returns \axiom{"failed"}.
+     last : $ -> Union(P,"failed")
+       ++ \axiom{last(ts)} returns the polynomial of \axiom{ts} with 
+       ++ smallest main variable if \axiom{ts} is not empty, otherwise 
+       ++ returns \axiom{"failed"}.
+     rest : $ -> Union($,"failed")
+       ++ \axiom{rest(ts)} returns the polynomials of \axiom{ts} with smaller 
+       ++ main variable than \axiom{mvar(ts)} if \axiom{ts} is not empty, 
+       ++ otherwise returns "failed"
+     algebraicVariables : $ -> List(V)
+       ++ \axiom{algebraicVariables(ts)} returns the decreasingly sorted 
+       ++ list of the main variables of the polynomials of \axiom{ts}.
+     algebraic? : (V,$) -> Boolean
+       ++ \axiom{algebraic?(v,ts)} returns true iff \axiom{v} is the 
+       ++ main variable of some polynomial in \axiom{ts}.
+     select : ($,V) -> Union(P,"failed")
+       ++ \axiom{select(ts,v)} returns the polynomial of \axiom{ts} with 
+       ++ \axiom{v} as main variable, if any.
+     extendIfCan : ($,P) -> Union($,"failed")
+       ++ \axiom{extendIfCan(ts,p)} returns a triangular set which encodes 
+       ++ the simple extension by \axiom{p} of the extension of the base 
+       ++ field defined by \axiom{ts}, according
+       ++ to the properties of triangular sets of the current domain.
+       ++ If the required properties do not hold then "failed" is returned.
+       ++ This operation encodes in some sense the properties of the
+       ++ triangular sets of the current category. Is is used to implement
+       ++ the \axiom{construct} operation to guarantee that every triangular
+       ++ set build from a list of polynomials has the required properties.
+     extend : ($,P) -> $
+       ++ \axiom{extend(ts,p)} returns a triangular set which encodes the 
+       ++ simple extension by \axiom{p} of the extension of the base field 
+       ++ defined by \axiom{ts}, according to the properties of triangular 
+       ++ sets of the current category. If the required properties do not 
+       ++ hold an error is returned.
+     if V has Finite
+     then
+       coHeight : $ -> NonNegativeInteger
+         ++ \axiom{coHeight(ts)} returns \axiom{size()\$V} minus \axiom{\#ts}.
+  add
+     
+     GPS ==> GeneralPolynomialSet(R,E,V,P)
+     B ==> Boolean
+     RBT ==> Record(bas:$,top:List P)
+
+     ts:$ = us:$ ==
+       empty?(ts)$$ => empty?(us)$$
+       empty?(us)$$ => false
+       first(ts)::P =$P first(us)::P => rest(ts)::$ =$$ rest(us)::$
+       false
+
+     infRittWu?(ts,us) ==
+       empty?(us)$$ => not empty?(ts)$$
+       empty?(ts)$$ => false
+       p : P := (last(ts))::P
+       q : P := (last(us))::P
+       infRittWu?(p,q)$P => true
+       supRittWu?(p,q)$P => false
+       v : V := mvar(p)
+       infRittWu?(collectUpper(ts,v),collectUpper(us,v))$$
+
+     reduced?(p,ts,redOp?) ==
+       lp : List P := members(ts)
+       while (not empty? lp) and (redOp?(p,first(lp))) repeat
+         lp := rest lp
+       empty? lp 
+
+     basicSet(ps,redOp?) ==
+       ps := remove(zero?,ps)
+       any?(ground?,ps) => "failed"::Union(RBT,"failed")
+       ps := sort(infRittWu?,ps)
+       p,b : P
+       bs := empty()$$
+       ts : List P := []
+       while not empty? ps repeat
+         b := first(ps)
+         bs := extend(bs,b)$$
+         ps := rest ps
+         while (not empty? ps) and _
+               (not reduced?((p := first(ps)),bs,redOp?)) repeat
+           ts := cons(p,ts)
+           ps := rest ps
+       ([bs,ts]$RBT)::Union(RBT,"failed")
+
+     basicSet(ps,pred?,redOp?) ==
+       ps := remove(zero?,ps)
+       any?(ground?,ps) => "failed"::Union(RBT,"failed")
+       gps : List P := []
+       bps : List P := []
+       while not empty? ps repeat
+         p := first ps
+         ps := rest ps  
+         if pred?(p)
+           then
+             gps := cons(p,gps)
+           else
+             bps := cons(p,bps)
+       gps := sort(infRittWu?,gps)
+       p,b : P
+       bs := empty()$$
+       ts : List P := []
+       while not empty? gps repeat
+         b := first(gps)
+         bs := extend(bs,b)$$
+         gps := rest gps
+         while (not empty? gps) and _
+               (not reduced?((p := first(gps)),bs,redOp?)) repeat
+           ts := cons(p,ts)
+           gps := rest gps
+       ts := sort(infRittWu?,concat(ts,bps))
+       ([bs,ts]$RBT)::Union(RBT,"failed")
+
+     initials ts ==
+       lip : List P := []
+       empty? ts => lip
+       lp := members(ts)
+       while not empty? lp repeat
+          p := first(lp)
+          if not ground?((ip := init(p)))
+            then
+              lip := cons(primPartElseUnitCanonical(ip),lip)
+          lp := rest lp
+       removeDuplicates lip
+
+     degree ts ==
+       empty? ts => 0$NonNegativeInteger
+       lp := members ts
+       d : NonNegativeInteger := mdeg(first lp)
+       while not empty? (lp := rest lp) repeat
+         d := d * mdeg(first lp)
+       d
+
+     quasiComponent ts == 
+       [members(ts),initials(ts)]
+
+     normalized?(p,ts) ==
+       normalized?(p,members(ts))$P
+
+     stronglyReduced? (p,ts) ==
+       reduced?(p,members(ts))$P
+
+     headReduced? (p,ts) ==
+       stronglyReduced?(head(p),ts)
+
+     initiallyReduced? (p,ts) ==
+       lp : List (P) := members(ts)
+       red : Boolean := true
+       while (not empty? lp) and (not ground?(p)$P) and red repeat
+         while (not empty? lp) and (mvar(first(lp)) > mvar(p)) repeat 
+           lp := rest lp
+         if (not empty? lp) 
+           then
+             if  (mvar(first(lp)) = mvar(p))
+               then
+                 if reduced?(p,first(lp))
+                   then
+                     lp := rest lp
+                     p := init(p)
+                   else
+                     red := false
+               else
+                 p := init(p)
+       red
+
+     reduce(p,ts,redOp,redOp?) ==
+       (empty? ts) or (ground? p) => p
+       ts0 := ts
+       while (not empty? ts) and (not ground? p) repeat
+          reductor := (first ts)::P
+          ts := (rest ts)::$
+          if not redOp?(p,reductor) 
+            then 
+              p := redOp(p,reductor)
+              ts := ts0
+       p
+
+     rewriteSetWithReduction(lp,ts,redOp,redOp?) ==
+       trivialIdeal? ts => lp
+       lp := remove(zero?,lp)
+       empty? lp => lp
+       any?(ground?,lp) => [1$P]
+       rs : List P := []
+       while not empty? lp repeat
+         p := first lp
+         lp := rest lp
+         p := primPartElseUnitCanonical reduce(p,ts,redOp,redOp?)
+         if not zero? p
+           then 
+             if ground? p
+               then
+                 lp := []
+                 rs := [1$P]
+               else
+                 rs := cons(p,rs)
+       removeDuplicates rs
+
+     stronglyReduce(p,ts) ==
+       reduce (p,ts,lazyPrem,reduced?)
+
+     headReduce(p,ts) ==
+       reduce (p,ts,headReduce,headReduced?)
+
+     initiallyReduce(p,ts) ==
+       reduce (p,ts,initiallyReduce,initiallyReduced?)
+
+     removeZero(p,ts) ==
+       (ground? p) or (empty? ts) => p
+       v := mvar(p)
+       ts_v_- := collectUnder(ts,v)
+       if algebraic?(v,ts) 
+         then
+           q := lazyPrem(p,select(ts,v)::P)
+           zero? q => return q
+           zero? removeZero(q,ts_v_-) => return 0
+       empty? ts_v_- => p
+       q: P := 0
+       while positive? degree(p,v) repeat
+          q := removeZero(init(p),ts_v_-) * mainMonomial(p) + q
+          p := tail(p)
+       q + removeZero(p,ts_v_-)
+
+     reduceByQuasiMonic(p, ts) ==
+       (ground? p) or (empty? ts) => p
+       remainder(p,collectQuasiMonic(ts)).polnum
+
+     autoReduced?(ts : $,redOp? : ((P,List(P)) -> Boolean)) ==        
+       empty? ts => true
+       lp : List (P) := members(ts)
+       p : P := first(lp)
+       lp := rest lp
+       while (not empty? lp) and redOp?(p,lp) repeat
+          p := first lp
+          lp := rest lp
+       empty? lp
+
+     stronglyReduced? ts ==
+       autoReduced? (ts, reduced?)
+
+     normalized? ts ==
+       autoReduced? (ts,normalized?)
+
+     headReduced? ts ==
+       autoReduced? (ts,headReduced?)
+
+     initiallyReduced?  ts ==
+       autoReduced? (ts,initiallyReduced?)
+         
+     mvar ts ==
+       empty? ts => error"Error from TSETCAT in mvar : #1 is empty"
+       mvar((first(ts))::P)$P
+
+     first ts ==
+       empty? ts => "failed"::Union(P,"failed")
+       lp : List(P) := sort(supRittWu?,members(ts))$(List P)
+       first(lp)::Union(P,"failed")
+
+     last ts ==
+       empty? ts => "failed"::Union(P,"failed")
+       lp : List(P) := sort(infRittWu?,members(ts))$(List P)
+       first(lp)::Union(P,"failed")
+
+     rest ts ==
+       empty? ts => "failed"::Union($,"failed")
+       lp : List(P) := sort(supRittWu?,members(ts))$(List P)
+       construct(rest(lp))::Union($,"failed")
+
+     coerce (ts:$) : List(P) == 
+       sort(supRittWu?,members(ts))$(List P)
+
+     algebraicVariables ts ==
+       [mvar(p) for p in members(ts)]
+
+     algebraic? (v,ts) ==
+       member?(v,algebraicVariables(ts))
+
+     select  (ts,v) ==
+       lp : List (P) := sort(supRittWu?,members(ts))$(List P)
+       while (not empty? lp) and (not (v = mvar(first lp))) repeat
+         lp := rest lp
+       empty? lp => "failed"::Union(P,"failed")
+       (first lp)::Union(P,"failed")
+
+     collectQuasiMonic ts ==
+       lp: List(P) := members(ts)
+       newlp: List(P) := []
+       while (not empty? lp) repeat
+         if ground? init(first(lp)) then newlp := cons(first(lp),newlp)
+         lp := rest lp
+       construct(newlp)
+
+     collectUnder (ts,v) ==
+       lp : List (P) := sort(supRittWu?,members(ts))$(List P)
+       while (not empty? lp) and (not (v > mvar(first lp))) repeat
+         lp := rest lp       
+       construct(lp)
+
+     collectUpper  (ts,v) ==
+       lp1 : List(P) := sort(supRittWu?,members(ts))$(List P)
+       lp2 : List(P) := []
+       while (not empty? lp1) and  (mvar(first lp1) > v) repeat
+         lp2 := cons(first(lp1),lp2)
+         lp1 := rest lp1
+       construct(reverse lp2)
+
+     construct(lp:List(P)) ==
+       rif := retractIfCan(lp)@Union($,"failed")
+       not (rif case $) => error"in construct : LP -> $ from TSETCAT : bad arg"
+       rif::$
+
+     retractIfCan(lp:List(P)) ==
+       empty? lp => (empty()$$)::Union($,"failed")
+       lp := sort(supRittWu?,lp)
+       rif := retractIfCan(rest(lp))@Union($,"failed")
+       not (rif case $) => _
+        error "in retractIfCan : LP -> ... from TSETCAT : bad arg"
+       extendIfCan(rif::$,first(lp))@Union($,"failed")
+
+     extend(ts:$,p:P):$ ==
+       eif := extendIfCan(ts,p)@Union($,"failed")
+       not (eif case $) => error"in extend : ($,P) -> $ from TSETCAT : bad ars"
+       eif::$
+
+     if V has Finite
+     then
+        
+       coHeight ts ==
+         n := size()$V
+         m := #(members ts)
+         subtractIfCan(n,m)$NonNegativeInteger::NonNegativeInteger
+
+@
+<<TSETCAT.dotabb>>=
+"TSETCAT"
+ [color=lightblue,href="bookvol10.2.pdf#nameddest=TSETCAT"];
+"TSETCAT" -> "PSETCAT"
+
+@
+<<TSETCAT.dotfull>>=
+"TriangularSetCategory(a:IntegralDomain,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))"
+ [color=lightblue,href="bookvol10.2.pdf#nameddest=TSETCAT"];
+"TriangularSetCategory(a:IntegralDomain,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))"
+  -> "PolynomialSetCategory(a:IntegralDomain,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))"
+
+@
+<<TSETCAT.dotpic>>=
+digraph pic {
+ fontsize=10;
+ bgcolor="#FFFF66";
+ node [shape=box, color=white, style=filled];
+
+"TriangularSetCategory(a:IntegralDomain,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))"
+ [color=lightblue];
+"TriangularSetCategory(a:IntegralDomain,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))"
+  -> "PolynomialSetCategory(a:IntegralDomain,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))"
+
+"PolynomialSetCategory(a:IntegralDomain,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))" 
+ [color=seagreen];
+"PolynomialSetCategory(a:IntegralDomain,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))" 
+  -> "PolynomialSetCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))"
+
+"PolynomialSetCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))"
+ [color=lightblue];
+"PolynomialSetCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))"
+ -> "SetCategory()"
+"PolynomialSetCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))"
+ -> "Collection(RecursivePolynomialCategory(Ring,OrderedAbelianMonoidSup(),OrderedSet())"
+"PolynomialSetCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))"
+ -> "CoercibleTo(List(RecursivePolynomialCategory(Ring,OrderedAbelianMonoidSup(),OrderedSet()))"
+
+"CoercibleTo(List(RecursivePolynomialCategory(Ring,OrderedAbelianMonoidSup(),OrderedSet()))"
+ [color=seagreen];
+"CoercibleTo(List(RecursivePolynomialCategory(Ring,OrderedAbelianMonoidSup(),OrderedSet()))"
+  -> "CoercibleTo(a:Type)"
+
+"Collection(RecursivePolynomialCategory(Ring,OrderedAbelianMonoidSup(),OrderedSet())" [color=seagreen];
+"Collection(RecursivePolynomialCategory(Ring,OrderedAbelianMonoidSup(),OrderedSet())"
+  -> "Collection(a:Type)"
+
+"Collection(a:Type)" [color=lightblue];
+"Collection(a:Type)" -> "HomogeneousAggregate(a:Type)"
+"Collection(a:Type)" -> "ConvertibleTo(InputForm)"
+
+"SetCategory()" [color=lightblue];
+"SetCategory()" -> "BasicType()"
+"SetCategory()" -> "CoercibleTo(OutputForm)"
+
+"BasicType()" [color=lightblue];
+"BasicType()" -> "Category"
+
+"CoercibleTo(OutputForm)" [color=seagreen];
+"CoercibleTo(OutputForm)" -> "CoercibleTo(a:Type)"
+
+"CoercibleTo(a:Type)" [color=lightblue];
+"CoercibleTo(a:Type)" -> "Category"
+
+"HomogeneousAggregate(a:Type)" [color=lightblue];
+"HomogeneousAggregate(a:Type)" -> "Aggregate()"
+
+"Aggregate()" [color=lightblue];
+"Aggregate()" -> "Type()"
+
+"Type()" [color=lightblue];
+"Type()" -> "Category"
+
+"ConvertibleTo(InputForm)" [color="#00EE00"];
+"ConvertibleTo(InputForm)" -> "ConvertibleTo(a:Type)"
+
+"ConvertibleTo(a:Type)" [color="#00EE00"];
+"ConvertibleTo(a:Type)" -> "Category"
+
+"Category" [color=lightblue];
+}
+
+@
+\chapter{Category Layer 7}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \pagehead{FiniteDivisorCategory}{FDIVCAT}
 \pagepic{ps/v102finitedivisorcategory.ps}{FDIVCAT}{0.75}
 
@@ -17650,6 +19666,7 @@ digraph pic {
 {\bf See:}\\
 \pageto{BitAggregate}{BTAGG}
 \pageto{StringAggregate}{SRAGG}
+\pageto{VectorCategory}{VECTCAT}
 \pagefrom{FiniteLinearAggregate}{FLAGG}
 
 {\bf Exports:}\\
@@ -19877,6 +21894,7 @@ digraph pic {
 {\bf See:}\\
 \pageto{AbelianMonoidRing}{AMR}
 \pageto{CommutativeRing}{COMRING}
+\pageto{DirectProductCategory}{DIRPCAT}
 \pageto{EntireRing}{ENTIRER}
 \pageto{FreeModuleCat}{FMCAT}
 \pageto{Module}{MODULE}
@@ -20658,6 +22676,7 @@ digraph pic {
 \pagepic{ps/v102orderedabelianmonoidsup.ps}{OAMONS}{0.80}
 
 {\bf See:}\\
+\pagefrom{DirectProductCategory}{DIRPCAT}
 \pagefrom{OrderedCancellationAbelianMonoid}{OCAMON}
 
 {\bf Exports:}\\
@@ -21620,8 +23639,8 @@ digraph pic {
 
 {\bf Attributes exported:}
 \begin{itemize}
-\item if \$ has CommutativeRing then commutative("*") where
-{\bf \cross{AMR}{commutative("*")}}
+\item if \$ has CommutativeRing then commutative(``*'') where
+{\bf \cross{AMR}{commutative(``*'')}}
 is true if it has an operation $"*": (D,D) -> D$
 which is commutative.
 \item if \$ has IntegralDomain then noZeroDivisors where
@@ -22018,6 +24037,7 @@ digraph pic {
 {\bf See:}\\
 \pageto{FiniteRankAlgebra}{FINRALG}
 \pageto{FunctionSpace}{FS}
+\pageto{PAdicIntegerCategory}{PADICCT}
 \pageto{QuotientFieldCategory}{QFCAT}
 \pageto{RealNumberSystem}{RNS}
 \pagefrom{Ring}{RING}
@@ -22160,7 +24180,6 @@ digraph pic {
 \pageto{IntegralDomain}{INTDOM}
 \pageto{FunctionSpace}{FS}
 \pageto{MonogenicAlgebra}{MONOGEN}
-\pageto{PolynomialCategory}{POLYCAT}
 \pageto{UnivariatePolynomialCategory}{UPOLYC}
 \pagefrom{BiModule}{BMODULE}
 \pagefrom{Ring}{RING}
@@ -22190,7 +24209,7 @@ digraph pic {
 
 {\bf Attributes exported:}
 \begin{itemize}
-\item {\bf \cross{COMRING}{commutative("*")}}
+\item {\bf \cross{COMRING}{commutative(``*'')}}
 is true if it has an operation $"*": (D,D) -> D$
 which is commutative.
 \item {\bf \cross{COMRING}{unitsKnown}}
@@ -23187,6 +25206,7 @@ digraph pic {
 \pagepic{ps/v102orderedring.ps}{ORDRING}{0.75}
 
 {\bf See:}\\
+\pageto{DirectProductCategory}{DIRPCAT}
 \pageto{OrderedIntegralDomain}{OINTDOM}
 \pageto{RealNumberSystem}{RNS}
 \pagefrom{Monoid}{MONOID}
@@ -23281,13 +25301,6 @@ These exports come from \refto{Ring}():
  ?^? : (%,PositiveInteger) -> %       
 \end{verbatim}
 
-TPDHERE: Note that none of the exports of Monoid are needed.
-Perhaps this can be eliminated.
-
-These exports come from \refto{Monoid}();
-\begin{verbatim}
-\end{verbatim}
-
 <<category ORDRING OrderedRing>>=
 )abbrev category ORDRING OrderedRing
 ++ Author:
@@ -23677,8 +25690,8 @@ is true if $x * 1 = x$ for all x.
 \item if \#1 has IntegralDomain then noZeroDivisors where
 {\bf \cross{PSCAT}{noZeroDivisors}}
 is true if $x * y \ne 0$ implies both x and y are non-zero.
-\item if \#1 has CommutativeRing then commutative("*") where
-{\bf \cross{PSCAT}{commutative("*")}}
+\item if \#1 has CommutativeRing then commutative(``*'') where
+{\bf \cross{PSCAT}{commutative(``*'')}}
 is true if it has an operation $"*": (D,D) -> D$
 which is commutative.
 \end{itemize}
@@ -24073,6 +26086,7 @@ digraph pic {
 
 {\bf See:}\\
 \pageto{DifferentialPolynomialCategory}{DPOLCAT}
+\pageto{DirectProductCategory}{DIRPCAT}
 \pageto{QuotientFieldCategory}{QFCAT}
 \pageto{UnivariatePolynomialCategory}{UPOLYC}
 \pagefrom{PartialDifferentialRing}{PDRING}
@@ -24350,8 +26364,8 @@ digraph pic {
 
 {\bf Attributes exported:}
 \begin{itemize}
-\item if \$ has CommutativeRing then commutative("*") where
-{\bf \cross{FAMR}{commutative("*")}}
+\item if \$ has CommutativeRing then commutative(``*'') where
+{\bf \cross{FAMR}{commutative(``*'')}}
 is true if it has an operation $"*": (D,D) -> D$
 which is commutative.
 \item if \$ has IntegralDomain then noZeroDivisors where
@@ -24668,6 +26682,7 @@ digraph pic {
 \pagepic{ps/v102fullylinearlyexplicitringover.ps}{FLINEXP}{1.00}
 
 {\bf See:}\\
+\pageto{DirectProductCategory}{DIRPCAT}
 \pageto{FunctionSpace}{FS}
 \pageto{MonogenicAlgebra}{MONOGEN}
 \pageto{PolynomialCategory}{POLYCAT}
@@ -25071,8 +27086,8 @@ digraph pic {
 
 {\bf Attributes Exported:}
 \begin{itemize}
-\item if \$ has CommutativeRing then commutative("*") where
-{\bf \cross{MTSCAT}{commutative("*")}}
+\item if \$ has CommutativeRing then commutative(``*'') where
+{\bf \cross{MTSCAT}{commutative(``*'')}}
 is true if it has an operation $"*": (D,D) -> D$
 which is commutative.
 \item if \$ has IntegralDomain then noZeroDivisors where
@@ -25410,8 +27425,8 @@ is true if $x * 1 = x$ for all x.
 \item if \#1 has IntegralDomain then noZeroDivisors where
 {\bf \cross{UPSCAT}{noZeroDivisors}}
 is true if $x * y \ne 0$ implies both x and y are non-zero.
-\item if \#1 has CommutativeRing then commutative("*") where
-{\bf \cross{UPSCAT}{commutative("*")}}
+\item if \#1 has CommutativeRing then commutative(``*'') where
+{\bf \cross{UPSCAT}{commutative(``*'')}}
 is true if it has an operation $"*": (D,D) -> D$
 which is commutative.
 \end{itemize}
@@ -25739,6 +27754,341 @@ digraph pic {
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\pagehead{VectorCategory}{VECTCAT}
+\pagepic{ps/v102vectorcategory.ps}{VECTCAT}{1.00}
+
+{\bf See:}\\
+\pagefrom{OneDimensionalArrayAggregate}{A1AGG}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\cross{VECTCAT}{any?} &
+\cross{VECTCAT}{coerce} &
+\cross{VECTCAT}{concat} &
+\cross{VECTCAT}{construct} &
+\cross{VECTCAT}{convert} \\
+\cross{VECTCAT}{copy} &
+\cross{VECTCAT}{copyInto!} &
+\cross{VECTCAT}{count} &
+\cross{VECTCAT}{cross} &
+\cross{VECTCAT}{delete} \\
+\cross{VECTCAT}{dot} &
+\cross{VECTCAT}{entry?} &
+\cross{VECTCAT}{elt} &
+\cross{VECTCAT}{empty} &
+\cross{VECTCAT}{empty?} \\
+\cross{VECTCAT}{entries} &
+\cross{VECTCAT}{eq?} &
+\cross{VECTCAT}{eval} &
+\cross{VECTCAT}{every?} &
+\cross{VECTCAT}{fill!} \\
+\cross{VECTCAT}{find} &
+\cross{VECTCAT}{first} &
+\cross{VECTCAT}{hash} &
+\cross{VECTCAT}{index?} &
+\cross{VECTCAT}{indices} \\
+\cross{VECTCAT}{insert} &
+\cross{VECTCAT}{latex} &
+\cross{VECTCAT}{length} &
+\cross{VECTCAT}{less?} &
+\cross{VECTCAT}{magnitude} \\
+\cross{VECTCAT}{map} &
+\cross{VECTCAT}{map!} &
+\cross{VECTCAT}{max} &
+\cross{VECTCAT}{maxIndex} &
+\cross{VECTCAT}{member?} \\
+\cross{VECTCAT}{members} &
+\cross{VECTCAT}{merge} &
+\cross{VECTCAT}{min} &
+\cross{VECTCAT}{minIndex} &
+\cross{VECTCAT}{more?} \\
+\cross{VECTCAT}{new} &
+\cross{VECTCAT}{outerProduct} &
+\cross{VECTCAT}{parts} &
+\cross{VECTCAT}{position} &
+\cross{VECTCAT}{qelt} \\
+\cross{VECTCAT}{qsetelt!} &
+\cross{VECTCAT}{reduce} &
+\cross{VECTCAT}{remove} &
+\cross{VECTCAT}{removeDuplicates} &
+\cross{VECTCAT}{reverse} \\
+\cross{VECTCAT}{reverse!} &
+\cross{VECTCAT}{sample} &
+\cross{VECTCAT}{select} &
+\cross{VECTCAT}{setelt} &
+\cross{VECTCAT}{size?} \\
+\cross{VECTCAT}{sort} &
+\cross{VECTCAT}{sort!} &
+\cross{VECTCAT}{sorted?} &
+\cross{VECTCAT}{swap!} &
+\cross{VECTCAT}{zero} \\
+\cross{VECTCAT}{\#?} &
+\cross{VECTCAT}{?*?} &
+\cross{VECTCAT}{?+?} &
+\cross{VECTCAT}{?-?} &
+\cross{VECTCAT}{?$<$?} \\
+\cross{VECTCAT}{?$<=$?} &
+\cross{VECTCAT}{?=?} &
+\cross{VECTCAT}{?$>$?} &
+\cross{VECTCAT}{?$>=$?} &
+\cross{VECTCAT}{-?} \\
+\cross{VECTCAT}{?.?} &
+\cross{VECTCAT}{?\~{}=?} &&&
+\end{tabular}
+
+{\bf Attributes Exported:}
+\begin{itemize}
+\item {\bf \cross{VECTCAT}{shallowlyMutable}}
+is true if its values have immediate components that are 
+updateable (mutable). Note: the properties of any component 
+domain are irrevelant to the shallowlyMutable proper.
+\item {\bf \cross{VECTCAT}{finiteAggregate}}
+is true if it is an aggregate with a finite number of elements.
+\end{itemize}
+
+These are implemented by this category:
+\begin{verbatim}
+ cross : (%,%) -> % if R has RING
+ dot : (%,%) -> R if R has RING
+ length : % -> R if R has RING and R has RADCAT
+ magnitude : % -> R if R has RING and R has RADCAT
+ outerProduct : (%,%) -> Matrix R if R has RING
+ zero : NonNegativeInteger -> % if R has ABELMON
+ ?*? : (Integer,%) -> % if R has ABELGRP
+ ?*? : (%,R) -> % if R has MONOID
+ ?*? : (R,%) -> % if R has MONOID
+ ?-? : (%,%) -> % if R has ABELGRP
+ -? : % -> % if R has ABELGRP         
+ ?+? : (%,%) -> % if R has ABELSG
+\end{verbatim}
+
+These exports come from \refto{OneDimensionalArrayAggregate}(R:Type):
+\begin{verbatim}
+ any? : ((R -> Boolean),%) -> Boolean if $ has finiteAggregate
+ coerce : % -> OutputForm if R has SETCAT
+ concat : (R,%) -> %
+ concat : (%,R) -> %                  
+ concat : List % -> %
+ concat : (%,%) -> %                  
+ construct : List R -> %
+ convert : % -> InputForm if R has KONVERT INFORM
+ copy : % -> %                        
+ copyInto! : (%,%,Integer) -> % if $ has shallowlyMutable
+ count : ((R -> Boolean),%) -> NonNegativeInteger if $ has finiteAggregate
+ count : (R,%) -> NonNegativeInteger if R has SETCAT and $ has finiteAggregate
+ delete : (%,Integer) -> %
+ delete : (%,UniversalSegment Integer) -> %
+ elt : (%,Integer,R) -> R
+ empty : () -> %                      
+ empty? : % -> Boolean
+ entries : % -> List R                
+ entry? : (R,%) -> Boolean if $ has finiteAggregate and R has SETCAT
+ eq? : (%,%) -> Boolean
+ eval : (%,List R,List R) -> % if R has EVALAB R and R has SETCAT
+ eval : (%,R,R) -> % if R has EVALAB R and R has SETCAT
+ eval : (%,Equation R) -> % if R has EVALAB R and R has SETCAT
+ eval : (%,List Equation R) -> % if R has EVALAB R and R has SETCAT
+ every? : ((R -> Boolean),%) -> Boolean if $ has finiteAggregate
+ fill! : (%,R) -> % if $ has shallowlyMutable
+ find : ((R -> Boolean),%) -> Union(R,"failed")
+ first : % -> R if Integer has ORDSET
+ hash : % -> SingleInteger if R has SETCAT
+ index? : (Integer,%) -> Boolean      
+ indices : % -> List Integer
+ insert : (%,%,Integer) -> %          
+ insert : (R,%,Integer) -> %
+ latex : % -> String if R has SETCAT
+ less? : (%,NonNegativeInteger) -> Boolean
+ map : ((R -> R),%) -> %
+ map : (((R,R) -> R),%,%) -> %        
+ map! : ((R -> R),%) -> % if $ has shallowlyMutable
+ max : (%,%) -> % if R has ORDSET
+ maxIndex : % -> Integer if Integer has ORDSET
+ member? : (R,%) -> Boolean if R has SETCAT and $ has finiteAggregate
+ members : % -> List R if $ has finiteAggregate
+ merge : (%,%) -> % if R has ORDSET
+ merge : (((R,R) -> Boolean),%,%) -> %
+ min : (%,%) -> % if R has ORDSET
+ minIndex : % -> Integer if Integer has ORDSET
+ more? : (%,NonNegativeInteger) -> Boolean
+ new : (NonNegativeInteger,R) -> %    
+ parts : % -> List R if $ has finiteAggregate
+ position : (R,%) -> Integer if R has SETCAT
+ position : ((R -> Boolean),%) -> Integer
+ position : (R,%,Integer) -> Integer if R has SETCAT
+ qelt : (%,Integer) -> R
+ qsetelt! : (%,Integer,R) -> R if $ has shallowlyMutable
+ reduce : (((R,R) -> R),%) -> R if $ has finiteAggregate
+ reduce : (((R,R) -> R),%,R) -> R if $ has finiteAggregate
+ reduce : (((R,R) -> R),%,R,R) -> R if R has SETCAT and $ has finiteAggregate
+ remove : ((R -> Boolean),%) -> % if $ has finiteAggregate
+ remove : (R,%) -> % if R has SETCAT and $ has finiteAggregate
+ removeDuplicates : % -> % if R has SETCAT and $ has finiteAggregate
+ reverse : % -> %                     
+ reverse! : % -> % if $ has shallowlyMutable
+ sample : () -> %
+ select : ((R -> Boolean),%) -> % if $ has finiteAggregate
+ setelt : (%,Integer,R) -> R if $ has shallowlyMutable
+ setelt : (%,UniversalSegment Integer,R) -> R if $ has shallowlyMutable
+ size? : (%,NonNegativeInteger) -> Boolean
+ sort : % -> % if R has ORDSET
+ sort : (((R,R) -> Boolean),%) -> %
+ sort! : % -> % if R has ORDSET and $ has shallowlyMutable
+ sort! : (((R,R) -> Boolean),%) -> % if $ has shallowlyMutable
+ sorted? : % -> Boolean if R has ORDSET
+ sorted? : (((R,R) -> Boolean),%) -> Boolean
+ swap! : (%,Integer,Integer) -> Void if $ has shallowlyMutable
+ #? : % -> NonNegativeInteger if $ has finiteAggregate
+ ?.? : (%,Integer) -> R               
+ ?.? : (%,UniversalSegment Integer) -> %
+ ?=? : (%,%) -> Boolean if R has SETCAT
+ ?<? : (%,%) -> Boolean if R has ORDSET
+ ?<=? : (%,%) -> Boolean if R has ORDSET
+ ?>? : (%,%) -> Boolean if R has ORDSET
+ ?>=? : (%,%) -> Boolean if R has ORDSET
+ ?~=? : (%,%) -> Boolean if R has SETCAT
+\end{verbatim}
+
+<<category VECTCAT VectorCategory>>=
+)abbrev category VECTCAT VectorCategory
+++ Author:
+++ Date Created:
+++ Date Last Updated:
+++ Basic Functions:
+++ Related Constructors: DirectProductCategory, Vector, IndexedVector
+++ Also See:
+++ AMS Classifications:
+++ Keywords:
+++ References:
+++ Description:
+++ \spadtype{VectorCategory} represents the type of vector like objects,
+++ i.e. finite sequences indexed by some finite segment of the
+++ integers. The operations available on vectors depend on the structure
+++ of the underlying components. Many operations from the component domain
+++ are defined for vectors componentwise. It can by assumed that extraction or
+++ updating components can be done in constant time.
+ 
+VectorCategory(R:Type): Category == OneDimensionalArrayAggregate R with
+    if R has AbelianSemiGroup then
+      _+ : (%, %) -> %
+        ++ x + y returns the component-wise sum of the vectors x and y.
+        ++ Error: if x and y are not of the same length.
+    if R has AbelianMonoid then
+      zero: NonNegativeInteger -> %
+        ++ zero(n) creates a zero vector of length n.
+    if R has AbelianGroup then
+      _- : % -> %
+        ++ -x negates all components of the vector x.
+      _- : (%, %) -> %
+        ++ x - y returns the component-wise difference of the vectors x and y.
+        ++ Error: if x and y are not of the same length.
+      _* : (Integer, %) -> %
+        ++ n * y multiplies each component of the vector y by the integer n.
+    if R has Monoid then
+      _* : (R, %) -> %
+        ++ r * y multiplies the element r times each component of the vector y.
+      _* : (%, R) -> %
+        ++ y * r multiplies each component of the vector y by the element r.
+    if R has Ring then
+      dot: (%, %) -> R
+        ++ dot(x,y) computes the inner product of the two vectors x and y.
+        ++ Error: if x and y are not of the same length.
+      outerProduct: (%, %) -> Matrix R
+        ++ outerProduct(u,v) constructs the matrix whose (i,j)'th element is
+        ++ u(i)*v(j).
+      cross: (%, %) -> %
+        ++ vectorProduct(u,v) constructs the cross product of u and v.
+        ++ Error: if u and v are not of length 3.
+    if R has RadicalCategory and R has Ring then
+      length: % -> R
+        ++ length(v) computes the sqrt(dot(v,v)), i.e. the magnitude
+      magnitude: % -> R
+        ++ magnitude(v) computes the sqrt(dot(v,v)), i.e. the length
+ add
+    if R has AbelianSemiGroup then
+      u + v ==
+        (n := #u) ^= #v => error "Vectors must be of the same length"
+        map(_+ , u, v)
+ 
+    if R has AbelianMonoid then
+      zero n == new(n, 0)
+ 
+    if R has AbelianGroup then
+      - u             == map(- #1, u)
+
+      n:Integer * u:% == map(n * #1, u)
+
+      u - v           == u + (-v)
+ 
+    if R has Monoid then
+      u:% * r:R       == map(#1 * r, u)
+
+      r:R * u:%       == map(r * #1, u)
+ 
+    if R has Ring then
+      dot(u, v) ==
+        #u ^= #v => error "Vectors must be of the same length"
+        _+/[qelt(u, i) * qelt(v, i) for i in minIndex u .. maxIndex u]
+
+      outerProduct(u, v) ==
+        matrix [[qelt(u, i) * qelt(v,j) for i in minIndex u .. maxIndex u] _
+                for j in minIndex v .. maxIndex v]
+
+      cross(u, v) ==
+        #u ^= 3 or #v ^= 3 => error "Vectors must be of length 3"
+        construct [qelt(u, 2)*qelt(v, 3) - qelt(u, 3)*qelt(v, 2) , _
+                   qelt(u, 3)*qelt(v, 1) - qelt(u, 1)*qelt(v, 3) , _
+                   qelt(u, 1)*qelt(v, 2) - qelt(u, 2)*qelt(v, 1) ]
+
+    if R has RadicalCategory and R has Ring then
+      length p ==
+         sqrt(dot(p,p))
+
+      magnitude p ==
+         sqrt(dot(p,p))
+ 
+@
+<<VECTCAT.dotabb>>=
+"VECTCAT"
+ [color=lightblue,href="bookvol10.2.pdf#nameddest=VECTCAT"];
+"VECTCAT" -> "A1AGG"
+
+@
+<<VECTCAT.dotfull>>=
+"VectorCategory(a:Type)"
+ [color=lightblue,href="bookvol10.2.pdf#nameddest=VECTCAT"];
+"VectorCategory(a:Type)" -> "OneDimensionalArrayAggregate(a:Type)"
+
+@
+<<VECTCAT.dotpic>>=
+digraph pic {
+ fontsize=10;
+ bgcolor="#FFFF66";
+ node [shape=box, color=white, style=filled];
+
+"VectorCategory(a:Type)" [color=lightblue];
+"VectorCategory(a:Type)" -> "OneDimensionalArrayAggregate(a:Type)"
+
+"OneDimensionalArrayAggregate(a:Type)" [color=lightblue];
+"OneDimensionalArrayAggregate(a:Type)" -> 
+    "FiniteLinearAggregate(a:Type)"
+
+"FiniteLinearAggregate(a:Type)" [color=lightblue];
+"FiniteLinearAggregate(a:Type)" -> "LinearAggregate(a:Type)"
+
+"LinearAggregate(a:Type)" [color=lightblue];
+"LinearAggregate(a:Type)" -> "IndexedAggregate(b:Integer,a:Type)"
+"LinearAggregate(a:Type)" -> "CLAGG..."
+
+"IndexedAggregate(b:Integer,a:Type)" [color=seagreen];
+"IndexedAggregate(b:Integer,a:Type)" -> "IXAGG..."
+
+"CLAGG..." [color=lightblue];
+"IXAGG..." [color=lightblue];
+}
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \pagehead{XFreeAlgebra}{XFALG}
 \pagepic{ps/v102xfreealgebra.ps}{XFALG}{0.50}
 
@@ -25793,7 +28143,7 @@ digraph pic {
 \item if Ring has noZeroDivisors then noZeroDivisors where
 {\bf \cross{XFALG}{noZeroDivisors}}
 is true if $x * y \ne 0$ implies both x and y are non-zero.
-\item {\bf \cross{XFALG}{commutative("*")}}
+\item {\bf \cross{XFALG}{commutative(``*'')}}
 is true if it has an operation $"*": (D,D) -> D$
 which is commutative.
 \item {\bf \cross{XFALG}{unitsKnown}}
@@ -26067,6 +28417,7 @@ digraph pic {
 \pageto{FiniteRankAlgebra}{FINRALG}
 \pageto{FunctionSpace}{FS}
 \pageto{IntegralDomain}{INTDOM}
+\pageto{OctonionCategory}{OC}
 \pageto{QuotientFieldCategory}{QFCAT}
 \pagefrom{Module}{MODULE}
 \pagefrom{Ring}{RING}
@@ -26694,8 +29045,8 @@ is true if $x * 1 = x$ for all x.
 \item if \#1 has IntegralDomain then noZeroDivisors where
 {\bf \cross{UTSCAT}{noZeroDivisors}}
 is true if $x * y \ne 0$ implies both x and y are non-zero.
-\item if \#1 has CommutativeRing then commutative("*") where
-{\bf \cross{UTSCAT}{commutative("*")}}
+\item if \#1 has CommutativeRing then commutative(``*'') where
+{\bf \cross{UTSCAT}{commutative(``*'')}}
 is true if it has an operation $"*": (D,D) -> D$
 which is commutative.
 \end{itemize}
@@ -28980,7 +31331,7 @@ digraph pic {
 \begin{itemize}
 \item {\bf \cross{INTDOM}{noZeroDivisors}}
 is true if $x * y \ne 0$ implies both x and y are non-zero.
-\item {\bf \cross{INTDOM}{commutative("*")}}
+\item {\bf \cross{INTDOM}{commutative(``*'')}}
 is true if it has an operation $"*": (D,D) -> D$
 which is commutative.
 \item {\bf \cross{INTDOM}{unitsKnown}}
@@ -29214,7 +31565,7 @@ digraph pic {
 \begin{itemize}
 \item {\bf \cross{FMTC}{noZeroDivisors}}
 is true if $x * y \ne 0$ implies both x and y are non-zero.
-\item {\bf \cross{FMTC}{commutative("*")}}
+\item {\bf \cross{FMTC}{commutative(``*'')}}
 is true if it has an operation $"*": (D,D) -> D$
 which is commutative.
 \item {\bf \cross{FMTC}{unitsKnown}}
@@ -30021,7 +32372,7 @@ digraph pic {
 \begin{itemize}
 \item {\bf \cross{GCDDOM}{noZeroDivisors}}
 is true if $x * y \ne 0$ implies both x and y are non-zero.
-\item {\bf \cross{GCDDOM}{commutative("*")}}
+\item {\bf \cross{GCDDOM}{commutative(``*'')}}
 is true if it has an operation $"*": (D,D) -> D$
 which is commutative.
 \item {\bf \cross{GCDDOM}{unitsKnown}}
@@ -30201,6 +32552,493 @@ digraph pic {
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\pagehead{OctonionCategory}{OC}
+\pagepic{ps/v102octonioncategory.ps}{OC}{1.00}
+
+{\bf See:}\\
+\pagefrom{Algebra}{ALGEBRA}
+\pagefrom{FullyEvalableOver}{FEVALAB}
+\pagefrom{FullyRetractableTo}{FRETRCT}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\cross{OC}{0} &
+\cross{OC}{1} &
+\cross{OC}{abs} &
+\cross{OC}{characteristic} &
+\cross{OC}{charthRoot} \\
+\cross{OC}{coerce} &
+\cross{OC}{conjugate} &
+\cross{OC}{convert} &
+\cross{OC}{eval} &
+\cross{OC}{hash} \\
+\cross{OC}{imagE} &
+\cross{OC}{imagI} &
+\cross{OC}{imagJ} &
+\cross{OC}{imagK} &
+\cross{OC}{imagi} \\
+\cross{OC}{imagj} &
+\cross{OC}{imagk} &
+\cross{OC}{index} &
+\cross{OC}{inv} &
+\cross{OC}{latex} \\
+\cross{OC}{lookup} &
+\cross{OC}{map} &
+\cross{OC}{max} &
+\cross{OC}{min} &
+\cross{OC}{norm} \\
+\cross{OC}{octon} &
+\cross{OC}{one?} &
+\cross{OC}{random} &
+\cross{OC}{rational} &
+\cross{OC}{rational?} \\
+\cross{OC}{rationalIfCan} &
+\cross{OC}{real} &
+\cross{OC}{recip} &
+\cross{OC}{retract} &
+\cross{OC}{retractIfCan} \\
+\cross{OC}{sample} &
+\cross{OC}{size} &
+\cross{OC}{subtractIfCan} &
+\cross{OC}{zero?} &
+\cross{OC}{?*?} \\
+\cross{OC}{?**?} &
+\cross{OC}{?+?} &
+\cross{OC}{?-?} &
+\cross{OC}{-?} &
+\cross{OC}{?=?} \\
+\cross{OC}{?\^{}?} &
+\cross{OC}{?\~{}=?} &
+\cross{OC}{?$<$?} &
+\cross{OC}{?$<=$?} &
+\cross{OC}{?$>$?} \\
+\cross{OC}{?$>=$?} &
+\cross{OC}{?.?} &&&
+\end{tabular}
+
+{\bf Attributes Exported:}
+\begin{itemize}
+\item {\bf \cross{OC}{unitsKnown}}
+is true if a monoid (a multiplicative semigroup with a 1) has 
+unitsKnown means that  the operation {\tt recip} can only return 
+``failed'' if its argument is not a unit.
+\item {\bf \cross{OC}{leftUnitary}}
+is true if $1 * x = x$ for all x.
+\item {\bf \cross{OC}{rightUnitary}}
+is true if $x * 1 = x$ for all x.
+\end{itemize}
+
+These are directly exported but not implemented:
+\begin{verbatim}
+ imagi : % -> R
+ imagj : % -> R                       
+ imagk : % -> R
+ imagE : % -> R
+ imagI : % -> R                       
+ imagJ : % -> R
+ imagK : % -> R                       
+ octon : (R,R,R,R,R,R,R,R) -> %       
+ real : % -> R                        
+\end{verbatim}
+
+These are implemented by this category:
+\begin{verbatim}
+ abs : % -> R if R has RNS
+ characteristic : () -> NonNegativeInteger
+ coerce : R -> %                      
+ coerce : Integer -> %
+ coerce : % -> OutputForm             
+ conjugate : % -> %
+ convert : % -> InputForm if R has KONVERT INFORM
+ inv : % -> % if R has FIELD          
+ map : ((R -> R),%) -> %              
+ norm : % -> R
+ rational : % -> Fraction Integer if R has INS
+ rational? : % -> Boolean if R has INS
+ rationalIfCan : % -> Union(Fraction Integer,"failed") if R has INS
+ retract : % -> R                     
+ retractIfCan : % -> Union(R,"failed")
+ zero? : % -> Boolean                 
+ ?<? : (%,%) -> Boolean if R has ORDSET
+ ?=? : (%,%) -> Boolean
+ ?+? : (%,%) -> %                     
+ -? : % -> %                          
+ ?*? : (R,%) -> %                     
+ ?*? : (Integer,%) -> %
+\end{verbatim}
+
+These exports come from \refto{Algebra}(R:CommutativeRing):
+\begin{verbatim}
+ 0 : () -> %
+ 1 : () -> %                          
+ hash : % -> SingleInteger            
+ latex : % -> String
+ one? : % -> Boolean
+ recip : % -> Union(%,"failed")
+ sample : () -> %
+ subtractIfCan : (%,%) -> Union(%,"failed")
+ ?~=? : (%,%) -> Boolean
+ ?*? : (NonNegativeInteger,%) -> %
+ ?*? : (PositiveInteger,%) -> %       
+ ?*? : (%,%) -> %                     
+ ?-? : (%,%) -> %
+ ?**? : (%,NonNegativeInteger) -> %
+ ?**? : (%,PositiveInteger) -> %
+ ?^? : (%,PositiveInteger) -> %       
+ ?^? : (%,NonNegativeInteger) -> %
+ ?*? : (%,R) -> %
+\end{verbatim}
+
+These exports come from \refto{FullyRetractableTo}(R:CommutativeRing):
+\begin{verbatim}
+ coerce : Fraction Integer -> % if R has RETRACT FRAC INT
+ retract : % -> Fraction Integer if R has RETRACT FRAC INT
+ retract : % -> Integer if R has RETRACT INT
+ retractIfCan : % -> Union(Fraction Integer,"failed") if R has RETRACT FRAC INT
+ retractIfCan : % -> Union(Integer,"failed") if R has RETRACT INT
+\end{verbatim}
+
+These exports come from \refto{FullyEvalableOver}(R:CommutativeRing):
+\begin{verbatim}
+ eval : (%,Equation R) -> % if R has EVALAB R
+ eval : (%,List Symbol,List R) -> % if R has IEVALAB(SYMBOL,R)
+ eval : (%,List Equation R) -> % if R has EVALAB R
+ eval : (%,R,R) -> % if R has EVALAB R
+ eval : (%,List R,List R) -> % if R has EVALAB R
+ eval : (%,Symbol,R) -> % if R has IEVALAB(SYMBOL,R)
+ ?.? : (%,R) -> % if R has ELTAB(R,R)
+\end{verbatim}
+
+These exports come from \refto{Finite}():
+\begin{verbatim}
+ index : PositiveInteger -> % if R has FINITE
+ lookup : % -> PositiveInteger if R has FINITE
+ random : () -> % if R has FINITE
+ size : () -> NonNegativeInteger if R has FINITE
+\end{verbatim}
+
+These exports come from \refto{OrderedSet}():
+\begin{verbatim}
+ max : (%,%) -> % if R has ORDSET
+ min : (%,%) -> % if R has ORDSET
+ ?<=? : (%,%) -> Boolean if R has ORDSET
+ ?>? : (%,%) -> Boolean if R has ORDSET
+ ?>=? : (%,%) -> Boolean if R has ORDSET
+\end{verbatim}
+
+These exports come from \refto{CharacteristicNonZero}():
+\begin{verbatim}
+ charthRoot : % -> Union(%,"failed") if R has CHARNZ
+\end{verbatim}
+
+<<category OC OctonionCategory>>=
+)abbrev category OC OctonionCategory
+++ Author: R. Wisbauer, J. Grabmeier
+++ Date Created: 05 September 1990
+++ Date Last Updated: 19 September 1990
+++ Basic Operations: _+, _*, octon, real, imagi, imagj, imagk,
+++  imagE, imagI, imagJ, imagK
+++ Related Constructors: QuaternionCategory
+++ Also See: 
+++ AMS Classifications:
+++ Keywords: octonion, non-associative algebra, Cayley-Dixon  
+++ References: e.g. I.L Kantor, A.S. Solodovnikov:
+++  Hypercomplex Numbers, Springer Verlag Heidelberg, 1989,
+++  ISBN 0-387-96980-2
+++ Description:
+++  OctonionCategory gives the categorial frame for the 
+++  octonions, and eight-dimensional non-associative algebra, 
+++  doubling the the quaternions in the same way as doubling
+++  the Complex numbers to get the quaternions.
+-- Examples: octonion.input
+ 
+OctonionCategory(R: CommutativeRing): Category ==
+  -- we are cheating a little bit, algebras in \Language{}
+  -- are mainly considered to be associative, but that's not 
+  -- an attribute and we can't guarantee that there is no piece
+  -- of code which implicitly
+  -- uses this. In a later version we shall properly combine
+  -- all this code in the context of general, non-associative
+  -- algebras, which are meanwhile implemented in \Language{}
+  Join(Algebra R, FullyRetractableTo R, FullyEvalableOver R) with
+     conjugate: % -> % 
+       ++ conjugate(o) negates the imaginary parts i,j,k,E,I,J,K of octonian o.
+     real:    % -> R 
+       ++ real(o) extracts real part of octonion o.
+     imagi:   % -> R      
+       ++ imagi(o) extracts the i part of octonion o.
+     imagj:   % -> R                
+       ++ imagj(o) extracts the j part of octonion o.
+     imagk:   % -> R 
+       ++ imagk(o) extracts the k part of octonion o.
+     imagE:   % -> R 
+       ++ imagE(o) extracts the imaginary E part of octonion o.
+     imagI:   % -> R              
+       ++ imagI(o) extracts the imaginary I part of octonion o.
+     imagJ:   % -> R      
+       ++ imagJ(o) extracts the imaginary J part of octonion o.
+     imagK:   % -> R
+       ++ imagK(o) extracts the imaginary K part of octonion o.
+     norm:    % -> R 
+       ++ norm(o) returns the norm of an octonion, equal to
+       ++ the sum of the squares
+       ++ of its coefficients.
+     octon: (R,R,R,R,R,R,R,R) -> %   
+       ++ octon(re,ri,rj,rk,rE,rI,rJ,rK) constructs an octonion 
+       ++ from scalars. 
+     if R has Finite then Finite
+     if R has OrderedSet then OrderedSet
+     if R has ConvertibleTo InputForm then ConvertibleTo InputForm
+     if R has CharacteristicZero then CharacteristicZero
+     if R has CharacteristicNonZero then CharacteristicNonZero
+     if R has RealNumberSystem then
+       abs:   % -> R 
+         ++ abs(o) computes the absolute value of an octonion, equal to 
+         ++ the square root of the \spadfunFrom{norm}{Octonion}.
+     if R has IntegerNumberSystem then
+       rational?    : % -> Boolean
+         ++ rational?(o) tests if o is rational, i.e. that all seven
+         ++ imaginary parts are 0.
+       rational     : % -> Fraction Integer
+         ++ rational(o) returns the real part if all seven 
+         ++ imaginary parts are 0.
+         ++ Error: if o is not rational.
+       rationalIfCan: % -> Union(Fraction Integer, "failed")
+         ++ rationalIfCan(o) returns the real part if
+         ++ all seven imaginary parts are 0, and "failed" otherwise.
+     if R has Field then
+       inv : % -> % 
+         ++ inv(o) returns the inverse of o if it exists.
+ add
+     characteristic() == 
+       characteristic()$R
+
+     conjugate x ==
+       octon(real x, - imagi x, - imagj x, - imagk x, - imagE x,_
+       - imagI x, - imagJ x, - imagK x)
+
+     map(fn, x)       ==
+       octon(fn real x,fn imagi x,fn imagj x,fn imagk x, fn imagE x,_
+       fn imagI x, fn imagJ x,fn imagK x)
+
+     norm x ==
+       real x * real x + imagi x * imagi x + _
+       imagj x * imagj x + imagk x * imagk x + _
+       imagE x * imagE x + imagI x * imagI x + _
+       imagJ x * imagJ x + imagK x * imagK x
+
+     x = y            ==
+       (real x = real y) and (imagi x = imagi y) and _
+       (imagj x = imagj y) and (imagk x = imagk y) and _
+       (imagE x = imagE y) and (imagI x = imagI y) and _
+       (imagJ x = imagJ y) and (imagK x = imagK y)
+
+     x + y            ==
+       octon(real x + real y, imagi x + imagi y,_
+       imagj x + imagj y, imagk x + imagk y,_
+       imagE x + imagE y, imagI x + imagI y,_
+       imagJ x + imagJ y, imagK x + imagK y)
+
+     - x              ==
+       octon(- real x, - imagi x, - imagj x, - imagk x,_
+       - imagE x, - imagI x, - imagJ x, - imagK x)
+
+     r:R * x:%        ==
+       octon(r * real x, r * imagi x, r * imagj x, r * imagk x,_
+       r * imagE x, r * imagI x, r * imagJ x, r * imagK x)
+
+     n:Integer * x:%  ==
+       octon(n * real x, n * imagi x, n * imagj x, n * imagk x,_
+       n * imagE x, n * imagI x, n * imagJ x, n * imagK x)
+
+     coerce(r:R)      ==
+       octon(r,0$R,0$R,0$R,0$R,0$R,0$R,0$R)
+
+     coerce(n:Integer)      ==
+       octon(n :: R,0$R,0$R,0$R,0$R,0$R,0$R,0$R)
+
+     zero? x ==
+       zero? real x and zero? imagi x and _
+       zero? imagj x and zero? imagk x and _
+       zero? imagE x and zero? imagI x and _
+       zero? imagJ x and zero? imagK x
+
+     retract(x):R ==
+       not (zero? imagi x and zero? imagj x and zero? imagk x and _
+       zero? imagE x and zero? imagI x and zero? imagJ x and zero? imagK x)=>
+         error "Cannot retract octonion."
+       real x
+
+     retractIfCan(x):Union(R,"failed") ==
+       not (zero? imagi x and zero? imagj x and zero? imagk x and _
+       zero? imagE x and zero? imagI x and zero? imagJ x and zero? imagK x)=>
+         "failed"
+       real x
+ 
+     coerce(x:%):OutputForm ==
+         part,z : OutputForm
+         y : %
+         zero? x => (0$R) :: OutputForm
+         not zero?(real x) =>
+           y := octon(0$R,imagi(x),imagj(x),imagk(x),imagE(x),
+             imagI(x),imagJ(x),imagK(x))
+           zero? y => real(x) :: OutputForm
+           (real(x) :: OutputForm) + (y :: OutputForm)
+         -- we know that the real part is 0
+         not zero?(imagi(x)) =>
+           y := octon(0$R,0$R,imagj(x),imagk(x),imagE(x),
+             imagI(x),imagJ(x),imagK(x))
+           z :=
+             part := "i"::Symbol::OutputForm
+--             one? imagi(x) => part
+             (imagi(x) = 1) => part
+             (imagi(x) :: OutputForm) * part
+           zero? y => z
+           z + (y :: OutputForm)
+         -- we know that the real part and i part are 0
+         not zero?(imagj(x)) =>
+           y := octon(0$R,0$R,0$R,imagk(x),imagE(x),
+             imagI(x),imagJ(x),imagK(x))
+           z :=
+             part := "j"::Symbol::OutputForm
+--             one? imagj(x) => part
+             (imagj(x) = 1) => part
+             (imagj(x) :: OutputForm) * part
+           zero? y => z
+           z + (y :: OutputForm)
+         -- we know that the real part and i and j parts are 0
+         not zero?(imagk(x)) =>
+           y := octon(0$R,0$R,0$R,0$R,imagE(x),
+             imagI(x),imagJ(x),imagK(x))
+           z :=
+             part := "k"::Symbol::OutputForm
+--             one? imagk(x) => part
+             (imagk(x) = 1) => part
+             (imagk(x) :: OutputForm) * part
+           zero? y => z
+           z + (y :: OutputForm)
+         -- we know that the real part,i,j,k parts are 0
+         not zero?(imagE(x)) =>
+           y := octon(0$R,0$R,0$R,0$R,0$R,
+             imagI(x),imagJ(x),imagK(x))
+           z :=
+             part := "E"::Symbol::OutputForm
+--             one? imagE(x) => part
+             (imagE(x) = 1) => part
+             (imagE(x) :: OutputForm) * part
+           zero? y => z
+           z + (y :: OutputForm)
+         -- we know that the real part,i,j,k,E parts are 0
+         not zero?(imagI(x)) =>
+           y := octon(0$R,0$R,0$R,0$R,0$R,0$R,imagJ(x),imagK(x))
+           z :=
+             part := "I"::Symbol::OutputForm
+--             one? imagI(x) => part
+             (imagI(x) = 1) => part
+             (imagI(x) :: OutputForm) * part
+           zero? y => z
+           z + (y :: OutputForm)
+         -- we know that the real part,i,j,k,E,I parts are 0
+         not zero?(imagJ(x)) =>
+           y := octon(0$R,0$R,0$R,0$R,0$R,0$R,0$R,imagK(x))
+           z :=
+             part := "J"::Symbol::OutputForm
+--             one? imagJ(x) => part
+             (imagJ(x) = 1) => part
+             (imagJ(x) :: OutputForm) * part
+           zero? y => z
+           z + (y :: OutputForm)
+         -- we know that the real part,i,j,k,E,I,J parts are 0
+         part := "K"::Symbol::OutputForm
+--         one? imagK(x) => part
+         (imagK(x) = 1) => part
+         (imagK(x) :: OutputForm) * part
+ 
+     if R has Field then
+       inv x ==
+         (norm x) = 0 => error "This octonion is not invertible."
+         (inv norm x) * conjugate x
+
+     if R has ConvertibleTo InputForm then
+       convert(x:%):InputForm ==
+         l : List InputForm := [convert("octon" :: Symbol),
+           convert(real x)$R, convert(imagi x)$R, convert(imagj x)$R,_
+             convert(imagk x)$R, convert(imagE x)$R,_
+             convert(imagI x)$R, convert(imagJ x)$R,_
+             convert(imagK x)$R]
+         convert(l)$InputForm
+
+     if R has OrderedSet then
+       x < y ==
+         real x = real y =>
+          imagi x = imagi y =>
+           imagj x = imagj y =>
+            imagk x = imagk y =>
+             imagE x = imagE y =>
+              imagI x = imagI y =>
+               imagJ x = imagJ y =>
+                imagK x < imagK y
+               imagJ x < imagJ y
+              imagI x < imagI y
+             imagE x < imagE y
+            imagk x < imagk y 
+           imagj x < imagj y 
+          imagi x < imagi y 
+         real x < real y
+ 
+     if R has RealNumberSystem then
+       abs x == sqrt norm x
+ 
+     if R has IntegerNumberSystem then
+       rational? x ==
+         (zero? imagi x) and (zero? imagj x) and (zero? imagk x) and _ 
+         (zero? imagE x) and (zero? imagI x) and (zero? imagJ x) and _
+         (zero? imagK x)
+
+       rational  x ==
+         rational? x => rational real x
+         error "Not a rational number"
+
+       rationalIfCan x ==
+         rational? x => rational real x
+         "failed"
+
+@
+<<OC.dotabb>>=
+"OC"
+ [color=lightblue,href="bookvol10.2.pdf#nameddest=OC"];
+"OC" -> "ALGEBRA"
+"OC" -> "FEVALAB"
+"OC" -> "FRETRCT"
+
+@
+<<OC.dotfull>>=
+"OctonionCategory(a:CommutativeRing)"
+ [color=lightblue,href="bookvol10.2.pdf#nameddest=OC"];
+"OctonionCategory(a:CommutativeRing)" -> "Algebra(a:CommutativeRing)"
+"OctonionCategory(a:CommutativeRing)" -> "FullyEvalableOver(CommutativeRing)"
+"OctonionCategory(a:CommutativeRing)" ->
+   "FullyRetractableTo(a:CommutativeRing)"
+
+@
+<<OC.dotpic>>=
+digraph pic {
+ fontsize=10;
+ bgcolor="#FFFF66";
+ node [shape=box, color=white, style=filled];
+
+"OctonionCategory(a:CommutativeRing)" [color=lightblue];
+"OctonionCategory(a:CommutativeRing)" -> "ALGEBRA..."
+"OctonionCategory(a:CommutativeRing)" -> "FEVALAB..."
+"OctonionCategory(a:CommutativeRing)" -> "FRETRCT..."
+
+"ALGEBRA..." [color=lightblue];
+"FEVALAB..." [color=lightblue];
+"FRETRCT..." [color=lightblue];
+}
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \pagehead{OrderedIntegralDomain}{OINTDOM}
 \pagepic{ps/v102orderedintegraldomain.ps}{OINTDOM}{0.45}
 
@@ -30251,7 +33089,7 @@ digraph pic {
 \begin{itemize}
 \item {\bf \cross{OINTDOM}{noZeroDivisors}}
 is true if $x * y \ne 0$ implies both x and y are non-zero.
-\item {\bf \cross{OINTDOM}{commutative("*")}}
+\item {\bf \cross{OINTDOM}{commutative(``*'')}}
 is true if it has an operation $"*": (D,D) -> D$
 which is commutative.
 \item {\bf \cross{OINTDOM}{unitsKnown}}
@@ -30491,7 +33329,7 @@ unitsKnown means that  the operation {\tt recip} can only return
 is true if $1 * x = x$ for all x.
 \item {\bf \cross{INTCAT}{rightUnitary}}
 is true if $x * 1 = x$ for all x.
-\item {\bf \cross{INTCAT}{commutative("*")}}
+\item {\bf \cross{INTCAT}{commutative(``*'')}}
 is true if it has an operation $"*": (D,D) -> D$
 which is commutative.
 \item {\bf \cross{INTCAT}{noZeroDivisors}}
@@ -30787,7 +33625,7 @@ digraph pic {
 \begin{itemize}
 \item {\bf \cross{PID}{noZeroDivisors}}
 is true if $x * y \ne 0$ implies both x and y are non-zero.
-\item {\bf \cross{PID}{commutative("*")}}
+\item {\bf \cross{PID}{commutative(``*'')}}
 is true if it has an operation $"*": (D,D) -> D$
 which is commutative.
 \item {\bf \cross{PID}{unitsKnown}}
@@ -30980,7 +33818,7 @@ digraph pic {
 \begin{itemize}
 \item {\bf \cross{UFD}{noZeroDivisors}}
 is true if $x * y \ne 0$ implies both x and y are non-zero.
-\item {\bf \cross{UFD}{commutative("*")}}
+\item {\bf \cross{UFD}{commutative(``*'')}}
 is true if it has an operation $"*": (D,D) -> D$
 which is commutative.
 \item {\bf \cross{UFD}{unitsKnown}}
@@ -31144,6 +33982,7 @@ digraph pic {
 
 {\bf See:}\\
 \pageto{Field}{FIELD}
+\pageto{PAdicIntegerCategory}{PADICCT}
 \pageto{QuotientFieldCategory}{QFCAT}
 \pagefrom{PrincipalIdealDomain}{PID}
 
@@ -31191,7 +34030,7 @@ digraph pic {
 \begin{itemize}
 \item {\bf \cross{EUCDOM}{noZeroDivisors}}
 is true if $x * y \ne 0$ implies both x and y are non-zero.
-\item {\bf \cross{EUCDOM}{commutative("*")}}
+\item {\bf \cross{EUCDOM}{commutative(``*'')}}
 is true if it has an operation $"*": (D,D) -> D$
 which is commutative.
 \item {\bf \cross{EUCDOM}{unitsKnown}}
@@ -31521,7 +34360,7 @@ digraph pic {
 \begin{itemize}
 \item {\bf \cross{PFECAT}{noZeroDivisors}}
 is true if $x * y \ne 0$ implies both x and y are non-zero.
-\item {\bf \cross{PFECAT}{commutative("*")}}
+\item {\bf \cross{PFECAT}{commutative(``*'')}}
 is true if it has an operation $"*": (D,D) -> D$
 which is commutative.
 \item {\bf \cross{PFECAT}{unitsKnown}}
@@ -31816,7 +34655,7 @@ is true if\\
 {\tt unitCanonical(a)*unitCanonical(b) = unitCanonical(a*b)}.
 \item {\bf \cross{FIELD}{noZeroDivisors}}
 is true if $x * y \ne 0$ implies both x and y are non-zero.
-\item {\bf \cross{FIELD}{commutative("*")}}
+\item {\bf \cross{FIELD}{commutative(``*'')}}
 is true if it has an operation $"*": (D,D) -> D$
 which is commutative.
 \item {\bf \cross{FIELD}{unitsKnown}}
@@ -31992,22 +34831,273 @@ digraph pic {
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\pagehead{PAdicIntegerCategory}{PADICCT}
+\pagepic{ps/v102padicintegercategory.ps}{PADICCT}{0.70}
+
+{\bf See:}\\
+\pagefrom{CharacteristicZero}{CHARZ}
+\pagefrom{EuclideanDomain}{EUCDOM}
+
+{\bf Exports:}\\
+\begin{tabular}{llll}
+\cross{PADICCT}{0} &
+\cross{PADICCT}{1} &
+\cross{PADICCT}{approximate} &
+\cross{PADICCT}{associates?} \\
+\cross{PADICCT}{characteristic} &
+\cross{PADICCT}{coerce} &
+\cross{PADICCT}{complete} &
+\cross{PADICCT}{digits} \\
+\cross{PADICCT}{divide} &
+\cross{PADICCT}{euclideanSize} &
+\cross{PADICCT}{expressIdealMember} &
+\cross{PADICCT}{exquo} \\
+\cross{PADICCT}{extend} &
+\cross{PADICCT}{extendedEuclidean} &
+\cross{PADICCT}{gcd} &
+\cross{PADICCT}{gcdPolynomial} \\
+\cross{PADICCT}{hash} &
+\cross{PADICCT}{latex} &
+\cross{PADICCT}{lcm} &
+\cross{PADICCT}{moduloP} \\
+\cross{PADICCT}{modulus} &
+\cross{PADICCT}{multiEuclidean} &
+\cross{PADICCT}{one?} &
+\cross{PADICCT}{order} \\
+\cross{PADICCT}{principalIdeal} &
+\cross{PADICCT}{quotientByP} &
+\cross{PADICCT}{recip} &
+\cross{PADICCT}{root} \\
+\cross{PADICCT}{sample} &
+\cross{PADICCT}{sizeLess?} &
+\cross{PADICCT}{sqrt} &
+\cross{PADICCT}{subtractIfCan} \\
+\cross{PADICCT}{unit?} &
+\cross{PADICCT}{unitCanonical} &
+\cross{PADICCT}{unitNormal} &
+\cross{PADICCT}{zero?} \\
+\cross{PADICCT}{?*?} &
+\cross{PADICCT}{?**?} &
+\cross{PADICCT}{?+?} &
+\cross{PADICCT}{?-?} \\
+\cross{PADICCT}{-?} &
+\cross{PADICCT}{?=?} &
+\cross{PADICCT}{?quo?} &
+\cross{PADICCT}{?rem?} \\
+\cross{PADICCT}{?\~{}=?} &
+\cross{PADICCT}{?\^{}?} &&
+\end{tabular}
+
+{\bf Attributes Exported:}
+\begin{itemize}
+\item {\bf \cross{PADICCT}{noZeroDivisors}}
+is true if $x * y \ne 0$ implies both x and y are non-zero.
+\item {\bf \cross{PADICCT}{commutative(``*'')}}
+is true if it has an operation $"*": (D,D) -> D$
+which is commutative.
+\item {\bf \cross{PADICCT}{unitsKnown}}
+is true if a monoid (a multiplicative semigroup with a 1) has 
+unitsKnown means that  the operation {\tt recip} can only return 
+``failed'' if its argument is not a unit.
+\item {\bf \cross{PADICCT}{leftUnitary}}
+is true if $1 * x = x$ for all x.
+\item {\bf \cross{PADICCT}{rightUnitary}}
+is true if $x * 1 = x$ for all x.
+\end{itemize}
+
+These are directly exported but not implemented:
+\begin{verbatim}
+ approximate : (%,Integer) -> Integer
+ complete : % -> %
+ digits : % -> Stream Integer         
+ extend : (%,Integer) -> %
+ moduloP : % -> Integer               
+ modulus : () -> Integer
+ order : % -> NonNegativeInteger
+ quotientByP : % -> %
+ root : (SparseUnivariatePolynomial Integer,Integer) -> %
+ sqrt : (%,Integer) -> %              
+\end{verbatim}
+
+These exports come from \refto{EuclideanDomain}():
+\begin{verbatim}
+ 0 : () -> %
+ 1 : () -> %                          
+ associates? : (%,%) -> Boolean
+ characteristic : () -> NonNegativeInteger
+ coerce : % -> %                      
+ coerce : Integer -> %
+ coerce : % -> OutputForm             
+ divide : (%,%) -> Record(quotient: %,remainder: %)
+ euclideanSize : % -> NonNegativeInteger
+ expressIdealMember : (List %,%) -> Union(List %,"failed")
+ exquo : (%,%) -> Union(%,"failed")
+ extendedEuclidean : (%,%,%) -> Union(Record(coef1: %,coef2: %),"failed")
+ extendedEuclidean : (%,%) -> Record(coef1: %,coef2: %,generator: %)
+ gcd : (%,%) -> %
+ gcd : List % -> %                    
+ gcdPolynomial : 
+   (SparseUnivariatePolynomial %,
+    SparseUnivariatePolynomial %) -> 
+      SparseUnivariatePolynomial %
+ hash : % -> SingleInteger            
+ latex : % -> String
+ lcm : List % -> %                    
+ lcm : (%,%) -> %
+ multiEuclidean : (List %,%) -> Union(List %,"failed")
+ one? : % -> Boolean                  
+ principalIdeal : List % -> Record(coef: List %,generator: %)
+ recip : % -> Union(%,"failed")       
+ sample : () -> %                     
+ sizeLess? : (%,%) -> Boolean
+ subtractIfCan : (%,%) -> Union(%,"failed")
+ unit? : % -> Boolean
+ unitCanonical : % -> %               
+ unitNormal : % -> Record(unit: %,canonical: %,associate: %)
+ zero? : % -> Boolean
+ ?+? : (%,%) -> %                     
+ ?=? : (%,%) -> Boolean
+ ?~=? : (%,%) -> Boolean              
+ ?*? : (%,%) -> %                     
+ ?*? : (Integer,%) -> %
+ ?*? : (PositiveInteger,%) -> %       
+ ?*? : (NonNegativeInteger,%) -> %
+ ?-? : (%,%) -> %
+ -? : % -> %                          
+ ?**? : (%,PositiveInteger) -> %
+ ?**? : (%,NonNegativeInteger) -> %
+ ?^? : (%,PositiveInteger) -> %       
+ ?^? : (%,NonNegativeInteger) -> %
+ ?quo? : (%,%) -> %                   
+ ?rem? : (%,%) -> %
+\end{verbatim}
+
+<<category PADICCT PAdicIntegerCategory>>=
+)abbrev category PADICCT PAdicIntegerCategory
+++ Author: Clifton J. Williamson
+++ Date Created: 15 May 1990
+++ Date Last Updated: 15 May 1990
+++ Basic Operations:
+++ Related Domains:
+++ Also See:
+++ AMS Classifications:
+++ Keywords: p-adic, completion
+++ Examples:
+++ References:
+++ Description: This is the category of stream-based representations of
+++   the p-adic integers.
+PAdicIntegerCategory(p): Category == Definition where
+  p   :   Integer
+  I   ==> Integer
+  NNI ==> NonNegativeInteger
+  ST  ==> Stream
+  SUP ==> SparseUnivariatePolynomial
+
+  Definition ==> Join(EuclideanDomain,CharacteristicZero) with
+    digits: % -> ST I
+      ++ \spad{digits(x)} returns a stream of p-adic digits of x.
+    order: % -> NNI
+      ++ \spad{order(x)} returns the exponent of the highest power of p
+      ++ dividing x.
+    extend: (%,I) -> %
+      ++ \spad{extend(x,n)} forces the computation of digits up to order n.
+    complete: % -> %
+      ++ \spad{complete(x)} forces the computation of all digits.
+    modulus: () -> I
+      ++ \spad{modulus()} returns the value of p.
+    moduloP: % -> I
+      ++ \spad{modulo(x)} returns a, where \spad{x = a + b p}.
+    quotientByP: % -> %
+      ++ \spad{quotientByP(x)} returns b, where \spad{x = a + b p}.
+    approximate: (%,I) -> I
+      ++ \spad{approximate(x,n)} returns an integer y such that
+      ++ \spad{y = x (mod p^n)}
+      ++ when n is positive, and 0 otherwise.
+    sqrt: (%,I) -> %
+      ++ \spad{sqrt(b,a)} returns a square root of b.
+      ++ Argument \spad{a} is a square root of b \spad{(mod p)}.
+    root: (SUP I,I) -> %
+      ++ \spad{root(f,a)} returns a root of the polynomial \spad{f}.
+      ++ Argument \spad{a} must be a root of \spad{f} \spad{(mod p)}.
+
+@
+<<PADICCT.dotabb>>=
+"PADICCT"
+ [color=lightblue,href="bookvol10.2.pdf#nameddest=PADICCT"];
+"PADICCT" -> "CHARZ"
+"PADICCT" -> "EUCDOM"
+
+@
+<<PADICCT.dotfull>>=
+"PAdicIntegerCategory(a:Integer)"
+ [color=lightblue,href="bookvol10.2.pdf#nameddest=PADICCT"];
+"PAdicIntegerCategory(a:Integer)" -> "CharacteristicZero()"
+"PAdicIntegerCategory(a:Integer)" -> "EuclideanDomain()"
+
+@
+<<PADICCT.dotpic>>=
+digraph pic {
+ fontsize=10;
+ bgcolor="#FFFF66";
+ node [shape=box, color=white, style=filled];
+
+"PAdicIntegerCategory(a:Integer)" [color=lightblue];
+"PAdicIntegerCategory(a:Integer)" -> "CharacteristicZero()"
+"PAdicIntegerCategory(a:Integer)" -> "EuclideanDomain()"
+
+"CharacteristicZero()" [color=lightblue];
+"CharacteristicZero()" -> "RING..."
+
+"EuclideanDomain()" [color=lightblue];
+"EuclideanDomain()" -> "PrincipalIdealDomain()"
+
+"PrincipalIdealDomain()" [color=lightblue];
+"PrincipalIdealDomain()" -> "GcdDomain()"
+
+"GcdDomain()" [color=lightblue];
+"GcdDomain()" -> "IntegralDomain()"
+
+"IntegralDomain()" [color=lightblue];
+"IntegralDomain()" -> "CommutativeRing()"
+"IntegralDomain()" -> "Algebra(a:CommutativeRing)"
+"IntegralDomain()" -> "EntireRing()"
+
+"CommutativeRing()" [color=lightblue];
+"CommutativeRing()" -> "RING..."
+"CommutativeRing()" -> "BMODULE..."
+
+"EntireRing()" [color=lightblue];
+"EntireRing()" -> "RING..."
+"EntireRing()" -> "BMODULE..."
+
+"Algebra(a:CommutativeRing)" [color=lightblue];
+"Algebra(a:CommutativeRing)" -> "RING..."
+"Algebra(a:CommutativeRing)" -> "Module(a:CommutativeRing)"
+
+"Module(a:CommutativeRing)" [color=lightblue];
+"Module(a:CommutativeRing)" -> "BMODULE..."
+
+"RING..." [color=lightblue];
+"BMODULE..." [color=lightblue];
+}
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \pagehead{PolynomialCategory}{POLYCAT}
-\pagepic{ps/v102polynomialcategory.ps}{POLYCAT}{0.30}
+\pagepic{ps/v102polynomialcategory.ps}{POLYCAT}{0.40}
 
 {\bf See:}\\
 \pageto{DifferentialPolynomialCategory}{DPOLCAT}
+\pageto{RecursivePolynomialCategory}{RPOLCAT}
 \pageto{UnivariatePolynomialCategory}{UPOLYC}
-\pagefrom{CommutativeRing}{COMRING}
-\pagefrom{ConvertibleTo}{KONVERT}
+
+\pagefrom{InnerEvalable}{IEVALAB}
 \pagefrom{Evalable}{EVALAB}
 \pagefrom{FiniteAbelianMonoidRing}{FAMR}
-\pagefrom{FullyLinearlyExplicitRingOver}{FLINEXP}
 \pagefrom{GcdDomain}{GCDDOM}
-\pagefrom{InnerEvalable}{IEVALAB}
+\pagefrom{FullyLinearlyExplicitRingOver}{FLINEXP}
 \pagefrom{OrderedSet}{ORDSET}
 \pagefrom{PartialDifferentialRing}{PDRING}
-\pagefrom{PatternMatchable}{PATMAB}
 \pagefrom{PolynomialFactorizationExplicit}{PFECAT}
 \pagefrom{RetractableTo}{RETRACT}
 
@@ -32108,8 +35198,8 @@ if and only if {\tt unitCanonical(a) = unitCanonical(b)}.
 \item if \$ has IntegralDomain then noZeroDivisors where
 {\bf \cross{POLYCAT}{noZeroDivisors}}
 is true if $x * y \ne 0$ implies both x and y are non-zero.
-\item if \$ has CommutativeRing then commutative("*") where
-{\bf \cross{POLYCAT}{commutative("*")}}
+\item if \$ has CommutativeRing then commutative(``*'') where
+{\bf \cross{POLYCAT}{commutative(``*'')}}
 is true if it has an operation $"*": (D,D) -> D$
 which is commutative.
 \item {\bf \cross{POLYCAT}{unitsKnown}}
@@ -32364,30 +35454,6 @@ These exports come from \refto{PolynomialFactorizationExplicit}():
       if R has PFECAT
 \end{verbatim}
 
-These exports come from \refto{ConvertibleTo}(InputForm):
-\begin{verbatim}
-\end{verbatim}
-
-These exports come from \refto{ConvertibleTo}(Pattern(Integer)):
-\begin{verbatim}
-\end{verbatim}
-
-These exports come from \refto{ConvertibleTo}(Pattern(Float)):
-\begin{verbatim}
-\end{verbatim}
-
-These exports come from \refto{PatternMatchable}(Pattern(Integer)):
-\begin{verbatim}
-\end{verbatim}
-
-These exports come from \refto{PatternMatchable}(Pattern(Float)):
-\begin{verbatim}
-\end{verbatim}
-
-These exports come from \refto{CommutativeRing}():
-\begin{verbatim}
-\end{verbatim}
-
 <<category POLYCAT PolynomialCategory>>=
 )abbrev category POLYCAT PolynomialCategory
 ++ Author:
@@ -32861,9 +35927,6 @@ PolynomialCategory(R:Ring, E:OrderedAbelianMonoidSup, VarSet:OrderedSet):
 "POLYCAT" -> "ORDSET"
 "POLYCAT" -> "GCDDOM"
 "POLYCAT" -> "PFECAT"
-"POLYCAT" -> "KONVERT"
-"POLYCAT" -> "PATMAB"
-"POLYCAT" -> "COMRING"
 
 @
 <<POLYCAT.dotfull>>=
@@ -32889,14 +35952,6 @@ PolynomialCategory(R:Ring, E:OrderedAbelianMonoidSup, VarSet:OrderedSet):
   -> "GcdDomain()"
 "PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)"
   -> "PolynomialFactorizationExplicit()"
-"PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)"
-  -> "ConvertibleTo(InputForm)"
-"PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)"
-  -> "PatternMatchable(Pattern(Integer))"
-"PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)"
-  -> "PatternMatchable(Pattern(Float))"
-"PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)"
-  -> "CommutativeRing()"
 
 "PolynomialCategory(a:Ring,b:NonNegativeInteger,c:SingletonAsOrderedSet)"
  [color=seagreen,href="bookvol10.2.pdf#nameddest=POLYCAT"];
@@ -32929,12 +35984,6 @@ digraph pic {
   -> "GCDDOM..."
 "PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)"
   -> "PFECAT..."
-"PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)"
-  -> "KONVERT..."
-"PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)"
-  -> "PATMAB..."
-"PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)"
-  -> "COMRING..."
 
 "PDRING..." [color=lightblue];
 "FAMR..." [color=lightblue];
@@ -32945,9 +35994,6 @@ digraph pic {
 "ORDSET..." [color=lightblue];
 "GCDDOM..." [color=lightblue];
 "PFECAT..." [color=lightblue];
-"KONVERT..." [color=lightblue];
-"PATMAB..." [color=lightblue];
-"COMRING..." [color=lightblue];
 
 }
 
@@ -33025,7 +36071,7 @@ is true if\\
 {\tt unitCanonical(a)*unitCanonical(b) = unitCanonical(a*b)}.
 \item {\bf \cross{ACF}{noZeroDivisors}}
 is true if $x * y \ne 0$ implies both x and y are non-zero.
-\item {\bf \cross{ACF}{commutative("*")}}
+\item {\bf \cross{ACF}{commutative(``*'')}}
 is true if it has an operation $"*": (D,D) -> D$
 which is commutative.
 \item {\bf \cross{ACF}{unitsKnown}}
@@ -33325,7 +36371,7 @@ digraph pic {
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \pagehead{DifferentialPolynomialCategory}{DPOLCAT}
-\pagepic{ps/v102differentialpolynomialcategory.ps}{DPOLCAT}{0.25}
+\pagepic{ps/v102differentialpolynomialcategory.ps}{DPOLCAT}{0.35}
 
 {\bf See:}\\
 \pagefrom{DifferentialExtension}{DIFEXT}
@@ -33438,8 +36484,8 @@ if and only if {\tt unitCanonical(a) = unitCanonical(b)}.
 \item if \$ has IntegralDomain then noZeroDivisors where
 {\bf \cross{DPOLCAT}{noZeroDivisors}}
 is true if $x * y \ne 0$ implies both x and y are non-zero.
-\item if \$ has CommutativeRing then commutative("*") where
-{\bf \cross{DPOLCAT}{commutative("*")}}
+\item if \$ has CommutativeRing then commutative(``*'') where
+{\bf \cross{DPOLCAT}{commutative(``*'')}}
 is true if it has an operation $"*": (D,D) -> D$
 which is commutative.
 \item {\bf \cross{DPOLCAT}{unitsKnown}}
@@ -33997,11 +37043,7 @@ digraph pic {
 
 "RetractableTo(OrderedSet)"
  [color=seagreen,href="bookvol10.2.pdf#nameddest=RETRACT"];
-"RetractableTo(OrderedSet)" -> "RetractableTo(a:Type)"
-
-"RetractableTo(a:Type)"
- [color=lightblue,href="bookvol10.2.pdf#nameddest=RETRACT"];
-"RetractableTo(a:Type)" -> "Category"
+"RetractableTo(OrderedSet)" -> "RETRACT..."
 
 "PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)"
  [color=lightblue,href="bookvol10.2.pdf#nameddest=POLYCAT"];
@@ -34023,12 +37065,6 @@ digraph pic {
   -> "GCDDOM..."
 "PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)"
   -> "PFECAT..."
-"PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)"
-  -> "KONVERT..."
-"PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)"
-  -> "PATMAB..."
-"PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)"
-  -> "COMRING..."
 
 "DIFRING..." [color=lightblue];
 "RING..." [color=lightblue];
@@ -34041,9 +37077,487 @@ digraph pic {
 "ORDSET..." [color=lightblue];
 "GCDDOM..." [color=lightblue];
 "PFECAT..." [color=lightblue];
-"KONVERT..." [color=lightblue];
-"PATMAB..." [color=lightblue];
-"COMRING..." [color=lightblue];
+
+}
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\pagehead{DirectProductCategory}{DIRPCAT}
+\pagepic{ps/v102directproductcategory.ps}{DIRPCAT}{0.40}
+
+{\bf See:}\\
+\pagefrom{BiModule}{BMODULE}
+\pagefrom{CoercibleTo}{KOERCE}
+\pagefrom{DifferentialExtension}{DIFEXT}
+\pagefrom{IndexedAggregate}{IXAGG}
+\pagefrom{Finite}{FINITE}
+\pagefrom{FullyLinearlyExplicitRingOver}{FLINEXP}
+\pagefrom{FullyRetractableTo}{FRETRCT}
+\pagefrom{OrderedRing}{ORDRING}
+\pagefrom{OrderedAbelianMonoidSup}{OAMONS}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\cross{DIRPCAT}{0} &
+\cross{DIRPCAT}{1} &
+\cross{DIRPCAT}{abs} &
+\cross{DIRPCAT}{any?} &
+\cross{DIRPCAT}{characteristic} \\
+\cross{DIRPCAT}{coerce} &
+\cross{DIRPCAT}{copy} &
+\cross{DIRPCAT}{count} &
+\cross{DIRPCAT}{count} &
+\cross{DIRPCAT}{D} \\
+\cross{DIRPCAT}{differentiate} &
+\cross{DIRPCAT}{dimension} &
+\cross{DIRPCAT}{directProduct} &
+\cross{DIRPCAT}{dot} &
+\cross{DIRPCAT}{elt} \\
+\cross{DIRPCAT}{empty} &
+\cross{DIRPCAT}{empty?} &
+\cross{DIRPCAT}{entry?} &
+\cross{DIRPCAT}{entries} &
+\cross{DIRPCAT}{eq?} \\
+\cross{DIRPCAT}{eval} &
+\cross{DIRPCAT}{every?} &
+\cross{DIRPCAT}{fill!} &
+\cross{DIRPCAT}{first} &
+\cross{DIRPCAT}{hash} \\
+\cross{DIRPCAT}{index} &
+\cross{DIRPCAT}{index?} &
+\cross{DIRPCAT}{indices} &
+\cross{DIRPCAT}{latex} &
+\cross{DIRPCAT}{less?} \\
+\cross{DIRPCAT}{lookup} &
+\cross{DIRPCAT}{map} &
+\cross{DIRPCAT}{map!} &
+\cross{DIRPCAT}{max} &
+\cross{DIRPCAT}{maxIndex} \\
+\cross{DIRPCAT}{member?} &
+\cross{DIRPCAT}{members} &
+\cross{DIRPCAT}{min} &
+\cross{DIRPCAT}{minIndex} &
+\cross{DIRPCAT}{more?} \\
+\cross{DIRPCAT}{negative?} &
+\cross{DIRPCAT}{one?} &
+\cross{DIRPCAT}{parts} &
+\cross{DIRPCAT}{positive?} &
+\cross{DIRPCAT}{qelt} \\
+\cross{DIRPCAT}{qsetelt!} &
+\cross{DIRPCAT}{random} &
+\cross{DIRPCAT}{recip} &
+\cross{DIRPCAT}{reducedSystem} &
+\cross{DIRPCAT}{retract} \\
+\cross{DIRPCAT}{retractIfCan} &
+\cross{DIRPCAT}{sample} &
+\cross{DIRPCAT}{setelt} &
+\cross{DIRPCAT}{sign} &
+\cross{DIRPCAT}{size} \\
+\cross{DIRPCAT}{size?} &
+\cross{DIRPCAT}{subtractIfCan} &
+\cross{DIRPCAT}{sup} &
+\cross{DIRPCAT}{swap!} &
+\cross{DIRPCAT}{unitVector} \\
+\cross{DIRPCAT}{zero?} &
+\cross{DIRPCAT}{?\~{}=?} &
+\cross{DIRPCAT}{-?} &
+\cross{DIRPCAT}{?.?} &
+\cross{DIRPCAT}{\#?} \\
+\cross{DIRPCAT}{?*?} &
+\cross{DIRPCAT}{?**?} &
+\cross{DIRPCAT}{?+?} &
+\cross{DIRPCAT}{?-?} &
+\cross{DIRPCAT}{?/?} \\
+\cross{DIRPCAT}{?$<$?} &
+\cross{DIRPCAT}{?$<=$?} &
+\cross{DIRPCAT}{?=?} &
+\cross{DIRPCAT}{?$>$?} &
+\cross{DIRPCAT}{?$>=$?} \\
+\cross{DIRPCAT}{?\^{}?} &&&&
+\end{tabular}
+
+{\bf Attributes Exported:}
+\begin{itemize}
+\item {\bf \cross{DIRPCAT}{finiteAggregate}}
+is true if it is an aggregate with a finite number of elements.
+\item if \#2 has commutativeRing then commutative(``*'') where
+{\bf \cross{DIRPCAT}{commutative(``*'')}}
+is true if it has an operation $"*": (D,D) -> D$
+which is commutative.
+\item if \#2 has unitsKnown then unitsKnown where
+{\bf \cross{DIRPCAT}{unitsKnown}}
+is true if a monoid (a multiplicative semigroup with a 1) has 
+unitsKnown means that  the operation {\tt recip} can only return 
+``failed'' if its argument is not a unit.
+\item if \#2 has Ring then rightUnitary where
+{\bf \cross{DIRPCAT}{leftUnitary}}
+is true if $1 * x = x$ for all x.
+\item if \#2 has Ring then rightUnitary where
+{\bf \cross{DIRPCAT}{rightUnitary}}
+is true if $x * 1 = x$ for all x.
+\item {\bf nil}
+\end{itemize}
+
+These are directly exported but not implemented:
+\begin{verbatim}
+ directProduct : Vector R -> %
+ dot : (%,%) -> R if R has RING
+ unitVector : PositiveInteger -> % if R has RING
+ ?*? : (R,%) -> % if R has MONOID
+ ?*? : (%,R) -> % if R has MONOID
+\end{verbatim}
+
+These are implemented by this category:
+\begin{verbatim}
+ characteristic : () -> NonNegativeInteger if R has RING
+ coerce : Integer -> % 
+   if and(has(R,RetractableTo Integer),
+          has(R,SetCategory)) 
+   or R has RING
+ differentiate : (%,(R -> R)) -> % if R has RING
+ dimension : () -> CardinalNumber if R has FIELD
+ reducedSystem : Matrix % -> Matrix R if R has RING
+ reducedSystem :
+    (Matrix %,Vector %) ->
+       Record(mat: Matrix R,vec: Vector R) 
+          if R has RING
+ size : () -> NonNegativeInteger if R has FINITE
+ ?/? : (%,R) -> % if R has FIELD
+\end{verbatim}
+
+These exports come from \refto{IndexedAggregate}(a:SetCategory,R:Type):
+\begin{verbatim}
+ any? : ((R -> Boolean),%) -> Boolean if $ has finiteAggregate
+ coerce : % -> OutputForm if R has SETCAT
+ copy : % -> %                        
+ count : (R,%) -> NonNegativeInteger 
+   if R has SETCAT 
+   and $ has finiteAggregate
+ count : ((R -> Boolean),%) -> NonNegativeInteger 
+   if $ has finiteAggregate
+ elt : (%,Integer,R) -> R
+ empty : () -> %                      
+ empty? : % -> Boolean
+ entries : % -> List R                
+ entry? : (R,%) -> Boolean 
+   if $ has finiteAggregate 
+   and R has SETCAT
+ eq? : (%,%) -> Boolean
+ eval : (%,List R,List R) -> % 
+   if R has EVALAB R 
+   and R has SETCAT
+ eval : (%,R,R) -> % 
+   if R has EVALAB R 
+   and R has SETCAT
+ eval : (%,Equation R) -> % 
+   if R has EVALAB R 
+   and R has SETCAT
+ eval : (%,List Equation R) -> % 
+   if R has EVALAB R 
+   and R has SETCAT
+ every? : ((R -> Boolean),%) -> Boolean 
+   if $ has finiteAggregate
+ fill! : (%,R) -> % if $ has shallowlyMutable
+ first : % -> R if Integer has ORDSET
+ hash : % -> SingleInteger if R has SETCAT
+ index? : (Integer,%) -> Boolean      
+ indices : % -> List Integer
+ less? : (%,NonNegativeInteger) -> Boolean
+ latex : % -> String if R has SETCAT
+ map : ((R -> R),%) -> %              
+ map! : ((R -> R),%) -> % if $ has shallowlyMutable
+ maxIndex : % -> Integer if Integer has ORDSET
+ member? : (R,%) -> Boolean 
+   if R has SETCAT 
+   and $ has finiteAggregate
+ members : % -> List R if $ has finiteAggregate
+ minIndex : % -> Integer if Integer has ORDSET
+ more? : (%,NonNegativeInteger) -> Boolean
+ parts : % -> List R if $ has finiteAggregate
+ qelt : (%,Integer) -> R
+ qsetelt! : (%,Integer,R) -> R if $ has shallowlyMutable
+ sample : () -> %                     
+ setelt : (%,Integer,R) -> R if $ has shallowlyMutable
+ size? : (%,NonNegativeInteger) -> Boolean
+ swap! : (%,Integer,Integer) -> Void if $ has shallowlyMutable
+ #? : % -> NonNegativeInteger if $ has finiteAggregate
+ ?.? : (%,Integer) -> R               
+ ?=? : (%,%) -> Boolean if R has SETCAT
+ ?~=? : (%,%) -> Boolean if R has SETCAT
+\end{verbatim}
+
+These exports come from \refto{CoercibleTo}(Vector(R:Type)):
+\begin{verbatim}
+ coerce : % -> Vector R
+\end{verbatim}
+
+These exports come from \refto{FullyRetractableTo}(R:SetCategory):
+\begin{verbatim}
+ coerce : R -> % if R has SETCAT
+ coerce : Fraction Integer -> % 
+   if and(has(R,RetractableTo Fraction Integer),
+          has(R,SetCategory))
+ retract : % -> Integer 
+   if and(has(R,RetractableTo Integer),
+          has(R,SetCategory))
+ retract : % -> R if R has SETCAT
+ retract : % -> Fraction Integer 
+   if and(has(R,RetractableTo Fraction Integer),
+          has(R,SetCategory))
+ retractIfCan : % -> Union(Integer,"failed") 
+   if and(has(R,RetractableTo Integer),
+          has(R,SetCategory))
+ retractIfCan : % -> Union(R,"failed") if R has SETCAT
+ retractIfCan : % -> Union(Fraction Integer,"failed") 
+   if and(has(R,RetractableTo Fraction Integer),
+          has(R,SetCategory))
+\end{verbatim}
+
+These exports come from \refto{BiModule}(R:Ring,R:Ring):
+\begin{verbatim}
+ 0 : () -> % if R has CABMON          
+ subtractIfCan : (%,%) -> Union(%,"failed") if R has CABMON
+ zero? : % -> Boolean if R has CABMON
+ ?+? : (%,%) -> % if R has ABELSG
+ ?*? : (PositiveInteger,%) -> % if R has ABELSG
+ ?*? : (NonNegativeInteger,%) -> % if R has CABMON
+ ?*? : (Integer,%) -> % if R has RING
+ ?-? : (%,%) -> % if R has RING
+ -? : % -> % if R has RING            
+\end{verbatim}
+
+These exports come from \refto{DifferentialExtension}(R:Ring):
+\begin{verbatim}
+ 1 : () -> % if R has RING
+ D : (%,(R -> R)) -> % if R has RING
+ D : (%,(R -> R),NonNegativeInteger) -> % if R has RING
+ D : % -> % if and(has(R,DifferentialRing),has(R,Ring))
+ D : (%,NonNegativeInteger) -> % 
+   if and(has(R,DifferentialRing),has(R,Ring))
+ differentiate : (%,NonNegativeInteger) -> % 
+   if and(has(R,DifferentialRing),has(R,Ring))
+ D : (%,List Symbol,List NonNegativeInteger) -> % 
+   if and(has(R,PartialDifferentialRing Symbol),has(R,Ring))
+ D : (%,Symbol,NonNegativeInteger) -> % 
+   if and(has(R,PartialDifferentialRing Symbol),has(R,Ring))
+ D : (%,List Symbol) -> % 
+   if and(has(R,PartialDifferentialRing Symbol),has(R,Ring))
+ D : (%,Symbol) -> % 
+   if and(has(R,PartialDifferentialRing Symbol),has(R,Ring))
+ differentiate : (%,List Symbol,List NonNegativeInteger) -> % 
+   if and(has(R,PartialDifferentialRing Symbol),has(R,Ring))
+ differentiate : (%,Symbol,NonNegativeInteger) -> % 
+   if and(has(R,PartialDifferentialRing Symbol),has(R,Ring))
+ differentiate : (%,List Symbol) -> % 
+   if and(has(R,PartialDifferentialRing Symbol),has(R,Ring))
+ differentiate : % -> % 
+   if and(has(R,DifferentialRing),has(R,Ring))
+ differentiate : (%,(R -> R),NonNegativeInteger) -> % 
+   if R has RING
+ differentiate : (%,Symbol) -> % 
+   if and(has(R,PartialDifferentialRing Symbol),has(R,Ring))
+ one? : % -> Boolean if R has RING
+ recip : % -> Union(%,"failed") if R has RING
+ ?*? : (%,%) -> % if R has RING
+ ?**? : (%,PositiveInteger) -> % if R has RING
+ ?**? : (%,NonNegativeInteger) -> % if R has RING
+ ?^? : (%,PositiveInteger) -> % if R has RING
+ ?^? : (%,NonNegativeInteger) -> % if R has RING
+\end{verbatim}
+
+These exports come from \refto{FullyLinearlyExplicitRingOver}(R:Ring):
+\begin{verbatim}
+ reducedSystem :
+   (Matrix %,Vector %) -> 
+     Record(mat: Matrix Integer,vec: Vector Integer) 
+       if and(has(R,LinearlyExplicitRingOver Integer),has(R,Ring))
+ reducedSystem : Matrix % -> Matrix Integer 
+   if and(has(R,LinearlyExplicitRingOver Integer),has(R,Ring))
+\end{verbatim}
+
+These exports come from \refto{Finite}():
+\begin{verbatim}
+ index : PositiveInteger -> % if R has FINITE
+ lookup : % -> PositiveInteger if R has FINITE
+ random : () -> % if R has FINITE
+\end{verbatim}
+
+These exports come from \refto{OrderedRing}():
+\begin{verbatim}
+ abs : % -> % if R has ORDRING
+ max : (%,%) -> % if R has ORDRING or R has OAMONS
+ min : (%,%) -> % if R has ORDRING or R has OAMONS
+ negative? : % -> Boolean if R has ORDRING
+ positive? : % -> Boolean if R has ORDRING
+ sign : % -> Integer if R has ORDRING
+ ?<? : (%,%) -> Boolean if R has ORDRING or R has OAMONS
+ ?<=? : (%,%) -> Boolean if R has ORDRING or R has OAMONS
+ ?>? : (%,%) -> Boolean if R has ORDRING or R has OAMONS
+ ?>=? : (%,%) -> Boolean if R has ORDRING or R has OAMONS
+\end{verbatim}
+
+These exports come from \refto{OrderedAbelianMonoidSup}():
+\begin{verbatim}
+ sup : (%,%) -> % if R has OAMONS
+\end{verbatim}
+
+<<category DIRPCAT DirectProductCategory>>=
+)abbrev category DIRPCAT DirectProductCategory
+-- all direct product category domains must be compiled
+-- without subsumption, set SourceLevelSubset to EQUAL
+--)bo $noSubsumption := true
+ 
+--% DirectProductCategory
+ 
+++ Author:
+++ Date Created:
+++ Date Last Updated:
+++ Basic Functions:
+++ Related Constructors: DirectProduct
+++ Also See: VectorCategory
+++ AMS Classifications:
+++ Keywords:
+++ References:
+++ Description:
+++   This category represents a finite cartesian product of a given type.
+++ Many categorical properties are preserved under this construction.
+ 
+DirectProductCategory(dim:NonNegativeInteger, R:Type): Category ==
+  Join(IndexedAggregate(Integer, R), CoercibleTo Vector R) with
+         finiteAggregate
+           ++ attribute to indicate an aggregate of finite size
+         directProduct: Vector R -> %
+           ++ directProduct(v) converts the vector v to become
+           ++ a direct product. Error: if the length of v is
+           ++ different from dim.
+         if R has SetCategory then FullyRetractableTo R
+         if R has Ring then
+           BiModule(R, R)
+           DifferentialExtension R
+           FullyLinearlyExplicitRingOver R
+           unitVector: PositiveInteger -> %
+             ++ unitVector(n) produces a vector with 1 in position n and
+             ++ zero elsewhere.
+           dot: (%, %) -> R
+             ++ dot(x,y) computes the inner product of the vectors x and y.
+         if R has AbelianSemiGroup then AbelianSemiGroup
+         if R has CancellationAbelianMonoid then CancellationAbelianMonoid
+         if R has Monoid then
+            Monoid
+           _* : (R, %) -> %
+             ++ r * y multiplies the element r times each component of the
+             ++ vector y.
+           _* : (%, R) -> %
+             ++ y*r multiplies each component of the vector y by the element r.
+         if R has Finite then Finite
+         if R has CommutativeRing then
+           Algebra R
+           CommutativeRing
+         if R has unitsKnown then unitsKnown
+         if R has OrderedRing then OrderedRing
+         if R has OrderedAbelianMonoidSup then OrderedAbelianMonoidSup
+         if R has Field then VectorSpace R
+ add
+      if R has Ring then
+        equation2R: Vector % -> Matrix R
+ 
+        coerce(n:Integer):%          == n::R::%
+
+        characteristic()             == characteristic()$R
+
+        differentiate(z:%, d:R -> R) == map(d, z)
+ 
+        equation2R v ==
+          ans:Matrix(R) := new(dim, #v, 0)
+          for i in minRowIndex ans .. maxRowIndex ans repeat
+            for j in minColIndex ans .. maxColIndex ans repeat
+              qsetelt_!(ans, i, j, qelt(qelt(v, j), i))
+          ans
+ 
+        reducedSystem(m:Matrix %):Matrix(R) ==
+          empty? m => new(0, 0, 0)
+          reduce(vertConcat, [equation2R row(m, i)
+                 for i in minRowIndex m .. maxRowIndex m])$List(Matrix R)
+ 
+        reducedSystem(m:Matrix %, v:Vector %):
+          Record(mat:Matrix R, vec:Vector R) ==
+            vh:Vector(R) :=
+              empty? v => empty()
+              rh := reducedSystem(v::Matrix %)@Matrix(R)
+              column(rh, minColIndex rh)
+            [reducedSystem(m)@Matrix(R), vh]
+ 
+      if R has Finite then size == size$R ** dim
+ 
+      if R has Field then
+        x / b       == x * inv b
+
+        dimension() == dim::CardinalNumber
+ 
+@
+<<DIRPCAT.dotabb>>=
+"DIRPCAT"
+ [color=lightblue,href="bookvol10.2.pdf#nameddest=DIRPCAT"];
+"DIRPCAT" -> "IXAGG"
+"DIRPCAT" -> "KOERCE"
+"DIRPCAT" -> "FRETRCT"
+"DIRPCAT" -> "BMODULE"
+"DIRPCAT" -> "DIFEXT"
+"DIRPCAT" -> "FLINEXP"
+"DIRPCAT" -> "FINITE"
+"DIRPCAT" -> "ORDRING"
+"DIRPCAT" -> "OAMONS"
+
+@
+<<DIRPCAT.dotfull>>=
+"DirectProductCategory(a:NonNegativeInteger,b:Type)"
+ [color=lightblue,href="bookvol10.2.pdf#nameddest=DIRPCAT"];
+"DirectProductCategory(a:NonNegativeInteger,b:Type)"
+  -> "IndexedAggregate(a:SetCategory,b:Type)"
+"DirectProductCategory(a:NonNegativeInteger,b:Type)"
+  -> "CoercibleTo(a:Type)"
+"DirectProductCategory(a:NonNegativeInteger,b:Type)"
+  -> "FullyRetractableTo(a:Type)"
+"DirectProductCategory(a:NonNegativeInteger,b:Type)"
+  -> "BiModule(a:Ring,b:Ring)"
+"DirectProductCategory(a:NonNegativeInteger,b:Type)"
+  -> "DifferentialExtension(a:Ring)"
+"DirectProductCategory(a:NonNegativeInteger,b:Type)"
+  -> "FullyLinearlyExplicitRingOver(a:Ring)"
+"DirectProductCategory(a:NonNegativeInteger,b:Type)"
+  -> "Finite()"
+"DirectProductCategory(a:NonNegativeInteger,b:Type)"
+  -> "OrderedRing()"
+"DirectProductCategory(a:NonNegativeInteger,b:Type)"
+  -> "OrderedAbelianMonoidSup()"
+
+@
+<<DIRPCAT.dotpic>>=
+digraph pic {
+ fontsize=10;
+ bgcolor="#FFFF66";
+ node [shape=box, color=white, style=filled];
+
+"DirectProductCategory(a:NonNegativeInteger,b:Type)" [color=lightblue];
+"DirectProductCategory(a:NonNegativeInteger,b:Type)" -> "BMODULE..."
+"DirectProductCategory(a:NonNegativeInteger,b:Type)" -> "KOERCE..."
+"DirectProductCategory(a:NonNegativeInteger,b:Type)" -> "DIFEXT..."
+"DirectProductCategory(a:NonNegativeInteger,b:Type)" -> "FINITE..."
+"DirectProductCategory(a:NonNegativeInteger,b:Type)" -> "FLINEXP..."
+"DirectProductCategory(a:NonNegativeInteger,b:Type)" -> "FRETRCT..."
+"DirectProductCategory(a:NonNegativeInteger,b:Type)" -> "IXAGG..."
+"DirectProductCategory(a:NonNegativeInteger,b:Type)" -> "OAMONS..."
+"DirectProductCategory(a:NonNegativeInteger,b:Type)" -> "ORDRING..."
+
+"BMODULE..." [color=lightblue];
+"KOERCE..." [color=lightblue];
+"DIFEXT..." [color=lightblue];
+"FINITE..." [color=lightblue];
+"FLINEXP..." [color=lightblue];
+"FRETRCT..." [color=lightblue];
+"IXAGG..." [color=lightblue];
+"OAMONS..." [color=lightblue];
+"ORDRING..." [color=lightblue];
 
 }
 
@@ -34118,7 +37632,7 @@ is true if\\
 {\tt unitCanonical(a)*unitCanonical(b) = unitCanonical(a*b)}.
 \item {\bf \cross{FPC}{noZeroDivisors}}
 is true if $x * y \ne 0$ implies both x and y are non-zero.
-\item {\bf \cross{FPC}{commutative("*")}}
+\item {\bf \cross{FPC}{commutative(``*'')}}
 is true if it has an operation $"*": (D,D) -> D$
 which is commutative.
 \item {\bf \cross{FPC}{unitsKnown}}
@@ -34687,8 +38201,8 @@ if and only if {\tt unitCanonical(a) = unitCanonical(b)}.
 \item if \$ has IntegralDomain then canonicalsClosed where
 {\bf \cross{FS}{canonicalsClosed}} is true if\\
 {\tt unitCanonical(a)*unitCanonical(b) = unitCanonical(a*b)}.
-\item if \$ has IntegralDomain then commutative("*") where
-{\bf \cross{FS}{commutative("*")}}
+\item if \$ has IntegralDomain then commutative(``*'') where
+{\bf \cross{FS}{commutative(``*'')}}
 is true if it has an operation $"*": (D,D) -> D$
 which is commutative.
 \item if \$ has Ring or Group then unitsKnown where
@@ -35809,7 +39323,6 @@ digraph pic {
 "RETRACT..." [color=lightblue];
 }
 
-
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \pagehead{QuotientFieldCategory}{QFCAT}
@@ -35928,7 +39441,7 @@ is true if\\
 {\tt unitCanonical(a)*unitCanonical(b) = unitCanonical(a*b)}.
 \item {\bf \cross{QFCAT}{noZeroDivisors}}
 is true if $x * y \ne 0$ implies both x and y are non-zero.
-\item {\bf \cross{QFCAT}{commutative("*")}}
+\item {\bf \cross{QFCAT}{commutative(``*'')}}
 is true if it has an operation $"*": (D,D) -> D$
 which is commutative.
 \item {\bf \cross{QFCAT}{unitsKnown}}
@@ -36414,7 +39927,6 @@ digraph pic {
 
 }
 
-
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \pagehead{RealNumberSystem}{RNS}
@@ -36763,6 +40275,1785 @@ digraph pic {
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\pagehead{RecursivePolynomialCategory}{RPOLCAT}
+\pagepic{ps/v102recursivepolynomialcategory.ps}{RPOLCAT}{0.30}
+
+{\bf See:}\\
+\pagefrom{PolynomialCategory}{POLYCAT}
+
+{\bf Exports:}\\
+\begin{tabular}{lll}
+\cross{RPOLCAT}{0} &
+\cross{RPOLCAT}{1} &
+\cross{RPOLCAT}{associates?} \\
+\cross{RPOLCAT}{binomThmExpt} &
+\cross{RPOLCAT}{characteristic} &
+\cross{RPOLCAT}{charthRoot} \\
+\cross{RPOLCAT}{coefficient} &
+\cross{RPOLCAT}{coefficients} &
+\cross{RPOLCAT}{coerce} \\
+\cross{RPOLCAT}{conditionP} &
+\cross{RPOLCAT}{convert} &
+\cross{RPOLCAT}{D} \\
+\cross{RPOLCAT}{deepestInitial} &
+\cross{RPOLCAT}{deepestTail} &
+\cross{RPOLCAT}{degree} \\
+\cross{RPOLCAT}{differentiate} &
+\cross{RPOLCAT}{discriminant} &
+\cross{RPOLCAT}{differentiate} \\
+\cross{RPOLCAT}{eval} &
+\cross{RPOLCAT}{exactQuotient} &
+\cross{RPOLCAT}{exactQuotient!} \\
+\cross{RPOLCAT}{exquo} &
+\cross{RPOLCAT}{extendedSubResultantGcd} &
+\cross{RPOLCAT}{factor} \\
+\cross{RPOLCAT}{factorPolynomial} &
+\cross{RPOLCAT}{factorSquareFreePolynomial} &
+\cross{RPOLCAT}{gcd} \\
+\cross{RPOLCAT}{gcdPolynomial} &
+\cross{RPOLCAT}{ground} &
+\cross{RPOLCAT}{ground?} \\
+\cross{RPOLCAT}{halfExtendedSubResultantGcd1} &
+\cross{RPOLCAT}{halfExtendedSubResultantGcd2} &
+\cross{RPOLCAT}{hash} \\
+\cross{RPOLCAT}{head} &
+\cross{RPOLCAT}{headReduce} &
+\cross{RPOLCAT}{headReduced?} \\
+\cross{RPOLCAT}{infRittWu?} &
+\cross{RPOLCAT}{init} &
+\cross{RPOLCAT}{initiallyReduce} \\
+\cross{RPOLCAT}{initiallyReduced?} &
+\cross{RPOLCAT}{isExpt} &
+\cross{RPOLCAT}{isPlus} \\
+\cross{RPOLCAT}{isTimes} &
+\cross{RPOLCAT}{iteratedInitials} &
+\cross{RPOLCAT}{lastSubResultant} \\
+\cross{RPOLCAT}{latex} &
+\cross{RPOLCAT}{LazardQuotient} &
+\cross{RPOLCAT}{LazardQuotient2} \\
+\cross{RPOLCAT}{lazyPquo} &
+\cross{RPOLCAT}{lazyPrem} &
+\cross{RPOLCAT}{lazyPremWithDefault} \\
+\cross{RPOLCAT}{lazyPseudoDivide} &
+\cross{RPOLCAT}{lazyResidueClass} &
+\cross{RPOLCAT}{lcm} \\
+\cross{RPOLCAT}{leadingCoefficient} &
+\cross{RPOLCAT}{leadingMonomial} &
+\cross{RPOLCAT}{leastMonomial} \\
+\cross{RPOLCAT}{mainCoefficients} &
+\cross{RPOLCAT}{mainContent} &
+\cross{RPOLCAT}{mainMonomial} \\
+\cross{RPOLCAT}{mainPrimitivePart} &
+\cross{RPOLCAT}{mainSquareFreePart} &
+\cross{RPOLCAT}{mainVariable} \\
+\cross{RPOLCAT}{map} &
+\cross{RPOLCAT}{mapExponents} &
+\cross{RPOLCAT}{max} \\
+\cross{RPOLCAT}{mdeg} &
+\cross{RPOLCAT}{min} &
+\cross{RPOLCAT}{minimumDegree} \\
+\cross{RPOLCAT}{monic?} &
+\cross{RPOLCAT}{monicDivide} &
+\cross{RPOLCAT}{monicModulo} \\
+\cross{RPOLCAT}{monomial} &
+\cross{RPOLCAT}{monomial?} &
+\cross{RPOLCAT}{monomials} \\
+\cross{RPOLCAT}{multivariate} &
+\cross{RPOLCAT}{mvar} &
+\cross{RPOLCAT}{nextsubResultant2} \\
+\cross{RPOLCAT}{normalized?} &
+\cross{RPOLCAT}{numberOfMonomials} &
+\cross{RPOLCAT}{one?} \\
+\cross{RPOLCAT}{patternMatch} &
+\cross{RPOLCAT}{pomopo!} &
+\cross{RPOLCAT}{pquo} \\
+\cross{RPOLCAT}{prem} &
+\cross{RPOLCAT}{primPartElseUnitCanonical} &
+\cross{RPOLCAT}{primPartElseUnitCanonical!} \\
+\cross{RPOLCAT}{prime?} &
+\cross{RPOLCAT}{primitiveMonomials} &
+\cross{RPOLCAT}{primitivePart} \\
+\cross{RPOLCAT}{primitivePart!} &
+\cross{RPOLCAT}{pseudoDivide} &
+\cross{RPOLCAT}{quasiMonic?} \\
+\cross{RPOLCAT}{recip} &
+\cross{RPOLCAT}{reduced?} &
+\cross{RPOLCAT}{reducedSystem} \\
+\cross{RPOLCAT}{reductum} &
+\cross{RPOLCAT}{resultant} &
+\cross{RPOLCAT}{retract} \\
+\cross{RPOLCAT}{retractIfCan} &
+\cross{RPOLCAT}{RittWuCompare} &
+\cross{RPOLCAT}{sample} \\
+\cross{RPOLCAT}{solveLinearPolynomialEquation} &
+\cross{RPOLCAT}{squareFree} &
+\cross{RPOLCAT}{squareFreePart} \\
+\cross{RPOLCAT}{squareFreePolynomial} &
+\cross{RPOLCAT}{subResultantChain} &
+\cross{RPOLCAT}{subResultantGcd} \\
+\cross{RPOLCAT}{subtractIfCan} &
+\cross{RPOLCAT}{supRittWu?} &
+\cross{RPOLCAT}{tail} \\
+\cross{RPOLCAT}{totalDegree} &
+\cross{RPOLCAT}{unit?} &
+\cross{RPOLCAT}{unitCanonical} \\
+\cross{RPOLCAT}{unitNormal} &
+\cross{RPOLCAT}{univariate} &
+\cross{RPOLCAT}{variables} \\
+\cross{RPOLCAT}{zero?} &
+\cross{RPOLCAT}{?*?} &
+\cross{RPOLCAT}{?**?} \\
+\cross{RPOLCAT}{?+?} &
+\cross{RPOLCAT}{?-?} &
+\cross{RPOLCAT}{-?} \\
+\cross{RPOLCAT}{?=?} &
+\cross{RPOLCAT}{?\^{}?} &
+\cross{RPOLCAT}{?\~{}=?} \\
+\cross{RPOLCAT}{?/?} &
+\cross{RPOLCAT}{?$<$?} &
+\cross{RPOLCAT}{?$<=$?} \\
+\cross{RPOLCAT}{?$>$?} &
+\cross{RPOLCAT}{?$>=$?} &
+\end{tabular}
+
+{\bf Attributes Exported:}
+\begin{itemize}
+\item if \#1 has CommutativeRing then commutative(``*'') where
+{\bf \cross{RPOLCAT}{commutative(``*'')}}
+is true if it has an operation $"*": (D,D) -> D$
+which is commutative.
+\item if \#1 has IntegralDomain then noZeroDivisors where
+{\bf \cross{RPOLCAT}{noZeroDivisors}}
+is true if $x * y \ne 0$ implies both x and y are non-zero.
+\item if \#1 has canonicalUnitNormal then canonicalUnitNormal
+where {\bf \cross{RPOLCAT}{canonicalUnitNormal}}
+is true if we can choose a canonical representative for each class 
+of associate elements, that is {\tt associates?(a,b)} returns true 
+if and only if {\tt unitCanonical(a) = unitCanonical(b)}.
+\item {\bf \cross{RPOLCAT}{unitsKnown}}
+is true if a monoid (a multiplicative semigroup with a 1) has 
+unitsKnown means that  the operation {\tt recip} can only return 
+``failed'' if its argument is not a unit.
+\item {\bf \cross{RPOLCAT}{leftUnitary}}
+is true if $1 * x = x$ for all x.
+\item {\bf \cross{RPOLCAT}{rightUnitary}}
+is true if $x * 1 = x$ for all x.
+\end{itemize}
+
+These are directly exported but not implemented:
+\begin{verbatim}
+ exactQuotient! : (%,R) -> % if R has INTDOM
+ extendedSubResultantGcd : (%,%) -> Record(gcd: %,coef1: %,coef2: %) 
+   if R has INTDOM
+ halfExtendedSubResultantGcd1 : (%,%) -> Record(gcd: %,coef1: %) 
+   if R has INTDOM
+ halfExtendedSubResultantGcd2 : (%,%) -> Record(gcd: %,coef2: %) 
+   if R has INTDOM
+ lastSubResultant : (%,%) -> % if R has INTDOM
+ LazardQuotient : (%,%,NonNegativeInteger) -> %
+   if R has INTDOM
+ LazardQuotient2 : (%,%,%,NonNegativeInteger) -> %
+   if R has INTDOM
+ nextsubResultant2 : (%,%,%,%) -> % if R has INTDOM
+ resultant : (%,%) -> % if R has INTDOM
+ subResultantChain : (%,%) -> List % if R has INTDOM
+ subResultantGcd : (%,%) -> % if R has INTDOM
+\end{verbatim}
+
+These are implemented by this category:
+\begin{verbatim}
+ coerce : % -> OutputForm             
+ coerce : % -> Polynomial R if V has KONVERT SYMBOL
+ convert : % -> String
+   if R has RETRACT INT 
+   and V has KONVERT SYMBOL
+ convert : % -> Polynomial R if V has KONVERT SYMBOL
+ convert : Polynomial R -> % if V has KONVERT SYMBOL
+ convert : Polynomial Integer -> %
+   if not has(R,Algebra Fraction Integer) 
+   and R has ALGEBRA INT 
+   and V has KONVERT SYMBOL 
+   or R has ALGEBRA FRAC INT 
+   and V has KONVERT SYMBOL
+ convert : Polynomial Fraction Integer -> %
+   if R has ALGEBRA FRAC INT 
+   and V has KONVERT SYMBOL
+ deepestInitial : % -> %
+ deepestTail : % -> %                 
+ exactQuotient : (%,R) -> % if R has INTDOM
+ exactQuotient : (%,%) -> % if R has INTDOM
+ exactQuotient! : (%,%) -> % if R has INTDOM
+ gcd : (R,%) -> R if R has GCDDOM
+ head : % -> %
+ headReduce : (%,%) -> %              
+ headReduced? : (%,List %) -> Boolean
+ headReduced? : (%,%) -> Boolean
+ infRittWu? : (%,%) -> Boolean        
+ init : % -> %
+ initiallyReduce : (%,%) -> %         
+ initiallyReduced? : (%,%) -> Boolean
+ initiallyReduced? : (%,List %) -> Boolean
+ iteratedInitials : % -> List %
+ lazyPremWithDefault : (%,%) -> 
+   Record(coef: %,gap: NonNegativeInteger,remainder: %)
+ lazyPremWithDefault : (%,%,V) -> 
+   Record(coef: %,gap: NonNegativeInteger,remainder: %)
+ lazyPquo : (%,%) -> %                
+ lazyPquo : (%,%,V) -> %
+ lazyPrem : (%,%,V) -> %
+ lazyPrem : (%,%) -> %                
+ lazyPseudoDivide : (%,%) -> 
+   Record(coef: %,gap: NonNegativeInteger,quotient: %,remainder: %)
+ lazyPseudoDivide : (%,%,V) -> 
+   Record(coef: %,gap: NonNegativeInteger,quotient: %,remainder: %)
+ lazyResidueClass : (%,%) -> 
+   Record(polnum: %,polden: %,power: NonNegativeInteger)
+ leadingCoefficient : (%,V) -> %
+ leastMonomial : % -> %               
+ mainCoefficients : % -> List %
+ mainContent : % -> % if R has GCDDOM
+ mainMonomial : % -> %                
+ mainMonomials : % -> List %
+ mainPrimitivePart : % -> % if R has GCDDOM
+ mainSquareFreePart : % -> % if R has GCDDOM
+ mdeg : % -> NonNegativeInteger       
+ monic? : % -> Boolean                
+ monicModulo : (%,%) -> %
+ mvar : % -> V
+ normalized? : (%,%) -> Boolean       
+ normalized? : (%,List %) -> Boolean
+ pquo : (%,%) -> %                    
+ pquo : (%,%,V) -> %
+ prem : (%,%,V) -> %
+ prem : (%,%) -> %                    
+ primitivePart! : % -> % if R has GCDDOM
+ primPartElseUnitCanonical : % -> % if R has INTDOM
+ primPartElseUnitCanonical! : % -> % if R has INTDOM
+ pseudoDivide : (%,%) -> Record(quotient: %,remainder: %)
+ quasiMonic? : % -> Boolean           
+ reduced? : (%,%) -> Boolean
+ reduced? : (%,List %) -> Boolean     
+ reductum : (%,V) -> %                
+ retract : Polynomial R -> %
+   if not has(R,Algebra Fraction Integer) 
+   and not has(R,Algebra Integer) 
+   and V has KONVERT SYMBOL 
+   or not has(R,IntegerNumberSystem) 
+   and not has(R,Algebra Fraction Integer) 
+   and R has ALGEBRA INT 
+   and V has KONVERT SYMBOL 
+   or not has(R,QuotientFieldCategory Integer) 
+   and R has ALGEBRA FRAC INT 
+   and V has KONVERT SYMBOL
+ retract : Polynomial Integer -> %
+   if not has(R,Algebra Fraction Integer) 
+   and R has ALGEBRA INT 
+   and V has KONVERT SYMBOL 
+   or R has ALGEBRA FRAC INT 
+   and V has KONVERT SYMBOL
+ retract : Polynomial Fraction Integer -> %
+   if R has ALGEBRA FRAC INT and V has KONVERT SYMBOL
+ retractIfCan : Polynomial R -> Union(%,"failed")
+   if not has(R,Algebra Fraction Integer) 
+   and not has(R,Algebra Integer) 
+   and V has KONVERT SYMBOL 
+   or not has(R,IntegerNumberSystem) 
+   and not has(R,Algebra Fraction Integer) 
+   and R has ALGEBRA INT 
+   and V has KONVERT SYMBOL 
+   or not has(R,QuotientFieldCategory Integer) 
+   and R has ALGEBRA FRAC INT 
+   and V has KONVERT SYMBOL
+ retractIfCan : Polynomial Fraction Integer -> Union(%,"failed")
+   if R has ALGEBRA FRAC INT 
+   and V has KONVERT SYMBOL
+ retractIfCan : Polynomial Integer -> Union(%,"failed")
+   if not has(R,Algebra Fraction Integer) 
+   and R has ALGEBRA INT 
+   and V has KONVERT SYMBOL 
+   or R has ALGEBRA FRAC INT 
+   and V has KONVERT SYMBOL
+ RittWuCompare : (%,%) -> Union(Boolean,"failed")
+ supRittWu? : (%,%) -> Boolean
+ tail : % -> %                        
+\end{verbatim}
+
+These exports come from \refto{PolynomialCategory}(R,E,V)\\
+where R:Ring, E:OrderedAbelianMonoidSup, V:OrderedSet:
+\begin{verbatim}
+ 0 : () -> %
+ 1 : () -> %                          
+ associates? : (%,%) -> Boolean
+   if R has INTDOM
+ binomThmExpt : (%,%,NonNegativeInteger) -> %
+   if R has COMRING
+ characteristic : () -> NonNegativeInteger
+ charthRoot : % -> Union(%,"failed")
+   if and(has($,CharacteristicNonZero),
+      has(R,PolynomialFactorizationExplicit)) 
+   or R has CHARNZ
+ coefficient : (%,List V,List NonNegativeInteger) -> %
+ coefficient : (%,V,NonNegativeInteger) -> %
+ coefficient : (%,E) -> R
+ coefficients : % -> List R           
+ coerce : R -> %                      
+ coerce : Fraction Integer -> %
+   if R has RETRACT FRAC INT or R has ALGEBRA FRAC INT
+ coerce : V -> %
+ coerce : % -> % if R has INTDOM
+ coerce : Integer -> %
+ conditionP : Matrix % -> Union(Vector %,"failed")
+   if and(has($,CharacteristicNonZero),
+          has(R,PolynomialFactorizationExplicit))
+ content : % -> R if R has GCDDOM
+ content : (%,V) -> % if R has GCDDOM
+ convert : % -> Pattern Integer
+   if V has KONVERT PATTERN INT and R has KONVERT PATTERN INT
+ convert : % -> Pattern Float
+   if V has KONVERT PATTERN FLOAT and R has KONVERT PATTERN FLOAT
+ convert : % -> InputForm
+   if V has KONVERT INFORM and R has KONVERT INFORM
+ D : (%,List V) -> %                  
+ D : (%,V) -> %
+ D : (%,List V,List NonNegativeInteger) -> %
+ D : (%,V,NonNegativeInteger) -> %
+ degree : % -> E
+ degree : (%,List V) -> List NonNegativeInteger
+ degree : (%,V) -> NonNegativeInteger
+ differentiate : (%,List V,List NonNegativeInteger) -> %
+ differentiate : (%,V,NonNegativeInteger) -> %
+ differentiate : (%,List V) -> %      
+ differentiate : (%,V) -> %
+ discriminant : (%,V) -> % if R has COMRING
+ eval : (%,List Equation %) -> %
+ eval : (%,Equation %) -> %           
+ eval : (%,List %,List %) -> %        
+ eval : (%,%,%) -> %
+ eval : (%,V,R) -> %
+ eval : (%,List V,List R) -> %        
+ eval : (%,V,%) -> %
+ eval : (%,List V,List %) -> %        
+ exquo : (%,R) -> Union(%,"failed") if R has INTDOM
+ exquo : (%,%) -> Union(%,"failed") if R has INTDOM
+ factor : % -> Factored % if R has PFECAT
+ factorPolynomial : 
+   SparseUnivariatePolynomial % -> 
+     Factored SparseUnivariatePolynomial %
+      if R has PFECAT
+ factorSquareFreePolynomial : 
+   SparseUnivariatePolynomial % -> 
+     Factored SparseUnivariatePolynomial %
+       if R has PFECAT
+ gcd : (%,%) -> % if R has GCDDOM
+ gcd : List % -> % if R has GCDDOM
+ gcdPolynomial : 
+   (SparseUnivariatePolynomial %,
+    SparseUnivariatePolynomial %) -> 
+      SparseUnivariatePolynomial %
+        if R has GCDDOM
+ ground : % -> R                      
+ ground? : % -> Boolean
+ hash : % -> SingleInteger            
+ isExpt : % -> Union(Record(var: V,exponent: NonNegativeInteger),"failed")
+ isPlus : % -> Union(List %,"failed")
+ isTimes : % -> Union(List %,"failed")
+ latex : % -> String                  
+ lcm : (%,%) -> % if R has GCDDOM
+ lcm : List % -> % if R has GCDDOM
+ leadingCoefficient : % -> R          
+ leadingMonomial : % -> %
+ mainVariable : % -> Union(V,"failed")
+ map : ((R -> R),%) -> %              
+ mapExponents : ((E -> E),%) -> %
+ max : (%,%) -> % if R has ORDSET
+ min : (%,%) -> % if R has ORDSET
+ minimumDegree : % -> E
+ minimumDegree : (%,List V) -> List NonNegativeInteger
+ minimumDegree : (%,V) -> NonNegativeInteger
+ monicDivide : (%,%,V) -> Record(quotient: %,remainder: %)
+ monomial : (%,V,NonNegativeInteger) -> %
+ monomial : (%,List V,List NonNegativeInteger) -> %
+ monomial : (R,E) -> %                
+ monomial? : % -> Boolean
+ monomials : % -> List %              
+ multivariate : (SparseUnivariatePolynomial %,V) -> %
+ multivariate : (SparseUnivariatePolynomial R,V) -> %
+ numberOfMonomials : % -> NonNegativeInteger
+ one? : % -> Boolean
+ patternMatch : 
+   (%,Pattern Integer,PatternMatchResult(Integer,%)) -> 
+     PatternMatchResult(Integer,%)
+       if V has PATMAB INT and R has PATMAB INT
+ patternMatch : 
+   (%,Pattern Float,PatternMatchResult(Float,%)) -> 
+     PatternMatchResult(Float,%)
+      if V has PATMAB FLOAT and R has PATMAB FLOAT
+ pomopo! : (%,R,E,%) -> %             
+ prime? : % -> Boolean if R has PFECAT
+ primitiveMonomials : % -> List %
+ primitivePart : (%,V) -> % if R has GCDDOM
+ primitivePart : % -> % if R has GCDDOM
+ recip : % -> Union(%,"failed")
+ reducedSystem : Matrix % -> Matrix R
+ reducedSystem : (Matrix %,Vector %) ->
+    Record(mat: Matrix R,vec: Vector R)
+ reducedSystem : (Matrix %,Vector %) ->
+   Record(mat: Matrix Integer,vec: Vector Integer)
+     if R has LINEXP INT
+ reducedSystem : Matrix % -> Matrix Integer
+   if R has LINEXP INT
+ reductum : % -> %
+ resultant : (%,%,V) -> % if R has COMRING
+ retract : % -> R
+ retract : % -> Integer if R has RETRACT INT
+ retract : % -> Fraction Integer
+   if R has RETRACT FRAC INT
+ retract : % -> V                     
+ retractIfCan : % -> Union(R,"failed")
+ retractIfCan : % -> Union(Integer,"failed")
+   if R has RETRACT INT
+ retractIfCan : % -> Union(Fraction Integer,"failed")
+   if R has RETRACT FRAC INT
+ retractIfCan : % -> Union(V,"failed")
+ sample : () -> %                     
+ solveLinearPolynomialEquation : 
+   (List SparseUnivariatePolynomial %,
+    SparseUnivariatePolynomial %) -> 
+     Union(List SparseUnivariatePolynomial %,"failed")
+       if R has PFECAT
+ squareFree : % -> Factored % if R has GCDDOM
+ squareFreePart : % -> % if R has GCDDOM
+ squareFreePolynomial : 
+   SparseUnivariatePolynomial % -> 
+     Factored SparseUnivariatePolynomial %
+       if R has PFECAT
+ subtractIfCan : (%,%) -> Union(%,"failed")
+ totalDegree : (%,List V) -> NonNegativeInteger
+ totalDegree : % -> NonNegativeInteger
+ unit? : % -> Boolean if R has INTDOM
+ unitCanonical : % -> % if R has INTDOM
+ unitNormal : % -> Record(unit: %,canonical: %,associate: %)
+   if R has INTDOM
+ univariate : % -> SparseUnivariatePolynomial R
+ univariate : (%,V) -> SparseUnivariatePolynomial %
+ variables : % -> List V
+ zero? : % -> Boolean                 
+ ?+? : (%,%) -> %                     
+ ?=? : (%,%) -> Boolean
+ ?~=? : (%,%) -> Boolean
+ ?*? : (%,R) -> %                     
+ ?*? : (R,%) -> %
+ ?*? : (Fraction Integer,%) -> % if R has ALGEBRA FRAC INT
+ ?*? : (%,Fraction Integer) -> % if R has ALGEBRA FRAC INT
+ ?*? : (%,%) -> %                     
+ ?*? : (Integer,%) -> %
+ ?*? : (PositiveInteger,%) -> %       
+ ?*? : (NonNegativeInteger,%) -> %
+ ?/? : (%,R) -> % if R has FIELD
+ ?-? : (%,%) -> %
+ -? : % -> %                          
+ ?**? : (%,PositiveInteger) -> %
+ ?**? : (%,NonNegativeInteger) -> %
+ ?^? : (%,NonNegativeInteger) -> %
+ ?^? : (%,PositiveInteger) -> %       
+ ?<? : (%,%) -> Boolean if R has ORDSET
+ ?<=? : (%,%) -> Boolean if R has ORDSET
+ ?>? : (%,%) -> Boolean if R has ORDSET
+ ?>=? : (%,%) -> Boolean if R has ORDSET
+\end{verbatim}
+
+<<category RPOLCAT RecursivePolynomialCategory>>=
+)abbrev category RPOLCAT RecursivePolynomialCategory
+++ Author: Marc Moreno Maza
+++ Date Created: 04/22/1994
+++ Date Last Updated: 14/12/1998
+++ Basic Functions: mvar, mdeg, init, head, tail, prem, lazyPrem
+++ Related Constructors:
+++ Also See: 
+++ AMS Classifications:
+++ Keywords: polynomial, multivariate, ordered variables set
+++ References:
+++ Description:
+++ A category for general multi-variate polynomials with coefficients 
+++ in a ring, variables in an ordered set, and exponents from an 
+++ ordered abelian monoid, with a \axiomOp{sup} operation.
+++ When not constant, such a polynomial is viewed as a univariate polynomial 
+++ in its main variable w. r. t. to the total ordering on the elements in 
+++ the ordered set, so that some operations usually defined for univariate 
+++ polynomials make sense here.
+
+RecursivePolynomialCategory(R:Ring, E:OrderedAbelianMonoidSup, V:OrderedSet):_
+ Category == 
+  PolynomialCategory(R, E, V) with
+     mvar : $ -> V
+         ++ \axiom{mvar(p)} returns an error if \axiom{p} belongs to 
+         ++ \axiom{R}, otherwise returns its main variable w. r. t. to the 
+         ++ total ordering on the elements in \axiom{V}.
+     mdeg  : $ -> NonNegativeInteger 
+         ++ \axiom{mdeg(p)} returns an error if \axiom{p} is \axiom{0}, 
+         ++ otherwise, if \axiom{p} belongs to \axiom{R} returns \axiom{0}, 
+         ++ otherwise, returns the degree of \axiom{p} in its main variable.
+     init : $ -> $
+         ++ \axiom{init(p)} returns an error if \axiom{p} belongs to 
+         ++ \axiom{R}, otherwise returns its leading coefficient, where 
+         ++ \axiom{p} is viewed as a univariate polynomial in its main 
+         ++ variable.
+     head  : $ -> $
+         ++ \axiom{head(p)} returns \axiom{p} if \axiom{p} belongs to 
+         ++ \axiom{R}, otherwise returns its leading term (monomial in the 
+         ++ AXIOM sense), where \axiom{p} is viewed as a univariate polynomial
+         ++  in its main variable.
+     tail  : $ -> $
+         ++ \axiom{tail(p)} returns its reductum, where \axiom{p} is viewed 
+         ++ as a univariate polynomial in its main variable.
+     deepestTail : $ -> $
+         ++ \axiom{deepestTail(p)} returns \axiom{0} if \axiom{p} belongs to 
+         ++ \axiom{R}, otherwise returns tail(p), if \axiom{tail(p)} belongs 
+         ++ to  \axiom{R} or \axiom{mvar(tail(p)) < mvar(p)}, otherwise 
+         ++ returns \axiom{deepestTail(tail(p))}.
+     iteratedInitials : $ -> List $ 
+         ++ \axiom{iteratedInitials(p)} returns \axiom{[]} if \axiom{p} 
+         ++ belongs to \axiom{R}, 
+         ++ otherwise returns the list of the iterated initials of \axiom{p}.
+     deepestInitial : $ -> $ 
+         ++ \axiom{deepestInitial(p)} returns an error if \axiom{p} belongs 
+         ++ to \axiom{R}, 
+         ++ otherwise returns the last term of \axiom{iteratedInitials(p)}.
+     leadingCoefficient : ($,V) -> $
+         ++ \axiom{leadingCoefficient(p,v)} returns the leading coefficient 
+         ++ of \axiom{p}, where \axiom{p} is viewed as A univariate 
+         ++ polynomial in \axiom{v}.
+     reductum  : ($,V) -> $
+         ++ \axiom{reductum(p,v)} returns the reductum of \axiom{p}, where 
+         ++ \axiom{p} is viewed as a univariate polynomial in \axiom{v}. 
+     monic? : $ -> Boolean
+         ++ \axiom{monic?(p)} returns false if \axiom{p} belongs to \axiom{R}, 
+         ++ otherwise returns true iff \axiom{p} is monic as a univariate 
+         ++ polynomial in its main variable.
+     quasiMonic? : $ -> Boolean
+         ++ \axiom{quasiMonic?(p)} returns false if \axiom{p} belongs to 
+         ++ \axiom{R}, otherwise returns true iff the initial of \axiom{p} 
+         ++ lies in the base ring \axiom{R}.
+     mainMonomial : $ -> $ 
+         ++ \axiom{mainMonomial(p)} returns an error if \axiom{p} is 
+         ++ \axiom{O}, otherwise, if \axiom{p} belongs to \axiom{R} returns 
+         ++ \axiom{1}, otherwise, \axiom{mvar(p)} raised to the power 
+         ++ \axiom{mdeg(p)}.
+     leastMonomial : $ -> $ 
+         ++ \axiom{leastMonomial(p)} returns an error if \axiom{p} is 
+         ++ \axiom{O}, otherwise, if \axiom{p} belongs to \axiom{R} returns 
+         ++ \axiom{1}, otherwise, the monomial of \axiom{p} with lowest 
+         ++ degree, where \axiom{p} is viewed as a univariate polynomial in 
+         ++ its main variable.
+     mainCoefficients : $ -> List $ 
+         ++ \axiom{mainCoefficients(p)} returns an error if \axiom{p} is 
+         ++ \axiom{O}, otherwise, if \axiom{p} belongs to \axiom{R} returns 
+         ++ [p], otherwise returns the list of the coefficients of \axiom{p}, 
+         ++ where \axiom{p} is viewed as a univariate polynomial in its main 
+         ++ variable.
+     mainMonomials : $ -> List $ 
+         ++ \axiom{mainMonomials(p)} returns an error if \axiom{p} is 
+         ++ \axiom{O}, otherwise, if \axiom{p} belongs to \axiom{R} returns 
+         ++ [1], otherwise returns the list of the monomials of \axiom{p}, 
+         ++ where \axiom{p} is viewed as a univariate polynomial in its main 
+         ++ variable.
+     RittWuCompare : ($, $) -> Union(Boolean,"failed")
+         ++ \axiom{RittWuCompare(a,b)} returns \axiom{"failed"} if \axiom{a} 
+         ++ and \axiom{b} have same rank w.r.t. 
+         ++ Ritt and Wu Wen Tsun ordering using the refinement of Lazard, 
+         ++ otherwise returns \axiom{infRittWu?(a,b)}.
+     infRittWu?  : ($, $) -> Boolean
+         ++ \axiom{infRittWu?(a,b)} returns true if \axiom{a} is less than 
+         ++ \axiom{b} w.r.t. the Ritt and Wu Wen Tsun ordering using the 
+         ++ refinement of Lazard.
+     supRittWu? : ($, $) -> Boolean
+         ++ \axiom{supRittWu?(a,b)} returns true if \axiom{a} is greater 
+         ++ than \axiom{b} w.r.t. the Ritt and Wu Wen Tsun ordering using the 
+         ++ refinement of Lazard.
+     reduced? : ($,$) -> Boolean
+         ++ \axiom{reduced?(a,b)} returns true iff 
+         ++ \axiom{degree(a,mvar(b)) < mdeg(b)}.
+     reduced? : ($,List($)) -> Boolean
+         ++ \axiom{reduced?(q,lp)} returns true iff \axiom{reduced?(q,p)} 
+         ++ holds for every \axiom{p} in \axiom{lp}.
+     headReduced? : ($,$) -> Boolean
+         ++ \axiom{headReduced?(a,b)} returns true iff 
+         ++ \axiom{degree(head(a),mvar(b)) < mdeg(b)}.
+     headReduced? : ($,List($)) -> Boolean
+         ++ \axiom{headReduced?(q,lp)} returns true iff 
+         ++ \axiom{headReduced?(q,p)} holds for every \axiom{p} in \axiom{lp}.
+     initiallyReduced? : ($,$) -> Boolean
+         ++ \axiom{initiallyReduced?(a,b)} returns false iff there exists an 
+         ++ iterated initial of \axiom{a} which is not reduced w.r.t \axiom{b}.
+     initiallyReduced? :  ($,List($)) -> Boolean
+         ++ \axiom{initiallyReduced?(q,lp)} returns true iff 
+         ++ \axiom{initiallyReduced?(q,p)} holds for every \axiom{p} in 
+         ++ \axiom{lp}.
+     normalized? : ($,$) -> Boolean
+         ++ \axiom{normalized?(a,b)} returns true iff \axiom{a} and its 
+         ++ iterated initials have degree zero w.r.t. the main variable of 
+         ++ \axiom{b}
+     normalized? : ($,List($)) -> Boolean
+         ++ \axiom{normalized?(q,lp)} returns true iff 
+         ++ \axiom{normalized?(q,p)} holds 
+         ++ for every \axiom{p} in \axiom{lp}.
+     prem : ($, $) -> $
+         ++ \axiom{prem(a,b)} computes the pseudo-remainder of \axiom{a} by 
+         ++ \axiom{b}, both viewed as univariate polynomials in the main 
+         ++ variable of \axiom{b}.
+     pquo : ($, $) -> $
+         ++ \axiom{pquo(a,b)} computes the pseudo-quotient of \axiom{a} by 
+         ++ \axiom{b}, both viewed as univariate polynomials in the main 
+         ++ variable of \axiom{b}.
+     prem : ($, $, V) -> $
+         ++ \axiom{prem(a,b,v)} computes the pseudo-remainder of \axiom{a} 
+         ++ by \axiom{b}, both viewed as univariate polynomials in \axiom{v}.
+     pquo : ($, $, V) -> $
+         ++ \axiom{pquo(a,b,v)} computes the pseudo-quotient of \axiom{a} by 
+         ++ \axiom{b}, both viewed as univariate polynomials in \axiom{v}.
+     lazyPrem : ($, $) ->  $
+         ++ \axiom{lazyPrem(a,b)} returns the polynomial \axiom{r} reduced 
+         ++ w.r.t. \axiom{b} and such that \axiom{b} divides 
+         ++ \axiom{init(b)^e a - r} where \axiom{e} 
+         ++ is the number of steps of this pseudo-division.
+     lazyPquo : ($, $) ->  $
+         ++ \axiom{lazyPquo(a,b)} returns the polynomial \axiom{q} such that 
+         ++ \axiom{lazyPseudoDivide(a,b)} returns \axiom{[c,g,q,r]}.
+     lazyPrem : ($, $, V) -> $
+         ++ \axiom{lazyPrem(a,b,v)} returns the polynomial \axiom{r} 
+         ++ reduced w.r.t. \axiom{b} viewed as univariate polynomials in the 
+         ++ variable \axiom{v} such that \axiom{b} divides 
+         ++ \axiom{init(b)^e a - r} where \axiom{e} is the number of steps of 
+         ++ this pseudo-division.
+     lazyPquo : ($, $, V) ->  $
+         ++ \axiom{lazyPquo(a,b,v)} returns the polynomial \axiom{q} such that 
+         ++ \axiom{lazyPseudoDivide(a,b,v)} returns \axiom{[c,g,q,r]}.
+     lazyPremWithDefault : ($, $) -> _
+       Record (coef : $, gap : NonNegativeInteger, remainder : $)
+         ++ \axiom{lazyPremWithDefault(a,b)} returns \axiom{[c,g,r]}
+         ++ such that \axiom{r = lazyPrem(a,b)} and 
+         ++ \axiom{(c**g)*r = prem(a,b)}.
+     lazyPremWithDefault : ($, $, V) -> _
+       Record (coef : $, gap : NonNegativeInteger, remainder : $)
+         ++ \axiom{lazyPremWithDefault(a,b,v)} returns \axiom{[c,g,r]} 
+         ++ such that \axiom{r = lazyPrem(a,b,v)} and 
+         ++ \axiom{(c**g)*r = prem(a,b,v)}.
+     lazyPseudoDivide : ($,$) -> _
+       Record(coef:$, gap: NonNegativeInteger,quotient:$, remainder:$)
+         ++ \axiom{lazyPseudoDivide(a,b)} returns \axiom{[c,g,q,r]} 
+         ++ such that \axiom{[c,g,r] = lazyPremWithDefault(a,b)} and
+         ++ \axiom{q} is the pseudo-quotient computed in this lazy 
+         ++ pseudo-division.
+     lazyPseudoDivide : ($,$,V) -> _
+       Record(coef:$, gap:NonNegativeInteger, quotient:$, remainder: $)
+         ++ \axiom{lazyPseudoDivide(a,b,v)} returns \axiom{[c,g,q,r]} such 
+         ++ that  \axiom{r = lazyPrem(a,b,v)}, \axiom{(c**g)*r = prem(a,b,v)} 
+         ++ and \axiom{q} is the pseudo-quotient computed in this lazy 
+         ++ pseudo-division.
+     pseudoDivide : ($, $) -> Record (quotient : $, remainder : $)
+         ++ \axiom{pseudoDivide(a,b)} computes \axiom{[pquo(a,b),prem(a,b)]}, 
+         ++ both polynomials viewed as univariate polynomials in the main 
+         ++ variable of \axiom{b}, if \axiom{b} is not a constant polynomial.
+     monicModulo : ($, $) -> $ 
+         ++ \axiom{monicModulo(a,b)} computes \axiom{a mod b}, if \axiom{b} is 
+         ++ monic as univariate polynomial in its main variable.
+     lazyResidueClass : ($,$) -> _
+      Record(polnum:$, polden:$, power:NonNegativeInteger)
+         ++ \axiom{lazyResidueClass(a,b)} returns \axiom{[p,q,n]} where 
+         ++ \axiom{p / q**n} represents the residue class of \axiom{a} 
+         ++ modulo \axiom{b} and \axiom{p} is reduced w.r.t. \axiom{b} and 
+         ++ \axiom{q} is \axiom{init(b)}.
+     headReduce: ($, $) ->  $
+         ++ \axiom{headReduce(a,b)} returns a polynomial \axiom{r} such that 
+         ++ \axiom{headReduced?(r,b)} holds and there exists an integer 
+         ++ \axiom{e} such that \axiom{init(b)^e a - r} is zero modulo 
+         ++ \axiom{b}.
+     initiallyReduce: ($, $) ->  $
+         ++ \axiom{initiallyReduce(a,b)} returns a polynomial \axiom{r} such 
+         ++ that \axiom{initiallyReduced?(r,b)} holds and there exists an 
+         ++ integer \axiom{e} such that \axiom{init(b)^e a - r} is zero 
+         ++ modulo \axiom{b}.
+
+     if (V has ConvertibleTo(Symbol))
+     then 
+       CoercibleTo(Polynomial R)
+       ConvertibleTo(Polynomial R)
+       if R has Algebra Fraction Integer
+         then 
+           retractIfCan : Polynomial Fraction Integer -> Union($,"failed")
+               ++ \axiom{retractIfCan(p)} returns \axiom{p} as an element of 
+               ++ the current domain if all its variables belong to \axiom{V}.
+           retract : Polynomial Fraction Integer -> $
+               ++ \axiom{retract(p)} returns \axiom{p} as an element of the 
+               ++ current domain if \axiom{retractIfCan(p)} does not return 
+               ++ "failed", otherwise an error is produced.
+           convert : Polynomial Fraction Integer -> $
+               ++ \axiom{convert(p)} returns the same as \axiom{retract(p)}.
+           retractIfCan : Polynomial Integer -> Union($,"failed")
+               ++ \axiom{retractIfCan(p)} returns \axiom{p} as an element of 
+               ++ the current domain if all its variables belong to \axiom{V}.
+           retract : Polynomial Integer -> $
+               ++ \axiom{retract(p)} returns \axiom{p} as an element of the 
+               ++ current domain if \axiom{retractIfCan(p)} does not return 
+               ++ "failed", otherwise an error is produced.
+           convert : Polynomial Integer -> $
+               ++ \axiom{convert(p)} returns the same as \axiom{retract(p)}
+           if not (R has QuotientFieldCategory(Integer))
+             then
+               retractIfCan : Polynomial R -> Union($,"failed")
+                 ++ \axiom{retractIfCan(p)} returns \axiom{p} as an element 
+                 ++ of the current domain if all its variables belong to 
+                 ++ \axiom{V}.
+               retract : Polynomial R -> $
+                 ++ \axiom{retract(p)} returns \axiom{p} as an element of the 
+                 ++ current domain if \axiom{retractIfCan(p)} does not 
+                 ++ return "failed", otherwise an error is produced.
+       if (R has Algebra Integer) and not(R has Algebra Fraction Integer)
+         then 
+           retractIfCan : Polynomial Integer -> Union($,"failed")
+               ++ \axiom{retractIfCan(p)} returns \axiom{p} as an element of 
+               ++ the current domain if all its variables belong to \axiom{V}.
+           retract : Polynomial Integer -> $
+               ++ \axiom{retract(p)} returns \axiom{p} as an element of the 
+               ++ current domain if \axiom{retractIfCan(p)} does not return 
+               ++ "failed", otherwise an error is produced.
+           convert : Polynomial Integer -> $
+               ++ \axiom{convert(p)} returns the same as \axiom{retract(p)}.
+           if not (R has IntegerNumberSystem)
+             then
+               retractIfCan : Polynomial R -> Union($,"failed")
+                 ++ \axiom{retractIfCan(p)} returns \axiom{p} as an element 
+                 ++ of the current domain if all its variables belong to 
+                 ++ \axiom{V}.
+               retract : Polynomial R -> $
+                 ++ \axiom{retract(p)} returns \axiom{p} as an element of the 
+                 ++ current domain if \axiom{retractIfCan(p)} does not 
+                 ++ return "failed", otherwise an error is produced.
+       if not(R has Algebra Integer) and not(R has Algebra Fraction Integer)
+         then 
+           retractIfCan : Polynomial R -> Union($,"failed")
+             ++ \axiom{retractIfCan(p)} returns \axiom{p} as an element of 
+             ++ the current domain if all its variables belong to \axiom{V}.
+           retract : Polynomial R -> $
+             ++ \axiom{retract(p)} returns \axiom{p} as an element of the 
+             ++ current domain if \axiom{retractIfCan(p)} does not return 
+             ++ "failed", otherwise an error is produced.
+       convert : Polynomial R -> $
+         ++ \axiom{convert(p)} returns \axiom{p} as an element of the current 
+         ++ domain if all its variables belong to \axiom{V}, otherwise an 
+         ++ error is produced.
+
+       if R has RetractableTo(Integer)
+       then
+         ConvertibleTo(String)
+
+     if R has IntegralDomain
+     then
+       primPartElseUnitCanonical : $ -> $
+           ++ \axiom{primPartElseUnitCanonical(p)} returns 
+           ++ \axiom{primitivePart(p)} if \axiom{R} is a gcd-domain, 
+           ++ otherwise \axiom{unitCanonical(p)}.
+       primPartElseUnitCanonical! : $ -> $
+           ++ \axiom{primPartElseUnitCanonical!(p)} replaces  \axiom{p} 
+           ++ by \axiom{primPartElseUnitCanonical(p)}.
+       exactQuotient : ($,R) -> $
+           ++ \axiom{exactQuotient(p,r)} computes the exact quotient of 
+           ++ \axiom{p} by \axiom{r}, which is assumed to be a divisor of 
+           ++ \axiom{p}. No error is returned if this exact quotient fails!
+       exactQuotient! : ($,R) -> $
+           ++ \axiom{exactQuotient!(p,r)} replaces \axiom{p} by 
+           ++ \axiom{exactQuotient(p,r)}.
+       exactQuotient : ($,$) -> $
+           ++ \axiom{exactQuotient(a,b)} computes the exact quotient of 
+           ++ \axiom{a} by \axiom{b}, which is assumed to be a divisor of 
+           ++ \axiom{a}. No error is returned if this exact quotient fails!
+       exactQuotient! : ($,$) -> $
+           ++ \axiom{exactQuotient!(a,b)} replaces \axiom{a} by 
+           ++ \axiom{exactQuotient(a,b)}
+       subResultantGcd : ($, $) -> $ 
+           ++ \axiom{subResultantGcd(a,b)} computes a gcd of \axiom{a} and 
+           ++ \axiom{b} where \axiom{a} and \axiom{b} are assumed to have the 
+           ++ same main variable \axiom{v} and are viewed as univariate 
+           ++ polynomials in \axiom{v} with coefficients in the fraction 
+           ++ field of the polynomial ring generated by their other variables 
+           ++ over \axiom{R}.
+       extendedSubResultantGcd : ($, $) -> _
+        Record (gcd : $, coef1 : $, coef2 : $)
+           ++ \axiom{extendedSubResultantGcd(a,b)} returns \axiom{[ca,cb,r]} 
+           ++ such that \axiom{r} is \axiom{subResultantGcd(a,b)} and we have
+           ++ \axiom{ca * a + cb * cb = r} .
+       halfExtendedSubResultantGcd1: ($, $) -> Record (gcd : $, coef1 : $)
+           ++ \axiom{halfExtendedSubResultantGcd1(a,b)} returns \axiom{[g,ca]}
+           ++ if \axiom{extendedSubResultantGcd(a,b)} returns \axiom{[g,ca,cb]}
+           ++ otherwise produces an error.
+       halfExtendedSubResultantGcd2: ($, $) -> Record (gcd : $, coef2 : $)
+           ++ \axiom{halfExtendedSubResultantGcd2(a,b)} returns \axiom{[g,cb]}
+           ++ if \axiom{extendedSubResultantGcd(a,b)} returns \axiom{[g,ca,cb]}
+           ++ otherwise produces an error.
+       resultant  : ($, $) -> $ 
+           ++ \axiom{resultant(a,b)} computes the resultant of \axiom{a} and 
+           ++ \axiom{b} where \axiom{a} and \axiom{b} are assumed to have the 
+           ++ same main variable \axiom{v} and are viewed as univariate 
+           ++ polynomials in \axiom{v}.
+       subResultantChain : ($, $) -> List $
+           ++ \axiom{subResultantChain(a,b)}, where \axiom{a} and \axiom{b} 
+           ++ are not contant polynomials with the same main variable, returns
+           ++ the subresultant chain of \axiom{a} and \axiom{b}.
+       lastSubResultant: ($, $) -> $
+           ++ \axiom{lastSubResultant(a,b)} returns the last non-zero 
+           ++ subresultant of \axiom{a} and \axiom{b} where \axiom{a} and 
+           ++ \axiom{b} are assumed to have the same main variable \axiom{v} 
+           ++ and are viewed as univariate polynomials in \axiom{v}.
+       LazardQuotient: ($, $, NonNegativeInteger) -> $
+           ++ \axiom{LazardQuotient(a,b,n)} returns \axiom{a**n exquo b**(n-1)}
+           ++ assuming that this quotient does not fail.
+       LazardQuotient2: ($, $, $, NonNegativeInteger) -> $
+           ++ \axiom{LazardQuotient2(p,a,b,n)} returns 
+           ++ \axiom{(a**(n-1) * p) exquo b**(n-1)}
+           ++ assuming that this quotient does not fail.
+       next_subResultant2: ($, $, $, $) -> $
+           ++ \axiom{nextsubResultant2(p,q,z,s)} is the multivariate version
+           ++ of the operation 
+           ++ \axiomOpFrom{next_sousResultant2}{PseudoRemainderSequence} from
+           ++ the \axiomType{PseudoRemainderSequence} constructor.
+
+     if R has GcdDomain
+     then
+       gcd : (R,$) -> R
+           ++ \axiom{gcd(r,p)} returns the gcd of \axiom{r} and the content 
+           ++ of \axiom{p}.
+       primitivePart! : $ -> $
+           ++ \axiom{primitivePart!(p)} replaces \axiom{p}  by its primitive 
+           ++ part.
+       mainContent : $ -> $
+           ++ \axiom{mainContent(p)} returns the content of \axiom{p} viewed 
+           ++ as a univariate polynomial in its main variable and with 
+           ++ coefficients in the polynomial ring generated by its other 
+           ++ variables over \axiom{R}.
+       mainPrimitivePart : $ -> $
+           ++ \axiom{mainPrimitivePart(p)} returns the primitive part of 
+           ++ \axiom{p} viewed as a univariate polynomial in its main 
+           ++ variable and with coefficients in the polynomial ring generated 
+           ++ by its other variables over \axiom{R}.
+       mainSquareFreePart : $ -> $
+           ++ \axiom{mainSquareFreePart(p)} returns the square free part of 
+           ++ \axiom{p} viewed as a univariate polynomial in its main 
+           ++ variable and with coefficients in the polynomial ring 
+           ++ generated by its other variables over \axiom{R}.
+
+ add
+     O ==> OutputForm
+     NNI ==> NonNegativeInteger
+     INT ==> Integer
+
+     exactQuo : (R,R) -> R
+
+     coerce(p:$):O ==
+       ground? (p) => (ground(p))::O
+--       if one?((ip := init(p)))
+       if (((ip := init(p))) = 1)
+         then
+           if zero?((tp := tail(p)))
+             then
+--               if one?((dp := mdeg(p)))
+               if (((dp := mdeg(p))) = 1)
+                 then
+                   return((mvar(p))::O)
+                 else
+                   return(((mvar(p))::O **$O (dp::O)))
+             else
+--               if one?((dp := mdeg(p)))
+               if (((dp := mdeg(p))) = 1)
+                 then
+                   return((mvar(p))::O +$O (tp::O))
+                 else
+                   return(((mvar(p))::O **$O (dp::O)) +$O (tp::O))
+          else
+           if zero?((tp := tail(p)))
+             then
+--               if one?((dp := mdeg(p)))
+               if (((dp := mdeg(p))) = 1)
+                 then
+                   return((ip::O) *$O  (mvar(p))::O)
+                 else
+                   return((ip::O) *$O ((mvar(p))::O **$O (dp::O)))
+             else
+--               if one?(mdeg(p))
+               if ((mdeg(p)) = 1)
+                 then
+                   return(((ip::O) *$O  (mvar(p))::O) +$O (tp::O))
+       ((ip)::O *$O ((mvar(p))::O **$O ((mdeg(p)::O))) +$O (tail(p)::O))
+
+     mvar p ==
+       ground?(p) => error"Error in mvar from RPOLCAT : #1 is constant."
+       mainVariable(p)::V
+
+     mdeg p == 
+       ground?(p) => 0$NNI
+       degree(p,mainVariable(p)::V)
+
+     init p ==
+       ground?(p) => error"Error in mvar from RPOLCAT : #1 is constant."
+       v := mainVariable(p)::V
+       coefficient(p,v,degree(p,v))
+
+     leadingCoefficient (p,v) ==
+       zero? (d := degree(p,v)) => p
+       coefficient(p,v,d)
+
+     head p ==
+       ground? p => p
+       v := mainVariable(p)::V
+       d := degree(p,v)
+       monomial(coefficient(p,v,d),v,d)
+
+     reductum(p,v) ==
+       zero? (d := degree(p,v)) => 0$$
+       p - monomial(coefficient(p,v,d),v,d)
+
+     tail p ==
+       ground? p => 0$$
+       p - head(p)
+
+     deepestTail p ==
+       ground? p => 0$$
+       ground? tail(p) => tail(p)
+       mvar(p) > mvar(tail(p)) => tail(p)
+       deepestTail(tail(p))
+
+     iteratedInitials p == 
+       ground? p => []
+       p := init(p)
+       cons(p,iteratedInitials(p))
+
+     localDeepestInitial (p : $) : $ == 
+       ground? p => p
+       localDeepestInitial init p
+
+     deepestInitial p == 
+       ground? p => _
+         error"Error in deepestInitial from RPOLCAT : #1 is constant."
+       localDeepestInitial init p
+
+     monic? p ==
+       ground? p => false
+       (recip(init(p))$$ case $)@Boolean
+
+     quasiMonic?  p ==
+       ground? p => false
+       ground?(init(p))
+
+     mainMonomial p == 
+       zero? p => error"Error in mainMonomial from RPOLCAT : #1 is zero"
+       ground? p => 1$$
+       v := mainVariable(p)::V
+       monomial(1$$,v,degree(p,v))
+
+     leastMonomial p == 
+       zero? p => error"Error in leastMonomial from RPOLCAT : #1 is zero"
+       ground? p => 1$$
+       v := mainVariable(p)::V
+       monomial(1$$,v,minimumDegree(p,v))
+
+     mainCoefficients p == 
+       zero? p => error"Error in mainCoefficients from RPOLCAT : #1 is zero"
+       ground? p => [p]
+       v := mainVariable(p)::V
+       coefficients(univariate(p,v)@SparseUnivariatePolynomial($))
+
+     mainMonomials p == 
+       zero? p => error"Error in mainMonomials from RPOLCAT : #1 is zero"
+       ground? p => [1$$]
+       v := mainVariable(p)::V
+       lm := monomials(univariate(p,v)@SparseUnivariatePolynomial($))
+       [monomial(1$$,v,degree(m)) for m in lm]
+
+     RittWuCompare (a,b) ==
+       (ground? b and  ground? a) => "failed"::Union(Boolean,"failed")
+       ground? b => false::Union(Boolean,"failed")
+       ground? a => true::Union(Boolean,"failed")
+       mvar(a) < mvar(b) => true::Union(Boolean,"failed")
+       mvar(a) > mvar(b) => false::Union(Boolean,"failed")
+       mdeg(a) < mdeg(b) => true::Union(Boolean,"failed")
+       mdeg(a) > mdeg(b) => false::Union(Boolean,"failed")
+       lc := RittWuCompare(init(a),init(b))
+       lc case Boolean => lc
+       RittWuCompare(tail(a),tail(b))
+
+     infRittWu? (a,b) ==
+       lc : Union(Boolean,"failed") := RittWuCompare(a,b)
+       lc case Boolean => lc::Boolean
+       false
+       
+     supRittWu? (a,b) ==
+       infRittWu? (b,a)
+
+     prem (a:$, b:$)  : $ == 
+       cP := lazyPremWithDefault (a,b)
+       ((cP.coef) ** (cP.gap)) * cP.remainder
+
+     pquo (a:$, b:$)  : $ == 
+       cPS := lazyPseudoDivide (a,b)
+       c := (cPS.coef) ** (cPS.gap)
+       c * cPS.quotient
+
+     prem (a:$, b:$, v:V) : $ ==
+       cP := lazyPremWithDefault (a,b,v)
+       ((cP.coef) ** (cP.gap)) * cP.remainder  
+
+     pquo (a:$, b:$, v:V)  : $ == 
+       cPS := lazyPseudoDivide (a,b,v)
+       c := (cPS.coef) ** (cPS.gap)
+       c * cPS.quotient     
+
+     lazyPrem (a:$, b:$) : $ ==
+       (not ground?(b)) and (monic?(b)) => monicModulo(a,b)
+       (lazyPremWithDefault (a,b)).remainder
+       
+     lazyPquo (a:$, b:$) : $ ==
+       (lazyPseudoDivide (a,b)).quotient
+
+     lazyPrem (a:$, b:$, v:V) : $ ==
+       zero? b => _
+         error"Error in lazyPrem : ($,$,V) -> $ from RPOLCAT : #2 is zero"
+       ground?(b) => 0$$
+       (v = mvar(b)) => lazyPrem(a,b)
+       dbv : NNI := degree(b,v)
+       zero? dbv => 0$$
+       dav : NNI  := degree(a,v)
+       zero? dav => a
+       test : INT := dav::INT - dbv 
+       lcbv : $ := leadingCoefficient(b,v)
+       while not zero?(a) and not negative?(test) repeat
+         lcav := leadingCoefficient(a,v)
+         term := monomial(lcav,v,test::NNI)
+         a := lcbv * a - term * b
+         test := degree(a,v)::INT - dbv 
+       a
+         
+     lazyPquo (a:$, b:$, v:V) : $ ==
+       (lazyPseudoDivide (a,b,v)).quotient
+
+     headReduce (a:$,b:$) == 
+       ground? b => error _
+        "Error in headReduce : ($,$) -> Boolean from TSETCAT : #2 is constant"
+       ground? a => a
+       mvar(a) = mvar(b) => lazyPrem(a,b)
+       while not reduced?((ha := head a),b) repeat
+         lrc := lazyResidueClass(ha,b)
+         if zero? tail(a)
+           then
+             a := lrc.polnum
+           else
+             a := lrc.polnum +  (lrc.polden)**(lrc.power) * tail(a)
+       a
+
+     initiallyReduce(a:$,b:$) ==
+       ground? b => error _
+   "Error in initiallyReduce : ($,$) -> Boolean from TSETCAT : #2 is constant"
+       ground? a => a
+       v := mvar(b)
+       mvar(a) = v => lazyPrem(a,b)
+       ia := a
+       ma := 1$$
+       ta := 0$$
+       while (not ground?(ia)) and (mvar(ia) >= mvar(b)) repeat
+         if (mvar(ia) = mvar(b)) and (mdeg(ia) >= mdeg(b))
+           then
+             iamodb := lazyResidueClass(ia,b)
+             ia := iamodb.polnum
+             if not zero? ta
+               then
+                 ta :=  (iamodb.polden)**(iamodb.power) * ta
+         if zero? ia 
+           then 
+             ia := ta
+             ma := 1$$
+             ta := 0$$
+           else
+             if not ground?(ia)
+               then
+                 ta := tail(ia) * ma + ta
+                 ma := mainMonomial(ia) * ma
+                 ia := init(ia)
+       ia * ma + ta
+
+     lazyPremWithDefault (a,b) == 
+       ground?(b) => error _
+         "Error in lazyPremWithDefault from RPOLCAT : #2 is constant"
+       ground?(a) => [1$$,0$NNI,a]
+       xa := mvar a
+       xb := mvar b
+       xa < xb => [1$$,0$NNI,a]
+       lcb : $ := init b 
+       db : NNI := mdeg b
+       test : INT := degree(a,xb)::INT - db
+       delta : INT := max(test + 1$INT, 0$INT) 
+       if xa = xb 
+         then
+           b := tail b
+           while not zero?(a) and not negative?(test) repeat 
+             term := monomial(init(a),xb,test::NNI)
+             a := lcb * tail(a) - term * b 
+             delta := delta - 1$INT 
+             test := degree(a,xb)::INT - db
+         else 
+           while not zero?(a) and not negative?(test) repeat 
+             term := monomial(leadingCoefficient(a,xb),xb,test::NNI)
+             a := lcb * a - term * b
+             delta := delta - 1$INT 
+             test := degree(a,xb)::INT - db
+       [lcb, (delta::NNI), a]
+
+     lazyPremWithDefault (a,b,v) == 
+       zero? b =>  error _
+        "Error in lazyPremWithDefault : ($,$,V) -> $ from RPOLCAT : #2 is zero"
+       ground?(b) => [b,1$NNI,0$$]
+       (v = mvar(b)) => lazyPremWithDefault(a,b)
+       dbv : NNI := degree(b,v)
+       zero? dbv => [b,1$NNI,0$$]
+       dav : NNI  := degree(a,v)
+       zero? dav => [1$$,0$NNI,a]
+       test : INT := dav::INT - dbv 
+       delta : INT := max(test + 1$INT, 0$INT) 
+       lcbv : $ := leadingCoefficient(b,v)
+       while not zero?(a) and not negative?(test) repeat
+         lcav := leadingCoefficient(a,v)
+         term := monomial(lcav,v,test::NNI)
+         a := lcbv * a - term * b
+         delta := delta - 1$INT 
+         test := degree(a,v)::INT - dbv 
+       [lcbv, (delta::NNI), a]
+
+     pseudoDivide (a,b) == 
+       cPS := lazyPseudoDivide (a,b)
+       c := (cPS.coef) ** (cPS.gap)
+       [c * cPS.quotient, c * cPS.remainder]
+
+     lazyPseudoDivide (a,b) == 
+       ground?(b) => error _
+          "Error in lazyPseudoDivide from RPOLCAT : #2 is constant"
+       ground?(a) => [1$$,0$NNI,0$$,a]
+       xa := mvar a 
+       xb := mvar b
+       xa < xb => [1$$,0$NNI,0$$, a]
+       lcb : $ := init b 
+       db : NNI := mdeg b
+       q := 0$$
+       test : INT := degree(a,xb)::INT - db
+       delta : INT := max(test + 1$INT, 0$INT) 
+       if xa = xb 
+         then
+           b := tail b
+           while not zero?(a) and not negative?(test) repeat 
+             term := monomial(init(a),xb,test::NNI)
+             a := lcb * tail(a) - term * b 
+             q := lcb * q + term
+             delta := delta - 1$INT 
+             test := degree(a,xb)::INT - db
+         else 
+           while not zero?(a) and not negative?(test) repeat 
+             term := monomial(leadingCoefficient(a,xb),xb,test::NNI)
+             a := lcb * a - term * b
+             q := lcb * q + term
+             delta := delta - 1$INT 
+             test := degree(a,xb)::INT - db
+       [lcb, (delta::NNI), q, a]
+
+     lazyPseudoDivide (a,b,v) == 
+       zero? b =>  error _
+         "Error in lazyPseudoDivide : ($,$,V) -> $ from RPOLCAT : #2 is zero"
+       ground?(b) => [b,1$NNI,a,0$$]
+       (v = mvar(b)) => lazyPseudoDivide(a,b)
+       dbv : NNI := degree(b,v)
+       zero? dbv => [b,1$NNI,a,0$$]
+       dav : NNI  := degree(a,v)
+       zero? dav => [1$$,0$NNI,0$$, a]
+       test : INT := dav::INT - dbv 
+       delta : INT := max(test + 1$INT, 0$INT) 
+       lcbv : $ := leadingCoefficient(b,v)
+       q := 0$$
+       while not zero?(a) and not negative?(test) repeat
+         lcav := leadingCoefficient(a,v)
+         term := monomial(lcav,v,test::NNI)
+         a := lcbv * a - term * b
+         q := lcbv * q + term
+         delta := delta - 1$INT 
+         test := degree(a,v)::INT - dbv 
+       [lcbv, (delta::NNI), q, a]
+
+     monicModulo (a,b) == 
+       ground?(b) => error"Error in monicModulo from RPOLCAT : #2 is constant"
+       rec : Union($,"failed") 
+       rec := recip((ib := init(b)))$$
+       (rec case "failed")@Boolean => error _
+         "Error in monicModulo from RPOLCAT : #2 is not monic"
+       ground? a => a
+       ib * ((lazyPremWithDefault ((rec::$) * a,(rec::$) * b)).remainder)
+
+     lazyResidueClass(a,b) ==
+       zero? b => [a,1$$,0$NNI]
+       ground? b => [0$$,1$$,0$NNI]
+       ground? a => [a,1$$,0$NNI]
+       xa := mvar a
+       xb := mvar b
+       xa < xb => [a,1$$,0$NNI]
+       monic?(b) => [monicModulo(a,b),1$$,0$NNI]
+       lcb : $ := init b 
+       db : NNI := mdeg b
+       test : INT := degree(a,xb)::INT - db
+       pow : NNI := 0
+       if xa = xb 
+         then
+           b := tail b
+           while not zero?(a) and not negative?(test) repeat 
+             term := monomial(init(a),xb,test::NNI)
+             a := lcb * tail(a) - term * b 
+             pow := pow + 1$NNI
+             test := degree(a,xb)::INT - db
+         else 
+           while not zero?(a) and not negative?(test) repeat 
+             term := monomial(leadingCoefficient(a,xb),xb,test::NNI)
+             a := lcb * a - term * b
+             pow := pow + 1$NNI
+             test := degree(a,xb)::INT - db
+       [a,lcb,pow]
+
+     reduced? (a:$,b:$) : Boolean ==
+       degree(a,mvar(b)) < mdeg(b)
+
+     reduced? (p:$, lq : List($)) : Boolean ==
+       ground? p => true
+       while (not empty? lq) and (reduced?(p, first lq)) repeat
+         lq := rest lq
+       empty? lq
+
+     headReduced? (a:$,b:$) : Boolean ==
+       reduced?(head(a),b)
+
+     headReduced? (p:$, lq : List($)) : Boolean ==
+       reduced?(head(p),lq)
+
+     initiallyReduced? (a:$,b:$) : Boolean ==
+       ground? b => error _
+   "Error in initiallyReduced? : ($,$) -> Bool. from RPOLCAT : #2 is constant"
+       ground?(a) => true
+       mvar(a) < mvar(b) => true
+       (mvar(a) = mvar(b)) => reduced?(a,b)
+       initiallyReduced?(init(a),b)
+
+     initiallyReduced? (p:$, lq : List($)) : Boolean ==
+       ground? p => true
+       while (not empty? lq) and (initiallyReduced?(p, first lq)) repeat
+         lq := rest lq
+       empty? lq
+
+     normalized?(a:$,b:$) : Boolean ==
+       ground? b => error _
+      "Error in  normalized? : ($,$) -> Boolean from TSETCAT : #2 is constant"
+       ground? a => true
+       mvar(a) < mvar(b) => true
+       (mvar(a) = mvar(b)) => false
+       normalized?(init(a),b)
+
+     normalized? (p:$, lq : List($)) : Boolean ==
+       while (not empty? lq) and (normalized?(p, first lq)) repeat
+         lq := rest lq
+       empty? lq       
+
+     if R has IntegralDomain
+     then
+
+       if R has EuclideanDomain
+         then
+           exactQuo(r:R,s:R):R ==
+             r quo$R s
+         else
+           exactQuo(r:R,s:R):R ==
+             (r exquo$R s)::R
+
+       exactQuotient (p:$,r:R) ==
+         (p exquo$$ r)::$
+
+       exactQuotient (a:$,b:$) ==
+         ground? b => exactQuotient(a,ground(b))
+         (a exquo$$ b)::$
+
+       exactQuotient! (a:$,b:$) ==
+         ground? b => exactQuotient!(a,ground(b))
+         a := (a exquo$$ b)::$
+
+       if (R has GcdDomain) and not(R has Field)
+       then
+
+         primPartElseUnitCanonical p ==
+           primitivePart p
+
+         primitivePart! p ==
+           zero? p => p
+--           if one?(cp := content(p))
+           if ((cp := content(p)) = 1)
+             then
+               p := unitCanonical p
+             else
+               p := unitCanonical exactQuotient!(p,cp) 
+           p
+
+         primPartElseUnitCanonical! p ==
+           primitivePart! p
+
+       else
+         primPartElseUnitCanonical p ==
+           unitCanonical p
+
+         primPartElseUnitCanonical! p ==
+           p := unitCanonical p
+
+
+     if R has GcdDomain
+     then
+
+       gcd(r:R,p:$):R ==
+--         one? r => r
+         (r = 1) => r
+         zero? p => r
+         ground? p => gcd(r,ground(p))$R
+         gcd(gcd(r,init(p)),tail(p))
+
+       mainContent p ==
+         zero? p => p
+         "gcd"/mainCoefficients(p)
+
+       mainPrimitivePart p ==
+         zero? p => p
+         (unitNormal((p exquo$$ mainContent(p))::$)).canonical
+
+       mainSquareFreePart p ==
+         ground? p => p
+         v := mainVariable(p)::V
+         sfp : SparseUnivariatePolynomial($)
+         sfp := squareFreePart(univariate(p,v)@SparseUnivariatePolynomial($))
+         multivariate(sfp,v)
+
+     if (V has ConvertibleTo(Symbol))
+       then
+
+         PR ==> Polynomial R
+         PQ ==> Polynomial Fraction Integer
+         PZ ==> Polynomial Integer
+         IES ==> IndexedExponents(Symbol)
+         Q ==> Fraction Integer
+         Z ==> Integer
+
+         convert(p:$) : PR ==
+           ground? p => (ground(p)$$)::PR
+           v : V := mvar(p)
+           d : NNI := mdeg(p)
+           convert(init(p))@PR *$PR _
+                        ((convert(v)@Symbol)::PR)**d +$PR convert(tail(p))@PR
+
+         coerce(p:$) : PR ==
+           convert(p)@PR
+
+         localRetract : PR -> $
+         localRetractPQ : PQ -> $
+         localRetractPZ : PZ -> $
+         localRetractIfCan : PR -> Union($,"failed")
+         localRetractIfCanPQ : PQ -> Union($,"failed")
+         localRetractIfCanPZ : PZ -> Union($,"failed")
+
+         if V has Finite
+           then 
+
+             sizeV : NNI := size()$V
+             lv : List Symbol
+             lv := _
+               [convert(index(i::PositiveInteger)$V)@Symbol for i in 1..sizeV]
+
+             localRetract(p : PR) : $ ==
+               ground? p => (ground(p)$PR)::$
+               mvp : Symbol := (mainVariable(p)$PR)::Symbol
+               d : NNI
+               imvp : PositiveInteger := _
+                             (position(mvp,lv)$(List Symbol))::PositiveInteger 
+               vimvp : V := index(imvp)$V
+               xvimvp,c : $ 
+               newp := 0$$
+               while (not zero? (d := degree(p,mvp))) repeat
+                 c := localRetract(coefficient(p,mvp,d)$PR)
+                 xvimvp := monomial(c,vimvp,d)$$
+                 newp := newp +$$ xvimvp
+                 p := p -$PR monomial(coefficient(p,mvp,d)$PR,mvp,d)$PR
+               newp +$$ localRetract(p)
+
+             if R has Algebra Fraction Integer
+               then 
+                 localRetractPQ(pq:PQ):$ ==
+                   ground? pq => ((ground(pq)$PQ)::R)::$
+                   mvp : Symbol := (mainVariable(pq)$PQ)::Symbol
+                   d : NNI
+                   imvp : PositiveInteger := _
+                             (position(mvp,lv)$(List Symbol))::PositiveInteger 
+                   vimvp : V := index(imvp)$V
+                   xvimvp,c : $ 
+                   newp := 0$$
+                   while (not zero? (d := degree(pq,mvp))) repeat
+                     c := localRetractPQ(coefficient(pq,mvp,d)$PQ)
+                     xvimvp := monomial(c,vimvp,d)$$
+                     newp := newp +$$ xvimvp
+                     pq := pq -$PQ monomial(coefficient(pq,mvp,d)$PQ,mvp,d)$PQ
+                   newp +$$ localRetractPQ(pq)
+
+             if R has Algebra Integer
+               then 
+                 localRetractPZ(pz:PZ):$ ==
+                   ground? pz => ((ground(pz)$PZ)::R)::$
+                   mvp : Symbol := (mainVariable(pz)$PZ)::Symbol
+                   d : NNI
+                   imvp : PositiveInteger := _
+                             (position(mvp,lv)$(List Symbol))::PositiveInteger 
+                   vimvp : V := index(imvp)$V
+                   xvimvp,c : $ 
+                   newp := 0$$
+                   while (not zero? (d := degree(pz,mvp))) repeat
+                     c := localRetractPZ(coefficient(pz,mvp,d)$PZ)
+                     xvimvp := monomial(c,vimvp,d)$$
+                     newp := newp +$$ xvimvp
+                     pz := pz -$PZ monomial(coefficient(pz,mvp,d)$PZ,mvp,d)$PZ
+                   newp +$$ localRetractPZ(pz)
+
+             retractable?(p:PR):Boolean ==
+               lvp := variables(p)$PR
+               while not empty? lvp and member?(first lvp,lv) repeat
+                 lvp := rest lvp
+               empty? lvp   
+                     
+             retractablePQ?(p:PQ):Boolean ==
+               lvp := variables(p)$PQ
+               while not empty? lvp and member?(first lvp,lv) repeat
+                 lvp := rest lvp
+               empty? lvp       
+                 
+             retractablePZ?(p:PZ):Boolean ==
+               lvp := variables(p)$PZ
+               while not empty? lvp and member?(first lvp,lv) repeat
+                 lvp := rest lvp
+               empty? lvp                        
+
+             localRetractIfCan(p : PR): Union($,"failed") ==
+               not retractable?(p) => "failed"::Union($,"failed")
+               localRetract(p)::Union($,"failed")
+
+             localRetractIfCanPQ(p : PQ): Union($,"failed") ==
+               not retractablePQ?(p) => "failed"::Union($,"failed")
+               localRetractPQ(p)::Union($,"failed")
+
+             localRetractIfCanPZ(p : PZ): Union($,"failed") ==
+               not retractablePZ?(p) => "failed"::Union($,"failed")
+               localRetractPZ(p)::Union($,"failed")
+
+         if R has Algebra Fraction Integer
+           then 
+
+             mpc2Z := MPolyCatFunctions2(Symbol,IES,IES,Z,R,PZ,PR)
+             mpc2Q := MPolyCatFunctions2(Symbol,IES,IES,Q,R,PQ,PR)
+             ZToR (z:Z):R == coerce(z)@R
+             QToR (q:Q):R == coerce(q)@R
+             PZToPR (pz:PZ):PR == map(ZToR,pz)$mpc2Z
+             PQToPR (pq:PQ):PR == map(QToR,pq)$mpc2Q
+
+             retract(pz:PZ) ==
+               rif : Union($,"failed") := retractIfCan(pz)@Union($,"failed")
+               (rif case "failed") => error _
+                                  "failed in retract: POLY Z -> $ from RPOLCAT"
+               rif::$
+
+             convert(pz:PZ) ==
+               retract(pz)@$
+
+             retract(pq:PQ) ==
+               rif : Union($,"failed") := retractIfCan(pq)@Union($,"failed")
+               (rif case "failed") => error _
+                                  "failed in retract: POLY Z -> $ from RPOLCAT"
+               rif::$
+
+             convert(pq:PQ) ==
+               retract(pq)@$
+
+             if not (R has QuotientFieldCategory(Integer))
+               then
+                 -- the only operation to implement is 
+                 -- retractIfCan : PR -> Union($,"failed")
+                 -- when V does not have Finite
+
+                 if V has Finite
+                   then
+                     retractIfCan(pr:PR) ==
+                       localRetractIfCan(pr)@Union($,"failed")
+
+                     retractIfCan(pq:PQ) ==
+                       localRetractIfCanPQ(pq)@Union($,"failed")
+                   else
+                     retractIfCan(pq:PQ) ==
+                       pr : PR := PQToPR(pq)
+                       retractIfCan(pr)@Union($,"failed")
+
+                 retractIfCan(pz:PZ) ==
+                   pr : PR := PZToPR(pz)
+                   retractIfCan(pr)@Union($,"failed")
+
+                 retract(pr:PR) ==
+                   rif : Union($,"failed") := _
+                                          retractIfCan(pr)@Union($,"failed")
+                   (rif case "failed") => error _
+                                "failed in retract: POLY Z -> $ from RPOLCAT"
+                   rif::$
+
+                 convert(pr:PR) ==
+                   retract(pr)@$
+
+               else
+                 -- the only operation to implement is 
+                 -- retractIfCan : PQ -> Union($,"failed")
+                 -- when V does not have Finite
+                 mpc2ZQ := MPolyCatFunctions2(Symbol,IES,IES,Z,Q,PZ,PQ)
+                 mpc2RQ := MPolyCatFunctions2(Symbol,IES,IES,R,Q,PR,PQ)
+                 ZToQ(z:Z):Q == coerce(z)@Q
+                 RToQ(r:R):Q == retract(r)@Q
+
+                 PZToPQ (pz:PZ):PQ == map(ZToQ,pz)$mpc2ZQ
+                 PRToPQ (pr:PR):PQ == map(RToQ,pr)$mpc2RQ
+
+                 retractIfCan(pz:PZ) ==
+                   pq : PQ := PZToPQ(pz)
+                   retractIfCan(pq)@Union($,"failed")
+
+                 if V has Finite
+                   then
+                     retractIfCan(pq:PQ) ==
+                       localRetractIfCanPQ(pq)@Union($,"failed")
+
+                     convert(pr:PR) ==
+                       lrif : Union($,"failed") := _
+                                       localRetractIfCan(pr)@Union($,"failed")
+                       (lrif case "failed") => error _
+                                       "failed in convert: PR->$ from RPOLCAT"
+                       lrif::$
+                   else
+                     convert(pr:PR) ==
+                       pq : PQ := PRToPQ(pr)
+                       retract(pq)@$
+
+         if (R has Algebra Integer) and not(R has Algebra Fraction Integer)
+           then 
+
+             mpc2Z := MPolyCatFunctions2(Symbol,IES,IES,Z,R,PZ,PR)
+             ZToR (z:Z):R == coerce(z)@R
+             PZToPR (pz:PZ):PR == map(ZToR,pz)$mpc2Z
+
+             retract(pz:PZ) ==
+               rif : Union($,"failed") := retractIfCan(pz)@Union($,"failed")
+               (rif case "failed") => error _
+                                 "failed in retract: POLY Z -> $ from RPOLCAT"
+               rif::$
+
+             convert(pz:PZ) ==
+               retract(pz)@$
+
+             if not (R has IntegerNumberSystem)
+               then
+                 -- the only operation to implement is 
+                 -- retractIfCan : PR -> Union($,"failed")
+                 -- when V does not have Finite
+
+                 if V has Finite
+                   then
+                     retractIfCan(pr:PR) ==
+                       localRetractIfCan(pr)@Union($,"failed")
+
+                     retractIfCan(pz:PZ) ==
+                       localRetractIfCanPZ(pz)@Union($,"failed")
+                   else
+                     retractIfCan(pz:PZ) ==
+                       pr : PR := PZToPR(pz)
+                       retractIfCan(pr)@Union($,"failed")
+
+                 retract(pr:PR) ==
+                   rif : Union($,"failed"):=retractIfCan(pr)@Union($,"failed")
+                   (rif case "failed") => error _
+                                  "failed in retract: POLY Z -> $ from RPOLCAT"
+                   rif::$
+
+                 convert(pr:PR) ==
+                   retract(pr)@$
+
+               else
+                 -- the only operation to implement is 
+                 -- retractIfCan : PZ -> Union($,"failed")
+                 -- when V does not have Finite
+
+                 mpc2RZ := MPolyCatFunctions2(Symbol,IES,IES,R,Z,PR,PZ)
+                 RToZ(r:R):Z == retract(r)@Z
+                 PRToPZ (pr:PR):PZ == map(RToZ,pr)$mpc2RZ
+
+                 if V has Finite
+                   then
+                     convert(pr:PR) ==
+                       lrif : Union($,"failed") := _
+                                       localRetractIfCan(pr)@Union($,"failed")
+                       (lrif case "failed") => error _
+                                       "failed in convert: PR->$ from RPOLCAT"
+                       lrif::$
+                     retractIfCan(pz:PZ) ==
+                       localRetractIfCanPZ(pz)@Union($,"failed")
+                   else
+                     convert(pr:PR) ==
+                       pz : PZ := PRToPZ(pr)
+                       retract(pz)@$
+
+
+         if not(R has Algebra Integer) and not(R has Algebra Fraction Integer)
+           then 
+             -- the only operation to implement is 
+             -- retractIfCan : PR -> Union($,"failed")
+
+             if V has Finite
+               then
+                 retractIfCan(pr:PR) ==
+                   localRetractIfCan(pr)@Union($,"failed")
+
+             retract(pr:PR) ==
+               rif : Union($,"failed") := retractIfCan(pr)@Union($,"failed")
+               (rif case "failed") => error _
+                               "failed in retract: POLY Z -> $ from RPOLCAT"
+               rif::$
+
+             convert(pr:PR) ==
+               retract(pr)@$
+
+         if (R has RetractableTo(INT))
+           then
+
+             convert(pol:$):String ==
+               ground?(pol) => convert(retract(ground(pol))@INT)@String
+               ipol : $ := init(pol)
+               vpol : V := mvar(pol)
+               dpol : NNI := mdeg(pol)
+               tpol: $  := tail(pol)
+               sipol,svpol,sdpol,stpol : String
+--               if one? ipol
+               if (ipol = 1)
+                 then 
+                   sipol := empty()$String
+                 else
+--                   if one?(-ipol)
+                   if ((-ipol) = 1)
+                     then 
+                       sipol := "-"
+                     else
+                       sipol := convert(ipol)@String
+                       if not monomial?(ipol)
+                         then
+                           sipol := concat(["(",sipol,")*"])$String
+                         else 
+                           sipol := concat(sipol,"*")$String
+               svpol := string(convert(vpol)@Symbol)
+--               if one? dpol
+               if (dpol = 1)
+                 then
+                   sdpol :=  empty()$String
+                 else
+                   sdpol := _
+                        concat("**",convert(convert(dpol)@INT)@String )$String 
+               if zero? tpol
+                 then
+                   stpol :=  empty()$String
+                 else
+                   if ground?(tpol)
+                     then
+                       n := retract(ground(tpol))@INT
+                       if n > 0
+                         then
+                           stpol :=  concat(" +",convert(n)@String)$String
+                         else
+                           stpol := convert(n)@String
+                     else
+                       stpol := convert(tpol)@String
+                       if _
+                         not member?((stpol.1)::String,["+","-"])$(List String)
+                         then
+                           stpol :=  concat(" + ",stpol)$String
+               concat([sipol,svpol,sdpol,stpol])$String
+
+@
+<<RPOLCAT.dotabb>>=
+"RPOLCAT"
+ [color=lightblue,href="bookvol10.2.pdf#nameddest=RPOLCAT"];
+"RPOLCAT" -> "POLYCAT"
+
+@
+<<RPOLCAT.dotfull>>=
+"RecursivePolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)"
+ [color=lightblue,href="bookvol10.2.pdf#nameddest=RPOLCAT"];
+"RecursivePolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)"
+ -> "PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)"
+
+@
+<<RPOLCAT.dotpic>>=
+digraph pic {
+ fontsize=10;
+ bgcolor="#FFFF66";
+ node [shape=box, color=white, style=filled];
+
+"RecursivePolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)"
+ [color=lightblue];
+"RecursivePolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)"
+ -> "PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)"
+
+"PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)"
+ [color=lightblue];
+"PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)"
+  -> "PDRING..."
+"PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)"
+  -> "FAMR..."
+"PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)"
+  -> "EVALAB..."
+"PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)"
+  -> "IEVALAB..."
+"PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)"
+  -> "RETRACT..."
+"PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)"
+  -> "FLINEXP..."
+"PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)"
+  -> "ORDSET..."
+"PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)"
+  -> "GCDDOM..."
+"PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)"
+  -> "PFECAT..."
+"PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)"
+  -> "KONVERT..."
+"PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)"
+  -> "PATMAB..."
+"PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)"
+  -> "COMRING..."
+
+"PDRING..." [color=lightblue];
+"FAMR..." [color=lightblue];
+"EVALAB..." [color=lightblue];
+"IEVALAB..." [color=lightblue];
+"RETRACT..." [color=lightblue];
+"FLINEXP..." [color=lightblue];
+"ORDSET..." [color=lightblue];
+"GCDDOM..." [color=lightblue];
+"PFECAT..." [color=lightblue];
+"KONVERT..." [color=lightblue];
+"PATMAB..." [color=lightblue];
+"COMRING..." [color=lightblue];
+
+}
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \pagehead{UnivariateLaurentSeriesCategory}{ULSCAT}
 \pagepic{ps/v102univariatelaurentseriescategory.ps}{ULSCAT}{0.50}
 
@@ -36899,8 +42190,8 @@ is true if $x * 1 = x$ for all x.
 \item if \#1 has IntegralDomain then noZeroDivisors where
 {\bf \cross{ULSCAT}{noZeroDivisors}}
 is true if $x * y \ne 0$ implies both x and y are non-zero.
-\item if \#1 has CommutativeRing then commutative("*") where
-{\bf \cross{ULSCAT}{commutative("*")}}
+\item if \#1 has CommutativeRing then commutative(``*'') where
+{\bf \cross{ULSCAT}{commutative(``*'')}}
 is true if it has an operation $"*": (D,D) -> D$
 which is commutative.
 \end{itemize}
@@ -37376,8 +42667,8 @@ is true if $x * 1 = x$ for all x.
 \item if \#1 has IntegralDomain then noZeroDivisors where
 {\bf \cross{UPXSCAT}{noZeroDivisors}}
 is true if $x * y \ne 0$ implies both x and y are non-zero.
-\item if \#1 has CommutativeRing then commutative("*") where
-{\bf \cross{UPXSCAT}{commutative("*")}}
+\item if \#1 has CommutativeRing then commutative(``*'') where
+{\bf \cross{UPXSCAT}{commutative(``*'')}}
 is true if it has an operation $"*": (D,D) -> D$
 which is commutative.
 \end{itemize}
@@ -37839,8 +43130,8 @@ digraph pic {
 
 {\bf Attributes exported:}
 \begin{itemize}
-\item if \$ has CommutativeRing then commutative("*") where
-{\bf \cross{UPOLYC}{commutative("*")}}
+\item if \$ has CommutativeRing then commutative(``*'') where
+{\bf \cross{UPOLYC}{commutative(``*'')}}
 is true if it has an operation $"*": (D,D) -> D$
 which is commutative.
 \item if \$ has IntegralDomain then noZeroDivisors where
@@ -38770,7 +44061,7 @@ is true if\\
 {\tt unitCanonical(a)*unitCanonical(b) = unitCanonical(a*b)}.
 \item {\bf \cross{XF}{noZeroDivisors}}
 is true if $x * y \ne 0$ implies both x and y are non-zero.
-\item {\bf \cross{XF}{commutative("*")}}
+\item {\bf \cross{XF}{commutative(``*'')}}
 is true if it has an operation $"*": (D,D) -> D$
 which is commutative.
 \item {\bf \cross{XF}{unitsKnown}}
@@ -39100,7 +44391,7 @@ is true if\\
 {\tt unitCanonical(a)*unitCanonical(b) = unitCanonical(a*b)}.
 \item {\bf \cross{FFIELDC}{noZeroDivisors}}
 is true if $x * y \ne 0$ implies both x and y are non-zero.
-\item {\bf \cross{FFIELDC}{commutative("*")}}
+\item {\bf \cross{FFIELDC}{commutative(``*'')}}
 is true if it has an operation $"*": (D,D) -> D$
 which is commutative.
 \item {\bf \cross{FFIELDC}{unitsKnown}}
@@ -39613,7 +44904,7 @@ is true if\\
 {\tt unitCanonical(a)*unitCanonical(b) = unitCanonical(a*b)}.
 \item {\bf \cross{FPS}{noZeroDivisors}}
 is true if $x * y \ne 0$ implies both x and y are non-zero.
-\item {\bf \cross{FPS}{commutative("*")}}
+\item {\bf \cross{FPS}{commutative(``*'')}}
 is true if it has an operation $"*": (D,D) -> D$
 which is commutative.
 \item {\bf \cross{FPS}{unitsKnown}}
@@ -40269,7 +45560,7 @@ is true if\\
 {\tt unitCanonical(a)*unitCanonical(b) = unitCanonical(a*b)}.
 \item {\bf \cross{FAXF}{noZeroDivisors}}
 is true if $x * y \ne 0$ implies both x and y are non-zero.
-\item {\bf \cross{FAXF}{commutative("*")}}
+\item {\bf \cross{FAXF}{commutative(``*'')}}
 is true if it has an operation $"*": (D,D) -> D$
 which is commutative.
 \item {\bf \cross{FAXF}{unitsKnown}}
@@ -40917,7 +46208,7 @@ is true if\\
 \item if \$ has Field then noZeroDivisors where
 {\bf \cross{MONOGEN}{noZeroDivisors}}
 is true if $x * y \ne 0$ implies both x and y are non-zero.
-\item {\bf \cross{MONOGEN}{commutative("*")}}
+\item {\bf \cross{MONOGEN}{commutative(``*'')}}
 is true if it has an operation $"*": (D,D) -> D$
 which is commutative.
 \item {\bf \cross{MONOGEN}{unitsKnown}}
@@ -41447,7 +46738,7 @@ if and only if {\tt unitCanonical(a) = unitCanonical(b)}.
 \item if \$ has Fraction(UPOLYC(UFD)) and Field then canonicalsClosed where
 {\bf \cross{FFCAT}{canonicalsClosed}} is true if\\
 {\tt unitCanonical(a)*unitCanonical(b) = unitCanonical(a*b)}.
-\item {\bf \cross{FFCAT}{commutative("*")}}
+\item {\bf \cross{FFCAT}{commutative(``*'')}}
 is true if it has an operation $"*": (D,D) -> D$
 which is commutative.
 \item {\bf \cross{FFCAT}{unitsKnown}}
@@ -49801,6 +55092,961 @@ Note that this code is not included in the generated catdef.spad file.
   (QUOTE |lookupComplete|))) 
 
 @
+\section{PSETCAT.lsp BOOTSTRAP}
+{\bf PSETCAT} depends on a chain of files. We need to break this cycle to build
+the algebra. So we keep a cached copy of the translated {\bf PSETCAT}
+category which we can write into the {\bf MID} directory. We compile 
+the lisp code and copy the {\bf PSETCAT.o} file to the {\bf OUT} directory.
+This is eventually forcibly replaced by a recompiled version. 
+
+Note that this code is not included in the generated catdef.spad file.
+
+<<PSETCAT.lsp BOOTSTRAP>>=
+
+(|/VERSIONCHECK| 2) 
+
+(SETQ |PolynomialSetCategory;CAT| (QUOTE NIL)) 
+
+(SETQ |PolynomialSetCategory;AL| (QUOTE NIL)) 
+
+(DEFUN |PolynomialSetCategory| (|&REST| #1=#:G82375 |&AUX| #2=#:G82373)
+ (DSETQ #2# #1#)
+ (LET (#3=#:G82374)
+  (COND
+   ((SETQ #3# (|assoc| (|devaluateList| #2#) |PolynomialSetCategory;AL|))
+     (CDR #3#))
+   (T
+    (SETQ |PolynomialSetCategory;AL|
+     (|cons5|
+      (CONS
+       (|devaluateList| #2#)
+       (SETQ #3# (APPLY (FUNCTION |PolynomialSetCategory;|) #2#)))
+      |PolynomialSetCategory;AL|))
+    #3#)))) 
+
+(DEFUN |PolynomialSetCategory;| (|t#1| |t#2| |t#3| |t#4|)
+ (PROG (#1=#:G82372)
+  (RETURN
+   (PROG1
+    (LETT #1#
+     (|sublisV|
+      (PAIR
+       (QUOTE (|t#1| |t#2| |t#3| |t#4|))
+       (LIST
+        (|devaluate| |t#1|)
+        (|devaluate| |t#2|)
+        (|devaluate| |t#3|)
+        (|devaluate| |t#4|)))
+      (|sublisV|
+       (PAIR (QUOTE (#2=#:G82371)) (LIST (QUOTE (|List| |t#4|))))
+       (COND
+        (|PolynomialSetCategory;CAT|)
+        ((QUOTE T)
+         (LETT |PolynomialSetCategory;CAT|
+          (|Join|
+           (|SetCategory|)
+           (|Collection| (QUOTE |t#4|))
+           (|CoercibleTo| (QUOTE #2#))
+           (|mkCategory|
+            (QUOTE |domain|)
+            (QUOTE (
+             ((|retractIfCan| ((|Union| |$| "failed") (|List| |t#4|))) T)
+             ((|retract| (|$| (|List| |t#4|))) T)
+             ((|mvar| (|t#3| |$|)) T)
+             ((|variables| ((|List| |t#3|) |$|)) T)
+             ((|mainVariables| ((|List| |t#3|) |$|)) T)
+             ((|mainVariable?| ((|Boolean|) |t#3| |$|)) T)
+             ((|collectUnder| (|$| |$| |t#3|)) T)
+             ((|collect| (|$| |$| |t#3|)) T)
+             ((|collectUpper| (|$| |$| |t#3|)) T)
+             ((|sort| 
+              ((|Record| 
+                (|:| |under| |$|) 
+                (|:| |floor| |$|) 
+                (|:| |upper| |$|)) |$| |t#3|)) 
+               T)
+             ((|trivialIdeal?| ((|Boolean|) |$|)) T)
+             ((|roughBase?| ((|Boolean|) |$|))
+               (|has| |t#1| (|IntegralDomain|)))
+             ((|roughSubIdeal?| ((|Boolean|) |$| |$|))
+               (|has| |t#1| (|IntegralDomain|)))
+             ((|roughEqualIdeals?| ((|Boolean|) |$| |$|))
+               (|has| |t#1| (|IntegralDomain|)))
+             ((|roughUnitIdeal?| ((|Boolean|) |$|))
+               (|has| |t#1| (|IntegralDomain|)))
+             ((|headRemainder| 
+               ((|Record| 
+                 (|:| |num| |t#4|) 
+                 (|:| |den| |t#1|)) |t#4| |$|)) 
+                (|has| |t#1| (|IntegralDomain|)))
+             ((|remainder|
+               ((|Record| 
+                 (|:| |rnum| |t#1|) 
+                 (|:| |polnum| |t#4|) 
+                 (|:| |den| |t#1|)) |t#4| |$|))
+                (|has| |t#1| (|IntegralDomain|)))
+             ((|rewriteIdealWithHeadRemainder|
+              ((|List| |t#4|) (|List| |t#4|) |$|))
+                (|has| |t#1| (|IntegralDomain|)))
+             ((|rewriteIdealWithRemainder| ((|List| |t#4|) (|List| |t#4|) |$|))
+               (|has| |t#1| (|IntegralDomain|)))
+             ((|triangular?| ((|Boolean|) |$|))
+               (|has| |t#1| (|IntegralDomain|)))))
+            (QUOTE ((|finiteAggregate| T)))
+            (QUOTE ((|Boolean|) (|List| |t#4|) (|List| |t#3|)))
+            NIL))
+       . #3=(|PolynomialSetCategory|))))))
+     . #3#)
+    (SETELT #1# 0
+     (LIST
+      (QUOTE |PolynomialSetCategory|)
+      (|devaluate| |t#1|)
+      (|devaluate| |t#2|)
+      (|devaluate| |t#3|)
+      (|devaluate| |t#4|))))))) 
+@
+\section{PSETCAT-.lsp BOOTSTRAP}
+{\bf PSETCAT-} depends on {\bf PSETCAT}. We need to break this cycle to build
+the algebra. So we keep a cached copy of the translated {\bf PSETCAT-}
+category which we can write into the {\bf MID} directory. We compile 
+the lisp code and copy the {\bf PSETCAT-.o} file to the {\bf OUT} directory.
+This is eventually forcibly replaced by a recompiled version. 
+
+Note that this code is not included in the generated catdef.spad file.
+
+<<PSETCAT-.lsp BOOTSTRAP>>=
+
+(|/VERSIONCHECK| 2) 
+
+(DEFUN |PSETCAT-;elements| (|ps| |$|)
+ (PROG (|lp|) 
+  (RETURN 
+   (LETT |lp| (SPADCALL |ps| (QREFELT |$| 12)) |PSETCAT-;elements|)))) 
+
+(DEFUN |PSETCAT-;variables1| (|lp| |$|)
+ (PROG (#1=#:G82392 |p| #2=#:G82393 |lvars|)
+  (RETURN
+   (SEQ
+    (LETT |lvars|
+     (PROGN
+      (LETT #1# NIL |PSETCAT-;variables1|)
+      (SEQ
+       (LETT |p| NIL |PSETCAT-;variables1|)
+       (LETT #2# |lp| |PSETCAT-;variables1|)
+       G190
+       (COND
+        ((OR (ATOM #2#) (PROGN (LETT |p| (CAR #2#) |PSETCAT-;variables1|) NIL))
+          (GO G191)))
+       (SEQ
+        (EXIT
+         (LETT #1#
+          (CONS (SPADCALL |p| (QREFELT |$| 14)) #1#) |PSETCAT-;variables1|)))
+       (LETT #2# (CDR #2#) |PSETCAT-;variables1|)
+       (GO G190)
+       G191
+       (EXIT (NREVERSE0 #1#))))
+     |PSETCAT-;variables1|)
+    (EXIT
+     (SPADCALL
+      (CONS (FUNCTION |PSETCAT-;variables1!0|) |$|)
+      (SPADCALL (SPADCALL |lvars| (QREFELT |$| 18)) (QREFELT |$| 19))
+      (QREFELT |$| 21))))))) 
+
+(DEFUN |PSETCAT-;variables1!0| (|#1| |#2| |$|)
+ (SPADCALL |#2| |#1| (QREFELT |$| 16))) 
+
+(DEFUN |PSETCAT-;variables2| (|lp| |$|)
+ (PROG (#1=#:G82397 |p| #2=#:G82398 |lvars|)
+  (RETURN
+   (SEQ
+    (LETT |lvars|
+     (PROGN
+      (LETT #1# NIL |PSETCAT-;variables2|)
+      (SEQ
+       (LETT |p| NIL |PSETCAT-;variables2|)
+       (LETT #2# |lp| |PSETCAT-;variables2|)
+       G190
+       (COND
+        ((OR (ATOM #2#) (PROGN (LETT |p| (CAR #2#) |PSETCAT-;variables2|) NIL))
+          (GO G191)))
+       (SEQ
+        (EXIT
+         (LETT #1#
+          (CONS (SPADCALL |p| (QREFELT |$| 22)) #1#) |PSETCAT-;variables2|)))
+       (LETT #2# (CDR #2#) |PSETCAT-;variables2|)
+       (GO G190)
+       G191
+       (EXIT (NREVERSE0 #1#))))
+     |PSETCAT-;variables2|)
+    (EXIT
+     (SPADCALL
+      (CONS (FUNCTION |PSETCAT-;variables2!0|) |$|)
+      (SPADCALL |lvars| (QREFELT |$| 19))
+      (QREFELT |$| 21))))))) 
+
+(DEFUN |PSETCAT-;variables2!0| (|#1| |#2| |$|) 
+ (SPADCALL |#2| |#1| (QREFELT |$| 16))) 
+
+(DEFUN |PSETCAT-;variables;SL;4| (|ps| |$|)
+ (|PSETCAT-;variables1| (|PSETCAT-;elements| |ps| |$|) |$|)) 
+
+(DEFUN |PSETCAT-;mainVariables;SL;5| (|ps| |$|)
+ (|PSETCAT-;variables2|
+  (SPADCALL (ELT |$| 24) (|PSETCAT-;elements| |ps| |$|) (QREFELT |$| 26))
+  |$|)) 
+
+(DEFUN |PSETCAT-;mainVariable?;VarSetSB;6| (|v| |ps| |$|)
+ (PROG (|lp|)
+  (RETURN
+   (SEQ
+    (LETT |lp|
+     (SPADCALL (ELT |$| 24) (|PSETCAT-;elements| |ps| |$|) (QREFELT |$| 26))
+     |PSETCAT-;mainVariable?;VarSetSB;6|)
+    (SEQ
+     G190
+     (COND
+      ((NULL
+        (COND
+         ((OR 
+           (NULL |lp|) 
+           (SPADCALL 
+            (SPADCALL (|SPADfirst| |lp|) (QREFELT |$| 22))
+            |v|
+            (QREFELT |$| 28)))
+          (QUOTE NIL))
+         ((QUOTE T) (QUOTE T))))
+       (GO G191)))
+     (SEQ (EXIT (LETT |lp| (CDR |lp|) |PSETCAT-;mainVariable?;VarSetSB;6|)))
+     NIL
+     (GO G190)
+     G191
+     (EXIT NIL))
+    (EXIT (COND ((NULL |lp|) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))))))) 
+
+(DEFUN |PSETCAT-;collectUnder;SVarSetS;7| (|ps| |v| |$|)
+ (PROG (|p| |lp| |lq|)
+  (RETURN
+   (SEQ
+    (LETT |lp| 
+     (|PSETCAT-;elements| |ps| |$|)
+     |PSETCAT-;collectUnder;SVarSetS;7|)
+    (LETT |lq| NIL |PSETCAT-;collectUnder;SVarSetS;7|)
+    (SEQ 
+     G190 
+     (COND
+      ((NULL (COND ((NULL |lp|) (QUOTE NIL)) ((QUOTE T) (QUOTE T))))
+        (GO G191)))
+     (SEQ
+      (LETT |p| (|SPADfirst| |lp|) |PSETCAT-;collectUnder;SVarSetS;7|)
+      (LETT |lp| (CDR |lp|) |PSETCAT-;collectUnder;SVarSetS;7|)
+      (EXIT
+       (COND
+        ((OR
+          (SPADCALL |p| (QREFELT |$| 24))
+          (SPADCALL (SPADCALL |p| (QREFELT |$| 22)) |v| (QREFELT |$| 16)))
+         (LETT |lq| (CONS |p| |lq|) |PSETCAT-;collectUnder;SVarSetS;7|)))))
+     NIL
+     (GO G190)
+     G191
+     (EXIT NIL))
+    (EXIT (SPADCALL |lq| (QREFELT |$| 30))))))) 
+
+(DEFUN |PSETCAT-;collectUpper;SVarSetS;8| (|ps| |v| |$|)
+ (PROG (|p| |lp| |lq|)
+  (RETURN
+   (SEQ
+    (LETT |lp| 
+     (|PSETCAT-;elements| |ps| |$|)
+     |PSETCAT-;collectUpper;SVarSetS;8|)
+    (LETT |lq| NIL |PSETCAT-;collectUpper;SVarSetS;8|)
+    (SEQ
+     G190
+     (COND
+      ((NULL (COND ((NULL |lp|) (QUOTE NIL)) ((QUOTE T) (QUOTE T))))
+        (GO G191)))
+     (SEQ
+      (LETT |p| (|SPADfirst| |lp|) |PSETCAT-;collectUpper;SVarSetS;8|)
+      (LETT |lp| (CDR |lp|) |PSETCAT-;collectUpper;SVarSetS;8|)
+      (EXIT
+       (COND
+        ((NULL (SPADCALL |p| (QREFELT |$| 24)))
+         (COND
+          ((SPADCALL |v| (SPADCALL |p| (QREFELT |$| 22)) (QREFELT |$| 16))
+           (LETT |lq| (CONS |p| |lq|) |PSETCAT-;collectUpper;SVarSetS;8|)))))))
+     NIL
+     (GO G190)
+     G191
+     (EXIT NIL))
+    (EXIT (SPADCALL |lq| (QREFELT |$| 30))))))) 
+
+(DEFUN |PSETCAT-;collect;SVarSetS;9| (|ps| |v| |$|)
+ (PROG (|p| |lp| |lq|)
+  (RETURN
+   (SEQ
+    (LETT |lp| (|PSETCAT-;elements| |ps| |$|) |PSETCAT-;collect;SVarSetS;9|)
+    (LETT |lq| NIL |PSETCAT-;collect;SVarSetS;9|)
+    (SEQ
+     G190
+     (COND
+      ((NULL (COND ((NULL |lp|) (QUOTE NIL)) ((QUOTE T) (QUOTE T))))
+        (GO G191)))
+     (SEQ 
+      (LETT |p| (|SPADfirst| |lp|) |PSETCAT-;collect;SVarSetS;9|)
+      (LETT |lp| (CDR |lp|) |PSETCAT-;collect;SVarSetS;9|)
+      (EXIT
+       (COND
+        ((NULL (SPADCALL |p| (QREFELT |$| 24)))
+         (COND
+          ((SPADCALL (SPADCALL |p| (QREFELT |$| 22)) |v| (QREFELT |$| 28))
+            (LETT |lq| (CONS |p| |lq|) |PSETCAT-;collect;SVarSetS;9|)))))))
+     NIL
+     (GO G190)
+     G191
+     (EXIT NIL))
+    (EXIT (SPADCALL |lq| (QREFELT |$| 30))))))) 
+
+(DEFUN |PSETCAT-;sort;SVarSetR;10| (|ps| |v| |$|)
+ (PROG (|p| |lp| |us| |vs| |ws|)
+  (RETURN
+   (SEQ
+    (LETT |lp| (|PSETCAT-;elements| |ps| |$|) |PSETCAT-;sort;SVarSetR;10|)
+    (LETT |us| NIL |PSETCAT-;sort;SVarSetR;10|)
+    (LETT |vs| NIL |PSETCAT-;sort;SVarSetR;10|)
+    (LETT |ws| NIL |PSETCAT-;sort;SVarSetR;10|)
+    (SEQ
+     G190
+     (COND
+      ((NULL (COND ((NULL |lp|) (QUOTE NIL)) ((QUOTE T) (QUOTE T))))
+       (GO G191)))
+     (SEQ
+      (LETT |p| (|SPADfirst| |lp|) |PSETCAT-;sort;SVarSetR;10|)
+      (LETT |lp| (CDR |lp|) |PSETCAT-;sort;SVarSetR;10|)
+      (EXIT
+       (COND
+        ((OR
+           (SPADCALL |p| (QREFELT |$| 24))
+           (SPADCALL (SPADCALL |p| (QREFELT |$| 22)) |v| (QREFELT |$| 16)))
+          (LETT |us| (CONS |p| |us|) |PSETCAT-;sort;SVarSetR;10|))
+        ((SPADCALL (SPADCALL |p| (QREFELT |$| 22)) |v| (QREFELT |$| 28))
+          (LETT |vs| (CONS |p| |vs|) |PSETCAT-;sort;SVarSetR;10|))
+        ((QUOTE T) (LETT |ws| (CONS |p| |ws|) |PSETCAT-;sort;SVarSetR;10|)))))
+     NIL
+     (GO G190)
+     G191
+     (EXIT NIL))
+    (EXIT
+     (VECTOR
+      (SPADCALL |us| (QREFELT |$| 30))
+      (SPADCALL |vs| (QREFELT |$| 30))
+      (SPADCALL |ws| (QREFELT |$| 30)))))))) 
+
+(DEFUN |PSETCAT-;=;2SB;11| (|ps1| |ps2| |$|)
+ (PROG (#1=#:G82439 #2=#:G82440 #3=#:G82437 |p| #4=#:G82438)
+  (RETURN
+   (SEQ
+    (SPADCALL
+     (SPADCALL
+      (PROGN
+       (LETT #1# NIL |PSETCAT-;=;2SB;11|)
+       (SEQ
+        (LETT |p| NIL |PSETCAT-;=;2SB;11|)
+        (LETT #2# (|PSETCAT-;elements| |ps1| |$|) |PSETCAT-;=;2SB;11|)
+        G190
+        (COND
+         ((OR (ATOM #2#) (PROGN (LETT |p| (CAR #2#) |PSETCAT-;=;2SB;11|) NIL))
+           (GO G191)))
+        (SEQ (EXIT (LETT #1# (CONS |p| #1#) |PSETCAT-;=;2SB;11|)))
+        (LETT #2# (CDR #2#) |PSETCAT-;=;2SB;11|)
+        (GO G190)
+        G191
+        (EXIT (NREVERSE0 #1#))))
+      (QREFELT |$| 37))
+     (SPADCALL
+      (PROGN
+       (LETT #3# NIL |PSETCAT-;=;2SB;11|)
+       (SEQ
+        (LETT |p| NIL |PSETCAT-;=;2SB;11|)
+        (LETT #4# (|PSETCAT-;elements| |ps2| |$|) |PSETCAT-;=;2SB;11|)
+        G190
+        (COND
+         ((OR (ATOM #4#) (PROGN (LETT |p| (CAR #4#) |PSETCAT-;=;2SB;11|) NIL))
+           (GO G191)))
+        (SEQ (EXIT (LETT #3# (CONS |p| #3#) |PSETCAT-;=;2SB;11|)))
+        (LETT #4# (CDR #4#) |PSETCAT-;=;2SB;11|)
+        (GO G190)
+        G191
+        (EXIT (NREVERSE0 #3#))))
+      (QREFELT |$| 37))
+     (QREFELT |$| 38)))))) 
+
+(DEFUN |PSETCAT-;localInf?| (|p| |q| |$|)
+ (SPADCALL
+  (SPADCALL |p| (QREFELT |$| 40))
+  (SPADCALL |q| (QREFELT |$| 40))
+  (QREFELT |$| 41))) 
+
+(DEFUN |PSETCAT-;localTriangular?| (|lp| |$|)
+ (PROG (|q| |p|)
+  (RETURN
+   (SEQ
+    (LETT |lp|
+     (SPADCALL (ELT |$| 42) |lp| (QREFELT |$| 26)) |PSETCAT-;localTriangular?|)
+    (EXIT
+     (COND
+      ((NULL |lp|) (QUOTE T))
+      ((SPADCALL (ELT |$| 24) |lp| (QREFELT |$| 43)) (QUOTE NIL))
+      ((QUOTE T)
+       (SEQ
+        (LETT |lp|
+         (SPADCALL
+          (CONS (FUNCTION |PSETCAT-;localTriangular?!0|) |$|) 
+          |lp| 
+          (QREFELT |$| 45))
+         |PSETCAT-;localTriangular?|)
+        (LETT |p| (|SPADfirst| |lp|) |PSETCAT-;localTriangular?|)
+        (LETT |lp| (CDR |lp|) |PSETCAT-;localTriangular?|)
+        (SEQ
+         G190
+         (COND
+          ((NULL
+            (COND
+             ((NULL |lp|) (QUOTE NIL))
+             ((QUOTE T)
+               (SPADCALL
+                (SPADCALL
+                 (LETT |q| 
+                  (|SPADfirst| |lp|)
+                  |PSETCAT-;localTriangular?|)
+                 (QREFELT |$| 22))
+                (SPADCALL |p| (QREFELT |$| 22)) (QREFELT |$| 16)))))
+           (GO G191)))
+         (SEQ
+          (LETT |p| |q| |PSETCAT-;localTriangular?|)
+          (EXIT (LETT |lp| (CDR |lp|) |PSETCAT-;localTriangular?|)))
+         NIL
+         (GO G190)
+         G191
+         (EXIT NIL))
+        (EXIT (NULL |lp|)))))))))) 
+
+(DEFUN |PSETCAT-;localTriangular?!0| (|#1| |#2| |$|)
+ (SPADCALL
+  (SPADCALL |#2| (QREFELT |$| 22))
+  (SPADCALL |#1| (QREFELT |$| 22))
+  (QREFELT |$| 16))) 
+
+(DEFUN |PSETCAT-;triangular?;SB;14| (|ps| |$|)
+ (|PSETCAT-;localTriangular?| (|PSETCAT-;elements| |ps| |$|) |$|)) 
+
+(DEFUN |PSETCAT-;trivialIdeal?;SB;15| (|ps| |$|)
+ (NULL 
+  (SPADCALL (ELT |$| 42) (|PSETCAT-;elements| |ps| |$|) (QREFELT |$| 26)))) 
+
+(DEFUN |PSETCAT-;roughUnitIdeal?;SB;16| (|ps| |$|)
+ (SPADCALL 
+  (ELT |$| 24)
+  (SPADCALL (ELT |$| 42) (|PSETCAT-;elements| |ps| |$|) (QREFELT |$| 26))
+  (QREFELT |$| 43))) 
+
+(DEFUN |PSETCAT-;relativelyPrimeLeadingMonomials?| (|p| |q| |$|)
+ (PROG (|dp| |dq|)
+  (RETURN
+   (SEQ
+    (LETT |dp|
+     (SPADCALL |p| (QREFELT |$| 40))
+     |PSETCAT-;relativelyPrimeLeadingMonomials?|)
+    (LETT |dq|
+     (SPADCALL |q| (QREFELT |$| 40))
+     |PSETCAT-;relativelyPrimeLeadingMonomials?|)
+    (EXIT
+     (SPADCALL
+      (SPADCALL |dp| |dq| (QREFELT |$| 49))
+      (SPADCALL |dp| |dq| (QREFELT |$| 50))
+      (QREFELT |$| 51))))))) 
+
+(DEFUN |PSETCAT-;roughBase?;SB;18| (|ps| |$|)
+ (PROG (|p| |lp| |rB?| |copylp|)
+  (RETURN
+   (SEQ
+    (LETT |lp|
+     (SPADCALL (ELT |$| 42) (|PSETCAT-;elements| |ps| |$|) (QREFELT |$| 26))
+     |PSETCAT-;roughBase?;SB;18|)
+    (EXIT
+     (COND
+      ((NULL |lp|) (QUOTE T))
+      ((QUOTE T)
+       (SEQ 
+        (LETT |rB?| (QUOTE T) |PSETCAT-;roughBase?;SB;18|)
+        (SEQ
+         G190
+         (COND
+          ((NULL (COND ((NULL |lp|) (QUOTE NIL)) ((QUOTE T) |rB?|)))
+           (GO G191)))
+         (SEQ
+          (LETT |p| (|SPADfirst| |lp|) |PSETCAT-;roughBase?;SB;18|)
+          (LETT |lp| (CDR |lp|) |PSETCAT-;roughBase?;SB;18|)
+          (LETT |copylp| |lp| |PSETCAT-;roughBase?;SB;18|)
+          (EXIT
+           (SEQ
+            G190
+            (COND
+             ((NULL (COND ((NULL |copylp|) (QUOTE NIL)) ((QUOTE T) |rB?|)))
+              (GO G191)))
+            (SEQ
+             (LETT |rB?|
+              (|PSETCAT-;relativelyPrimeLeadingMonomials?| |p|
+               (|SPADfirst| |copylp|) |$|)
+              |PSETCAT-;roughBase?;SB;18|)
+             (EXIT (LETT |copylp| (CDR |copylp|) |PSETCAT-;roughBase?;SB;18|)))
+            NIL
+            (GO G190)
+            G191
+            (EXIT NIL))))
+         NIL
+         (GO G190)
+         G191
+         (EXIT NIL))
+        (EXIT |rB?|))))))))) 
+
+(DEFUN |PSETCAT-;roughSubIdeal?;2SB;19| (|ps1| |ps2| |$|)
+ (PROG (|lp|)
+  (RETURN
+   (SEQ
+    (LETT |lp|
+     (SPADCALL (|PSETCAT-;elements| |ps1| |$|) |ps2| (QREFELT |$| 53))
+     |PSETCAT-;roughSubIdeal?;2SB;19|)
+    (EXIT (NULL (SPADCALL (ELT |$| 42) |lp| (QREFELT |$| 26)))))))) 
+
+(DEFUN |PSETCAT-;roughEqualIdeals?;2SB;20| (|ps1| |ps2| |$|)
+ (COND
+  ((SPADCALL |ps1| |ps2| (QREFELT |$| 55)) (QUOTE T))
+  ((SPADCALL |ps1| |ps2| (QREFELT |$| 56))
+    (SPADCALL |ps2| |ps1| (QREFELT |$| 56)))
+  ((QUOTE T) (QUOTE NIL)))) 
+
+(DEFUN |PSETCAT-;exactQuo| (|r| |s| |$|)
+ (SPADCALL |r| |s| (QREFELT |$| 58))) 
+
+(DEFUN |PSETCAT-;exactQuo| (|r| |s| |$|)
+ (PROG (#1=#:G82473)
+  (RETURN
+   (PROG2
+    (LETT #1# (SPADCALL |r| |s| (QREFELT |$| 60)) |PSETCAT-;exactQuo|)
+    (QCDR #1#)
+    (|check-union| (QEQCAR #1# 0) (QREFELT |$| 7) #1#))))) 
+
+(DEFUN |PSETCAT-;headRemainder;PSR;23| (|a| |ps| |$|)
+ (PROG (|lp1| |p| |e| |g| |#G47| |#G48| |lca| |lcp| |r| |lp2|)
+  (RETURN
+   (SEQ
+    (LETT |lp1|
+     (SPADCALL (ELT |$| 42) (|PSETCAT-;elements| |ps| |$|) (QREFELT |$| 26))
+     |PSETCAT-;headRemainder;PSR;23|)
+    (EXIT
+     (COND
+      ((NULL |lp1|) (CONS |a| (|spadConstant| |$| 61)))
+      ((SPADCALL (ELT |$| 24) |lp1| (QREFELT |$| 43))
+        (CONS (SPADCALL |a| (QREFELT |$| 62)) (|spadConstant| |$| 61)))
+      ((QUOTE T)
+       (SEQ
+        (LETT |r| (|spadConstant| |$| 61) |PSETCAT-;headRemainder;PSR;23|)
+        (LETT |lp1|
+         (SPADCALL
+          (CONS (|function| |PSETCAT-;localInf?|) |$|)
+          (REVERSE (|PSETCAT-;elements| |ps| |$|))
+          (QREFELT |$| 45))
+         |PSETCAT-;headRemainder;PSR;23|)
+        (LETT |lp2| |lp1| |PSETCAT-;headRemainder;PSR;23|)
+        (SEQ
+         G190
+         (COND
+          ((NULL
+            (COND 
+             ((OR (SPADCALL |a| (QREFELT |$| 42)) (NULL |lp2|)) (QUOTE NIL))
+             ((QUOTE T) (QUOTE T))))
+           (GO G191)))
+         (SEQ
+          (LETT |p| (|SPADfirst| |lp2|) |PSETCAT-;headRemainder;PSR;23|)
+          (LETT |e|
+           (SPADCALL
+            (SPADCALL |a| (QREFELT |$| 40))
+            (SPADCALL |p| (QREFELT |$| 40))
+            (QREFELT |$| 63))
+           |PSETCAT-;headRemainder;PSR;23|)
+          (EXIT
+           (COND
+            ((QEQCAR |e| 0)
+             (SEQ
+              (LETT |g|
+               (SPADCALL
+                (LETT |lca|
+                 (SPADCALL |a| (QREFELT |$| 64))
+                 |PSETCAT-;headRemainder;PSR;23|)
+                (LETT |lcp|
+                 (SPADCALL |p| (QREFELT |$| 64))
+                 |PSETCAT-;headRemainder;PSR;23|)
+                (QREFELT |$| 65))
+               |PSETCAT-;headRemainder;PSR;23|)
+              (PROGN 
+               (LETT |#G47|
+                (|PSETCAT-;exactQuo| |lca| |g| |$|)
+                |PSETCAT-;headRemainder;PSR;23|)
+               (LETT |#G48|
+                (|PSETCAT-;exactQuo| |lcp| |g| |$|)
+                |PSETCAT-;headRemainder;PSR;23|)
+               (LETT |lca| |#G47| |PSETCAT-;headRemainder;PSR;23|)
+               (LETT |lcp| |#G48| |PSETCAT-;headRemainder;PSR;23|))
+              (LETT |a|
+               (SPADCALL
+                (SPADCALL |lcp|
+                 (SPADCALL |a| (QREFELT |$| 62))
+                 (QREFELT |$| 66))
+                (SPADCALL
+                 (SPADCALL |lca| (QCDR |e|) (QREFELT |$| 67))
+                 (SPADCALL |p| (QREFELT |$| 62)) (QREFELT |$| 68))
+                (QREFELT |$| 69))
+               |PSETCAT-;headRemainder;PSR;23|)
+              (LETT |r|
+               (SPADCALL |r| |lcp| (QREFELT |$| 70))
+               |PSETCAT-;headRemainder;PSR;23|)
+              (EXIT (LETT |lp2| |lp1| |PSETCAT-;headRemainder;PSR;23|))))
+            ((QUOTE T)
+             (LETT |lp2| (CDR |lp2|) |PSETCAT-;headRemainder;PSR;23|)))))
+         NIL
+         (GO G190)
+         G191
+         (EXIT NIL))
+        (EXIT (CONS |a| |r|)))))))))) 
+
+(DEFUN |PSETCAT-;makeIrreducible!| (|frac| |$|)
+ (PROG (|g|)
+  (RETURN
+   (SEQ
+    (LETT |g|
+     (SPADCALL (QCDR |frac|) (QCAR |frac|) (QREFELT |$| 73))
+     |PSETCAT-;makeIrreducible!|)
+    (EXIT
+     (COND
+      ((SPADCALL |g| (QREFELT |$| 74)) |frac|)
+      ((QUOTE T)
+       (SEQ
+        (PROGN
+         (RPLACA |frac| (SPADCALL (QCAR |frac|) |g| (QREFELT |$| 75)))
+         (QCAR |frac|))
+        (PROGN
+         (RPLACD |frac| (|PSETCAT-;exactQuo| (QCDR |frac|) |g| |$|))
+         (QCDR |frac|))
+        (EXIT |frac|))))))))) 
+
+(DEFUN |PSETCAT-;remainder;PSR;25| (|a| |ps| |$|)
+ (PROG (|hRa| |r| |lca| |g| |b| |c|)
+  (RETURN
+   (SEQ
+    (LETT |hRa|
+     (|PSETCAT-;makeIrreducible!| (SPADCALL |a| |ps| (QREFELT |$| 76)) |$|)
+     |PSETCAT-;remainder;PSR;25|)
+    (LETT |a| (QCAR |hRa|) |PSETCAT-;remainder;PSR;25|)
+    (LETT |r| (QCDR |hRa|) |PSETCAT-;remainder;PSR;25|)
+    (EXIT
+     (COND
+      ((SPADCALL |a| (QREFELT |$| 42))
+        (VECTOR (|spadConstant| |$| 61) |a| |r|))
+      ((QUOTE T)
+       (SEQ
+        (LETT |b| 
+         (SPADCALL
+          (|spadConstant| |$| 61)
+          (SPADCALL |a| (QREFELT |$| 40))
+          (QREFELT |$| 67))
+         |PSETCAT-;remainder;PSR;25|)
+        (LETT |c| (SPADCALL |a| (QREFELT |$| 64)) |PSETCAT-;remainder;PSR;25|)
+        (SEQ
+         G190
+         (COND
+          ((NULL
+            (COND
+             ((SPADCALL
+                (LETT |a|
+                 (SPADCALL |a| (QREFELT |$| 62))
+                 |PSETCAT-;remainder;PSR;25|)
+                (QREFELT |$| 42))
+               (QUOTE NIL))
+             ((QUOTE T) (QUOTE T))))
+           (GO G191)))
+         (SEQ 
+          (LETT |hRa|
+           (|PSETCAT-;makeIrreducible!|
+            (SPADCALL |a| |ps| (QREFELT |$| 76))
+            |$|)
+           |PSETCAT-;remainder;PSR;25|)
+          (LETT |a| (QCAR |hRa|) |PSETCAT-;remainder;PSR;25|)
+          (LETT |r|
+           (SPADCALL |r| (QCDR |hRa|) (QREFELT |$| 70))
+           |PSETCAT-;remainder;PSR;25|)
+          (LETT |g|
+           (SPADCALL |c|
+            (LETT |lca|
+             (SPADCALL |a| (QREFELT |$| 64))
+             |PSETCAT-;remainder;PSR;25|)
+            (QREFELT |$| 65))
+           |PSETCAT-;remainder;PSR;25|)
+          (LETT |b|
+           (SPADCALL
+            (SPADCALL
+             (SPADCALL
+              (QCDR |hRa|)
+              (|PSETCAT-;exactQuo| |c| |g| |$|)
+              (QREFELT |$| 70))
+             |b|
+             (QREFELT |$| 66))
+            (SPADCALL
+             (|PSETCAT-;exactQuo| |lca| |g| |$|)
+             (SPADCALL |a| (QREFELT |$| 40))
+             (QREFELT |$| 67))
+            (QREFELT |$| 77))
+           |PSETCAT-;remainder;PSR;25|)
+          (EXIT (LETT |c| |g| |PSETCAT-;remainder;PSR;25|)))
+         NIL
+         (GO G190)
+         G191
+         (EXIT NIL))
+        (EXIT (VECTOR |c| |b| |r|)))))))))) 
+
+(DEFUN |PSETCAT-;rewriteIdealWithHeadRemainder;LSL;26| (|ps| |cs| |$|) 
+ (PROG (|p| |rs|)
+  (RETURN
+   (SEQ
+    (COND
+     ((SPADCALL |cs| (QREFELT |$| 80)) |ps|)
+     ((SPADCALL |cs| (QREFELT |$| 81)) (LIST (|spadConstant| |$| 82)))
+     ((QUOTE T)
+      (SEQ
+       (LETT |ps|
+        (SPADCALL (ELT |$| 42) |ps| (QREFELT |$| 26))
+        |PSETCAT-;rewriteIdealWithHeadRemainder;LSL;26|)
+       (EXIT
+        (COND
+         ((NULL |ps|) |ps|)
+         ((SPADCALL (ELT |$| 24) |ps| (QREFELT |$| 43))
+           (LIST (|spadConstant| |$| 83)))
+         ((QUOTE T)
+           (SEQ
+            (LETT |rs| NIL |PSETCAT-;rewriteIdealWithHeadRemainder;LSL;26|)
+            (SEQ
+             G190
+             (COND
+              ((NULL (COND ((NULL |ps|) (QUOTE NIL)) ((QUOTE T) (QUOTE T))))
+                (GO G191)))
+             (SEQ
+              (LETT |p|
+               (|SPADfirst| |ps|)
+               |PSETCAT-;rewriteIdealWithHeadRemainder;LSL;26|)
+              (LETT |ps|
+               (CDR |ps|) 
+               |PSETCAT-;rewriteIdealWithHeadRemainder;LSL;26|)
+              (LETT |p|
+               (QCAR (SPADCALL |p| |cs| (QREFELT |$| 76)))
+               |PSETCAT-;rewriteIdealWithHeadRemainder;LSL;26|)
+              (EXIT
+               (COND
+                ((NULL (SPADCALL |p| (QREFELT |$| 42)))
+                 (COND
+                  ((SPADCALL |p| (QREFELT |$| 24))
+                   (SEQ
+                    (LETT |ps| NIL
+                     |PSETCAT-;rewriteIdealWithHeadRemainder;LSL;26|)
+                    (EXIT
+                     (LETT |rs|
+                      (LIST (|spadConstant| |$| 83))
+                      |PSETCAT-;rewriteIdealWithHeadRemainder;LSL;26|))))
+                  ((QUOTE T)
+                   (SEQ
+                    (SPADCALL |p| (QREFELT |$| 84))
+                    (EXIT
+                     (LETT |rs|
+                      (CONS |p| |rs|)
+                      |PSETCAT-;rewriteIdealWithHeadRemainder;LSL;26|)))))))))
+             NIL
+             (GO G190)
+             G191
+             (EXIT NIL))
+            (EXIT (SPADCALL |rs| (QREFELT |$| 85)))))))))))))) 
+
+(DEFUN |PSETCAT-;rewriteIdealWithRemainder;LSL;27| (|ps| |cs| |$|)
+ (PROG (|p| |rs|)
+  (RETURN
+   (SEQ
+    (COND
+     ((SPADCALL |cs| (QREFELT |$| 80)) |ps|)
+     ((SPADCALL |cs| (QREFELT |$| 81)) (LIST (|spadConstant| |$| 82)))
+     ((QUOTE T)
+      (SEQ
+       (LETT |ps|
+        (SPADCALL (ELT |$| 42) |ps| (QREFELT |$| 26))
+        |PSETCAT-;rewriteIdealWithRemainder;LSL;27|)
+       (EXIT
+        (COND
+         ((NULL |ps|) |ps|)
+         ((SPADCALL (ELT |$| 24) |ps| (QREFELT |$| 43))
+           (LIST (|spadConstant| |$| 83)))
+         ((QUOTE T)
+          (SEQ
+           (LETT |rs| NIL |PSETCAT-;rewriteIdealWithRemainder;LSL;27|)
+           (SEQ
+            G190
+            (COND
+             ((NULL (COND ((NULL |ps|) (QUOTE NIL)) ((QUOTE T) (QUOTE T))))
+               (GO G191)))
+            (SEQ
+             (LETT |p|
+              (|SPADfirst| |ps|)
+              |PSETCAT-;rewriteIdealWithRemainder;LSL;27|)
+             (LETT |ps| (CDR |ps|) |PSETCAT-;rewriteIdealWithRemainder;LSL;27|)
+             (LETT |p|
+              (QVELT (SPADCALL |p| |cs| (QREFELT |$| 87)) 1)
+              |PSETCAT-;rewriteIdealWithRemainder;LSL;27|)
+             (EXIT
+              (COND
+               ((NULL (SPADCALL |p| (QREFELT |$| 42)))
+                (COND
+                 ((SPADCALL |p| (QREFELT |$| 24))
+                  (SEQ
+                   (LETT |ps| NIL |PSETCAT-;rewriteIdealWithRemainder;LSL;27|)
+                   (EXIT
+                    (LETT |rs|
+                     (LIST (|spadConstant| |$| 83))
+                     |PSETCAT-;rewriteIdealWithRemainder;LSL;27|))))
+                 ((QUOTE T)
+                  (LETT |rs|
+                   (CONS (SPADCALL |p| (QREFELT |$| 88)) |rs|)
+                   |PSETCAT-;rewriteIdealWithRemainder;LSL;27|)))))))
+            NIL
+            (GO G190)
+            G191
+            (EXIT NIL))
+           (EXIT (SPADCALL |rs| (QREFELT |$| 85)))))))))))))) 
+
+(DEFUN |PolynomialSetCategory&| (|#1| |#2| |#3| |#4| |#5|)
+ (PROG (|DV$1| |DV$2| |DV$3| |DV$4| |DV$5| |dv$| |$| |pv$|)
+  (RETURN
+   (PROGN
+    (LETT |DV$1| (|devaluate| |#1|) . #1=(|PolynomialSetCategory&|))
+    (LETT |DV$2| (|devaluate| |#2|) . #1#)
+    (LETT |DV$3| (|devaluate| |#3|) . #1#)
+    (LETT |DV$4| (|devaluate| |#4|) . #1#)
+    (LETT |DV$5| (|devaluate| |#5|) . #1#)
+    (LETT |dv$|
+     (LIST
+      (QUOTE |PolynomialSetCategory&|)
+      |DV$1| |DV$2| |DV$3| |DV$4| |DV$5|) . #1#)
+    (LETT |$| (GETREFV 90) . #1#)
+    (QSETREFV |$| 0 |dv$|)
+    (QSETREFV |$| 3
+     (LETT |pv$|
+      (|buildPredVector| 0 0
+       (LIST (|HasCategory| |#2| (QUOTE (|IntegralDomain|))))) . #1#))
+    (|stuffDomainSlots| |$|)
+    (QSETREFV |$| 6 |#1|)
+    (QSETREFV |$| 7 |#2|)
+    (QSETREFV |$| 8 |#3|)
+    (QSETREFV |$| 9 |#4|)
+    (QSETREFV |$| 10 |#5|)
+    (COND
+     ((|testBitVector| |pv$| 1)
+      (PROGN
+       (QSETREFV |$| 48
+        (CONS (|dispatchFunction| |PSETCAT-;roughUnitIdeal?;SB;16|) |$|))
+       (QSETREFV |$| 52
+        (CONS (|dispatchFunction| |PSETCAT-;roughBase?;SB;18|) |$|))
+       (QSETREFV |$| 54
+        (CONS (|dispatchFunction| |PSETCAT-;roughSubIdeal?;2SB;19|) |$|))
+       (QSETREFV |$| 57
+        (CONS (|dispatchFunction| |PSETCAT-;roughEqualIdeals?;2SB;20|) |$|)))))
+    (COND
+     ((|HasCategory| |#2| (QUOTE (|GcdDomain|)))
+     (COND
+      ((|HasCategory| |#4| (QUOTE (|ConvertibleTo| (|Symbol|))))
+       (PROGN
+        (QSETREFV |$| 72
+         (CONS (|dispatchFunction| |PSETCAT-;headRemainder;PSR;23|) |$|))
+        (QSETREFV |$| 79
+         (CONS (|dispatchFunction| |PSETCAT-;remainder;PSR;25|) |$|))
+        (QSETREFV |$| 86
+         (CONS
+          (|dispatchFunction| |PSETCAT-;rewriteIdealWithHeadRemainder;LSL;26|)
+          |$|))
+        (QSETREFV |$| 89
+         (CONS
+          (|dispatchFunction| |PSETCAT-;rewriteIdealWithRemainder;LSL;27|)
+          |$|)))))))
+    |$|)))) 
+
+(MAKEPROP
+ (QUOTE |PolynomialSetCategory&|)
+ (QUOTE |infovec|)
+ (LIST
+  (QUOTE 
+   #(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|) (|local| |#3|) 
+     (|local| |#4|) (|local| |#5|) (|List| 10) (0 . |members|) (|List| 9) 
+     (5 . |variables|) (|Boolean|) (10 . |<|) (|List| |$|) (16 . |concat|) 
+     (21 . |removeDuplicates|) (|Mapping| 15 9 9) (26 . |sort|) 
+     (32 . |mvar|) |PSETCAT-;variables;SL;4| (37 . |ground?|) 
+     (|Mapping| 15 10) (42 . |remove|) |PSETCAT-;mainVariables;SL;5| 
+     (48 . |=|) |PSETCAT-;mainVariable?;VarSetSB;6| (54 . |construct|) 
+     |PSETCAT-;collectUnder;SVarSetS;7| |PSETCAT-;collectUpper;SVarSetS;8| 
+     |PSETCAT-;collect;SVarSetS;9| (|Record| (|:| |under| |$|) 
+     (|:| |floor| |$|) (|:| |upper| |$|)) |PSETCAT-;sort;SVarSetR;10| 
+     (|Set| 10) (59 . |brace|) (64 . |=|) |PSETCAT-;=;2SB;11| 
+     (70 . |degree|) (75 . |<|) (81 . |zero?|) (86 . |any?|) 
+     (|Mapping| 15 10 10) (92 . |sort|) |PSETCAT-;triangular?;SB;14| 
+     |PSETCAT-;trivialIdeal?;SB;15| (98 . |roughUnitIdeal?|) 
+     (103 . |sup|) (109 . |+|) (115 . |=|) (121 . |roughBase?|) 
+     (126 . |rewriteIdealWithRemainder|) (132 . |roughSubIdeal?|) 
+     (138 . |=|) (144 . |roughSubIdeal?|) (150 . |roughEqualIdeals?|) 
+     (156 . |quo|) (|Union| |$| (QUOTE "failed")) (162 . |exquo|) 
+     (168 . |One|) (172 . |reductum|) (177 . |subtractIfCan|) 
+     (183 . |leadingCoefficient|) (188 . |gcd|) (194 . |*|) 
+     (200 . |monomial|) (206 . |*|) (212 . |-|) (218 . |*|) 
+     (|Record| (|:| |num| 10) (|:| |den| 7)) (224 . |headRemainder|) 
+     (230 . |gcd|) (236 . |one?|) (241 . |exactQuotient!|) 
+     (247 . |headRemainder|) (253 . |+|) (|Record| (|:| |rnum| 7) 
+     (|:| |polnum| 10) (|:| |den| 7)) (259 . |remainder|) 
+     (265 . |trivialIdeal?|) (270 . |roughUnitIdeal?|) 
+     (275 . |Zero|) (279 . |One|) (283 . |primitivePart!|) 
+     (288 . |removeDuplicates|) (293 . |rewriteIdealWithHeadRemainder|) 
+     (299 . |remainder|) (305 . |unitCanonical|) 
+     (310 . |rewriteIdealWithRemainder|)))
+  (QUOTE #(|variables| 316 |trivialIdeal?| 321 |triangular?| 326 
+     |sort| 331 |roughUnitIdeal?| 337 |roughSubIdeal?| 342 
+     |roughEqualIdeals?| 348 |roughBase?| 354 |rewriteIdealWithRemainder| 
+     359 |rewriteIdealWithHeadRemainder| 365 |remainder| 371 |mainVariables| 
+     377 |mainVariable?| 382 |headRemainder| 388 |collectUpper| 394 
+     |collectUnder| 400 |collect| 406 |=| 412))
+  (QUOTE NIL)
+  (CONS
+   (|makeByteWordVec2| 1 (QUOTE NIL))
+   (CONS
+    (QUOTE #())
+    (CONS
+     (QUOTE #())
+     (|makeByteWordVec2| 89 (QUOTE (1 6 11 0 12 1 10 13 0 14 2 9 15 0 
+      0 16 1 13 0 17 18 1 13 0 0 19 2 13 0 20 0 21 1 10 9 0 22 1 10 15 0 24 
+      2 11 0 25 0 26 2 9 15 0 0 28 1 6 0 11 30 1 36 0 11 37 2 36 15 0 0 38 1 
+      10 8 0 40 2 8 15 0 0 41 1 10 15 0 42 2 11 15 25 0 43 2 11 0 44 0 45 1 
+      0 15 0 48 2 8 0 0 0 49 2 8 0 0 0 50 2 8 15 0 0 51 1 0 15 0 52 2 6 11 11 
+      0 53 2 0 15 0 0 54 2 6 15 0 0 55 2 6 15 0 0 56 2 0 15 0 0 57 2 7 0 0 0 
+      58 2 7 59 0 0 60 0 7 0 61 1 10 0 0 62 2 8 59 0 0 63 1 10 7 0 64 2 7 0 
+      0 0 65 2 10 0 7 0 66 2 10 0 7 8 67 2 10 0 0 0 68 2 10 0 0 0 69 2 7 0 
+      0 0 70 2 0 71 10 0 72 2 10 7 7 0 73 1 7 15 0 74 2 10 0 0 7 75 2 6 71 
+      10 0 76 2 10 0 0 0 77 2 0 78 10 0 79 1 6 15 0 80 1 6 15 0 81 0 10 0 
+      82 0 10 0 83 1 10 0 0 84 1 11 0 0 85 2 0 11 11 0 86 2 6 78 10 0 87 1 
+      10 0 0 88 2 0 11 11 0 89 1 0 13 0 23 1 0 15 0 47 1 0 15 0 46 2 0 34 
+      0 9 35 1 0 15 0 48 2 0 15 0 0 54 2 0 15 0 0 57 1 0 15 0 52 2 0 11 11 
+      0 89 2 0 11 11 0 86 2 0 78 10 0 79 1 0 13 0 27 2 0 15 9 0 29 2 0 71 
+      10 0 72 2 0 0 0 9 32 2 0 0 0 9 31 2 0 0 0 9 33 2 0 15 0 0 39))))))
+  (QUOTE |lookupComplete|))) 
+
+@
 \section{QFCAT.lsp BOOTSTRAP}
 {\bf QFCAT} depends on a chain of files. We need to break this cycle to build
 the algebra. So we keep a cached copy of the translated {\bf QFCAT}
@@ -51466,6 +57712,163 @@ Note that this code is not included in the generated catdef.spad file.
        0 19 22 2 0 0 0 23 30 2 0 0 0 0 46 1 0 0 33 35 2 0 0 0 0 32))))))
   (QUOTE |lookupComplete|))) 
 @
+\section{TSETCAT.lsp BOOTSTRAP} 
+{\bf TSETCAT} depends on a chain of
+files. We need to break this cycle to build the algebra. So we keep a
+cached copy of the translated {\bf TSETCAT} category which we can write
+into the {\bf MID} directory. We compile the lisp code and copy the
+{\bf TSETCAT.o} file to the {\bf OUT} directory.  This is eventually
+forcibly replaced by a recompiled version.
+
+Note that this code is not included in the generated catdef.spad file.
+
+<<TSETCAT.lsp BOOTSTRAP>>=
+
+(|/VERSIONCHECK| 2) 
+
+(SETQ |TriangularSetCategory;CAT| (QUOTE NIL)) 
+
+(SETQ |TriangularSetCategory;AL| (QUOTE NIL)) 
+
+(DEFUN |TriangularSetCategory| (|&REST| #1=#:G82394 |&AUX| #2=#:G82392)
+ (DSETQ #2# #1#)
+ (LET (#3=#:G82393)
+  (COND
+   ((SETQ #3# (|assoc| (|devaluateList| #2#) |TriangularSetCategory;AL|))
+     (CDR #3#))
+   (T
+    (SETQ |TriangularSetCategory;AL|
+     (|cons5|
+      (CONS
+       (|devaluateList| #2#)
+       (SETQ #3# (APPLY (FUNCTION |TriangularSetCategory;|) #2#)))
+      |TriangularSetCategory;AL|))
+     #3#)))) 
+
+(DEFUN |TriangularSetCategory;| (|t#1| |t#2| |t#3| |t#4|) 
+ (PROG (#1=#:G82391) 
+  (RETURN
+   (PROG1
+    (LETT #1#
+     (|sublisV|
+      (PAIR
+       (QUOTE (|t#1| |t#2| |t#3| |t#4|))
+       (LIST
+        (|devaluate| |t#1|)
+        (|devaluate| |t#2|)
+        (|devaluate| |t#3|)
+        (|devaluate| |t#4|)))
+      (COND
+       (|TriangularSetCategory;CAT|)
+       ((QUOTE T)
+        (LETT |TriangularSetCategory;CAT|
+         (|Join|
+          (|PolynomialSetCategory|
+           (QUOTE |t#1|)
+           (QUOTE |t#2|)
+           (QUOTE |t#3|)
+           (QUOTE |t#4|))
+          (|mkCategory|
+           (QUOTE |domain|)
+           (QUOTE (
+            ((|infRittWu?| ((|Boolean|) |$| |$|)) T)
+            ((|basicSet| (
+               (|Union|
+                (|Record| (|:| |bas| |$|) (|:| |top| (|List| |t#4|))) "failed")
+               (|List| |t#4|)
+               (|Mapping| (|Boolean|) |t#4| |t#4|)))
+              T)
+            ((|basicSet| (
+               (|Union|
+                (|Record| (|:| |bas| |$|) (|:| |top| (|List| |t#4|))) "failed")
+               (|List| |t#4|)
+               (|Mapping| (|Boolean|) |t#4|)
+               (|Mapping| (|Boolean|) |t#4| |t#4|)))
+              T)
+            ((|initials| ((|List| |t#4|) |$|)) T)
+            ((|degree| ((|NonNegativeInteger|) |$|)) T)
+            ((|quasiComponent| (
+               (|Record|
+                (|:| |close| (|List| |t#4|))
+                (|:| |open| (|List| |t#4|)))
+               |$|))
+              T)
+            ((|normalized?| ((|Boolean|) |t#4| |$|)) T)
+            ((|normalized?| ((|Boolean|) |$|)) T)
+            ((|reduced?| (
+               (|Boolean|)
+               |t#4|
+               |$|
+               (|Mapping| (|Boolean|) |t#4| |t#4|)))
+              T)
+            ((|stronglyReduced?| ((|Boolean|) |t#4| |$|)) T)
+            ((|headReduced?| ((|Boolean|) |t#4| |$|)) T)
+            ((|initiallyReduced?| ((|Boolean|) |t#4| |$|)) T)
+            ((|autoReduced?| (
+              (|Boolean|)
+              |$|
+              (|Mapping| (|Boolean|) |t#4| (|List| |t#4|))))
+              T)
+            ((|stronglyReduced?| ((|Boolean|) |$|)) T)
+            ((|headReduced?| ((|Boolean|) |$|)) T)
+            ((|initiallyReduced?| ((|Boolean|) |$|)) T)
+            ((|reduce| (
+               |t#4| 
+               |t#4| 
+               |$| 
+               (|Mapping| |t#4| |t#4| |t#4|)
+               (|Mapping| (|Boolean|) |t#4| |t#4|)))
+              T)
+            ((|rewriteSetWithReduction| (
+              (|List| |t#4|)
+              (|List| |t#4|)
+              |$|
+              (|Mapping| |t#4| |t#4| |t#4|)
+              (|Mapping| (|Boolean|) |t#4| |t#4|)))
+              T)
+            ((|stronglyReduce| (|t#4| |t#4| |$|)) T)
+            ((|headReduce| (|t#4| |t#4| |$|)) T)
+            ((|initiallyReduce| (|t#4| |t#4| |$|)) T)
+            ((|removeZero| (|t#4| |t#4| |$|)) T)
+            ((|collectQuasiMonic| (|$| |$|)) T)
+            ((|reduceByQuasiMonic| (|t#4| |t#4| |$|)) T)
+            ((|zeroSetSplit| ((|List| |$|) (|List| |t#4|))) T)
+            ((|zeroSetSplitIntoTriangularSystems|
+              ((|List|
+                (|Record| (|:| |close| |$|) (|:| |open| (|List| |t#4|))))
+               (|List| |t#4|)))
+              T)
+            ((|first| ((|Union| |t#4| "failed") |$|)) T)
+            ((|last| ((|Union| |t#4| "failed") |$|)) T)
+            ((|rest| ((|Union| |$| "failed") |$|)) T)
+            ((|algebraicVariables| ((|List| |t#3|) |$|)) T)
+            ((|algebraic?| ((|Boolean|) |t#3| |$|)) T)
+            ((|select| ((|Union| |t#4| "failed") |$| |t#3|)) T)
+            ((|extendIfCan| ((|Union| |$| "failed") |$| |t#4|)) T)
+            ((|extend| (|$| |$| |t#4|)) T)
+            ((|coHeight| ((|NonNegativeInteger|) |$|))
+              (|has| |t#3| (|Finite|)))))
+           (QUOTE (
+            (|finiteAggregate| T)
+            (|shallowlyMutable| T)))
+           (QUOTE ((|NonNegativeInteger|)
+            (|Boolean|)
+            (|List| |t#3|)
+            (|List| (|Record| (|:| |close| |$|) (|:| |open| (|List| |t#4|))))
+            (|List| |t#4|)
+            (|List| |$|)))
+           NIL))
+      . #2=(|TriangularSetCategory|)))))
+     . #2#)
+    (SETELT #1# 0 
+     (LIST 
+      (QUOTE |TriangularSetCategory|)
+      (|devaluate| |t#1|)
+      (|devaluate| |t#2|)
+      (|devaluate| |t#3|)
+      (|devaluate| |t#4|))))))) 
+
+@
 \section{UFD.lsp BOOTSTRAP} 
 {\bf UFD} needs
 {\bf GCDDOM} which needs
@@ -54074,6 +60477,7 @@ Note that this code is not included in the generated catdef.spad file.
 <<category DIFEXT DifferentialExtension>>
 <<category DIFRING DifferentialRing>>
 <<category DIOPS DictionaryOperations>>
+<<category DIRPCAT DirectProductCategory>>
 <<category DIVRING DivisionRing>>
 <<category DLAGG DoublyLinkedAggregate>>
 <<category DPOLCAT DifferentialPolynomialCategory>>
@@ -54153,20 +60557,26 @@ Note that this code is not included in the generated catdef.spad file.
 <<category NAALG NonAssociativeAlgebra>>
 <<category NARNG NonAssociativeRng>>
 <<category NASRING NonAssociativeRing>>
+<<category NUMINT NumericalIntegrationCategory>>
 <<category OAGROUP OrderedAbelianGroup>>
 <<category OAMON OrderedAbelianMonoid>>
 <<category OAMONS OrderedAbelianMonoidSup>>
 <<category OASGP OrderedAbelianSemiGroup>>
+<<category OC OctonionCategory>>
 <<category OCAMON OrderedCancellationAbelianMonoid>>
+<<category ODECAT OrdinaryDifferentialEquationsSolverCategory>>
 <<category OINTDOM OrderedIntegralDomain>>
 <<category OM OpenMath>>
 <<category OMSAGG OrderedMultisetAggregate>>
+<<category OPTCAT NumericalOptimizationCategory>>
 <<category ORDFIN OrderedFinite>>
 <<category ORDMON OrderedMonoid>>
 <<category ORDRING OrderedRing>>
 <<category ORDSET OrderedSet>>
+<<category PADICCT PAdicIntegerCategory>>
 <<category PATAB Patternable>>
 <<category PATMAB PatternMatchable>>
+<<category PDECAT PartialDifferentialEquationsSolverCategory>>
 <<category PDRING PartialDifferentialRing>>
 <<category PFECAT PolynomialFactorizationExplicit>>
 <<category PID PrincipalIdealDomain>>
@@ -54174,6 +60584,7 @@ Note that this code is not included in the generated catdef.spad file.
 <<category PRIMCAT PrimitiveFunctionCategory>>
 <<category PRQAGG PriorityQueueAggregate>>
 <<category PSCAT PowerSeriesCategory>>
+<<category PSETCAT PolynomialSetCategory>>
 <<category QFCAT QuotientFieldCategory>>
 <<category QUAGG QueueAggregate>>
 <<category RADCAT RadicalCategory>>
@@ -54184,6 +60595,7 @@ Note that this code is not included in the generated catdef.spad file.
 <<category RMODULE RightModule>>
 <<category RNG Rng>>
 <<category RNS RealNumberSystem>>
+<<category RPOLCAT RecursivePolynomialCategory>>
 <<category SEGCAT SegmentCategory>>
 <<category SEGXCAT SegmentExpansionCategory>>
 <<category SETAGG SetAggregate>>
@@ -54198,6 +60610,7 @@ Note that this code is not included in the generated catdef.spad file.
 <<category STEP StepThrough>>
 <<category TRANFUN TranscendentalFunctionCategory>>
 <<category TRIGCAT TrigonometricFunctionCategory>>
+<<category TSETCAT TriangularSetCategory>>
 <<category TYPE Type>>
 <<category TBAGG TableAggregate>>
 <<category UFD UniqueFactorizationDomain>>
@@ -54207,6 +60620,7 @@ Note that this code is not included in the generated catdef.spad file.
 <<category UPXSCAT UnivariatePuiseuxSeriesCategory>>
 <<category URAGG UnaryRecursiveAggregate>>
 <<category UTSCAT UnivariateTaylorSeriesCategory>>
+<<category VECTCAT VectorCategory>>
 <<category VSPACE VectorSpace>>
 <<category XALG XAlgebra>>
 <<category XF ExtensionField>>
@@ -54250,6 +60664,7 @@ digraph dotabb {
 <<DIAGG.dotabb>>
 <<DIFEXT.dotabb>>
 <<DIOPS.dotabb>>
+<<DIRPCAT.dotabb>>
 <<DIVRING.dotabb>>
 <<DLAGG.dotabb>>
 <<DPOLCAT.dotabb>>
@@ -54328,20 +60743,26 @@ digraph dotabb {
 <<NAALG.dotabb>>
 <<NARNG.dotabb>>
 <<NASRING.dotabb>>
+<<NUMINT.dotabb>>
 <<OAGROUP.dotabb>>
 <<OAMON.dotabb>>
 <<OAMONS.dotabb>>
 <<OASGP.dotabb>>
+<<OC.dotabb>>
 <<OCAMON.dotabb>>
+<<ODECAT.dotabb>>
 <<OINTDOM.dotabb>>
 <<OM.dotabb>>
 <<OMSAGG.dotabb>>
+<<OPTCAT.dotabb>>
 <<ORDFIN.dotabb>>
 <<ORDMON.dotabb>>
 <<ORDRING.dotabb>>
 <<ORDSET.dotabb>>
+<<PADICCT.dotabb>>
 <<PATAB.dotabb>>
 <<PATMAB.dotabb>>
+<<PDECAT.dotabb>>
 <<PDRING.dotabb>>
 <<PFECAT.dotabb>>
 <<PID.dotabb>>
@@ -54349,6 +60770,7 @@ digraph dotabb {
 <<PRIMCAT.dotabb>>
 <<PRQAGG.dotabb>>
 <<PSCAT.dotabb>>
+<<PSETCAT.dotabb>>
 <<QFCAT.dotabb>>
 <<QUAGG.dotabb>>
 <<RADCAT.dotabb>>
@@ -54359,6 +60781,7 @@ digraph dotabb {
 <<RMODULE.dotabb>>
 <<RNG.dotabb>>
 <<RNS.dotabb>>
+<<RPOLCAT.dotabb>>
 <<SEGCAT.dotabb>>
 <<SEGXCAT.dotabb>>
 <<SETAGG.dotabb>>
@@ -54373,6 +60796,7 @@ digraph dotabb {
 <<STEP.dotabb>>
 <<TRANFUN.dotabb>>
 <<TRIGCAT.dotabb>>
+<<TSETCAT.dotabb>>
 <<TYPE.dotabb>>
 <<TBAGG.dotabb>>
 <<UFD.dotabb>>
@@ -54382,6 +60806,7 @@ digraph dotabb {
 <<UPXSCAT.dotabb>>
 <<URAGG.dotabb>>
 <<UTSCAT.dotabb>>
+<<VECTCAT.dotabb>>
 <<VSPACE.dotabb>>
 <<XALG.dotabb>>
 <<XF.dotabb>>
@@ -54428,6 +60853,7 @@ digraph dotfull {
 <<DIAGG.dotfull>>
 <<DIFEXT.dotfull>>
 <<DIOPS.dotfull>>
+<<DIRPCAT.dotfull>>
 <<DIVRING.dotfull>>
 <<DLAGG.dotfull>>
 <<DPOLCAT.dotfull>>
@@ -54506,20 +60932,26 @@ digraph dotfull {
 <<NAALG.dotfull>>
 <<NARNG.dotfull>>
 <<NASRING.dotfull>>
+<<NUMINT.dotfull>>
 <<OAGROUP.dotfull>>
 <<OAMON.dotfull>>
 <<OAMONS.dotabb>>
 <<OASGP.dotfull>>
+<<OC.dotfull>>
 <<OCAMON.dotfull>>
+<<ODECAT.dotfull>>
 <<OINTDOM.dotfull>>
 <<OM.dotfull>>
 <<OMSAGG.dotfull>>
+<<OPTCAT.dotfull>>
 <<ORDFIN.dotfull>>
 <<ORDMON.dotfull>>
 <<ORDRING.dotfull>>
 <<ORDSET.dotfull>>
+<<PADICCT.dotfull>>
 <<PATAB.dotfull>>
 <<PATMAB.dotfull>>
+<<PDECAT.dotfull>>
 <<PDRING.dotfull>>
 <<PFECAT.dotfull>>
 <<PID.dotfull>>
@@ -54527,6 +60959,7 @@ digraph dotfull {
 <<PRIMCAT.dotfull>>
 <<PRQAGG.dotfull>>
 <<PSCAT.dotfull>>
+<<PSETCAT.dotfull>>
 <<QFCAT.dotfull>>
 <<QUAGG.dotfull>>
 <<RADCAT.dotfull>>
@@ -54537,6 +60970,7 @@ digraph dotfull {
 <<RMODULE.dotfull>>
 <<RNG.dotfull>>
 <<RNS.dotfull>>
+<<RPOLCAT.dotfull>>
 <<SEGCAT.dotfull>>
 <<SEGXCAT.dotfull>>
 <<SETAGG.dotfull>>
@@ -54551,6 +60985,7 @@ digraph dotfull {
 <<STEP.dotfull>>
 <<TRANFUN.dotfull>>
 <<TRIGCAT.dotfull>>
+<<TSETCAT.dotfull>>
 <<TYPE.dotfull>>
 <<TBAGG.dotfull>>
 <<UFD.dotfull>>
@@ -54560,6 +60995,7 @@ digraph dotfull {
 <<UPXSCAT.dotfull>>
 <<URAGG.dotfull>>
 <<UTSCAT.dotfull>>
+<<VECTCAT.dotfull>>
 <<VSPACE.dotfull>>
 <<XALG.dotfull>>
 <<XF.dotfull>>
diff --git a/books/ps/v102differentialpolynomialcategory.ps b/books/ps/v102differentialpolynomialcategory.ps
index e8c4465..481bc5b 100644
--- a/books/ps/v102differentialpolynomialcategory.ps
+++ b/books/ps/v102differentialpolynomialcategory.ps
@@ -3,7 +3,7 @@
 %%For: (root) root
 %%Title: pic
 %%Pages: (atend)
-%%BoundingBox: 36 36 1584 296
+%%BoundingBox: 36 36 1123 224
 %%EndComments
 save
 %%BeginProlog
@@ -180,10 +180,10 @@ def
 
 %%EndSetup
 %%Page: 1 1
-%%PageBoundingBox: 36 36 1584 296
+%%PageBoundingBox: 36 36 1123 224
 %%PageOrientation: Portrait
 gsave
-36 36 1548 260 boxprim clip newpath
+36 36 1087 188 boxprim clip newpath
 36 36 translate
 0 0 1 beginpage
 1.0000 set_scale
@@ -191,16 +191,16 @@ gsave
 0.167 0.600 1.000 graphcolor
 0.167 0.600 1.000 graphcolor
 newpath -6 -6 moveto
--6 258 lineto
-1546 258 lineto
-1546 -6 lineto
+-6 186 lineto
+1085 186 lineto
+1085 -6 lineto
 closepath
 fill
 0.167 0.600 1.000 graphcolor
 newpath -6 -6 moveto
--6 258 lineto
-1546 258 lineto
-1546 -6 lineto
+-6 186 lineto
+1085 186 lineto
+1085 -6 lineto
 closepath
 stroke
 0.000 0.000 0.000 graphcolor
@@ -210,29 +210,29 @@ gsave 10 dict begin
 filled
 0.537 0.247 0.902 nodecolor
 0.537 0.247 0.902 nodecolor
-newpath 1108 252 moveto
-424 252 lineto
-424 216 lineto
-1108 216 lineto
+newpath 684 180 moveto
+0 180 lineto
+0 144 lineto
+684 144 lineto
 closepath
 fill
 0.537 0.247 0.902 nodecolor
-newpath 1108 252 moveto
-424 252 lineto
-424 216 lineto
-1108 216 lineto
+newpath 684 180 moveto
+0 180 lineto
+0 144 lineto
+684 144 lineto
 closepath
 stroke
 gsave 10 dict begin
 0.000 0.000 0.000 nodecolor
-431 229 moveto
+7 157 moveto
 (DifferentialPolynomialCategory\(a:Ring,b:OrderedSet,c:DifferentialVariableCategory\(b\),d:OrderedAbelianMonoidSup\))
 [10.08 3.84 4.56 4.08 6.24 4.8 6.24 6.96 3.84 3.84 6.24 3.84 7.44 6.96 3.6 6.96 6.96 6.96 10.8 3.84 6.24 3.84 9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96 4.56 6.24 3.84 9.36 3.84 6.96 6.96 3.6 6.96 3.84 10.08 4.56 6.96 6.24 4.8 6.24 6.96 7.68 6 3.84 3.6 6.24 3.84 10.08 3.84 4.56 4.08 6.24 4.8 6.24 6.96 3.84 3.84 6.24 3.84 8.88 6.24 5.04 3.84 6.24 6.96 3.84 6.24 9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96 4.56 6.96 4.56 3.6 6.96 3.84 10.08 4.56 6.96 6.24 4.8 6.24 6.96 9.84 6.96 6.24 3.84 3.84 6.24 6.96 12.48 6.96 6.96 6.96 3.84 6.96 7.68 6.96 6.96 4.56]
 xshow
 end grestore
 end grestore
 % DifferentialExtension(a:Ring)
-[ /Rect [ 78 144 262 180 ]
+[ /Rect [ 57 72 241 108 ]
   /Border [ 0 0 0 ]
   /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=DIFEXT) >>
   /Subtype /Link
@@ -241,49 +241,49 @@ gsave 10 dict begin
 filled
 0.537 0.247 0.902 nodecolor
 0.537 0.247 0.902 nodecolor
-newpath 262 180 moveto
-78 180 lineto
-78 144 lineto
-262 144 lineto
+newpath 241 108 moveto
+57 108 lineto
+57 72 lineto
+241 72 lineto
 closepath
 fill
 0.537 0.247 0.902 nodecolor
-newpath 262 180 moveto
-78 180 lineto
-78 144 lineto
-262 144 lineto
+newpath 241 108 moveto
+57 108 lineto
+57 72 lineto
+241 72 lineto
 closepath
 stroke
 gsave 10 dict begin
 0.000 0.000 0.000 nodecolor
-86 157 moveto
+65 85 moveto
 (DifferentialExtension\(a:Ring\))
 [10.08 3.84 4.56 4.08 6.24 4.8 6.24 6.96 3.84 3.84 6.24 3.84 8.64 6.96 3.84 6.24 6.96 5.52 3.84 6.96 6.96 4.56 6.24 3.84 9.36 3.84 6.96 6.96 4.56]
 xshow
 end grestore
 end grestore
 % DifferentialPolynomialCategory(a:Ring,b:OrderedSet,c:DifferentialVariableCategory(b),d:OrderedAbelianMonoidSup)->DifferentialExtension(a:Ring)
-newpath 617 216 moveto
-509 203 367 186 272 174 curveto
+newpath 293 144 moveto
+267 134 234 122 206 112 curveto
 stroke
 gsave 10 dict begin
 solid
 1 setlinewidth
 0.000 0.000 0.000 edgecolor
-newpath 272 171 moveto
-262 173 lineto
-272 177 lineto
+newpath 208 109 moveto
+197 108 lineto
+205 115 lineto
 closepath
 fill
 0.000 0.000 0.000 edgecolor
-newpath 272 171 moveto
-262 173 lineto
-272 177 lineto
+newpath 208 109 moveto
+197 108 lineto
+205 115 lineto
 closepath
 stroke
 end grestore
 % PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)
-[ /Rect [ 553 144 979 180 ]
+[ /Rect [ 443 72 869 108 ]
   /Border [ 0 0 0 ]
   /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=POLYCAT) >>
   /Subtype /Link
@@ -292,49 +292,49 @@ gsave 10 dict begin
 filled
 0.537 0.247 0.902 nodecolor
 0.537 0.247 0.902 nodecolor
-newpath 979 180 moveto
-553 180 lineto
-553 144 lineto
-979 144 lineto
+newpath 869 108 moveto
+443 108 lineto
+443 72 lineto
+869 72 lineto
 closepath
 fill
 0.537 0.247 0.902 nodecolor
-newpath 979 180 moveto
-553 180 lineto
-553 144 lineto
-979 144 lineto
+newpath 869 108 moveto
+443 108 lineto
+443 72 lineto
+869 72 lineto
 closepath
 stroke
 gsave 10 dict begin
 0.000 0.000 0.000 nodecolor
-561 157 moveto
+451 85 moveto
 (PolynomialCategory\(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet\))
 [7.44 6.96 3.6 6.96 6.96 6.96 10.8 3.84 6.24 3.84 9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96 4.56 6.24 3.84 9.36 3.84 6.96 6.96 3.6 6.96 3.84 10.08 4.56 6.96 6.24 4.8 6.24 6.96 9.84 6.96 6.24 3.84 3.84 6.24 6.96 12.48 6.96 6.96 6.96 3.84 6.96 7.68 6.96 6.96 3.6 6.24 3.84 10.08 4.56 6.96 6.24 4.8 6.24 6.96 7.68 6 3.84 4.56]
 xshow
 end grestore
 end grestore
 % DifferentialPolynomialCategory(a:Ring,b:OrderedSet,c:DifferentialVariableCategory(b),d:OrderedAbelianMonoidSup)->PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)
-newpath 766 216 moveto
-766 208 766 199 766 190 curveto
+newpath 421 144 moveto
+466 134 522 121 568 110 curveto
 stroke
 gsave 10 dict begin
 solid
 1 setlinewidth
 0.000 0.000 0.000 edgecolor
-newpath 770 190 moveto
-766 180 lineto
-763 190 lineto
+newpath 569 113 moveto
+578 108 lineto
+568 107 lineto
 closepath
 fill
 0.000 0.000 0.000 edgecolor
-newpath 770 190 moveto
-766 180 lineto
-763 190 lineto
+newpath 569 113 moveto
+578 108 lineto
+568 107 lineto
 closepath
 stroke
 end grestore
 % RetractableTo(OrderedSet)
-[ /Rect [ 1216 144 1382 180 ]
+[ /Rect [ 259 72 425 108 ]
   /Border [ 0 0 0 ]
   /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=RETRACT) >>
   /Subtype /Link
@@ -343,44 +343,44 @@ gsave 10 dict begin
 filled
 0.404 0.667 0.545 nodecolor
 0.404 0.667 0.545 nodecolor
-newpath 1382 180 moveto
-1216 180 lineto
-1216 144 lineto
-1382 144 lineto
+newpath 425 108 moveto
+259 108 lineto
+259 72 lineto
+425 72 lineto
 closepath
 fill
 0.404 0.667 0.545 nodecolor
-newpath 1382 180 moveto
-1216 180 lineto
-1216 144 lineto
-1382 144 lineto
+newpath 425 108 moveto
+259 108 lineto
+259 72 lineto
+425 72 lineto
 closepath
 stroke
 gsave 10 dict begin
 0.000 0.000 0.000 nodecolor
-1223 157 moveto
+266 85 moveto
 (RetractableTo\(OrderedSet\))
 [9.12 6 3.84 4.8 6.24 6.24 4.08 6.24 6.96 3.84 6.24 7.44 6.96 4.56 10.08 4.56 6.96 6.24 4.8 6.24 6.96 7.68 6 3.84 4.56]
 xshow
 end grestore
 end grestore
 % DifferentialPolynomialCategory(a:Ring,b:OrderedSet,c:DifferentialVariableCategory(b),d:OrderedAbelianMonoidSup)->RetractableTo(OrderedSet)
-newpath 899 216 moveto
-994 203 1121 186 1206 174 curveto
+newpath 342 144 moveto
+342 136 342 127 342 118 curveto
 stroke
 gsave 10 dict begin
 solid
 1 setlinewidth
 0.000 0.000 0.000 edgecolor
-newpath 1206 177 moveto
-1216 173 lineto
-1206 171 lineto
+newpath 346 118 moveto
+342 108 lineto
+339 118 lineto
 closepath
 fill
 0.000 0.000 0.000 edgecolor
-newpath 1206 177 moveto
-1216 173 lineto
-1206 171 lineto
+newpath 346 118 moveto
+342 108 lineto
+339 118 lineto
 closepath
 stroke
 end grestore
@@ -389,44 +389,44 @@ gsave 10 dict begin
 filled
 0.537 0.247 0.902 nodecolor
 0.537 0.247 0.902 nodecolor
-newpath 60 108 moveto
-0 108 lineto
-0 72 lineto
-60 72 lineto
+newpath 180 36 moveto
+120 36 lineto
+120 0 lineto
+180 0 lineto
 closepath
 fill
 0.537 0.247 0.902 nodecolor
-newpath 60 108 moveto
-0 108 lineto
-0 72 lineto
-60 72 lineto
+newpath 180 36 moveto
+120 36 lineto
+120 0 lineto
+180 0 lineto
 closepath
 stroke
 gsave 10 dict begin
 0.000 0.000 0.000 nodecolor
-7 85 moveto
+127 13 moveto
 (RING...)
 [9.36 4.56 9.84 10.08 3.6 3.6 3.6]
 xshow
 end grestore
 end grestore
 % DifferentialExtension(a:Ring)->RING...
-newpath 135 144 moveto
-115 134 90 121 69 111 curveto
+newpath 149 72 moveto
+150 64 150 55 150 46 curveto
 stroke
 gsave 10 dict begin
 solid
 1 setlinewidth
 0.000 0.000 0.000 edgecolor
-newpath 70 108 moveto
-60 106 lineto
-67 114 lineto
+newpath 154 46 moveto
+150 36 lineto
+147 46 lineto
 closepath
 fill
 0.000 0.000 0.000 edgecolor
-newpath 70 108 moveto
-60 106 lineto
-67 114 lineto
+newpath 154 46 moveto
+150 36 lineto
+147 46 lineto
 closepath
 stroke
 end grestore
@@ -435,44 +435,44 @@ gsave 10 dict begin
 filled
 0.537 0.247 0.902 nodecolor
 0.537 0.247 0.902 nodecolor
-newpath 162 108 moveto
-78 108 lineto
-78 72 lineto
-162 72 lineto
+newpath 102 36 moveto
+18 36 lineto
+18 0 lineto
+102 0 lineto
 closepath
 fill
 0.537 0.247 0.902 nodecolor
-newpath 162 108 moveto
-78 108 lineto
-78 72 lineto
-162 72 lineto
+newpath 102 36 moveto
+18 36 lineto
+18 0 lineto
+102 0 lineto
 closepath
 stroke
 gsave 10 dict begin
 0.000 0.000 0.000 nodecolor
-85 85 moveto
+25 13 moveto
 (DIFRING...)
 [10.08 4.56 7.68 9.36 4.56 9.84 10.08 3.6 3.6 3.6]
 xshow
 end grestore
 end grestore
 % DifferentialExtension(a:Ring)->DIFRING...
-newpath 157 144 moveto
-152 136 145 126 139 116 curveto
+newpath 127 72 moveto
+116 63 102 52 90 42 curveto
 stroke
 gsave 10 dict begin
 solid
 1 setlinewidth
 0.000 0.000 0.000 edgecolor
-newpath 142 114 moveto
-133 108 lineto
-136 118 lineto
+newpath 92 39 moveto
+82 36 lineto
+88 45 lineto
 closepath
 fill
 0.000 0.000 0.000 edgecolor
-newpath 142 114 moveto
-133 108 lineto
-136 118 lineto
+newpath 92 39 moveto
+82 36 lineto
+88 45 lineto
 closepath
 stroke
 end grestore
@@ -481,248 +481,248 @@ gsave 10 dict begin
 filled
 0.537 0.247 0.902 nodecolor
 0.537 0.247 0.902 nodecolor
-newpath 260 108 moveto
-180 108 lineto
-180 72 lineto
-260 72 lineto
+newpath 279 36 moveto
+199 36 lineto
+199 0 lineto
+279 0 lineto
 closepath
 fill
 0.537 0.247 0.902 nodecolor
-newpath 260 108 moveto
-180 108 lineto
-180 72 lineto
-260 72 lineto
+newpath 279 36 moveto
+199 36 lineto
+199 0 lineto
+279 0 lineto
 closepath
 stroke
 gsave 10 dict begin
 0.000 0.000 0.000 nodecolor
-188 85 moveto
+207 13 moveto
 (PDRING...)
 [7.68 10.08 9.36 4.56 9.84 10.08 3.6 3.6 3.6]
 xshow
 end grestore
 end grestore
 % DifferentialExtension(a:Ring)->PDRING...
-newpath 183 144 moveto
-188 136 195 126 201 116 curveto
+newpath 172 72 moveto
+183 63 197 52 209 42 curveto
 stroke
 gsave 10 dict begin
 solid
 1 setlinewidth
 0.000 0.000 0.000 edgecolor
-newpath 204 118 moveto
-207 108 lineto
-198 114 lineto
+newpath 211 45 moveto
+217 36 lineto
+207 39 lineto
 closepath
 fill
 0.000 0.000 0.000 edgecolor
-newpath 204 118 moveto
-207 108 lineto
-198 114 lineto
+newpath 211 45 moveto
+217 36 lineto
+207 39 lineto
 closepath
 stroke
 end grestore
 % PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->PDRING...
-newpath 553 150 moveto
-467 142 368 130 270 107 curveto
+newpath 484 72 moveto
+425 64 357 53 289 36 curveto
 stroke
 gsave 10 dict begin
 solid
 1 setlinewidth
 0.000 0.000 0.000 edgecolor
-newpath 270 104 moveto
-260 105 lineto
-269 110 lineto
+newpath 290 33 moveto
+279 33 lineto
+288 39 lineto
 closepath
 fill
 0.000 0.000 0.000 edgecolor
-newpath 270 104 moveto
-260 105 lineto
-269 110 lineto
+newpath 290 33 moveto
+279 33 lineto
+288 39 lineto
 closepath
 stroke
 end grestore
-% FAMR...
+% RETRACT...
 gsave 10 dict begin
 filled
 0.537 0.247 0.902 nodecolor
 0.537 0.247 0.902 nodecolor
-newpath 344 108 moveto
-278 108 lineto
-278 72 lineto
-344 72 lineto
+newpath 387 36 moveto
+297 36 lineto
+297 0 lineto
+387 0 lineto
 closepath
 fill
 0.537 0.247 0.902 nodecolor
-newpath 344 108 moveto
-278 108 lineto
-278 72 lineto
-344 72 lineto
+newpath 387 36 moveto
+297 36 lineto
+297 0 lineto
+387 0 lineto
 closepath
 stroke
 gsave 10 dict begin
 0.000 0.000 0.000 nodecolor
-286 85 moveto
-(FAMR...)
-[6.72 10.08 12.48 9.36 3.6 3.6 3.6]
+305 13 moveto
+(RETRACT...)
+[9.36 8.64 8.64 9.36 9.36 9.36 7.44 3.6 3.6 3.6]
 xshow
 end grestore
 end grestore
-% PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->FAMR...
-newpath 553 145 moveto
-491 137 423 126 354 108 curveto
+% PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->RETRACT...
+newpath 557 72 moveto
+511 63 455 51 397 36 curveto
 stroke
 gsave 10 dict begin
 solid
 1 setlinewidth
 0.000 0.000 0.000 edgecolor
-newpath 355 105 moveto
-344 105 lineto
-353 111 lineto
+newpath 398 33 moveto
+387 33 lineto
+396 39 lineto
 closepath
 fill
 0.000 0.000 0.000 edgecolor
-newpath 355 105 moveto
-344 105 lineto
-353 111 lineto
+newpath 398 33 moveto
+387 33 lineto
+396 39 lineto
 closepath
 stroke
 end grestore
-% EVALAB...
+% FAMR...
 gsave 10 dict begin
 filled
 0.537 0.247 0.902 nodecolor
 0.537 0.247 0.902 nodecolor
-newpath 444 108 moveto
-362 108 lineto
-362 72 lineto
-444 72 lineto
+newpath 675 36 moveto
+609 36 lineto
+609 0 lineto
+675 0 lineto
 closepath
 fill
 0.537 0.247 0.902 nodecolor
-newpath 444 108 moveto
-362 108 lineto
-362 72 lineto
-444 72 lineto
+newpath 675 36 moveto
+609 36 lineto
+609 0 lineto
+675 0 lineto
 closepath
 stroke
 gsave 10 dict begin
 0.000 0.000 0.000 nodecolor
-369 85 moveto
-(EVALAB...)
-[8.64 8.4 10.08 8.64 10.08 9.36 3.6 3.6 3.6]
+617 13 moveto
+(FAMR...)
+[6.72 10.08 12.48 9.36 3.6 3.6 3.6]
 xshow
 end grestore
 end grestore
-% PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->EVALAB...
-newpath 631 144 moveto
-578 135 516 124 454 108 curveto
+% PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->FAMR...
+newpath 652 72 moveto
+651 64 649 55 647 46 curveto
 stroke
 gsave 10 dict begin
 solid
 1 setlinewidth
 0.000 0.000 0.000 edgecolor
-newpath 455 105 moveto
-444 105 lineto
-453 111 lineto
+newpath 650 45 moveto
+645 36 lineto
+644 46 lineto
 closepath
 fill
 0.000 0.000 0.000 edgecolor
-newpath 455 105 moveto
-444 105 lineto
-453 111 lineto
+newpath 650 45 moveto
+645 36 lineto
+644 46 lineto
 closepath
 stroke
 end grestore
-% IEVALAB...
+% EVALAB...
 gsave 10 dict begin
 filled
 0.537 0.247 0.902 nodecolor
 0.537 0.247 0.902 nodecolor
-newpath 550 108 moveto
-462 108 lineto
-462 72 lineto
-550 72 lineto
+newpath 775 36 moveto
+693 36 lineto
+693 0 lineto
+775 0 lineto
 closepath
 fill
 0.537 0.247 0.902 nodecolor
-newpath 550 108 moveto
-462 108 lineto
-462 72 lineto
-550 72 lineto
+newpath 775 36 moveto
+693 36 lineto
+693 0 lineto
+775 0 lineto
 closepath
 stroke
 gsave 10 dict begin
 0.000 0.000 0.000 nodecolor
-470 85 moveto
-(IEVALAB...)
-[4.56 8.64 8.4 10.08 8.64 10.08 9.36 3.6 3.6 3.6]
+700 13 moveto
+(EVALAB...)
+[8.64 8.4 10.08 8.64 10.08 9.36 3.6 3.6 3.6]
 xshow
 end grestore
 end grestore
-% PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->IEVALAB...
-newpath 692 144 moveto
-654 135 609 123 560 108 curveto
+% PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->EVALAB...
+newpath 676 72 moveto
+686 63 697 53 707 43 curveto
 stroke
 gsave 10 dict begin
 solid
 1 setlinewidth
 0.000 0.000 0.000 edgecolor
-newpath 561 105 moveto
-550 105 lineto
-559 111 lineto
+newpath 710 45 moveto
+715 36 lineto
+705 40 lineto
 closepath
 fill
 0.000 0.000 0.000 edgecolor
-newpath 561 105 moveto
-550 105 lineto
-559 111 lineto
+newpath 710 45 moveto
+715 36 lineto
+705 40 lineto
 closepath
 stroke
 end grestore
-% RETRACT...
+% IEVALAB...
 gsave 10 dict begin
 filled
 0.537 0.247 0.902 nodecolor
 0.537 0.247 0.902 nodecolor
-newpath 658 108 moveto
-568 108 lineto
-568 72 lineto
-658 72 lineto
+newpath 881 36 moveto
+793 36 lineto
+793 0 lineto
+881 0 lineto
 closepath
 fill
 0.537 0.247 0.902 nodecolor
-newpath 658 108 moveto
-568 108 lineto
-568 72 lineto
-658 72 lineto
+newpath 881 36 moveto
+793 36 lineto
+793 0 lineto
+881 0 lineto
 closepath
 stroke
 gsave 10 dict begin
 0.000 0.000 0.000 nodecolor
-576 85 moveto
-(RETRACT...)
-[9.36 8.64 8.64 9.36 9.36 9.36 7.44 3.6 3.6 3.6]
+801 13 moveto
+(IEVALAB...)
+[4.56 8.64 8.4 10.08 8.64 10.08 9.36 3.6 3.6 3.6]
 xshow
 end grestore
 end grestore
-% PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->RETRACT...
-newpath 727 144 moveto
-707 134 682 123 660 112 curveto
+% PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->IEVALAB...
+newpath 702 72 moveto
+727 62 757 50 784 40 curveto
 stroke
 gsave 10 dict begin
 solid
 1 setlinewidth
 0.000 0.000 0.000 edgecolor
-newpath 662 109 moveto
-651 108 lineto
-659 115 lineto
+newpath 785 43 moveto
+793 36 lineto
+782 37 lineto
 closepath
 fill
 0.000 0.000 0.000 edgecolor
-newpath 662 109 moveto
-651 108 lineto
-659 115 lineto
+newpath 785 43 moveto
+793 36 lineto
+782 37 lineto
 closepath
 stroke
 end grestore
@@ -731,44 +731,44 @@ gsave 10 dict begin
 filled
 0.537 0.247 0.902 nodecolor
 0.537 0.247 0.902 nodecolor
-newpath 758 108 moveto
-676 108 lineto
-676 72 lineto
-758 72 lineto
+newpath 981 36 moveto
+899 36 lineto
+899 0 lineto
+981 0 lineto
 closepath
 fill
 0.537 0.247 0.902 nodecolor
-newpath 758 108 moveto
-676 108 lineto
-676 72 lineto
-758 72 lineto
+newpath 981 36 moveto
+899 36 lineto
+899 0 lineto
+981 0 lineto
 closepath
 stroke
 gsave 10 dict begin
 0.000 0.000 0.000 nodecolor
-683 85 moveto
+906 13 moveto
 (FLINEXP...)
 [7.68 8.64 4.56 10.08 8.64 10.08 6.24 3.6 3.6 3.6]
 xshow
 end grestore
 end grestore
 % PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->FLINEXP...
-newpath 754 144 moveto
-748 136 741 126 735 116 curveto
+newpath 745 72 moveto
+787 63 836 51 889 36 curveto
 stroke
 gsave 10 dict begin
 solid
 1 setlinewidth
 0.000 0.000 0.000 edgecolor
-newpath 738 114 moveto
-729 108 lineto
-732 118 lineto
+newpath 890 39 moveto
+899 33 lineto
+888 33 lineto
 closepath
 fill
 0.000 0.000 0.000 edgecolor
-newpath 738 114 moveto
-729 108 lineto
-732 118 lineto
+newpath 890 39 moveto
+899 33 lineto
+888 33 lineto
 closepath
 stroke
 end grestore
@@ -777,44 +777,44 @@ gsave 10 dict begin
 filled
 0.537 0.247 0.902 nodecolor
 0.537 0.247 0.902 nodecolor
-newpath 856 108 moveto
-776 108 lineto
-776 72 lineto
-856 72 lineto
+newpath 1079 36 moveto
+999 36 lineto
+999 0 lineto
+1079 0 lineto
 closepath
 fill
 0.537 0.247 0.902 nodecolor
-newpath 856 108 moveto
-776 108 lineto
-776 72 lineto
-856 72 lineto
+newpath 1079 36 moveto
+999 36 lineto
+999 0 lineto
+1079 0 lineto
 closepath
 stroke
 gsave 10 dict begin
 0.000 0.000 0.000 nodecolor
-783 85 moveto
+1006 13 moveto
 (ORDSET...)
 [10.08 9.36 10.08 7.68 8.64 7.44 3.6 3.6 3.6]
 xshow
 end grestore
 end grestore
 % PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->ORDSET...
-newpath 779 144 moveto
-784 136 791 126 797 116 curveto
+newpath 806 72 moveto
+861 63 924 53 989 36 curveto
 stroke
 gsave 10 dict begin
 solid
 1 setlinewidth
 0.000 0.000 0.000 edgecolor
-newpath 800 118 moveto
-803 108 lineto
-794 114 lineto
+newpath 990 39 moveto
+999 33 lineto
+988 33 lineto
 closepath
 fill
 0.000 0.000 0.000 edgecolor
-newpath 800 118 moveto
-803 108 lineto
-794 114 lineto
+newpath 990 39 moveto
+999 33 lineto
+988 33 lineto
 closepath
 stroke
 end grestore
@@ -823,44 +823,44 @@ gsave 10 dict begin
 filled
 0.537 0.247 0.902 nodecolor
 0.537 0.247 0.902 nodecolor
-newpath 964 108 moveto
-874 108 lineto
-874 72 lineto
-964 72 lineto
+newpath 495 36 moveto
+405 36 lineto
+405 0 lineto
+495 0 lineto
 closepath
 fill
 0.537 0.247 0.902 nodecolor
-newpath 964 108 moveto
-874 108 lineto
-874 72 lineto
-964 72 lineto
+newpath 495 36 moveto
+405 36 lineto
+405 0 lineto
+495 0 lineto
 closepath
 stroke
 gsave 10 dict begin
 0.000 0.000 0.000 nodecolor
-882 85 moveto
+413 13 moveto
 (GCDDOM...)
 [10.08 9.36 10.08 10.08 10.08 12.48 3.6 3.6 3.6]
 xshow
 end grestore
 end grestore
 % PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->GCDDOM...
-newpath 805 144 moveto
-825 134 850 123 872 112 curveto
+newpath 604 72 moveto
+574 61 535 48 505 37 curveto
 stroke
 gsave 10 dict begin
 solid
 1 setlinewidth
 0.000 0.000 0.000 edgecolor
-newpath 873 115 moveto
-881 108 lineto
-870 109 lineto
+newpath 506 34 moveto
+495 34 lineto
+504 40 lineto
 closepath
 fill
 0.000 0.000 0.000 edgecolor
-newpath 873 115 moveto
-881 108 lineto
-870 109 lineto
+newpath 506 34 moveto
+495 34 lineto
+504 40 lineto
 closepath
 stroke
 end grestore
@@ -869,279 +869,64 @@ gsave 10 dict begin
 filled
 0.537 0.247 0.902 nodecolor
 0.537 0.247 0.902 nodecolor
-newpath 1060 108 moveto
-982 108 lineto
-982 72 lineto
-1060 72 lineto
+newpath 591 36 moveto
+513 36 lineto
+513 0 lineto
+591 0 lineto
 closepath
 fill
 0.537 0.247 0.902 nodecolor
-newpath 1060 108 moveto
-982 108 lineto
-982 72 lineto
-1060 72 lineto
+newpath 591 36 moveto
+513 36 lineto
+513 0 lineto
+591 0 lineto
 closepath
 stroke
 gsave 10 dict begin
 0.000 0.000 0.000 nodecolor
-990 85 moveto
+521 13 moveto
 (PFECAT...)
 [7.68 7.68 8.64 9.12 9.36 7.44 3.6 3.6 3.6]
 xshow
 end grestore
 end grestore
 % PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->PFECAT...
-newpath 842 144 moveto
-879 135 924 123 972 108 curveto
-stroke
-gsave 10 dict begin
-solid
-1 setlinewidth
-0.000 0.000 0.000 edgecolor
-newpath 973 111 moveto
-982 105 lineto
-971 105 lineto
-closepath
-fill
-0.000 0.000 0.000 edgecolor
-newpath 973 111 moveto
-982 105 lineto
-971 105 lineto
-closepath
-stroke
-end grestore
-% KONVERT...
-gsave 10 dict begin
-filled
-0.537 0.247 0.902 nodecolor
-0.537 0.247 0.902 nodecolor
-newpath 1170 108 moveto
-1078 108 lineto
-1078 72 lineto
-1170 72 lineto
-closepath
-fill
-0.537 0.247 0.902 nodecolor
-newpath 1170 108 moveto
-1078 108 lineto
-1078 72 lineto
-1170 72 lineto
-closepath
-stroke
-gsave 10 dict begin
-0.000 0.000 0.000 nodecolor
-1085 85 moveto
-(KONVERT...)
-[9.12 10.08 10.08 10.08 8.64 8.88 7.44 3.6 3.6 3.6]
-xshow
-end grestore
-end grestore
-% PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->KONVERT...
-newpath 889 144 moveto
-941 135 1004 124 1068 108 curveto
+newpath 630 72 moveto
+617 63 601 52 587 42 curveto
 stroke
 gsave 10 dict begin
 solid
 1 setlinewidth
 0.000 0.000 0.000 edgecolor
-newpath 1069 111 moveto
-1078 105 lineto
-1067 105 lineto
+newpath 588 39 moveto
+578 36 lineto
+584 44 lineto
 closepath
 fill
 0.000 0.000 0.000 edgecolor
-newpath 1069 111 moveto
-1078 105 lineto
-1067 105 lineto
-closepath
-stroke
-end grestore
-% PATMAB...
-gsave 10 dict begin
-filled
-0.537 0.247 0.902 nodecolor
-0.537 0.247 0.902 nodecolor
-newpath 1272 108 moveto
-1188 108 lineto
-1188 72 lineto
-1272 72 lineto
-closepath
-fill
-0.537 0.247 0.902 nodecolor
-newpath 1272 108 moveto
-1188 108 lineto
-1188 72 lineto
-1272 72 lineto
+newpath 588 39 moveto
+578 36 lineto
+584 44 lineto
 closepath
 stroke
-gsave 10 dict begin
-0.000 0.000 0.000 nodecolor
-1195 85 moveto
-(PATMAB...)
-[6.48 9.36 8.64 12.48 10.08 9.36 3.6 3.6 3.6]
-xshow
-end grestore
-end grestore
-% PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->PATMAB...
-newpath 969 144 moveto
-1033 136 1105 125 1178 108 curveto
-stroke
-gsave 10 dict begin
-solid
-1 setlinewidth
-0.000 0.000 0.000 edgecolor
-newpath 1179 111 moveto
-1188 106 lineto
-1178 105 lineto
-closepath
-fill
-0.000 0.000 0.000 edgecolor
-newpath 1179 111 moveto
-1188 106 lineto
-1178 105 lineto
-closepath
-stroke
-end grestore
-% COMRING...
-gsave 10 dict begin
-filled
-0.537 0.247 0.902 nodecolor
-0.537 0.247 0.902 nodecolor
-newpath 1382 108 moveto
-1290 108 lineto
-1290 72 lineto
-1382 72 lineto
-closepath
-fill
-0.537 0.247 0.902 nodecolor
-newpath 1382 108 moveto
-1290 108 lineto
-1290 72 lineto
-1382 72 lineto
-closepath
-stroke
-gsave 10 dict begin
-0.000 0.000 0.000 nodecolor
-1297 85 moveto
-(COMRING...)
-[9.12 10.08 12.48 9.36 4.56 9.84 10.08 3.6 3.6 3.6]
-xshow
-end grestore
-end grestore
-% PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->COMRING...
-newpath 979 150 moveto
-1069 142 1176 130 1280 108 curveto
-stroke
-gsave 10 dict begin
-solid
-1 setlinewidth
-0.000 0.000 0.000 edgecolor
-newpath 1281 111 moveto
-1290 106 lineto
-1280 105 lineto
-closepath
-fill
-0.000 0.000 0.000 edgecolor
-newpath 1281 111 moveto
-1290 106 lineto
-1280 105 lineto
-closepath
-stroke
-end grestore
-% RetractableTo(a:Type)
-[ /Rect [ 1400 72 1540 108 ]
-  /Border [ 0 0 0 ]
-  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=RETRACT) >>
-  /Subtype /Link
-/ANN pdfmark
-gsave 10 dict begin
-filled
-0.537 0.247 0.902 nodecolor
-0.537 0.247 0.902 nodecolor
-newpath 1540 108 moveto
-1400 108 lineto
-1400 72 lineto
-1540 72 lineto
-closepath
-fill
-0.537 0.247 0.902 nodecolor
-newpath 1540 108 moveto
-1400 108 lineto
-1400 72 lineto
-1540 72 lineto
-closepath
-stroke
-gsave 10 dict begin
-0.000 0.000 0.000 nodecolor
-1407 85 moveto
-(RetractableTo\(a:Type\))
-[9.12 6 3.84 4.8 6.24 6.24 4.08 6.24 6.96 3.84 6.24 7.44 6.96 4.56 6.24 3.84 7.2 6.96 6.96 6.24 4.56]
-xshow
-end grestore
-end grestore
-% RetractableTo(OrderedSet)->RetractableTo(a:Type)
-newpath 1342 144 moveto
-1365 134 1394 122 1419 112 curveto
-stroke
-gsave 10 dict begin
-solid
-1 setlinewidth
-0.000 0.000 0.000 edgecolor
-newpath 1420 115 moveto
-1428 108 lineto
-1417 109 lineto
-closepath
-fill
-0.000 0.000 0.000 edgecolor
-newpath 1420 115 moveto
-1428 108 lineto
-1417 109 lineto
-closepath
-stroke
-end grestore
-% Category
-gsave 10 dict begin
-filled
-0.000 0.000 1.000 nodecolor
-0.000 0.000 1.000 nodecolor
-newpath 1504 36 moveto
-1436 36 lineto
-1436 0 lineto
-1504 0 lineto
-closepath
-fill
-0.000 0.000 1.000 nodecolor
-newpath 1504 36 moveto
-1436 36 lineto
-1436 0 lineto
-1504 0 lineto
-closepath
-stroke
-gsave 10 dict begin
-0.000 0.000 0.000 nodecolor
-1444 13 moveto
-(Category)
-[9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96]
-xshow
-end grestore
 end grestore
-% RetractableTo(a:Type)->Category
-newpath 1470 72 moveto
-1470 64 1470 55 1470 46 curveto
+% RetractableTo(OrderedSet)->RETRACT...
+newpath 342 72 moveto
+342 64 342 55 342 46 curveto
 stroke
 gsave 10 dict begin
 solid
 1 setlinewidth
 0.000 0.000 0.000 edgecolor
-newpath 1474 46 moveto
-1470 36 lineto
-1467 46 lineto
+newpath 346 46 moveto
+342 36 lineto
+339 46 lineto
 closepath
 fill
 0.000 0.000 0.000 edgecolor
-newpath 1474 46 moveto
-1470 36 lineto
-1467 46 lineto
+newpath 346 46 moveto
+342 36 lineto
+339 46 lineto
 closepath
 stroke
 end grestore
diff --git a/books/ps/v102directproductcategory.ps b/books/ps/v102directproductcategory.ps
new file mode 100644
index 0000000..cb53b54
--- /dev/null
+++ b/books/ps/v102directproductcategory.ps
@@ -0,0 +1,657 @@
+%!PS-Adobe-2.0
+%%Creator: dot version 2.8 (Thu Sep 14 20:34:11 UTC 2006)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: 36 36 932 152
+%%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
+	dup 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 aligned label in bounding box aligned to current point
+/alignedtext {			% width adj text
+	/text exch def
+	/adj exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			text stringwidth pop adj mul 0 rmoveto
+		} if
+		[] 0 setdash
+		text show
+	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
+%%Page: 1 1
+%%PageBoundingBox: 36 36 932 152
+%%PageOrientation: Portrait
+gsave
+36 36 896 116 boxprim clip newpath
+36 36 translate
+0 0 1 beginpage
+1.0000 set_scale
+4 4 translate 0 rotate
+0.167 0.600 1.000 graphcolor
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 114 lineto
+894 114 lineto
+894 -6 lineto
+closepath
+fill
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 114 lineto
+894 114 lineto
+894 -6 lineto
+closepath
+stroke
+0.000 0.000 0.000 graphcolor
+14.00 /Times-Roman set_font
+% DirectProductCategory(a:NonNegativeInteger,b:Type)
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 601 108 moveto
+281 108 lineto
+281 72 lineto
+601 72 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 601 108 moveto
+281 108 lineto
+281 72 lineto
+601 72 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+288 85 moveto
+(DirectProductCategory\(a:NonNegativeInteger,b:Type\))
+[10.08 3.84 4.8 6.24 6.24 3.84 7.68 4.8 6.96 6.96 6.96 6.24 3.84 9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96 4.56 6.24 3.84 9.84 6.96 6.96 9.84 6.24 6.72 6.24 3.84 3.84 6.48 6.24 4.56 6.96 3.84 6.24 6.72 6.24 4.32 3.6 6.96 3.84 7.2 6.96 6.96 6.24 4.56]
+xshow
+end grestore
+end grestore
+% BMODULE...
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 98 36 moveto
+0 36 lineto
+0 0 lineto
+98 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 98 36 moveto
+0 36 lineto
+0 0 lineto
+98 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+8 13 moveto
+(BMODULE...)
+[9.36 12.48 10.08 10.08 10.08 8.64 8.64 3.6 3.6 3.6]
+xshow
+end grestore
+end grestore
+% DirectProductCategory(a:NonNegativeInteger,b:Type)->BMODULE...
+newpath 303 72 moveto
+246 63 177 52 108 36 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 108 33 moveto
+98 34 lineto
+107 39 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 108 33 moveto
+98 34 lineto
+107 39 lineto
+closepath
+stroke
+end grestore
+% KOERCE...
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 198 36 moveto
+116 36 lineto
+116 0 lineto
+198 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 198 36 moveto
+116 36 lineto
+116 0 lineto
+198 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+123 13 moveto
+(KOERCE...)
+[9.12 10.08 8.64 8.88 9.36 8.64 3.6 3.6 3.6]
+xshow
+end grestore
+end grestore
+% DirectProductCategory(a:NonNegativeInteger,b:Type)->KOERCE...
+newpath 352 72 moveto
+310 63 261 51 208 36 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 209 33 moveto
+198 33 lineto
+207 39 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 209 33 moveto
+198 33 lineto
+207 39 lineto
+closepath
+stroke
+end grestore
+% DIFEXT...
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 292 36 moveto
+216 36 lineto
+216 0 lineto
+292 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 292 36 moveto
+216 36 lineto
+216 0 lineto
+292 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+223 13 moveto
+(DIFEXT...)
+[10.08 4.56 7.68 8.64 10.08 7.44 3.6 3.6 3.6]
+xshow
+end grestore
+end grestore
+% DirectProductCategory(a:NonNegativeInteger,b:Type)->DIFEXT...
+newpath 394 72 moveto
+365 61 330 47 301 36 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 303 33 moveto
+292 33 lineto
+300 39 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 303 33 moveto
+292 33 lineto
+300 39 lineto
+closepath
+stroke
+end grestore
+% FINITE...
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 382 36 moveto
+310 36 lineto
+310 0 lineto
+382 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 382 36 moveto
+310 36 lineto
+310 0 lineto
+382 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+318 13 moveto
+(FINITE...)
+[7.68 4.56 10.08 4.56 8.64 8.64 3.6 3.6 3.6]
+xshow
+end grestore
+end grestore
+% DirectProductCategory(a:NonNegativeInteger,b:Type)->FINITE...
+newpath 417 72 moveto
+406 63 391 52 378 42 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 380 39 moveto
+370 36 lineto
+376 45 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 380 39 moveto
+370 36 lineto
+376 45 lineto
+closepath
+stroke
+end grestore
+% FLINEXP...
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 482 36 moveto
+400 36 lineto
+400 0 lineto
+482 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 482 36 moveto
+400 36 lineto
+400 0 lineto
+482 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+407 13 moveto
+(FLINEXP...)
+[7.68 8.64 4.56 10.08 8.64 10.08 6.24 3.6 3.6 3.6]
+xshow
+end grestore
+end grestore
+% DirectProductCategory(a:NonNegativeInteger,b:Type)->FLINEXP...
+newpath 441 72 moveto
+441 64 441 55 441 46 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 445 46 moveto
+441 36 lineto
+438 46 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 445 46 moveto
+441 36 lineto
+438 46 lineto
+closepath
+stroke
+end grestore
+% FRETRCT...
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 586 36 moveto
+500 36 lineto
+500 0 lineto
+586 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 586 36 moveto
+500 36 lineto
+500 0 lineto
+586 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+507 13 moveto
+(FRETRCT...)
+[7.68 9.36 8.64 8.64 8.88 9.36 7.44 3.6 3.6 3.6]
+xshow
+end grestore
+end grestore
+% DirectProductCategory(a:NonNegativeInteger,b:Type)->FRETRCT...
+newpath 467 72 moveto
+479 63 495 52 509 42 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 512 44 moveto
+518 36 lineto
+508 39 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 512 44 moveto
+518 36 lineto
+508 39 lineto
+closepath
+stroke
+end grestore
+% IXAGG...
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 676 36 moveto
+604 36 lineto
+604 0 lineto
+676 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 676 36 moveto
+604 36 lineto
+604 0 lineto
+676 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+611 13 moveto
+(IXAGG...)
+[4.56 10.08 9.36 10.08 10.08 3.6 3.6 3.6]
+xshow
+end grestore
+end grestore
+% DirectProductCategory(a:NonNegativeInteger,b:Type)->IXAGG...
+newpath 494 72 moveto
+522 63 556 50 594 36 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 595 39 moveto
+604 33 lineto
+593 33 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 595 39 moveto
+604 33 lineto
+593 33 lineto
+closepath
+stroke
+end grestore
+% OAMONS...
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 780 36 moveto
+694 36 lineto
+694 0 lineto
+780 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 780 36 moveto
+694 36 lineto
+694 0 lineto
+780 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+701 13 moveto
+(OAMONS...)
+[9.36 10.08 12.48 10.08 10.08 7.68 3.6 3.6 3.6]
+xshow
+end grestore
+end grestore
+% DirectProductCategory(a:NonNegativeInteger,b:Type)->OAMONS...
+newpath 534 72 moveto
+577 63 630 51 684 36 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 685 39 moveto
+694 33 lineto
+683 33 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 685 39 moveto
+694 33 lineto
+683 33 lineto
+closepath
+stroke
+end grestore
+% ORDRING...
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 888 36 moveto
+798 36 lineto
+798 0 lineto
+888 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 888 36 moveto
+798 36 lineto
+798 0 lineto
+888 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+805 13 moveto
+(ORDRING...)
+[10.08 9.36 10.08 9.36 4.56 9.84 10.08 3.6 3.6 3.6]
+xshow
+end grestore
+end grestore
+% DirectProductCategory(a:NonNegativeInteger,b:Type)->ORDRING...
+newpath 591 72 moveto
+649 63 718 52 788 36 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 789 39 moveto
+798 34 lineto
+788 33 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 789 39 moveto
+798 34 lineto
+788 33 lineto
+closepath
+stroke
+end grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+end
+restore
+%%EOF
diff --git a/books/ps/v102numericalintegrationcategory.ps b/books/ps/v102numericalintegrationcategory.ps
new file mode 100644
index 0000000..5e66404
--- /dev/null
+++ b/books/ps/v102numericalintegrationcategory.ps
@@ -0,0 +1,494 @@
+%!PS-Adobe-2.0
+%%Creator: dot version 2.8 (Thu Sep 14 20:34:11 UTC 2006)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: 36 36 290 368
+%%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
+	dup 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 aligned label in bounding box aligned to current point
+/alignedtext {			% width adj text
+	/text exch def
+	/adj exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			text stringwidth pop adj mul 0 rmoveto
+		} if
+		[] 0 setdash
+		text show
+	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
+%%Page: 1 1
+%%PageBoundingBox: 36 36 290 368
+%%PageOrientation: Portrait
+gsave
+36 36 254 332 boxprim clip newpath
+36 36 translate
+0 0 1 beginpage
+1.0000 set_scale
+4 4 translate 0 rotate
+0.167 0.600 1.000 graphcolor
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 330 lineto
+252 330 lineto
+252 -6 lineto
+closepath
+fill
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 330 lineto
+252 330 lineto
+252 -6 lineto
+closepath
+stroke
+0.000 0.000 0.000 graphcolor
+14.00 /Times-Roman set_font
+% NumericalIntegrationCategory()
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 204 324 moveto
+6 324 lineto
+6 288 lineto
+204 288 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 204 324 moveto
+6 324 lineto
+6 288 lineto
+204 288 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+13 301 moveto
+(NumericalIntegrationCategory\(\))
+[9.84 6.96 10.8 6.24 5.04 3.84 6.24 6.24 3.84 4.56 6.96 3.84 6.24 7.2 4.8 6.24 3.84 3.84 6.96 6.96 9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96 4.56 4.56]
+xshow
+end grestore
+end grestore
+% SetCategory()
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 152 252 moveto
+58 252 lineto
+58 216 lineto
+152 216 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 152 252 moveto
+58 252 lineto
+58 216 lineto
+152 216 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+65 229 moveto
+(SetCategory\(\))
+[7.68 6 3.84 9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96 4.56 4.56]
+xshow
+end grestore
+end grestore
+% NumericalIntegrationCategory()->SetCategory()
+newpath 105 288 moveto
+105 280 105 271 105 262 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 109 262 moveto
+105 252 lineto
+102 262 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 109 262 moveto
+105 252 lineto
+102 262 lineto
+closepath
+stroke
+end grestore
+% BasicType()
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 84 108 moveto
+0 108 lineto
+0 72 lineto
+84 72 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 84 108 moveto
+0 108 lineto
+0 72 lineto
+84 72 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+7 85 moveto
+(BasicType\(\))
+[9.36 6.24 5.52 3.84 6.24 7.2 6.96 6.96 6.24 4.56 4.56]
+xshow
+end grestore
+end grestore
+% SetCategory()->BasicType()
+newpath 93 216 moveto
+86 206 78 192 73 180 curveto
+64 160 55 136 50 118 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 53 117 moveto
+47 108 lineto
+47 119 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 53 117 moveto
+47 108 lineto
+47 119 lineto
+closepath
+stroke
+end grestore
+% CoercibleTo(OutputForm)
+gsave 10 dict begin
+filled
+0.404 0.667 0.545 nodecolor
+0.404 0.667 0.545 nodecolor
+newpath 246 180 moveto
+82 180 lineto
+82 144 lineto
+246 144 lineto
+closepath
+fill
+0.404 0.667 0.545 nodecolor
+newpath 246 180 moveto
+82 180 lineto
+82 144 lineto
+246 144 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+90 157 moveto
+(CoercibleTo\(OutputForm\))
+[9.36 6.96 6.24 4.8 6.24 3.84 6.96 3.84 6.24 7.44 6.96 4.56 10.08 6.96 3.84 6.96 6.96 3.84 7.44 6.96 5.04 10.8 4.56]
+xshow
+end grestore
+end grestore
+% SetCategory()->CoercibleTo(OutputForm)
+newpath 120 216 moveto
+127 207 135 197 143 188 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 146 190 moveto
+149 180 lineto
+140 186 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 146 190 moveto
+149 180 lineto
+140 186 lineto
+closepath
+stroke
+end grestore
+% Category
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 139 36 moveto
+71 36 lineto
+71 0 lineto
+139 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 139 36 moveto
+71 36 lineto
+71 0 lineto
+139 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+79 13 moveto
+(Category)
+[9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96]
+xshow
+end grestore
+end grestore
+% BasicType()->Category
+newpath 58 72 moveto
+66 63 75 53 82 44 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 85 46 moveto
+89 36 lineto
+80 41 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 85 46 moveto
+89 36 lineto
+80 41 lineto
+closepath
+stroke
+end grestore
+% CoercibleTo(a:Type)
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 234 108 moveto
+102 108 lineto
+102 72 lineto
+234 72 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 234 108 moveto
+102 108 lineto
+102 72 lineto
+234 72 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+110 85 moveto
+(CoercibleTo\(a:Type\))
+[9.36 6.96 6.24 4.8 6.24 3.84 6.96 3.84 6.24 7.44 6.96 4.56 6.24 3.84 7.2 6.96 6.96 6.24 4.56]
+xshow
+end grestore
+end grestore
+% CoercibleTo(OutputForm)->CoercibleTo(a:Type)
+newpath 165 144 moveto
+166 136 166 127 166 118 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 169 118 moveto
+167 108 lineto
+163 118 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 169 118 moveto
+167 108 lineto
+163 118 lineto
+closepath
+stroke
+end grestore
+% CoercibleTo(a:Type)->Category
+newpath 152 72 moveto
+144 63 135 53 128 44 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 130 41 moveto
+121 36 lineto
+125 46 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 130 41 moveto
+121 36 lineto
+125 46 lineto
+closepath
+stroke
+end grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+end
+restore
+%%EOF
diff --git a/books/ps/v102numericaloptimizationcategory.ps b/books/ps/v102numericaloptimizationcategory.ps
new file mode 100644
index 0000000..d458858
--- /dev/null
+++ b/books/ps/v102numericaloptimizationcategory.ps
@@ -0,0 +1,494 @@
+%!PS-Adobe-2.0
+%%Creator: dot version 2.8 (Thu Sep 14 20:34:11 UTC 2006)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: 36 36 290 368
+%%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
+	dup 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 aligned label in bounding box aligned to current point
+/alignedtext {			% width adj text
+	/text exch def
+	/adj exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			text stringwidth pop adj mul 0 rmoveto
+		} if
+		[] 0 setdash
+		text show
+	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
+%%Page: 1 1
+%%PageBoundingBox: 36 36 290 368
+%%PageOrientation: Portrait
+gsave
+36 36 254 332 boxprim clip newpath
+36 36 translate
+0 0 1 beginpage
+1.0000 set_scale
+4 4 translate 0 rotate
+0.167 0.600 1.000 graphcolor
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 330 lineto
+252 330 lineto
+252 -6 lineto
+closepath
+fill
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 330 lineto
+252 330 lineto
+252 -6 lineto
+closepath
+stroke
+0.000 0.000 0.000 graphcolor
+14.00 /Times-Roman set_font
+% NumericalOptimizationCategory()
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 210 324 moveto
+0 324 lineto
+0 288 lineto
+210 288 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 210 324 moveto
+0 324 lineto
+0 288 lineto
+210 288 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+7 301 moveto
+(NumericalOptimizationCategory\(\))
+[9.84 6.96 10.8 6.24 5.04 3.84 6.24 6.24 3.84 10.08 6.96 3.84 3.84 10.8 3.84 6.24 6.24 3.84 3.84 6.96 6.96 9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96 4.56 4.56]
+xshow
+end grestore
+end grestore
+% SetCategory()
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 152 252 moveto
+58 252 lineto
+58 216 lineto
+152 216 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 152 252 moveto
+58 252 lineto
+58 216 lineto
+152 216 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+65 229 moveto
+(SetCategory\(\))
+[7.68 6 3.84 9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96 4.56 4.56]
+xshow
+end grestore
+end grestore
+% NumericalOptimizationCategory()->SetCategory()
+newpath 105 288 moveto
+105 280 105 271 105 262 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 109 262 moveto
+105 252 lineto
+102 262 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 109 262 moveto
+105 252 lineto
+102 262 lineto
+closepath
+stroke
+end grestore
+% BasicType()
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 84 108 moveto
+0 108 lineto
+0 72 lineto
+84 72 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 84 108 moveto
+0 108 lineto
+0 72 lineto
+84 72 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+7 85 moveto
+(BasicType\(\))
+[9.36 6.24 5.52 3.84 6.24 7.2 6.96 6.96 6.24 4.56 4.56]
+xshow
+end grestore
+end grestore
+% SetCategory()->BasicType()
+newpath 93 216 moveto
+86 206 78 192 73 180 curveto
+64 160 55 136 50 118 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 53 117 moveto
+47 108 lineto
+47 119 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 53 117 moveto
+47 108 lineto
+47 119 lineto
+closepath
+stroke
+end grestore
+% CoercibleTo(OutputForm)
+gsave 10 dict begin
+filled
+0.404 0.667 0.545 nodecolor
+0.404 0.667 0.545 nodecolor
+newpath 246 180 moveto
+82 180 lineto
+82 144 lineto
+246 144 lineto
+closepath
+fill
+0.404 0.667 0.545 nodecolor
+newpath 246 180 moveto
+82 180 lineto
+82 144 lineto
+246 144 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+90 157 moveto
+(CoercibleTo\(OutputForm\))
+[9.36 6.96 6.24 4.8 6.24 3.84 6.96 3.84 6.24 7.44 6.96 4.56 10.08 6.96 3.84 6.96 6.96 3.84 7.44 6.96 5.04 10.8 4.56]
+xshow
+end grestore
+end grestore
+% SetCategory()->CoercibleTo(OutputForm)
+newpath 120 216 moveto
+127 207 135 197 143 188 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 146 190 moveto
+149 180 lineto
+140 186 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 146 190 moveto
+149 180 lineto
+140 186 lineto
+closepath
+stroke
+end grestore
+% Category
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 139 36 moveto
+71 36 lineto
+71 0 lineto
+139 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 139 36 moveto
+71 36 lineto
+71 0 lineto
+139 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+79 13 moveto
+(Category)
+[9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96]
+xshow
+end grestore
+end grestore
+% BasicType()->Category
+newpath 58 72 moveto
+66 63 75 53 82 44 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 85 46 moveto
+89 36 lineto
+80 41 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 85 46 moveto
+89 36 lineto
+80 41 lineto
+closepath
+stroke
+end grestore
+% CoercibleTo(a:Type)
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 234 108 moveto
+102 108 lineto
+102 72 lineto
+234 72 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 234 108 moveto
+102 108 lineto
+102 72 lineto
+234 72 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+110 85 moveto
+(CoercibleTo\(a:Type\))
+[9.36 6.96 6.24 4.8 6.24 3.84 6.96 3.84 6.24 7.44 6.96 4.56 6.24 3.84 7.2 6.96 6.96 6.24 4.56]
+xshow
+end grestore
+end grestore
+% CoercibleTo(OutputForm)->CoercibleTo(a:Type)
+newpath 165 144 moveto
+166 136 166 127 166 118 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 169 118 moveto
+167 108 lineto
+163 118 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 169 118 moveto
+167 108 lineto
+163 118 lineto
+closepath
+stroke
+end grestore
+% CoercibleTo(a:Type)->Category
+newpath 152 72 moveto
+144 63 135 53 128 44 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 130 41 moveto
+121 36 lineto
+125 46 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 130 41 moveto
+121 36 lineto
+125 46 lineto
+closepath
+stroke
+end grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+end
+restore
+%%EOF
diff --git a/books/ps/v102octonioncategory.ps b/books/ps/v102octonioncategory.ps
new file mode 100644
index 0000000..e20dff1
--- /dev/null
+++ b/books/ps/v102octonioncategory.ps
@@ -0,0 +1,381 @@
+%!PS-Adobe-2.0
+%%Creator: dot version 2.8 (Thu Sep 14 20:34:11 UTC 2006)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: 36 36 350 152
+%%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
+	dup 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 aligned label in bounding box aligned to current point
+/alignedtext {			% width adj text
+	/text exch def
+	/adj exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			text stringwidth pop adj mul 0 rmoveto
+		} if
+		[] 0 setdash
+		text show
+	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
+%%Page: 1 1
+%%PageBoundingBox: 36 36 350 152
+%%PageOrientation: Portrait
+gsave
+36 36 314 116 boxprim clip newpath
+36 36 translate
+0 0 1 beginpage
+1.0000 set_scale
+4 4 translate 0 rotate
+0.167 0.600 1.000 graphcolor
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 114 lineto
+312 114 lineto
+312 -6 lineto
+closepath
+fill
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 114 lineto
+312 114 lineto
+312 -6 lineto
+closepath
+stroke
+0.000 0.000 0.000 graphcolor
+14.00 /Times-Roman set_font
+% OctonionCategory(a:CommutativeRing)
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 278 108 moveto
+36 108 lineto
+36 72 lineto
+278 72 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 278 108 moveto
+36 108 lineto
+36 72 lineto
+278 72 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+44 85 moveto
+(OctonionCategory\(a:CommutativeRing\))
+[10.08 6.24 3.84 6.96 6.96 3.84 6.96 6.96 9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96 4.56 6.24 3.84 9.36 6.96 10.8 10.8 6.96 4.08 6.24 3.84 3.84 6.48 6.24 9.36 3.84 6.96 6.96 4.56]
+xshow
+end grestore
+end grestore
+% ALGEBRA...
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 94 36 moveto
+0 36 lineto
+0 0 lineto
+94 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 94 36 moveto
+0 36 lineto
+0 0 lineto
+94 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+8 13 moveto
+(ALGEBRA...)
+[10.08 8.64 10.08 8.64 9.36 9.36 9.84 3.6 3.6 3.6]
+xshow
+end grestore
+end grestore
+% OctonionCategory(a:CommutativeRing)->ALGEBRA...
+newpath 129 72 moveto
+115 63 98 52 83 42 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 84 39 moveto
+74 36 lineto
+80 44 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 84 39 moveto
+74 36 lineto
+80 44 lineto
+closepath
+stroke
+end grestore
+% FEVALAB...
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 202 36 moveto
+112 36 lineto
+112 0 lineto
+202 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 202 36 moveto
+112 36 lineto
+112 0 lineto
+202 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+120 13 moveto
+(FEVALAB...)
+[7.68 8.64 8.4 10.08 8.64 10.08 9.36 3.6 3.6 3.6]
+xshow
+end grestore
+end grestore
+% OctonionCategory(a:CommutativeRing)->FEVALAB...
+newpath 157 72 moveto
+157 64 157 55 157 46 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 161 46 moveto
+157 36 lineto
+154 46 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 161 46 moveto
+157 36 lineto
+154 46 lineto
+closepath
+stroke
+end grestore
+% FRETRCT...
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 306 36 moveto
+220 36 lineto
+220 0 lineto
+306 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 306 36 moveto
+220 36 lineto
+220 0 lineto
+306 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+227 13 moveto
+(FRETRCT...)
+[7.68 9.36 8.64 8.64 8.88 9.36 7.44 3.6 3.6 3.6]
+xshow
+end grestore
+end grestore
+% OctonionCategory(a:CommutativeRing)->FRETRCT...
+newpath 184 72 moveto
+197 63 214 52 228 42 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 231 44 moveto
+237 36 lineto
+227 39 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 231 44 moveto
+237 36 lineto
+227 39 lineto
+closepath
+stroke
+end grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+end
+restore
+%%EOF
diff --git a/books/ps/v102ordinarydifferentialequationssolvercategory.ps b/books/ps/v102ordinarydifferentialequationssolvercategory.ps
new file mode 100644
index 0000000..a01c789
--- /dev/null
+++ b/books/ps/v102ordinarydifferentialequationssolvercategory.ps
@@ -0,0 +1,499 @@
+%!PS-Adobe-2.0
+%%Creator: dot version 2.8 (Thu Sep 14 20:34:11 UTC 2006)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: 36 36 328 368
+%%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
+	dup 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 aligned label in bounding box aligned to current point
+/alignedtext {			% width adj text
+	/text exch def
+	/adj exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			text stringwidth pop adj mul 0 rmoveto
+		} if
+		[] 0 setdash
+		text show
+	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
+%%Page: 1 1
+%%PageBoundingBox: 36 36 328 368
+%%PageOrientation: Portrait
+gsave
+36 36 292 332 boxprim clip newpath
+36 36 translate
+0 0 1 beginpage
+1.0000 set_scale
+4 4 translate 0 rotate
+0.167 0.600 1.000 graphcolor
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 330 lineto
+290 330 lineto
+290 -6 lineto
+closepath
+fill
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 330 lineto
+290 330 lineto
+290 -6 lineto
+closepath
+stroke
+0.000 0.000 0.000 graphcolor
+14.00 /Times-Roman set_font
+% OrdinaryDifferentialEquationsSolverCategory()
+[ /Rect [ 0 288 284 324 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=ODECAT) >>
+  /Subtype /Link
+/ANN pdfmark
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 284 324 moveto
+0 324 lineto
+0 288 lineto
+284 288 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 284 324 moveto
+0 324 lineto
+0 288 lineto
+284 288 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+8 301 moveto
+(OrdinaryDifferentialEquationsSolverCategory\(\))
+[10.08 4.56 6.96 3.84 6.96 6.24 5.04 6.96 10.08 3.84 4.56 4.08 6.24 4.8 6.24 6.96 3.84 3.84 6.24 3.84 8.64 6.72 6.96 6.24 3.84 3.84 6.96 6.96 5.52 7.68 6.96 3.36 6.48 6.24 4.8 9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96 4.56 4.56]
+xshow
+end grestore
+end grestore
+% SetCategory()
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 189 252 moveto
+95 252 lineto
+95 216 lineto
+189 216 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 189 252 moveto
+95 252 lineto
+95 216 lineto
+189 216 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+102 229 moveto
+(SetCategory\(\))
+[7.68 6 3.84 9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96 4.56 4.56]
+xshow
+end grestore
+end grestore
+% OrdinaryDifferentialEquationsSolverCategory()->SetCategory()
+newpath 142 288 moveto
+142 280 142 271 142 262 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 146 262 moveto
+142 252 lineto
+139 262 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 146 262 moveto
+142 252 lineto
+139 262 lineto
+closepath
+stroke
+end grestore
+% BasicType()
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 121 108 moveto
+37 108 lineto
+37 72 lineto
+121 72 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 121 108 moveto
+37 108 lineto
+37 72 lineto
+121 72 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+44 85 moveto
+(BasicType\(\))
+[9.36 6.24 5.52 3.84 6.24 7.2 6.96 6.96 6.24 4.56 4.56]
+xshow
+end grestore
+end grestore
+% SetCategory()->BasicType()
+newpath 130 216 moveto
+123 206 115 192 110 180 curveto
+101 160 92 136 87 118 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 90 117 moveto
+84 108 lineto
+84 119 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 90 117 moveto
+84 108 lineto
+84 119 lineto
+closepath
+stroke
+end grestore
+% CoercibleTo(OutputForm)
+gsave 10 dict begin
+filled
+0.404 0.667 0.545 nodecolor
+0.404 0.667 0.545 nodecolor
+newpath 283 180 moveto
+119 180 lineto
+119 144 lineto
+283 144 lineto
+closepath
+fill
+0.404 0.667 0.545 nodecolor
+newpath 283 180 moveto
+119 180 lineto
+119 144 lineto
+283 144 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+127 157 moveto
+(CoercibleTo\(OutputForm\))
+[9.36 6.96 6.24 4.8 6.24 3.84 6.96 3.84 6.24 7.44 6.96 4.56 10.08 6.96 3.84 6.96 6.96 3.84 7.44 6.96 5.04 10.8 4.56]
+xshow
+end grestore
+end grestore
+% SetCategory()->CoercibleTo(OutputForm)
+newpath 157 216 moveto
+164 207 172 197 180 188 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 183 190 moveto
+186 180 lineto
+177 186 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 183 190 moveto
+186 180 lineto
+177 186 lineto
+closepath
+stroke
+end grestore
+% Category
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 176 36 moveto
+108 36 lineto
+108 0 lineto
+176 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 176 36 moveto
+108 36 lineto
+108 0 lineto
+176 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+116 13 moveto
+(Category)
+[9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96]
+xshow
+end grestore
+end grestore
+% BasicType()->Category
+newpath 95 72 moveto
+103 63 112 53 119 44 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 122 46 moveto
+126 36 lineto
+117 41 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 122 46 moveto
+126 36 lineto
+117 41 lineto
+closepath
+stroke
+end grestore
+% CoercibleTo(a:Type)
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 271 108 moveto
+139 108 lineto
+139 72 lineto
+271 72 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 271 108 moveto
+139 108 lineto
+139 72 lineto
+271 72 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+147 85 moveto
+(CoercibleTo\(a:Type\))
+[9.36 6.96 6.24 4.8 6.24 3.84 6.96 3.84 6.24 7.44 6.96 4.56 6.24 3.84 7.2 6.96 6.96 6.24 4.56]
+xshow
+end grestore
+end grestore
+% CoercibleTo(OutputForm)->CoercibleTo(a:Type)
+newpath 202 144 moveto
+203 136 203 127 203 118 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 206 118 moveto
+204 108 lineto
+200 118 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 206 118 moveto
+204 108 lineto
+200 118 lineto
+closepath
+stroke
+end grestore
+% CoercibleTo(a:Type)->Category
+newpath 189 72 moveto
+181 63 172 53 165 44 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 167 41 moveto
+158 36 lineto
+162 46 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 167 41 moveto
+158 36 lineto
+162 46 lineto
+closepath
+stroke
+end grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+end
+restore
+%%EOF
diff --git a/books/ps/v102padicintegercategory.ps b/books/ps/v102padicintegercategory.ps
new file mode 100644
index 0000000..15198dd
--- /dev/null
+++ b/books/ps/v102padicintegercategory.ps
@@ -0,0 +1,851 @@
+%!PS-Adobe-2.0
+%%Creator: dot version 2.8 (Thu Sep 14 20:34:11 UTC 2006)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: 36 36 556 584
+%%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
+	dup 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 aligned label in bounding box aligned to current point
+/alignedtext {			% width adj text
+	/text exch def
+	/adj exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			text stringwidth pop adj mul 0 rmoveto
+		} if
+		[] 0 setdash
+		text show
+	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
+%%Page: 1 1
+%%PageBoundingBox: 36 36 556 584
+%%PageOrientation: Portrait
+gsave
+36 36 520 548 boxprim clip newpath
+36 36 translate
+0 0 1 beginpage
+1.0000 set_scale
+4 4 translate 0 rotate
+0.167 0.600 1.000 graphcolor
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 546 lineto
+518 546 lineto
+518 -6 lineto
+closepath
+fill
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 546 lineto
+518 546 lineto
+518 -6 lineto
+closepath
+stroke
+0.000 0.000 0.000 graphcolor
+14.00 /Times-Roman set_font
+% PAdicIntegerCategory(a:Integer)
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 244 540 moveto
+44 540 lineto
+44 504 lineto
+244 504 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 244 540 moveto
+44 540 lineto
+44 504 lineto
+244 504 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+52 517 moveto
+(PAdicIntegerCategory\(a:Integer\))
+[6.48 9.6 6.96 3.84 6.24 4.56 6.96 3.84 6.24 6.72 6.24 4.8 9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96 4.56 6.24 3.84 4.56 6.96 3.84 6.24 6.72 6.24 4.8 4.56]
+xshow
+end grestore
+end grestore
+% CharacteristicZero()
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 130 396 moveto
+0 396 lineto
+0 360 lineto
+130 360 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 130 396 moveto
+0 396 lineto
+0 360 lineto
+130 360 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+8 373 moveto
+(CharacteristicZero\(\))
+[9.36 6.96 6.24 4.8 6.24 6.24 3.84 6.24 5.04 3.84 5.28 3.84 3.84 6.24 8.64 6.24 4.8 6.96 4.56 4.56]
+xshow
+end grestore
+end grestore
+% PAdicIntegerCategory(a:Integer)->CharacteristicZero()
+newpath 134 504 moveto
+120 479 96 434 80 405 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 83 403 moveto
+75 396 lineto
+77 406 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 83 403 moveto
+75 396 lineto
+77 406 lineto
+closepath
+stroke
+end grestore
+% EuclideanDomain()
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 269 468 moveto
+143 468 lineto
+143 432 lineto
+269 432 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 269 468 moveto
+143 468 lineto
+143 432 lineto
+269 432 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+150 445 moveto
+(EuclideanDomain\(\))
+[8.64 6.96 6.24 3.84 3.84 6.96 6.24 6.24 6.96 10.08 6.96 10.8 6.24 3.84 6.96 4.56 4.56]
+xshow
+end grestore
+end grestore
+% PAdicIntegerCategory(a:Integer)->EuclideanDomain()
+newpath 160 504 moveto
+167 495 176 485 184 476 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 187 478 moveto
+191 468 lineto
+182 473 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 187 478 moveto
+191 468 lineto
+182 473 lineto
+closepath
+stroke
+end grestore
+% RING...
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 235 108 moveto
+175 108 lineto
+175 72 lineto
+235 72 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 235 108 moveto
+175 108 lineto
+175 72 lineto
+235 72 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+182 85 moveto
+(RING...)
+[9.36 4.56 9.84 10.08 3.6 3.6 3.6]
+xshow
+end grestore
+end grestore
+% CharacteristicZero()->RING...
+newpath 59 360 moveto
+47 317 23 211 69 144 curveto
+91 113 133 100 165 94 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 166 97 moveto
+175 92 lineto
+165 91 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 166 97 moveto
+175 92 lineto
+165 91 lineto
+closepath
+stroke
+end grestore
+% PrincipalIdealDomain()
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 327 396 moveto
+177 396 lineto
+177 360 lineto
+327 360 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 327 396 moveto
+177 396 lineto
+177 360 lineto
+327 360 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+185 373 moveto
+(PrincipalIdealDomain\(\))
+[7.68 5.04 3.84 6.96 6.24 3.84 6.96 6.24 3.84 4.56 6.96 6.24 6.24 3.84 10.08 6.96 10.8 6.24 3.84 6.96 4.56 4.56]
+xshow
+end grestore
+end grestore
+% EuclideanDomain()->PrincipalIdealDomain()
+newpath 218 432 moveto
+223 424 230 414 236 404 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 239 406 moveto
+241 396 lineto
+233 403 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 239 406 moveto
+241 396 lineto
+233 403 lineto
+closepath
+stroke
+end grestore
+% GcdDomain()
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 303 324 moveto
+209 324 lineto
+209 288 lineto
+303 288 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 303 324 moveto
+209 324 lineto
+209 288 lineto
+303 288 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+217 301 moveto
+(GcdDomain\(\))
+[10.08 6.24 6.96 10.08 6.96 10.8 6.24 3.84 6.96 4.56 4.56]
+xshow
+end grestore
+end grestore
+% PrincipalIdealDomain()->GcdDomain()
+newpath 253 360 moveto
+254 352 254 343 254 334 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 257 334 moveto
+255 324 lineto
+251 334 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 257 334 moveto
+255 324 lineto
+251 334 lineto
+closepath
+stroke
+end grestore
+% IntegralDomain()
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 320 252 moveto
+206 252 lineto
+206 216 lineto
+320 216 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 320 252 moveto
+206 252 lineto
+206 216 lineto
+320 216 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+213 229 moveto
+(IntegralDomain\(\))
+[4.56 6.96 3.84 6.24 7.2 4.8 6.24 3.84 10.08 6.96 10.8 6.24 3.84 6.96 4.56 4.56]
+xshow
+end grestore
+end grestore
+% GcdDomain()->IntegralDomain()
+newpath 258 288 moveto
+259 280 259 271 260 262 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 263 262 moveto
+261 252 lineto
+257 262 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 263 262 moveto
+261 252 lineto
+257 262 lineto
+closepath
+stroke
+end grestore
+% CommutativeRing()
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 206 180 moveto
+78 180 lineto
+78 144 lineto
+206 144 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 206 180 moveto
+78 180 lineto
+78 144 lineto
+206 144 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+86 157 moveto
+(CommutativeRing\(\))
+[9.36 6.96 10.8 10.8 6.96 4.08 6.24 3.84 3.84 6.48 6.24 9.36 3.84 6.96 6.96 4.56 4.56]
+xshow
+end grestore
+end grestore
+% IntegralDomain()->CommutativeRing()
+newpath 232 216 moveto
+217 207 198 195 181 185 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 182 182 moveto
+172 180 lineto
+179 188 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 182 182 moveto
+172 180 lineto
+179 188 lineto
+closepath
+stroke
+end grestore
+% Algebra(a:CommutativeRing)
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 512 180 moveto
+328 180 lineto
+328 144 lineto
+512 144 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 512 180 moveto
+328 180 lineto
+328 144 lineto
+512 144 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+336 157 moveto
+(Algebra\(a:CommutativeRing\))
+[10.08 3.84 6.72 6.24 6.96 4.8 6.24 4.56 6.24 3.84 9.36 6.96 10.8 10.8 6.96 4.08 6.24 3.84 3.84 6.48 6.24 9.36 3.84 6.96 6.96 4.56]
+xshow
+end grestore
+end grestore
+% IntegralDomain()->Algebra(a:CommutativeRing)
+newpath 303 216 moveto
+324 206 350 194 372 184 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 373 187 moveto
+381 180 lineto
+370 181 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 373 187 moveto
+381 180 lineto
+370 181 lineto
+closepath
+stroke
+end grestore
+% EntireRing()
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 310 180 moveto
+224 180 lineto
+224 144 lineto
+310 144 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 310 180 moveto
+224 180 lineto
+224 144 lineto
+310 144 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+231 157 moveto
+(EntireRing\(\))
+[8.64 6.96 3.84 3.84 4.8 6.24 9.36 3.84 6.96 6.96 4.56 4.56]
+xshow
+end grestore
+end grestore
+% IntegralDomain()->EntireRing()
+newpath 264 216 moveto
+265 208 265 199 265 190 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 268 190 moveto
+266 180 lineto
+262 190 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 268 190 moveto
+266 180 lineto
+262 190 lineto
+closepath
+stroke
+end grestore
+% CommutativeRing()->RING...
+newpath 158 144 moveto
+166 135 175 125 182 116 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 185 118 moveto
+189 108 lineto
+180 113 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 185 118 moveto
+189 108 lineto
+180 113 lineto
+closepath
+stroke
+end grestore
+% BMODULE...
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 316 36 moveto
+218 36 lineto
+218 0 lineto
+316 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 316 36 moveto
+218 36 lineto
+218 0 lineto
+316 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+226 13 moveto
+(BMODULE...)
+[9.36 12.48 10.08 10.08 10.08 8.64 8.64 3.6 3.6 3.6]
+xshow
+end grestore
+end grestore
+% CommutativeRing()->BMODULE...
+newpath 143 144 moveto
+145 124 150 93 166 72 curveto
+177 58 193 47 209 39 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 211 42 moveto
+218 34 lineto
+208 36 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 211 42 moveto
+218 34 lineto
+208 36 lineto
+closepath
+stroke
+end grestore
+% Algebra(a:CommutativeRing)->RING...
+newpath 366 144 moveto
+328 131 279 115 245 103 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 246 100 moveto
+235 100 lineto
+244 106 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 246 100 moveto
+235 100 lineto
+244 106 lineto
+closepath
+stroke
+end grestore
+% Module(a:CommutativeRing)
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 494 108 moveto
+312 108 lineto
+312 72 lineto
+494 72 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 494 108 moveto
+312 108 lineto
+312 72 lineto
+494 72 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+319 85 moveto
+(Module\(a:CommutativeRing\))
+[12.48 6.96 6.96 6.96 3.84 6.24 4.56 6.24 3.84 9.36 6.96 10.8 10.8 6.96 4.08 6.24 3.84 3.84 6.48 6.24 9.36 3.84 6.96 6.96 4.56]
+xshow
+end grestore
+end grestore
+% Algebra(a:CommutativeRing)->Module(a:CommutativeRing)
+newpath 416 144 moveto
+414 136 412 127 410 118 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 413 117 moveto
+407 108 lineto
+407 119 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 413 117 moveto
+407 108 lineto
+407 119 lineto
+closepath
+stroke
+end grestore
+% EntireRing()->RING...
+newpath 251 144 moveto
+244 135 235 125 227 116 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 229 113 moveto
+220 108 lineto
+224 118 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 229 113 moveto
+220 108 lineto
+224 118 lineto
+closepath
+stroke
+end grestore
+% EntireRing()->BMODULE...
+newpath 267 144 moveto
+267 119 267 75 267 46 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 271 46 moveto
+267 36 lineto
+264 46 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 271 46 moveto
+267 36 lineto
+264 46 lineto
+closepath
+stroke
+end grestore
+% Module(a:CommutativeRing)->BMODULE...
+newpath 369 72 moveto
+351 63 328 51 310 41 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 311 38 moveto
+301 36 lineto
+308 44 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 311 38 moveto
+301 36 lineto
+308 44 lineto
+closepath
+stroke
+end grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+end
+restore
+%%EOF
diff --git a/books/ps/v102partialdifferentialequationssolvercategory.ps b/books/ps/v102partialdifferentialequationssolvercategory.ps
new file mode 100644
index 0000000..45b4edd
--- /dev/null
+++ b/books/ps/v102partialdifferentialequationssolvercategory.ps
@@ -0,0 +1,494 @@
+%!PS-Adobe-2.0
+%%Creator: dot version 2.8 (Thu Sep 14 20:34:11 UTC 2006)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: 36 36 320 368
+%%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
+	dup 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 aligned label in bounding box aligned to current point
+/alignedtext {			% width adj text
+	/text exch def
+	/adj exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			text stringwidth pop adj mul 0 rmoveto
+		} if
+		[] 0 setdash
+		text show
+	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
+%%Page: 1 1
+%%PageBoundingBox: 36 36 320 368
+%%PageOrientation: Portrait
+gsave
+36 36 284 332 boxprim clip newpath
+36 36 translate
+0 0 1 beginpage
+1.0000 set_scale
+4 4 translate 0 rotate
+0.167 0.600 1.000 graphcolor
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 330 lineto
+282 330 lineto
+282 -6 lineto
+closepath
+fill
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 330 lineto
+282 330 lineto
+282 -6 lineto
+closepath
+stroke
+0.000 0.000 0.000 graphcolor
+14.00 /Times-Roman set_font
+% PartialDifferentialEquationsSolverCategory()
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 270 324 moveto
+0 324 lineto
+0 288 lineto
+270 288 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 270 324 moveto
+0 324 lineto
+0 288 lineto
+270 288 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+7 301 moveto
+(PartialDifferentialEquationsSolverCategory\(\))
+[7.44 6.24 5.04 3.84 3.84 6.24 3.84 10.08 3.84 4.56 4.08 6.24 4.8 6.24 6.96 3.84 3.84 6.24 3.84 8.64 6.72 6.96 6.24 3.84 3.84 6.96 6.96 5.52 7.68 6.96 3.36 6.48 6.24 4.8 9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96 4.56 4.56]
+xshow
+end grestore
+end grestore
+% SetCategory()
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 182 252 moveto
+88 252 lineto
+88 216 lineto
+182 216 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 182 252 moveto
+88 252 lineto
+88 216 lineto
+182 216 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+95 229 moveto
+(SetCategory\(\))
+[7.68 6 3.84 9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96 4.56 4.56]
+xshow
+end grestore
+end grestore
+% PartialDifferentialEquationsSolverCategory()->SetCategory()
+newpath 135 288 moveto
+135 280 135 271 135 262 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 139 262 moveto
+135 252 lineto
+132 262 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 139 262 moveto
+135 252 lineto
+132 262 lineto
+closepath
+stroke
+end grestore
+% BasicType()
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 114 108 moveto
+30 108 lineto
+30 72 lineto
+114 72 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 114 108 moveto
+30 108 lineto
+30 72 lineto
+114 72 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+37 85 moveto
+(BasicType\(\))
+[9.36 6.24 5.52 3.84 6.24 7.2 6.96 6.96 6.24 4.56 4.56]
+xshow
+end grestore
+end grestore
+% SetCategory()->BasicType()
+newpath 123 216 moveto
+116 206 108 192 103 180 curveto
+94 160 85 136 80 118 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 83 117 moveto
+77 108 lineto
+77 119 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 83 117 moveto
+77 108 lineto
+77 119 lineto
+closepath
+stroke
+end grestore
+% CoercibleTo(OutputForm)
+gsave 10 dict begin
+filled
+0.404 0.667 0.545 nodecolor
+0.404 0.667 0.545 nodecolor
+newpath 276 180 moveto
+112 180 lineto
+112 144 lineto
+276 144 lineto
+closepath
+fill
+0.404 0.667 0.545 nodecolor
+newpath 276 180 moveto
+112 180 lineto
+112 144 lineto
+276 144 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+120 157 moveto
+(CoercibleTo\(OutputForm\))
+[9.36 6.96 6.24 4.8 6.24 3.84 6.96 3.84 6.24 7.44 6.96 4.56 10.08 6.96 3.84 6.96 6.96 3.84 7.44 6.96 5.04 10.8 4.56]
+xshow
+end grestore
+end grestore
+% SetCategory()->CoercibleTo(OutputForm)
+newpath 150 216 moveto
+157 207 165 197 173 188 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 176 190 moveto
+179 180 lineto
+170 186 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 176 190 moveto
+179 180 lineto
+170 186 lineto
+closepath
+stroke
+end grestore
+% Category
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 169 36 moveto
+101 36 lineto
+101 0 lineto
+169 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 169 36 moveto
+101 36 lineto
+101 0 lineto
+169 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+109 13 moveto
+(Category)
+[9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96]
+xshow
+end grestore
+end grestore
+% BasicType()->Category
+newpath 88 72 moveto
+96 63 105 53 112 44 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 115 46 moveto
+119 36 lineto
+110 41 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 115 46 moveto
+119 36 lineto
+110 41 lineto
+closepath
+stroke
+end grestore
+% CoercibleTo(a:Type)
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 264 108 moveto
+132 108 lineto
+132 72 lineto
+264 72 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 264 108 moveto
+132 108 lineto
+132 72 lineto
+264 72 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+140 85 moveto
+(CoercibleTo\(a:Type\))
+[9.36 6.96 6.24 4.8 6.24 3.84 6.96 3.84 6.24 7.44 6.96 4.56 6.24 3.84 7.2 6.96 6.96 6.24 4.56]
+xshow
+end grestore
+end grestore
+% CoercibleTo(OutputForm)->CoercibleTo(a:Type)
+newpath 195 144 moveto
+196 136 196 127 196 118 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 199 118 moveto
+197 108 lineto
+193 118 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 199 118 moveto
+197 108 lineto
+193 118 lineto
+closepath
+stroke
+end grestore
+% CoercibleTo(a:Type)->Category
+newpath 182 72 moveto
+174 63 165 53 158 44 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 160 41 moveto
+151 36 lineto
+155 46 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 160 41 moveto
+151 36 lineto
+155 46 lineto
+closepath
+stroke
+end grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+end
+restore
+%%EOF
diff --git a/books/ps/v102polynomialcategory.ps b/books/ps/v102polynomialcategory.ps
index 305de5f..fedbc22 100644
--- a/books/ps/v102polynomialcategory.ps
+++ b/books/ps/v102polynomialcategory.ps
@@ -3,7 +3,7 @@
 %%For: (root) root
 %%Title: pic
 %%Pages: (atend)
-%%BoundingBox: 36 36 1246 152
+%%BoundingBox: 36 36 924 152
 %%EndComments
 save
 %%BeginProlog
@@ -180,10 +180,10 @@ def
 
 %%EndSetup
 %%Page: 1 1
-%%PageBoundingBox: 36 36 1246 152
+%%PageBoundingBox: 36 36 924 152
 %%PageOrientation: Portrait
 gsave
-36 36 1210 116 boxprim clip newpath
+36 36 888 116 boxprim clip newpath
 36 36 translate
 0 0 1 beginpage
 1.0000 set_scale
@@ -192,21 +192,21 @@ gsave
 0.167 0.600 1.000 graphcolor
 newpath -6 -6 moveto
 -6 114 lineto
-1208 114 lineto
-1208 -6 lineto
+886 114 lineto
+886 -6 lineto
 closepath
 fill
 0.167 0.600 1.000 graphcolor
 newpath -6 -6 moveto
 -6 114 lineto
-1208 114 lineto
-1208 -6 lineto
+886 114 lineto
+886 -6 lineto
 closepath
 stroke
 0.000 0.000 0.000 graphcolor
 14.00 /Times-Roman set_font
 % PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)
-[ /Rect [ 373 72 799 108 ]
+[ /Rect [ 220 72 646 108 ]
   /Border [ 0 0 0 ]
   /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=POLYCAT) >>
   /Subtype /Link
@@ -215,22 +215,22 @@ gsave 10 dict begin
 filled
 0.537 0.247 0.902 nodecolor
 0.537 0.247 0.902 nodecolor
-newpath 799 108 moveto
-373 108 lineto
-373 72 lineto
-799 72 lineto
+newpath 646 108 moveto
+220 108 lineto
+220 72 lineto
+646 72 lineto
 closepath
 fill
 0.537 0.247 0.902 nodecolor
-newpath 799 108 moveto
-373 108 lineto
-373 72 lineto
-799 72 lineto
+newpath 646 108 moveto
+220 108 lineto
+220 72 lineto
+646 72 lineto
 closepath
 stroke
 gsave 10 dict begin
 0.000 0.000 0.000 nodecolor
-381 85 moveto
+228 85 moveto
 (PolynomialCategory\(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet\))
 [7.44 6.96 3.6 6.96 6.96 6.96 10.8 3.84 6.24 3.84 9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96 4.56 6.24 3.84 9.36 3.84 6.96 6.96 3.6 6.96 3.84 10.08 4.56 6.96 6.24 4.8 6.24 6.96 9.84 6.96 6.24 3.84 3.84 6.24 6.96 12.48 6.96 6.96 6.96 3.84 6.96 7.68 6.96 6.96 3.6 6.24 3.84 10.08 4.56 6.96 6.24 4.8 6.24 6.96 7.68 6 3.84 4.56]
 xshow
@@ -263,22 +263,22 @@ xshow
 end grestore
 end grestore
 % PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->PDRING...
-newpath 373 78 moveto
-287 70 188 58 90 35 curveto
+newpath 278 72 moveto
+222 63 156 53 90 36 curveto
 stroke
 gsave 10 dict begin
 solid
 1 setlinewidth
 0.000 0.000 0.000 edgecolor
-newpath 90 32 moveto
+newpath 91 33 moveto
 80 33 lineto
-89 38 lineto
+89 39 lineto
 closepath
 fill
 0.000 0.000 0.000 edgecolor
-newpath 90 32 moveto
+newpath 91 33 moveto
 80 33 lineto
-89 38 lineto
+89 39 lineto
 closepath
 stroke
 end grestore
@@ -309,8 +309,8 @@ xshow
 end grestore
 end grestore
 % PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->FAMR...
-newpath 373 73 moveto
-311 65 243 54 174 36 curveto
+newpath 323 72 moveto
+279 64 227 52 174 36 curveto
 stroke
 gsave 10 dict begin
 solid
@@ -355,8 +355,8 @@ xshow
 end grestore
 end grestore
 % PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->EVALAB...
-newpath 451 72 moveto
-399 63 337 52 274 36 curveto
+newpath 380 72 moveto
+350 63 314 50 273 36 curveto
 stroke
 gsave 10 dict begin
 solid
@@ -364,13 +364,13 @@ solid
 0.000 0.000 0.000 edgecolor
 newpath 275 33 moveto
 264 33 lineto
-273 39 lineto
+272 39 lineto
 closepath
 fill
 0.000 0.000 0.000 edgecolor
 newpath 275 33 moveto
 264 33 lineto
-273 39 lineto
+272 39 lineto
 closepath
 stroke
 end grestore
@@ -401,22 +401,22 @@ xshow
 end grestore
 end grestore
 % PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->IEVALAB...
-newpath 512 72 moveto
-475 63 429 51 380 36 curveto
+newpath 406 72 moveto
+392 63 376 52 362 42 curveto
 stroke
 gsave 10 dict begin
 solid
 1 setlinewidth
 0.000 0.000 0.000 edgecolor
-newpath 381 33 moveto
-370 33 lineto
-379 39 lineto
+newpath 363 39 moveto
+353 36 lineto
+359 44 lineto
 closepath
 fill
 0.000 0.000 0.000 edgecolor
-newpath 381 33 moveto
-370 33 lineto
-379 39 lineto
+newpath 363 39 moveto
+353 36 lineto
+359 44 lineto
 closepath
 stroke
 end grestore
@@ -447,22 +447,22 @@ xshow
 end grestore
 end grestore
 % PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->RETRACT...
-newpath 547 72 moveto
-527 62 502 51 480 40 curveto
+newpath 433 72 moveto
+433 64 433 55 433 46 curveto
 stroke
 gsave 10 dict begin
 solid
 1 setlinewidth
 0.000 0.000 0.000 edgecolor
-newpath 482 37 moveto
-471 36 lineto
-479 43 lineto
+newpath 437 46 moveto
+433 36 lineto
+430 46 lineto
 closepath
 fill
 0.000 0.000 0.000 edgecolor
-newpath 482 37 moveto
-471 36 lineto
-479 43 lineto
+newpath 437 46 moveto
+433 36 lineto
+430 46 lineto
 closepath
 stroke
 end grestore
@@ -493,22 +493,22 @@ xshow
 end grestore
 end grestore
 % PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->FLINEXP...
-newpath 574 72 moveto
-568 64 561 54 555 44 curveto
+newpath 459 72 moveto
+472 63 488 52 502 42 curveto
 stroke
 gsave 10 dict begin
 solid
 1 setlinewidth
 0.000 0.000 0.000 edgecolor
-newpath 558 42 moveto
-549 36 lineto
-552 46 lineto
+newpath 505 44 moveto
+511 36 lineto
+501 39 lineto
 closepath
 fill
 0.000 0.000 0.000 edgecolor
-newpath 558 42 moveto
-549 36 lineto
-552 46 lineto
+newpath 505 44 moveto
+511 36 lineto
+501 39 lineto
 closepath
 stroke
 end grestore
@@ -539,22 +539,22 @@ xshow
 end grestore
 end grestore
 % PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->ORDSET...
-newpath 599 72 moveto
-604 64 611 54 617 44 curveto
+newpath 484 72 moveto
+512 63 547 50 586 36 curveto
 stroke
 gsave 10 dict begin
 solid
 1 setlinewidth
 0.000 0.000 0.000 edgecolor
-newpath 620 46 moveto
-623 36 lineto
-614 42 lineto
+newpath 587 39 moveto
+596 33 lineto
+585 33 lineto
 closepath
 fill
 0.000 0.000 0.000 edgecolor
-newpath 620 46 moveto
-623 36 lineto
-614 42 lineto
+newpath 587 39 moveto
+596 33 lineto
+585 33 lineto
 closepath
 stroke
 end grestore
@@ -585,22 +585,22 @@ xshow
 end grestore
 end grestore
 % PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->GCDDOM...
-newpath 625 72 moveto
-645 62 670 51 692 40 curveto
+newpath 529 72 moveto
+573 63 628 51 684 36 curveto
 stroke
 gsave 10 dict begin
 solid
 1 setlinewidth
 0.000 0.000 0.000 edgecolor
-newpath 693 43 moveto
-701 36 lineto
-690 37 lineto
+newpath 685 39 moveto
+694 33 lineto
+683 33 lineto
 closepath
 fill
 0.000 0.000 0.000 edgecolor
-newpath 693 43 moveto
-701 36 lineto
-690 37 lineto
+newpath 685 39 moveto
+694 33 lineto
+683 33 lineto
 closepath
 stroke
 end grestore
@@ -631,8 +631,8 @@ xshow
 end grestore
 end grestore
 % PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->PFECAT...
-newpath 662 72 moveto
-699 63 744 51 792 36 curveto
+newpath 601 72 moveto
+659 64 725 53 792 36 curveto
 stroke
 gsave 10 dict begin
 solid
@@ -650,144 +650,6 @@ newpath 793 39 moveto
 closepath
 stroke
 end grestore
-% KONVERT...
-gsave 10 dict begin
-filled
-0.537 0.247 0.902 nodecolor
-0.537 0.247 0.902 nodecolor
-newpath 990 36 moveto
-898 36 lineto
-898 0 lineto
-990 0 lineto
-closepath
-fill
-0.537 0.247 0.902 nodecolor
-newpath 990 36 moveto
-898 36 lineto
-898 0 lineto
-990 0 lineto
-closepath
-stroke
-gsave 10 dict begin
-0.000 0.000 0.000 nodecolor
-905 13 moveto
-(KONVERT...)
-[9.12 10.08 10.08 10.08 8.64 8.88 7.44 3.6 3.6 3.6]
-xshow
-end grestore
-end grestore
-% PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->KONVERT...
-newpath 709 72 moveto
-761 63 824 52 888 36 curveto
-stroke
-gsave 10 dict begin
-solid
-1 setlinewidth
-0.000 0.000 0.000 edgecolor
-newpath 889 39 moveto
-898 33 lineto
-887 33 lineto
-closepath
-fill
-0.000 0.000 0.000 edgecolor
-newpath 889 39 moveto
-898 33 lineto
-887 33 lineto
-closepath
-stroke
-end grestore
-% PATMAB...
-gsave 10 dict begin
-filled
-0.537 0.247 0.902 nodecolor
-0.537 0.247 0.902 nodecolor
-newpath 1092 36 moveto
-1008 36 lineto
-1008 0 lineto
-1092 0 lineto
-closepath
-fill
-0.537 0.247 0.902 nodecolor
-newpath 1092 36 moveto
-1008 36 lineto
-1008 0 lineto
-1092 0 lineto
-closepath
-stroke
-gsave 10 dict begin
-0.000 0.000 0.000 nodecolor
-1015 13 moveto
-(PATMAB...)
-[6.48 9.36 8.64 12.48 10.08 9.36 3.6 3.6 3.6]
-xshow
-end grestore
-end grestore
-% PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->PATMAB...
-newpath 789 72 moveto
-853 64 925 53 998 36 curveto
-stroke
-gsave 10 dict begin
-solid
-1 setlinewidth
-0.000 0.000 0.000 edgecolor
-newpath 999 39 moveto
-1008 34 lineto
-998 33 lineto
-closepath
-fill
-0.000 0.000 0.000 edgecolor
-newpath 999 39 moveto
-1008 34 lineto
-998 33 lineto
-closepath
-stroke
-end grestore
-% COMRING...
-gsave 10 dict begin
-filled
-0.537 0.247 0.902 nodecolor
-0.537 0.247 0.902 nodecolor
-newpath 1202 36 moveto
-1110 36 lineto
-1110 0 lineto
-1202 0 lineto
-closepath
-fill
-0.537 0.247 0.902 nodecolor
-newpath 1202 36 moveto
-1110 36 lineto
-1110 0 lineto
-1202 0 lineto
-closepath
-stroke
-gsave 10 dict begin
-0.000 0.000 0.000 nodecolor
-1117 13 moveto
-(COMRING...)
-[9.12 10.08 12.48 9.36 4.56 9.84 10.08 3.6 3.6 3.6]
-xshow
-end grestore
-end grestore
-% PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->COMRING...
-newpath 799 78 moveto
-889 70 996 58 1100 36 curveto
-stroke
-gsave 10 dict begin
-solid
-1 setlinewidth
-0.000 0.000 0.000 edgecolor
-newpath 1101 39 moveto
-1110 34 lineto
-1100 33 lineto
-closepath
-fill
-0.000 0.000 0.000 edgecolor
-newpath 1101 39 moveto
-1110 34 lineto
-1100 33 lineto
-closepath
-stroke
-end grestore
 endpage
 showpage
 grestore
diff --git a/books/ps/v102polynomialsetcategory.ps b/books/ps/v102polynomialsetcategory.ps
new file mode 100644
index 0000000..c5c08a1
--- /dev/null
+++ b/books/ps/v102polynomialsetcategory.ps
@@ -0,0 +1,923 @@
+%!PS-Adobe-2.0
+%%Creator: dot version 2.8 (Thu Sep 14 20:34:11 UTC 2006)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: 36 36 1143 512
+%%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
+	dup 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 aligned label in bounding box aligned to current point
+/alignedtext {			% width adj text
+	/text exch def
+	/adj exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			text stringwidth pop adj mul 0 rmoveto
+		} if
+		[] 0 setdash
+		text show
+	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
+%%Page: 1 1
+%%PageBoundingBox: 36 36 1143 512
+%%PageOrientation: Portrait
+gsave
+36 36 1107 476 boxprim clip newpath
+36 36 translate
+0 0 1 beginpage
+1.0000 set_scale
+4 4 translate 0 rotate
+0.167 0.600 1.000 graphcolor
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 474 lineto
+1105 474 lineto
+1105 -6 lineto
+closepath
+fill
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 474 lineto
+1105 474 lineto
+1105 -6 lineto
+closepath
+stroke
+0.000 0.000 0.000 graphcolor
+14.00 /Times-Roman set_font
+% PolynomialSetCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 838 468 moveto
+174 468 lineto
+174 432 lineto
+838 432 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 838 468 moveto
+174 468 lineto
+174 432 lineto
+838 432 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+182 445 moveto
+(PolynomialSetCategory\(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory\(a,b,c\)\))
+[7.44 6.96 3.6 6.96 6.96 6.96 10.8 3.84 6.24 3.84 7.68 6 3.84 9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96 4.56 6.24 3.84 9.36 3.84 6.96 6.96 3.6 6.96 3.84 10.08 4.56 6.96 6.24 4.8 6.24 6.96 9.84 6.96 6.24 3.84 3.84 6.24 6.96 12.48 6.96 6.96 6.96 3.84 6.96 7.68 6.96 6.96 3.6 6.24 3.84 10.08 4.56 6.96 6.24 4.8 6.24 6.96 7.68 6 3.84 3.6 6.96 3.84 9.12 6.24 6.24 6.96 4.8 5.52 3.84 6.48 6.24 7.44 6.96 3.6 6.96 6.96 6.96 10.8 3.84 6.24 3.84 9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96 4.56 6.24 3.6 6.96 3.6 6.24 4.56 4.56]
+xshow
+end grestore
+end grestore
+% SetCategory()
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 167 396 moveto
+73 396 lineto
+73 360 lineto
+167 360 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 167 396 moveto
+73 396 lineto
+73 360 lineto
+167 360 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+80 373 moveto
+(SetCategory\(\))
+[7.68 6 3.84 9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96 4.56 4.56]
+xshow
+end grestore
+end grestore
+% PolynomialSetCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))->SetCategory()
+newpath 409 432 moveto
+336 419 238 400 177 389 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 177 386 moveto
+167 387 lineto
+176 392 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 177 386 moveto
+167 387 lineto
+176 392 lineto
+closepath
+stroke
+end grestore
+% Collection(RecursivePolynomialCategory(Ring,OrderedAbelianMonoidSup(),OrderedSet())
+gsave 10 dict begin
+filled
+0.404 0.667 0.545 nodecolor
+0.404 0.667 0.545 nodecolor
+newpath 1099 396 moveto
+569 396 lineto
+569 360 lineto
+1099 360 lineto
+closepath
+fill
+0.404 0.667 0.545 nodecolor
+newpath 1099 396 moveto
+569 396 lineto
+569 360 lineto
+1099 360 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+577 373 moveto
+(Collection\(RecursivePolynomialCategory\(Ring,OrderedAbelianMonoidSup\(\),OrderedSet\(\)\))
+[9.36 6.96 3.84 3.84 6.24 6.24 3.84 3.84 6.96 6.96 4.56 9.12 6.24 6.24 6.96 4.8 5.52 3.84 6.48 6.24 7.44 6.96 3.6 6.96 6.96 6.96 10.8 3.84 6.24 3.84 9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96 4.56 9.36 3.84 6.96 6.96 3.6 10.08 4.56 6.96 6.24 4.8 6.24 6.96 9.84 6.96 6.24 3.84 3.84 6.24 6.96 12.48 6.96 6.96 6.96 3.84 6.96 7.68 6.96 6.96 4.56 4.56 3.6 10.08 4.56 6.96 6.24 4.8 6.24 6.96 7.68 6 3.84 4.56 4.56 4.56]
+xshow
+end grestore
+end grestore
+% PolynomialSetCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))->Collection(RecursivePolynomialCategory(Ring,OrderedAbelianMonoidSup(),OrderedSet())
+newpath 588 432 moveto
+636 422 695 409 743 398 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 744 401 moveto
+753 396 lineto
+743 395 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 744 401 moveto
+753 396 lineto
+743 395 lineto
+closepath
+stroke
+end grestore
+% CoercibleTo(List(RecursivePolynomialCategory(Ring,OrderedAbelianMonoidSup(),OrderedSet()))
+gsave 10 dict begin
+filled
+0.404 0.667 0.545 nodecolor
+0.404 0.667 0.545 nodecolor
+newpath 792 324 moveto
+220 324 lineto
+220 288 lineto
+792 288 lineto
+closepath
+fill
+0.404 0.667 0.545 nodecolor
+newpath 792 324 moveto
+220 324 lineto
+220 288 lineto
+792 288 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+228 301 moveto
+(CoercibleTo\(List\(RecursivePolynomialCategory\(Ring,OrderedAbelianMonoidSup\(\),OrderedSet\(\)\)\))
+[9.36 6.96 6.24 4.8 6.24 3.84 6.96 3.84 6.24 7.44 6.96 4.56 8.64 3.84 5.28 3.84 4.56 9.12 6.24 6.24 6.96 4.8 5.52 3.84 6.48 6.24 7.44 6.96 3.6 6.96 6.96 6.96 10.8 3.84 6.24 3.84 9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96 4.56 9.36 3.84 6.96 6.96 3.6 10.08 4.56 6.96 6.24 4.8 6.24 6.96 9.84 6.96 6.24 3.84 3.84 6.24 6.96 12.48 6.96 6.96 6.96 3.84 6.96 7.68 6.96 6.96 4.56 4.56 3.6 10.08 4.56 6.96 6.24 4.8 6.24 6.96 7.68 6 3.84 4.56 4.56 4.56 4.56]
+xshow
+end grestore
+end grestore
+% PolynomialSetCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))->CoercibleTo(List(RecursivePolynomialCategory(Ring,OrderedAbelianMonoidSup(),OrderedSet()))
+newpath 506 432 moveto
+506 407 506 363 506 334 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 510 334 moveto
+506 324 lineto
+503 334 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 510 334 moveto
+506 324 lineto
+503 334 lineto
+closepath
+stroke
+end grestore
+% BasicType()
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 269 108 moveto
+185 108 lineto
+185 72 lineto
+269 72 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 269 108 moveto
+185 108 lineto
+185 72 lineto
+269 72 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+192 85 moveto
+(BasicType\(\))
+[9.36 6.24 5.52 3.84 6.24 7.2 6.96 6.96 6.24 4.56 4.56]
+xshow
+end grestore
+end grestore
+% SetCategory()->BasicType()
+newpath 73 361 moveto
+56 352 39 340 29 324 curveto
+22 310 23 302 29 288 curveto
+62 210 142 147 190 114 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 192 117 moveto
+198 108 lineto
+188 111 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 192 117 moveto
+198 108 lineto
+188 111 lineto
+closepath
+stroke
+end grestore
+% CoercibleTo(OutputForm)
+gsave 10 dict begin
+filled
+0.404 0.667 0.545 nodecolor
+0.404 0.667 0.545 nodecolor
+newpath 202 324 moveto
+38 324 lineto
+38 288 lineto
+202 288 lineto
+closepath
+fill
+0.404 0.667 0.545 nodecolor
+newpath 202 324 moveto
+38 324 lineto
+38 288 lineto
+202 288 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+46 301 moveto
+(CoercibleTo\(OutputForm\))
+[9.36 6.96 6.24 4.8 6.24 3.84 6.96 3.84 6.24 7.44 6.96 4.56 10.08 6.96 3.84 6.96 6.96 3.84 7.44 6.96 5.04 10.8 4.56]
+xshow
+end grestore
+end grestore
+% SetCategory()->CoercibleTo(OutputForm)
+newpath 120 360 moveto
+120 352 120 343 120 334 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 124 334 moveto
+120 324 lineto
+117 334 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 124 334 moveto
+120 324 lineto
+117 334 lineto
+closepath
+stroke
+end grestore
+% Collection(a:Type)
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 930 324 moveto
+810 324 lineto
+810 288 lineto
+930 288 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 930 324 moveto
+810 324 lineto
+810 288 lineto
+930 288 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+817 301 moveto
+(Collection\(a:Type\))
+[9.36 6.96 3.84 3.84 6.24 6.24 3.84 3.84 6.96 6.96 4.56 6.24 3.84 7.2 6.96 6.96 6.24 4.56]
+xshow
+end grestore
+end grestore
+% Collection(RecursivePolynomialCategory(Ring,OrderedAbelianMonoidSup(),OrderedSet())->Collection(a:Type)
+newpath 843 360 moveto
+847 352 852 342 857 333 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 860 335 moveto
+861 324 lineto
+854 332 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 860 335 moveto
+861 324 lineto
+854 332 lineto
+closepath
+stroke
+end grestore
+% CoercibleTo(a:Type)
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 550 252 moveto
+418 252 lineto
+418 216 lineto
+550 216 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 550 252 moveto
+418 252 lineto
+418 216 lineto
+550 216 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+426 229 moveto
+(CoercibleTo\(a:Type\))
+[9.36 6.96 6.24 4.8 6.24 3.84 6.96 3.84 6.24 7.44 6.96 4.56 6.24 3.84 7.2 6.96 6.96 6.24 4.56]
+xshow
+end grestore
+end grestore
+% CoercibleTo(List(RecursivePolynomialCategory(Ring,OrderedAbelianMonoidSup(),OrderedSet()))->CoercibleTo(a:Type)
+newpath 500 288 moveto
+498 280 495 270 492 262 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 495 261 moveto
+489 252 lineto
+489 263 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 495 261 moveto
+489 252 lineto
+489 263 lineto
+closepath
+stroke
+end grestore
+% Category
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 592 36 moveto
+524 36 lineto
+524 0 lineto
+592 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 592 36 moveto
+524 36 lineto
+524 0 lineto
+592 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+532 13 moveto
+(Category)
+[9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96]
+xshow
+end grestore
+end grestore
+% CoercibleTo(a:Type)->Category
+newpath 490 216 moveto
+503 178 533 91 549 46 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 552 47 moveto
+552 36 lineto
+546 45 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 552 47 moveto
+552 36 lineto
+546 45 lineto
+closepath
+stroke
+end grestore
+% HomogeneousAggregate(a:Type)
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 770 252 moveto
+568 252 lineto
+568 216 lineto
+770 216 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 770 252 moveto
+568 252 lineto
+568 216 lineto
+770 216 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+575 229 moveto
+(HomogeneousAggregate\(a:Type\))
+[10.08 6.96 10.8 6.96 6.72 6.24 6.96 6.24 6.96 6.96 5.52 9.84 6.96 7.2 4.8 6.24 6.72 6.24 3.84 6.24 4.56 6.24 3.84 7.2 6.96 6.96 6.24 4.56]
+xshow
+end grestore
+end grestore
+% Collection(a:Type)->HomogeneousAggregate(a:Type)
+newpath 820 288 moveto
+792 278 758 266 729 255 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 730 252 moveto
+719 252 lineto
+728 258 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 730 252 moveto
+719 252 lineto
+728 258 lineto
+closepath
+stroke
+end grestore
+% ConvertibleTo(InputForm)
+gsave 10 dict begin
+filled
+0.333 1.000 0.933 nodecolor
+0.333 1.000 0.933 nodecolor
+newpath 952 252 moveto
+788 252 lineto
+788 216 lineto
+952 216 lineto
+closepath
+fill
+0.333 1.000 0.933 nodecolor
+newpath 952 252 moveto
+788 252 lineto
+788 216 lineto
+952 216 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+795 229 moveto
+(ConvertibleTo\(InputForm\))
+[9.36 6.96 6.48 6.48 6.24 5.04 3.84 3.84 6.96 3.84 6.24 7.44 6.96 4.56 4.56 6.72 6.96 6.96 3.84 7.44 6.96 5.04 10.8 4.56]
+xshow
+end grestore
+end grestore
+% Collection(a:Type)->ConvertibleTo(InputForm)
+newpath 870 288 moveto
+870 280 870 271 870 262 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 874 262 moveto
+870 252 lineto
+867 262 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 874 262 moveto
+870 252 lineto
+867 262 lineto
+closepath
+stroke
+end grestore
+% Aggregate()
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 682 180 moveto
+598 180 lineto
+598 144 lineto
+682 144 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 682 180 moveto
+598 180 lineto
+598 144 lineto
+682 144 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+605 157 moveto
+(Aggregate\(\))
+[9.84 6.96 7.2 4.8 6.24 6.72 6.24 3.84 6.24 4.56 4.56]
+xshow
+end grestore
+end grestore
+% HomogeneousAggregate(a:Type)->Aggregate()
+newpath 662 216 moveto
+658 208 655 198 651 189 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 654 188 moveto
+647 180 lineto
+648 191 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 654 188 moveto
+647 180 lineto
+648 191 lineto
+closepath
+stroke
+end grestore
+% ConvertibleTo(a:Type)
+gsave 10 dict begin
+filled
+0.333 1.000 0.933 nodecolor
+0.333 1.000 0.933 nodecolor
+newpath 906 180 moveto
+764 180 lineto
+764 144 lineto
+906 144 lineto
+closepath
+fill
+0.333 1.000 0.933 nodecolor
+newpath 906 180 moveto
+764 180 lineto
+764 144 lineto
+906 144 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+771 157 moveto
+(ConvertibleTo\(a:Type\))
+[9.36 6.96 6.48 6.48 6.24 5.04 3.84 3.84 6.96 3.84 6.24 7.44 6.96 4.56 6.24 3.84 7.2 6.96 6.96 6.24 4.56]
+xshow
+end grestore
+end grestore
+% ConvertibleTo(InputForm)->ConvertibleTo(a:Type)
+newpath 861 216 moveto
+857 208 853 198 848 189 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 851 188 moveto
+844 180 lineto
+845 191 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 851 188 moveto
+844 180 lineto
+845 191 lineto
+closepath
+stroke
+end grestore
+% BasicType()->Category
+newpath 269 81 moveto
+332 67 450 41 514 27 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 515 30 moveto
+524 25 lineto
+514 24 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 515 30 moveto
+524 25 lineto
+514 24 lineto
+closepath
+stroke
+end grestore
+% CoercibleTo(OutputForm)->CoercibleTo(a:Type)
+newpath 202 290 moveto
+264 278 348 261 408 249 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 409 252 moveto
+418 247 lineto
+408 246 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 409 252 moveto
+418 247 lineto
+408 246 lineto
+closepath
+stroke
+end grestore
+% Type()
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 631 108 moveto
+577 108 lineto
+577 72 lineto
+631 72 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 631 108 moveto
+577 108 lineto
+577 72 lineto
+631 72 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+585 85 moveto
+(Type\(\))
+[7.2 6.96 6.96 6.24 4.56 4.56]
+xshow
+end grestore
+end grestore
+% Aggregate()->Type()
+newpath 631 144 moveto
+627 136 622 126 617 117 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 620 116 moveto
+613 108 lineto
+614 119 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 620 116 moveto
+613 108 lineto
+614 119 lineto
+closepath
+stroke
+end grestore
+% Type()->Category
+newpath 592 72 moveto
+587 64 580 54 574 44 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 577 43 moveto
+569 36 lineto
+571 46 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 577 43 moveto
+569 36 lineto
+571 46 lineto
+closepath
+stroke
+end grestore
+% ConvertibleTo(a:Type)->Category
+newpath 800 144 moveto
+750 118 656 69 601 41 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 602 38 moveto
+592 36 lineto
+599 44 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 602 38 moveto
+592 36 lineto
+599 44 lineto
+closepath
+stroke
+end grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+end
+restore
+%%EOF
diff --git a/books/ps/v102recursivepolynomialcategory.ps b/books/ps/v102recursivepolynomialcategory.ps
new file mode 100644
index 0000000..7985e82
--- /dev/null
+++ b/books/ps/v102recursivepolynomialcategory.ps
@@ -0,0 +1,841 @@
+%!PS-Adobe-2.0
+%%Creator: dot version 2.8 (Thu Sep 14 20:34:11 UTC 2006)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: 36 36 1246 224
+%%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
+	dup 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 aligned label in bounding box aligned to current point
+/alignedtext {			% width adj text
+	/text exch def
+	/adj exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			text stringwidth pop adj mul 0 rmoveto
+		} if
+		[] 0 setdash
+		text show
+	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
+%%Page: 1 1
+%%PageBoundingBox: 36 36 1246 224
+%%PageOrientation: Portrait
+gsave
+36 36 1210 188 boxprim clip newpath
+36 36 translate
+0 0 1 beginpage
+1.0000 set_scale
+4 4 translate 0 rotate
+0.167 0.600 1.000 graphcolor
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 186 lineto
+1208 186 lineto
+1208 -6 lineto
+closepath
+fill
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 186 lineto
+1208 186 lineto
+1208 -6 lineto
+closepath
+stroke
+0.000 0.000 0.000 graphcolor
+14.00 /Times-Roman set_font
+% RecursivePolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 826 180 moveto
+346 180 lineto
+346 144 lineto
+826 144 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 826 180 moveto
+346 180 lineto
+346 144 lineto
+826 144 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+353 157 moveto
+(RecursivePolynomialCategory\(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet\))
+[9.12 6.24 6.24 6.96 4.8 5.52 3.84 6.48 6.24 7.44 6.96 3.6 6.96 6.96 6.96 10.8 3.84 6.24 3.84 9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96 4.56 6.24 3.84 9.36 3.84 6.96 6.96 3.6 6.96 3.84 10.08 4.56 6.96 6.24 4.8 6.24 6.96 9.84 6.96 6.24 3.84 3.84 6.24 6.96 12.48 6.96 6.96 6.96 3.84 6.96 7.68 6.96 6.96 3.6 6.24 3.84 10.08 4.56 6.96 6.24 4.8 6.24 6.96 7.68 6 3.84 4.56]
+xshow
+end grestore
+end grestore
+% PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 799 108 moveto
+373 108 lineto
+373 72 lineto
+799 72 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 799 108 moveto
+373 108 lineto
+373 72 lineto
+799 72 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+381 85 moveto
+(PolynomialCategory\(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet\))
+[7.44 6.96 3.6 6.96 6.96 6.96 10.8 3.84 6.24 3.84 9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96 4.56 6.24 3.84 9.36 3.84 6.96 6.96 3.6 6.96 3.84 10.08 4.56 6.96 6.24 4.8 6.24 6.96 9.84 6.96 6.24 3.84 3.84 6.24 6.96 12.48 6.96 6.96 6.96 3.84 6.96 7.68 6.96 6.96 3.6 6.24 3.84 10.08 4.56 6.96 6.24 4.8 6.24 6.96 7.68 6 3.84 4.56]
+xshow
+end grestore
+end grestore
+% RecursivePolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)
+newpath 586 144 moveto
+586 136 586 127 586 118 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 590 118 moveto
+586 108 lineto
+583 118 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 590 118 moveto
+586 108 lineto
+583 118 lineto
+closepath
+stroke
+end grestore
+% PDRING...
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 80 36 moveto
+0 36 lineto
+0 0 lineto
+80 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 80 36 moveto
+0 36 lineto
+0 0 lineto
+80 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+8 13 moveto
+(PDRING...)
+[7.68 10.08 9.36 4.56 9.84 10.08 3.6 3.6 3.6]
+xshow
+end grestore
+end grestore
+% PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->PDRING...
+newpath 373 78 moveto
+287 70 188 58 90 35 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 90 32 moveto
+80 33 lineto
+89 38 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 90 32 moveto
+80 33 lineto
+89 38 lineto
+closepath
+stroke
+end grestore
+% FAMR...
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 164 36 moveto
+98 36 lineto
+98 0 lineto
+164 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 164 36 moveto
+98 36 lineto
+98 0 lineto
+164 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+106 13 moveto
+(FAMR...)
+[6.72 10.08 12.48 9.36 3.6 3.6 3.6]
+xshow
+end grestore
+end grestore
+% PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->FAMR...
+newpath 373 73 moveto
+311 65 243 54 174 36 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 175 33 moveto
+164 33 lineto
+173 39 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 175 33 moveto
+164 33 lineto
+173 39 lineto
+closepath
+stroke
+end grestore
+% EVALAB...
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 264 36 moveto
+182 36 lineto
+182 0 lineto
+264 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 264 36 moveto
+182 36 lineto
+182 0 lineto
+264 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+189 13 moveto
+(EVALAB...)
+[8.64 8.4 10.08 8.64 10.08 9.36 3.6 3.6 3.6]
+xshow
+end grestore
+end grestore
+% PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->EVALAB...
+newpath 451 72 moveto
+399 63 337 52 274 36 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 275 33 moveto
+264 33 lineto
+273 39 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 275 33 moveto
+264 33 lineto
+273 39 lineto
+closepath
+stroke
+end grestore
+% IEVALAB...
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 370 36 moveto
+282 36 lineto
+282 0 lineto
+370 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 370 36 moveto
+282 36 lineto
+282 0 lineto
+370 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+290 13 moveto
+(IEVALAB...)
+[4.56 8.64 8.4 10.08 8.64 10.08 9.36 3.6 3.6 3.6]
+xshow
+end grestore
+end grestore
+% PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->IEVALAB...
+newpath 512 72 moveto
+475 63 429 51 380 36 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 381 33 moveto
+370 33 lineto
+379 39 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 381 33 moveto
+370 33 lineto
+379 39 lineto
+closepath
+stroke
+end grestore
+% RETRACT...
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 478 36 moveto
+388 36 lineto
+388 0 lineto
+478 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 478 36 moveto
+388 36 lineto
+388 0 lineto
+478 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+396 13 moveto
+(RETRACT...)
+[9.36 8.64 8.64 9.36 9.36 9.36 7.44 3.6 3.6 3.6]
+xshow
+end grestore
+end grestore
+% PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->RETRACT...
+newpath 547 72 moveto
+527 62 502 51 480 40 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 482 37 moveto
+471 36 lineto
+479 43 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 482 37 moveto
+471 36 lineto
+479 43 lineto
+closepath
+stroke
+end grestore
+% FLINEXP...
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 578 36 moveto
+496 36 lineto
+496 0 lineto
+578 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 578 36 moveto
+496 36 lineto
+496 0 lineto
+578 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+503 13 moveto
+(FLINEXP...)
+[7.68 8.64 4.56 10.08 8.64 10.08 6.24 3.6 3.6 3.6]
+xshow
+end grestore
+end grestore
+% PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->FLINEXP...
+newpath 574 72 moveto
+568 64 561 54 555 44 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 558 42 moveto
+549 36 lineto
+552 46 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 558 42 moveto
+549 36 lineto
+552 46 lineto
+closepath
+stroke
+end grestore
+% ORDSET...
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 676 36 moveto
+596 36 lineto
+596 0 lineto
+676 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 676 36 moveto
+596 36 lineto
+596 0 lineto
+676 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+603 13 moveto
+(ORDSET...)
+[10.08 9.36 10.08 7.68 8.64 7.44 3.6 3.6 3.6]
+xshow
+end grestore
+end grestore
+% PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->ORDSET...
+newpath 599 72 moveto
+604 64 611 54 617 44 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 620 46 moveto
+623 36 lineto
+614 42 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 620 46 moveto
+623 36 lineto
+614 42 lineto
+closepath
+stroke
+end grestore
+% GCDDOM...
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 784 36 moveto
+694 36 lineto
+694 0 lineto
+784 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 784 36 moveto
+694 36 lineto
+694 0 lineto
+784 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+702 13 moveto
+(GCDDOM...)
+[10.08 9.36 10.08 10.08 10.08 12.48 3.6 3.6 3.6]
+xshow
+end grestore
+end grestore
+% PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->GCDDOM...
+newpath 625 72 moveto
+645 62 670 51 692 40 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 693 43 moveto
+701 36 lineto
+690 37 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 693 43 moveto
+701 36 lineto
+690 37 lineto
+closepath
+stroke
+end grestore
+% PFECAT...
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 880 36 moveto
+802 36 lineto
+802 0 lineto
+880 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 880 36 moveto
+802 36 lineto
+802 0 lineto
+880 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+810 13 moveto
+(PFECAT...)
+[7.68 7.68 8.64 9.12 9.36 7.44 3.6 3.6 3.6]
+xshow
+end grestore
+end grestore
+% PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->PFECAT...
+newpath 662 72 moveto
+699 63 744 51 792 36 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 793 39 moveto
+802 33 lineto
+791 33 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 793 39 moveto
+802 33 lineto
+791 33 lineto
+closepath
+stroke
+end grestore
+% KONVERT...
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 990 36 moveto
+898 36 lineto
+898 0 lineto
+990 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 990 36 moveto
+898 36 lineto
+898 0 lineto
+990 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+905 13 moveto
+(KONVERT...)
+[9.12 10.08 10.08 10.08 8.64 8.88 7.44 3.6 3.6 3.6]
+xshow
+end grestore
+end grestore
+% PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->KONVERT...
+newpath 709 72 moveto
+761 63 824 52 888 36 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 889 39 moveto
+898 33 lineto
+887 33 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 889 39 moveto
+898 33 lineto
+887 33 lineto
+closepath
+stroke
+end grestore
+% PATMAB...
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 1092 36 moveto
+1008 36 lineto
+1008 0 lineto
+1092 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 1092 36 moveto
+1008 36 lineto
+1008 0 lineto
+1092 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+1015 13 moveto
+(PATMAB...)
+[6.48 9.36 8.64 12.48 10.08 9.36 3.6 3.6 3.6]
+xshow
+end grestore
+end grestore
+% PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->PATMAB...
+newpath 789 72 moveto
+853 64 925 53 998 36 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 999 39 moveto
+1008 34 lineto
+998 33 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 999 39 moveto
+1008 34 lineto
+998 33 lineto
+closepath
+stroke
+end grestore
+% COMRING...
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 1202 36 moveto
+1110 36 lineto
+1110 0 lineto
+1202 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 1202 36 moveto
+1110 36 lineto
+1110 0 lineto
+1202 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+1117 13 moveto
+(COMRING...)
+[9.12 10.08 12.48 9.36 4.56 9.84 10.08 3.6 3.6 3.6]
+xshow
+end grestore
+end grestore
+% PolynomialCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet)->COMRING...
+newpath 799 78 moveto
+889 70 996 58 1100 36 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 1101 39 moveto
+1110 34 lineto
+1100 33 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 1101 39 moveto
+1110 34 lineto
+1100 33 lineto
+closepath
+stroke
+end grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+end
+restore
+%%EOF
diff --git a/books/ps/v102triangularsetcategory.ps b/books/ps/v102triangularsetcategory.ps
new file mode 100644
index 0000000..16fa1d2
--- /dev/null
+++ b/books/ps/v102triangularsetcategory.ps
@@ -0,0 +1,1015 @@
+%!PS-Adobe-2.0
+%%Creator: dot version 2.8 (Thu Sep 14 20:34:11 UTC 2006)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: 36 36 1143 656
+%%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
+	dup 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 aligned label in bounding box aligned to current point
+/alignedtext {			% width adj text
+	/text exch def
+	/adj exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			text stringwidth pop adj mul 0 rmoveto
+		} if
+		[] 0 setdash
+		text show
+	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
+%%Page: 1 1
+%%PageBoundingBox: 36 36 1143 656
+%%PageOrientation: Portrait
+gsave
+36 36 1107 620 boxprim clip newpath
+36 36 translate
+0 0 1 beginpage
+1.0000 set_scale
+4 4 translate 0 rotate
+0.167 0.600 1.000 graphcolor
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 618 lineto
+1105 618 lineto
+1105 -6 lineto
+closepath
+fill
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 618 lineto
+1105 618 lineto
+1105 -6 lineto
+closepath
+stroke
+0.000 0.000 0.000 graphcolor
+14.00 /Times-Roman set_font
+% TriangularSetCategory(a:IntegralDomain,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 866 612 moveto
+146 612 lineto
+146 576 lineto
+866 576 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 866 612 moveto
+146 612 lineto
+146 576 lineto
+866 576 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+154 589 moveto
+(TriangularSetCategory\(a:IntegralDomain,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory\(a,b,c\)\))
+[7.92 5.04 3.84 6.24 6.96 6.96 6.96 3.84 6.24 4.8 7.68 6 3.84 9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96 4.56 6.24 3.84 4.56 6.96 3.84 6.24 7.2 4.8 6.24 3.84 10.08 6.96 10.8 6.24 3.84 6.96 3.6 6.96 3.84 10.08 4.56 6.96 6.24 4.8 6.24 6.96 9.84 6.96 6.24 3.84 3.84 6.24 6.96 12.48 6.96 6.96 6.96 3.84 6.96 7.68 6.96 6.96 3.6 6.24 3.84 10.08 4.56 6.96 6.24 4.8 6.24 6.96 7.68 6 3.84 3.6 6.96 3.84 9.12 6.24 6.24 6.96 4.8 5.52 3.84 6.48 6.24 7.44 6.96 3.6 6.96 6.96 6.96 10.8 3.84 6.24 3.84 9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96 4.56 6.24 3.6 6.96 3.6 6.24 4.56 4.56]
+xshow
+end grestore
+end grestore
+% PolynomialSetCategory(a:IntegralDomain,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))
+gsave 10 dict begin
+filled
+0.404 0.667 0.545 nodecolor
+0.404 0.667 0.545 nodecolor
+newpath 869 540 moveto
+143 540 lineto
+143 504 lineto
+869 504 lineto
+closepath
+fill
+0.404 0.667 0.545 nodecolor
+newpath 869 540 moveto
+143 540 lineto
+143 504 lineto
+869 504 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+151 517 moveto
+(PolynomialSetCategory\(a:IntegralDomain,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory\(a,b,c\)\))
+[7.44 6.96 3.6 6.96 6.96 6.96 10.8 3.84 6.24 3.84 7.68 6 3.84 9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96 4.56 6.24 3.84 4.56 6.96 3.84 6.24 7.2 4.8 6.24 3.84 10.08 6.96 10.8 6.24 3.84 6.96 3.6 6.96 3.84 10.08 4.56 6.96 6.24 4.8 6.24 6.96 9.84 6.96 6.24 3.84 3.84 6.24 6.96 12.48 6.96 6.96 6.96 3.84 6.96 7.68 6.96 6.96 3.6 6.24 3.84 10.08 4.56 6.96 6.24 4.8 6.24 6.96 7.68 6 3.84 3.6 6.96 3.84 9.12 6.24 6.24 6.96 4.8 5.52 3.84 6.48 6.24 7.44 6.96 3.6 6.96 6.96 6.96 10.8 3.84 6.24 3.84 9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96 4.56 6.24 3.6 6.96 3.6 6.24 4.56 4.56]
+xshow
+end grestore
+end grestore
+% TriangularSetCategory(a:IntegralDomain,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))->PolynomialSetCategory(a:IntegralDomain,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))
+newpath 506 576 moveto
+506 568 506 559 506 550 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 510 550 moveto
+506 540 lineto
+503 550 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 510 550 moveto
+506 540 lineto
+503 550 lineto
+closepath
+stroke
+end grestore
+% PolynomialSetCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 838 468 moveto
+174 468 lineto
+174 432 lineto
+838 432 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 838 468 moveto
+174 468 lineto
+174 432 lineto
+838 432 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+182 445 moveto
+(PolynomialSetCategory\(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory\(a,b,c\)\))
+[7.44 6.96 3.6 6.96 6.96 6.96 10.8 3.84 6.24 3.84 7.68 6 3.84 9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96 4.56 6.24 3.84 9.36 3.84 6.96 6.96 3.6 6.96 3.84 10.08 4.56 6.96 6.24 4.8 6.24 6.96 9.84 6.96 6.24 3.84 3.84 6.24 6.96 12.48 6.96 6.96 6.96 3.84 6.96 7.68 6.96 6.96 3.6 6.24 3.84 10.08 4.56 6.96 6.24 4.8 6.24 6.96 7.68 6 3.84 3.6 6.96 3.84 9.12 6.24 6.24 6.96 4.8 5.52 3.84 6.48 6.24 7.44 6.96 3.6 6.96 6.96 6.96 10.8 3.84 6.24 3.84 9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96 4.56 6.24 3.6 6.96 3.6 6.24 4.56 4.56]
+xshow
+end grestore
+end grestore
+% PolynomialSetCategory(a:IntegralDomain,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))->PolynomialSetCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))
+newpath 506 504 moveto
+506 496 506 487 506 478 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 510 478 moveto
+506 468 lineto
+503 478 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 510 478 moveto
+506 468 lineto
+503 478 lineto
+closepath
+stroke
+end grestore
+% SetCategory()
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 167 396 moveto
+73 396 lineto
+73 360 lineto
+167 360 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 167 396 moveto
+73 396 lineto
+73 360 lineto
+167 360 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+80 373 moveto
+(SetCategory\(\))
+[7.68 6 3.84 9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96 4.56 4.56]
+xshow
+end grestore
+end grestore
+% PolynomialSetCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))->SetCategory()
+newpath 409 432 moveto
+336 419 238 400 177 389 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 177 386 moveto
+167 387 lineto
+176 392 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 177 386 moveto
+167 387 lineto
+176 392 lineto
+closepath
+stroke
+end grestore
+% Collection(RecursivePolynomialCategory(Ring,OrderedAbelianMonoidSup(),OrderedSet())
+gsave 10 dict begin
+filled
+0.404 0.667 0.545 nodecolor
+0.404 0.667 0.545 nodecolor
+newpath 1099 396 moveto
+569 396 lineto
+569 360 lineto
+1099 360 lineto
+closepath
+fill
+0.404 0.667 0.545 nodecolor
+newpath 1099 396 moveto
+569 396 lineto
+569 360 lineto
+1099 360 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+577 373 moveto
+(Collection\(RecursivePolynomialCategory\(Ring,OrderedAbelianMonoidSup\(\),OrderedSet\(\)\))
+[9.36 6.96 3.84 3.84 6.24 6.24 3.84 3.84 6.96 6.96 4.56 9.12 6.24 6.24 6.96 4.8 5.52 3.84 6.48 6.24 7.44 6.96 3.6 6.96 6.96 6.96 10.8 3.84 6.24 3.84 9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96 4.56 9.36 3.84 6.96 6.96 3.6 10.08 4.56 6.96 6.24 4.8 6.24 6.96 9.84 6.96 6.24 3.84 3.84 6.24 6.96 12.48 6.96 6.96 6.96 3.84 6.96 7.68 6.96 6.96 4.56 4.56 3.6 10.08 4.56 6.96 6.24 4.8 6.24 6.96 7.68 6 3.84 4.56 4.56 4.56]
+xshow
+end grestore
+end grestore
+% PolynomialSetCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))->Collection(RecursivePolynomialCategory(Ring,OrderedAbelianMonoidSup(),OrderedSet())
+newpath 588 432 moveto
+636 422 695 409 743 398 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 744 401 moveto
+753 396 lineto
+743 395 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 744 401 moveto
+753 396 lineto
+743 395 lineto
+closepath
+stroke
+end grestore
+% CoercibleTo(List(RecursivePolynomialCategory(Ring,OrderedAbelianMonoidSup(),OrderedSet()))
+gsave 10 dict begin
+filled
+0.404 0.667 0.545 nodecolor
+0.404 0.667 0.545 nodecolor
+newpath 792 324 moveto
+220 324 lineto
+220 288 lineto
+792 288 lineto
+closepath
+fill
+0.404 0.667 0.545 nodecolor
+newpath 792 324 moveto
+220 324 lineto
+220 288 lineto
+792 288 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+228 301 moveto
+(CoercibleTo\(List\(RecursivePolynomialCategory\(Ring,OrderedAbelianMonoidSup\(\),OrderedSet\(\)\)\))
+[9.36 6.96 6.24 4.8 6.24 3.84 6.96 3.84 6.24 7.44 6.96 4.56 8.64 3.84 5.28 3.84 4.56 9.12 6.24 6.24 6.96 4.8 5.52 3.84 6.48 6.24 7.44 6.96 3.6 6.96 6.96 6.96 10.8 3.84 6.24 3.84 9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96 4.56 9.36 3.84 6.96 6.96 3.6 10.08 4.56 6.96 6.24 4.8 6.24 6.96 9.84 6.96 6.24 3.84 3.84 6.24 6.96 12.48 6.96 6.96 6.96 3.84 6.96 7.68 6.96 6.96 4.56 4.56 3.6 10.08 4.56 6.96 6.24 4.8 6.24 6.96 7.68 6 3.84 4.56 4.56 4.56 4.56]
+xshow
+end grestore
+end grestore
+% PolynomialSetCategory(a:Ring,b:OrderedAbelianMonoidSup,c:OrderedSet,d:RecursivePolynomialCategory(a,b,c))->CoercibleTo(List(RecursivePolynomialCategory(Ring,OrderedAbelianMonoidSup(),OrderedSet()))
+newpath 506 432 moveto
+506 407 506 363 506 334 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 510 334 moveto
+506 324 lineto
+503 334 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 510 334 moveto
+506 324 lineto
+503 334 lineto
+closepath
+stroke
+end grestore
+% BasicType()
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 269 108 moveto
+185 108 lineto
+185 72 lineto
+269 72 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 269 108 moveto
+185 108 lineto
+185 72 lineto
+269 72 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+192 85 moveto
+(BasicType\(\))
+[9.36 6.24 5.52 3.84 6.24 7.2 6.96 6.96 6.24 4.56 4.56]
+xshow
+end grestore
+end grestore
+% SetCategory()->BasicType()
+newpath 73 361 moveto
+56 352 39 340 29 324 curveto
+22 310 23 302 29 288 curveto
+62 210 142 147 190 114 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 192 117 moveto
+198 108 lineto
+188 111 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 192 117 moveto
+198 108 lineto
+188 111 lineto
+closepath
+stroke
+end grestore
+% CoercibleTo(OutputForm)
+gsave 10 dict begin
+filled
+0.404 0.667 0.545 nodecolor
+0.404 0.667 0.545 nodecolor
+newpath 202 324 moveto
+38 324 lineto
+38 288 lineto
+202 288 lineto
+closepath
+fill
+0.404 0.667 0.545 nodecolor
+newpath 202 324 moveto
+38 324 lineto
+38 288 lineto
+202 288 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+46 301 moveto
+(CoercibleTo\(OutputForm\))
+[9.36 6.96 6.24 4.8 6.24 3.84 6.96 3.84 6.24 7.44 6.96 4.56 10.08 6.96 3.84 6.96 6.96 3.84 7.44 6.96 5.04 10.8 4.56]
+xshow
+end grestore
+end grestore
+% SetCategory()->CoercibleTo(OutputForm)
+newpath 120 360 moveto
+120 352 120 343 120 334 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 124 334 moveto
+120 324 lineto
+117 334 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 124 334 moveto
+120 324 lineto
+117 334 lineto
+closepath
+stroke
+end grestore
+% Collection(a:Type)
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 930 324 moveto
+810 324 lineto
+810 288 lineto
+930 288 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 930 324 moveto
+810 324 lineto
+810 288 lineto
+930 288 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+817 301 moveto
+(Collection\(a:Type\))
+[9.36 6.96 3.84 3.84 6.24 6.24 3.84 3.84 6.96 6.96 4.56 6.24 3.84 7.2 6.96 6.96 6.24 4.56]
+xshow
+end grestore
+end grestore
+% Collection(RecursivePolynomialCategory(Ring,OrderedAbelianMonoidSup(),OrderedSet())->Collection(a:Type)
+newpath 843 360 moveto
+847 352 852 342 857 333 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 860 335 moveto
+861 324 lineto
+854 332 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 860 335 moveto
+861 324 lineto
+854 332 lineto
+closepath
+stroke
+end grestore
+% CoercibleTo(a:Type)
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 550 252 moveto
+418 252 lineto
+418 216 lineto
+550 216 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 550 252 moveto
+418 252 lineto
+418 216 lineto
+550 216 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+426 229 moveto
+(CoercibleTo\(a:Type\))
+[9.36 6.96 6.24 4.8 6.24 3.84 6.96 3.84 6.24 7.44 6.96 4.56 6.24 3.84 7.2 6.96 6.96 6.24 4.56]
+xshow
+end grestore
+end grestore
+% CoercibleTo(List(RecursivePolynomialCategory(Ring,OrderedAbelianMonoidSup(),OrderedSet()))->CoercibleTo(a:Type)
+newpath 500 288 moveto
+498 280 495 270 492 262 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 495 261 moveto
+489 252 lineto
+489 263 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 495 261 moveto
+489 252 lineto
+489 263 lineto
+closepath
+stroke
+end grestore
+% Category
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 592 36 moveto
+524 36 lineto
+524 0 lineto
+592 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 592 36 moveto
+524 36 lineto
+524 0 lineto
+592 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+532 13 moveto
+(Category)
+[9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96]
+xshow
+end grestore
+end grestore
+% CoercibleTo(a:Type)->Category
+newpath 490 216 moveto
+503 178 533 91 549 46 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 552 47 moveto
+552 36 lineto
+546 45 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 552 47 moveto
+552 36 lineto
+546 45 lineto
+closepath
+stroke
+end grestore
+% HomogeneousAggregate(a:Type)
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 770 252 moveto
+568 252 lineto
+568 216 lineto
+770 216 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 770 252 moveto
+568 252 lineto
+568 216 lineto
+770 216 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+575 229 moveto
+(HomogeneousAggregate\(a:Type\))
+[10.08 6.96 10.8 6.96 6.72 6.24 6.96 6.24 6.96 6.96 5.52 9.84 6.96 7.2 4.8 6.24 6.72 6.24 3.84 6.24 4.56 6.24 3.84 7.2 6.96 6.96 6.24 4.56]
+xshow
+end grestore
+end grestore
+% Collection(a:Type)->HomogeneousAggregate(a:Type)
+newpath 820 288 moveto
+792 278 758 266 729 255 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 730 252 moveto
+719 252 lineto
+728 258 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 730 252 moveto
+719 252 lineto
+728 258 lineto
+closepath
+stroke
+end grestore
+% ConvertibleTo(InputForm)
+gsave 10 dict begin
+filled
+0.333 1.000 0.933 nodecolor
+0.333 1.000 0.933 nodecolor
+newpath 952 252 moveto
+788 252 lineto
+788 216 lineto
+952 216 lineto
+closepath
+fill
+0.333 1.000 0.933 nodecolor
+newpath 952 252 moveto
+788 252 lineto
+788 216 lineto
+952 216 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+795 229 moveto
+(ConvertibleTo\(InputForm\))
+[9.36 6.96 6.48 6.48 6.24 5.04 3.84 3.84 6.96 3.84 6.24 7.44 6.96 4.56 4.56 6.72 6.96 6.96 3.84 7.44 6.96 5.04 10.8 4.56]
+xshow
+end grestore
+end grestore
+% Collection(a:Type)->ConvertibleTo(InputForm)
+newpath 870 288 moveto
+870 280 870 271 870 262 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 874 262 moveto
+870 252 lineto
+867 262 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 874 262 moveto
+870 252 lineto
+867 262 lineto
+closepath
+stroke
+end grestore
+% Aggregate()
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 682 180 moveto
+598 180 lineto
+598 144 lineto
+682 144 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 682 180 moveto
+598 180 lineto
+598 144 lineto
+682 144 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+605 157 moveto
+(Aggregate\(\))
+[9.84 6.96 7.2 4.8 6.24 6.72 6.24 3.84 6.24 4.56 4.56]
+xshow
+end grestore
+end grestore
+% HomogeneousAggregate(a:Type)->Aggregate()
+newpath 662 216 moveto
+658 208 655 198 651 189 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 654 188 moveto
+647 180 lineto
+648 191 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 654 188 moveto
+647 180 lineto
+648 191 lineto
+closepath
+stroke
+end grestore
+% ConvertibleTo(a:Type)
+gsave 10 dict begin
+filled
+0.333 1.000 0.933 nodecolor
+0.333 1.000 0.933 nodecolor
+newpath 906 180 moveto
+764 180 lineto
+764 144 lineto
+906 144 lineto
+closepath
+fill
+0.333 1.000 0.933 nodecolor
+newpath 906 180 moveto
+764 180 lineto
+764 144 lineto
+906 144 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+771 157 moveto
+(ConvertibleTo\(a:Type\))
+[9.36 6.96 6.48 6.48 6.24 5.04 3.84 3.84 6.96 3.84 6.24 7.44 6.96 4.56 6.24 3.84 7.2 6.96 6.96 6.24 4.56]
+xshow
+end grestore
+end grestore
+% ConvertibleTo(InputForm)->ConvertibleTo(a:Type)
+newpath 861 216 moveto
+857 208 853 198 848 189 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 851 188 moveto
+844 180 lineto
+845 191 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 851 188 moveto
+844 180 lineto
+845 191 lineto
+closepath
+stroke
+end grestore
+% BasicType()->Category
+newpath 269 81 moveto
+332 67 450 41 514 27 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 515 30 moveto
+524 25 lineto
+514 24 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 515 30 moveto
+524 25 lineto
+514 24 lineto
+closepath
+stroke
+end grestore
+% CoercibleTo(OutputForm)->CoercibleTo(a:Type)
+newpath 202 290 moveto
+264 278 348 261 408 249 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 409 252 moveto
+418 247 lineto
+408 246 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 409 252 moveto
+418 247 lineto
+408 246 lineto
+closepath
+stroke
+end grestore
+% Type()
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 631 108 moveto
+577 108 lineto
+577 72 lineto
+631 72 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 631 108 moveto
+577 108 lineto
+577 72 lineto
+631 72 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+585 85 moveto
+(Type\(\))
+[7.2 6.96 6.96 6.24 4.56 4.56]
+xshow
+end grestore
+end grestore
+% Aggregate()->Type()
+newpath 631 144 moveto
+627 136 622 126 617 117 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 620 116 moveto
+613 108 lineto
+614 119 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 620 116 moveto
+613 108 lineto
+614 119 lineto
+closepath
+stroke
+end grestore
+% Type()->Category
+newpath 592 72 moveto
+587 64 580 54 574 44 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 577 43 moveto
+569 36 lineto
+571 46 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 577 43 moveto
+569 36 lineto
+571 46 lineto
+closepath
+stroke
+end grestore
+% ConvertibleTo(a:Type)->Category
+newpath 800 144 moveto
+750 118 656 69 601 41 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 602 38 moveto
+592 36 lineto
+599 44 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 602 38 moveto
+592 36 lineto
+599 44 lineto
+closepath
+stroke
+end grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+end
+restore
+%%EOF
diff --git a/books/ps/v102vectorcategory.ps b/books/ps/v102vectorcategory.ps
new file mode 100644
index 0000000..b8fb8f9
--- /dev/null
+++ b/books/ps/v102vectorcategory.ps
@@ -0,0 +1,519 @@
+%!PS-Adobe-2.0
+%%Creator: dot version 2.8 (Thu Sep 14 20:34:11 UTC 2006)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: 36 36 359 440
+%%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
+	dup 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 aligned label in bounding box aligned to current point
+/alignedtext {			% width adj text
+	/text exch def
+	/adj exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			text stringwidth pop adj mul 0 rmoveto
+		} if
+		[] 0 setdash
+		text show
+	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
+%%Page: 1 1
+%%PageBoundingBox: 36 36 359 440
+%%PageOrientation: Portrait
+gsave
+36 36 323 404 boxprim clip newpath
+36 36 translate
+0 0 1 beginpage
+1.0000 set_scale
+4 4 translate 0 rotate
+0.167 0.600 1.000 graphcolor
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 402 lineto
+321 402 lineto
+321 -6 lineto
+closepath
+fill
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 402 lineto
+321 402 lineto
+321 -6 lineto
+closepath
+stroke
+0.000 0.000 0.000 graphcolor
+14.00 /Times-Roman set_font
+% VectorCategory(a:Type)
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 267 396 moveto
+115 396 lineto
+115 360 lineto
+267 360 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 267 396 moveto
+115 396 lineto
+115 360 lineto
+267 360 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+122 373 moveto
+(VectorCategory\(a:Type\))
+[8.88 6.24 6.24 3.84 6.96 4.8 9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96 4.56 6.24 3.84 7.2 6.96 6.96 6.24 4.56]
+xshow
+end grestore
+end grestore
+% OneDimensionalArrayAggregate(a:Type)
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 315 324 moveto
+67 324 lineto
+67 288 lineto
+315 288 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 315 324 moveto
+67 324 lineto
+67 288 lineto
+315 288 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+74 301 moveto
+(OneDimensionalArrayAggregate\(a:Type\))
+[10.08 6.96 6.24 10.08 3.84 10.8 6.24 6.96 5.52 3.84 6.96 6.96 6.24 3.84 10.08 5.28 4.8 5.76 6.96 9.84 6.96 7.2 4.8 6.24 6.72 6.24 3.84 6.24 4.56 6.24 3.84 7.2 6.96 6.96 6.24 4.56]
+xshow
+end grestore
+end grestore
+% VectorCategory(a:Type)->OneDimensionalArrayAggregate(a:Type)
+newpath 191 360 moveto
+191 352 191 343 191 334 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 195 334 moveto
+191 324 lineto
+188 334 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 195 334 moveto
+191 324 lineto
+188 334 lineto
+closepath
+stroke
+end grestore
+% FiniteLinearAggregate(a:Type)
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 286 252 moveto
+96 252 lineto
+96 216 lineto
+286 216 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 286 252 moveto
+96 252 lineto
+96 216 lineto
+286 216 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+104 229 moveto
+(FiniteLinearAggregate\(a:Type\))
+[7.44 3.84 6.96 3.84 3.84 6.24 8.64 3.84 6.96 6.24 6.24 4.8 9.84 6.96 7.2 4.8 6.24 6.72 6.24 3.84 6.24 4.56 6.24 3.84 7.2 6.96 6.96 6.24 4.56]
+xshow
+end grestore
+end grestore
+% OneDimensionalArrayAggregate(a:Type)->FiniteLinearAggregate(a:Type)
+newpath 191 288 moveto
+191 280 191 271 191 262 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 195 262 moveto
+191 252 lineto
+188 262 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 195 262 moveto
+191 252 lineto
+188 262 lineto
+closepath
+stroke
+end grestore
+% LinearAggregate(a:Type)
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 270 180 moveto
+112 180 lineto
+112 144 lineto
+270 144 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 270 180 moveto
+112 180 lineto
+112 144 lineto
+270 144 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+120 157 moveto
+(LinearAggregate\(a:Type\))
+[8.64 3.84 6.96 6.24 6.24 4.8 9.84 6.96 7.2 4.8 6.24 6.72 6.24 3.84 6.24 4.56 6.24 3.84 7.2 6.96 6.96 6.24 4.56]
+xshow
+end grestore
+end grestore
+% FiniteLinearAggregate(a:Type)->LinearAggregate(a:Type)
+newpath 191 216 moveto
+191 208 191 199 191 190 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 195 190 moveto
+191 180 lineto
+188 190 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 195 190 moveto
+191 180 lineto
+188 190 lineto
+closepath
+stroke
+end grestore
+% IndexedAggregate(b:Integer,a:Type)
+gsave 10 dict begin
+filled
+0.404 0.667 0.545 nodecolor
+0.404 0.667 0.545 nodecolor
+newpath 218 108 moveto
+0 108 lineto
+0 72 lineto
+218 72 lineto
+closepath
+fill
+0.404 0.667 0.545 nodecolor
+newpath 218 108 moveto
+0 108 lineto
+0 72 lineto
+218 72 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+7 85 moveto
+(IndexedAggregate\(b:Integer,a:Type\))
+[4.56 6.96 6.96 5.76 6.48 6.24 6.96 9.84 6.96 7.2 4.8 6.24 6.72 6.24 3.84 6.24 4.56 6.96 3.84 4.56 6.96 3.84 6.24 6.72 6.24 4.32 3.6 6.24 3.84 7.2 6.96 6.96 6.24 4.56]
+xshow
+end grestore
+end grestore
+% LinearAggregate(a:Type)->IndexedAggregate(b:Integer,a:Type)
+newpath 170 144 moveto
+160 135 148 124 137 115 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 139 112 moveto
+129 108 lineto
+134 117 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 139 112 moveto
+129 108 lineto
+134 117 lineto
+closepath
+stroke
+end grestore
+% CLAGG...
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 310 108 moveto
+236 108 lineto
+236 72 lineto
+310 72 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 310 108 moveto
+236 108 lineto
+236 72 lineto
+310 72 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+243 85 moveto
+(CLAGG...)
+[9.36 8.64 9.36 10.08 10.08 3.6 3.6 3.6]
+xshow
+end grestore
+end grestore
+% LinearAggregate(a:Type)->CLAGG...
+newpath 212 144 moveto
+222 135 234 124 245 115 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 248 117 moveto
+253 108 lineto
+243 112 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 248 117 moveto
+253 108 lineto
+243 112 lineto
+closepath
+stroke
+end grestore
+% IXAGG...
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 145 36 moveto
+73 36 lineto
+73 0 lineto
+145 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 145 36 moveto
+73 36 lineto
+73 0 lineto
+145 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+80 13 moveto
+(IXAGG...)
+[4.56 10.08 9.36 10.08 10.08 3.6 3.6 3.6]
+xshow
+end grestore
+end grestore
+% IndexedAggregate(b:Integer,a:Type)->IXAGG...
+newpath 109 72 moveto
+109 64 109 55 109 46 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 113 46 moveto
+109 36 lineto
+106 46 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 113 46 moveto
+109 36 lineto
+106 46 lineto
+closepath
+stroke
+end grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+end
+restore
+%%EOF
diff --git a/changelog b/changelog
index 1e2458b..028545d 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,25 @@
+20081029 tpd books/bookvol10.2.pamphlet add categories
+20081029 tpd books/ps/v102polynomialsetcategory.ps corrected
+20081029 tpd src/algebra/triset.spad move categories to bookvol10.2
+20081029 tpd books/ps/v102triangularsetcategory.ps added
+20081029 tpd books/ps/v102partialdifferentialequationssolvercategory.ps added
+20081029 tpd books/ps/v102ordinarydifferentialequationssolvercategory.ps added
+20081029 tpd books/ps/v102numericaloptimizationcategory.ps
+20081029 tpd books/ps/v102numericalintegrationcategory.ps added
+20081029 tpd src/algebra/annacat.spad move categories to bookvol10.2
+20081029 tpd src/algebra/Makefile remove TSETCAT-
+20081029 tpd books/ps/v102vectorcategory.ps added
+20081029 tpd books/ps/v102directproductcategory.ps added
+20081029 tpd books/ps/v102polynomialcategory.ps modified
+20081029 tpd books/ps/v102differentialpolynomialcategory.ps modified
+20081029 tpd src/algebra/vector.spad move categories to bookvol10.2
+20081029 tpd books/ps/v102recursivepolynomialcategory.ps added
+20081029 tpd books/ps/v102polynomialsetcategory.ps added
+20081029 tpd src/algebra/newpoly.spad move RPOLYCAT to bookvol10.2
+20081029 tpd books/ps/v102padicintegercategory.ps added
+20081029 tpd src/algebra/padic.spad move PADICCT to bookvol10.2	
+20081029 tpd books/ps/v102octonioncategory.ps added
+20081029 tpd src/algebra/oct.spad move OC to bookvol10.2
 20081028 tpd books/ps/v102univariatetaylorseriescategory.ps added
 20081028 tpd books/ps/v102univariatepuiseuxseriescategory.ps added
 20081028 tpd books/ps/v102univariatepowerseriescategory.ps added
diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet
index 50cec79..0c27f01 100644
--- a/src/algebra/Makefile.pamphlet
+++ b/src/algebra/Makefile.pamphlet
@@ -135,7 +135,7 @@ LAYER0BOOTSTRAP=\
   ${MID}/RNG.o      ${MID}/RNS.o      ${MID}/RNS-.o     ${MID}/SETAGG.o   \
   ${MID}/SETAGG-.o  ${MID}/SETCAT.o   ${MID}/SETCAT-.o  ${MID}/SINT.o     \
   ${MID}/STAGG.o    ${MID}/STAGG-.o   ${MID}/SYMBOL.o   ${MID}/TSETCAT.o  \
-  ${MID}/TSETCAT-.o ${MID}/UFD.o      ${MID}/UFD-.o     ${MID}/ULSCAT.o   \
+  ${MID}/UFD.o      ${MID}/UFD-.o     ${MID}/ULSCAT.o   \
   ${MID}/UPOLYC.o   ${MID}/UPOLYC-.o  ${MID}/URAGG.o    ${MID}/URAGG-.o   \
   ${MID}/VECTOR.o \
   layer0bootstrap
@@ -163,7 +163,7 @@ LAYER0COPY=\
   ${OUT}/RNG.o      ${OUT}/RNS.o      ${OUT}/RNS-.o     ${OUT}/SETAGG.o   \
   ${OUT}/SETAGG-.o  ${OUT}/SETCAT.o   ${OUT}/SETCAT-.o  ${OUT}/SINT.o     \
   ${OUT}/STAGG.o    ${OUT}/STAGG-.o   ${OUT}/SYMBOL.o   ${OUT}/TSETCAT.o  \
-  ${OUT}/TSETCAT-.o ${OUT}/UFD.o      ${OUT}/UFD-.o     ${OUT}/ULSCAT.o   \
+  ${OUT}/UFD.o      ${OUT}/UFD-.o     ${OUT}/ULSCAT.o   \
   ${OUT}/UPOLYC.o   ${OUT}/UPOLYC-.o  ${OUT}/URAGG.o    ${OUT}/URAGG-.o   \
   ${OUT}/VECTOR.o \
   layer0copy
diff --git a/src/algebra/annacat.spad.pamphlet b/src/algebra/annacat.spad.pamphlet
index 70d5af6..cbd258f 100644
--- a/src/algebra/annacat.spad.pamphlet
+++ b/src/algebra/annacat.spad.pamphlet
@@ -247,211 +247,6 @@ NumericalOptimizationProblem():SetCategory with
         [x.lsa]
 
 @
-\section{category NUMINT NumericalIntegrationCategory}
-<<category NUMINT NumericalIntegrationCategory>>=
-)abbrev category NUMINT NumericalIntegrationCategory
-++ Author: Brian Dupee
-++ Date Created: February 1994
-++ Date Last Updated: March 1996
-++ Description:
-++ \axiomType{NumericalIntegrationCategory} is the \axiom{category} for 
-++ describing the set of Numerical Integration \axiom{domains} with
-++ \axiomFun{measure} and \axiomFun{numericalIntegration}.
-
-EDFE   ==> Expression DoubleFloat
-SOCDFE ==> Segment OrderedCompletion DoubleFloat
-DFE    ==> DoubleFloat
-NIAE   ==> Record(var:Symbol,fn:EDFE,range:SOCDFE,abserr:DFE,relerr:DFE)
-MDNIAE ==> Record(fn:EDFE,range:List SOCDFE,abserr:DFE,relerr:DFE)
-NumericalIntegrationCategory(): Category == SetCategory with
-
-  measure:(RoutinesTable,NIAE)->Record(measure:Float,explanations:String,extra:Result)
-    ++ measure(R,args) calculates an estimate of the ability of a particular
-    ++ method to solve a problem.  
-    ++
-    ++ This method may be either a specific NAG routine or a strategy (such
-    ++ as transforming the function from one which is difficult to one which
-    ++ is easier to solve).
-    ++
-    ++ It will call whichever agents are needed to perform analysis on the
-    ++ problem in order to calculate the measure. There is a parameter,
-    ++ labelled \axiom{sofar}, which would contain the best compatibility
-    ++ found so far.
-
-  numericalIntegration: (NIAE, Result) -> Result
-    ++ numericalIntegration(args,hints) performs the integration of the
-    ++ function given the strategy or method returned by \axiomFun{measure}.
-
-  measure:(RoutinesTable,MDNIAE)->Record(measure:Float,explanations:String,extra:Result)
-    ++ measure(R,args) calculates an estimate of the ability of a particular
-    ++ method to solve a problem.  
-    ++
-    ++ This method may be either a specific NAG routine or a strategy (such
-    ++ as transforming the function from one which is difficult to one which
-    ++ is easier to solve).
-    ++
-    ++ It will call whichever agents are needed to perform analysis on the
-    ++ problem in order to calculate the measure. There is a parameter,
-    ++ labelled \axiom{sofar}, which would contain the best compatibility
-    ++ found so far.
-
-  numericalIntegration: (MDNIAE, Result) -> Result
-    ++ numericalIntegration(args,hints) performs the integration of the
-    ++ function given the strategy or method returned by \axiomFun{measure}.
-
-@
-\section{category ODECAT OrdinaryDifferentialEquationsSolverCategory}
-<<category ODECAT OrdinaryDifferentialEquationsSolverCategory>>=
-)abbrev category ODECAT OrdinaryDifferentialEquationsSolverCategory
-++ Author: Brian Dupee
-++ Date Created: February 1995
-++ Date Last Updated: June 1995
-++ Basic Operations: 
-++ Description:
-++ \axiomType{OrdinaryDifferentialEquationsSolverCategory} is the 
-++ \axiom{category} for describing the set of ODE solver \axiom{domains} 
-++ with \axiomFun{measure} and \axiomFun{ODEsolve}.
-
-DFF   ==> DoubleFloat
-VEDFF ==> Vector Expression DoubleFloat
-LDFF  ==> List DoubleFloat
-EDFF  ==> Expression DoubleFloat
-ODEAF ==> Record(xinit:DFF,xend:DFF,fn:VEDFF,yinit:LDFF,intvals:LDFF,g:EDFF,abserr:DFF,relerr:DFF)
-OrdinaryDifferentialEquationsSolverCategory(): Category == SetCategory with
-
-  measure:(RoutinesTable,ODEAF) -> Record(measure:Float,explanations:String)
-    ++ measure(R,args) calculates an estimate of the ability of a particular
-    ++ method to solve a problem.  
-    ++
-    ++ This method may be either a specific NAG routine or a strategy (such
-    ++ as transforming the function from one which is difficult to one which
-    ++ is easier to solve).
-    ++
-    ++ It will call whichever agents are needed to perform analysis on the
-    ++ problem in order to calculate the measure. There is a parameter,
-    ++ labelled \axiom{sofar}, which would contain the best compatibility
-    ++ found so far.
-
-  ODESolve: ODEAF -> Result
-    ++ ODESolve(args) performs the integration of the
-    ++ function given the strategy or method returned by \axiomFun{measure}.
-
-@
-\section{category PDECAT PartialDifferentialEquationsSolverCategory}
-<<category PDECAT PartialDifferentialEquationsSolverCategory>>=
-)abbrev category PDECAT PartialDifferentialEquationsSolverCategory
-++ Author: Brian Dupee
-++ Date Created: February 1995
-++ Date Last Updated: June 1995
-++ Basic Operations: 
-++ Description:
-++ \axiomType{PartialDifferentialEquationsSolverCategory} is the 
-++ \axiom{category} for describing the set of PDE solver \axiom{domains} 
-++ with \axiomFun{measure} and \axiomFun{PDEsolve}.
-
--- PDEA	==> Record(xmin:F,xmax:F,ymin:F,ymax:F,ngx:NNI,ngy:NNI,_
---             pde:List Expression Float, bounds:List List Expression Float,_
---             st:String, tol:DF)
-
---  measure:(RoutinesTable,PDEA) -> Record(measure:F,explanations:String)
---    ++ measure(R,args) calculates an estimate of the ability of a particular
---    ++ method to solve a problem.  
---    ++
---    ++ This method may be either a specific NAG routine or a strategy (such
---    ++ as transforming the function from one which is difficult to one which
---    ++ is easier to solve).
---    ++
---    ++ It will call whichever agents are needed to perform analysis on the
---    ++ problem in order to calculate the measure. There is a parameter,
---    ++ labelled \axiom{sofar}, which would contain the best compatibility
---    ++ found so far.
-
---  PDESolve: PDEA -> Result
---    ++ PDESolve(args) performs the integration of the
---    ++ function given the strategy or method returned by \axiomFun{measure}.
-
-DFG   ==> DoubleFloat
-NNIG  ==> NonNegativeInteger
-INTG  ==> Integer
-MDFG  ==> Matrix DoubleFloat
-PDECG ==> Record(start:DFG, finish:DFG, grid:NNIG, boundaryType:INTG,
-                  dStart:MDFG, dFinish:MDFG)
-LEDFG ==> List Expression DoubleFloat
-PDEBG ==> Record(pde:LEDFG, constraints:List PDECG, f:List LEDFG, 
-                    st:String, tol:DFG)
-PartialDifferentialEquationsSolverCategory(): Category == SetCategory with
-
-  measure:(RoutinesTable,PDEBG) -> Record(measure:Float,explanations:String)
-    ++ measure(R,args) calculates an estimate of the ability of a particular
-    ++ method to solve a problem.  
-    ++
-    ++ This method may be either a specific NAG routine or a strategy (such
-    ++ as transforming the function from one which is difficult to one which
-    ++ is easier to solve).
-    ++
-    ++ It will call whichever agents are needed to perform analysis on the
-    ++ problem in order to calculate the measure. There is a parameter,
-    ++ labelled \axiom{sofar}, which would contain the best compatibility
-    ++ found so far.
-
-  PDESolve: PDEBG -> Result
-    ++ PDESolve(args) performs the integration of the
-    ++ function given the strategy or method returned by \axiomFun{measure}.
-
-@
-\section{category OPTCAT NumericalOptimizationCategory}
-<<category OPTCAT NumericalOptimizationCategory>>=
-)abbrev category OPTCAT NumericalOptimizationCategory
-++ Author: Brian Dupee
-++ Date Created: January 1996
-++ Date Last Updated: March 1996
-++ Description:
-++ \axiomType{NumericalOptimizationCategory} is the \axiom{category} for 
-++ describing the set of Numerical Optimization \axiom{domains} with
-++ \axiomFun{measure} and \axiomFun{optimize}.
-
-LDFH   ==> List DoubleFloat
-LEDFH  ==> List Expression DoubleFloat
-LSAH   ==> Record(lfn:LEDFH, init:LDFH)
-EDFH   ==> Expression DoubleFloat
-LOCDFH ==> List OrderedCompletion DoubleFloat
-NOAH   ==> Record(fn:EDFH, init:LDFH, lb:LOCDFH, cf:LEDFH, ub:LOCDFH)
-NumericalOptimizationCategory(): Category == SetCategory with
-  measure:(RoutinesTable,NOAH)->Record(measure:Float,explanations:String)
-    ++ measure(R,args) calculates an estimate of the ability of a particular
-    ++ method to solve an optimization problem.  
-    ++
-    ++ This method may be either a specific NAG routine or a strategy (such
-    ++ as transforming the function from one which is difficult to one which
-    ++ is easier to solve).
-    ++
-    ++ It will call whichever agents are needed to perform analysis on the
-    ++ problem in order to calculate the measure. There is a parameter,
-    ++ labelled \axiom{sofar}, which would contain the best compatibility
-    ++ found so far.
-
-  measure:(RoutinesTable,LSAH)->Record(measure:Float,explanations:String)
-    ++ measure(R,args) calculates an estimate of the ability of a particular
-    ++ method to solve an optimization problem.  
-    ++
-    ++ This method may be either a specific NAG routine or a strategy (such
-    ++ as transforming the function from one which is difficult to one which
-    ++ is easier to solve).
-    ++
-    ++ It will call whichever agents are needed to perform analysis on the
-    ++ problem in order to calculate the measure. There is a parameter,
-    ++ labelled \axiom{sofar}, which would contain the best compatibility
-    ++ found so far.
-
-  numericalOptimization:LSAH -> Result
-    ++ numericalOptimization(args) performs the optimization of the
-    ++ function given the strategy or method returned by \axiomFun{measure}.
-
-  numericalOptimization:NOAH -> Result
-    ++ numericalOptimization(args) performs the optimization of the
-    ++ function given the strategy or method returned by \axiomFun{measure}.
-
-@
 \section{License}
 <<license>>=
 --Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
@@ -492,10 +287,6 @@ NumericalOptimizationCategory(): Category == SetCategory with
 <<domain ODEPROB NumericalODEProblem>>
 <<domain PDEPROB NumericalPDEProblem>>
 <<domain OPTPROB NumericalOptimizationProblem>>
-<<category NUMINT NumericalIntegrationCategory>>
-<<category ODECAT OrdinaryDifferentialEquationsSolverCategory>>
-<<category PDECAT PartialDifferentialEquationsSolverCategory>>
-<<category OPTCAT NumericalOptimizationCategory>>
 @
 \eject
 \begin{thebibliography}{99}
diff --git a/src/algebra/newpoly.spad.pamphlet b/src/algebra/newpoly.spad.pamphlet
index db2974e..220b8f0 100644
--- a/src/algebra/newpoly.spad.pamphlet
+++ b/src/algebra/newpoly.spad.pamphlet
@@ -297,1144 +297,6 @@ NewSparseUnivariatePolynomialFunctions2(R:Ring, S:Ring): with
            NewSparseUnivariatePolynomial R, S, NewSparseUnivariatePolynomial S)
 
 @
-\section{category RPOLCAT RecursivePolynomialCategory}
-<<category RPOLCAT RecursivePolynomialCategory>>=
-)abbrev category RPOLCAT RecursivePolynomialCategory
-++ Author: Marc Moreno Maza
-++ Date Created: 04/22/1994
-++ Date Last Updated: 14/12/1998
-++ Basic Functions: mvar, mdeg, init, head, tail, prem, lazyPrem
-++ Related Constructors:
-++ Also See: 
-++ AMS Classifications:
-++ Keywords: polynomial, multivariate, ordered variables set
-++ References:
-++ Description:
-++ A category for general multi-variate polynomials with coefficients 
-++ in a ring, variables in an ordered set, and exponents from an 
-++ ordered abelian monoid, with a \axiomOp{sup} operation.
-++ When not constant, such a polynomial is viewed as a univariate polynomial in its 
-++ main variable w. r. t. to the total ordering on the elements in the ordered set, so that some
-++ operations usually defined for univariate polynomials make sense here.
-
-RecursivePolynomialCategory(R:Ring, E:OrderedAbelianMonoidSup, V:OrderedSet): Category == 
-  PolynomialCategory(R, E, V) with
-     mvar : $ -> V
-         ++ \axiom{mvar(p)} returns an error if \axiom{p} belongs to \axiom{R}, 
-         ++ otherwise returns its main variable w. r. t. to the total ordering 
-         ++ on the elements in \axiom{V}.
-     mdeg  : $ -> NonNegativeInteger 
-         ++ \axiom{mdeg(p)} returns an error if \axiom{p} is \axiom{0}, 
-         ++ otherwise, if \axiom{p} belongs to \axiom{R} returns \axiom{0}, 
-         ++ otherwise, returns the degree of \axiom{p} in its main variable.
-     init : $ -> $
-         ++ \axiom{init(p)} returns an error if \axiom{p} belongs to \axiom{R}, 
-         ++ otherwise returns its leading coefficient, where \axiom{p} is viewed 
-         ++ as a univariate polynomial in its main variable.
-     head  : $ -> $
-         ++ \axiom{head(p)} returns \axiom{p} if \axiom{p} belongs to \axiom{R}, 
-         ++ otherwise returns its leading term (monomial in the AXIOM sense), 
-         ++ where \axiom{p} is viewed as a univariate polynomial in its main variable.
-     tail  : $ -> $
-         ++ \axiom{tail(p)} returns its reductum, where \axiom{p} is viewed as a univariate
-         ++ polynomial in its main variable.
-     deepestTail : $ -> $
-         ++ \axiom{deepestTail(p)} returns \axiom{0} if \axiom{p} belongs to \axiom{R}, 
-         ++ otherwise returns tail(p), if \axiom{tail(p)} belongs to  \axiom{R}
-         ++ or \axiom{mvar(tail(p)) < mvar(p)}, otherwise returns \axiom{deepestTail(tail(p))}.
-     iteratedInitials : $ -> List $ 
-         ++ \axiom{iteratedInitials(p)} returns \axiom{[]} if \axiom{p} belongs to \axiom{R}, 
-         ++ otherwise returns the list of the iterated initials of \axiom{p}.
-     deepestInitial : $ -> $ 
-         ++ \axiom{deepestInitial(p)} returns an error if \axiom{p} belongs to \axiom{R}, 
-         ++ otherwise returns the last term of \axiom{iteratedInitials(p)}.
-     leadingCoefficient : ($,V) -> $
-         ++ \axiom{leadingCoefficient(p,v)} returns the leading coefficient of \axiom{p}, 
-         ++ where \axiom{p} is viewed as A univariate polynomial in \axiom{v}.
-     reductum  : ($,V) -> $
-         ++ \axiom{reductum(p,v)} returns the reductum of \axiom{p}, where \axiom{p} is viewed as 
-         ++ a univariate polynomial in \axiom{v}. 
-     monic? : $ -> Boolean
-         ++ \axiom{monic?(p)} returns false if \axiom{p} belongs to \axiom{R}, 
-         ++ otherwise returns true iff \axiom{p} is monic as a univariate polynomial 
-         ++ in its main variable.
-     quasiMonic? : $ -> Boolean
-         ++ \axiom{quasiMonic?(p)} returns false if \axiom{p} belongs to \axiom{R}, 
-         ++ otherwise returns true iff the initial of \axiom{p} lies in the base ring \axiom{R}.
-     mainMonomial : $ -> $ 
-         ++ \axiom{mainMonomial(p)} returns an error if \axiom{p} is \axiom{O}, 
-         ++ otherwise, if \axiom{p} belongs to \axiom{R} returns \axiom{1},
-         ++ otherwise, \axiom{mvar(p)} raised to the power \axiom{mdeg(p)}.
-     leastMonomial : $ -> $ 
-         ++ \axiom{leastMonomial(p)} returns an error if \axiom{p} is \axiom{O}, 
-         ++ otherwise, if \axiom{p} belongs to \axiom{R} returns \axiom{1},
-         ++ otherwise, the monomial of \axiom{p} with lowest degree, 
-         ++ where \axiom{p} is viewed as a univariate polynomial in its main variable.
-     mainCoefficients : $ -> List $ 
-         ++ \axiom{mainCoefficients(p)} returns an error if \axiom{p} is \axiom{O}, 
-         ++ otherwise, if \axiom{p} belongs to \axiom{R} returns [p], 
-         ++ otherwise returns the list of the coefficients of \axiom{p}, 
-         ++ where \axiom{p} is viewed as a univariate polynomial in its main variable.
-     mainMonomials : $ -> List $ 
-         ++ \axiom{mainMonomials(p)} returns an error if \axiom{p} is \axiom{O}, 
-         ++ otherwise, if \axiom{p} belongs to \axiom{R} returns [1], 
-         ++ otherwise returns the list of the monomials of \axiom{p}, 
-         ++ where \axiom{p} is viewed as a univariate polynomial in its main variable.
-     RittWuCompare : ($, $) -> Union(Boolean,"failed")
-         ++ \axiom{RittWuCompare(a,b)} returns \axiom{"failed"} if \axiom{a} and \axiom{b} have same rank w.r.t. 
-         ++ Ritt and Wu Wen Tsun ordering using the refinement of Lazard, 
-         ++ otherwise returns \axiom{infRittWu?(a,b)}.
-     infRittWu?  : ($, $) -> Boolean
-         ++ \axiom{infRittWu?(a,b)} returns true if \axiom{a} is less than \axiom{b}
-         ++ w.r.t. the Ritt and Wu Wen Tsun ordering using the refinement of Lazard.
-     supRittWu? : ($, $) -> Boolean
-         ++ \axiom{supRittWu?(a,b)} returns true if \axiom{a} is greater than \axiom{b}
-         ++ w.r.t. the Ritt and Wu Wen Tsun ordering using the refinement of Lazard.
-     reduced? : ($,$) -> Boolean
-         ++ \axiom{reduced?(a,b)} returns true iff \axiom{degree(a,mvar(b)) < mdeg(b)}.
-     reduced? : ($,List($)) -> Boolean
-         ++ \axiom{reduced?(q,lp)} returns true iff \axiom{reduced?(q,p)} holds 
-         ++ for every \axiom{p} in \axiom{lp}.
-     headReduced? : ($,$) -> Boolean
-         ++ \axiom{headReduced?(a,b)} returns true iff \axiom{degree(head(a),mvar(b)) < mdeg(b)}.
-     headReduced? : ($,List($)) -> Boolean
-         ++ \axiom{headReduced?(q,lp)} returns true iff \axiom{headReduced?(q,p)} holds 
-         ++ for every \axiom{p} in \axiom{lp}.
-     initiallyReduced? : ($,$) -> Boolean
-         ++ \axiom{initiallyReduced?(a,b)} returns false iff there exists an iterated initial 
-         ++ of \axiom{a} which is not reduced w.r.t \axiom{b}.
-     initiallyReduced? :  ($,List($)) -> Boolean
-         ++ \axiom{initiallyReduced?(q,lp)} returns true iff \axiom{initiallyReduced?(q,p)} holds
-         ++ for every \axiom{p} in \axiom{lp}.
-     normalized? : ($,$) -> Boolean
-         ++ \axiom{normalized?(a,b)} returns true iff \axiom{a} and its iterated initials have
-         ++ degree zero w.r.t. the main variable of \axiom{b}
-     normalized? : ($,List($)) -> Boolean
-         ++ \axiom{normalized?(q,lp)} returns true iff \axiom{normalized?(q,p)} holds 
-         ++ for every \axiom{p} in \axiom{lp}.
-     prem : ($, $) -> $
-         ++ \axiom{prem(a,b)} computes the pseudo-remainder of \axiom{a} by \axiom{b}, 
-         ++ both viewed as univariate polynomials in the main variable of \axiom{b}.
-     pquo : ($, $) -> $
-         ++ \axiom{pquo(a,b)} computes the pseudo-quotient of \axiom{a} by \axiom{b}, 
-         ++ both viewed as univariate polynomials in the main variable of \axiom{b}.
-     prem : ($, $, V) -> $
-         ++ \axiom{prem(a,b,v)} computes the pseudo-remainder of \axiom{a} by \axiom{b}, 
-         ++ both viewed as univariate polynomials in \axiom{v}.
-     pquo : ($, $, V) -> $
-         ++ \axiom{pquo(a,b,v)} computes the pseudo-quotient of \axiom{a} by \axiom{b}, 
-         ++ both viewed as univariate polynomials in \axiom{v}.
-     lazyPrem : ($, $) ->  $
-         ++ \axiom{lazyPrem(a,b)} returns the polynomial \axiom{r} reduced w.r.t. \axiom{b} 
-         ++ and such that \axiom{b} divides \axiom{init(b)^e a - r} where \axiom{e} 
-         ++ is the number of steps of this pseudo-division.
-     lazyPquo : ($, $) ->  $
-         ++ \axiom{lazyPquo(a,b)} returns the polynomial \axiom{q} such that 
-         ++ \axiom{lazyPseudoDivide(a,b)} returns \axiom{[c,g,q,r]}.
-     lazyPrem : ($, $, V) -> $
-         ++ \axiom{lazyPrem(a,b,v)} returns the polynomial \axiom{r} 
-         ++ reduced w.r.t. \axiom{b} viewed as univariate polynomials in the variable 
-         ++ \axiom{v} such that \axiom{b} divides \axiom{init(b)^e a - r}
-         ++ where \axiom{e} is the number of steps of this pseudo-division.
-     lazyPquo : ($, $, V) ->  $
-         ++ \axiom{lazyPquo(a,b,v)} returns the polynomial \axiom{q} such that 
-         ++ \axiom{lazyPseudoDivide(a,b,v)} returns \axiom{[c,g,q,r]}.
-     lazyPremWithDefault : ($, $) ->  Record (coef : $, gap : NonNegativeInteger, remainder : $)
-         ++ \axiom{lazyPremWithDefault(a,b)} returns \axiom{[c,g,r]}
-         ++ such that \axiom{r = lazyPrem(a,b)} and \axiom{(c**g)*r = prem(a,b)}.
-     lazyPremWithDefault : ($, $, V) ->  Record (coef : $, gap : NonNegativeInteger, remainder : $)
-         ++ \axiom{lazyPremWithDefault(a,b,v)} returns \axiom{[c,g,r]} 
-         ++ such that \axiom{r = lazyPrem(a,b,v)} and \axiom{(c**g)*r = prem(a,b,v)}.
-     lazyPseudoDivide : ($,$) ->  Record(coef:$, gap: NonNegativeInteger,quotient:$, remainder:$)
-         ++ \axiom{lazyPseudoDivide(a,b)} returns \axiom{[c,g,q,r]} 
-         ++ such that \axiom{[c,g,r] = lazyPremWithDefault(a,b)} and
-         ++ \axiom{q} is the pseudo-quotient computed in this lazy pseudo-division.
-     lazyPseudoDivide : ($,$,V) ->  Record(coef:$, gap:NonNegativeInteger, quotient:$, remainder: $)
-         ++ \axiom{lazyPseudoDivide(a,b,v)} returns \axiom{[c,g,q,r]} such that  
-         ++ \axiom{r = lazyPrem(a,b,v)}, \axiom{(c**g)*r = prem(a,b,v)} and \axiom{q}
-         ++ is the pseudo-quotient computed in this lazy pseudo-division.
-     pseudoDivide : ($, $) -> Record (quotient : $, remainder : $)
-         ++ \axiom{pseudoDivide(a,b)} computes \axiom{[pquo(a,b),prem(a,b)]}, both
-         ++ polynomials viewed as univariate polynomials in the main variable of \axiom{b}, 
-         ++ if \axiom{b} is not a constant polynomial.
-     monicModulo : ($, $) -> $ 
-         ++ \axiom{monicModulo(a,b)} computes \axiom{a mod b}, if \axiom{b} is 
-         ++ monic as univariate polynomial in its main variable.
-     lazyResidueClass : ($,$) -> Record(polnum:$, polden:$, power:NonNegativeInteger)
-         ++ \axiom{lazyResidueClass(a,b)} returns \axiom{[p,q,n]} where \axiom{p / q**n} 
-         ++ represents the residue class of \axiom{a} modulo \axiom{b} 
-         ++ and \axiom{p} is reduced w.r.t. \axiom{b} and \axiom{q} is \axiom{init(b)}.
-     headReduce: ($, $) ->  $
-         ++ \axiom{headReduce(a,b)} returns a polynomial \axiom{r} such that 
-         ++ \axiom{headReduced?(r,b)} holds and there exists an integer \axiom{e}
-         ++ such that \axiom{init(b)^e a - r} is zero modulo \axiom{b}.
-     initiallyReduce: ($, $) ->  $
-         ++ \axiom{initiallyReduce(a,b)} returns a polynomial \axiom{r} such that 
-         ++ \axiom{initiallyReduced?(r,b)} holds and there exists an integer \axiom{e}
-         ++ such that \axiom{init(b)^e a - r} is zero modulo \axiom{b}.
-
-     if (V has ConvertibleTo(Symbol))
-     then 
-       CoercibleTo(Polynomial R)
-       ConvertibleTo(Polynomial R)
-       if R has Algebra Fraction Integer
-         then 
-           retractIfCan : Polynomial Fraction Integer -> Union($,"failed")
-               ++ \axiom{retractIfCan(p)} returns \axiom{p} as an element of the current domain
-               ++ if all its variables belong to \axiom{V}.
-           retract : Polynomial Fraction Integer -> $
-               ++ \axiom{retract(p)} returns \axiom{p} as an element of the current domain
-               ++ if \axiom{retractIfCan(p)} does not return "failed", otherwise an error 
-               ++ is produced.
-           convert : Polynomial Fraction Integer -> $
-               ++ \axiom{convert(p)} returns the same as \axiom{retract(p)}.
-           retractIfCan : Polynomial Integer -> Union($,"failed")
-               ++ \axiom{retractIfCan(p)} returns \axiom{p} as an element of the current domain
-               ++ if all its variables belong to \axiom{V}.
-           retract : Polynomial Integer -> $
-               ++ \axiom{retract(p)} returns \axiom{p} as an element of the current domain
-               ++ if \axiom{retractIfCan(p)} does not return "failed", otherwise an error 
-               ++ is produced.
-           convert : Polynomial Integer -> $
-               ++ \axiom{convert(p)} returns the same as \axiom{retract(p)}
-           if not (R has QuotientFieldCategory(Integer))
-             then
-               retractIfCan : Polynomial R -> Union($,"failed")
-                 ++ \axiom{retractIfCan(p)} returns \axiom{p} as an element of the current domain
-                 ++ if all its variables belong to \axiom{V}.
-               retract : Polynomial R -> $
-                 ++ \axiom{retract(p)} returns \axiom{p} as an element of the current domain
-                 ++ if \axiom{retractIfCan(p)} does not return "failed", otherwise an error 
-                 ++ is produced.
-       if (R has Algebra Integer) and not(R has Algebra Fraction Integer)
-         then 
-           retractIfCan : Polynomial Integer -> Union($,"failed")
-               ++ \axiom{retractIfCan(p)} returns \axiom{p} as an element of the current domain
-               ++ if all its variables belong to \axiom{V}.
-           retract : Polynomial Integer -> $
-               ++ \axiom{retract(p)} returns \axiom{p} as an element of the current domain
-               ++ if \axiom{retractIfCan(p)} does not return "failed", otherwise an error 
-               ++ is produced.
-           convert : Polynomial Integer -> $
-               ++ \axiom{convert(p)} returns the same as \axiom{retract(p)}.
-           if not (R has IntegerNumberSystem)
-             then
-               retractIfCan : Polynomial R -> Union($,"failed")
-                 ++ \axiom{retractIfCan(p)} returns \axiom{p} as an element of the current domain
-                 ++ if all its variables belong to \axiom{V}.
-               retract : Polynomial R -> $
-                 ++ \axiom{retract(p)} returns \axiom{p} as an element of the current domain
-                 ++ if \axiom{retractIfCan(p)} does not return "failed", otherwise an error 
-                 ++ is produced.
-       if not(R has Algebra Integer) and not(R has Algebra Fraction Integer)
-         then 
-           retractIfCan : Polynomial R -> Union($,"failed")
-             ++ \axiom{retractIfCan(p)} returns \axiom{p} as an element of the current domain
-             ++ if all its variables belong to \axiom{V}.
-           retract : Polynomial R -> $
-             ++ \axiom{retract(p)} returns \axiom{p} as an element of the current domain
-             ++ if \axiom{retractIfCan(p)} does not return "failed", otherwise an error 
-             ++ is produced.
-       convert : Polynomial R -> $
-         ++ \axiom{convert(p)} returns \axiom{p} as an element of the current domain if all 
-         ++ its variables belong to \axiom{V}, otherwise an error is produced.
-
-       if R has RetractableTo(Integer)
-       then
-         ConvertibleTo(String)
-
-     if R has IntegralDomain
-     then
-       primPartElseUnitCanonical : $ -> $
-           ++ \axiom{primPartElseUnitCanonical(p)} returns \axiom{primitivePart(p)}
-           ++ if \axiom{R} is a gcd-domain, otherwise \axiom{unitCanonical(p)}.
-       primPartElseUnitCanonical! : $ -> $
-           ++ \axiom{primPartElseUnitCanonical!(p)} replaces  \axiom{p} 
-           ++ by \axiom{primPartElseUnitCanonical(p)}.
-       exactQuotient : ($,R) -> $
-           ++ \axiom{exactQuotient(p,r)} computes the exact quotient of \axiom{p} 
-           ++ by \axiom{r}, which is assumed to be a divisor of \axiom{p}. 
-           ++ No error is returned if this exact quotient fails!
-       exactQuotient! : ($,R) -> $
-           ++ \axiom{exactQuotient!(p,r)} replaces \axiom{p} by \axiom{exactQuotient(p,r)}.
-       exactQuotient : ($,$) -> $
-           ++ \axiom{exactQuotient(a,b)} computes the exact quotient of \axiom{a} 
-           ++ by \axiom{b}, which is assumed to be a divisor of \axiom{a}. 
-           ++ No error is returned if this exact quotient fails!
-       exactQuotient! : ($,$) -> $
-           ++ \axiom{exactQuotient!(a,b)} replaces \axiom{a} by \axiom{exactQuotient(a,b)}
-       subResultantGcd : ($, $) -> $ 
-           ++ \axiom{subResultantGcd(a,b)} computes a gcd of \axiom{a} and \axiom{b} 
-           ++ where \axiom{a} and \axiom{b} are assumed to have the same main variable \axiom{v}
-           ++ and are viewed as univariate polynomials in \axiom{v} with coefficients
-           ++ in the fraction field of the polynomial ring generated by their other variables 
-           ++ over \axiom{R}.
-       extendedSubResultantGcd : ($, $) -> Record (gcd : $, coef1 : $, coef2 : $)
-           ++ \axiom{extendedSubResultantGcd(a,b)} returns \axiom{[ca,cb,r]} 
-           ++ such that \axiom{r} is \axiom{subResultantGcd(a,b)} and we have
-           ++ \axiom{ca * a + cb * cb = r} .
-       halfExtendedSubResultantGcd1: ($, $) -> Record (gcd : $, coef1 : $)
-           ++ \axiom{halfExtendedSubResultantGcd1(a,b)} returns \axiom{[g,ca]}
-           ++ if \axiom{extendedSubResultantGcd(a,b)} returns \axiom{[g,ca,cb]}
-           ++ otherwise produces an error.
-       halfExtendedSubResultantGcd2: ($, $) -> Record (gcd : $, coef2 : $)
-           ++ \axiom{halfExtendedSubResultantGcd2(a,b)} returns \axiom{[g,cb]}
-           ++ if \axiom{extendedSubResultantGcd(a,b)} returns \axiom{[g,ca,cb]}
-           ++ otherwise produces an error.
-       resultant  : ($, $) -> $ 
-           ++ \axiom{resultant(a,b)} computes the resultant of \axiom{a} and \axiom{b} 
-           ++ where \axiom{a} and \axiom{b} are assumed to have the same main variable \axiom{v}
-           ++ and are viewed as univariate polynomials in \axiom{v}.
-       subResultantChain : ($, $) -> List $
-           ++ \axiom{subResultantChain(a,b)}, where \axiom{a} and \axiom{b} are not 
-           ++ contant polynomials with the same
-           ++ main variable, returns the subresultant chain of \axiom{a} and \axiom{b}.
-       lastSubResultant: ($, $) -> $
-           ++ \axiom{lastSubResultant(a,b)} returns the last non-zero subresultant 
-           ++ of \axiom{a} and \axiom{b} where \axiom{a} and \axiom{b} are assumed to have 
-           ++ the same main variable \axiom{v} and are viewed as univariate polynomials in \axiom{v}.
-       LazardQuotient: ($, $, NonNegativeInteger) -> $
-           ++ \axiom{LazardQuotient(a,b,n)} returns \axiom{a**n exquo b**(n-1)}
-           ++ assuming that this quotient does not fail.
-       LazardQuotient2: ($, $, $, NonNegativeInteger) -> $
-           ++ \axiom{LazardQuotient2(p,a,b,n)} returns 
-           ++ \axiom{(a**(n-1) * p) exquo b**(n-1)}
-           ++ assuming that this quotient does not fail.
-       next_subResultant2: ($, $, $, $) -> $
-           ++ \axiom{nextsubResultant2(p,q,z,s)} is the multivariate version
-           ++ of the operation \axiomOpFrom{next_sousResultant2}{PseudoRemainderSequence} from
-           ++ the \axiomType{PseudoRemainderSequence} constructor.
-
-     if R has GcdDomain
-     then
-       gcd : (R,$) -> R
-           ++ \axiom{gcd(r,p)} returns the gcd of \axiom{r} and the content of \axiom{p}.
-       primitivePart! : $ -> $
-           ++ \axiom{primitivePart!(p)} replaces \axiom{p}  by its primitive part.
-       mainContent : $ -> $
-           ++ \axiom{mainContent(p)} returns the content of \axiom{p} viewed as a univariate 
-           ++ polynomial in its main variable and with coefficients in the 
-           ++ polynomial ring generated by its other variables over \axiom{R}.
-       mainPrimitivePart : $ -> $
-           ++ \axiom{mainPrimitivePart(p)} returns the primitive part of \axiom{p} viewed as a
-           ++ univariate polynomial in its main variable and with coefficients 
-           ++ in the polynomial ring generated by its other variables over \axiom{R}.
-       mainSquareFreePart : $ -> $
-           ++ \axiom{mainSquareFreePart(p)} returns the square free part of \axiom{p} viewed as a 
-           ++ univariate polynomial in its main variable and with coefficients 
-           ++ in the polynomial ring generated by its other variables over \axiom{R}.
-
- add
-     O ==> OutputForm
-     NNI ==> NonNegativeInteger
-     INT ==> Integer
-
-     exactQuo : (R,R) -> R
-
-     coerce(p:$):O ==
-       ground? (p) => (ground(p))::O
---       if one?((ip := init(p)))
-       if (((ip := init(p))) = 1)
-         then
-           if zero?((tp := tail(p)))
-             then
---               if one?((dp := mdeg(p)))
-               if (((dp := mdeg(p))) = 1)
-                 then
-                   return((mvar(p))::O)
-                 else
-                   return(((mvar(p))::O **$O (dp::O)))
-             else
---               if one?((dp := mdeg(p)))
-               if (((dp := mdeg(p))) = 1)
-                 then
-                   return((mvar(p))::O +$O (tp::O))
-                 else
-                   return(((mvar(p))::O **$O (dp::O)) +$O (tp::O))
-          else
-           if zero?((tp := tail(p)))
-             then
---               if one?((dp := mdeg(p)))
-               if (((dp := mdeg(p))) = 1)
-                 then
-                   return((ip::O) *$O  (mvar(p))::O)
-                 else
-                   return((ip::O) *$O ((mvar(p))::O **$O (dp::O)))
-             else
---               if one?(mdeg(p))
-               if ((mdeg(p)) = 1)
-                 then
-                   return(((ip::O) *$O  (mvar(p))::O) +$O (tp::O))
-       ((ip)::O *$O ((mvar(p))::O **$O ((mdeg(p)::O))) +$O (tail(p)::O))
-
-     mvar p ==
-       ground?(p) => error"Error in mvar from RPOLCAT : #1 is constant."
-       mainVariable(p)::V
-
-     mdeg p == 
-       ground?(p) => 0$NNI
-       degree(p,mainVariable(p)::V)
-
-     init p ==
-       ground?(p) => error"Error in mvar from RPOLCAT : #1 is constant."
-       v := mainVariable(p)::V
-       coefficient(p,v,degree(p,v))
-
-     leadingCoefficient (p,v) ==
-       zero? (d := degree(p,v)) => p
-       coefficient(p,v,d)
-
-     head p ==
-       ground? p => p
-       v := mainVariable(p)::V
-       d := degree(p,v)
-       monomial(coefficient(p,v,d),v,d)
-
-     reductum(p,v) ==
-       zero? (d := degree(p,v)) => 0$$
-       p - monomial(coefficient(p,v,d),v,d)
-
-     tail p ==
-       ground? p => 0$$
-       p - head(p)
-
-     deepestTail p ==
-       ground? p => 0$$
-       ground? tail(p) => tail(p)
-       mvar(p) > mvar(tail(p)) => tail(p)
-       deepestTail(tail(p))
-
-     iteratedInitials p == 
-       ground? p => []
-       p := init(p)
-       cons(p,iteratedInitials(p))
-
-     localDeepestInitial (p : $) : $ == 
-       ground? p => p
-       localDeepestInitial init p
-
-     deepestInitial p == 
-       ground? p => error"Error in deepestInitial from RPOLCAT : #1 is constant."
-       localDeepestInitial init p
-
-     monic? p ==
-       ground? p => false
-       (recip(init(p))$$ case $)@Boolean
-
-     quasiMonic?  p ==
-       ground? p => false
-       ground?(init(p))
-
-     mainMonomial p == 
-       zero? p => error"Error in mainMonomial from RPOLCAT : #1 is zero"
-       ground? p => 1$$
-       v := mainVariable(p)::V
-       monomial(1$$,v,degree(p,v))
-
-     leastMonomial p == 
-       zero? p => error"Error in leastMonomial from RPOLCAT : #1 is zero"
-       ground? p => 1$$
-       v := mainVariable(p)::V
-       monomial(1$$,v,minimumDegree(p,v))
-
-     mainCoefficients p == 
-       zero? p => error"Error in mainCoefficients from RPOLCAT : #1 is zero"
-       ground? p => [p]
-       v := mainVariable(p)::V
-       coefficients(univariate(p,v)@SparseUnivariatePolynomial($))
-
-     mainMonomials p == 
-       zero? p => error"Error in mainMonomials from RPOLCAT : #1 is zero"
-       ground? p => [1$$]
-       v := mainVariable(p)::V
-       lm := monomials(univariate(p,v)@SparseUnivariatePolynomial($))
-       [monomial(1$$,v,degree(m)) for m in lm]
-
-     RittWuCompare (a,b) ==
-       (ground? b and  ground? a) => "failed"::Union(Boolean,"failed")
-       ground? b => false::Union(Boolean,"failed")
-       ground? a => true::Union(Boolean,"failed")
-       mvar(a) < mvar(b) => true::Union(Boolean,"failed")
-       mvar(a) > mvar(b) => false::Union(Boolean,"failed")
-       mdeg(a) < mdeg(b) => true::Union(Boolean,"failed")
-       mdeg(a) > mdeg(b) => false::Union(Boolean,"failed")
-       lc := RittWuCompare(init(a),init(b))
-       lc case Boolean => lc
-       RittWuCompare(tail(a),tail(b))
-
-     infRittWu? (a,b) ==
-       lc : Union(Boolean,"failed") := RittWuCompare(a,b)
-       lc case Boolean => lc::Boolean
-       false
-       
-     supRittWu? (a,b) ==
-       infRittWu? (b,a)
-
-     prem (a:$, b:$)  : $ == 
-       cP := lazyPremWithDefault (a,b)
-       ((cP.coef) ** (cP.gap)) * cP.remainder
-
-     pquo (a:$, b:$)  : $ == 
-       cPS := lazyPseudoDivide (a,b)
-       c := (cPS.coef) ** (cPS.gap)
-       c * cPS.quotient
-
-     prem (a:$, b:$, v:V) : $ ==
-       cP := lazyPremWithDefault (a,b,v)
-       ((cP.coef) ** (cP.gap)) * cP.remainder  
-
-     pquo (a:$, b:$, v:V)  : $ == 
-       cPS := lazyPseudoDivide (a,b,v)
-       c := (cPS.coef) ** (cPS.gap)
-       c * cPS.quotient     
-
-     lazyPrem (a:$, b:$) : $ ==
-       (not ground?(b)) and (monic?(b)) => monicModulo(a,b)
-       (lazyPremWithDefault (a,b)).remainder
-       
-     lazyPquo (a:$, b:$) : $ ==
-       (lazyPseudoDivide (a,b)).quotient
-
-     lazyPrem (a:$, b:$, v:V) : $ ==
-       zero? b =>  error"Error in lazyPrem : ($,$,V) -> $ from RPOLCAT : #2 is zero"
-       ground?(b) => 0$$
-       (v = mvar(b)) => lazyPrem(a,b)
-       dbv : NNI := degree(b,v)
-       zero? dbv => 0$$
-       dav : NNI  := degree(a,v)
-       zero? dav => a
-       test : INT := dav::INT - dbv 
-       lcbv : $ := leadingCoefficient(b,v)
-       while not zero?(a) and not negative?(test) repeat
-         lcav := leadingCoefficient(a,v)
-         term := monomial(lcav,v,test::NNI)
-         a := lcbv * a - term * b
-         test := degree(a,v)::INT - dbv 
-       a
-         
-     lazyPquo (a:$, b:$, v:V) : $ ==
-       (lazyPseudoDivide (a,b,v)).quotient
-
-     headReduce (a:$,b:$) == 
-       ground? b => error"Error in headReduce : ($,$) -> Boolean from TSETCAT : #2 is constant"
-       ground? a => a
-       mvar(a) = mvar(b) => lazyPrem(a,b)
-       while not reduced?((ha := head a),b) repeat
-         lrc := lazyResidueClass(ha,b)
-         if zero? tail(a)
-           then
-             a := lrc.polnum
-           else
-             a := lrc.polnum +  (lrc.polden)**(lrc.power) * tail(a)
-       a
-
-     initiallyReduce(a:$,b:$) ==
-       ground? b => error"Error in initiallyReduce : ($,$) -> Boolean from TSETCAT : #2 is constant"
-       ground? a => a
-       v := mvar(b)
-       mvar(a) = v => lazyPrem(a,b)
-       ia := a
-       ma := 1$$
-       ta := 0$$
-       while (not ground?(ia)) and (mvar(ia) >= mvar(b)) repeat
-         if (mvar(ia) = mvar(b)) and (mdeg(ia) >= mdeg(b))
-           then
-             iamodb := lazyResidueClass(ia,b)
-             ia := iamodb.polnum
-             if not zero? ta
-               then
-                 ta :=  (iamodb.polden)**(iamodb.power) * ta
-         if zero? ia 
-           then 
-             ia := ta
-             ma := 1$$
-             ta := 0$$
-           else
-             if not ground?(ia)
-               then
-                 ta := tail(ia) * ma + ta
-                 ma := mainMonomial(ia) * ma
-                 ia := init(ia)
-       ia * ma + ta
-
-     lazyPremWithDefault (a,b) == 
-       ground?(b) => error"Error in lazyPremWithDefault from RPOLCAT : #2 is constant"
-       ground?(a) => [1$$,0$NNI,a]
-       xa := mvar a
-       xb := mvar b
-       xa < xb => [1$$,0$NNI,a]
-       lcb : $ := init b 
-       db : NNI := mdeg b
-       test : INT := degree(a,xb)::INT - db
-       delta : INT := max(test + 1$INT, 0$INT) 
-       if xa = xb 
-         then
-           b := tail b
-           while not zero?(a) and not negative?(test) repeat 
-             term := monomial(init(a),xb,test::NNI)
-             a := lcb * tail(a) - term * b 
-             delta := delta - 1$INT 
-             test := degree(a,xb)::INT - db
-         else 
-           while not zero?(a) and not negative?(test) repeat 
-             term := monomial(leadingCoefficient(a,xb),xb,test::NNI)
-             a := lcb * a - term * b
-             delta := delta - 1$INT 
-             test := degree(a,xb)::INT - db
-       [lcb, (delta::NNI), a]
-
-     lazyPremWithDefault (a,b,v) == 
-       zero? b =>  error"Error in lazyPremWithDefault : ($,$,V) -> $ from RPOLCAT : #2 is zero"
-       ground?(b) => [b,1$NNI,0$$]
-       (v = mvar(b)) => lazyPremWithDefault(a,b)
-       dbv : NNI := degree(b,v)
-       zero? dbv => [b,1$NNI,0$$]
-       dav : NNI  := degree(a,v)
-       zero? dav => [1$$,0$NNI,a]
-       test : INT := dav::INT - dbv 
-       delta : INT := max(test + 1$INT, 0$INT) 
-       lcbv : $ := leadingCoefficient(b,v)
-       while not zero?(a) and not negative?(test) repeat
-         lcav := leadingCoefficient(a,v)
-         term := monomial(lcav,v,test::NNI)
-         a := lcbv * a - term * b
-         delta := delta - 1$INT 
-         test := degree(a,v)::INT - dbv 
-       [lcbv, (delta::NNI), a]
-
-     pseudoDivide (a,b) == 
-       cPS := lazyPseudoDivide (a,b)
-       c := (cPS.coef) ** (cPS.gap)
-       [c * cPS.quotient, c * cPS.remainder]
-
-     lazyPseudoDivide (a,b) == 
-       ground?(b) => error"Error in lazyPseudoDivide from RPOLCAT : #2 is constant"
-       ground?(a) => [1$$,0$NNI,0$$,a]
-       xa := mvar a 
-       xb := mvar b
-       xa < xb => [1$$,0$NNI,0$$, a]
-       lcb : $ := init b 
-       db : NNI := mdeg b
-       q := 0$$
-       test : INT := degree(a,xb)::INT - db
-       delta : INT := max(test + 1$INT, 0$INT) 
-       if xa = xb 
-         then
-           b := tail b
-           while not zero?(a) and not negative?(test) repeat 
-             term := monomial(init(a),xb,test::NNI)
-             a := lcb * tail(a) - term * b 
-             q := lcb * q + term
-             delta := delta - 1$INT 
-             test := degree(a,xb)::INT - db
-         else 
-           while not zero?(a) and not negative?(test) repeat 
-             term := monomial(leadingCoefficient(a,xb),xb,test::NNI)
-             a := lcb * a - term * b
-             q := lcb * q + term
-             delta := delta - 1$INT 
-             test := degree(a,xb)::INT - db
-       [lcb, (delta::NNI), q, a]
-
-     lazyPseudoDivide (a,b,v) == 
-       zero? b =>  error"Error in lazyPseudoDivide : ($,$,V) -> $ from RPOLCAT : #2 is zero"
-       ground?(b) => [b,1$NNI,a,0$$]
-       (v = mvar(b)) => lazyPseudoDivide(a,b)
-       dbv : NNI := degree(b,v)
-       zero? dbv => [b,1$NNI,a,0$$]
-       dav : NNI  := degree(a,v)
-       zero? dav => [1$$,0$NNI,0$$, a]
-       test : INT := dav::INT - dbv 
-       delta : INT := max(test + 1$INT, 0$INT) 
-       lcbv : $ := leadingCoefficient(b,v)
-       q := 0$$
-       while not zero?(a) and not negative?(test) repeat
-         lcav := leadingCoefficient(a,v)
-         term := monomial(lcav,v,test::NNI)
-         a := lcbv * a - term * b
-         q := lcbv * q + term
-         delta := delta - 1$INT 
-         test := degree(a,v)::INT - dbv 
-       [lcbv, (delta::NNI), q, a]
-
-     monicModulo (a,b) == 
-       ground?(b) => error"Error in monicModulo from RPOLCAT : #2 is constant"
-       rec : Union($,"failed") 
-       rec := recip((ib := init(b)))$$
-       (rec case "failed")@Boolean => error"Error in monicModulo from RPOLCAT : #2 is not monic"
-       ground? a => a
-       ib * ((lazyPremWithDefault ((rec::$) * a,(rec::$) * b)).remainder)
-
-     lazyResidueClass(a,b) ==
-       zero? b => [a,1$$,0$NNI]
-       ground? b => [0$$,1$$,0$NNI]
-       ground? a => [a,1$$,0$NNI]
-       xa := mvar a
-       xb := mvar b
-       xa < xb => [a,1$$,0$NNI]
-       monic?(b) => [monicModulo(a,b),1$$,0$NNI]
-       lcb : $ := init b 
-       db : NNI := mdeg b
-       test : INT := degree(a,xb)::INT - db
-       pow : NNI := 0
-       if xa = xb 
-         then
-           b := tail b
-           while not zero?(a) and not negative?(test) repeat 
-             term := monomial(init(a),xb,test::NNI)
-             a := lcb * tail(a) - term * b 
-             pow := pow + 1$NNI
-             test := degree(a,xb)::INT - db
-         else 
-           while not zero?(a) and not negative?(test) repeat 
-             term := monomial(leadingCoefficient(a,xb),xb,test::NNI)
-             a := lcb * a - term * b
-             pow := pow + 1$NNI
-             test := degree(a,xb)::INT - db
-       [a,lcb,pow]
-
-     reduced? (a:$,b:$) : Boolean ==
-       degree(a,mvar(b)) < mdeg(b)
-
-     reduced? (p:$, lq : List($)) : Boolean ==
-       ground? p => true
-       while (not empty? lq) and (reduced?(p, first lq)) repeat
-         lq := rest lq
-       empty? lq
-
-     headReduced? (a:$,b:$) : Boolean ==
-       reduced?(head(a),b)
-
-     headReduced? (p:$, lq : List($)) : Boolean ==
-       reduced?(head(p),lq)
-
-     initiallyReduced? (a:$,b:$) : Boolean ==
-       ground? b => error"Error in initiallyReduced? : ($,$) -> Bool. from RPOLCAT : #2 is constant"
-       ground?(a) => true
-       mvar(a) < mvar(b) => true
-       (mvar(a) = mvar(b)) => reduced?(a,b)
-       initiallyReduced?(init(a),b)
-
-     initiallyReduced? (p:$, lq : List($)) : Boolean ==
-       ground? p => true
-       while (not empty? lq) and (initiallyReduced?(p, first lq)) repeat
-         lq := rest lq
-       empty? lq
-
-     normalized?(a:$,b:$) : Boolean ==
-       ground? b => error"Error in  normalized? : ($,$) -> Boolean from TSETCAT : #2 is constant"
-       ground? a => true
-       mvar(a) < mvar(b) => true
-       (mvar(a) = mvar(b)) => false
-       normalized?(init(a),b)
-
-     normalized? (p:$, lq : List($)) : Boolean ==
-       while (not empty? lq) and (normalized?(p, first lq)) repeat
-         lq := rest lq
-       empty? lq       
-
-     if R has IntegralDomain
-     then
-
-       if R has EuclideanDomain
-         then
-           exactQuo(r:R,s:R):R ==
-             r quo$R s
-         else
-           exactQuo(r:R,s:R):R ==
-             (r exquo$R s)::R
-
-       exactQuotient (p:$,r:R) ==
-         (p exquo$$ r)::$
-
-       exactQuotient (a:$,b:$) ==
-         ground? b => exactQuotient(a,ground(b))
-         (a exquo$$ b)::$
-
-       exactQuotient! (a:$,b:$) ==
-         ground? b => exactQuotient!(a,ground(b))
-         a := (a exquo$$ b)::$
-
-       if (R has GcdDomain) and not(R has Field)
-       then
-
-         primPartElseUnitCanonical p ==
-           primitivePart p
-
-         primitivePart! p ==
-           zero? p => p
---           if one?(cp := content(p))
-           if ((cp := content(p)) = 1)
-             then
-               p := unitCanonical p
-             else
-               p := unitCanonical exactQuotient!(p,cp) 
-           p
-
-         primPartElseUnitCanonical! p ==
-           primitivePart! p
-
-       else
-         primPartElseUnitCanonical p ==
-           unitCanonical p
-
-         primPartElseUnitCanonical! p ==
-           p := unitCanonical p
-
-
-     if R has GcdDomain
-     then
-
-       gcd(r:R,p:$):R ==
---         one? r => r
-         (r = 1) => r
-         zero? p => r
-         ground? p => gcd(r,ground(p))$R
-         gcd(gcd(r,init(p)),tail(p))
-
-       mainContent p ==
-         zero? p => p
-         "gcd"/mainCoefficients(p)
-
-       mainPrimitivePart p ==
-         zero? p => p
-         (unitNormal((p exquo$$ mainContent(p))::$)).canonical
-
-       mainSquareFreePart p ==
-         ground? p => p
-         v := mainVariable(p)::V
-         sfp : SparseUnivariatePolynomial($)
-         sfp := squareFreePart(univariate(p,v)@SparseUnivariatePolynomial($))
-         multivariate(sfp,v)
-
-     if (V has ConvertibleTo(Symbol))
-       then
-
-         PR ==> Polynomial R
-         PQ ==> Polynomial Fraction Integer
-         PZ ==> Polynomial Integer
-         IES ==> IndexedExponents(Symbol)
-         Q ==> Fraction Integer
-         Z ==> Integer
-
-         convert(p:$) : PR ==
-           ground? p => (ground(p)$$)::PR
-           v : V := mvar(p)
-           d : NNI := mdeg(p)
-           convert(init(p))@PR *$PR ((convert(v)@Symbol)::PR)**d +$PR convert(tail(p))@PR
-
-         coerce(p:$) : PR ==
-           convert(p)@PR
-
-         localRetract : PR -> $
-         localRetractPQ : PQ -> $
-         localRetractPZ : PZ -> $
-         localRetractIfCan : PR -> Union($,"failed")
-         localRetractIfCanPQ : PQ -> Union($,"failed")
-         localRetractIfCanPZ : PZ -> Union($,"failed")
-
-         if V has Finite
-           then 
-
-             sizeV : NNI := size()$V
-             lv : List Symbol
-             lv := [convert(index(i::PositiveInteger)$V)@Symbol for i in 1..sizeV]
-
-             localRetract(p : PR) : $ ==
-               ground? p => (ground(p)$PR)::$
-               mvp : Symbol := (mainVariable(p)$PR)::Symbol
-               d : NNI
-               imvp : PositiveInteger := (position(mvp,lv)$(List Symbol))::PositiveInteger 
-               vimvp : V := index(imvp)$V
-               xvimvp,c : $ 
-               newp := 0$$
-               while (not zero? (d := degree(p,mvp))) repeat
-                 c := localRetract(coefficient(p,mvp,d)$PR)
-                 xvimvp := monomial(c,vimvp,d)$$
-                 newp := newp +$$ xvimvp
-                 p := p -$PR monomial(coefficient(p,mvp,d)$PR,mvp,d)$PR
-               newp +$$ localRetract(p)
-
-             if R has Algebra Fraction Integer
-               then 
-                 localRetractPQ(pq:PQ):$ ==
-                   ground? pq => ((ground(pq)$PQ)::R)::$
-                   mvp : Symbol := (mainVariable(pq)$PQ)::Symbol
-                   d : NNI
-                   imvp : PositiveInteger := (position(mvp,lv)$(List Symbol))::PositiveInteger 
-                   vimvp : V := index(imvp)$V
-                   xvimvp,c : $ 
-                   newp := 0$$
-                   while (not zero? (d := degree(pq,mvp))) repeat
-                     c := localRetractPQ(coefficient(pq,mvp,d)$PQ)
-                     xvimvp := monomial(c,vimvp,d)$$
-                     newp := newp +$$ xvimvp
-                     pq := pq -$PQ monomial(coefficient(pq,mvp,d)$PQ,mvp,d)$PQ
-                   newp +$$ localRetractPQ(pq)
-
-             if R has Algebra Integer
-               then 
-                 localRetractPZ(pz:PZ):$ ==
-                   ground? pz => ((ground(pz)$PZ)::R)::$
-                   mvp : Symbol := (mainVariable(pz)$PZ)::Symbol
-                   d : NNI
-                   imvp : PositiveInteger := (position(mvp,lv)$(List Symbol))::PositiveInteger 
-                   vimvp : V := index(imvp)$V
-                   xvimvp,c : $ 
-                   newp := 0$$
-                   while (not zero? (d := degree(pz,mvp))) repeat
-                     c := localRetractPZ(coefficient(pz,mvp,d)$PZ)
-                     xvimvp := monomial(c,vimvp,d)$$
-                     newp := newp +$$ xvimvp
-                     pz := pz -$PZ monomial(coefficient(pz,mvp,d)$PZ,mvp,d)$PZ
-                   newp +$$ localRetractPZ(pz)
-
-             retractable?(p:PR):Boolean ==
-               lvp := variables(p)$PR
-               while not empty? lvp and member?(first lvp,lv) repeat
-                 lvp := rest lvp
-               empty? lvp   
-                     
-             retractablePQ?(p:PQ):Boolean ==
-               lvp := variables(p)$PQ
-               while not empty? lvp and member?(first lvp,lv) repeat
-                 lvp := rest lvp
-               empty? lvp       
-                 
-             retractablePZ?(p:PZ):Boolean ==
-               lvp := variables(p)$PZ
-               while not empty? lvp and member?(first lvp,lv) repeat
-                 lvp := rest lvp
-               empty? lvp                        
-
-             localRetractIfCan(p : PR): Union($,"failed") ==
-               not retractable?(p) => "failed"::Union($,"failed")
-               localRetract(p)::Union($,"failed")
-
-             localRetractIfCanPQ(p : PQ): Union($,"failed") ==
-               not retractablePQ?(p) => "failed"::Union($,"failed")
-               localRetractPQ(p)::Union($,"failed")
-
-             localRetractIfCanPZ(p : PZ): Union($,"failed") ==
-               not retractablePZ?(p) => "failed"::Union($,"failed")
-               localRetractPZ(p)::Union($,"failed")
-
-         if R has Algebra Fraction Integer
-           then 
-
-             mpc2Z := MPolyCatFunctions2(Symbol,IES,IES,Z,R,PZ,PR)
-             mpc2Q := MPolyCatFunctions2(Symbol,IES,IES,Q,R,PQ,PR)
-             ZToR (z:Z):R == coerce(z)@R
-             QToR (q:Q):R == coerce(q)@R
-             PZToPR (pz:PZ):PR == map(ZToR,pz)$mpc2Z
-             PQToPR (pq:PQ):PR == map(QToR,pq)$mpc2Q
-
-             retract(pz:PZ) ==
-               rif : Union($,"failed") := retractIfCan(pz)@Union($,"failed")
-               (rif case "failed") => error"failed in retract: POLY Z -> $ from RPOLCAT"
-               rif::$
-
-             convert(pz:PZ) ==
-               retract(pz)@$
-
-             retract(pq:PQ) ==
-               rif : Union($,"failed") := retractIfCan(pq)@Union($,"failed")
-               (rif case "failed") => error"failed in retract: POLY Z -> $ from RPOLCAT"
-               rif::$
-
-             convert(pq:PQ) ==
-               retract(pq)@$
-
-             if not (R has QuotientFieldCategory(Integer))
-               then
-                 -- the only operation to implement is retractIfCan : PR -> Union($,"failed")
-                 -- when V does not have Finite
-
-                 if V has Finite
-                   then
-                     retractIfCan(pr:PR) ==
-                       localRetractIfCan(pr)@Union($,"failed")
-
-                     retractIfCan(pq:PQ) ==
-                       localRetractIfCanPQ(pq)@Union($,"failed")
-                   else
-                     retractIfCan(pq:PQ) ==
-                       pr : PR := PQToPR(pq)
-                       retractIfCan(pr)@Union($,"failed")
-
-                 retractIfCan(pz:PZ) ==
-                   pr : PR := PZToPR(pz)
-                   retractIfCan(pr)@Union($,"failed")
-
-                 retract(pr:PR) ==
-                   rif : Union($,"failed") := retractIfCan(pr)@Union($,"failed")
-                   (rif case "failed") => error"failed in retract: POLY Z -> $ from RPOLCAT"
-                   rif::$
-
-                 convert(pr:PR) ==
-                   retract(pr)@$
-
-               else
-                 -- the only operation to implement is retractIfCan : PQ -> Union($,"failed")
-                 -- when V does not have Finite
-                 mpc2ZQ := MPolyCatFunctions2(Symbol,IES,IES,Z,Q,PZ,PQ)
-                 mpc2RQ := MPolyCatFunctions2(Symbol,IES,IES,R,Q,PR,PQ)
-                 ZToQ(z:Z):Q == coerce(z)@Q
-                 RToQ(r:R):Q == retract(r)@Q
-
-                 PZToPQ (pz:PZ):PQ == map(ZToQ,pz)$mpc2ZQ
-                 PRToPQ (pr:PR):PQ == map(RToQ,pr)$mpc2RQ
-
-                 retractIfCan(pz:PZ) ==
-                   pq : PQ := PZToPQ(pz)
-                   retractIfCan(pq)@Union($,"failed")
-
-                 if V has Finite
-                   then
-                     retractIfCan(pq:PQ) ==
-                       localRetractIfCanPQ(pq)@Union($,"failed")
-
-                     convert(pr:PR) ==
-                       lrif : Union($,"failed") := localRetractIfCan(pr)@Union($,"failed")
-                       (lrif case "failed") => error"failed in convert: PR->$ from RPOLCAT"
-                       lrif::$
-                   else
-                     convert(pr:PR) ==
-                       pq : PQ := PRToPQ(pr)
-                       retract(pq)@$
-
-         if (R has Algebra Integer) and not(R has Algebra Fraction Integer)
-           then 
-
-             mpc2Z := MPolyCatFunctions2(Symbol,IES,IES,Z,R,PZ,PR)
-             ZToR (z:Z):R == coerce(z)@R
-             PZToPR (pz:PZ):PR == map(ZToR,pz)$mpc2Z
-
-             retract(pz:PZ) ==
-               rif : Union($,"failed") := retractIfCan(pz)@Union($,"failed")
-               (rif case "failed") => error"failed in retract: POLY Z -> $ from RPOLCAT"
-               rif::$
-
-             convert(pz:PZ) ==
-               retract(pz)@$
-
-             if not (R has IntegerNumberSystem)
-               then
-                 -- the only operation to implement is retractIfCan : PR -> Union($,"failed")
-                 -- when V does not have Finite
-
-                 if V has Finite
-                   then
-                     retractIfCan(pr:PR) ==
-                       localRetractIfCan(pr)@Union($,"failed")
-
-                     retractIfCan(pz:PZ) ==
-                       localRetractIfCanPZ(pz)@Union($,"failed")
-                   else
-                     retractIfCan(pz:PZ) ==
-                       pr : PR := PZToPR(pz)
-                       retractIfCan(pr)@Union($,"failed")
-
-                 retract(pr:PR) ==
-                   rif : Union($,"failed") := retractIfCan(pr)@Union($,"failed")
-                   (rif case "failed") => error"failed in retract: POLY Z -> $ from RPOLCAT"
-                   rif::$
-
-                 convert(pr:PR) ==
-                   retract(pr)@$
-
-               else
-                 -- the only operation to implement is retractIfCan : PZ -> Union($,"failed")
-                 -- when V does not have Finite
-
-                 mpc2RZ := MPolyCatFunctions2(Symbol,IES,IES,R,Z,PR,PZ)
-                 RToZ(r:R):Z == retract(r)@Z
-                 PRToPZ (pr:PR):PZ == map(RToZ,pr)$mpc2RZ
-
-                 if V has Finite
-                   then
-                     convert(pr:PR) ==
-                       lrif : Union($,"failed") := localRetractIfCan(pr)@Union($,"failed")
-                       (lrif case "failed") => error"failed in convert: PR->$ from RPOLCAT"
-                       lrif::$
-                     retractIfCan(pz:PZ) ==
-                       localRetractIfCanPZ(pz)@Union($,"failed")
-                   else
-                     convert(pr:PR) ==
-                       pz : PZ := PRToPZ(pr)
-                       retract(pz)@$
-
-
-         if not(R has Algebra Integer) and not(R has Algebra Fraction Integer)
-           then 
-             -- the only operation to implement is retractIfCan : PR -> Union($,"failed")
-
-             if V has Finite
-               then
-                 retractIfCan(pr:PR) ==
-                   localRetractIfCan(pr)@Union($,"failed")
-
-             retract(pr:PR) ==
-               rif : Union($,"failed") := retractIfCan(pr)@Union($,"failed")
-               (rif case "failed") => error"failed in retract: POLY Z -> $ from RPOLCAT"
-               rif::$
-
-             convert(pr:PR) ==
-               retract(pr)@$
-
-         if (R has RetractableTo(INT))
-           then
-
-             convert(pol:$):String ==
-               ground?(pol) => convert(retract(ground(pol))@INT)@String
-               ipol : $ := init(pol)
-               vpol : V := mvar(pol)
-               dpol : NNI := mdeg(pol)
-               tpol: $  := tail(pol)
-               sipol,svpol,sdpol,stpol : String
---               if one? ipol
-               if (ipol = 1)
-                 then 
-                   sipol := empty()$String
-                 else
---                   if one?(-ipol)
-                   if ((-ipol) = 1)
-                     then 
-                       sipol := "-"
-                     else
-                       sipol := convert(ipol)@String
-                       if not monomial?(ipol)
-                         then
-                           sipol := concat(["(",sipol,")*"])$String
-                         else 
-                           sipol := concat(sipol,"*")$String
-               svpol := string(convert(vpol)@Symbol)
---               if one? dpol
-               if (dpol = 1)
-                 then
-                   sdpol :=  empty()$String
-                 else
-                   sdpol := concat("**",convert(convert(dpol)@INT)@String )$String 
-               if zero? tpol
-                 then
-                   stpol :=  empty()$String
-                 else
-                   if ground?(tpol)
-                     then
-                       n := retract(ground(tpol))@INT
-                       if n > 0
-                         then
-                           stpol :=  concat(" +",convert(n)@String)$String
-                         else
-                           stpol := convert(n)@String
-                     else
-                       stpol := convert(tpol)@String
-                       if not member?((stpol.1)::String,["+","-"])$(List String)
-                         then
-                           stpol :=  concat(" + ",stpol)$String
-               concat([sipol,svpol,sdpol,stpol])$String
-
-@
 Based on the {\bf PseudoRemainderSequence} package, the domain
 constructor {\bf NewSparseMulitvariatePolynomial} extends
 the constructor {\bf SparseMultivariatePolynomial}. It also provides
@@ -1878,7 +740,6 @@ NewSparseMultivariatePolynomial(R,VarSet) : Exports == Implementation where
 
 <<domain NSUP NewSparseUnivariatePolynomial>>
 <<package NSUP2 NewSparseUnivariatePolynomialFunctions2>>
-<<category RPOLCAT RecursivePolynomialCategory>>
 <<domain NSMP NewSparseMultivariatePolynomial>>
 @
 \eject
diff --git a/src/algebra/oct.spad.pamphlet b/src/algebra/oct.spad.pamphlet
index c5b85b6..2256066 100644
--- a/src/algebra/oct.spad.pamphlet
+++ b/src/algebra/oct.spad.pamphlet
@@ -10,263 +10,6 @@
 \eject
 \tableofcontents
 \eject
-\section{category OC OctonionCategory}
-<<category OC OctonionCategory>>=
-)abbrev category OC OctonionCategory
-++ Author: R. Wisbauer, J. Grabmeier
-++ Date Created: 05 September 1990
-++ Date Last Updated: 19 September 1990
-++ Basic Operations: _+, _*, octon, real, imagi, imagj, imagk,
-++  imagE, imagI, imagJ, imagK
-++ Related Constructors: QuaternionCategory
-++ Also See: 
-++ AMS Classifications:
-++ Keywords: octonion, non-associative algebra, Cayley-Dixon  
-++ References: e.g. I.L Kantor, A.S. Solodovnikov:
-++  Hypercomplex Numbers, Springer Verlag Heidelberg, 1989,
-++  ISBN 0-387-96980-2
-++ Description:
-++  OctonionCategory gives the categorial frame for the 
-++  octonions, and eight-dimensional non-associative algebra, 
-++  doubling the the quaternions in the same way as doubling
-++  the Complex numbers to get the quaternions.
--- Examples: octonion.input
- 
-OctonionCategory(R: CommutativeRing): Category ==
-  -- we are cheating a little bit, algebras in \Language{}
-  -- are mainly considered to be associative, but that's not 
-  -- an attribute and we can't guarantee that there is no piece
-  -- of code which implicitly
-  -- uses this. In a later version we shall properly combine
-  -- all this code in the context of general, non-associative
-  -- algebras, which are meanwhile implemented in \Language{}
-  Join(Algebra R, FullyRetractableTo R, FullyEvalableOver R) with
-     conjugate: % -> % 
-       ++ conjugate(o) negates the imaginary parts i,j,k,E,I,J,K of octonian o.
-     real:    % -> R 
-       ++ real(o) extracts real part of octonion o.
-     imagi:   % -> R      
-       ++ imagi(o) extracts the i part of octonion o.
-     imagj:   % -> R                
-       ++ imagj(o) extracts the j part of octonion o.
-     imagk:   % -> R 
-       ++ imagk(o) extracts the k part of octonion o.
-     imagE:   % -> R 
-       ++ imagE(o) extracts the imaginary E part of octonion o.
-     imagI:   % -> R              
-       ++ imagI(o) extracts the imaginary I part of octonion o.
-     imagJ:   % -> R      
-       ++ imagJ(o) extracts the imaginary J part of octonion o.
-     imagK:   % -> R
-       ++ imagK(o) extracts the imaginary K part of octonion o.
-     norm:    % -> R 
-       ++ norm(o) returns the norm of an octonion, equal to
-       ++ the sum of the squares
-       ++ of its coefficients.
-     octon: (R,R,R,R,R,R,R,R) -> %   
-       ++ octon(re,ri,rj,rk,rE,rI,rJ,rK) constructs an octonion 
-       ++ from scalars. 
-     if R has Finite then Finite
-     if R has OrderedSet then OrderedSet
-     if R has ConvertibleTo InputForm then ConvertibleTo InputForm
-     if R has CharacteristicZero then CharacteristicZero
-     if R has CharacteristicNonZero then CharacteristicNonZero
-     if R has RealNumberSystem then
-       abs:   % -> R 
-         ++ abs(o) computes the absolute value of an octonion, equal to 
-         ++ the square root of the \spadfunFrom{norm}{Octonion}.
-     if R has IntegerNumberSystem then
-       rational?    : % -> Boolean
-         ++ rational?(o) tests if o is rational, i.e. that all seven
-         ++ imaginary parts are 0.
-       rational     : % -> Fraction Integer
-         ++ rational(o) returns the real part if all seven 
-         ++ imaginary parts are 0.
-         ++ Error: if o is not rational.
-       rationalIfCan: % -> Union(Fraction Integer, "failed")
-         ++ rationalIfCan(o) returns the real part if
-         ++ all seven imaginary parts are 0, and "failed" otherwise.
-     if R has Field then
-       inv : % -> % 
-         ++ inv(o) returns the inverse of o if it exists.
- add
-     characteristic() == 
-       characteristic()$R
-     conjugate x ==
-       octon(real x, - imagi x, - imagj x, - imagk x, - imagE x,_
-       - imagI x, - imagJ x, - imagK x)
-     map(fn, x)       ==
-       octon(fn real x,fn imagi x,fn imagj x,fn imagk x, fn imagE x,_
-       fn imagI x, fn imagJ x,fn imagK x)
-     norm x ==
-       real x * real x + imagi x * imagi x + _
-       imagj x * imagj x + imagk x * imagk x + _
-       imagE x * imagE x + imagI x * imagI x + _
-       imagJ x * imagJ x + imagK x * imagK x
-     x = y            ==
-       (real x = real y) and (imagi x = imagi y) and _
-       (imagj x = imagj y) and (imagk x = imagk y) and _
-       (imagE x = imagE y) and (imagI x = imagI y) and _
-       (imagJ x = imagJ y) and (imagK x = imagK y)
-     x + y            ==
-       octon(real x + real y, imagi x + imagi y,_
-       imagj x + imagj y, imagk x + imagk y,_
-       imagE x + imagE y, imagI x + imagI y,_
-       imagJ x + imagJ y, imagK x + imagK y)
-     - x              ==
-       octon(- real x, - imagi x, - imagj x, - imagk x,_
-       - imagE x, - imagI x, - imagJ x, - imagK x)
-     r:R * x:%        ==
-       octon(r * real x, r * imagi x, r * imagj x, r * imagk x,_
-       r * imagE x, r * imagI x, r * imagJ x, r * imagK x)
-     n:Integer * x:%  ==
-       octon(n * real x, n * imagi x, n * imagj x, n * imagk x,_
-       n * imagE x, n * imagI x, n * imagJ x, n * imagK x)
-     coerce(r:R)      ==
-       octon(r,0$R,0$R,0$R,0$R,0$R,0$R,0$R)
-     coerce(n:Integer)      ==
-       octon(n :: R,0$R,0$R,0$R,0$R,0$R,0$R,0$R)
-     zero? x ==
-       zero? real x and zero? imagi x and _
-       zero? imagj x and zero? imagk x and _
-       zero? imagE x and zero? imagI x and _
-       zero? imagJ x and zero? imagK x
-     retract(x):R ==
-       not (zero? imagi x and zero? imagj x and zero? imagk x and _
-       zero? imagE x and zero? imagI x and zero? imagJ x and zero? imagK x)=>
-         error "Cannot retract octonion."
-       real x
-     retractIfCan(x):Union(R,"failed") ==
-       not (zero? imagi x and zero? imagj x and zero? imagk x and _
-       zero? imagE x and zero? imagI x and zero? imagJ x and zero? imagK x)=>
-         "failed"
-       real x
- 
-     coerce(x:%):OutputForm ==
-         part,z : OutputForm
-         y : %
-         zero? x => (0$R) :: OutputForm
-         not zero?(real x) =>
-           y := octon(0$R,imagi(x),imagj(x),imagk(x),imagE(x),
-             imagI(x),imagJ(x),imagK(x))
-           zero? y => real(x) :: OutputForm
-           (real(x) :: OutputForm) + (y :: OutputForm)
-         -- we know that the real part is 0
-         not zero?(imagi(x)) =>
-           y := octon(0$R,0$R,imagj(x),imagk(x),imagE(x),
-             imagI(x),imagJ(x),imagK(x))
-           z :=
-             part := "i"::Symbol::OutputForm
---             one? imagi(x) => part
-             (imagi(x) = 1) => part
-             (imagi(x) :: OutputForm) * part
-           zero? y => z
-           z + (y :: OutputForm)
-         -- we know that the real part and i part are 0
-         not zero?(imagj(x)) =>
-           y := octon(0$R,0$R,0$R,imagk(x),imagE(x),
-             imagI(x),imagJ(x),imagK(x))
-           z :=
-             part := "j"::Symbol::OutputForm
---             one? imagj(x) => part
-             (imagj(x) = 1) => part
-             (imagj(x) :: OutputForm) * part
-           zero? y => z
-           z + (y :: OutputForm)
-         -- we know that the real part and i and j parts are 0
-         not zero?(imagk(x)) =>
-           y := octon(0$R,0$R,0$R,0$R,imagE(x),
-             imagI(x),imagJ(x),imagK(x))
-           z :=
-             part := "k"::Symbol::OutputForm
---             one? imagk(x) => part
-             (imagk(x) = 1) => part
-             (imagk(x) :: OutputForm) * part
-           zero? y => z
-           z + (y :: OutputForm)
-         -- we know that the real part,i,j,k parts are 0
-         not zero?(imagE(x)) =>
-           y := octon(0$R,0$R,0$R,0$R,0$R,
-             imagI(x),imagJ(x),imagK(x))
-           z :=
-             part := "E"::Symbol::OutputForm
---             one? imagE(x) => part
-             (imagE(x) = 1) => part
-             (imagE(x) :: OutputForm) * part
-           zero? y => z
-           z + (y :: OutputForm)
-         -- we know that the real part,i,j,k,E parts are 0
-         not zero?(imagI(x)) =>
-           y := octon(0$R,0$R,0$R,0$R,0$R,0$R,imagJ(x),imagK(x))
-           z :=
-             part := "I"::Symbol::OutputForm
---             one? imagI(x) => part
-             (imagI(x) = 1) => part
-             (imagI(x) :: OutputForm) * part
-           zero? y => z
-           z + (y :: OutputForm)
-         -- we know that the real part,i,j,k,E,I parts are 0
-         not zero?(imagJ(x)) =>
-           y := octon(0$R,0$R,0$R,0$R,0$R,0$R,0$R,imagK(x))
-           z :=
-             part := "J"::Symbol::OutputForm
---             one? imagJ(x) => part
-             (imagJ(x) = 1) => part
-             (imagJ(x) :: OutputForm) * part
-           zero? y => z
-           z + (y :: OutputForm)
-         -- we know that the real part,i,j,k,E,I,J parts are 0
-         part := "K"::Symbol::OutputForm
---         one? imagK(x) => part
-         (imagK(x) = 1) => part
-         (imagK(x) :: OutputForm) * part
- 
-     if R has Field then
-       inv x ==
-         (norm x) = 0 => error "This octonion is not invertible."
-         (inv norm x) * conjugate x
-     if R has ConvertibleTo InputForm then
-       convert(x:%):InputForm ==
-         l : List InputForm := [convert("octon" :: Symbol),
-           convert(real x)$R, convert(imagi x)$R, convert(imagj x)$R,_
-             convert(imagk x)$R, convert(imagE x)$R,_
-             convert(imagI x)$R, convert(imagJ x)$R,_
-             convert(imagK x)$R]
-         convert(l)$InputForm
-     if R has OrderedSet then
-       x < y ==
-         real x = real y =>
-          imagi x = imagi y =>
-           imagj x = imagj y =>
-            imagk x = imagk y =>
-             imagE x = imagE y =>
-              imagI x = imagI y =>
-               imagJ x = imagJ y =>
-                imagK x < imagK y
-               imagJ x < imagJ y
-              imagI x < imagI y
-             imagE x < imagE y
-            imagk x < imagk y 
-           imagj x < imagj y 
-          imagi x < imagi y 
-         real x < real y
- 
-     if R has RealNumberSystem then
-       abs x == sqrt norm x
- 
-     if R has IntegerNumberSystem then
-       rational? x ==
-         (zero? imagi x) and (zero? imagj x) and (zero? imagk x) and _ 
-         (zero? imagE x) and (zero? imagI x) and (zero? imagJ x) and _
-         (zero? imagK x)
-       rational  x ==
-         rational? x => rational real x
-         error "Not a rational number"
-       rationalIfCan x ==
-         rational? x => rational real x
-         "failed"
-
-@
 \section{domain OCT Octonion}
 The octonions have the following multiplication table:
 $$
@@ -711,7 +454,6 @@ OctonionCategoryFunctions2(OR,R,OS,S) : Exports ==
 <<*>>=
 <<license>>
 
-<<category OC OctonionCategory>>
 <<domain OCT Octonion>>
 <<package OCTCT2 OctonionCategoryFunctions2>>
 @
diff --git a/src/algebra/padic.spad.pamphlet b/src/algebra/padic.spad.pamphlet
index a75faa7..666ae07 100644
--- a/src/algebra/padic.spad.pamphlet
+++ b/src/algebra/padic.spad.pamphlet
@@ -9,56 +9,6 @@
 \eject
 \tableofcontents
 \eject
-\section{category PADICCT PAdicIntegerCategory}
-<<category PADICCT PAdicIntegerCategory>>=
-)abbrev category PADICCT PAdicIntegerCategory
-++ Author: Clifton J. Williamson
-++ Date Created: 15 May 1990
-++ Date Last Updated: 15 May 1990
-++ Basic Operations:
-++ Related Domains:
-++ Also See:
-++ AMS Classifications:
-++ Keywords: p-adic, completion
-++ Examples:
-++ References:
-++ Description: This is the catefory of stream-based representations of
-++   the p-adic integers.
-PAdicIntegerCategory(p): Category == Definition where
-  p   :   Integer
-  I   ==> Integer
-  NNI ==> NonNegativeInteger
-  ST  ==> Stream
-  SUP ==> SparseUnivariatePolynomial
-
-  Definition ==> Join(EuclideanDomain,CharacteristicZero) with
-    digits: % -> ST I
-      ++ \spad{digits(x)} returns a stream of p-adic digits of x.
-    order: % -> NNI
-      ++ \spad{order(x)} returns the exponent of the highest power of p
-      ++ dividing x.
-    extend: (%,I) -> %
-      ++ \spad{extend(x,n)} forces the computation of digits up to order n.
-    complete: % -> %
-      ++ \spad{complete(x)} forces the computation of all digits.
-    modulus: () -> I
-      ++ \spad{modulus()} returns the value of p.
-    moduloP: % -> I
-      ++ \spad{modulo(x)} returns a, where \spad{x = a + b p}.
-    quotientByP: % -> %
-      ++ \spad{quotientByP(x)} returns b, where \spad{x = a + b p}.
-    approximate: (%,I) -> I
-      ++ \spad{approximate(x,n)} returns an integer y such that
-      ++ \spad{y = x (mod p^n)}
-      ++ when n is positive, and 0 otherwise.
-    sqrt: (%,I) -> %
-      ++ \spad{sqrt(b,a)} returns a square root of b.
-      ++ Argument \spad{a} is a square root of b \spad{(mod p)}.
-    root: (SUP I,I) -> %
-      ++ \spad{root(f,a)} returns a root of the polynomial \spad{f}.
-      ++ Argument \spad{a} must be a root of \spad{f} \spad{(mod p)}.
-
-@
 \section{domain IPADIC InnerPAdicInteger}
 <<domain IPADIC InnerPAdicInteger>>=
 )abbrev domain IPADIC InnerPAdicInteger
@@ -609,7 +559,6 @@ BalancedPAdicRational(p:Integer) ==
 <<*>>=
 <<license>>
 
-<<category PADICCT PAdicIntegerCategory>>
 <<domain IPADIC InnerPAdicInteger>>
 <<domain PADIC PAdicInteger>>
 <<domain BPADIC BalancedPAdicInteger>>
diff --git a/src/algebra/triset.spad.pamphlet b/src/algebra/triset.spad.pamphlet
index 7d51c02..83ddc04 100644
--- a/src/algebra/triset.spad.pamphlet
+++ b/src/algebra/triset.spad.pamphlet
@@ -9,514 +9,6 @@
 \eject
 \tableofcontents
 \eject
-\section{category TSETCAT TriangularSetCategory}
-<<category TSETCAT TriangularSetCategory>>=
-)abbrev category TSETCAT TriangularSetCategory
-++ Author: Marc Moreno Maza (marc@nag.co.uk)
-++ Date Created: 04/26/1994
-++ Date Last Updated: 12/15/1998
-++ Basic Functions:
-++ Related Constructors:
-++ Also See: 
-++ AMS Classifications:
-++ Keywords: polynomial, multivariate, ordered variables set
-++ Description:
-++ The category of triangular sets of multivariate polynomials
-++ with coefficients in an integral domain.
-++ Let \axiom{R} be an integral domain and \axiom{V} a finite ordered set of 
-++ variables, say \axiom{X1 < X2 < ... < Xn}.  
-++ A set \axiom{S} of polynomials in \axiom{R[X1,X2,...,Xn]} is triangular
-++ if no elements of \axiom{S} lies in \axiom{R}, and if two distinct 
-++ elements of \axiom{S} have distinct main variables. 
-++ Note that the empty set is a triangular set. A triangular set is not
-++ necessarily a (lexicographical) Groebner basis and the notion of 
-++ reduction related to triangular sets is based on the recursive view
-++ of polynomials. We recall this notion here and refer to [1] for more details.
-++ A polynomial \axiom{P} is reduced w.r.t a non-constant polynomial 
-++ \axiom{Q} if the degree of \axiom{P} in the main variable of \axiom{Q} 
-++ is less than the main degree of \axiom{Q}.
-++ A polynomial \axiom{P} is reduced w.r.t a triangular set \axiom{T}
-++ if it is reduced w.r.t. every polynomial of \axiom{T}. \newline
-++ References :
-++  [1] P. AUBRY, D. LAZARD and M. MORENO MAZA "On the Theories
-++      of Triangular Sets" Journal of Symbol. Comp. (to appear)
-++ Version: 4.
-
-TriangularSetCategory(R:IntegralDomain,E:OrderedAbelianMonoidSup,_
- V:OrderedSet,P:RecursivePolynomialCategory(R,E,V)): 
-         Category == 
-   PolynomialSetCategory(R,E,V,P) with 
-     finiteAggregate
-     shallowlyMutable
-
-     infRittWu? : ($,$) -> Boolean
-         ++ \axiom{infRittWu?(ts1,ts2)} returns true iff \axiom{ts2} has higher rank
-         ++ than \axiom{ts1} in Wu Wen Tsun sense.
-     basicSet : (List P,((P,P)->Boolean)) -> Union(Record(bas:$,top:List P),"failed")
-         ++ \axiom{basicSet(ps,redOp?)} returns \axiom{[bs,ts]} where
-         ++ \axiom{concat(bs,ts)} is \axiom{ps} and \axiom{bs}
-         ++ is a basic set in Wu Wen Tsun sense of \axiom{ps} w.r.t 
-         ++ the reduction-test \axiom{redOp?}, if no non-zero constant 
-         ++ polynomial lie in \axiom{ps}, otherwise \axiom{"failed"} is returned.
-     basicSet : (List P,(P->Boolean),((P,P)->Boolean)) -> Union(Record(bas:$,top:List P),"failed")
-         ++ \axiom{basicSet(ps,pred?,redOp?)} returns the same as \axiom{basicSet(qs,redOp?)}
-         ++ where \axiom{qs} consists of the polynomials of \axiom{ps}
-         ++ satisfying property \axiom{pred?}.
-     initials : $ -> List P
-         ++ \axiom{initials(ts)} returns the list of the non-constant initials
-         ++ of the members of \axiom{ts}.
-     degree : $ -> NonNegativeInteger
-         ++ \axiom{degree(ts)} returns the product of main degrees of the 
-         ++ members of \axiom{ts}.
-     quasiComponent : $ -> Record(close:List P,open:List P)
-         ++ \axiom{quasiComponent(ts)} returns \axiom{[lp,lq]} where \axiom{lp} is the list 
-         ++ of the members of \axiom{ts} and \axiom{lq}is \axiom{initials(ts)}.
-     normalized? : (P,$) -> Boolean
-         ++ \axiom{normalized?(p,ts)} returns true iff \axiom{p} and all its iterated initials
-         ++ have degree zero w.r.t. the main variables of the polynomials of \axiom{ts}
-     normalized? : $  -> Boolean
-         ++ \axiom{normalized?(ts)} returns true iff for every axiom{p} in axiom{ts} we have 
-         ++ \axiom{normalized?(p,us)} where \axiom{us} is \axiom{collectUnder(ts,mvar(p))}.
-     reduced? : (P,$,((P,P) -> Boolean)) -> Boolean
-         ++ \axiom{reduced?(p,ts,redOp?)} returns true iff \axiom{p} is reduced w.r.t.
-         ++ in the sense of the operation \axiom{redOp?}, that is if for every \axiom{t} in 
-         ++ \axiom{ts} \axiom{redOp?(p,t)} holds.
-     stronglyReduced? : (P,$) -> Boolean
-         ++ \axiom{stronglyReduced?(p,ts)} returns true iff \axiom{p} 
-         ++ is reduced w.r.t. \axiom{ts}.
-     headReduced? : (P,$) -> Boolean
-         ++ \axiom{headReduced?(p,ts)} returns true iff the head of \axiom{p} is 
-         ++ reduced w.r.t. \axiom{ts}.
-     initiallyReduced? : (P,$) -> Boolean
-         ++ \axiom{initiallyReduced?(p,ts)} returns true iff \axiom{p} and all its iterated initials 
-         ++ are reduced w.r.t. to the elements of \axiom{ts} with the same main variable.
-     autoReduced? : ($,((P,List(P)) -> Boolean)) -> Boolean
-         ++ \axiom{autoReduced?(ts,redOp?)} returns true iff every element of \axiom{ts} is 
-         ++ reduced w.r.t to every other in the sense of \axiom{redOp?}
-     stronglyReduced? : $ -> Boolean
-         ++ \axiom{stronglyReduced?(ts)} returns true iff every element of \axiom{ts} is 
-         ++ reduced w.r.t to any other element of \axiom{ts}.
-     headReduced? : $ -> Boolean
-         ++ headReduced?(ts) returns true iff the head of every element of \axiom{ts} is 
-         ++ reduced w.r.t to any other element of \axiom{ts}.
-     initiallyReduced? : $ -> Boolean
-         ++ initiallyReduced?(ts) returns true iff for every element \axiom{p} of \axiom{ts}
-         ++ \axiom{p} and all its iterated initials are reduced w.r.t. to the other elements 
-         ++ of \axiom{ts} with the same main variable.
-     reduce : (P,$,((P,P) -> P),((P,P) -> Boolean) ) -> P
-         ++ \axiom{reduce(p,ts,redOp,redOp?)} returns a polynomial \axiom{r}  such that 
-         ++ \axiom{redOp?(r,p)} holds for every \axiom{p} of \axiom{ts} 
-         ++ and there exists some product \axiom{h} of the initials of the members 
-         ++ of \axiom{ts} such that \axiom{h*p - r} lies in the ideal generated by \axiom{ts}. 
-         ++ The operation \axiom{redOp} must satisfy the following conditions. 
-         ++ For every \axiom{p} and \axiom{q} we have  \axiom{redOp?(redOp(p,q),q)} 
-         ++ and there exists an integer \axiom{e} and a polynomial \axiom{f} such that 
-         ++ \axiom{init(q)^e*p = f*q + redOp(p,q)}. 
-     rewriteSetWithReduction : (List P,$,((P,P) -> P),((P,P) -> Boolean) ) -> List P
-         ++ \axiom{rewriteSetWithReduction(lp,ts,redOp,redOp?)} returns a list \axiom{lq} of
-         ++ polynomials such that \axiom{[reduce(p,ts,redOp,redOp?) for p in lp]} and \axiom{lp} 
-         ++ have the same zeros inside the regular zero set of \axiom{ts}. Moreover, for every 
-         ++ polynomial \axiom{q} in \axiom{lq} and every polynomial \axiom{t} in \axiom{ts}
-         ++ \axiom{redOp?(q,t)} holds and there exists a polynomial \axiom{p}
-         ++ in the ideal generated by \axiom{lp} and a product \axiom{h} of \axiom{initials(ts)}
-         ++ such that \axiom{h*p - r} lies in the ideal generated by \axiom{ts}. 
-         ++ The operation \axiom{redOp} must satisfy the following conditions.
-         ++ For every \axiom{p} and \axiom{q} we have \axiom{redOp?(redOp(p,q),q)}
-         ++ and there exists an integer \axiom{e} and a polynomial \axiom{f}
-         ++ such that \axiom{init(q)^e*p = f*q + redOp(p,q)}.
-     stronglyReduce : (P,$) -> P
-         ++ \axiom{stronglyReduce(p,ts)} returns a polynomial \axiom{r}  such that
-         ++ \axiom{stronglyReduced?(r,ts)} holds and there exists some product 
-         ++ \axiom{h} of \axiom{initials(ts)}
-         ++ such that \axiom{h*p - r} lies in the ideal generated by \axiom{ts}.
-     headReduce : (P,$) -> P
-         ++ \axiom{headReduce(p,ts)} returns a polynomial \axiom{r}  such that \axiom{headReduce?(r,ts)}
-         ++ holds and there exists some product \axiom{h} of \axiom{initials(ts)}
-         ++ such that \axiom{h*p - r} lies in the ideal generated by \axiom{ts}.
-     initiallyReduce : (P,$) -> P
-         ++ \axiom{initiallyReduce(p,ts)} returns a polynomial \axiom{r}  
-         ++ such that  \axiom{initiallyReduced?(r,ts)}
-         ++ holds and there exists some product \axiom{h} of \axiom{initials(ts)}
-         ++ such that \axiom{h*p - r} lies in the ideal generated by \axiom{ts}.
-     removeZero: (P, $) -> P
-         ++ \axiom{removeZero(p,ts)} returns \axiom{0} if \axiom{p} reduces
-         ++ to \axiom{0} by pseudo-division w.r.t \axiom{ts} otherwise
-         ++ returns a polynomial \axiom{q} computed from \axiom{p}
-         ++ by removing any coefficient in \axiom{p} reducing to \axiom{0}.
-     collectQuasiMonic: $ -> $
-         ++ \axiom{collectQuasiMonic(ts)} returns the subset of \axiom{ts}
-         ++ consisting of the polynomials with initial in \axiom{R}.
-     reduceByQuasiMonic: (P, $) -> P
-         ++ \axiom{reduceByQuasiMonic(p,ts)} returns the same as
-         ++ \axiom{remainder(p,collectQuasiMonic(ts)).polnum}.
-     zeroSetSplit : List P -> List $
-         ++ \axiom{zeroSetSplit(lp)} returns a list \axiom{lts} of triangular sets such that 
-         ++ the zero set of \axiom{lp} is the union of the closures of the regular zero sets 
-         ++ of the members of \axiom{lts}.
-     zeroSetSplitIntoTriangularSystems : List P -> List Record(close:$,open:List P)
-         ++ \axiom{zeroSetSplitIntoTriangularSystems(lp)} returns a list of triangular
-         ++ systems \axiom{[[ts1,qs1],...,[tsn,qsn]]} such that the zero set of \axiom{lp}
-         ++ is the union of the closures of the \axiom{W_i} where \axiom{W_i} consists
-         ++ of the zeros of \axiom{ts} which do not cancel any polynomial in \axiom{qsi}.
-     first : $ -> Union(P,"failed")
-         ++ \axiom{first(ts)} returns the polynomial of \axiom{ts} with greatest main variable
-         ++ if \axiom{ts} is not empty, otherwise returns \axiom{"failed"}.
-     last : $ -> Union(P,"failed")
-         ++ \axiom{last(ts)} returns the polynomial of \axiom{ts} with smallest main variable
-         ++ if \axiom{ts} is not empty, otherwise returns \axiom{"failed"}.
-     rest : $ -> Union($,"failed")
-         ++ \axiom{rest(ts)} returns the polynomials of \axiom{ts} with smaller main variable
-         ++ than \axiom{mvar(ts)} if \axiom{ts} is not empty, otherwise returns "failed"
-     algebraicVariables : $ -> List(V)
-         ++ \axiom{algebraicVariables(ts)} returns the decreasingly sorted list of the main
-         ++ variables of the polynomials of \axiom{ts}.
-     algebraic? : (V,$) -> Boolean
-         ++ \axiom{algebraic?(v,ts)} returns true iff \axiom{v} is the main variable of some
-         ++ polynomial in \axiom{ts}.
-     select : ($,V) -> Union(P,"failed")
-         ++ \axiom{select(ts,v)} returns the polynomial of \axiom{ts} with \axiom{v} as
-         ++ main variable, if any.
-     extendIfCan : ($,P) -> Union($,"failed")
-         ++ \axiom{extendIfCan(ts,p)} returns a triangular set which encodes the simple
-         ++ extension by \axiom{p} of the extension of the base field defined by \axiom{ts},
-         ++ according to the properties of triangular sets of the current domain.
-         ++ If the required properties do not hold then "failed" is returned.
-         ++ This operation encodes in some sense the properties of the
-         ++ triangular sets of the current category. Is is used to implement
-         ++ the \axiom{construct} operation to guarantee that every triangular
-         ++ set build from a list of polynomials has the required properties.
-     extend : ($,P) -> $
-         ++ \axiom{extend(ts,p)} returns a triangular set which encodes the simple
-         ++ extension by \axiom{p} of the extension of the base field defined by \axiom{ts},
-         ++ according to the properties of triangular sets of the current category
-         ++ If the required properties do not hold an error is returned.
-     if V has Finite
-     then
-       coHeight : $ -> NonNegativeInteger
-           ++ \axiom{coHeight(ts)} returns \axiom{size()\$V} minus \axiom{\#ts}.
-  add
-     
-     GPS ==> GeneralPolynomialSet(R,E,V,P)
-     B ==> Boolean
-     RBT ==> Record(bas:$,top:List P)
-
-     ts:$ = us:$ ==
-       empty?(ts)$$ => empty?(us)$$
-       empty?(us)$$ => false
-       first(ts)::P =$P first(us)::P => rest(ts)::$ =$$ rest(us)::$
-       false
-
-     infRittWu?(ts,us) ==
-       empty?(us)$$ => not empty?(ts)$$
-       empty?(ts)$$ => false
-       p : P := (last(ts))::P
-       q : P := (last(us))::P
-       infRittWu?(p,q)$P => true
-       supRittWu?(p,q)$P => false
-       v : V := mvar(p)
-       infRittWu?(collectUpper(ts,v),collectUpper(us,v))$$
-
-     reduced?(p,ts,redOp?) ==
-       lp : List P := members(ts)
-       while (not empty? lp) and (redOp?(p,first(lp))) repeat
-         lp := rest lp
-       empty? lp 
-
-     basicSet(ps,redOp?) ==
-       ps := remove(zero?,ps)
-       any?(ground?,ps) => "failed"::Union(RBT,"failed")
-       ps := sort(infRittWu?,ps)
-       p,b : P
-       bs := empty()$$
-       ts : List P := []
-       while not empty? ps repeat
-         b := first(ps)
-         bs := extend(bs,b)$$
-         ps := rest ps
-         while (not empty? ps) and (not reduced?((p := first(ps)),bs,redOp?)) repeat
-           ts := cons(p,ts)
-           ps := rest ps
-       ([bs,ts]$RBT)::Union(RBT,"failed")
-
-     basicSet(ps,pred?,redOp?) ==
-       ps := remove(zero?,ps)
-       any?(ground?,ps) => "failed"::Union(RBT,"failed")
-       gps : List P := []
-       bps : List P := []
-       while not empty? ps repeat
-         p := first ps
-         ps := rest ps  
-         if pred?(p)
-           then
-             gps := cons(p,gps)
-           else
-             bps := cons(p,bps)
-       gps := sort(infRittWu?,gps)
-       p,b : P
-       bs := empty()$$
-       ts : List P := []
-       while not empty? gps repeat
-         b := first(gps)
-         bs := extend(bs,b)$$
-         gps := rest gps
-         while (not empty? gps) and (not reduced?((p := first(gps)),bs,redOp?)) repeat
-           ts := cons(p,ts)
-           gps := rest gps
-       ts := sort(infRittWu?,concat(ts,bps))
-       ([bs,ts]$RBT)::Union(RBT,"failed")
-
-     initials ts ==
-       lip : List P := []
-       empty? ts => lip
-       lp := members(ts)
-       while not empty? lp repeat
-          p := first(lp)
-          if not ground?((ip := init(p)))
-            then
-              lip := cons(primPartElseUnitCanonical(ip),lip)
-          lp := rest lp
-       removeDuplicates lip
-
-     degree ts ==
-       empty? ts => 0$NonNegativeInteger
-       lp := members ts
-       d : NonNegativeInteger := mdeg(first lp)
-       while not empty? (lp := rest lp) repeat
-         d := d * mdeg(first lp)
-       d
-
-     quasiComponent ts == 
-       [members(ts),initials(ts)]
-
-     normalized?(p,ts) ==
-       normalized?(p,members(ts))$P
-
-     stronglyReduced? (p,ts) ==
-       reduced?(p,members(ts))$P
-
-     headReduced? (p,ts) ==
-       stronglyReduced?(head(p),ts)
-
-     initiallyReduced? (p,ts) ==
-       lp : List (P) := members(ts)
-       red : Boolean := true
-       while (not empty? lp) and (not ground?(p)$P) and red repeat
-         while (not empty? lp) and (mvar(first(lp)) > mvar(p)) repeat 
-           lp := rest lp
-         if (not empty? lp) 
-           then
-             if  (mvar(first(lp)) = mvar(p))
-               then
-                 if reduced?(p,first(lp))
-                   then
-                     lp := rest lp
-                     p := init(p)
-                   else
-                     red := false
-               else
-                 p := init(p)
-       red
-
-     reduce(p,ts,redOp,redOp?) ==
-       (empty? ts) or (ground? p) => p
-       ts0 := ts
-       while (not empty? ts) and (not ground? p) repeat
-          reductor := (first ts)::P
-          ts := (rest ts)::$
-          if not redOp?(p,reductor) 
-            then 
-              p := redOp(p,reductor)
-              ts := ts0
-       p
-
-     rewriteSetWithReduction(lp,ts,redOp,redOp?) ==
-       trivialIdeal? ts => lp
-       lp := remove(zero?,lp)
-       empty? lp => lp
-       any?(ground?,lp) => [1$P]
-       rs : List P := []
-       while not empty? lp repeat
-         p := first lp
-         lp := rest lp
-         p := primPartElseUnitCanonical reduce(p,ts,redOp,redOp?)
-         if not zero? p
-           then 
-             if ground? p
-               then
-                 lp := []
-                 rs := [1$P]
-               else
-                 rs := cons(p,rs)
-       removeDuplicates rs
-
-     stronglyReduce(p,ts) ==
-       reduce (p,ts,lazyPrem,reduced?)
-
-     headReduce(p,ts) ==
-       reduce (p,ts,headReduce,headReduced?)
-
-     initiallyReduce(p,ts) ==
-       reduce (p,ts,initiallyReduce,initiallyReduced?)
-
-     removeZero(p,ts) ==
-       (ground? p) or (empty? ts) => p
-       v := mvar(p)
-       ts_v_- := collectUnder(ts,v)
-       if algebraic?(v,ts) 
-         then
-           q := lazyPrem(p,select(ts,v)::P)
-           zero? q => return q
-           zero? removeZero(q,ts_v_-) => return 0
-       empty? ts_v_- => p
-       q: P := 0
-       while positive? degree(p,v) repeat
-          q := removeZero(init(p),ts_v_-) * mainMonomial(p) + q
-          p := tail(p)
-       q + removeZero(p,ts_v_-)
-
-     reduceByQuasiMonic(p, ts) ==
-       (ground? p) or (empty? ts) => p
-       remainder(p,collectQuasiMonic(ts)).polnum
-
-     autoReduced?(ts : $,redOp? : ((P,List(P)) -> Boolean)) ==        
-       empty? ts => true
-       lp : List (P) := members(ts)
-       p : P := first(lp)
-       lp := rest lp
-       while (not empty? lp) and redOp?(p,lp) repeat
-          p := first lp
-          lp := rest lp
-       empty? lp
-
-     stronglyReduced? ts ==
-       autoReduced? (ts, reduced?)
-
-     normalized? ts ==
-       autoReduced? (ts,normalized?)
-
-     headReduced? ts ==
-       autoReduced? (ts,headReduced?)
-
-     initiallyReduced?  ts ==
-       autoReduced? (ts,initiallyReduced?)
-         
-     mvar ts ==
-       empty? ts => error"Error from TSETCAT in mvar : #1 is empty"
-       mvar((first(ts))::P)$P
-
-     first ts ==
-       empty? ts => "failed"::Union(P,"failed")
-       lp : List(P) := sort(supRittWu?,members(ts))$(List P)
-       first(lp)::Union(P,"failed")
-
-     last ts ==
-       empty? ts => "failed"::Union(P,"failed")
-       lp : List(P) := sort(infRittWu?,members(ts))$(List P)
-       first(lp)::Union(P,"failed")
-
-     rest ts ==
-       empty? ts => "failed"::Union($,"failed")
-       lp : List(P) := sort(supRittWu?,members(ts))$(List P)
-       construct(rest(lp))::Union($,"failed")
-
-     coerce (ts:$) : List(P) == 
-       sort(supRittWu?,members(ts))$(List P)
-
-     algebraicVariables ts ==
-       [mvar(p) for p in members(ts)]
-
-     algebraic? (v,ts) ==
-       member?(v,algebraicVariables(ts))
-
-     select  (ts,v) ==
-       lp : List (P) := sort(supRittWu?,members(ts))$(List P)
-       while (not empty? lp) and (not (v = mvar(first lp))) repeat
-         lp := rest lp
-       empty? lp => "failed"::Union(P,"failed")
-       (first lp)::Union(P,"failed")
-
-     collectQuasiMonic ts ==
-       lp: List(P) := members(ts)
-       newlp: List(P) := []
-       while (not empty? lp) repeat
-         if ground? init(first(lp)) then newlp := cons(first(lp),newlp)
-         lp := rest lp
-       construct(newlp)
-
-     collectUnder (ts,v) ==
-       lp : List (P) := sort(supRittWu?,members(ts))$(List P)
-       while (not empty? lp) and (not (v > mvar(first lp))) repeat
-         lp := rest lp       
-       construct(lp)
-
-     collectUpper  (ts,v) ==
-       lp1 : List(P) := sort(supRittWu?,members(ts))$(List P)
-       lp2 : List(P) := []
-       while (not empty? lp1) and  (mvar(first lp1) > v) repeat
-         lp2 := cons(first(lp1),lp2)
-         lp1 := rest lp1
-       construct(reverse lp2)
-
-     construct(lp:List(P)) ==
-       rif := retractIfCan(lp)@Union($,"failed")
-       not (rif case $) => error"in construct : LP -> $ from TSETCAT : bad arg"
-       rif::$
-
-     retractIfCan(lp:List(P)) ==
-       empty? lp => (empty()$$)::Union($,"failed")
-       lp := sort(supRittWu?,lp)
-       rif := retractIfCan(rest(lp))@Union($,"failed")
-       not (rif case $) => error"in retractIfCan : LP -> ... from TSETCAT : bad arg"
-       extendIfCan(rif::$,first(lp))@Union($,"failed")
-
-     extend(ts:$,p:P):$ ==
-       eif := extendIfCan(ts,p)@Union($,"failed")
-       not (eif case $) => error"in extend : ($,P) -> $ from TSETCAT : bad ars"
-       eif::$
-
-     if V has Finite
-     then
-        
-       coHeight ts ==
-         n := size()$V
-         m := #(members ts)
-         subtractIfCan(n,m)$NonNegativeInteger::NonNegativeInteger
-
-@
-\section{TSETCAT.lsp BOOTSTRAP} 
-{\bf TSETCAT} depends on a chain of
-files. We need to break this cycle to build the algebra. So we keep a
-cached copy of the translated {\bf TSETCAT} category which we can write
-into the {\bf MID} directory. We compile the lisp code and copy the
-{\bf TSETCAT.o} file to the {\bf OUT} directory.  This is eventually
-forcibly replaced by a recompiled version.
-
-Note that this code is not included in the generated catdef.spad file.
-
-<<TSETCAT.lsp BOOTSTRAP>>=
-
-(|/VERSIONCHECK| 2) 
-
-(SETQ |TriangularSetCategory;CAT| (QUOTE NIL)) 
-
-(SETQ |TriangularSetCategory;AL| (QUOTE NIL)) 
-
-(DEFUN |TriangularSetCategory| (|&REST| #1=#:G82394 |&AUX| #2=#:G82392) (DSETQ #2# #1#) (LET (#3=#:G82393) (COND ((SETQ #3# (|assoc| (|devaluateList| #2#) |TriangularSetCategory;AL|)) (CDR #3#)) (T (SETQ |TriangularSetCategory;AL| (|cons5| (CONS (|devaluateList| #2#) (SETQ #3# (APPLY (FUNCTION |TriangularSetCategory;|) #2#))) |TriangularSetCategory;AL|)) #3#)))) 
-
-(DEFUN |TriangularSetCategory;| (|t#1| |t#2| |t#3| |t#4|) (PROG (#1=#:G82391) (RETURN (PROG1 (LETT #1# (|sublisV| (PAIR (QUOTE (|t#1| |t#2| |t#3| |t#4|)) (LIST (|devaluate| |t#1|) (|devaluate| |t#2|) (|devaluate| |t#3|) (|devaluate| |t#4|))) (COND (|TriangularSetCategory;CAT|) ((QUOTE T) (LETT |TriangularSetCategory;CAT| (|Join| (|PolynomialSetCategory| (QUOTE |t#1|) (QUOTE |t#2|) (QUOTE |t#3|) (QUOTE |t#4|)) (|mkCategory| (QUOTE |domain|) (QUOTE (((|infRittWu?| ((|Boolean|) |$| |$|)) T) ((|basicSet| ((|Union| (|Record| (|:| |bas| |$|) (|:| |top| (|List| |t#4|))) "failed") (|List| |t#4|) (|Mapping| (|Boolean|) |t#4| |t#4|))) T) ((|basicSet| ((|Union| (|Record| (|:| |bas| |$|) (|:| |top| (|List| |t#4|))) "failed") (|List| |t#4|) (|Mapping| (|Boolean|) |t#4|) (|Mapping| (|Boolean|) |t#4| |t#4|))) T) ((|initials| ((|List| |t#4|) |$|)) T) ((|degree| ((|NonNegativeInteger|) |$|)) T) ((|quasiComponent| ((|Record| (|:| |close| (|List| |t#4|)) (|:| |open| (|List| |t#4|))) |$|)) T) ((|normalized?| ((|Boolean|) |t#4| |$|)) T) ((|normalized?| ((|Boolean|) |$|)) T) ((|reduced?| ((|Boolean|) |t#4| |$| (|Mapping| (|Boolean|) |t#4| |t#4|))) T) ((|stronglyReduced?| ((|Boolean|) |t#4| |$|)) T) ((|headReduced?| ((|Boolean|) |t#4| |$|)) T) ((|initiallyReduced?| ((|Boolean|) |t#4| |$|)) T) ((|autoReduced?| ((|Boolean|) |$| (|Mapping| (|Boolean|) |t#4| (|List| |t#4|)))) T) ((|stronglyReduced?| ((|Boolean|) |$|)) T) ((|headReduced?| ((|Boolean|) |$|)) T) ((|initiallyReduced?| ((|Boolean|) |$|)) T) ((|reduce| (|t#4| |t#4| |$| (|Mapping| |t#4| |t#4| |t#4|) (|Mapping| (|Boolean|) |t#4| |t#4|))) T) ((|rewriteSetWithReduction| ((|List| |t#4|) (|List| |t#4|) |$| (|Mapping| |t#4| |t#4| |t#4|) (|Mapping| (|Boolean|) |t#4| |t#4|))) T) ((|stronglyReduce| (|t#4| |t#4| |$|)) T) ((|headReduce| (|t#4| |t#4| |$|)) T) ((|initiallyReduce| (|t#4| |t#4| |$|)) T) ((|removeZero| (|t#4| |t#4| |$|)) T) ((|collectQuasiMonic| (|$| |$|)) T) ((|reduceByQuasiMonic| (|t#4| |t#4| |$|)) T) ((|zeroSetSplit| ((|List| |$|) (|List| |t#4|))) T) ((|zeroSetSplitIntoTriangularSystems| ((|List| (|Record| (|:| |close| |$|) (|:| |open| (|List| |t#4|)))) (|List| |t#4|))) T) ((|first| ((|Union| |t#4| "failed") |$|)) T) ((|last| ((|Union| |t#4| "failed") |$|)) T) ((|rest| ((|Union| |$| "failed") |$|)) T) ((|algebraicVariables| ((|List| |t#3|) |$|)) T) ((|algebraic?| ((|Boolean|) |t#3| |$|)) T) ((|select| ((|Union| |t#4| "failed") |$| |t#3|)) T) ((|extendIfCan| ((|Union| |$| "failed") |$| |t#4|)) T) ((|extend| (|$| |$| |t#4|)) T) ((|coHeight| ((|NonNegativeInteger|) |$|)) (|has| |t#3| (|Finite|))))) (QUOTE ((|finiteAggregate| T) (|shallowlyMutable| T))) (QUOTE ((|NonNegativeInteger|) (|Boolean|) (|List| |t#3|) (|List| (|Record| (|:| |close| |$|) (|:| |open| (|List| |t#4|)))) (|List| |t#4|) (|List| |$|))) NIL)) . #2=(|TriangularSetCategory|))))) . #2#) (SETELT #1# 0 (LIST (QUOTE |TriangularSetCategory|) (|devaluate| |t#1|) (|devaluate| |t#2|) (|devaluate| |t#3|) (|devaluate| |t#4|))))))) 
-@
-\section{TSETCAT-.lsp BOOTSTRAP}
-{\bf TSETCAT-} depends on a chain of files. 
-We need to break this cycle to build
-the algebra. So we keep a cached copy of the translated {\bf TSETCAT-}
-category which we can write into the {\bf MID} directory. We compile 
-the lisp code and copy the {\bf TSETCAT-.o} file to the {\bf OUT} directory.
-This is eventually forcibly replaced by a recompiled version. 
-
-Note that this code is not included in the generated catdef.spad file.
-
-<<TSETCAT-.lsp BOOTSTRAP>>=
-@
 \section{domain GTSET GeneralTriangularSet}
 <<domain GTSET GeneralTriangularSet>>=
 )abbrev domain GTSET GeneralTriangularSet
@@ -2037,7 +1529,6 @@ WuWenTsunTriangularSet(R,E,V,P) : Exports == Implementation where
 <<*>>=
 <<license>>
 
-<<category TSETCAT TriangularSetCategory>>
 <<domain GTSET GeneralTriangularSet>>
 <<package PSETPK PolynomialSetUtilitiesPackage>>
 <<domain WUTSET WuWenTsunTriangularSet>>
diff --git a/src/algebra/vector.spad.pamphlet b/src/algebra/vector.spad.pamphlet
index 88ed2ea..23b3443 100644
--- a/src/algebra/vector.spad.pamphlet
+++ b/src/algebra/vector.spad.pamphlet
@@ -9,100 +9,6 @@
 \eject
 \tableofcontents
 \eject
-\section{category VECTCAT VectorCategory}
-<<category VECTCAT VectorCategory>>=
-)abbrev category VECTCAT VectorCategory
-++ Author:
-++ Date Created:
-++ Date Last Updated:
-++ Basic Functions:
-++ Related Constructors: DirectProductCategory, Vector, IndexedVector
-++ Also See:
-++ AMS Classifications:
-++ Keywords:
-++ References:
-++ Description:
-++ \spadtype{VectorCategory} represents the type of vector like objects,
-++ i.e. finite sequences indexed by some finite segment of the
-++ integers. The operations available on vectors depend on the structure
-++ of the underlying components. Many operations from the component domain
-++ are defined for vectors componentwise. It can by assumed that extraction or
-++ updating components can be done in constant time.
- 
-VectorCategory(R:Type): Category == OneDimensionalArrayAggregate R with
-    if R has AbelianSemiGroup then
-      _+ : (%, %) -> %
-        ++ x + y returns the component-wise sum of the vectors x and y.
-        ++ Error: if x and y are not of the same length.
-    if R has AbelianMonoid then
-      zero: NonNegativeInteger -> %
-        ++ zero(n) creates a zero vector of length n.
-    if R has AbelianGroup then
-      _- : % -> %
-        ++ -x negates all components of the vector x.
-      _- : (%, %) -> %
-        ++ x - y returns the component-wise difference of the vectors x and y.
-        ++ Error: if x and y are not of the same length.
-      _* : (Integer, %) -> %
-        ++ n * y multiplies each component of the vector y by the integer n.
-    if R has Monoid then
-      _* : (R, %) -> %
-        ++ r * y multiplies the element r times each component of the vector y.
-      _* : (%, R) -> %
-        ++ y * r multiplies each component of the vector y by the element r.
-    if R has Ring then
-      dot: (%, %) -> R
-        ++ dot(x,y) computes the inner product of the two vectors x and y.
-        ++ Error: if x and y are not of the same length.
-      outerProduct: (%, %) -> Matrix R
-        ++ outerProduct(u,v) constructs the matrix whose (i,j)'th element is
-        ++ u(i)*v(j).
-      cross: (%, %) -> %
-        ++ vectorProduct(u,v) constructs the cross product of u and v.
-        ++ Error: if u and v are not of length 3.
-    if R has RadicalCategory and R has Ring then
-      length: % -> R
-        ++ length(v) computes the sqrt(dot(v,v)), i.e. the magnitude
-      magnitude: % -> R
-        ++ magnitude(v) computes the sqrt(dot(v,v)), i.e. the length
- add
-    if R has AbelianSemiGroup then
-      u + v ==
-        (n := #u) ^= #v => error "Vectors must be of the same length"
-        map(_+ , u, v)
- 
-    if R has AbelianMonoid then
-      zero n == new(n, 0)
- 
-    if R has AbelianGroup then
-      - u             == map(- #1, u)
-      n:Integer * u:% == map(n * #1, u)
-      u - v           == u + (-v)
- 
-    if R has Monoid then
-      u:% * r:R       == map(#1 * r, u)
-      r:R * u:%       == map(r * #1, u)
- 
-    if R has Ring then
-      dot(u, v) ==
-        #u ^= #v => error "Vectors must be of the same length"
-        _+/[qelt(u, i) * qelt(v, i) for i in minIndex u .. maxIndex u]
-      outerProduct(u, v) ==
-        matrix [[qelt(u, i) * qelt(v,j) for i in minIndex u .. maxIndex u] _
-                for j in minIndex v .. maxIndex v]
-      cross(u, v) ==
-        #u ^= 3 or #v ^= 3 => error "Vectors must be of length 3"
-        construct [qelt(u, 2)*qelt(v, 3) - qelt(u, 3)*qelt(v, 2) , _
-                   qelt(u, 3)*qelt(v, 1) - qelt(u, 1)*qelt(v, 3) , _
-                   qelt(u, 1)*qelt(v, 2) - qelt(u, 2)*qelt(v, 1) ]
-
-    if R has RadicalCategory and R has Ring then
-      length p ==
-         sqrt(dot(p,p))
-      magnitude p ==
-         sqrt(dot(p,p))
- 
-@
 \section{domain IVECTOR IndexedVector}
 <<domain IVECTOR IndexedVector>>=
 )abbrev domain IVECTOR IndexedVector
@@ -428,98 +334,6 @@ VectorFunctions2(A, B): Exports == Implementation where
      vector reverse! res
 
 @
-\section{category DIRPCAT DirectProductCategory}
-<<category DIRPCAT DirectProductCategory>>=
-)abbrev category DIRPCAT DirectProductCategory
--- all direct product category domains must be compiled
--- without subsumption, set SourceLevelSubset to EQUAL
---)bo $noSubsumption := true
- 
---% DirectProductCategory
- 
-++ Author:
-++ Date Created:
-++ Date Last Updated:
-++ Basic Functions:
-++ Related Constructors: DirectProduct
-++ Also See: VectorCategory
-++ AMS Classifications:
-++ Keywords:
-++ References:
-++ Description:
-++   This category represents a finite cartesian product of a given type.
-++ Many categorical properties are preserved under this construction.
- 
-DirectProductCategory(dim:NonNegativeInteger, R:Type): Category ==
-  Join(IndexedAggregate(Integer, R), CoercibleTo Vector R) with
-         finiteAggregate
-           ++ attribute to indicate an aggregate of finite size
-         directProduct: Vector R -> %
-           ++ directProduct(v) converts the vector v to become
-           ++ a direct product. Error: if the length of v is
-           ++ different from dim.
-         if R has SetCategory then FullyRetractableTo R
-         if R has Ring then
-           BiModule(R, R)
-           DifferentialExtension R
-           FullyLinearlyExplicitRingOver R
-           unitVector: PositiveInteger -> %
-             ++ unitVector(n) produces a vector with 1 in position n and
-             ++ zero elsewhere.
-           dot: (%, %) -> R
-             ++ dot(x,y) computes the inner product of the vectors x and y.
-         if R has AbelianSemiGroup then AbelianSemiGroup
-         if R has CancellationAbelianMonoid then CancellationAbelianMonoid
-         if R has Monoid then
-            Monoid
-           _* : (R, %) -> %
-             ++ r * y multiplies the element r times each component of the
-             ++ vector y.
-           _* : (%, R) -> %
-             ++ y*r multiplies each component of the vector y by the element r.
-         if R has Finite then Finite
-         if R has CommutativeRing then
-           Algebra R
-           CommutativeRing
-         if R has unitsKnown then unitsKnown
-         if R has OrderedRing then OrderedRing
-         if R has OrderedAbelianMonoidSup then OrderedAbelianMonoidSup
-         if R has Field then VectorSpace R
- add
-      if R has Ring then
-        equation2R: Vector % -> Matrix R
- 
-        coerce(n:Integer):%          == n::R::%
-        characteristic()             == characteristic()$R
-        differentiate(z:%, d:R -> R) == map(d, z)
- 
-        equation2R v ==
-          ans:Matrix(R) := new(dim, #v, 0)
-          for i in minRowIndex ans .. maxRowIndex ans repeat
-            for j in minColIndex ans .. maxColIndex ans repeat
-              qsetelt_!(ans, i, j, qelt(qelt(v, j), i))
-          ans
- 
-        reducedSystem(m:Matrix %):Matrix(R) ==
-          empty? m => new(0, 0, 0)
-          reduce(vertConcat, [equation2R row(m, i)
-                 for i in minRowIndex m .. maxRowIndex m])$List(Matrix R)
- 
-        reducedSystem(m:Matrix %, v:Vector %):
-          Record(mat:Matrix R, vec:Vector R) ==
-            vh:Vector(R) :=
-              empty? v => empty()
-              rh := reducedSystem(v::Matrix %)@Matrix(R)
-              column(rh, minColIndex rh)
-            [reducedSystem(m)@Matrix(R), vh]
- 
-      if R has Finite then size == size$R ** dim
- 
-      if R has Field then
-        x / b       == x * inv b
-        dimension() == dim::CardinalNumber
- 
-@
 \section{domain DIRPROD DirectProduct}
 <<domain DIRPROD DirectProduct>>=
 )abbrev domain DIRPROD DirectProduct
@@ -707,11 +521,9 @@ DirectProductFunctions2(dim, A, B): Exports == Implementation where
 <<*>>=
 <<license>>
  
-<<category VECTCAT VectorCategory>>
 <<domain IVECTOR IndexedVector>>
 <<domain VECTOR Vector>>
 <<package VECTOR2 VectorFunctions2>>
-<<category DIRPCAT DirectProductCategory>>
 <<domain DIRPROD DirectProduct>>
 <<package DIRPROD2 DirectProductFunctions2>>
  
