diff --git a/books/bookvol10.2.pamphlet b/books/bookvol10.2.pamphlet
index 64191ed..835739c 100644
--- a/books/bookvol10.2.pamphlet
+++ b/books/bookvol10.2.pamphlet
@@ -552,7 +552,7 @@ For example, a domain of mathematical objects which has the
 equal if and only if their data structures are equal.
 \item {\bf \cross{ATTREG}{approximate}} means ``is an approximation to
 the real numbers''.
-\end{itemize}
+n\end{itemize}
 
 <<category ATTREG AttributeRegistry>>=
 )abbrev category ATTREG AttributeRegistry
@@ -860,8 +860,10 @@ digraph pic {
 
 {\bf See:}\\
 \pageto{Collection}{CLAGG}
+\pageto{FunctionSpace}{FS}
 \pageto{MonogenicAlgebra}{MONOGEN}
 \pageto{PolynomialCategory}{POLYCAT}
+\pageto{QuotientFieldCategory}{QFCAT}
 \pageto{RealConstant}{REAL}
 \pageto{RealNumberSystem}{RNS}
 \pagefrom{Category}{CATEGORY}
@@ -1404,6 +1406,7 @@ digraph pic {
 \pagepic{ps/v102patternable.ps}{PATAB}{1.00}
 
 {\bf See:}\\
+\pageto{FunctionSpace}{FS}
 \pageto{QuotientFieldCategory}{QFCAT}
 \pagefrom{Category}{CATEGORY}
 
@@ -1455,6 +1458,10 @@ Patternable(R:Type): Category == with
  [color=seagreen,href="bookvol10.2.pdf#nameddest=PATAB"];
 "Patternable(IntegralDomain)" -> "Patternable(a:Type)"
 
+"Patternable(OrderedSet)"
+ [color=seagreen,href="bookvol10.2.pdf#nameddest=PATAB"];
+"Patternable(OrderedSet)" -> "Patternable(a:Type)"
+
 @
 <<PATAB.dotpic>>=
 digraph pic {
@@ -1534,6 +1541,7 @@ digraph pic {
 
 {\bf See:}\\
 \pageto{AlgebraicallyClosedField}{ACF}
+\pageto{IntervalCategory}{INTCAT}
 \pageto{RealNumberSystem}{RNS}
 \pagefrom{Category}{CATEGORY}
 
@@ -1613,9 +1621,12 @@ digraph pic {
 \pageto{ExpressionSpace}{ES}
 \pageto{FiniteAlgebraicExtensionField}{FAXF}
 \pageto{FortranMachineTypeCategory}{FMTC}
+\pageto{FreeAbelianMonoidCategory}{FAMONC}
 \pageto{FreeModuleCat}{FMCAT}
 \pageto{FullyRetractableTo}{FRETRCT}
+\pageto{FunctionSpace}{FS}
 \pageto{GradedAlgebra}{GRALG}
+\pageto{IntervalCategory}{INTCAT}
 \pageto{PolynomialCategory}{POLYCAT}
 \pageto{QuotientFieldCategory}{QFCAT}
 \pageto{RealNumberSystem}{RNS}
@@ -2192,6 +2203,7 @@ digraph pic {
 \pagepic{ps/v102realconstant.ps}{REAL}{1.00}
 
 {\bf See:}\\
+\pageto{QuotientFieldCategory}{QFCAT}
 \pageto{RealNumberSystem}{RNS}
 \pagefrom{ConvertibleTo}{KONVERT}
 
@@ -2583,6 +2595,7 @@ digraph pic {
 
 {\bf See:}\\
 \pageto{FiniteAbelianMonoidRing}{FAMR}
+\pageto{FunctionSpace}{FS}
 \pageto{MonogenicAlgebra}{MONOGEN}
 \pagefrom{RetractableTo}{RETRACT}
 
@@ -2696,6 +2709,7 @@ digraph pic {
 \pagepic{ps/v102fullypatternmatchable.ps}{FPATMAB}{1.00}
 
 {\bf See:}\\
+\pageto{FunctionSpace}{FS}
 \pageto{QuotientFieldCategory}{QFCAT}
 \pagefrom{Type}{TYPE}
 
@@ -2779,6 +2793,11 @@ FullyPatternMatchable(R:Type): Category == Type with
 "FullyPatternMatchable(IntegralDomain)" ->
   "FullyPatternMatchable(a:Type)"
 
+"FullyPatternMatchable(OrderedSet)"
+ [color=seagreen,href="bookvol10.2.pdf#nameddest=FPATMAB"];
+"FullyPatternMatchable(OrderedSet)" ->
+  "FullyPatternMatchable(a:Type)"
+
 @
 <<FPATMAB.dotpic>>=
 digraph pic {
@@ -3007,6 +3026,7 @@ digraph pic {
 \pageto{Finite}{FINITE}
 \pageto{GradedModule}{GRMOD}
 \pageto{HomogeneousAggregate}{HOAGG}
+\pageto{IndexedDirectProductCategory}{IDPC}
 \pageto{OrderedSet}{ORDSET}
 \pageto{PatternMatchable}{PATMAB}
 \pageto{SemiGroup}{SGROUP}
@@ -3119,6 +3139,7 @@ include an intermediate test to check that the argument has a
 reciprocal values.
 
 {\bf See:}\\
+\pageto{IntervalCategory}{INTCAT}
 \pageto{LiouvillianFunctionCategory}{LFCAT}
 \pagefrom{ArcHyperbolicFunctionCategory}{AHYP}
 \pagefrom{ArcTrigonometricFunctionCategory}{ATRIG}
@@ -3312,6 +3333,7 @@ digraph pic {
 
 {\bf See:}\\
 \pageto{AbelianMonoid}{ABELMON}
+\pageto{FunctionSpace}{FS}
 \pagefrom{SetCategory}{SETCAT}
 
 {\bf Exports:}\\
@@ -4938,6 +4960,124 @@ digraph pic {
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\pagehead{IndexedDirectProductCategory}{IDPC}
+\pagepic{ps/v102liouvillianfunctioncategory.ps}{IDPC}{1.00}
+
+{\bf See:}\\
+\pagefrom{SetCategory}{SETCAT}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\cross{IDPC}{coerce} &
+\cross{IDPC}{hash} &
+\cross{IDPC}{latex} &
+\cross{IDPC}{leadingCoefficient} &
+\cross{IDPC}{leadingSupport} \\
+\cross{IDPC}{map} &
+\cross{IDPC}{monomial} &
+\cross{IDPC}{reductum} &
+\cross{IDPC}{?=?} &
+\cross{IDPC}{?\~{}=?} \\
+\end{tabular}
+
+These are directly exported but not implemented:
+\begin{verbatim}
+ leadingCoefficient : % -> A          
+ leadingSupport : % -> S
+ map : ((A -> A),%) -> %              
+ monomial : (A,S) -> %
+ reductum : % -> %                    
+\end{verbatim}
+
+These exports come from \refto{SetCategory}():
+\begin{verbatim}
+ coerce : % -> OutputForm
+ hash : % -> SingleInteger            
+ latex : % -> String
+ ?=? : (%,%) -> Boolean               
+ ?~=? : (%,%) -> Boolean
+\end{verbatim}
+
+<<category IDPC IndexedDirectProductCategory>>=
+)abbrev category IDPC IndexedDirectProductCategory
+++ Author: James Davenport
+++ Date Created:
+++ Date Last Updated:
+++ Basic Functions:
+++ Related Constructors:
+++ Also See:
+++ AMS Classifications:
+++ Keywords:
+++ References:
+++ Description:
+++ This category represents the direct product of some set with
+++ respect to an ordered indexing set.
+
+IndexedDirectProductCategory(A:SetCategory,S:OrderedSet): Category ==
+  SetCategory with
+    map:           (A -> A, %) -> %
+       ++ map(f,z) returns the new element created by applying the
+       ++ function f to each component of the direct product element z.
+    monomial:         (A, S) -> %
+       ++ monomial(a,s) constructs a direct product element with the s
+       ++ component set to \spad{a}
+    leadingCoefficient:   % -> A
+       ++ leadingCoefficient(z) returns the coefficient of the leading
+       ++ (with respect to the ordering on the indexing set)
+       ++ monomial of z.
+       ++ Error: if z has no support.
+    leadingSupport:   % -> S
+       ++ leadingSupport(z) returns the index of leading
+       ++ (with respect to the ordering on the indexing set) monomial of z.
+       ++ Error: if z has no support.
+    reductum:      % -> %
+       ++ reductum(z) returns a new element created by removing the
+       ++ leading coefficient/support pair from the element z.
+       ++ Error: if z has no support.
+
+@
+<<IDPC.dotabb>>=
+"IDPC"
+ [color=lightblue,href="bookvol10.2.pdf#nameddest=IDPC"];
+"IDPC" -> "SETCAT"
+
+@
+<<IDPC.dotfull>>=
+"IndexedDirectProductCategory(a:SetCategory,b:OrderedSet)"
+ [color=lightblue,href="bookvol10.2.pdf#nameddest=IDPC"];
+"IndexedDirectProductCategory(a:SetCategory,b:OrderedSet)" ->
+   "SetCategory()"
+
+@
+<<IDPC.dotpic>>=
+digraph pic {
+ fontsize=10;
+ bgcolor="#FFFF66";
+ node [shape=box, color=white, style=filled];
+
+"IndexedDirectProductCategory(a:SetCategory,b:OrderedSet)" [color=lightblue];
+"IndexedDirectProductCategory(a:SetCategory,b:OrderedSet)" ->
+   "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{LiouvillianFunctionCategory}{LFCAT}
 \pagepic{ps/v102liouvillianfunctioncategory.ps}{LFCAT}{0.60}
 
@@ -5269,10 +5409,12 @@ digraph pic {
 \pageto{DifferentialVariableCategory}{DVARCAT}
 \pageto{ExpressionSpace}{ES}
 \pageto{FortranMachineTypeCategory}{FMTC}
+\pageto{IntervalCategory}{INTCAT}
 \pageto{OrderedAbelianSemiGroup}{OASGP}
 \pageto{OrderedFinite}{ORDFIN}
 \pageto{OrderedMonoid}{ORDMON}
 \pageto{PolynomialCategory}{POLYCAT}
+\pageto{QuotientFieldCategory}{QFCAT}
 \pagefrom{SetCategory}{SETCAT}
 
 {\bf Exports:}\\
@@ -5627,6 +5769,7 @@ operator ``*''. A Semigroup $G(S,*)$ is:
 \end{itemize}
 
 {\bf See:}\\
+\pageto{FunctionSpace}{FS}
 \pageto{Monoid}{MONOID}
 \pageto{Rng}{RNG}
 \pagefrom{SetCategory}{SETCAT}
@@ -5944,6 +6087,7 @@ digraph pic {
 
 {\bf See:}\\
 \pageto{FiniteFieldCategory}{FFIELDC}
+\pageto{QuotientFieldCategory}{QFCAT}
 \pageto{UnivariatePolynomialCategory}{UPOLYC}
 \pagefrom{SetCategory}{SETCAT}
 
@@ -6497,6 +6641,7 @@ digraph pic {
 
 {\bf See:}\\
 \pageto{CancellationAbelianMonoid}{CABMON}
+\pageto{FunctionSpace}{FS}
 \pageto{OrderedAbelianMonoid}{OAMON}
 \pageto{OrderedAbelianSemiGroup}{OASGP}
 \pagefrom{AbelianSemiGroup}{ABELSG}
@@ -7399,6 +7544,7 @@ digraph pic {
 \pagepic{ps/v102expressionspace.ps}{ES}{0.35}
 
 {\bf See:}\\
+\pageto{FunctionSpace}{FS}
 \pagefrom{Evalable}{EVALAB}
 \pagefrom{InnerEvalable}{IEVALAB}
 \pagefrom{OrderedSet}{ORDSET}
@@ -7442,7 +7588,6 @@ digraph pic {
 \cross{ES}{?\~{}=?} &&
 \end{tabular}
 
-
 These are directly exported but not implemented:
 \begin{verbatim}
  definingPolynomial : % -> % if $ has RING
@@ -7868,8 +8013,7 @@ digraph pic {
  bgcolor="#FFFF66";
  node [shape=box, color=white, style=filled];
 
-"ExpressionSpace()"
- [color=lightblue,href="bookvol10.2.pdf#nameddest=ES"];
+"ExpressionSpace()" [color=lightblue];
 "ExpressionSpace()" -> "OrderedSet()"
 "ExpressionSpace()" -> "RetractableTo(Kernel(ExpressionSpace))"
 "ExpressionSpace()" ->
@@ -8532,6 +8676,7 @@ digraph pic {
 \pagepic{ps/v102monoid.ps}{MONOID}{0.75}
 
 {\bf See:}\\
+\pageto{FunctionSpace}{FS}
 \pageto{Group}{GROUP}
 \pageto{OrderedMonoid}{ORDMON}
 \pageto{OrderedRing}{ORDRING}
@@ -9861,6 +10006,7 @@ digraph pic {
 
 {\bf See:}\\
 \pageto{AbelianGroup}{ABELGRP}
+\pageto{FreeAbelianMonoidCategory}{FAMONC}
 \pageto{OrderedCancellationAbelianMonoid}{OCAMON}
 \pagefrom{AbelianMonoid}{ABELMON}
 
@@ -10438,6 +10584,7 @@ digraph pic {
 \pagepic{ps/v102group.ps}{GROUP}{0.65}
 
 {\bf See:}\\
+\pageto{FunctionSpace}{FS}
 \pagefrom{Monoid}{MONOID}
 
 {\bf Exports:}\\
@@ -12493,6 +12640,7 @@ digraph pic {
 
 {\bf See:}\\
 \pageto{FiniteDivisorCategory}{FDIVCAT}
+\pageto{FunctionSpace}{FS}
 \pageto{LeftModule}{LMODULE}
 \pageto{NonAssociativeRng}{NARNG}
 \pageto{OrderedAbelianGroup}{OAGROUP}
@@ -13973,6 +14121,191 @@ digraph pic {
 
 "..." [color=lightblue];
 }
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\pagehead{FreeAbelianMonoidCategory}{FAMONC}
+\pagepic{ps/v102freeabelianmonoidcategory.ps}{FAMONC}{0.50}
+
+{\bf See:}\\
+\pagefrom{CancellationAbelianMonoid}{CABMON}
+\pagefrom{RetractableTo}{RETRACT}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\cross{FAMONC}{0} &
+\cross{FAMONC}{coefficient} &
+\cross{FAMONC}{coerce} &
+\cross{FAMONC}{hash} &
+\cross{FAMONC}{highCommonTerms} \\
+\cross{FAMONC}{latex} &
+\cross{FAMONC}{mapCoef} &
+\cross{FAMONC}{mapGen} &
+\cross{FAMONC}{nthCoef} &
+\cross{FAMONC}{nthFactor} \\
+\cross{FAMONC}{retract} &
+\cross{FAMONC}{retractIfCan} &
+\cross{FAMONC}{sample} &
+\cross{FAMONC}{size} &
+\cross{FAMONC}{subtractIfCan} \\
+\cross{FAMONC}{terms} &
+\cross{FAMONC}{zero?} &
+\cross{FAMONC}{?*?} &
+\cross{FAMONC}{?+?} &
+\cross{FAMONC}{?=?} \\
+\cross{FAMONC}{?\~{}=?} &&&&
+\end{tabular}
+
+These are directly exported but not implemented:
+\begin{verbatim}
+ coefficient : (S,%) -> E             
+ highCommonTerms : (%,%) -> % if E has OAMON
+ mapCoef : ((E -> E),%) -> %
+ mapGen : ((S -> S),%) -> %           
+ nthCoef : (%,Integer) -> E
+ nthFactor : (%,Integer) -> S         
+ size : % -> NonNegativeInteger
+ terms : % -> List Record(gen: S,exp: E)
+ ?+? : (S,%) -> %                     
+ ?*? : (E,S) -> %                     
+\end{verbatim}
+
+These exports come from \refto{CancellationAbelianMonoid}():
+\begin{verbatim}
+ 0 : () -> %
+ coerce : % -> OutputForm             
+ hash : % -> SingleInteger
+ latex : % -> String                  
+ sample : () -> %                     
+ subtractIfCan : (%,%) -> Union(%,"failed")
+ zero? : % -> Boolean                 
+ ?*? : (PositiveInteger,%) -> %
+ ?+? : (%,%) -> %
+ ?=? : (%,%) -> Boolean               
+ ?~=? : (%,%) -> Boolean
+ ?*? : (NonNegativeInteger,%) -> %
+\end{verbatim}
+
+These exports come from \refto{RetractableTo}(SetCategory):
+\begin{verbatim}
+ coerce : S -> %
+ retract : % -> S
+ retractIfCan : % -> Union(S,"failed")
+\end{verbatim}
+
+<<category FAMONC FreeAbelianMonoidCategory>>=
+)abbrev category FAMONC FreeAbelianMonoidCategory
+++ Category for free abelian monoid on any set of generators
+++ Author: Manuel Bronstein
+++ Date Created: November 1989
+++ Date Last Updated: 6 June 1991
+++ Description:
+++ A free abelian monoid on a set S is the monoid of finite sums of
+++ the form \spad{reduce(+,[ni * si])} where the si's are in S, and the ni's
+++ are in a given abelian monoid. The operation is commutative.
+FreeAbelianMonoidCategory(S: SetCategory, E:CancellationAbelianMonoid): _
+  Category == Join(CancellationAbelianMonoid, RetractableTo S) with
+        "+"        : (S, $) -> $
+          ++ s + x returns the sum of s and x.
+        "*"        : (E, S) -> $
+          ++ e * s returns e times s.
+        size       : $ -> NonNegativeInteger
+          ++ size(x) returns the number of terms in x.
+          ++ mapGen(f, a1\^e1 ... an\^en) returns 
+          ++\spad{f(a1)\^e1 ... f(an)\^en}.
+        terms      : $ -> List Record(gen: S, exp: E)
+          ++ terms(e1 a1 + ... + en an) returns \spad{[[a1, e1],...,[an, en]]}.
+        nthCoef    : ($, Integer) -> E
+          ++ nthCoef(x, n) returns the coefficient of the n^th term of x.
+        nthFactor  : ($, Integer) -> S
+          ++ nthFactor(x, n) returns the factor of the n^th term of x.
+        coefficient: (S, $) -> E
+          ++ coefficient(s, e1 a1 + ... + en an) returns ei such that
+          ++ ai = s, or 0 if s is not one of the ai's.
+        mapCoef    : (E -> E, $) -> $
+          ++ mapCoef(f, e1 a1 +...+ en an) returns
+          ++ \spad{f(e1) a1 +...+ f(en) an}.
+        mapGen     : (S -> S, $) -> $
+          ++ mapGen(f, e1 a1 +...+ en an) returns
+          ++ \spad{e1 f(a1) +...+ en f(an)}.
+        if E has OrderedAbelianMonoid then
+          highCommonTerms: ($, $) -> $
+            ++ highCommonTerms(e1 a1 + ... + en an, f1 b1 + ... + fm bm) 
+            ++ returns \spad{reduce(+,[max(ei, fi) ci])}
+            ++ where ci ranges in the intersection
+            ++ of \spad{{a1,...,an}} and \spad{{b1,...,bm}}.
+
+@
+<<FAMONC.dotabb>>=
+"FAMONC"
+  [color=lightblue,href="bookvol10.2.pdf#nameddest=FAMONC"];
+"FAMONC" -> "CABMON"
+"FAMONC" -> "RETRACT"
+
+@
+<<FAMONC.dotfull>>=
+"FreeAbelianMonoidCategory(a:SetCategory,b:CancellationAbelianMonoid)"
+  [color=lightblue,href="bookvol10.2.pdf#nameddest=FAMONC"];
+"FreeAbelianMonoidCategory(a:SetCategory,b:CancellationAbelianMonoid)" ->
+   "CancellationAbelianMonoid()"
+"FreeAbelianMonoidCategory(a:SetCategory,b:CancellationAbelianMonoid)" ->
+   "RetractableTo(SetCategory)"
+
+@
+<<FAMONC.dotpic>>=
+digraph pic {
+ fontsize=10;
+ bgcolor="#FFFF66";
+ node [shape=box, color=white, style=filled];
+
+"FreeAbelianMonoidCategory(a:SetCategory,b:CancellationAbelianMonoid)"
+  [color=lightblue];
+"FreeAbelianMonoidCategory(a:SetCategory,b:CancellationAbelianMonoid)" ->
+   "CancellationAbelianMonoid()"
+"FreeAbelianMonoidCategory(a:SetCategory,b:CancellationAbelianMonoid)" ->
+   "RetractableTo(SetCategory)"
+
+"RetractableTo(SetCategory)" [color=seagreen];
+"RetractableTo(SetCategory)" -> "RetractableTo(a:Type)"
+
+"RetractableTo(a:Type)" [color=lightblue];
+"RetractableTo(a:Type)" -> "Category"
+
+"CancellationAbelianMonoid()" [color=lightblue];
+"CancellationAbelianMonoid()" -> "AbelianMonoid()"
+
+"AbelianMonoid()" [color=lightblue];
+"AbelianMonoid()" -> "AbelianSemiGroup()"
+
+"AbelianSemiGroup()" [color=lightblue];
+"AbelianSemiGroup()" -> "SetCategory()"
+"AbelianSemiGroup()" -> "RepeatedDoubling(AbelianSemiGroup)"
+
+"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"
+
+"RepeatedDoubling(AbelianSemiGroup)" [color="#00EE00"];
+"RepeatedDoubling(AbelianSemiGroup)" -> "RepeatedDoubling(a:SetCategory)"
+
+"RepeatedDoubling(a:SetCategory)" [color="#00EE00"];
+"RepeatedDoubling(a:SetCategory)" -> "Package"
+
+"Package" [color="#00EE00"];
+
+"Category" [color=lightblue];
+}
+
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \pagehead{MultiDictionary}{MDAGG}
@@ -20710,6 +21043,7 @@ digraph pic {
 \pageto{DifferentialExtension}{DIFEXT}
 \pageto{DifferentialRing}{DIFRING}
 \pageto{EntireRing}{ENTIRER}
+\pageto{FunctionSpace}{FS}
 \pageto{LeftAlgebra}{LALG}
 \pageto{LinearlyExplicitRingOver}{LINEXP}
 \pageto{OrderedRing}{ORDRING}
@@ -21525,6 +21859,8 @@ digraph pic {
 {\bf See:}\\
 \pageto{FieldOfPrimeCharacteristic}{FPC}
 \pageto{FiniteRankAlgebra}{FINRALG}
+\pageto{FunctionSpace}{FS}
+\pageto{QuotientFieldCategory}{QFCAT}
 \pagefrom{Ring}{RING}
 
 {\bf Exports:}\\
@@ -21566,8 +21902,9 @@ These are directly exported but not implemented:
 
 These exports come from \refto{Ring}():
 \begin{verbatim}
- 1 : () -> %                          
  0 : () -> %
+ 1 : () -> %                          
+ characteristic : () -> NonNegativeInteger
  coerce : Integer -> %
  coerce : % -> OutputForm             
  hash : % -> SingleInteger
@@ -21575,9 +21912,8 @@ These exports come from \refto{Ring}():
  one? : % -> Boolean
  recip : % -> Union(%,"failed")       
  sample : () -> %
- zero? : % -> Boolean                 
- characteristic : () -> NonNegativeInteger
  subtractIfCan : (%,%) -> Union(%,"failed")
+ zero? : % -> Boolean                 
  ?~=? : (%,%) -> Boolean
  ?^? : (%,NonNegativeInteger) -> %
  ?^? : (%,PositiveInteger) -> %       
@@ -21672,6 +22008,8 @@ digraph pic {
 
 {\bf See:}\\
 \pageto{FiniteRankAlgebra}{FINRALG}
+\pageto{FunctionSpace}{FS}
+\pageto{QuotientFieldCategory}{QFCAT}
 \pageto{RealNumberSystem}{RNS}
 \pagefrom{Ring}{RING}
 
@@ -21708,8 +22046,9 @@ unitsKnown means that  the operation {\tt recip} can only return
 
 These exports come from \refto{Ring}():
 \begin{verbatim}
- 1 : () -> %                          
  0 : () -> %
+ 1 : () -> %                          
+ characteristic : () -> NonNegativeInteger
  coerce : Integer -> %
  coerce : % -> OutputForm             
  hash : % -> SingleInteger
@@ -21717,9 +22056,8 @@ These exports come from \refto{Ring}():
  one? : % -> Boolean
  recip : % -> Union(%,"failed")       
  sample : () -> %
- zero? : % -> Boolean                 
- characteristic : () -> NonNegativeInteger
  subtractIfCan : (%,%) -> Union(%,"failed")
+ zero? : % -> Boolean                 
  ?~=? : (%,%) -> Boolean
  ?^? : (%,NonNegativeInteger) -> %
  ?^? : (%,PositiveInteger) -> %       
@@ -21811,6 +22149,7 @@ digraph pic {
 
 {\bf See:}\\
 \pageto{IntegralDomain}{INTDOM}
+\pageto{FunctionSpace}{FS}
 \pageto{MonogenicAlgebra}{MONOGEN}
 \pageto{PolynomialCategory}{POLYCAT}
 \pageto{UnivariatePolynomialCategory}{UPOLYC}
@@ -23048,6 +23387,7 @@ digraph pic {
 
 {\bf See:}\\
 \pageto{DifferentialExtension}{DIFEXT}
+\pageto{FunctionSpace}{FS}
 \pageto{PolynomialCategory}{POLYCAT}
 \pagefrom{Ring}{RING}
 
@@ -24036,6 +24376,7 @@ digraph pic {
 \pagepic{ps/v102fullylinearlyexplicitringover.ps}{FLINEXP}{1.00}
 
 {\bf See:}\\
+\pageto{FunctionSpace}{FS}
 \pageto{MonogenicAlgebra}{MONOGEN}
 \pageto{PolynomialCategory}{POLYCAT}
 \pageto{QuotientFieldCategory}{QFCAT}
@@ -24676,6 +25017,7 @@ digraph pic {
 {\bf See:}\\
 \pageto{DivisionRing}{DIVRING}
 \pageto{FiniteRankAlgebra}{FINRALG}
+\pageto{FunctionSpace}{FS}
 \pageto{IntegralDomain}{INTDOM}
 \pageto{QuotientFieldCategory}{QFCAT}
 \pagefrom{Module}{MODULE}
@@ -25387,15 +25729,15 @@ digraph pic {
 {\bf Attributes Exported:}
 \begin{itemize}
 \item if Ring has noZeroDivisors then noZeroDivisors where
-{\bf \cross{FIELD}{noZeroDivisors}}
+{\bf \cross{XPOLYC}{noZeroDivisors}}
 is true if $x * y \ne 0$ implies both x and y are non-zero.
-\item {\bf \cross{FIELD}{unitsKnown}}
+\item {\bf \cross{XPOLYC}{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{FIELD}{leftUnitary}}
+\item {\bf \cross{XPOLYC}{leftUnitary}}
 is true if $1 * x = x$ for all x.
-\item {\bf \cross{FIELD}{rightUnitary}}
+\item {\bf \cross{XPOLYC}{rightUnitary}}
 is true if $x * 1 = x$ for all x.
 \end{itemize}
 
@@ -26899,6 +27241,7 @@ digraph pic {
 
 {\bf See:}\\
 \pageto{FortranMachineTypeCategory}{FMTC}
+\pageto{FunctionSpace}{FS}
 \pageto{GcdDomain}{GCDDOM}
 \pageto{OrderedIntegralDomain}{OINTDOM}
 \pageto{UnivariatePolynomialCategory}{UPOLYC}
@@ -27937,6 +28280,7 @@ digraph pic {
 \pagepic{ps/v102gcddomain.ps}{GCDDOM}{0.65}
 
 {\bf See:}\\
+\pageto{IntervalCategory}{INTCAT}
 \pageto{PolynomialCategory}{POLYCAT}
 \pageto{PrincipalIdealDomain}{PID}
 \pageto{UniqueFactorizationDomain}{UFD}
@@ -28163,6 +28507,7 @@ digraph pic {
 
 {\bf See:}\\
 \pagefrom{IntegralDomain}{INTDOM}
+\pagefrom{QuotientFieldCategory}{QFCAT}
 \pagefrom{OrderedRing}{ORDRING}
 
 {\bf Exports:}\\
@@ -28351,6 +28696,354 @@ digraph pic {
 @
 \chapter{Category Layer 14}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\pagehead{IntervalCategory}{INTCAT}
+\pagepic{ps/v102intervalcategory.ps}{INTCAT}{0.60}
+
+{\bf See:}\\
+\pagefrom{GcdDomain}{GCDDOM}
+\pagefrom{OrderedSet}{ORDSET}
+\pagefrom{RadicalCategory}{RADCAT}
+\pagefrom{RetractableTo}{RETRACT}
+\pagefrom{TranscendentalFunctionCategory}{TRANFUN}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\cross{INTCAT}{0} &
+\cross{INTCAT}{1} &
+\cross{INTCAT}{acos} &
+\cross{INTCAT}{acosh} &
+\cross{INTCAT}{acot} \\
+\cross{INTCAT}{acoth} &
+\cross{INTCAT}{acsc} &
+\cross{INTCAT}{acsch} &
+\cross{INTCAT}{asec} &
+\cross{INTCAT}{asech} \\
+\cross{INTCAT}{asin} &
+\cross{INTCAT}{asinh} &
+\cross{INTCAT}{associates?} &
+\cross{INTCAT}{atan} &
+\cross{INTCAT}{atanh} \\
+\cross{INTCAT}{characteristic} &
+\cross{INTCAT}{coerce} &
+\cross{INTCAT}{contains?} &
+\cross{INTCAT}{cos} &
+\cross{INTCAT}{cosh} \\
+\cross{INTCAT}{cot} &
+\cross{INTCAT}{coth} &
+\cross{INTCAT}{csc} &
+\cross{INTCAT}{csch} &
+\cross{INTCAT}{exp} \\
+\cross{INTCAT}{exquo} &
+\cross{INTCAT}{gcd} &
+\cross{INTCAT}{gcdPolynomial} &
+\cross{INTCAT}{hash} &
+\cross{INTCAT}{inf} \\
+\cross{INTCAT}{interval} &
+\cross{INTCAT}{latex} &
+\cross{INTCAT}{lcm} &
+\cross{INTCAT}{log} &
+\cross{INTCAT}{max} \\
+\cross{INTCAT}{min} &
+\cross{INTCAT}{negative?} &
+\cross{INTCAT}{nthRoot} &
+\cross{INTCAT}{one?} &
+\cross{INTCAT}{pi} \\
+\cross{INTCAT}{positive?} &
+\cross{INTCAT}{qinterval} &
+\cross{INTCAT}{recip} &
+\cross{INTCAT}{retract} &
+\cross{INTCAT}{retractIfCan} \\
+\cross{INTCAT}{sample} &
+\cross{INTCAT}{sec} &
+\cross{INTCAT}{sech} &
+\cross{INTCAT}{sin} &
+\cross{INTCAT}{sinh} \\
+\cross{INTCAT}{sqrt} &
+\cross{INTCAT}{subtractIfCan} &
+\cross{INTCAT}{sup} &
+\cross{INTCAT}{tan} &
+\cross{INTCAT}{tanh} \\
+\cross{INTCAT}{unit?} &
+\cross{INTCAT}{unitCanonical} &
+\cross{INTCAT}{unitNormal} &
+\cross{INTCAT}{width} &
+\cross{INTCAT}{zero?} \\
+\cross{INTCAT}{?*?} &
+\cross{INTCAT}{?**?} &
+\cross{INTCAT}{?+?} &
+\cross{INTCAT}{?-?} &
+\cross{INTCAT}{-?} \\
+\cross{INTCAT}{?$<$?} &
+\cross{INTCAT}{?$<=$?} &
+\cross{INTCAT}{?=?} &
+\cross{INTCAT}{?$>$?} &
+\cross{INTCAT}{?$>=$?} \\
+\cross{INTCAT}{?\^{}?} &
+\cross{INTCAT}{?\~{}=?} &&&
+\end{tabular}
+
+{\bf Attributes Exported:}
+\begin{itemize}
+\item {\bf \cross{INTCAT}{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{INTCAT}{leftUnitary}}
+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("*")}}
+is true if it has an operation $"*": (D,D) -> D$
+which is commutative.
+\item {\bf \cross{INTCAT}{noZeroDivisors}}
+is true if $x * y \ne 0$ implies both x and y are non-zero.
+\item {\bf \cross{INTCAT}{approximate}} means ``is an approximation to
+the real numbers''.
+\end{itemize}
+
+TPDHERE: Note that the signature \verb|coerce : Integer -> %| shows
+up twice.
+
+These are directly exported but not implemented:
+\begin{verbatim}
+ contains? : (%,R) -> Boolean         
+ inf : % -> R
+ interval : (R,R) -> %                
+ interval : R -> %
+ interval : Fraction Integer -> %     
+ negative? : % -> Boolean
+ positive? : % -> Boolean
+ qinterval : (R,R) -> %               
+ sup : % -> R
+ width : % -> R                       
+\end{verbatim}
+
+These exports come from \refto{GcdDomain}():
+\begin{verbatim}
+ 0 : () -> %
+ 1 : () -> %                          
+ associates? : (%,%) -> Boolean
+ characteristic : () -> NonNegativeInteger
+ coerce : % -> %
+ coerce : Integer -> %                
+ coerce : % -> OutputForm
+ exquo : (%,%) -> Union(%,"failed")
+ gcd : (%,%) -> %
+ gcd : List % -> %                    
+ gcdPolynomial : 
+  (SparseUnivariatePolynomial %,
+   SparseUnivariatePolynomial %) -> 
+     SparseUnivariatePolynomial %
+ hash : % -> SingleInteger            
+ latex : % -> String
+ lcm : List % -> %                    
+ lcm : (%,%) -> %
+ one? : % -> Boolean
+ recip : % -> Union(%,"failed")
+ sample : () -> %
+ subtractIfCan : (%,%) -> Union(%,"failed")
+ unit? : % -> Boolean                 
+ unitCanonical : % -> %
+ unitNormal : % -> Record(unit: %,canonical: %,associate: %)
+ zero? : % -> Boolean
+ ?+? : (%,%) -> %                     
+ ?=? : (%,%) -> Boolean
+ ?~=? : (%,%) -> Boolean              
+ ?*? : (%,%) -> %                     
+ ?*? : (Integer,%) -> %
+ ?*? : (PositiveInteger,%) -> %       
+ ?*? : (NonNegativeInteger,%) -> %
+ ?-? : (%,%) -> %
+ -? : % -> %                          
+ ?**? : (%,PositiveInteger) -> %
+ ?**? : (%,NonNegativeInteger) -> %
+ ?^? : (%,PositiveInteger) -> %       
+ ?^? : (%,NonNegativeInteger) -> %
+\end{verbatim}
+
+These exports come from \refto{OrderedSet}():
+\begin{verbatim}
+ max : (%,%) -> %
+ min : (%,%) -> %                     
+ ?<=? : (%,%) -> Boolean              
+ ?>? : (%,%) -> Boolean               
+ ?>=? : (%,%) -> Boolean
+ ?<? : (%,%) -> Boolean
+\end{verbatim}
+
+These exports come from \refto{TranscendentalFunctionCategory}():
+\begin{verbatim}
+ acos : % -> %
+ acosh : % -> %                       
+ acot : % -> %
+ acoth : % -> %                       
+ acsc : % -> %
+ acsch : % -> %                       
+ asec : % -> %
+ asech : % -> %                       
+ asin : % -> %
+ asinh : % -> %                       
+ atan : % -> %                        
+ atanh : % -> %
+ cos : % -> %
+ cosh : % -> %                        
+ cot : % -> %
+ coth : % -> %                        
+ csc : % -> %
+ csch : % -> %                        
+ exp : % -> %
+ log : % -> %                         
+ pi : () -> %                         
+ sec : % -> %                         
+ sech : % -> %
+ sin : % -> %                         
+ sinh : % -> %
+ tan : % -> %                         
+ tanh : % -> %
+ ?**? : (%,%) -> %                    
+\end{verbatim}
+
+These exports come from \refto{RadicalCategory}():
+\begin{verbatim}
+ nthRoot : (%,Integer) -> %           
+ sqrt : % -> %                        
+ ?**? : (%,Fraction Integer) -> %
+\end{verbatim}
+
+These exports come from \refto{RetractableTo}(Integer):
+\begin{verbatim}
+ coerce : Integer -> %                
+ retract : % -> Integer               
+ retractIfCan : % -> Union(Integer,"failed")
+\end{verbatim}
+
+<<category INTCAT IntervalCategory>>=
+)abbrev category INTCAT IntervalCategory
++++ Author: Mike Dewar
++++ Date Created: November 1996
++++ Date Last Updated:
++++ Basic Functions:
++++ Related Constructors: 
++++ Also See:
++++ AMS Classifications:
++++ Keywords:
++++ References:
++++ Description:
++++ This category implements of interval arithmetic and transcendental
++++ functions over intervals.
+IntervalCategory(R: Join(FloatingPointSystem,TranscendentalFunctionCategory)):
+ Category == _
+  Join(GcdDomain, OrderedSet, TranscendentalFunctionCategory, _
+       RadicalCategory, RetractableTo(Integer)) with
+  approximate
+  interval : (R,R) -> %
+    ++ interval(inf,sup) creates a new interval, either \axiom{[inf,sup]} if
+    ++ \axiom{inf <= sup} or \axiom{[sup,in]} otherwise.
+  qinterval : (R,R) -> %
+    ++ qinterval(inf,sup) creates a new interval \axiom{[inf,sup]}, without
+    ++ checking the ordering on the elements.
+  interval : R -> %
+    ++ interval(f) creates a new interval around f.
+  interval : Fraction Integer -> %
+    ++ interval(f) creates a new interval around f.
+  inf : % -> R
+    ++ inf(u) returns the infinum of \axiom{u}.
+  sup : % -> R
+    ++ sup(u) returns the supremum of \axiom{u}.
+  width : % -> R
+    ++ width(u) returns \axiom{sup(u) - inf(u)}.
+  positive? : % -> Boolean
+    ++ positive?(u) returns \axiom{true} if every element of u is positive,
+    ++ \axiom{false} otherwise.
+  negative? : % -> Boolean
+    ++ negative?(u) returns \axiom{true} if every element of u is negative,
+    ++ \axiom{false} otherwise.
+  contains? : (%,R) -> Boolean
+    ++ contains?(i,f) returns true if \axiom{f} is contained within the 
+    ++ interval \axiom{i}, false otherwise.
+
+@
+<<INTCAT.dotabb>>=
+"INTCAT"
+ [color=lightblue,href="bookvol10.2.pdf#nameddest=INTCAT"];
+"INTCAT" -> "GCDDOM"
+"INTCAT" -> "ORDSET"
+"INTCAT" -> "RADCAT"
+"INTCAT" -> "RETRACT"
+"INTCAT" -> "TRANFUN"
+
+@
+<<INTCAT.dotfull>>=
+"IntervalCategory(a:Join(FloatingPointSystem,TranscendentalFunctionCategory))"
+ [color=lightblue,href="bookvol10.2.pdf#nameddest=INTCAT"];
+"IntervalCategory(a:Join(FloatingPointSystem,TranscendentalFunctionCategory))"
+  -> "GcdDomain()"
+"IntervalCategory(a:Join(FloatingPointSystem,TranscendentalFunctionCategory))"
+  -> "OrderedSet()"
+"IntervalCategory(a:Join(FloatingPointSystem,TranscendentalFunctionCategory))"
+  -> "TranscendentalFunctionCategory()" 
+"IntervalCategory(a:Join(FloatingPointSystem,TranscendentalFunctionCategory))"
+  -> "RadicalCategory()" 
+"IntervalCategory(a:Join(FloatingPointSystem,TranscendentalFunctionCategory))"
+  -> "RetractableTo(Integer)"
+
+@
+<<INTCAT.dotpic>>=
+digraph pic {
+ fontsize=10;
+ bgcolor="#FFFF66";
+ node [shape=box, color=white, style=filled];
+
+"IntervalCategory(a:Join(FloatingPointSystem,TranscendentalFunctionCategory))"
+ [color=lightblue];
+"IntervalCategory(a:Join(FloatingPointSystem,TranscendentalFunctionCategory))"
+  -> "GcdDomain()"
+"IntervalCategory(a:Join(FloatingPointSystem,TranscendentalFunctionCategory))"
+  -> "ORDSET..."
+"IntervalCategory(a:Join(FloatingPointSystem,TranscendentalFunctionCategory))"
+  -> "TRANFUN..."
+"IntervalCategory(a:Join(FloatingPointSystem,TranscendentalFunctionCategory))"
+  -> "RADCAT..."
+"IntervalCategory(a:Join(FloatingPointSystem,TranscendentalFunctionCategory))"
+  -> "RETRACT..."
+
+"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)" ->
+  "BiModule(a:CommutativeRing,b:CommutativeRing)"
+
+"BiModule(a:CommutativeRing,b:CommutativeRing)" [color=seagreen];
+"BiModule(a:CommutativeRing,b:CommutativeRing)" -> "BMODULE..."
+
+"RETRACT..." [color=lightblue];
+"RADCAT..." [color=lightblue];
+"TRANFUN..." [color=lightblue];
+"ORDSET..." [color=lightblue];
+"BMODULE..." [color=lightblue];
+"RING..." [color=lightblue];
+}
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \pagehead{PrincipalIdealDomain}{PID}
 \pagepic{ps/v102principalidealdomain.ps}{PID}{0.65}
 
@@ -28752,6 +29445,7 @@ digraph pic {
 
 {\bf See:}\\
 \pageto{Field}{FIELD}
+\pageto{QuotientFieldCategory}{QFCAT}
 \pagefrom{PrincipalIdealDomain}{PID}
 
 {\bf Exports:}\\
@@ -29079,6 +29773,7 @@ digraph pic {
 
 {\bf See:}\\
 \pageto{PolynomialCategory}{POLYCAT}
+\pageto{QuotientFieldCategory}{QFCAT}
 \pageto{UnivariatePolynomialCategory}{UPOLYC}
 \pagefrom{UniqueFactorizationDomain}{UFD}
 
@@ -29355,6 +30050,7 @@ digraph pic {
 \pageto{ExtensionField}{XF}
 \pageto{FieldOfPrimeCharacteristic}{FPC}
 \pageto{FiniteRankAlgebra}{FINRALG}
+\pageto{FunctionSpace}{FS}
 \pageto{QuotientFieldCategory}{QFCAT}
 \pageto{RealNumberSystem}{RNS}
 \pageto{UnivariatePolynomialCategory}{UPOLYC}
@@ -32154,18 +32850,1288 @@ digraph pic {
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\pagehead{FunctionSpace}{FS}
+\pagepic{ps/v102functionspace.ps}{FS}{0.65}
+
+{\bf See:}\\
+\pagefrom{AbelianGroup}{ABELGRP}
+\pagefrom{AbelianMonoid}{ABELMON}
+\pagefrom{AbelianSemiGroup}{ABELSG}
+\pagefrom{Algebra}{ALGEBRA}
+\pagefrom{CharacteristicNonZero}{CHARNZ}
+\pagefrom{CharacteristicZero}{CHARZ}
+\pagefrom{CommutativeRing}{COMRING}
+\pagefrom{ConvertibleTo}{KONVERT}
+\pagefrom{ExpressionSpace}{ES}
+\pagefrom{Field}{FIELD}
+\pagefrom{FullyLinearlyExplicitRingOver}{FLINEXP}
+\pagefrom{FullyPatternMatchable}{FPATMAB}
+\pagefrom{FullyRetractableTo}{FRETRCT}
+\pagefrom{Group}{GROUP}
+\pagefrom{IntegralDomain}{INTDOM}
+\pagefrom{Monoid}{MONOID}
+\pagefrom{PartialDifferentialRing}{PDRING}
+\pagefrom{Patternable}{PATAB}
+\pagefrom{RetractableTo}{RETRACT}
+\pagefrom{Ring}{RING}
+\pagefrom{SemiGroup}{SGROUP}
+
+{\bf Exports:}\\
+\begin{tabular}{llll}
+\cross{FS}{0} &
+\cross{FS}{1} &
+\cross{FS}{applyQuote} &
+\cross{FS}{associates?} \\
+\cross{FS}{belong?} &
+\cross{FS}{box} &
+\cross{FS}{characteristic} &
+\cross{FS}{charthRoot} \\
+\cross{FS}{coerce} &
+\cross{FS}{commutator} &
+\cross{FS}{conjugate} &
+\cross{FS}{convert} \\
+\cross{FS}{D} &
+\cross{FS}{definingPolynomial} &
+\cross{FS}{denom} &
+\cross{FS}{denominator} \\
+\cross{FS}{differentiate} &
+\cross{FS}{distribute} &
+\cross{FS}{divide} &
+\cross{FS}{elt} \\
+\cross{FS}{eval} &
+\cross{FS}{euclideanSize} &
+\cross{FS}{even?} &
+\cross{FS}{expressIdealMember} \\
+\cross{FS}{exquo} &
+\cross{FS}{extendedEuclidean} &
+\cross{FS}{factor} &
+\cross{FS}{freeOf?} \\
+\cross{FS}{gcd} &
+\cross{FS}{gcdPolynomial} &
+\cross{FS}{ground} &
+\cross{FS}{ground?} \\
+\cross{FS}{hash} &
+\cross{FS}{height} &
+\cross{FS}{inv} &
+\cross{FS}{is?} \\
+\cross{FS}{isExpt} &
+\cross{FS}{isMult} &
+\cross{FS}{isPlus} &
+\cross{FS}{isPower} \\
+\cross{FS}{isTimes} &
+\cross{FS}{kernel} &
+\cross{FS}{kernels} &
+\cross{FS}{latex} \\
+\cross{FS}{lcm} &
+\cross{FS}{mainKernel} &
+\cross{FS}{map} &
+\cross{FS}{max} \\
+\cross{FS}{min} &
+\cross{FS}{minPoly} &
+\cross{FS}{multiEuclidean} &
+\cross{FS}{numer} \\
+\cross{FS}{numerator} &
+\cross{FS}{odd?} &
+\cross{FS}{one?} &
+\cross{FS}{operator} \\
+\cross{FS}{operators} &
+\cross{FS}{paren} &
+\cross{FS}{patternMatch} &
+\cross{FS}{prime?} \\
+\cross{FS}{principalIdeal} &
+\cross{FS}{recip} &
+\cross{FS}{reducedSystem} &
+\cross{FS}{retract} \\
+\cross{FS}{retractIfCan} &
+\cross{FS}{sample} &
+\cross{FS}{sizeLess?} &
+\cross{FS}{squareFree} \\
+\cross{FS}{squareFreePart} &
+\cross{FS}{subst} &
+\cross{FS}{subtractIfCan} &
+\cross{FS}{tower} \\
+\cross{FS}{unit?} &
+\cross{FS}{unitCanonical} &
+\cross{FS}{unitNormal} &
+\cross{FS}{univariate} \\
+\cross{FS}{variables} &
+\cross{FS}{zero?} &
+\cross{FS}{-?} &
+\cross{FS}{?$<$?} \\
+\cross{FS}{?$<=$?} &
+\cross{FS}{?=?} &
+\cross{FS}{?$>$?} &
+\cross{FS}{?$>=$?} \\
+\cross{FS}{?\~{}=?} &
+\cross{FS}{?*?} &
+\cross{FS}{?**?} &
+\cross{FS}{?+?} \\
+\cross{FS}{?-?} &
+\cross{FS}{?/?} &
+\cross{FS}{?\^{}?} &
+\cross{FS}{?quo?} \\
+\cross{FS}{?rem?} &&&
+\end{tabular}
+
+{\bf Attributes Exported:}
+\begin{itemize}
+\item if \$ has IntegralDomain then noZeroDivisors where
+{\bf \cross{FS}{noZeroDivisors}}
+is true if $x * y \ne 0$ implies both x and y are non-zero.
+\item if \$ has IntegralDomain then canonicalUnitNormal
+ where {\bf \cross{FS}{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 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("*")}}
+is true if it has an operation $"*": (D,D) -> D$
+which is commutative.
+\item if \$ has Ring or Group then unitsKnown where
+{\bf \cross{FS}{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 \$ has CommutativeRing then leftUnitary where
+{\bf \cross{FS}{leftUnitary}}
+is true if $1 * x = x$ for all x.
+\item if \$ has CommutativeRing then rightUnitary where
+{\bf \cross{FS}{rightUnitary}}
+is true if $x * 1 = x$ for all x.
+\item {\bf nil}
+\end{itemize}
+
+
+These are directly exported but not implemented:
+\begin{verbatim}
+ coerce : SparseMultivariatePolynomial(R,Kernel %) -> % 
+     if R has RING
+ coerce : Fraction R -> % if R has INTDOM
+ coerce : Polynomial Fraction R -> % if R has INTDOM
+ denom : % -> SparseMultivariatePolynomial(R,Kernel %) 
+     if R has INTDOM
+ eval : (%,List BasicOperator,List %,Symbol) -> % 
+     if R has KONVERT INFORM
+ numer : % -> SparseMultivariatePolynomial(R,Kernel %) 
+     if R has RING
+ ?/? : 
+   (SparseMultivariatePolynomial(R,Kernel %),
+    SparseMultivariatePolynomial(R,Kernel %)) -> % 
+     if R has INTDOM
+ ?**? : (%,NonNegativeInteger) -> % if R has SGROUP
+\end{verbatim}
+
+These are implemented by this category:
+\begin{verbatim}
+ applyQuote : (Symbol,%) -> %
+ applyQuote : (Symbol,%,%) -> %       
+ applyQuote : (Symbol,%,%,%) -> %
+ applyQuote : (Symbol,%,%,%,%) -> %
+ applyQuote : (Symbol,List %) -> %
+ belong? : BasicOperator -> Boolean   
+ characteristic : () -> NonNegativeInteger if R has RING
+ coerce : Symbol -> %                 
+ coerce : Kernel % -> %
+ coerce : % -> OutputForm             
+ coerce : Fraction Integer -> % 
+     if R has INTDOM 
+     or R has RETRACT INT 
+     and R has INTDOM 
+     or R has RETRACT FRAC INT
+ coerce : Fraction Polynomial R -> % if R has INTDOM
+ coerce : Fraction Polynomial Fraction R -> % 
+     if R has INTDOM
+ coerce : Polynomial R -> % if R has RING
+ convert : % -> Pattern Float if R has KONVERT PATTERN FLOAT
+ convert : % -> Pattern Integer if R has KONVERT PATTERN INT
+ convert : Factored % -> % if R has INTDOM
+ denominator : % -> % if R has INTDOM
+ differentiate : (%,Symbol) -> % if R has RING
+ elt : (BasicOperator,List %) -> %
+ eval : (%,List Symbol) -> % if R has KONVERT INFORM
+ eval : % -> % if R has KONVERT INFORM
+ eval : (%,Symbol) -> % if R has KONVERT INFORM
+ eval : (%,BasicOperator,%,Symbol) -> % 
+     if R has KONVERT INFORM
+ eval : (%,Symbol,NonNegativeInteger,(% -> %)) -> % 
+     if R has RING
+ eval : (%,Symbol,NonNegativeInteger,(List % -> %)) -> % 
+     if R has RING
+ eval : (%,List Symbol,List NonNegativeInteger,List (List % -> %)) -> % 
+     if R has RING
+ eval : (%,List Symbol,List NonNegativeInteger,List (% -> %)) -> % 
+     if R has RING
+ eval : (%,List Kernel %,List %) -> %
+ ground : % -> R                      
+ ground? : % -> Boolean
+ isExpt : (%,BasicOperator) ->
+    Union(Record(var: Kernel %,exponent: Integer),"failed") 
+     if R has RING
+ isExpt : % -> 
+   Union(Record(var: Kernel %,exponent: Integer),"failed") 
+     if R has SGROUP
+ isExpt : (%,Symbol) -> 
+   Union(Record(var: Kernel %,exponent: Integer),"failed") 
+     if R has RING
+ isMult : % -> 
+   Union(Record(coef: Integer,var: Kernel %),"failed") 
+     if R has ABELSG
+ isPlus : % -> Union(List %,"failed") if R has ABELSG
+ isPower : % -> 
+   Union(Record(val: %,exponent: Integer),"failed") 
+     if R has RING
+ isTimes : % -> Union(List %,"failed") if R has SGROUP
+ kernels : % -> List Kernel %         
+ mainKernel : % -> Union(Kernel %,"failed")
+ numerator : % -> % if R has RING
+ operator : BasicOperator -> BasicOperator
+ retract : % -> Fraction Polynomial R if R has INTDOM
+ retract : % -> Polynomial R if R has RING
+ retract : % -> R
+ retract : % -> Symbol                
+ retractIfCan : % -> Union(R,"failed")
+ retractIfCan : % -> Union(Fraction Polynomial R,"failed") 
+     if R has INTDOM
+ retractIfCan : % -> Union(Polynomial R,"failed") 
+     if R has RING
+ retractIfCan : % -> Union(Symbol,"failed")
+ subst : (%,List Kernel %,List %) -> %
+ univariate : (%,Kernel %) -> 
+   Fraction SparseUnivariatePolynomial % 
+     if R has INTDOM
+ variables : % -> List Symbol         
+ ?*? : (%,R) -> % if R has COMRING
+ ?*? : (R,%) -> % if R has COMRING
+\end{verbatim}
+
+These exports come from \refto{ExpressionSpace}():
+\begin{verbatim}
+ box : List % -> %
+ box : % -> %                         
+ definingPolynomial : % -> % if $ has RING
+ distribute : (%,%) -> %
+ distribute : % -> %                  
+ elt : (BasicOperator,%,%,%,%) -> %
+ elt : (BasicOperator,%,%,%) -> %
+ elt : (BasicOperator,%,%) -> %
+ elt : (BasicOperator,%) -> %         
+ eval : (%,List BasicOperator,List (% -> %)) -> %
+ eval : (%,List Equation %) -> %      
+ eval : (%,Symbol,(% -> %)) -> %
+ eval : (%,Symbol,(List % -> %)) -> %
+ eval : (%,BasicOperator,(% -> %)) -> %
+ eval : (%,BasicOperator,(List % -> %)) -> %
+ eval : (%,List Symbol,List (% -> %)) -> %
+ eval : (%,List BasicOperator,List (List % -> %)) -> %
+ eval : (%,List Symbol,List (List % -> %)) -> %
+ eval : (%,List %,List %) -> %
+ eval : (%,%,%) -> %                  
+ eval : (%,Equation %) -> %
+ eval : (%,Kernel %,%) -> %
+ even? : % -> Boolean if $ has RETRACT INT
+ freeOf? : (%,Symbol) -> Boolean      
+ freeOf? : (%,%) -> Boolean
+ hash : % -> SingleInteger            
+ height : % -> NonNegativeInteger
+ is? : (%,BasicOperator) -> Boolean
+ is? : (%,Symbol) -> Boolean          
+ kernel : (BasicOperator,%) -> %
+ kernel : (BasicOperator,List %) -> %
+ latex : % -> String
+ map : ((% -> %),Kernel %) -> %       
+ max : (%,%) -> %
+ min : (%,%) -> %                     
+ minPoly : Kernel % -> SparseUnivariatePolynomial % 
+     if $ has RING
+ odd? : % -> Boolean if $ has RETRACT INT
+ operators : % -> List BasicOperator
+ paren : List % -> %
+ paren : % -> %                       
+ retract : % -> Kernel %
+ retractIfCan : % -> Union(Kernel %,"failed")
+ subst : (%,List Equation %) -> %
+ subst : (%,Equation %) -> %          
+ tower : % -> List Kernel %
+ ?=? : (%,%) -> Boolean
+ ?~=? : (%,%) -> Boolean
+ ?<? : (%,%) -> Boolean
+ ?<=? : (%,%) -> Boolean              
+ ?>? : (%,%) -> Boolean               
+ ?>=? : (%,%) -> Boolean
+\end{verbatim}
+
+These exports come from \refto{RetractableTo}(Symbol):
+\begin{verbatim}
+\end{verbatim}
+
+These exports come from \refto{Patternable}(OrderedSet):
+\begin{verbatim}
+\end{verbatim}
+
+These exports come from \refto{FullyPatternMatchable}(OrderedSet):
+\begin{verbatim}
+ patternMatch : 
+   (%,Pattern Integer,PatternMatchResult(Integer,%)) -> 
+     PatternMatchResult(Integer,%) 
+       if R has PATMAB INT
+ patternMatch : 
+   (%,Pattern Float,PatternMatchResult(Float,%)) -> 
+     PatternMatchResult(Float,%) 
+       if R has PATMAB FLOAT
+\end{verbatim}
+
+These exports come from \refto{FullyRetractableTo}(OrderedSet):
+\begin{verbatim}
+ coerce : Integer -> % if R has RING or R has RETRACT INT
+ coerce : R -> %
+\end{verbatim}
+
+These exports come from \refto{ConvertibleTo}(InputForm):
+\begin{verbatim}
+ convert : % -> InputForm if R has KONVERT INFORM
+\end{verbatim}
+
+These exports come from \refto{SemiGroup}():
+\begin{verbatim}
+\end{verbatim}
+
+These exports come from \refto{Monoid}():
+\begin{verbatim}
+ 1 : () -> % if R has SGROUP          
+ one? : % -> Boolean if R has SGROUP
+ recip : % -> Union(%,"failed") if R has SGROUP
+ sample : () -> % if R has SGROUP or R has ABELSG
+ ?^? : (%,NonNegativeInteger) -> % if R has SGROUP
+ ?*? : (%,%) -> % if R has SGROUP
+ ?**? : (%,PositiveInteger) -> % if R has SGROUP
+ ?^? : (%,PositiveInteger) -> % if R has SGROUP
+\end{verbatim}
+
+These exports come from \refto{Group}():
+\begin{verbatim}
+ commutator : (%,%) -> % if R has GROUP
+ conjugate : (%,%) -> % if R has GROUP
+ inv : % -> % if R has GROUP or R has INTDOM
+ ?/? : (%,%) -> % if R has GROUP or R has INTDOM
+ ?^? : (%,Integer) -> % if R has GROUP or R has INTDOM
+ ?**? : (%,Integer) -> % if R has GROUP or R has INTDOM
+\end{verbatim}
+
+These exports come from \refto{AbelianSemiGroup}():
+\begin{verbatim}
+\end{verbatim}
+
+These exports come from \refto{AbelianMonoid}():
+\begin{verbatim}
+ 0 : () -> % if R has ABELSG
+ zero? : % -> Boolean if R has ABELSG
+ ?*? : (PositiveInteger,%) -> % if R has ABELSG
+ ?*? : (NonNegativeInteger,%) -> % if R has ABELSG
+ ?+? : (%,%) -> % if R has ABELSG
+\end{verbatim}
+
+These exports come from \refto{AbelianGroup}():
+\begin{verbatim}
+ subtractIfCan : (%,%) -> Union(%,"failed") if R has ABELGRP
+ ?*? : (Integer,%) -> % if R has ABELGRP
+ ?-? : (%,%) -> % if R has ABELGRP
+ -? : % -> % if R has ABELGRP         
+\end{verbatim}
+
+These exports come from \refto{Ring}():
+\begin{verbatim}
+\end{verbatim}
+
+These exports come from \refto{RetractableTo}(R)\\
+where R:Polynomial(OrderedSet):
+\begin{verbatim}
+\end{verbatim}
+
+These exports come from \refto{PartialDifferentialRing}(Symbol):
+\begin{verbatim}
+ D : (%,Symbol) -> % if R has RING
+ D : (%,List Symbol) -> % if R has RING
+ D : (%,Symbol,NonNegativeInteger) -> % if R has RING
+ D : (%,List Symbol,List NonNegativeInteger) -> % if R has RING
+ differentiate : (%,List Symbol) -> % if R has RING
+ differentiate : (%,Symbol,NonNegativeInteger) -> % if R has RING
+ differentiate : (%,List Symbol,List NonNegativeInteger) -> % 
+     if R has RING
+\end{verbatim}
+
+These exports come from \refto{FullyLinearlyExplicitRingOver}(R)\\
+where R:OrderedSet:
+\begin{verbatim}
+ reducedSystem : Matrix % -> Matrix R if R has RING
+ reducedSystem : (Matrix %,Vector %) -> 
+   Record(mat: Matrix R,vec: Vector R) if R has RING
+ 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{CharacteristicZero}():
+\begin{verbatim}
+\end{verbatim}
+
+These exports come from \refto{CharacteristicNonZero}():
+\begin{verbatim}
+ charthRoot : % -> Union(%,"failed") if R has CHARNZ
+\end{verbatim}
+
+These exports come from \refto{CommutativeRing}():
+\begin{verbatim}
+\end{verbatim}
+
+These exports come from \refto{Algebra}(OrderedSet):
+\begin{verbatim}
+\end{verbatim}
+
+These exports come from \refto{IntegralDomain}():
+\begin{verbatim}
+ associates? : (%,%) -> Boolean if R has INTDOM
+ exquo : (%,%) -> Union(%,"failed") if R has INTDOM
+ unit? : % -> Boolean if R has INTDOM
+ unitCanonical : % -> % if R has INTDOM
+ unitNormal : % -> Record(unit: %,canonical: %,associate: %) 
+     if R has INTDOM
+\end{verbatim}
+
+These exports come from \refto{Field}():
+\begin{verbatim}
+ coerce : % -> % if R has INTDOM
+ divide : (%,%) -> Record(quotient: %,remainder: %) 
+     if R has INTDOM
+ euclideanSize : % -> NonNegativeInteger if R has INTDOM
+ expressIdealMember : (List %,%) -> Union(List %,"failed") 
+     if R has INTDOM
+ extendedEuclidean : (%,%) -> Record(coef1: %,coef2: %,generator: %) 
+     if R has INTDOM
+ extendedEuclidean : (%,%,%) -> Union(Record(coef1: %,coef2: %),"failed") 
+     if R has INTDOM
+ factor : % -> Factored % if R has INTDOM
+ gcd : (%,%) -> % if R has INTDOM
+ gcd : List % -> % if R has INTDOM
+ gcdPolynomial : 
+   (SparseUnivariatePolynomial %,
+    SparseUnivariatePolynomial %) -> 
+      SparseUnivariatePolynomial % 
+        if R has INTDOM
+ lcm : (%,%) -> % if R has INTDOM
+ lcm : List % -> % if R has INTDOM
+ multiEuclidean : (List %,%) -> Union(List %,"failed") 
+     if R has INTDOM
+ prime? : % -> Boolean if R has INTDOM
+ principalIdeal : List % -> Record(coef: List %,generator: %) 
+     if R has INTDOM
+ sizeLess? : (%,%) -> Boolean if R has INTDOM
+ squareFree : % -> Factored % if R has INTDOM
+ squareFreePart : % -> % if R has INTDOM
+ ?quo? : (%,%) -> % if R has INTDOM
+ ?rem? : (%,%) -> % if R has INTDOM
+\end{verbatim}
+
+These exports come from \refto{RetractableTo}(R)\\
+where R:Fraction(Polynomial(OrderedSet))
+\begin{verbatim}
+\end{verbatim}
+
+These exports come from \refto{RetractableTo}(Integer):
+\begin{verbatim}
+ retract : % -> Integer if R has RETRACT INT
+ retractIfCan : % -> Union(Integer,"failed") 
+     if R has RETRACT INT
+\end{verbatim}
+
+These exports come from \refto{RetractableTo}(Fraction(Integer)):
+\begin{verbatim}
+ retract : % -> Fraction Integer 
+     if R has RETRACT INT 
+     and R has INTDOM 
+     or R has RETRACT FRAC INT
+ retractIfCan : % -> Union(Fraction Integer,"failed") 
+     if R has RETRACT INT 
+     and R has INTDOM 
+     or R has RETRACT FRAC INT
+ ?*? : (%,Fraction Integer) -> % if R has INTDOM
+ ?*? : (Fraction Integer,%) -> % if R has INTDOM
+\end{verbatim}
+
+<<category FS FunctionSpace>>=
+)abbrev category FS FunctionSpace
+++ Category for formal functions
+++ Author: Manuel Bronstein
+++ Date Created: 22 March 1988
+++ Date Last Updated: 14 February 1994
+++ Description:
+++   A space of formal functions with arguments in an arbitrary
+++   ordered set.
+++ Keywords: operator, kernel, function.
+FunctionSpace(R:OrderedSet): Category == Definition where
+  OP ==> BasicOperator
+  O  ==> OutputForm
+  SY ==> Symbol
+  N  ==> NonNegativeInteger
+  Z  ==> Integer
+  K  ==> Kernel %
+  Q  ==> Fraction R
+  PR ==> Polynomial R
+  MP ==> SparseMultivariatePolynomial(R, K)
+  QF==> PolynomialCategoryQuotientFunctions(IndexedExponents K,K,R,MP,%)
+
+  ODD  ==> "odd"
+  EVEN ==> "even"
+
+  SPECIALDIFF  ==> "%specialDiff"
+  SPECIALDISP  ==> "%specialDisp"
+  SPECIALEQUAL ==> "%specialEqual"
+  SPECIALINPUT ==> "%specialInput"
+
+  Definition ==> Join(ExpressionSpace, RetractableTo SY, Patternable R,
+                     FullyPatternMatchable R, FullyRetractableTo R) with
+       ground?   : % -> Boolean
+         ++ ground?(f) tests if f is an element of R.
+       ground    : % -> R
+         ++ ground(f) returns f as an element of R.
+         ++ An error occurs if f is not an element of R.
+       variables : %  -> List SY
+         ++ variables(f) returns the list of all the variables of f.
+       applyQuote: (SY, %) -> %
+         ++ applyQuote(foo, x) returns \spad{'foo(x)}.
+       applyQuote: (SY, %, %) -> %
+         ++ applyQuote(foo, x, y) returns \spad{'foo(x,y)}.
+       applyQuote: (SY, %, %, %) -> %
+         ++ applyQuote(foo, x, y, z) returns \spad{'foo(x,y,z)}.
+       applyQuote: (SY, %, %, %, %) -> %
+         ++ applyQuote(foo, x, y, z, t) returns \spad{'foo(x,y,z,t)}.
+       applyQuote: (SY, List %) -> %
+         ++ applyQuote(foo, [x1,...,xn]) returns \spad{'foo(x1,...,xn)}.
+       if R has ConvertibleTo InputForm then
+         ConvertibleTo InputForm
+         eval     : (%, SY) -> %
+           ++ eval(f, foo) unquotes all the foo's in f.
+         eval     : (%, List SY) -> %
+           ++ eval(f, [foo1,...,foon]) unquotes all the \spad{fooi}'s in f.
+         eval     : % -> %
+           ++ eval(f) unquotes all the quoted operators in f.
+         eval     : (%, OP, %, SY) -> %
+           ++ eval(x, s, f, y) replaces every \spad{s(a)} in x by \spad{f(y)}
+           ++ with \spad{y} replaced by \spad{a} for any \spad{a}.
+         eval     : (%, List OP, List %, SY) -> %
+           ++ eval(x, [s1,...,sm], [f1,...,fm], y) replaces every
+           ++ \spad{si(a)} in x by \spad{fi(y)}
+           ++ with \spad{y} replaced by \spad{a} for any \spad{a}.
+       if R has SemiGroup then
+         Monoid
+         -- the following line is necessary because of a compiler bug
+         "**"   : (%, N) -> %
+           ++ x**n returns x * x * x * ... * x (n times).
+         isTimes: % -> Union(List %, "failed")
+           ++ isTimes(p) returns \spad{[a1,...,an]}
+           ++ if \spad{p = a1*...*an} and \spad{n > 1}.
+         isExpt : % -> Union(Record(var:K,exponent:Z),"failed")
+           ++ isExpt(p) returns \spad{[x, n]} if \spad{p = x**n}
+           ++ and \spad{n <> 0}.
+       if R has Group then Group
+       if R has AbelianSemiGroup then
+         AbelianMonoid
+         isPlus: % -> Union(List %, "failed")
+           ++ isPlus(p) returns \spad{[m1,...,mn]}
+           ++ if \spad{p = m1 +...+ mn} and \spad{n > 1}.
+         isMult: % -> Union(Record(coef:Z, var:K),"failed")
+           ++ isMult(p) returns \spad{[n, x]} if \spad{p = n * x}
+           ++ and \spad{n <> 0}.
+       if R has AbelianGroup then AbelianGroup
+       if R has Ring then
+         Ring
+         RetractableTo PR
+         PartialDifferentialRing SY
+         FullyLinearlyExplicitRingOver R
+         coerce    : MP -> %
+           ++ coerce(p) returns p as an element of %.
+         numer     : %  -> MP
+           ++ numer(f) returns the
+           ++ numerator of f viewed as a polynomial in the kernels over R
+           ++ if R is an integral domain. If not, then numer(f) = f viewed
+           ++ as a polynomial in the kernels over R.
+           -- DO NOT change this meaning of numer!  MB 1/90
+         numerator : % -> %
+           ++ numerator(f) returns the numerator of \spad{f} converted to %.
+         isExpt:(%,OP) -> Union(Record(var:K,exponent:Z),"failed")
+           ++ isExpt(p,op) returns \spad{[x, n]} if \spad{p = x**n}
+           ++ and \spad{n <> 0} and \spad{x = op(a)}.
+         isExpt:(%,SY) -> Union(Record(var:K,exponent:Z),"failed")
+           ++ isExpt(p,f) returns \spad{[x, n]} if \spad{p = x**n}
+           ++ and \spad{n <> 0} and \spad{x = f(a)}.
+         isPower   : % -> Union(Record(val:%,exponent:Z),"failed")
+           ++ isPower(p) returns \spad{[x, n]} if \spad{p = x**n}
+           ++ and \spad{n <> 0}.
+         eval: (%, List SY, List N, List(% -> %)) -> %
+           ++ eval(x, [s1,...,sm], [n1,...,nm], [f1,...,fm]) replaces
+           ++ every \spad{si(a)**ni} in x by \spad{fi(a)} for any \spad{a}.
+         eval: (%, List SY, List N, List(List % -> %)) -> %
+           ++ eval(x, [s1,...,sm], [n1,...,nm], [f1,...,fm]) replaces
+           ++ every \spad{si(a1,...,an)**ni} in x by \spad{fi(a1,...,an)}
+           ++ for any a1,...,am.
+         eval: (%, SY, N, List % -> %) -> %
+           ++ eval(x, s, n, f) replaces every \spad{s(a1,...,am)**n} in x
+           ++ by \spad{f(a1,...,am)} for any a1,...,am.
+         eval: (%, SY, N, % -> %) -> %
+           ++ eval(x, s, n, f) replaces every \spad{s(a)**n} in x
+           ++ by \spad{f(a)} for any \spad{a}.
+       if R has CharacteristicZero then CharacteristicZero
+       if R has CharacteristicNonZero then CharacteristicNonZero
+       if R has CommutativeRing then
+         Algebra R
+       if R has IntegralDomain then
+         Field
+         RetractableTo Fraction PR
+         convert   : Factored % -> %
+           ++ convert(f1\^e1 ... fm\^em) returns \spad{(f1)\^e1 ... (fm)\^em}
+           ++ as an element of %, using formal kernels
+           ++ created using a \spadfunFrom{paren}{ExpressionSpace}.
+         denom     : %  -> MP
+           ++ denom(f) returns the denominator of f viewed as a
+           ++ polynomial in the kernels over R.
+         denominator : % -> %
+           ++ denominator(f) returns the denominator of \spad{f} 
+           ++ converted to %.
+         "/"       : (MP, MP) -> %
+           ++ p1/p2 returns the quotient of p1 and p2 as an element of %.
+         coerce    : Q  -> %
+           ++ coerce(q) returns q as an element of %.
+         coerce    : Polynomial Q -> %
+           ++ coerce(p) returns p as an element of %.
+         coerce    : Fraction Polynomial Q -> %
+           ++ coerce(f) returns f as an element of %.
+         univariate: (%, K) -> Fraction SparseUnivariatePolynomial %
+           ++ univariate(f, k) returns f viewed as a univariate fraction in k.
+         if R has RetractableTo Z then RetractableTo Fraction Z
+   add
+    import BasicOperatorFunctions1(%)
+
+    -- these are needed in Ring only, but need to be declared here
+    -- because of compiler bug: if they are declared inside the Ring
+    -- case, then they are not visible inside the IntegralDomain case.
+    smpIsMult : MP -> Union(Record(coef:Z, var:K),"failed")
+    smpret    : MP -> Union(PR, "failed")
+    smpeval   : (MP, List K, List %) -> %
+    smpsubst  : (MP, List K, List %) -> %
+    smpderiv  : (MP, SY) -> %
+    smpunq    : (MP, List SY, Boolean) -> %
+    kerderiv  : (K, SY)  -> %
+    kderiv    : K -> List %
+    opderiv   : (OP, N) -> List(List % -> %)
+    smp2O     : MP -> O
+    bestKernel: List K -> K
+    worse?    : (K, K) -> Boolean
+    diffArg   : (List %, OP, N) -> List %
+    substArg  : (OP, List %, Z, %) -> %
+    dispdiff  : List % -> Record(name:O, sub:O, arg:List O, level:N)
+    ddiff     : List % -> O
+    diffEval  : List % -> %
+    dfeval    : (List %, K) -> %
+    smprep    : (List SY, List N, List(List % -> %), MP) -> %
+    diffdiff  : (List %, SY) -> %
+    diffdiff0 : (List %, SY, %, K, List %) -> %
+    subs      : (% -> %, K) -> %
+    symsub    : (SY, Z) -> SY
+    kunq      : (K, List SY, Boolean) -> %
+    pushunq   : (List SY, List %) -> List %
+    notfound  : (K -> %, List K, K) -> %
+
+    equaldiff : (K,K)->Boolean
+    debugA: (List % ,List %,Boolean) -> Boolean
+    opdiff := operator("%diff"::SY)$CommonOperators()
+    opquote := operator("applyQuote"::SY)$CommonOperators
+
+    ground? x                == retractIfCan(x)@Union(R,"failed") case R
+
+    ground  x                == retract x
+
+    coerce(x:SY):%             == kernel(x)@K :: %
+
+    retract(x:%):SY            == symbolIfCan(retract(x)@K)::SY
+
+    applyQuote(s:SY, x:%)      == applyQuote(s, [x])
+
+    applyQuote(s, x, y)        == applyQuote(s, [x, y])
+
+    applyQuote(s, x, y, z)     == applyQuote(s, [x, y, z])
+
+    applyQuote(s, x, y, z, t)  == applyQuote(s, [x, y, z, t])
+
+    applyQuote(s:SY, l:List %) == opquote concat(s::%, l)
+
+    belong? op                 == op = opdiff or op = opquote
+
+    subs(fn, k) == kernel(operator k,[fn x for x in argument k]$List(%))
+
+    operator op ==
+      is?(op, "%diff"::SY) => opdiff
+      is?(op, "%quote"::SY) => opquote
+      error "Unknown operator"
+
+    if R has ConvertibleTo InputForm then
+      INP==>InputForm
+      import MakeUnaryCompiledFunction(%, %, %)
+      indiff: List % -> INP
+      pint  : List INP-> INP
+      differentiand: List % -> %
+
+      differentiand l    == eval(first l, retract(second l)@K, third l)
+
+      pint l  == convert concat(convert("D"::SY)@INP, l)
+
+      indiff l ==
+         r2:= convert([convert("::"::SY)@INP,_
+                       convert(third l)@INP,_
+                       convert("Symbol"::SY)@INP]@List INP)@INP
+         pint [convert(differentiand l)@INP, r2] 
+
+      eval(f:%, s:SY)            == eval(f, [s])
+
+      eval(f:%, s:OP, g:%, x:SY) == eval(f, [s], [g], x)
+
+      eval(f:%, ls:List OP, lg:List %, x:SY) ==
+        eval(f, ls, [compiledFunction(g, x) for g in lg])
+
+      setProperty(opdiff,SPECIALINPUT,_
+                   indiff@(List % -> InputForm) pretend None)
+
+    variables x ==
+      l := empty()$List(SY)
+      for k in tower x repeat
+        if ((s := symbolIfCan k) case SY) then l := concat(s::SY, l)
+      reverse_! l
+
+    retractIfCan(x:%):Union(SY, "failed") ==
+      (k := retractIfCan(x)@Union(K,"failed")) case "failed" => "failed"
+      symbolIfCan(k::K)
+
+    if R has Ring then
+      import UserDefinedPartialOrdering(SY)
+
+-- cannot use new()$Symbol because of possible re-instantiation
+      gendiff := "%%0"::SY
+
+      characteristic()    == characteristic()$R
+
+      coerce(k:K):%       == k::MP::%
+
+      symsub(sy, i)       == concat(string sy, convert(i)@String)::SY
+
+      numerator x         == numer(x)::%
+
+      eval(x:%, s:SY, n:N, f:% -> %)     == eval(x,[s],[n],[f first #1])
+
+      eval(x:%, s:SY, n:N, f:List % -> %) == eval(x, [s], [n], [f])
+
+      eval(x:%, l:List SY, f:List(List % -> %)) == eval(x, l, new(#l, 1), f)
+
+      elt(op:OP, args:List %) ==
+        unary? op and ((od? := has?(op, ODD)) or has?(op, EVEN)) and
+          leadingCoefficient(numer first args) < 0 =>
+            x := op(- first args)
+            od? => -x
+            x
+        elt(op, args)$ExpressionSpace_&(%)
+
+      eval(x:%, s:List SY, n:List N, l:List(% -> %)) ==
+        eval(x, s, n, [f first #1 for f in l]$List(List % -> %))
+
+      -- op(arg)**m ==> func(arg)**(m quo n) * op(arg)**(m rem n)
+      smprep(lop, lexp, lfunc, p) ==
+        (v := mainVariable p) case "failed" => p::%
+        symbolIfCan(k := v::K) case SY => p::%
+        g := (op := operator k)
+           (arg := [eval(a,lop,lexp,lfunc) for a in argument k]$List(%))
+        q := map(eval(#1::%, lop, lexp, lfunc),
+                 univariate(p, k))$SparseUnivariatePolynomialFunctions2(MP, %)
+        (n := position(name op, lop)) < minIndex lop => q g
+        a:%  := 0
+        f    := eval((lfunc.n) arg, lop, lexp, lfunc)
+        e    := lexp.n
+        while q ^= 0 repeat
+          m  := degree q
+          qr := divide(m, e)
+          t1 := f ** (qr.quotient)::N
+          t2 := g ** (qr.remainder)::N
+          a  := a + leadingCoefficient(q) * t1 * t2
+          q  := reductum q
+        a
+
+      dispdiff l ==
+        s := second(l)::O
+        t := third(l)::O
+        a := argument(k := retract(first l)@K)
+        is?(k, opdiff) =>
+          rec := dispdiff a
+          i   := position(s, rec.arg)
+          rec.arg.i := t
+          [rec.name,
+             hconcat(rec.sub, hconcat(","::SY::O, (i+1-minIndex a)::O)),
+                        rec.arg, (zero?(rec.level) => 0; rec.level + 1)]
+        i   := position(second l, a)
+        m   := [x::O for x in a]$List(O)
+        m.i := t
+        [name(operator k)::O, hconcat(","::SY::O, (i+1-minIndex a)::O),
+                                             m, (empty? rest a => 1; 0)]
+
+      ddiff l ==
+        rec := dispdiff l
+        opname :=
+          zero?(rec.level) => sub(rec.name, rec.sub)
+          differentiate(rec.name, rec.level)
+        prefix(opname, rec.arg)
+
+      substArg(op, l, i, g) ==
+        z := copy l
+        z.i := g
+        kernel(op, z)
+
+
+      diffdiff(l, x) ==
+        f := kernel(opdiff, l)
+        diffdiff0(l, x, f, retract(f)@K, empty())
+
+      diffdiff0(l, x, expr, kd, done) ==
+        op  := operator(k := retract(first l)@K)
+        gg  := second l
+        u   := third l
+        arg := argument k
+        ans:% := 0
+        if (not member?(u,done)) and (ans := differentiate(u,x))^=0 then
+          ans := ans * kernel(opdiff,
+               [subst(expr, [kd], [kernel(opdiff, [first l, gg, gg])]),
+                             gg, u])
+        done := concat(gg, done)
+        is?(k, opdiff) => ans + diffdiff0(arg, x, expr, k, done)
+        for i in minIndex arg .. maxIndex arg for b in arg repeat
+          if (not member?(b,done)) and (bp:=differentiate(b,x))^=0 then
+            g   := symsub(gendiff, i)::%
+            ans := ans + bp * kernel(opdiff, [subst(expr, [kd],
+             [kernel(opdiff, [substArg(op, arg, i, g), gg, u])]), g, b])
+        ans
+
+      dfeval(l, g) ==
+        eval(differentiate(first l, symbolIfCan(g)::SY), g, third l)
+
+      diffEval l ==
+        k:K
+        g := retract(second l)@K
+        ((u := retractIfCan(first l)@Union(K, "failed")) case "failed")
+          or (u case K and symbolIfCan(k := u::K) case SY) => dfeval(l, g)
+        op := operator k
+        (ud := derivative op) case "failed" => 
+             -- possible trouble 
+             -- make sure it is a dummy var  
+             dumm:%:=symsub(gendiff,1)::%
+             ss:=subst(l.1,l.2=dumm)
+             -- output(nl::OutputForm)$OutputPackage
+             -- output("fixed"::OutputForm)$OutputPackage
+             nl:=[ss,dumm,l.3]
+             kernel(opdiff, nl)
+        (n := position(second l,argument k)) < minIndex l => 
+              dfeval(l,g)
+        d := ud::List(List % -> %)
+        eval((d.n)(argument k), g, third l)
+
+      diffArg(l, op, i) ==
+        n := i - 1 + minIndex l
+        z := copy l
+        z.n := g := symsub(gendiff, n)::%
+        [kernel(op, z), g, l.n]
+
+      opderiv(op, n) ==
+--        one? n =>
+        (n = 1) =>
+          g := symsub(gendiff, n)::%
+          [kernel(opdiff,[kernel(op, g), g, first #1])]
+        [kernel(opdiff, diffArg(#1, op, i)) for i in 1..n]
+
+      kderiv k ==
+        zero?(n := #(args := argument k)) => empty()
+        op := operator k
+        grad :=
+          (u := derivative op) case "failed" => opderiv(op, n)
+          u::List(List % -> %)
+        if #grad ^= n then grad := opderiv(op, n)
+        [g args for g in grad]
+
+    -- SPECIALDIFF contains a map (List %, Symbol) -> %
+    -- it is used when the usual chain rule does not apply,
+    -- for instance with implicit algebraics.
+      kerderiv(k, x) ==
+        (v := symbolIfCan(k)) case SY =>
+          v::SY = x => 1
+          0
+        (fn := property(operator k, SPECIALDIFF)) case None =>
+           ((fn::None) pretend ((List %, SY) -> %)) (argument k, x)
+        +/[g * differentiate(y,x) for g in kderiv k for y in argument k]
+
+      smpderiv(p, x) ==
+        map(retract differentiate(#1::PR, x), p)::% +
+         +/[differentiate(p,k)::% * kerderiv(k, x) for k in variables p]
+
+      coerce(p:PR):% ==
+        map(#1::%, #1::%, p)$PolynomialCategoryLifting(
+                                      IndexedExponents SY, SY, R, PR, %)
+
+      worse?(k1, k2) ==
+        (u := less?(name operator k1,name operator k2)) case "failed" =>
+          k1 < k2
+        u::Boolean
+
+      bestKernel l ==
+        empty? rest l => first l
+        a := bestKernel rest l
+        worse?(first l, a) => a
+        first l
+
+      smp2O p ==
+        (r:=retractIfCan(p)@Union(R,"failed")) case R =>r::R::OutputForm
+        a :=
+          userOrdered?() => bestKernel variables p
+          mainVariable(p)::K
+        outputForm(map(#1::%, univariate(p,
+         a))$SparseUnivariatePolynomialFunctions2(MP, %), a::OutputForm)
+
+      smpsubst(p, lk, lv) ==
+        map(match(lk, lv, #1,
+            notfound(subs(subst(#1, lk, lv), #1), lk, #1))$ListToMap(K,%),
+             #1::%,p)$PolynomialCategoryLifting(IndexedExponents K,K,R,MP,%)
+
+      smpeval(p, lk, lv) ==
+        map(match(lk, lv, #1,
+            notfound(map(eval(#1, lk, lv), #1), lk, #1))$ListToMap(K,%),
+             #1::%,p)$PolynomialCategoryLifting(IndexedExponents K,K,R,MP,%)
+
+-- this is called on k when k is not a member of lk
+      notfound(fn, lk, k) ==
+        empty? setIntersection(tower(f := k::%), lk) => f
+        fn k
+
+      if R has ConvertibleTo InputForm then
+        pushunq(l, arg) ==
+           empty? l => [eval a for a in arg]
+           [eval(a, l) for a in arg]
+
+        kunq(k, l, givenlist?) ==
+          givenlist? and empty? l => k::%
+          is?(k, opquote) and
+            (member?(s:=retract(first argument k)@SY, l) or empty? l) =>
+              interpret(convert(concat(convert(s)@InputForm,
+                [convert a for a in pushunq(l, rest argument k)
+                   ]@List(InputForm)))@InputForm)$InputFormFunctions1(%)
+          (operator k) pushunq(l, argument k)
+
+        smpunq(p, l, givenlist?) ==
+          givenlist? and empty? l => p::%
+          map(kunq(#1, l, givenlist?), #1::%,
+            p)$PolynomialCategoryLifting(IndexedExponents K,K,R,MP,%)
+
+      smpret p ==
+        "or"/[symbolIfCan(k) case "failed" for k in variables p] =>
+          "failed"
+        map(symbolIfCan(#1)::SY::PR, #1::PR,
+          p)$PolynomialCategoryLifting(IndexedExponents K, K, R, MP, PR)
+
+      isExpt(x:%, op:OP) ==
+        (u := isExpt x) case "failed" => "failed"
+        is?((u::Record(var:K, exponent:Z)).var, op) => u
+        "failed"
+
+      isExpt(x:%, sy:SY) ==
+        (u := isExpt x) case "failed" => "failed"
+        is?((u::Record(var:K, exponent:Z)).var, sy) => u
+        "failed"
+
+      if R has RetractableTo Z then
+          smpIsMult p ==
+--          (u := mainVariable p) case K and one? degree(q:=univariate(p,u::K))
+            (u := mainVariable p) case K and (degree(q:=univariate(p,u::K))=1)
+              and zero?(leadingCoefficient reductum q)
+                and ((r:=retractIfCan(leadingCoefficient q)@Union(R,"failed"))
+                   case R)
+                     and (n := retractIfCan(r::R)@Union(Z, "failed")) case Z =>
+                       [n::Z, u::K]
+            "failed"
+
+      evaluate(opdiff, diffEval)
+
+      debugA(a1,a2,t) == 
+         -- uncomment for debugging
+         -- output(hconcat [a1::OutputForm,_
+         --                 a2::OutputForm,t::OutputForm])$OutputPackage
+         t
+
+      equaldiff(k1,k2) ==
+        a1:=argument k1
+        a2:=argument k2
+        -- check the operator
+        res:=operator k1 = operator k2 
+        not res => debugA(a1,a2,res) 
+        -- check the evaluation point
+        res:= (a1.3 = a2.3)
+        not res => debugA(a1,a2,res)
+        -- check all the arguments
+        res:= (a1.1 = a2.1) and (a1.2 = a2.2)
+        res => debugA(a1,a2,res)
+        -- check the substituted arguments
+        (subst(a1.1,[retract(a1.2)@K],[a2.2]) = a2.1) => debugA(a1,a2,true)
+        debugA(a1,a2,false)
+
+      setProperty(opdiff,SPECIALEQUAL,
+                          equaldiff@((K,K) -> Boolean) pretend None)
+
+      setProperty(opdiff, SPECIALDIFF,
+                          diffdiff@((List %, SY) -> %) pretend None)
+
+      setProperty(opdiff, SPECIALDISP,
+                              ddiff@(List % -> OutputForm) pretend None)
+
+      if not(R has IntegralDomain) then
+        mainKernel x         == mainVariable numer x
+
+        kernels x            == variables numer x
+
+        retract(x:%):R       == retract numer x
+
+        retract(x:%):PR      == smpret(numer x)::PR
+
+        retractIfCan(x:%):Union(R,  "failed") == retract numer x
+
+        retractIfCan(x:%):Union(PR, "failed") == smpret numer x
+
+        eval(x:%, lk:List K, lv:List %)  == smpeval(numer x, lk, lv)
+
+        subst(x:%, lk:List K, lv:List %) == smpsubst(numer x, lk, lv)
+
+        differentiate(x:%, s:SY)         == smpderiv(numer x, s)
+
+        coerce(x:%):OutputForm           == smp2O numer x
+
+        if R has ConvertibleTo InputForm then
+          eval(f:%, l:List SY) == smpunq(numer f, l, true)
+
+          eval f               == smpunq(numer f, empty(), false)
+
+        eval(x:%, s:List SY, n:List N, f:List(List % -> %)) ==
+          smprep(s, n, f, numer x)
+
+        isPlus x ==
+          (u := isPlus numer x) case "failed" => "failed"
+          [p::% for p in u::List(MP)]
+
+        isTimes x ==
+          (u := isTimes numer x) case "failed" => "failed"
+          [p::% for p in u::List(MP)]
+
+        isExpt x ==
+          (u := isExpt numer x) case "failed" => "failed"
+          r := u::Record(var:K, exponent:NonNegativeInteger)
+          [r.var, r.exponent::Z]
+
+        isPower x ==
+          (u := isExpt numer x) case "failed" => "failed"
+          r := u::Record(var:K, exponent:NonNegativeInteger)
+          [r.var::%, r.exponent::Z]
+
+        if R has ConvertibleTo Pattern Z then
+          convert(x:%):Pattern(Z) == convert numer x
+
+        if R has ConvertibleTo Pattern Float then
+          convert(x:%):Pattern(Float) == convert numer x
+
+        if R has RetractableTo Z then
+          isMult x == smpIsMult numer x
+
+    if R has CommutativeRing then
+      r:R * x:% == r::MP::% * x
+
+    if R has IntegralDomain then
+      par   : % -> %
+
+      mainKernel x                    == mainVariable(x)$QF
+
+      kernels x                       == variables(x)$QF
+
+      univariate(x:%, k:K)            == univariate(x, k)$QF
+
+      isPlus x                        == isPlus(x)$QF
+
+      isTimes x                       == isTimes(x)$QF
+
+      isExpt x                        == isExpt(x)$QF
+
+      isPower x                       == isPower(x)$QF
+
+      denominator x                   == denom(x)::%
+
+      coerce(q:Q):%                   == (numer q)::MP / (denom q)::MP
+
+      coerce(q:Fraction PR):%         == (numer q)::% / (denom q)::%
+
+      coerce(q:Fraction Polynomial Q) == (numer q)::% / (denom q)::%
+
+      retract(x:%):PR                == retract(retract(x)@Fraction(PR))
+
+      retract(x:%):Fraction(PR) == smpret(numer x)::PR / smpret(denom x)::PR
+
+      retract(x:%):R == (retract(numer x)@R exquo retract(denom x)@R)::R
+
+      coerce(x:%):OutputForm ==
+--        one?(denom x) => smp2O numer x
+        ((denom x) = 1) => smp2O numer x
+        smp2O(numer x) / smp2O(denom x)
+
+      retractIfCan(x:%):Union(R, "failed") ==
+        (n := retractIfCan(numer x)@Union(R, "failed")) case "failed" or
+          (d := retractIfCan(denom x)@Union(R, "failed")) case "failed"
+            or (r := n::R exquo d::R) case "failed" => "failed"
+        r::R
+
+      eval(f:%, l:List SY) ==
+        smpunq(numer f, l, true) / smpunq(denom f, l, true)
+
+      if R has ConvertibleTo InputForm then
+        eval f ==
+          smpunq(numer f, empty(), false) / smpunq(denom f, empty(), false)
+
+        eval(x:%, s:List SY, n:List N, f:List(List % -> %)) ==
+          smprep(s, n, f, numer x) / smprep(s, n, f, denom x)
+
+      differentiate(f:%, x:SY) ==
+        (smpderiv(numer f, x) * denom(f)::% -
+          numer(f)::% * smpderiv(denom f, x))
+            / (denom(f)::% ** 2)
+
+      eval(x:%, lk:List K, lv:List %) ==
+        smpeval(numer x, lk, lv) / smpeval(denom x, lk, lv)
+
+      subst(x:%, lk:List K, lv:List %) ==
+        smpsubst(numer x, lk, lv) / smpsubst(denom x, lk, lv)
+
+      par x ==
+        (r := retractIfCan(x)@Union(R, "failed")) case R => x
+        paren x
+
+      convert(x:Factored %):% ==
+        par(unit x) * */[par(f.factor) ** f.exponent for f in factors x]
+
+      retractIfCan(x:%):Union(PR, "failed") ==
+        (u := retractIfCan(x)@Union(Fraction PR,"failed")) case "failed"
+          => "failed"
+        retractIfCan(u::Fraction(PR))
+
+      retractIfCan(x:%):Union(Fraction PR, "failed") ==
+        (n := smpret numer x) case "failed" => "failed"
+        (d := smpret denom x) case "failed" => "failed"
+        n::PR / d::PR
+
+      coerce(p:Polynomial Q):% ==
+        map(#1::%, #1::%,
+           p)$PolynomialCategoryLifting(IndexedExponents SY, SY,
+                                                     Q, Polynomial Q, %)
+
+      if R has RetractableTo Z then
+        coerce(x:Fraction Z):% == numer(x)::MP / denom(x)::MP
+
+        isMult x ==
+           (u := smpIsMult numer x) case "failed"
+              or (v := retractIfCan(denom x)@Union(R, "failed")) case "failed"
+                 or (w := retractIfCan(v::R)@Union(Z, "failed")) case "failed"
+                     => "failed"
+           r := u::Record(coef:Z, var:K)
+           (q := r.coef exquo w::Z) case "failed" => "failed"
+           [q::Z, r.var]
+
+      if R has ConvertibleTo Pattern Z then
+        convert(x:%):Pattern(Z) == convert(numer x) / convert(denom x)
+
+      if R has ConvertibleTo Pattern Float then
+        convert(x:%):Pattern(Float) ==
+          convert(numer x) / convert(denom x)
+
+@
+<<FS.dotabb>>=
+"FS"
+ [color=lightblue,href="bookvol10.2.pdf#nameddest=FS"];
+"FS" -> "ES"
+"FS" -> "FPATMAB"
+"FS" -> "FRETRCT"
+"FS" -> "PATAB"
+"FS" -> "RETRACT"
+
+@
+<<FS.dotfull>>=
+"FunctionSpace(a:OrderedSet)"
+ [color=lightblue,href="bookvol10.2.pdf#nameddest=FS"];
+"FunctionSpace(a:OrderedSet)" -> "ExpressionSpace()"
+"FunctionSpace(a:OrderedSet)" -> "RetractableTo(Symbol)"
+"FunctionSpace(a:OrderedSet)" -> "Patternable(OrderedSet)"
+"FunctionSpace(a:OrderedSet)" -> "FullyPatternMatchable(OrderedSet)"
+"FunctionSpace(a:OrderedSet)" -> "FullyRetractableTo(OrderedSet)"
+
+@
+<<FS.dotpic>>=
+digraph pic {
+ fontsize=10;
+ bgcolor="#FFFF66";
+ node [shape=box, color=white, style=filled];
+
+"FunctionSpace(a:OrderedSet)" [color=lightblue];
+"FunctionSpace(a:OrderedSet)" -> "ExpressionSpace()"
+"FunctionSpace(a:OrderedSet)" -> "RETRACT..."
+"FunctionSpace(a:OrderedSet)" -> "PATAB..."
+"FunctionSpace(a:OrderedSet)" -> "FPATMAB..."
+"FunctionSpace(a:OrderedSet)" -> "FRETRCT..."
+
+"ExpressionSpace()" [color=lightblue];
+"ExpressionSpace()" -> "ORDSET..."
+"ExpressionSpace()" -> "RETRACT..."
+"ExpressionSpace()" -> "IEVALAB..."
+"ExpressionSpace()" -> "EVALABLE..."
+
+"EVALABLE..." [color=lightblue];
+"FRETRCT..." [color=lightblue];
+"FPATMAB..." [color=lightblue];
+"IEVALAB..." [color=lightblue];
+"ORDSET..." [color=lightblue];
+"PATAB..." [color=lightblue];
+"RETRACT..." [color=lightblue];
+}
+
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \pagehead{QuotientFieldCategory}{QFCAT}
 \pagepic{ps/v102quotientfieldcategory.ps}{QFCAT}{0.50}
 
 {\bf See:}\\
 \pagefrom{Algebra}{ALGEBRA}
+\pagefrom{CharacteristicNonZero}{CHARNZ}
+\pagefrom{CharacteristicZero}{CHARZ}
+\pagefrom{ConvertibleTo}{KONVERT}
 \pagefrom{DifferentialExtension}{DIFEXT}
+\pagefrom{EuclideanDomain}{EUCDOM}
 \pagefrom{Field}{FIELD}
 \pagefrom{FullyEvalableOver}{FEVALAB}
 \pagefrom{FullyLinearlyExplicitRingOver}{FLINEXP}
 \pagefrom{FullyPatternMatchable}{FPATMAB}
+\pagefrom{OrderedIntegralDomain}{OINTDOM}
+\pagefrom{OrderedSet}{ORDSET}
 \pagefrom{Patternable}{PATAB}
+\pagefrom{PolynomialFactorizationExplicit}{PFECAT}
+\pagefrom{RealConstant}{REAL}
 \pagefrom{RetractableTo}{RETRACT}
+\pagefrom{StepThrough}{STEP}
 
 {\bf Exports:}\\
 \begin{tabular}{lllll}
@@ -32252,25 +34218,25 @@ digraph pic {
 
 {\bf Attributes Exported:}
 \begin{itemize}
-\item {\bf \cross{FPC}{canonicalUnitNormal}}
+\item {\bf \cross{QFCAT}{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{FPC}{canonicalsClosed}}
+\item {\bf \cross{QFCAT}{canonicalsClosed}}
 is true if\\
 {\tt unitCanonical(a)*unitCanonical(b) = unitCanonical(a*b)}.
-\item {\bf \cross{FPC}{noZeroDivisors}}
+\item {\bf \cross{QFCAT}{noZeroDivisors}}
 is true if $x * y \ne 0$ implies both x and y are non-zero.
-\item {\bf \cross{FPC}{commutative("*")}}
+\item {\bf \cross{QFCAT}{commutative("*")}}
 is true if it has an operation $"*": (D,D) -> D$
 which is commutative.
-\item {\bf \cross{FPC}{unitsKnown}}
+\item {\bf \cross{QFCAT}{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{FPC}{leftUnitary}}
+\item {\bf \cross{QFCAT}{leftUnitary}}
 is true if $1 * x = x$ for all x.
-\item {\bf \cross{FPC}{rightUnitary}}
+\item {\bf \cross{QFCAT}{rightUnitary}}
 is true if $x * 1 = x$ for all x.
 \item {\bf nil}
 \end{itemize}
@@ -32507,10 +34473,6 @@ These exports come from \refto{EuclideanDomain}():
 \begin{verbatim}
 \end{verbatim}
 
-These exports come from \refto{IntegerNumberSystem}():
-\begin{verbatim}
-\end{verbatim}
-
 These exports come from \refto{PolynomialFactorizationExplicit}():
 \begin{verbatim}
  conditionP : Matrix % -> Union(Vector %,"failed") 
@@ -49294,6 +51256,7 @@ Note that this code is not included in the generated catdef.spad file.
 <<category ES ExpressionSpace>>
 <<category EUCDOM EuclideanDomain>>
 <<category EVALAB Evalable>>
+<<category FAMONC FreeAbelianMonoidCategory>>
 <<category FAMR FiniteAbelianMonoidRing>>
 <<category FAXF FiniteAlgebraicExtensionField>>
 <<category FDIVCAT FiniteDivisorCategory>>
@@ -49321,6 +51284,7 @@ Note that this code is not included in the generated catdef.spad file.
 <<category FRAMALG FramedAlgebra>>
 <<category FRETRCT FullyRetractableTo>>
 <<category FRNAALG FramedNonAssociativeAlgebra>>
+<<category FS FunctionSpace>>
 <<category FSAGG FiniteSetAggregate>>
 <<category FVC FortranVectorCategory>>
 <<category FVFUN FortranVectorFunctionCategory>>
@@ -49330,7 +51294,9 @@ Note that this code is not included in the generated catdef.spad file.
 <<category GROUP Group>>
 <<category HOAGG HomogeneousAggregate>>
 <<category HYPCAT HyperbolicFunctionCategory>>
+<<category IDPC IndexedDirectProductCategory>>
 <<category IEVALAB InnerEvalable>>
+<<category INTCAT IntervalCategory>>
 <<category INTDOM IntegralDomain>>
 <<category IXAGG IndexedAggregate>>
 <<category KDAGG KeyedDictionary>>
@@ -49460,6 +51426,7 @@ digraph dotabb {
 <<ES.dotabb>>
 <<EUCDOM.dotabb>>
 <<EVALAB.dotabb>>
+<<FAMONC.dotabb>>
 <<FAMR.dotabb>>
 <<FAXF.dotabb>>
 <<FDIVCAT.dotabb>>
@@ -49487,6 +51454,7 @@ digraph dotabb {
 <<FRAMALG.dotabb>>
 <<FRETRCT.dotabb>>
 <<FRNAALG.dotabb>>
+<<FS.dotabb>>
 <<FSAGG.dotabb>>
 <<FVC.dotabb>>
 <<FVFUN.dotabb>>
@@ -49495,7 +51463,9 @@ digraph dotabb {
 <<GRMOD.dotabb>>
 <<HOAGG.dotabb>>
 <<HYPCAT.dotabb>>
+<<IDPC.dotabb>>
 <<IEVALAB.dotabb>>
+<<INTCAT.dotabb>>
 <<INTDOM.dotabb>>
 <<IXAGG.dotabb>>
 <<KDAGG.dotabb>>
@@ -49628,6 +51598,7 @@ digraph dotfull {
 <<ES.dotfull>>
 <<EUCDOM.dotfull>>
 <<EVALAB.dotfull>>
+<<FAMONC.dotfull>>
 <<FAMR.dotfull>>
 <<FAXF.dotfull>>
 <<FDIVCAT.dotfull>>
@@ -49655,6 +51626,7 @@ digraph dotfull {
 <<FRAMALG.dotfull>>
 <<FRETRCT.dotfull>>
 <<FRNAALG.dotfull>>
+<<FS.dotfull>>
 <<FSAGG.dotfull>>
 <<FVC.dotfull>>
 <<FVFUN.dotfull>>
@@ -49663,7 +51635,9 @@ digraph dotfull {
 <<GRMOD.dotfull>>
 <<HOAGG.dotfull>>
 <<HYPCAT.dotfull>>
+<<IDPC.dotfull>>
 <<IEVALAB.dotfull>>
+<<INTCAT.dotfull>>
 <<INTDOM.dotfull>>
 <<IXAGG.dotfull>>
 <<KDAGG.dotfull>>
diff --git a/books/ps/v102freeabelianmonoidcategory.ps b/books/ps/v102freeabelianmonoidcategory.ps
new file mode 100644
index 0000000..f602fa1
--- /dev/null
+++ b/books/ps/v102freeabelianmonoidcategory.ps
@@ -0,0 +1,885 @@
+%!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 676 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 676 584
+%%PageOrientation: Portrait
+gsave
+36 36 640 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
+638 546 lineto
+638 -6 lineto
+closepath
+fill
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 546 lineto
+638 546 lineto
+638 -6 lineto
+closepath
+stroke
+0.000 0.000 0.000 graphcolor
+14.00 /Times-Roman set_font
+% FreeAbelianMonoidCategory(a:SetCategory,b:CancellationAbelianMonoid)
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 632 540 moveto
+192 540 lineto
+192 504 lineto
+632 504 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 632 540 moveto
+192 540 lineto
+192 504 lineto
+632 504 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+199 517 moveto
+(FreeAbelianMonoidCategory\(a:SetCategory,b:CancellationAbelianMonoid\))
+[7.44 4.8 6.24 6.24 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 9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96 4.56 6.24 3.84 7.68 6 3.84 9.36 6.24 3.84 6.24 6.96 6.96 5.04 6 3.6 6.96 3.84 9.36 6.24 6.96 6.24 6.24 3.84 3.84 6.24 3.84 3.84 6.96 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 4.56]
+xshow
+end grestore
+end grestore
+% CancellationAbelianMonoid()
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 439 468 moveto
+255 468 lineto
+255 432 lineto
+439 432 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 439 468 moveto
+255 468 lineto
+255 432 lineto
+439 432 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+263 445 moveto
+(CancellationAbelianMonoid\(\))
+[9.36 6.24 6.96 6.24 6.24 3.84 3.84 6.24 3.84 3.84 6.96 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 4.56 4.56]
+xshow
+end grestore
+end grestore
+% FreeAbelianMonoidCategory(a:SetCategory,b:CancellationAbelianMonoid)->CancellationAbelianMonoid()
+newpath 396 504 moveto
+388 495 379 485 370 476 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 372 473 moveto
+363 468 lineto
+367 478 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 372 473 moveto
+363 468 lineto
+367 478 lineto
+closepath
+stroke
+end grestore
+% RetractableTo(SetCategory)
+gsave 10 dict begin
+filled
+0.404 0.667 0.545 nodecolor
+0.404 0.667 0.545 nodecolor
+newpath 574 396 moveto
+402 396 lineto
+402 360 lineto
+574 360 lineto
+closepath
+fill
+0.404 0.667 0.545 nodecolor
+newpath 574 396 moveto
+402 396 lineto
+402 360 lineto
+574 360 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+409 373 moveto
+(RetractableTo\(SetCategory\))
+[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 7.68 6 3.84 9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96 4.56]
+xshow
+end grestore
+end grestore
+% FreeAbelianMonoidCategory(a:SetCategory,b:CancellationAbelianMonoid)->RetractableTo(SetCategory)
+newpath 425 504 moveto
+432 494 441 480 448 468 curveto
+459 448 469 424 477 405 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 480 407 moveto
+481 396 lineto
+474 404 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 480 407 moveto
+481 396 lineto
+474 404 lineto
+closepath
+stroke
+end grestore
+% AbelianMonoid()
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 384 396 moveto
+270 396 lineto
+270 360 lineto
+384 360 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 384 396 moveto
+270 396 lineto
+270 360 lineto
+384 360 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+277 373 moveto
+(AbelianMonoid\(\))
+[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 4.56 4.56]
+xshow
+end grestore
+end grestore
+% CancellationAbelianMonoid()->AbelianMonoid()
+newpath 342 432 moveto
+340 424 337 415 335 406 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 338 405 moveto
+332 396 lineto
+332 407 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 338 405 moveto
+332 396 lineto
+332 407 lineto
+closepath
+stroke
+end grestore
+% RetractableTo(a:Type)
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 558 324 moveto
+418 324 lineto
+418 288 lineto
+558 288 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 558 324 moveto
+418 324 lineto
+418 288 lineto
+558 288 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+425 301 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(SetCategory)->RetractableTo(a:Type)
+newpath 488 360 moveto
+488 352 488 343 488 334 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 492 334 moveto
+488 324 lineto
+485 334 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 492 334 moveto
+488 324 lineto
+485 334 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 202 36 moveto
+134 36 lineto
+134 0 lineto
+202 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 202 36 moveto
+134 36 lineto
+134 0 lineto
+202 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+142 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 490 288 moveto
+491 257 492 192 469 144 curveto
+448 103 435 94 396 72 curveto
+337 39 260 27 212 21 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 212 18 moveto
+202 20 lineto
+212 24 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 212 18 moveto
+202 20 lineto
+212 24 lineto
+closepath
+stroke
+end grestore
+% AbelianSemiGroup()
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 394 324 moveto
+260 324 lineto
+260 288 lineto
+394 288 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 394 324 moveto
+260 324 lineto
+260 288 lineto
+394 288 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+267 301 moveto
+(AbelianSemiGroup\(\))
+[9.84 6.96 6.24 3.84 3.84 6.24 6.96 7.68 6.24 10.8 3.84 10.08 4.8 6.96 6.96 6.96 4.56 4.56]
+xshow
+end grestore
+end grestore
+% AbelianMonoid()->AbelianSemiGroup()
+newpath 327 360 moveto
+327 352 327 343 327 334 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 331 334 moveto
+327 324 lineto
+324 334 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 331 334 moveto
+327 324 lineto
+324 334 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 199 252 moveto
+105 252 lineto
+105 216 lineto
+199 216 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 199 252 moveto
+105 252 lineto
+105 216 lineto
+199 216 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+112 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
+% AbelianSemiGroup()->SetCategory()
+newpath 283 288 moveto
+259 278 230 266 205 256 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 207 253 moveto
+196 252 lineto
+204 259 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 207 253 moveto
+196 252 lineto
+204 259 lineto
+closepath
+stroke
+end grestore
+% RepeatedDoubling(AbelianSemiGroup)
+gsave 10 dict begin
+filled
+0.333 1.000 0.933 nodecolor
+0.333 1.000 0.933 nodecolor
+newpath 458 252 moveto
+220 252 lineto
+220 216 lineto
+458 216 lineto
+closepath
+fill
+0.333 1.000 0.933 nodecolor
+newpath 458 252 moveto
+220 252 lineto
+220 216 lineto
+458 216 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+228 229 moveto
+(RepeatedDoubling\(AbelianSemiGroup\))
+[9.12 6.24 6.96 6.24 6.24 3.84 6.24 6.96 10.08 6.96 6.96 6.96 3.84 3.84 6.96 6.96 4.56 9.84 6.96 6.24 3.84 3.84 6.24 6.96 7.68 6.24 10.8 3.84 10.08 4.8 6.96 6.96 6.96 4.56]
+xshow
+end grestore
+end grestore
+% AbelianSemiGroup()->RepeatedDoubling(AbelianSemiGroup)
+newpath 330 288 moveto
+331 280 333 271 334 262 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 337 262 moveto
+336 252 lineto
+331 261 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 337 262 moveto
+336 252 lineto
+331 261 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 106 216 moveto
+90 207 72 195 61 180 curveto
+48 162 44 137 43 118 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 46 118 moveto
+42 108 lineto
+40 118 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 46 118 moveto
+42 108 lineto
+40 118 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 234 180 moveto
+70 180 lineto
+70 144 lineto
+234 144 lineto
+closepath
+fill
+0.404 0.667 0.545 nodecolor
+newpath 234 180 moveto
+70 180 lineto
+70 144 lineto
+234 144 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+78 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 152 216 moveto
+152 208 152 199 152 190 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 156 190 moveto
+152 180 lineto
+149 190 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 156 190 moveto
+152 180 lineto
+149 190 lineto
+closepath
+stroke
+end grestore
+% RepeatedDoubling(a:SetCategory)
+gsave 10 dict begin
+filled
+0.333 1.000 0.933 nodecolor
+0.333 1.000 0.933 nodecolor
+newpath 460 180 moveto
+252 180 lineto
+252 144 lineto
+460 144 lineto
+closepath
+fill
+0.333 1.000 0.933 nodecolor
+newpath 460 180 moveto
+252 180 lineto
+252 144 lineto
+460 144 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+259 157 moveto
+(RepeatedDoubling\(a:SetCategory\))
+[9.12 6.24 6.96 6.24 6.24 3.84 6.24 6.96 10.08 6.96 6.96 6.96 3.84 3.84 6.96 6.96 4.56 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]
+xshow
+end grestore
+end grestore
+% RepeatedDoubling(AbelianSemiGroup)->RepeatedDoubling(a:SetCategory)
+newpath 343 216 moveto
+345 208 347 199 349 190 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 352 191 moveto
+352 180 lineto
+346 189 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 352 191 moveto
+352 180 lineto
+346 189 lineto
+closepath
+stroke
+end grestore
+% BasicType()->Category
+newpath 74 72 moveto
+90 63 110 51 128 41 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 130 44 moveto
+137 36 lineto
+127 38 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 130 44 moveto
+137 36 lineto
+127 38 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 156 144 moveto
+158 136 160 127 162 118 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 165 118 moveto
+164 108 lineto
+159 117 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 165 118 moveto
+164 108 lineto
+159 117 lineto
+closepath
+stroke
+end grestore
+% CoercibleTo(a:Type)->Category
+newpath 168 72 moveto
+168 64 168 55 168 46 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 172 46 moveto
+168 36 lineto
+165 46 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 172 46 moveto
+168 36 lineto
+165 46 lineto
+closepath
+stroke
+end grestore
+% Package
+gsave 10 dict begin
+filled
+0.333 1.000 0.933 nodecolor
+0.333 1.000 0.933 nodecolor
+newpath 387 108 moveto
+325 108 lineto
+325 72 lineto
+387 72 lineto
+closepath
+fill
+0.333 1.000 0.933 nodecolor
+newpath 387 108 moveto
+325 108 lineto
+325 72 lineto
+387 72 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+332 85 moveto
+(Package)
+[7.44 6.24 6 6.96 6.24 6.72 6.24]
+xshow
+end grestore
+end grestore
+% RepeatedDoubling(a:SetCategory)->Package
+newpath 356 144 moveto
+356 136 356 127 356 118 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 360 118 moveto
+356 108 lineto
+353 118 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 360 118 moveto
+356 108 lineto
+353 118 lineto
+closepath
+stroke
+end grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+end
+restore
+%%EOF
diff --git a/books/ps/v102functionspace.ps b/books/ps/v102functionspace.ps
new file mode 100644
index 0000000..e798ddc
--- /dev/null
+++ b/books/ps/v102functionspace.ps
@@ -0,0 +1,632 @@
+%!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 557 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 557 224
+%%PageOrientation: Portrait
+gsave
+36 36 521 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
+519 186 lineto
+519 -6 lineto
+closepath
+fill
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 186 lineto
+519 186 lineto
+519 -6 lineto
+closepath
+stroke
+0.000 0.000 0.000 graphcolor
+14.00 /Times-Roman set_font
+% FunctionSpace(a:OrderedSet)
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 354 180 moveto
+172 180 lineto
+172 144 lineto
+354 144 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 354 180 moveto
+172 180 lineto
+172 144 lineto
+354 144 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+180 157 moveto
+(FunctionSpace\(a:OrderedSet\))
+[7.44 6.96 6.96 6.24 3.84 3.84 6.96 6.96 7.68 6.96 6.24 6.24 6.24 4.56 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
+% ExpressionSpace()
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 209 108 moveto
+87 108 lineto
+87 72 lineto
+209 72 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 209 108 moveto
+87 108 lineto
+87 72 lineto
+209 72 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+95 85 moveto
+(ExpressionSpace\(\))
+[8.64 6.96 6.96 4.8 6.24 5.52 5.52 3.84 6.96 6.96 7.68 6.96 6.24 6.24 6.24 4.56 4.56]
+xshow
+end grestore
+end grestore
+% FunctionSpace(a:OrderedSet)->ExpressionSpace()
+newpath 234 144 moveto
+219 135 201 124 186 114 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 187 111 moveto
+177 108 lineto
+183 116 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 187 111 moveto
+177 108 lineto
+183 116 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 90 36 moveto
+0 36 lineto
+0 0 lineto
+90 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 90 36 moveto
+0 36 lineto
+0 0 lineto
+90 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+8 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
+% FunctionSpace(a:OrderedSet)->RETRACT...
+newpath 174 144 moveto
+134 134 93 122 78 108 curveto
+60 92 52 66 49 46 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 52 45 moveto
+47 36 lineto
+46 46 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 52 45 moveto
+47 36 lineto
+46 46 lineto
+closepath
+stroke
+end grestore
+% PATAB...
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 299 108 moveto
+227 108 lineto
+227 72 lineto
+299 72 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 299 108 moveto
+227 108 lineto
+227 72 lineto
+299 72 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+235 85 moveto
+(PATAB...)
+[6.48 9.36 7.92 10.08 9.36 3.6 3.6 3.6]
+xshow
+end grestore
+end grestore
+% FunctionSpace(a:OrderedSet)->PATAB...
+newpath 263 144 moveto
+263 136 263 127 263 118 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 267 118 moveto
+263 108 lineto
+260 118 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 267 118 moveto
+263 108 lineto
+260 118 lineto
+closepath
+stroke
+end grestore
+% FPATMAB...
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 409 108 moveto
+317 108 lineto
+317 72 lineto
+409 72 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 409 108 moveto
+317 108 lineto
+317 72 lineto
+409 72 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+325 85 moveto
+(FPATMAB...)
+[7.68 6.48 9.36 8.64 12.48 10.08 9.36 3.6 3.6 3.6]
+xshow
+end grestore
+end grestore
+% FunctionSpace(a:OrderedSet)->FPATMAB...
+newpath 288 144 moveto
+300 135 316 124 330 114 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 332 117 moveto
+338 108 lineto
+328 111 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 332 117 moveto
+338 108 lineto
+328 111 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 513 108 moveto
+427 108 lineto
+427 72 lineto
+513 72 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 513 108 moveto
+427 108 lineto
+427 72 lineto
+513 72 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+434 85 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
+% FunctionSpace(a:OrderedSet)->FRETRCT...
+newpath 315 144 moveto
+346 133 386 119 417 108 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 418 111 moveto
+427 105 lineto
+416 105 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 418 111 moveto
+427 105 lineto
+416 105 lineto
+closepath
+stroke
+end grestore
+% ExpressionSpace()->RETRACT...
+newpath 122 72 moveto
+109 63 93 52 79 42 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 80 39 moveto
+70 36 lineto
+76 44 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 80 39 moveto
+70 36 lineto
+76 44 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 188 36 moveto
+108 36 lineto
+108 0 lineto
+188 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 188 36 moveto
+108 36 lineto
+108 0 lineto
+188 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+115 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
+% ExpressionSpace()->ORDSET...
+newpath 148 72 moveto
+148 64 148 55 148 46 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 152 46 moveto
+148 36 lineto
+145 46 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 152 46 moveto
+148 36 lineto
+145 46 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 294 36 moveto
+206 36 lineto
+206 0 lineto
+294 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 294 36 moveto
+206 36 lineto
+206 0 lineto
+294 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+214 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
+% ExpressionSpace()->IEVALAB...
+newpath 174 72 moveto
+186 63 202 52 216 42 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 219 44 moveto
+225 36 lineto
+215 39 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 219 44 moveto
+225 36 lineto
+215 39 lineto
+closepath
+stroke
+end grestore
+% EVALABLE...
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 412 36 moveto
+312 36 lineto
+312 0 lineto
+412 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 412 36 moveto
+312 36 lineto
+312 0 lineto
+412 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+320 13 moveto
+(EVALABLE...)
+[8.64 8.4 10.08 8.64 10.08 9.36 8.64 8.64 3.6 3.6 3.6]
+xshow
+end grestore
+end grestore
+% ExpressionSpace()->EVALABLE...
+newpath 202 72 moveto
+233 62 271 49 302 38 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 303 41 moveto
+312 35 lineto
+301 35 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 303 41 moveto
+312 35 lineto
+301 35 lineto
+closepath
+stroke
+end grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+end
+restore
+%%EOF
diff --git a/books/ps/v102intervalcategory.ps b/books/ps/v102intervalcategory.ps
new file mode 100644
index 0000000..83ce7db
--- /dev/null
+++ b/books/ps/v102intervalcategory.ps
@@ -0,0 +1,922 @@
+%!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 696 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 696 512
+%%PageOrientation: Portrait
+gsave
+36 36 660 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
+658 474 lineto
+658 -6 lineto
+closepath
+fill
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 474 lineto
+658 474 lineto
+658 -6 lineto
+closepath
+stroke
+0.000 0.000 0.000 graphcolor
+14.00 /Times-Roman set_font
+% IntervalCategory(a:Join(FloatingPointSystem,TranscendentalFunctionCategory))
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 633 468 moveto
+163 468 lineto
+163 432 lineto
+633 432 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 633 468 moveto
+163 468 lineto
+163 432 lineto
+633 432 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+171 445 moveto
+(IntervalCategory\(a:Join\(FloatingPointSystem,TranscendentalFunctionCategory\)\))
+[4.56 6.96 3.84 6.24 5.04 6.72 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 5.52 6.96 3.84 6.96 4.56 7.68 3.84 6.96 6.24 3.84 3.84 6.96 6.96 7.44 6.96 3.84 6.96 3.84 7.68 6.48 5.28 3.84 6.24 10.8 3.6 7.92 4.8 6.24 6.96 5.52 6.24 6.24 6.96 6.96 6.24 6.96 4.08 6.24 3.84 7.44 6.96 6.96 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
+% GcdDomain()
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 236 396 moveto
+142 396 lineto
+142 360 lineto
+236 360 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 236 396 moveto
+142 396 lineto
+142 360 lineto
+236 360 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+150 373 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
+% IntervalCategory(a:Join(FloatingPointSystem,TranscendentalFunctionCategory))->GcdDomain()
+newpath 346 432 moveto
+315 422 277 409 246 397 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 247 394 moveto
+236 394 lineto
+245 400 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 247 394 moveto
+236 394 lineto
+245 400 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 334 396 moveto
+254 396 lineto
+254 360 lineto
+334 360 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 334 396 moveto
+254 396 lineto
+254 360 lineto
+334 360 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+261 373 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
+% IntervalCategory(a:Join(FloatingPointSystem,TranscendentalFunctionCategory))->ORDSET...
+newpath 372 432 moveto
+359 423 343 412 329 402 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 330 399 moveto
+320 396 lineto
+326 404 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 330 399 moveto
+320 396 lineto
+326 404 lineto
+closepath
+stroke
+end grestore
+% TRANFUN...
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 444 396 moveto
+352 396 lineto
+352 360 lineto
+444 360 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 444 396 moveto
+352 396 lineto
+352 360 lineto
+444 360 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+359 373 moveto
+(TRANFUN...)
+[8.64 9.36 10.08 10.08 7.68 10.08 9.84 3.6 3.6 3.6]
+xshow
+end grestore
+end grestore
+% IntervalCategory(a:Join(FloatingPointSystem,TranscendentalFunctionCategory))->TRANFUN...
+newpath 398 432 moveto
+398 424 398 415 398 406 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 402 406 moveto
+398 396 lineto
+395 406 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 402 406 moveto
+398 396 lineto
+395 406 lineto
+closepath
+stroke
+end grestore
+% RADCAT...
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 544 396 moveto
+462 396 lineto
+462 360 lineto
+544 360 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 544 396 moveto
+462 396 lineto
+462 360 lineto
+544 360 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+469 373 moveto
+(RADCAT...)
+[9.36 10.08 10.08 9.12 9.36 7.44 3.6 3.6 3.6]
+xshow
+end grestore
+end grestore
+% IntervalCategory(a:Join(FloatingPointSystem,TranscendentalFunctionCategory))->RADCAT...
+newpath 424 432 moveto
+438 423 454 412 468 402 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 471 404 moveto
+477 396 lineto
+467 399 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 471 404 moveto
+477 396 lineto
+467 399 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 652 396 moveto
+562 396 lineto
+562 360 lineto
+652 360 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 652 396 moveto
+562 396 lineto
+562 360 lineto
+652 360 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+570 373 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
+% IntervalCategory(a:Join(FloatingPointSystem,TranscendentalFunctionCategory))->RETRACT...
+newpath 450 432 moveto
+481 421 521 408 552 397 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 553 400 moveto
+562 394 lineto
+551 394 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 553 400 moveto
+562 394 lineto
+551 394 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 246 324 moveto
+132 324 lineto
+132 288 lineto
+246 288 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 246 324 moveto
+132 324 lineto
+132 288 lineto
+246 288 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+139 301 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 189 360 moveto
+189 352 189 343 189 334 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 193 334 moveto
+189 324 lineto
+186 334 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 193 334 moveto
+189 324 lineto
+186 334 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 128 252 moveto
+0 252 lineto
+0 216 lineto
+128 216 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 128 252 moveto
+0 252 lineto
+0 216 lineto
+128 216 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+8 229 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 157 288 moveto
+141 279 121 267 104 257 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 105 254 moveto
+95 252 lineto
+102 260 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 105 254 moveto
+95 252 lineto
+102 260 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 434 252 moveto
+250 252 lineto
+250 216 lineto
+434 216 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 434 252 moveto
+250 252 lineto
+250 216 lineto
+434 216 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+258 229 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 228 288 moveto
+248 278 273 267 295 256 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 296 259 moveto
+304 252 lineto
+293 253 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 296 259 moveto
+304 252 lineto
+293 253 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 232 252 moveto
+146 252 lineto
+146 216 lineto
+232 216 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 232 252 moveto
+146 252 lineto
+146 216 lineto
+232 216 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+153 229 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 189 288 moveto
+189 280 189 271 189 262 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 193 262 moveto
+189 252 lineto
+186 262 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 193 262 moveto
+189 252 lineto
+186 262 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 158 180 moveto
+98 180 lineto
+98 144 lineto
+158 144 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 158 180 moveto
+98 180 lineto
+98 144 lineto
+158 144 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+105 157 moveto
+(RING...)
+[9.36 4.56 9.84 10.08 3.6 3.6 3.6]
+xshow
+end grestore
+end grestore
+% CommutativeRing()->RING...
+newpath 80 216 moveto
+88 207 97 197 105 188 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 108 190 moveto
+112 180 lineto
+103 185 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 108 190 moveto
+112 180 lineto
+103 185 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 235 36 moveto
+137 36 lineto
+137 0 lineto
+235 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 235 36 moveto
+137 36 lineto
+137 0 lineto
+235 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+145 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 67 216 moveto
+70 197 77 167 89 144 curveto
+108 105 139 68 161 44 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 164 46 moveto
+168 36 lineto
+159 41 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 164 46 moveto
+168 36 lineto
+159 41 lineto
+closepath
+stroke
+end grestore
+% Algebra(a:CommutativeRing)->RING...
+newpath 288 216 moveto
+251 203 202 187 168 175 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 169 172 moveto
+158 172 lineto
+167 178 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 169 172 moveto
+158 172 lineto
+167 178 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 447 180 moveto
+265 180 lineto
+265 144 lineto
+447 144 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 447 180 moveto
+265 180 lineto
+265 144 lineto
+447 144 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+272 157 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 346 216 moveto
+347 208 349 199 351 190 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 354 190 moveto
+353 180 lineto
+348 189 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 354 190 moveto
+353 180 lineto
+348 189 lineto
+closepath
+stroke
+end grestore
+% EntireRing()->RING...
+newpath 174 216 moveto
+167 207 158 197 150 188 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 152 185 moveto
+143 180 lineto
+147 190 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 152 185 moveto
+143 180 lineto
+147 190 lineto
+closepath
+stroke
+end grestore
+% EntireRing()->BMODULE...
+newpath 189 216 moveto
+188 178 187 91 186 46 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 190 46 moveto
+186 36 lineto
+183 46 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 190 46 moveto
+186 36 lineto
+183 46 lineto
+closepath
+stroke
+end grestore
+% BiModule(a:CommutativeRing,b:CommutativeRing)
+gsave 10 dict begin
+filled
+0.404 0.667 0.545 nodecolor
+0.404 0.667 0.545 nodecolor
+newpath 526 108 moveto
+214 108 lineto
+214 72 lineto
+526 72 lineto
+closepath
+fill
+0.404 0.667 0.545 nodecolor
+newpath 526 108 moveto
+214 108 lineto
+214 72 lineto
+526 72 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+221 85 moveto
+(BiModule\(a:CommutativeRing,b:CommutativeRing\))
+[9.36 3.84 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 3.6 6.96 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
+% Module(a:CommutativeRing)->BiModule(a:CommutativeRing,b:CommutativeRing)
+newpath 360 144 moveto
+361 136 363 127 365 118 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 368 118 moveto
+367 108 lineto
+362 117 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 368 118 moveto
+367 108 lineto
+362 117 lineto
+closepath
+stroke
+end grestore
+% BiModule(a:CommutativeRing,b:CommutativeRing)->BMODULE...
+newpath 324 72 moveto
+299 62 268 50 241 40 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 243 37 moveto
+232 36 lineto
+240 43 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 243 37 moveto
+232 36 lineto
+240 43 lineto
+closepath
+stroke
+end grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+end
+restore
+%%EOF
diff --git a/books/ps/v102liouvillianfunctioncategory.ps b/books/ps/v102liouvillianfunctioncategory.ps
index 357b79d..6779433 100644
--- a/books/ps/v102liouvillianfunctioncategory.ps
+++ b/books/ps/v102liouvillianfunctioncategory.ps
@@ -3,7 +3,7 @@
 %%For: (root) root
 %%Title: pic
 %%Pages: (atend)
-%%BoundingBox: 36 36 568 296
+%%BoundingBox: 36 36 400 368
 %%EndComments
 save
 %%BeginProlog
@@ -180,10 +180,10 @@ def
 
 %%EndSetup
 %%Page: 1 1
-%%PageBoundingBox: 36 36 568 296
+%%PageBoundingBox: 36 36 400 368
 %%PageOrientation: Portrait
 gsave
-36 36 532 260 boxprim clip newpath
+36 36 364 332 boxprim clip newpath
 36 36 translate
 0 0 1 beginpage
 1.0000 set_scale
@@ -191,513 +191,294 @@ gsave
 0.167 0.600 1.000 graphcolor
 0.167 0.600 1.000 graphcolor
 newpath -6 -6 moveto
--6 258 lineto
-530 258 lineto
-530 -6 lineto
+-6 330 lineto
+362 330 lineto
+362 -6 lineto
 closepath
 fill
 0.167 0.600 1.000 graphcolor
 newpath -6 -6 moveto
--6 258 lineto
-530 258 lineto
-530 -6 lineto
+-6 330 lineto
+362 330 lineto
+362 -6 lineto
 closepath
 stroke
 0.000 0.000 0.000 graphcolor
 14.00 /Times-Roman set_font
-% LiouvillianFunctionCategory()
+% IndexedDirectProductCategory(a:SetCategory,b:OrderedSet)
 gsave 10 dict begin
 filled
 0.537 0.247 0.902 nodecolor
 0.537 0.247 0.902 nodecolor
-newpath 292 252 moveto
-104 252 lineto
-104 216 lineto
-292 216 lineto
+newpath 356 324 moveto
+0 324 lineto
+0 288 lineto
+356 288 lineto
 closepath
 fill
 0.537 0.247 0.902 nodecolor
-newpath 292 252 moveto
-104 252 lineto
-104 216 lineto
-292 216 lineto
+newpath 356 324 moveto
+0 324 lineto
+0 288 lineto
+356 288 lineto
 closepath
 stroke
 gsave 10 dict begin
 0.000 0.000 0.000 nodecolor
-112 229 moveto
-(LiouvillianFunctionCategory\(\))
-[8.64 3.84 6.96 6.96 6.96 3.84 3.84 3.84 3.84 6.24 6.96 7.44 6.96 6.96 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]
+7 301 moveto
+(IndexedDirectProductCategory\(a:SetCategory,b:OrderedSet\))
+[4.56 6.96 6.96 5.76 6.48 6.24 6.96 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 7.68 6 3.84 9.36 6.24 3.84 6.24 6.96 6.96 5.04 6 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 4.56]
 xshow
 end grestore
 end grestore
-% PrimitiveFunctionCategory()
+% SetCategory()
 gsave 10 dict begin
 filled
 0.537 0.247 0.902 nodecolor
 0.537 0.247 0.902 nodecolor
-newpath 178 180 moveto
-0 180 lineto
-0 144 lineto
-178 144 lineto
+newpath 225 252 moveto
+131 252 lineto
+131 216 lineto
+225 216 lineto
 closepath
 fill
 0.537 0.247 0.902 nodecolor
-newpath 178 180 moveto
-0 180 lineto
-0 144 lineto
-178 144 lineto
+newpath 225 252 moveto
+131 252 lineto
+131 216 lineto
+225 216 lineto
 closepath
 stroke
 gsave 10 dict begin
 0.000 0.000 0.000 nodecolor
-7 157 moveto
-(PrimitiveFunctionCategory\(\))
-[7.68 5.04 3.84 10.8 3.84 3.84 3.84 6.48 6.24 7.44 6.96 6.96 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]
+138 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
-% LiouvillianFunctionCategory()->PrimitiveFunctionCategory()
-newpath 170 216 moveto
-156 207 139 196 125 186 curveto
+% IndexedDirectProductCategory(a:SetCategory,b:OrderedSet)->SetCategory()
+newpath 178 288 moveto
+178 280 178 271 178 262 curveto
 stroke
 gsave 10 dict begin
 solid
 1 setlinewidth
 0.000 0.000 0.000 edgecolor
-newpath 126 183 moveto
-116 180 lineto
-122 188 lineto
+newpath 182 262 moveto
+178 252 lineto
+175 262 lineto
 closepath
 fill
 0.000 0.000 0.000 edgecolor
-newpath 126 183 moveto
-116 180 lineto
-122 188 lineto
+newpath 182 262 moveto
+178 252 lineto
+175 262 lineto
 closepath
 stroke
 end grestore
-% TranscendentalFunctionCategory()
+% BasicType()
 gsave 10 dict begin
 filled
 0.537 0.247 0.902 nodecolor
 0.537 0.247 0.902 nodecolor
-newpath 414 180 moveto
-202 180 lineto
-202 144 lineto
-414 144 lineto
+newpath 157 108 moveto
+73 108 lineto
+73 72 lineto
+157 72 lineto
 closepath
 fill
 0.537 0.247 0.902 nodecolor
-newpath 414 180 moveto
-202 180 lineto
-202 144 lineto
-414 144 lineto
+newpath 157 108 moveto
+73 108 lineto
+73 72 lineto
+157 72 lineto
 closepath
 stroke
 gsave 10 dict begin
 0.000 0.000 0.000 nodecolor
-210 157 moveto
-(TranscendentalFunctionCategory\(\))
-[7.92 4.8 6.24 6.96 5.52 6.24 6.24 6.96 6.96 6.24 6.96 4.08 6.24 3.84 7.44 6.96 6.96 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]
+80 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
-% LiouvillianFunctionCategory()->TranscendentalFunctionCategory()
-newpath 226 216 moveto
-239 207 257 196 272 186 curveto
+% SetCategory()->BasicType()
+newpath 166 216 moveto
+159 206 151 192 146 180 curveto
+137 160 128 136 123 118 curveto
 stroke
 gsave 10 dict begin
 solid
 1 setlinewidth
 0.000 0.000 0.000 edgecolor
-newpath 275 188 moveto
-281 180 lineto
-271 183 lineto
+newpath 126 117 moveto
+120 108 lineto
+120 119 lineto
 closepath
 fill
 0.000 0.000 0.000 edgecolor
-newpath 275 188 moveto
-281 180 lineto
-271 183 lineto
+newpath 126 117 moveto
+120 108 lineto
+120 119 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 306 36 moveto
-238 36 lineto
-238 0 lineto
-306 0 lineto
-closepath
-fill
-0.537 0.247 0.902 nodecolor
-newpath 306 36 moveto
-238 36 lineto
-238 0 lineto
-306 0 lineto
-closepath
-stroke
-gsave 10 dict begin
-0.000 0.000 0.000 nodecolor
-246 13 moveto
-(Category)
-[9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96]
-xshow
-end grestore
-end grestore
-% PrimitiveFunctionCategory()->Category
-newpath 85 144 moveto
-82 124 81 92 97 72 curveto
-114 52 181 35 228 26 curveto
-stroke
-gsave 10 dict begin
-solid
-1 setlinewidth
-0.000 0.000 0.000 edgecolor
-newpath 229 29 moveto
-238 24 lineto
-228 23 lineto
-closepath
-fill
-0.000 0.000 0.000 edgecolor
-newpath 229 29 moveto
-238 24 lineto
-228 23 lineto
-closepath
-stroke
-end grestore
-% TRIGCAT
-gsave 10 dict begin
-filled
-0.537 0.247 0.902 nodecolor
-0.537 0.247 0.902 nodecolor
-newpath 182 108 moveto
-106 108 lineto
-106 72 lineto
-182 72 lineto
-closepath
-fill
-0.537 0.247 0.902 nodecolor
-newpath 182 108 moveto
-106 108 lineto
-106 72 lineto
-182 72 lineto
-closepath
-stroke
-gsave 10 dict begin
-0.000 0.000 0.000 nodecolor
-114 85 moveto
-(TRIGCAT)
-[8.64 9.36 4.56 10.08 9.12 9.36 8.64]
-xshow
-end grestore
-end grestore
-% TranscendentalFunctionCategory()->TRIGCAT
-newpath 267 144 moveto
-244 134 215 122 191 111 curveto
-stroke
-gsave 10 dict begin
-solid
-1 setlinewidth
-0.000 0.000 0.000 edgecolor
-newpath 193 108 moveto
-182 107 lineto
-190 114 lineto
-closepath
-fill
-0.000 0.000 0.000 edgecolor
-newpath 193 108 moveto
-182 107 lineto
-190 114 lineto
-closepath
-stroke
-end grestore
-% ATRIG
-gsave 10 dict begin
-filled
-0.537 0.247 0.902 nodecolor
-0.537 0.247 0.902 nodecolor
-newpath 260 108 moveto
-200 108 lineto
-200 72 lineto
-260 72 lineto
-closepath
-fill
-0.537 0.247 0.902 nodecolor
-newpath 260 108 moveto
-200 108 lineto
-200 72 lineto
-260 72 lineto
-closepath
-stroke
-gsave 10 dict begin
-0.000 0.000 0.000 nodecolor
-208 85 moveto
-(ATRIG)
-[9.36 8.64 9.36 4.56 10.08]
-xshow
-end grestore
-end grestore
-% TranscendentalFunctionCategory()->ATRIG
-newpath 288 144 moveto
-278 135 267 125 257 115 curveto
-stroke
-gsave 10 dict begin
-solid
-1 setlinewidth
-0.000 0.000 0.000 edgecolor
-newpath 259 112 moveto
-249 108 lineto
-254 117 lineto
-closepath
-fill
-0.000 0.000 0.000 edgecolor
-newpath 259 112 moveto
-249 108 lineto
-254 117 lineto
-closepath
-stroke
-end grestore
-% HYPCAT
+% CoercibleTo(OutputForm)
 gsave 10 dict begin
 filled
-0.537 0.247 0.902 nodecolor
-0.537 0.247 0.902 nodecolor
-newpath 350 108 moveto
-278 108 lineto
-278 72 lineto
-350 72 lineto
+0.404 0.667 0.545 nodecolor
+0.404 0.667 0.545 nodecolor
+newpath 319 180 moveto
+155 180 lineto
+155 144 lineto
+319 144 lineto
 closepath
 fill
-0.537 0.247 0.902 nodecolor
-newpath 350 108 moveto
-278 108 lineto
-278 72 lineto
-350 72 lineto
+0.404 0.667 0.545 nodecolor
+newpath 319 180 moveto
+155 180 lineto
+155 144 lineto
+319 144 lineto
 closepath
 stroke
 gsave 10 dict begin
 0.000 0.000 0.000 nodecolor
-285 85 moveto
-(HYPCAT)
-[10.08 10.08 7.68 9.12 9.36 8.64]
+163 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
-% TranscendentalFunctionCategory()->HYPCAT
-newpath 310 144 moveto
-311 136 311 127 312 118 curveto
+% SetCategory()->CoercibleTo(OutputForm)
+newpath 193 216 moveto
+200 207 208 197 216 188 curveto
 stroke
 gsave 10 dict begin
 solid
 1 setlinewidth
 0.000 0.000 0.000 edgecolor
-newpath 316 118 moveto
-312 108 lineto
-309 118 lineto
+newpath 219 190 moveto
+222 180 lineto
+213 186 lineto
 closepath
 fill
 0.000 0.000 0.000 edgecolor
-newpath 316 118 moveto
-312 108 lineto
-309 118 lineto
+newpath 219 190 moveto
+222 180 lineto
+213 186 lineto
 closepath
 stroke
 end grestore
-% AHYP
+% Category
 gsave 10 dict begin
 filled
 0.537 0.247 0.902 nodecolor
 0.537 0.247 0.902 nodecolor
-newpath 424 108 moveto
-368 108 lineto
-368 72 lineto
-424 72 lineto
+newpath 212 36 moveto
+144 36 lineto
+144 0 lineto
+212 0 lineto
 closepath
 fill
 0.537 0.247 0.902 nodecolor
-newpath 424 108 moveto
-368 108 lineto
-368 72 lineto
-424 72 lineto
+newpath 212 36 moveto
+144 36 lineto
+144 0 lineto
+212 0 lineto
 closepath
 stroke
 gsave 10 dict begin
 0.000 0.000 0.000 nodecolor
-376 85 moveto
-(AHYP)
-[10.08 10.08 10.08 7.68]
+152 13 moveto
+(Category)
+[9.36 6.24 3.84 6.24 6.96 6.96 5.04 6.96]
 xshow
 end grestore
 end grestore
-% TranscendentalFunctionCategory()->AHYP
-newpath 330 144 moveto
-341 135 354 124 366 114 curveto
+% BasicType()->Category
+newpath 131 72 moveto
+139 63 148 53 155 44 curveto
 stroke
 gsave 10 dict begin
 solid
 1 setlinewidth
 0.000 0.000 0.000 edgecolor
-newpath 368 117 moveto
-374 108 lineto
-364 111 lineto
+newpath 158 46 moveto
+162 36 lineto
+153 41 lineto
 closepath
 fill
 0.000 0.000 0.000 edgecolor
-newpath 368 117 moveto
-374 108 lineto
-364 111 lineto
+newpath 158 46 moveto
+162 36 lineto
+153 41 lineto
 closepath
 stroke
 end grestore
-% ELEMFUN
+% CoercibleTo(a:Type)
 gsave 10 dict begin
 filled
 0.537 0.247 0.902 nodecolor
 0.537 0.247 0.902 nodecolor
-newpath 524 108 moveto
-442 108 lineto
-442 72 lineto
-524 72 lineto
+newpath 307 108 moveto
+175 108 lineto
+175 72 lineto
+307 72 lineto
 closepath
 fill
 0.537 0.247 0.902 nodecolor
-newpath 524 108 moveto
-442 108 lineto
-442 72 lineto
-524 72 lineto
+newpath 307 108 moveto
+175 108 lineto
+175 72 lineto
+307 72 lineto
 closepath
 stroke
 gsave 10 dict begin
 0.000 0.000 0.000 nodecolor
-449 85 moveto
-(ELEMFUN)
-[8.64 8.64 8.64 12.48 7.68 10.08 10.08]
+183 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
-% TranscendentalFunctionCategory()->ELEMFUN
-newpath 352 144 moveto
-377 134 407 121 433 111 curveto
-stroke
-gsave 10 dict begin
-solid
-1 setlinewidth
-0.000 0.000 0.000 edgecolor
-newpath 434 114 moveto
-442 107 lineto
-431 108 lineto
-closepath
-fill
-0.000 0.000 0.000 edgecolor
-newpath 434 114 moveto
-442 107 lineto
-431 108 lineto
-closepath
-stroke
-end grestore
-% TRIGCAT->Category
-newpath 176 72 moveto
-193 63 214 51 231 41 curveto
-stroke
-gsave 10 dict begin
-solid
-1 setlinewidth
-0.000 0.000 0.000 edgecolor
-newpath 233 44 moveto
-240 36 lineto
-230 38 lineto
-closepath
-fill
-0.000 0.000 0.000 edgecolor
-newpath 233 44 moveto
-240 36 lineto
-230 38 lineto
-closepath
-stroke
-end grestore
-% ATRIG->Category
-newpath 241 72 moveto
-245 64 251 54 257 45 curveto
-stroke
-gsave 10 dict begin
-solid
-1 setlinewidth
-0.000 0.000 0.000 edgecolor
-newpath 260 46 moveto
-262 36 lineto
-254 43 lineto
-closepath
-fill
-0.000 0.000 0.000 edgecolor
-newpath 260 46 moveto
-262 36 lineto
-254 43 lineto
-closepath
-stroke
-end grestore
-% HYPCAT->Category
-newpath 303 72 moveto
-299 64 293 54 287 45 curveto
-stroke
-gsave 10 dict begin
-solid
-1 setlinewidth
-0.000 0.000 0.000 edgecolor
-newpath 290 43 moveto
-282 36 lineto
-284 46 lineto
-closepath
-fill
-0.000 0.000 0.000 edgecolor
-newpath 290 43 moveto
-282 36 lineto
-284 46 lineto
-closepath
-stroke
-end grestore
-% AHYP->Category
-newpath 368 74 moveto
-352 64 330 52 312 41 curveto
+% CoercibleTo(OutputForm)->CoercibleTo(a:Type)
+newpath 238 144 moveto
+239 136 239 127 239 118 curveto
 stroke
 gsave 10 dict begin
 solid
 1 setlinewidth
 0.000 0.000 0.000 edgecolor
-newpath 313 38 moveto
-303 36 lineto
-310 44 lineto
+newpath 242 118 moveto
+240 108 lineto
+236 118 lineto
 closepath
 fill
 0.000 0.000 0.000 edgecolor
-newpath 313 38 moveto
-303 36 lineto
-310 44 lineto
+newpath 242 118 moveto
+240 108 lineto
+236 118 lineto
 closepath
 stroke
 end grestore
-% ELEMFUN->Category
-newpath 442 75 moveto
-439 74 436 73 433 72 curveto
-393 58 348 43 316 32 curveto
+% CoercibleTo(a:Type)->Category
+newpath 225 72 moveto
+217 63 208 53 201 44 curveto
 stroke
 gsave 10 dict begin
 solid
 1 setlinewidth
 0.000 0.000 0.000 edgecolor
-newpath 317 29 moveto
-306 29 lineto
-315 35 lineto
+newpath 203 41 moveto
+194 36 lineto
+198 46 lineto
 closepath
 fill
 0.000 0.000 0.000 edgecolor
-newpath 317 29 moveto
-306 29 lineto
-315 35 lineto
+newpath 203 41 moveto
+194 36 lineto
+198 46 lineto
 closepath
 stroke
 end grestore
diff --git a/changelog b/changelog
index e159796..56e625a 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,11 @@
+20081026 tpd books/bookvol10.2 add categories	
+20081026 tpd books/ps/v102functionspace.ps added
+20081026 tpd ps/v102intervalcategory.ps added
+20081026 tpd src/algebra/interval.spad add categories to bookvol10.2	
+20081026 tpd books/ps/v102liouvillianfunctioncategory.ps added
+20081026 tpd src/algebra/indexedp.spad add categories to bookvol10.2	
+20081026 tpd books/ps/v102freeabelianmonoidcategory.ps added
+20081026 tpd src/algebra/free.spad move categories to bookvol10.2
 20081023 tpd books/bookvol10.2 add categories
 20081023 tpd books/ps/v102quotientfieldcategory.ps added
 20081023 tpd books/ps/v102finitedivisorcategory.ps added
diff --git a/src/algebra/free.spad.pamphlet b/src/algebra/free.spad.pamphlet
index 8300350..ac84705 100644
--- a/src/algebra/free.spad.pamphlet
+++ b/src/algebra/free.spad.pamphlet
@@ -409,49 +409,6 @@ FreeGroup(S: SetCategory): Join(Group, RetractableTo S) with
             makeMulti concat_!(reverse_! r, q)
 
 @
-\section{category FAMONC FreeAbelianMonoidCategory}
-<<category FAMONC FreeAbelianMonoidCategory>>=
-)abbrev category FAMONC FreeAbelianMonoidCategory
-++ Category for free abelian monoid on any set of generators
-++ Author: Manuel Bronstein
-++ Date Created: November 1989
-++ Date Last Updated: 6 June 1991
-++ Description:
-++ A free abelian monoid on a set S is the monoid of finite sums of
-++ the form \spad{reduce(+,[ni * si])} where the si's are in S, and the ni's
-++ are in a given abelian monoid. The operation is commutative.
-FreeAbelianMonoidCategory(S: SetCategory, E:CancellationAbelianMonoid): Category ==
-  Join(CancellationAbelianMonoid, RetractableTo S) with
-        "+"        : (S, $) -> $
-          ++ s + x returns the sum of s and x.
-        "*"        : (E, S) -> $
-          ++ e * s returns e times s.
-        size       : $ -> NonNegativeInteger
-          ++ size(x) returns the number of terms in x.
-          ++ mapGen(f, a1\^e1 ... an\^en) returns \spad{f(a1)\^e1 ... f(an)\^en}.
-        terms      : $ -> List Record(gen: S, exp: E)
-          ++ terms(e1 a1 + ... + en an) returns \spad{[[a1, e1],...,[an, en]]}.
-        nthCoef    : ($, Integer) -> E
-          ++ nthCoef(x, n) returns the coefficient of the n^th term of x.
-        nthFactor  : ($, Integer) -> S
-          ++ nthFactor(x, n) returns the factor of the n^th term of x.
-        coefficient: (S, $) -> E
-          ++ coefficient(s, e1 a1 + ... + en an) returns ei such that
-          ++ ai = s, or 0 if s is not one of the ai's.
-        mapCoef    : (E -> E, $) -> $
-          ++ mapCoef(f, e1 a1 +...+ en an) returns
-          ++ \spad{f(e1) a1 +...+ f(en) an}.
-        mapGen     : (S -> S, $) -> $
-          ++ mapGen(f, e1 a1 +...+ en an) returns
-          ++ \spad{e1 f(a1) +...+ en f(an)}.
-        if E has OrderedAbelianMonoid then
-          highCommonTerms: ($, $) -> $
-            ++ highCommonTerms(e1 a1 + ... + en an, f1 b1 + ... + fm bm) returns
-            ++   \spad{reduce(+,[max(ei, fi) ci])}
-            ++ where ci ranges in the intersection
-            ++ of \spad{{a1,...,an}} and \spad{{b1,...,bm}}.
-
-@
 \section{domain IFAMON InnerFreeAbelianMonoid}
 <<domain IFAMON InnerFreeAbelianMonoid>>=
 )abbrev domain IFAMON InnerFreeAbelianMonoid
@@ -589,7 +546,6 @@ FreeAbelianGroup(S:SetCategory): Exports == Implementation where
 <<domain LMOPS ListMonoidOps>>
 <<domain FMONOID FreeMonoid>>
 <<domain FGROUP FreeGroup>>
-<<category FAMONC FreeAbelianMonoidCategory>>
 <<domain IFAMON InnerFreeAbelianMonoid>>
 <<domain FAMONOID FreeAbelianMonoid>>
 <<domain FAGROUP FreeAbelianGroup>>
diff --git a/src/algebra/fspace.spad.pamphlet b/src/algebra/fspace.spad.pamphlet
index b1bd645..6c6861a 100644
--- a/src/algebra/fspace.spad.pamphlet
+++ b/src/algebra/fspace.spad.pamphlet
@@ -9,456 +9,6 @@
 \eject
 \tableofcontents
 \eject
-\section{category ES ExpressionSpace}
-<<category ES ExpressionSpace>>=
-)abbrev category ES ExpressionSpace
-++ Category for domains on which operators can be applied
-++ Author: Manuel Bronstein
-++ Date Created: 22 March 1988
-++ Date Last Updated: 27 May 1994
-++ Description:
-++ An expression space is a set which is closed under certain operators;
-++ Keywords: operator, kernel, expression, space.
-ExpressionSpace(): Category == Defn where
-  N   ==> NonNegativeInteger
-  K   ==> Kernel %
-  OP  ==> BasicOperator
-  SY  ==> Symbol
-  PAREN  ==> "%paren"::SY
-  BOX    ==> "%box"::SY
-  DUMMYVAR ==> "%dummyVar"
-
-  Defn ==> Join(OrderedSet, RetractableTo K,
-                InnerEvalable(K, %), Evalable %) with
-    elt          : (OP, %) -> %
-      ++ elt(op,x) or op(x) applies the unary operator op to x.
-    elt          : (OP, %, %) -> %
-      ++ elt(op,x,y) or op(x, y) applies the binary operator op to x and y.
-    elt          : (OP, %, %, %) -> %
-      ++ elt(op,x,y,z) or op(x, y, z) applies the ternary operator op to x, y and z.
-    elt          : (OP, %, %, %, %) -> %
-      ++ elt(op,x,y,z,t) or op(x, y, z, t) applies the 4-ary operator op to x, y, z and t.
-    elt          : (OP, List %) -> %
-      ++ elt(op,[x1,...,xn]) or op([x1,...,xn]) applies the n-ary operator op to x1,...,xn.
-    subst        : (%, Equation %) -> %
-      ++ subst(f, k = g) replaces the kernel k by g formally in f.
-    subst        : (%, List Equation %) -> %
-      ++ subst(f, [k1 = g1,...,kn = gn]) replaces the kernels k1,...,kn
-      ++ by g1,...,gn formally in f.
-    subst        : (%, List K, List %) -> %
-      ++ subst(f, [k1...,kn], [g1,...,gn]) replaces the kernels k1,...,kn
-      ++ by g1,...,gn formally in f.
-    box          : % -> %
-      ++ box(f) returns f with a 'box' around it that prevents f from
-      ++ being evaluated when operators are applied to it. For example,
-      ++ \spad{log(1)} returns 0, but \spad{log(box 1)}
-      ++ returns the formal kernel log(1).
-    box          : List % -> %
-      ++ box([f1,...,fn]) returns \spad{(f1,...,fn)} with a 'box'
-      ++ around them that
-      ++ prevents the fi from being evaluated when operators are applied to
-      ++ them, and makes them applicable to a unary operator. For example,
-      ++ \spad{atan(box [x, 2])} returns the formal kernel \spad{atan(x, 2)}.
-    paren        : % -> %
-      ++ paren(f) returns (f). This prevents f from
-      ++ being evaluated when operators are applied to it. For example,
-      ++ \spad{log(1)} returns 0, but \spad{log(paren 1)} returns the
-      ++ formal kernel log((1)).
-    paren        : List % -> %
-      ++ paren([f1,...,fn]) returns \spad{(f1,...,fn)}. This
-      ++ prevents the fi from being evaluated when operators are applied to
-      ++ them, and makes them applicable to a unary operator. For example,
-      ++ \spad{atan(paren [x, 2])} returns the formal
-      ++ kernel \spad{atan((x, 2))}.
-    distribute   : % -> %
-      ++ distribute(f) expands all the kernels in f that are
-      ++ formally enclosed by a \spadfunFrom{box}{ExpressionSpace}
-      ++ or \spadfunFrom{paren}{ExpressionSpace} expression.
-    distribute   : (%, %) -> %
-      ++ distribute(f, g) expands all the kernels in f that contain g in their
-      ++ arguments and that are formally
-      ++ enclosed by a \spadfunFrom{box}{ExpressionSpace}
-      ++ or a \spadfunFrom{paren}{ExpressionSpace} expression.
-    height       : %  -> N
-      ++ height(f) returns the highest nesting level appearing in f.
-      ++ Constants have height 0. Symbols have height 1. For any
-      ++ operator op and expressions f1,...,fn, \spad{op(f1,...,fn)} has
-      ++ height equal to \spad{1 + max(height(f1),...,height(fn))}.
-    mainKernel   : %  -> Union(K, "failed")
-      ++ mainKernel(f) returns a kernel of f with maximum nesting level, or
-      ++ if f has no kernels (i.e. f is a constant).
-    kernels      : %  -> List K
-      ++ kernels(f) returns the list of all the top-level kernels
-      ++ appearing in f, but not the ones appearing in the arguments
-      ++ of the top-level kernels.
-    tower        : %  -> List K
-      ++ tower(f) returns all the kernels appearing in f, no matter
-      ++ what their levels are.
-    operators    : %  -> List OP
-      ++ operators(f) returns all the basic operators appearing in f,
-      ++ no matter what their levels are.
-    operator     : OP -> OP
-      ++ operator(op) returns a copy of op with the domain-dependent
-      ++ properties appropriate for %.
-    belong?      : OP -> Boolean
-      ++ belong?(op) tests if % accepts op as applicable to its
-      ++ elements.
-    is?          : (%, OP)     -> Boolean
-      ++ is?(x, op) tests if x is a kernel and is its operator is op.
-    is?          : (%, SY) -> Boolean
-      ++ is?(x, s) tests if x is a kernel and is the name of its
-      ++ operator is s.
-    kernel       : (OP, %) -> %
-      ++ kernel(op, x) constructs op(x) without evaluating it.
-    kernel       : (OP, List %) -> %
-      ++ kernel(op, [f1,...,fn]) constructs \spad{op(f1,...,fn)} without
-      ++ evaluating it.
-    map          : (% -> %, K) -> %
-      ++ map(f, k) returns \spad{op(f(x1),...,f(xn))} where
-      ++ \spad{k = op(x1,...,xn)}.
-    freeOf?      : (%, %)  -> Boolean
-      ++ freeOf?(x, y) tests if x does not contain any occurrence of y,
-      ++ where y is a single kernel.
-    freeOf?      : (%, SY) -> Boolean
-      ++ freeOf?(x, s) tests if x does not contain any operator
-      ++ whose name is s.
-    eval         : (%, List SY, List(% -> %)) -> %
-      ++ eval(x, [s1,...,sm], [f1,...,fm]) replaces
-      ++ every \spad{si(a)} in x by \spad{fi(a)} for any \spad{a}.
-    eval         : (%, List SY, List(List % -> %)) -> %
-      ++ eval(x, [s1,...,sm], [f1,...,fm]) replaces
-      ++ every \spad{si(a1,...,an)} in x by
-      ++ \spad{fi(a1,...,an)} for any \spad{a1},...,\spad{an}.
-    eval         : (%, SY, List % -> %) -> %
-      ++ eval(x, s, f) replaces every \spad{s(a1,..,am)} in x
-      ++ by \spad{f(a1,..,am)} for any \spad{a1},...,\spad{am}.
-    eval         : (%, SY, % -> %) -> %
-      ++ eval(x, s, f) replaces every \spad{s(a)} in x by \spad{f(a)}
-      ++ for any \spad{a}.
-    eval         : (%, List OP, List(% -> %)) -> %
-      ++ eval(x, [s1,...,sm], [f1,...,fm]) replaces
-      ++ every \spad{si(a)} in x by \spad{fi(a)} for any \spad{a}.
-    eval         : (%, List OP, List(List % -> %)) -> %
-      ++ eval(x, [s1,...,sm], [f1,...,fm]) replaces
-      ++ every \spad{si(a1,...,an)} in x by
-      ++ \spad{fi(a1,...,an)} for any \spad{a1},...,\spad{an}.
-    eval         : (%, OP, List % -> %) -> %
-      ++ eval(x, s, f) replaces every \spad{s(a1,..,am)} in x
-      ++ by \spad{f(a1,..,am)} for any \spad{a1},...,\spad{am}.
-    eval         : (%, OP, % -> %) -> %
-      ++ eval(x, s, f) replaces every \spad{s(a)} in x by \spad{f(a)}
-      ++ for any \spad{a}.
-    if % has Ring then
-      minPoly: K -> SparseUnivariatePolynomial %
-        ++ minPoly(k) returns p such that \spad{p(k) = 0}.
-      definingPolynomial: % -> %
-        ++ definingPolynomial(x) returns an expression p such that
-        ++ \spad{p(x) = 0}.
-    if % has RetractableTo Integer then
-      even?: % -> Boolean
-        ++ even? x is true if x is an even integer.
-      odd? : % -> Boolean
-        ++ odd? x is true if x is an odd integer.
-
-   add
-
--- the 7 functions not provided are:
---        kernels   minPoly   definingPolynomial
---        coerce:K -> %  eval:(%, List K, List %) -> %
---        subst:(%, List K, List %) -> %
---        eval:(%, List Symbol, List(List % -> %)) -> %
-
-    allKernels: %      -> Set K
-    listk     : %      -> List K
-    allk      : List % -> Set K
-    unwrap    : (List K, %) -> %
-    okkernel  : (OP, List %) -> %
-    mkKerLists: List Equation % -> Record(lstk: List K, lstv:List %)
-
-    oppren := operator(PAREN)$CommonOperators()
-    opbox  := operator(BOX)$CommonOperators()
-
-    box(x:%)     == box [x]
-    paren(x:%)   == paren [x]
-    belong? op   == op = oppren or op = opbox
-    listk f      == parts allKernels f
-    tower f      == sort_! listk f
-    allk l       == reduce("union", [allKernels f for f in l], {})
-    operators f  == [operator k for k in listk f]
-    height f     == reduce("max", [height k for k in kernels f], 0)
-    freeOf?(x:%, s:SY)       == not member?(s, [name k for k in listk x])
-    distribute x == unwrap([k for k in listk x | is?(k, oppren)], x)
-    box(l:List %)                  == opbox l
-    paren(l:List %)                == oppren l
-    freeOf?(x:%, k:%)              == not member?(retract k, listk x)
-    kernel(op:OP, arg:%)           == kernel(op, [arg])
-    elt(op:OP, x:%)                == op [x]
-    elt(op:OP, x:%, y:%)           == op [x, y]
-    elt(op:OP, x:%, y:%, z:%)      == op [x, y, z]
-    elt(op:OP, x:%, y:%, z:%, t:%) == op [x, y, z, t]
-    eval(x:%, s:SY, f:List % -> %) == eval(x, [s], [f])
-    eval(x:%, s:OP, f:List % -> %) == eval(x, [name s], [f])
-    eval(x:%, s:SY, f:% -> %)      == eval(x, [s], [f first #1])
-    eval(x:%, s:OP, f:% -> %)      == eval(x, [s], [f first #1])
-    subst(x:%, e:Equation %)       == subst(x, [e])
-
-    eval(x:%, ls:List OP, lf:List(% -> %)) ==
-      eval(x, ls, [f first #1 for f in lf]$List(List % -> %))
-
-    eval(x:%, ls:List SY, lf:List(% -> %)) ==
-      eval(x, ls, [f first #1 for f in lf]$List(List % -> %))
-
-    eval(x:%, ls:List OP, lf:List(List % -> %)) ==
-      eval(x, [name s for s in ls]$List(SY), lf)
-
-    map(fn, k) ==
-      (l := [fn x for x in argument k]$List(%)) = argument k => k::%
-      (operator k) l
-
-    operator op ==
-      is?(op, PAREN) => oppren
-      is?(op, BOX) => opbox
-      error "Unknown operator"
-
-    mainKernel x ==
-      empty?(l := kernels x) => "failed"
-      n := height(k := first l)
-      for kk in rest l repeat
-        if height(kk) > n then
-          n := height kk
-          k := kk
-      k
-
--- takes all the kernels except for the dummy variables, which are second
--- arguments of rootOf's, integrals, sums and products which appear only in
--- their first arguments
-    allKernels f ==
-      s := brace(l := kernels f)
-      for k in l repeat
-          t :=
-              (u := property(operator k, DUMMYVAR)) case None =>
-                  arg := argument k
-                  s0  := remove_!(retract(second arg)@K, allKernels first arg)
-                  arg := rest rest arg
-                  n   := (u::None) pretend N
-                  if n > 1 then arg := rest arg
-                  union(s0, allk arg)
-              allk argument k
-          s := union(s, t)
-      s
-
-    kernel(op:OP, args:List %) ==
-      not belong? op => error "Unknown operator"
-      okkernel(op, args)
-
-    okkernel(op, l) ==
-      kernel(op, l, 1 + reduce("max", [height f for f in l], 0))$K :: %
-
-    elt(op:OP, args:List %) ==
-      not belong? op => error "Unknown operator"
-      ((u := arity op) case N) and (#args ^= u::N)
-                                    => error "Wrong number of arguments"
-      (v := evaluate(op,args)$BasicOperatorFunctions1(%)) case % => v::%
-      okkernel(op, args)
-
-    retract f ==
-      (k := mainKernel f) case "failed" => error "not a kernel"
-      k::K::% ^= f => error "not a kernel"
-      k::K
-
-    retractIfCan f ==
-      (k := mainKernel f) case "failed" => "failed"
-      k::K::% ^= f => "failed"
-      k
-
-    is?(f:%, s:SY) ==
-      (k := retractIfCan f) case "failed" => false
-      is?(k::K, s)
-
-    is?(f:%, op:OP) ==
-      (k := retractIfCan f) case "failed" => false
-      is?(k::K, op)
-
-    unwrap(l, x) ==
-      for k in reverse_! l repeat
-        x := eval(x, k, first argument k)
-      x
-
-    distribute(x, y) ==
-      ky := retract y
-      unwrap([k for k in listk x |
-              is?(k, "%paren"::SY) and member?(ky, listk(k::%))], x)
-
-    -- in case of conflicting substitutions e.g. [x = a, x = b],
-    -- the first one prevails.
-    -- this is not part of the semantics of the function, but just
-    -- a feature of this implementation.
-    eval(f:%, leq:List Equation %) ==
-      rec := mkKerLists leq
-      eval(f, rec.lstk, rec.lstv)
-
-    subst(f:%, leq:List Equation %) ==
-      rec := mkKerLists leq
-      subst(f, rec.lstk, rec.lstv)
-
-    mkKerLists leq ==
-      lk := empty()$List(K)
-      lv := empty()$List(%)
-      for eq in leq repeat
-        (k := retractIfCan(lhs eq)@Union(K, "failed")) case "failed" =>
-                          error "left hand side must be a single kernel"
-        if not member?(k::K, lk) then
-          lk := concat(k::K, lk)
-          lv := concat(rhs eq, lv)
-      [lk, lv]
-
-    if % has RetractableTo Integer then
-       intpred?: (%, Integer -> Boolean) -> Boolean
-
-       even? x == intpred?(x, even?)
-       odd? x  == intpred?(x, odd?)
-
-       intpred?(x, pred?) ==
-           (u := retractIfCan(x)@Union(Integer, "failed")) case Integer
-                  and pred?(u::Integer)
-
-@
-\section{ES.lsp BOOTSTRAP}
-{\bf ES} 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 ES}
-category which we can write into the {\bf MID} directory. We compile 
-the lisp code and copy the {\bf ES.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.
-
-<<ES.lsp BOOTSTRAP>>=
-
-(|/VERSIONCHECK| 2) 
-
-(SETQ |ExpressionSpace;AL| (QUOTE NIL)) 
-
-(DEFUN |ExpressionSpace| NIL (LET (#:G82344) (COND (|ExpressionSpace;AL|) (T (SETQ |ExpressionSpace;AL| (|ExpressionSpace;|)))))) 
-
-(DEFUN |ExpressionSpace;| NIL (PROG (#1=#:G82342) (RETURN (PROG1 (LETT #1# (|sublisV| (PAIR (QUOTE (#2=#:G82340 #3=#:G82341)) (LIST (QUOTE (|Kernel| |$|)) (QUOTE (|Kernel| |$|)))) (|Join| (|OrderedSet|) (|RetractableTo| (QUOTE #2#)) (|InnerEvalable| (QUOTE #3#) (QUOTE |$|)) (|Evalable| (QUOTE |$|)) (|mkCategory| (QUOTE |domain|) (QUOTE (((|elt| (|$| (|BasicOperator|) |$|)) T) ((|elt| (|$| (|BasicOperator|) |$| |$|)) T) ((|elt| (|$| (|BasicOperator|) |$| |$| |$|)) T) ((|elt| (|$| (|BasicOperator|) |$| |$| |$| |$|)) T) ((|elt| (|$| (|BasicOperator|) (|List| |$|))) T) ((|subst| (|$| |$| (|Equation| |$|))) T) ((|subst| (|$| |$| (|List| (|Equation| |$|)))) T) ((|subst| (|$| |$| (|List| (|Kernel| |$|)) (|List| |$|))) T) ((|box| (|$| |$|)) T) ((|box| (|$| (|List| |$|))) T) ((|paren| (|$| |$|)) T) ((|paren| (|$| (|List| |$|))) T) ((|distribute| (|$| |$|)) T) ((|distribute| (|$| |$| |$|)) T) ((|height| ((|NonNegativeInteger|) |$|)) T) ((|mainKernel| ((|Union| (|Kernel| |$|) "failed") |$|)) T) ((|kernels| ((|List| (|Kernel| |$|)) |$|)) T) ((|tower| ((|List| (|Kernel| |$|)) |$|)) T) ((|operators| ((|List| (|BasicOperator|)) |$|)) T) ((|operator| ((|BasicOperator|) (|BasicOperator|))) T) ((|belong?| ((|Boolean|) (|BasicOperator|))) T) ((|is?| ((|Boolean|) |$| (|BasicOperator|))) T) ((|is?| ((|Boolean|) |$| (|Symbol|))) T) ((|kernel| (|$| (|BasicOperator|) |$|)) T) ((|kernel| (|$| (|BasicOperator|) (|List| |$|))) T) ((|map| (|$| (|Mapping| |$| |$|) (|Kernel| |$|))) T) ((|freeOf?| ((|Boolean|) |$| |$|)) T) ((|freeOf?| ((|Boolean|) |$| (|Symbol|))) T) ((|eval| (|$| |$| (|List| (|Symbol|)) (|List| (|Mapping| |$| |$|)))) T) ((|eval| (|$| |$| (|List| (|Symbol|)) (|List| (|Mapping| |$| (|List| |$|))))) T) ((|eval| (|$| |$| (|Symbol|) (|Mapping| |$| (|List| |$|)))) T) ((|eval| (|$| |$| (|Symbol|) (|Mapping| |$| |$|))) T) ((|eval| (|$| |$| (|List| (|BasicOperator|)) (|List| (|Mapping| |$| |$|)))) T) ((|eval| (|$| |$| (|List| (|BasicOperator|)) (|List| (|Mapping| |$| (|List| |$|))))) T) ((|eval| (|$| |$| (|BasicOperator|) (|Mapping| |$| (|List| |$|)))) T) ((|eval| (|$| |$| (|BasicOperator|) (|Mapping| |$| |$|))) T) ((|minPoly| ((|SparseUnivariatePolynomial| |$|) (|Kernel| |$|))) (|has| |$| (|Ring|))) ((|definingPolynomial| (|$| |$|)) (|has| |$| (|Ring|))) ((|even?| ((|Boolean|) |$|)) (|has| |$| (|RetractableTo| (|Integer|)))) ((|odd?| ((|Boolean|) |$|)) (|has| |$| (|RetractableTo| (|Integer|)))))) NIL (QUOTE ((|Boolean|) (|SparseUnivariatePolynomial| |$|) (|Kernel| |$|) (|BasicOperator|) (|List| (|BasicOperator|)) (|List| (|Mapping| |$| (|List| |$|))) (|List| (|Mapping| |$| |$|)) (|Symbol|) (|List| (|Symbol|)) (|List| |$|) (|List| (|Kernel| |$|)) (|NonNegativeInteger|) (|List| (|Equation| |$|)) (|Equation| |$|))) NIL))) |ExpressionSpace|) (SETELT #1# 0 (QUOTE (|ExpressionSpace|))))))) 
-
-(MAKEPROP (QUOTE |ExpressionSpace|) (QUOTE NILADIC) T) 
-@
-\section{ES-.lsp BOOTSTRAP}
-{\bf ES-} depends on {\bf ES}. We need to break this cycle to build
-the algebra. So we keep a cached copy of the translated {\bf ES-}
-category which we can write into the {\bf MID} directory. We compile 
-the lisp code and copy the {\bf ES-.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.
-
-<<ES-.lsp BOOTSTRAP>>=
-
-(|/VERSIONCHECK| 2) 
-
-(DEFUN |ES-;box;2S;1| (|x| |$|) (SPADCALL (LIST |x|) (QREFELT |$| 16))) 
-
-(DEFUN |ES-;paren;2S;2| (|x| |$|) (SPADCALL (LIST |x|) (QREFELT |$| 18))) 
-
-(DEFUN |ES-;belong?;BoB;3| (|op| |$|) (COND ((SPADCALL |op| (QREFELT |$| 13) (QREFELT |$| 21)) (QUOTE T)) ((QUOTE T) (SPADCALL |op| (QREFELT |$| 14) (QREFELT |$| 21))))) 
-
-(DEFUN |ES-;listk| (|f| |$|) (SPADCALL (|ES-;allKernels| |f| |$|) (QREFELT |$| 25))) 
-
-(DEFUN |ES-;tower;SL;5| (|f| |$|) (SPADCALL (|ES-;listk| |f| |$|) (QREFELT |$| 26))) 
-
-(DEFUN |ES-;allk| (|l| |$|) (PROG (#1=#:G82361 |f| #2=#:G82362) (RETURN (SEQ (SPADCALL (ELT |$| 30) (PROGN (LETT #1# NIL |ES-;allk|) (SEQ (LETT |f| NIL |ES-;allk|) (LETT #2# |l| |ES-;allk|) G190 (COND ((OR (ATOM #2#) (PROGN (LETT |f| (CAR #2#) |ES-;allk|) NIL)) (GO G191))) (SEQ (EXIT (LETT #1# (CONS (|ES-;allKernels| |f| |$|) #1#) |ES-;allk|))) (LETT #2# (CDR #2#) |ES-;allk|) (GO G190) G191 (EXIT (NREVERSE0 #1#)))) (SPADCALL NIL (QREFELT |$| 29)) (QREFELT |$| 33)))))) 
-
-(DEFUN |ES-;operators;SL;7| (|f| |$|) (PROG (#1=#:G82365 |k| #2=#:G82366) (RETURN (SEQ (PROGN (LETT #1# NIL |ES-;operators;SL;7|) (SEQ (LETT |k| NIL |ES-;operators;SL;7|) (LETT #2# (|ES-;listk| |f| |$|) |ES-;operators;SL;7|) G190 (COND ((OR (ATOM #2#) (PROGN (LETT |k| (CAR #2#) |ES-;operators;SL;7|) NIL)) (GO G191))) (SEQ (EXIT (LETT #1# (CONS (SPADCALL |k| (QREFELT |$| 35)) #1#) |ES-;operators;SL;7|))) (LETT #2# (CDR #2#) |ES-;operators;SL;7|) (GO G190) G191 (EXIT (NREVERSE0 #1#)))))))) 
-
-(DEFUN |ES-;height;SNni;8| (|f| |$|) (PROG (#1=#:G82371 |k| #2=#:G82372) (RETURN (SEQ (SPADCALL (ELT |$| 41) (PROGN (LETT #1# NIL |ES-;height;SNni;8|) (SEQ (LETT |k| NIL |ES-;height;SNni;8|) (LETT #2# (SPADCALL |f| (QREFELT |$| 38)) |ES-;height;SNni;8|) G190 (COND ((OR (ATOM #2#) (PROGN (LETT |k| (CAR #2#) |ES-;height;SNni;8|) NIL)) (GO G191))) (SEQ (EXIT (LETT #1# (CONS (SPADCALL |k| (QREFELT |$| 40)) #1#) |ES-;height;SNni;8|))) (LETT #2# (CDR #2#) |ES-;height;SNni;8|) (GO G190) G191 (EXIT (NREVERSE0 #1#)))) 0 (QREFELT |$| 44)))))) 
-
-(DEFUN |ES-;freeOf?;SSB;9| (|x| |s| |$|) (PROG (#1=#:G82377 |k| #2=#:G82378) (RETURN (SEQ (COND ((SPADCALL |s| (PROGN (LETT #1# NIL |ES-;freeOf?;SSB;9|) (SEQ (LETT |k| NIL |ES-;freeOf?;SSB;9|) (LETT #2# (|ES-;listk| |x| |$|) |ES-;freeOf?;SSB;9|) G190 (COND ((OR (ATOM #2#) (PROGN (LETT |k| (CAR #2#) |ES-;freeOf?;SSB;9|) NIL)) (GO G191))) (SEQ (EXIT (LETT #1# (CONS (SPADCALL |k| (QREFELT |$| 46)) #1#) |ES-;freeOf?;SSB;9|))) (LETT #2# (CDR #2#) |ES-;freeOf?;SSB;9|) (GO G190) G191 (EXIT (NREVERSE0 #1#)))) (QREFELT |$| 48)) (QUOTE NIL)) ((QUOTE T) (QUOTE T))))))) 
-
-(DEFUN |ES-;distribute;2S;10| (|x| |$|) (PROG (#1=#:G82381 |k| #2=#:G82382) (RETURN (SEQ (|ES-;unwrap| (PROGN (LETT #1# NIL |ES-;distribute;2S;10|) (SEQ (LETT |k| NIL |ES-;distribute;2S;10|) (LETT #2# (|ES-;listk| |x| |$|) |ES-;distribute;2S;10|) G190 (COND ((OR (ATOM #2#) (PROGN (LETT |k| (CAR #2#) |ES-;distribute;2S;10|) NIL)) (GO G191))) (SEQ (EXIT (COND ((SPADCALL |k| (QREFELT |$| 13) (QREFELT |$| 50)) (LETT #1# (CONS |k| #1#) |ES-;distribute;2S;10|))))) (LETT #2# (CDR #2#) |ES-;distribute;2S;10|) (GO G190) G191 (EXIT (NREVERSE0 #1#)))) |x| |$|))))) 
-
-(DEFUN |ES-;box;LS;11| (|l| |$|) (SPADCALL (QREFELT |$| 14) |l| (QREFELT |$| 52))) 
-
-(DEFUN |ES-;paren;LS;12| (|l| |$|) (SPADCALL (QREFELT |$| 13) |l| (QREFELT |$| 52))) 
-
-(DEFUN |ES-;freeOf?;2SB;13| (|x| |k| |$|) (COND ((SPADCALL (SPADCALL |k| (QREFELT |$| 56)) (|ES-;listk| |x| |$|) (QREFELT |$| 57)) (QUOTE NIL)) ((QUOTE T) (QUOTE T)))) 
-
-(DEFUN |ES-;kernel;Bo2S;14| (|op| |arg| |$|) (SPADCALL |op| (LIST |arg|) (QREFELT |$| 59))) 
-
-(DEFUN |ES-;elt;Bo2S;15| (|op| |x| |$|) (SPADCALL |op| (LIST |x|) (QREFELT |$| 52))) 
-
-(DEFUN |ES-;elt;Bo3S;16| (|op| |x| |y| |$|) (SPADCALL |op| (LIST |x| |y|) (QREFELT |$| 52))) 
-
-(DEFUN |ES-;elt;Bo4S;17| (|op| |x| |y| |z| |$|) (SPADCALL |op| (LIST |x| |y| |z|) (QREFELT |$| 52))) 
-
-(DEFUN |ES-;elt;Bo5S;18| (|op| |x| |y| |z| |t| |$|) (SPADCALL |op| (LIST |x| |y| |z| |t|) (QREFELT |$| 52))) 
-
-(DEFUN |ES-;eval;SSMS;19| (|x| |s| |f| |$|) (SPADCALL |x| (LIST |s|) (LIST |f|) (QREFELT |$| 67))) 
-
-(DEFUN |ES-;eval;SBoMS;20| (|x| |s| |f| |$|) (SPADCALL |x| (LIST (SPADCALL |s| (QREFELT |$| 69))) (LIST |f|) (QREFELT |$| 67))) 
-
-(DEFUN |ES-;eval;SSMS;21| (|x| |s| |f| |$|) (SPADCALL |x| (LIST |s|) (LIST (CONS (FUNCTION |ES-;eval;SSMS;21!0|) (VECTOR |f| |$|))) (QREFELT |$| 67))) 
-
-(DEFUN |ES-;eval;SSMS;21!0| (|#1| |$$|) (SPADCALL (SPADCALL |#1| (QREFELT (QREFELT |$$| 1) 72)) (QREFELT |$$| 0))) 
-
-(DEFUN |ES-;eval;SBoMS;22| (|x| |s| |f| |$|) (SPADCALL |x| (LIST |s|) (LIST (CONS (FUNCTION |ES-;eval;SBoMS;22!0|) (VECTOR |f| |$|))) (QREFELT |$| 75))) 
-
-(DEFUN |ES-;eval;SBoMS;22!0| (|#1| |$$|) (SPADCALL (SPADCALL |#1| (QREFELT (QREFELT |$$| 1) 72)) (QREFELT |$$| 0))) 
-
-(DEFUN |ES-;subst;SES;23| (|x| |e| |$|) (SPADCALL |x| (LIST |e|) (QREFELT |$| 78))) 
-
-(DEFUN |ES-;eval;SLLS;24| (|x| |ls| |lf| |$|) (PROG (#1=#:G82403 |f| #2=#:G82404) (RETURN (SEQ (SPADCALL |x| |ls| (PROGN (LETT #1# NIL |ES-;eval;SLLS;24|) (SEQ (LETT |f| NIL |ES-;eval;SLLS;24|) (LETT #2# |lf| |ES-;eval;SLLS;24|) G190 (COND ((OR (ATOM #2#) (PROGN (LETT |f| (CAR #2#) |ES-;eval;SLLS;24|) NIL)) (GO G191))) (SEQ (EXIT (LETT #1# (CONS (CONS (FUNCTION |ES-;eval;SLLS;24!0|) (VECTOR |f| |$|)) #1#) |ES-;eval;SLLS;24|))) (LETT #2# (CDR #2#) |ES-;eval;SLLS;24|) (GO G190) G191 (EXIT (NREVERSE0 #1#)))) (QREFELT |$| 75)))))) 
-
-(DEFUN |ES-;eval;SLLS;24!0| (|#1| |$$|) (SPADCALL (SPADCALL |#1| (QREFELT (QREFELT |$$| 1) 72)) (QREFELT |$$| 0))) 
-
-(DEFUN |ES-;eval;SLLS;25| (|x| |ls| |lf| |$|) (PROG (#1=#:G82407 |f| #2=#:G82408) (RETURN (SEQ (SPADCALL |x| |ls| (PROGN (LETT #1# NIL |ES-;eval;SLLS;25|) (SEQ (LETT |f| NIL |ES-;eval;SLLS;25|) (LETT #2# |lf| |ES-;eval;SLLS;25|) G190 (COND ((OR (ATOM #2#) (PROGN (LETT |f| (CAR #2#) |ES-;eval;SLLS;25|) NIL)) (GO G191))) (SEQ (EXIT (LETT #1# (CONS (CONS (FUNCTION |ES-;eval;SLLS;25!0|) (VECTOR |f| |$|)) #1#) |ES-;eval;SLLS;25|))) (LETT #2# (CDR #2#) |ES-;eval;SLLS;25|) (GO G190) G191 (EXIT (NREVERSE0 #1#)))) (QREFELT |$| 67)))))) 
-
-(DEFUN |ES-;eval;SLLS;25!0| (|#1| |$$|) (SPADCALL (SPADCALL |#1| (QREFELT (QREFELT |$$| 1) 72)) (QREFELT |$$| 0))) 
-
-(DEFUN |ES-;eval;SLLS;26| (|x| |ls| |lf| |$|) (PROG (#1=#:G82412 |s| #2=#:G82413) (RETURN (SEQ (SPADCALL |x| (PROGN (LETT #1# NIL |ES-;eval;SLLS;26|) (SEQ (LETT |s| NIL |ES-;eval;SLLS;26|) (LETT #2# |ls| |ES-;eval;SLLS;26|) G190 (COND ((OR (ATOM #2#) (PROGN (LETT |s| (CAR #2#) |ES-;eval;SLLS;26|) NIL)) (GO G191))) (SEQ (EXIT (LETT #1# (CONS (SPADCALL |s| (QREFELT |$| 69)) #1#) |ES-;eval;SLLS;26|))) (LETT #2# (CDR #2#) |ES-;eval;SLLS;26|) (GO G190) G191 (EXIT (NREVERSE0 #1#)))) |lf| (QREFELT |$| 67)))))) 
-
-(DEFUN |ES-;map;MKS;27| (|fn| |k| |$|) (PROG (#1=#:G82428 |x| #2=#:G82429 |l|) (RETURN (SEQ (COND ((SPADCALL (LETT |l| (PROGN (LETT #1# NIL |ES-;map;MKS;27|) (SEQ (LETT |x| NIL |ES-;map;MKS;27|) (LETT #2# (SPADCALL |k| (QREFELT |$| 85)) |ES-;map;MKS;27|) G190 (COND ((OR (ATOM #2#) (PROGN (LETT |x| (CAR #2#) |ES-;map;MKS;27|) NIL)) (GO G191))) (SEQ (EXIT (LETT #1# (CONS (SPADCALL |x| |fn|) #1#) |ES-;map;MKS;27|))) (LETT #2# (CDR #2#) |ES-;map;MKS;27|) (GO G190) G191 (EXIT (NREVERSE0 #1#)))) |ES-;map;MKS;27|) (SPADCALL |k| (QREFELT |$| 85)) (QREFELT |$| 86)) (SPADCALL |k| (QREFELT |$| 87))) ((QUOTE T) (SPADCALL (SPADCALL |k| (QREFELT |$| 35)) |l| (QREFELT |$| 52)))))))) 
-
-(DEFUN |ES-;operator;2Bo;28| (|op| |$|) (COND ((SPADCALL |op| (SPADCALL "%paren" (QREFELT |$| 9)) (QREFELT |$| 89)) (QREFELT |$| 13)) ((SPADCALL |op| (SPADCALL "%box" (QREFELT |$| 9)) (QREFELT |$| 89)) (QREFELT |$| 14)) ((QUOTE T) (|error| "Unknown operator")))) 
-
-(DEFUN |ES-;mainKernel;SU;29| (|x| |$|) (PROG (|l| |kk| #1=#:G82445 |n| |k|) (RETURN (SEQ (COND ((NULL (LETT |l| (SPADCALL |x| (QREFELT |$| 38)) |ES-;mainKernel;SU;29|)) (CONS 1 "failed")) ((QUOTE T) (SEQ (LETT |n| (SPADCALL (LETT |k| (|SPADfirst| |l|) |ES-;mainKernel;SU;29|) (QREFELT |$| 40)) |ES-;mainKernel;SU;29|) (SEQ (LETT |kk| NIL |ES-;mainKernel;SU;29|) (LETT #1# (CDR |l|) |ES-;mainKernel;SU;29|) G190 (COND ((OR (ATOM #1#) (PROGN (LETT |kk| (CAR #1#) |ES-;mainKernel;SU;29|) NIL)) (GO G191))) (SEQ (EXIT (COND ((|<| |n| (SPADCALL |kk| (QREFELT |$| 40))) (SEQ (LETT |n| (SPADCALL |kk| (QREFELT |$| 40)) |ES-;mainKernel;SU;29|) (EXIT (LETT |k| |kk| |ES-;mainKernel;SU;29|))))))) (LETT #1# (CDR #1#) |ES-;mainKernel;SU;29|) (GO G190) G191 (EXIT NIL)) (EXIT (CONS 0 |k|))))))))) 
-
-(DEFUN |ES-;allKernels| (|f| |$|) (PROG (|l| |k| #1=#:G82458 |u| |s0| |n| |arg| |t| |s|) (RETURN (SEQ (LETT |s| (SPADCALL (LETT |l| (SPADCALL |f| (QREFELT |$| 38)) |ES-;allKernels|) (QREFELT |$| 29)) |ES-;allKernels|) (SEQ (LETT |k| NIL |ES-;allKernels|) (LETT #1# |l| |ES-;allKernels|) G190 (COND ((OR (ATOM #1#) (PROGN (LETT |k| (CAR #1#) |ES-;allKernels|) NIL)) (GO G191))) (SEQ (LETT |t| (SEQ (LETT |u| (SPADCALL (SPADCALL |k| (QREFELT |$| 35)) "%dummyVar" (QREFELT |$| 94)) |ES-;allKernels|) (EXIT (COND ((QEQCAR |u| 0) (SEQ (LETT |arg| (SPADCALL |k| (QREFELT |$| 85)) |ES-;allKernels|) (LETT |s0| (SPADCALL (SPADCALL (SPADCALL |arg| (QREFELT |$| 95)) (QREFELT |$| 56)) (|ES-;allKernels| (|SPADfirst| |arg|) |$|) (QREFELT |$| 96)) |ES-;allKernels|) (LETT |arg| (CDR (CDR |arg|)) |ES-;allKernels|) (LETT |n| (QCDR |u|) |ES-;allKernels|) (COND ((|<| 1 |n|) (LETT |arg| (CDR |arg|) |ES-;allKernels|))) (EXIT (SPADCALL |s0| (|ES-;allk| |arg| |$|) (QREFELT |$| 30))))) ((QUOTE T) (|ES-;allk| (SPADCALL |k| (QREFELT |$| 85)) |$|))))) |ES-;allKernels|) (EXIT (LETT |s| (SPADCALL |s| |t| (QREFELT |$| 30)) |ES-;allKernels|))) (LETT #1# (CDR #1#) |ES-;allKernels|) (GO G190) G191 (EXIT NIL)) (EXIT |s|))))) 
-
-(DEFUN |ES-;kernel;BoLS;31| (|op| |args| |$|) (COND ((NULL (SPADCALL |op| (QREFELT |$| 97))) (|error| "Unknown operator")) ((QUOTE T) (|ES-;okkernel| |op| |args| |$|)))) 
-
-(DEFUN |ES-;okkernel| (|op| |l| |$|) (PROG (#1=#:G82465 |f| #2=#:G82466) (RETURN (SEQ (SPADCALL (SPADCALL |op| |l| (|+| 1 (SPADCALL (ELT |$| 41) (PROGN (LETT #1# NIL |ES-;okkernel|) (SEQ (LETT |f| NIL |ES-;okkernel|) (LETT #2# |l| |ES-;okkernel|) G190 (COND ((OR (ATOM #2#) (PROGN (LETT |f| (CAR #2#) |ES-;okkernel|) NIL)) (GO G191))) (SEQ (EXIT (LETT #1# (CONS (SPADCALL |f| (QREFELT |$| 99)) #1#) |ES-;okkernel|))) (LETT #2# (CDR #2#) |ES-;okkernel|) (GO G190) G191 (EXIT (NREVERSE0 #1#)))) 0 (QREFELT |$| 44))) (QREFELT |$| 100)) (QREFELT |$| 87)))))) 
-
-(DEFUN |ES-;elt;BoLS;33| (|op| |args| |$|) (PROG (|u| #1=#:G82482 |v|) (RETURN (SEQ (EXIT (COND ((NULL (SPADCALL |op| (QREFELT |$| 97))) (|error| "Unknown operator")) ((QUOTE T) (SEQ (SEQ (LETT |u| (SPADCALL |op| (QREFELT |$| 102)) |ES-;elt;BoLS;33|) (EXIT (COND ((QEQCAR |u| 0) (COND ((NULL (EQL (LENGTH |args|) (QCDR |u|))) (PROGN (LETT #1# (|error| "Wrong number of arguments") |ES-;elt;BoLS;33|) (GO #1#)))))))) (LETT |v| (SPADCALL |op| |args| (QREFELT |$| 105)) |ES-;elt;BoLS;33|) (EXIT (COND ((QEQCAR |v| 0) (QCDR |v|)) ((QUOTE T) (|ES-;okkernel| |op| |args| |$|)))))))) #1# (EXIT #1#))))) 
-
-(DEFUN |ES-;retract;SK;34| (|f| |$|) (PROG (|k|) (RETURN (SEQ (LETT |k| (SPADCALL |f| (QREFELT |$| 107)) |ES-;retract;SK;34|) (EXIT (COND ((OR (QEQCAR |k| 1) (NULL (SPADCALL (SPADCALL (QCDR |k|) (QREFELT |$| 87)) |f| (QREFELT |$| 108)))) (|error| "not a kernel")) ((QUOTE T) (QCDR |k|)))))))) 
-
-(DEFUN |ES-;retractIfCan;SU;35| (|f| |$|) (PROG (|k|) (RETURN (SEQ (LETT |k| (SPADCALL |f| (QREFELT |$| 107)) |ES-;retractIfCan;SU;35|) (EXIT (COND ((OR (QEQCAR |k| 1) (NULL (SPADCALL (SPADCALL (QCDR |k|) (QREFELT |$| 87)) |f| (QREFELT |$| 108)))) (CONS 1 "failed")) ((QUOTE T) |k|))))))) 
-
-(DEFUN |ES-;is?;SSB;36| (|f| |s| |$|) (PROG (|k|) (RETURN (SEQ (LETT |k| (SPADCALL |f| (QREFELT |$| 111)) |ES-;is?;SSB;36|) (EXIT (COND ((QEQCAR |k| 1) (QUOTE NIL)) ((QUOTE T) (SPADCALL (QCDR |k|) |s| (QREFELT |$| 112))))))))) 
-
-(DEFUN |ES-;is?;SBoB;37| (|f| |op| |$|) (PROG (|k|) (RETURN (SEQ (LETT |k| (SPADCALL |f| (QREFELT |$| 111)) |ES-;is?;SBoB;37|) (EXIT (COND ((QEQCAR |k| 1) (QUOTE NIL)) ((QUOTE T) (SPADCALL (QCDR |k|) |op| (QREFELT |$| 50))))))))) 
-
-(DEFUN |ES-;unwrap| (|l| |x| |$|) (PROG (|k| #1=#:G82507) (RETURN (SEQ (SEQ (LETT |k| NIL |ES-;unwrap|) (LETT #1# (NREVERSE |l|) |ES-;unwrap|) G190 (COND ((OR (ATOM #1#) (PROGN (LETT |k| (CAR #1#) |ES-;unwrap|) NIL)) (GO G191))) (SEQ (EXIT (LETT |x| (SPADCALL |x| |k| (|SPADfirst| (SPADCALL |k| (QREFELT |$| 85))) (QREFELT |$| 115)) |ES-;unwrap|))) (LETT #1# (CDR #1#) |ES-;unwrap|) (GO G190) G191 (EXIT NIL)) (EXIT |x|))))) 
-
-(DEFUN |ES-;distribute;3S;39| (|x| |y| |$|) (PROG (|ky| #1=#:G82512 |k| #2=#:G82513) (RETURN (SEQ (LETT |ky| (SPADCALL |y| (QREFELT |$| 56)) |ES-;distribute;3S;39|) (EXIT (|ES-;unwrap| (PROGN (LETT #1# NIL |ES-;distribute;3S;39|) (SEQ (LETT |k| NIL |ES-;distribute;3S;39|) (LETT #2# (|ES-;listk| |x| |$|) |ES-;distribute;3S;39|) G190 (COND ((OR (ATOM #2#) (PROGN (LETT |k| (CAR #2#) |ES-;distribute;3S;39|) NIL)) (GO G191))) (SEQ (EXIT (COND ((COND ((SPADCALL |k| (SPADCALL "%paren" (QREFELT |$| 9)) (QREFELT |$| 112)) (SPADCALL |ky| (|ES-;listk| (SPADCALL |k| (QREFELT |$| 87)) |$|) (QREFELT |$| 57))) ((QUOTE T) (QUOTE NIL))) (LETT #1# (CONS |k| #1#) |ES-;distribute;3S;39|))))) (LETT #2# (CDR #2#) |ES-;distribute;3S;39|) (GO G190) G191 (EXIT (NREVERSE0 #1#)))) |x| |$|)))))) 
-
-(DEFUN |ES-;eval;SLS;40| (|f| |leq| |$|) (PROG (|rec|) (RETURN (SEQ (LETT |rec| (|ES-;mkKerLists| |leq| |$|) |ES-;eval;SLS;40|) (EXIT (SPADCALL |f| (QCAR |rec|) (QCDR |rec|) (QREFELT |$| 117))))))) 
-
-(DEFUN |ES-;subst;SLS;41| (|f| |leq| |$|) (PROG (|rec|) (RETURN (SEQ (LETT |rec| (|ES-;mkKerLists| |leq| |$|) |ES-;subst;SLS;41|) (EXIT (SPADCALL |f| (QCAR |rec|) (QCDR |rec|) (QREFELT |$| 119))))))) 
-
-(DEFUN |ES-;mkKerLists| (|leq| |$|) (PROG (|eq| #1=#:G82530 |k| |lk| |lv|) (RETURN (SEQ (LETT |lk| NIL |ES-;mkKerLists|) (LETT |lv| NIL |ES-;mkKerLists|) (SEQ (LETT |eq| NIL |ES-;mkKerLists|) (LETT #1# |leq| |ES-;mkKerLists|) G190 (COND ((OR (ATOM #1#) (PROGN (LETT |eq| (CAR #1#) |ES-;mkKerLists|) NIL)) (GO G191))) (SEQ (LETT |k| (SPADCALL (SPADCALL |eq| (QREFELT |$| 122)) (QREFELT |$| 111)) |ES-;mkKerLists|) (EXIT (COND ((QEQCAR |k| 1) (|error| "left hand side must be a single kernel")) ((NULL (SPADCALL (QCDR |k|) |lk| (QREFELT |$| 57))) (SEQ (LETT |lk| (CONS (QCDR |k|) |lk|) |ES-;mkKerLists|) (EXIT (LETT |lv| (CONS (SPADCALL |eq| (QREFELT |$| 123)) |lv|) |ES-;mkKerLists|))))))) (LETT #1# (CDR #1#) |ES-;mkKerLists|) (GO G190) G191 (EXIT NIL)) (EXIT (CONS |lk| |lv|)))))) 
-
-(DEFUN |ES-;even?;SB;43| (|x| |$|) (|ES-;intpred?| |x| (ELT |$| 125) |$|)) 
-
-(DEFUN |ES-;odd?;SB;44| (|x| |$|) (|ES-;intpred?| |x| (ELT |$| 127) |$|)) 
-
-(DEFUN |ES-;intpred?| (|x| |pred?| |$|) (PROG (|u|) (RETURN (SEQ (LETT |u| (SPADCALL |x| (QREFELT |$| 130)) |ES-;intpred?|) (EXIT (COND ((QEQCAR |u| 0) (SPADCALL (QCDR |u|) |pred?|)) ((QUOTE T) (QUOTE NIL)))))))) 
-
-(DEFUN |ExpressionSpace&| (|#1|) (PROG (|DV$1| |dv$| |$| |pv$|) (RETURN (PROGN (LETT |DV$1| (|devaluate| |#1|) . #1=(|ExpressionSpace&|)) (LETT |dv$| (LIST (QUOTE |ExpressionSpace&|) |DV$1|) . #1#) (LETT |$| (GETREFV 131) . #1#) (QSETREFV |$| 0 |dv$|) (QSETREFV |$| 3 (LETT |pv$| (|buildPredVector| 0 0 (LIST (|HasCategory| |#1| (QUOTE (|RetractableTo| (|Integer|)))) (|HasCategory| |#1| (QUOTE (|Ring|))))) . #1#)) (|stuffDomainSlots| |$|) (QSETREFV |$| 6 |#1|) (QSETREFV |$| 13 (SPADCALL (SPADCALL "%paren" (QREFELT |$| 9)) (QREFELT |$| 12))) (QSETREFV |$| 14 (SPADCALL (SPADCALL "%box" (QREFELT |$| 9)) (QREFELT |$| 12))) (COND ((|testBitVector| |pv$| 1) (PROGN (QSETREFV |$| 126 (CONS (|dispatchFunction| |ES-;even?;SB;43|) |$|)) (QSETREFV |$| 128 (CONS (|dispatchFunction| |ES-;odd?;SB;44|) |$|))))) |$|)))) 
-
-(MAKEPROP (QUOTE |ExpressionSpace&|) (QUOTE |infovec|) (LIST (QUOTE #(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|String|) (|Symbol|) (0 . |coerce|) (|BasicOperator|) (|CommonOperators|) (5 . |operator|) (QUOTE |oppren|) (QUOTE |opbox|) (|List| |$|) (10 . |box|) |ES-;box;2S;1| (15 . |paren|) |ES-;paren;2S;2| (|Boolean|) (20 . |=|) |ES-;belong?;BoB;3| (|List| 34) (|Set| 34) (26 . |parts|) (31 . |sort!|) (|List| 55) |ES-;tower;SL;5| (36 . |brace|) (41 . |union|) (|Mapping| 24 24 24) (|List| 24) (47 . |reduce|) (|Kernel| 6) (54 . |operator|) (|List| 10) |ES-;operators;SL;7| (59 . |kernels|) (|NonNegativeInteger|) (64 . |height|) (69 . |max|) (|Mapping| 39 39 39) (|List| 39) (75 . |reduce|) |ES-;height;SNni;8| (82 . |name|) (|List| 8) (87 . |member?|) |ES-;freeOf?;SSB;9| (93 . |is?|) |ES-;distribute;2S;10| (99 . |elt|) |ES-;box;LS;11| |ES-;paren;LS;12| (|Kernel| |$|) (105 . |retract|) (110 . |member?|) |ES-;freeOf?;2SB;13| (116 . |kernel|) |ES-;kernel;Bo2S;14| |ES-;elt;Bo2S;15| |ES-;elt;Bo3S;16| |ES-;elt;Bo4S;17| |ES-;elt;Bo5S;18| (|Mapping| |$| 15) (|List| 65) (122 . |eval|) |ES-;eval;SSMS;19| (129 . |name|) |ES-;eval;SBoMS;20| (|List| 6) (134 . |first|) (|Mapping| |$| |$|) |ES-;eval;SSMS;21| (139 . |eval|) |ES-;eval;SBoMS;22| (|List| 79) (146 . |subst|) (|Equation| |$|) |ES-;subst;SES;23| (|List| 73) |ES-;eval;SLLS;24| |ES-;eval;SLLS;25| |ES-;eval;SLLS;26| (152 . |argument|) (157 . |=|) (163 . |coerce|) |ES-;map;MKS;27| (168 . |is?|) |ES-;operator;2Bo;28| (|Union| 55 (QUOTE "failed")) |ES-;mainKernel;SU;29| (|Union| (|None|) (QUOTE "failed")) (174 . |property|) (180 . |second|) (185 . |remove!|) (191 . |belong?|) |ES-;kernel;BoLS;31| (196 . |height|) (201 . |kernel|) (|Union| 39 (QUOTE "failed")) (208 . |arity|) (|Union| 6 (QUOTE "failed")) (|BasicOperatorFunctions1| 6) (213 . |evaluate|) |ES-;elt;BoLS;33| (219 . |mainKernel|) (224 . |=|) |ES-;retract;SK;34| |ES-;retractIfCan;SU;35| (230 . |retractIfCan|) (235 . |is?|) |ES-;is?;SSB;36| |ES-;is?;SBoB;37| (241 . |eval|) |ES-;distribute;3S;39| (248 . |eval|) |ES-;eval;SLS;40| (255 . |subst|) |ES-;subst;SLS;41| (|Equation| 6) (262 . |lhs|) (267 . |rhs|) (|Integer|) (272 . |even?|) (277 . |even?|) (282 . |odd?|) (287 . |odd?|) (|Union| 124 (QUOTE "failed")) (292 . |retractIfCan|))) (QUOTE #(|tower| 297 |subst| 302 |retractIfCan| 314 |retract| 319 |paren| 324 |operators| 334 |operator| 339 |odd?| 344 |map| 349 |mainKernel| 355 |kernel| 360 |is?| 372 |height| 384 |freeOf?| 389 |even?| 401 |eval| 406 |elt| 461 |distribute| 497 |box| 508 |belong?| 518)) (QUOTE NIL) (CONS (|makeByteWordVec2| 1 (QUOTE NIL)) (CONS (QUOTE #()) (CONS (QUOTE #()) (|makeByteWordVec2| 130 (QUOTE (1 8 0 7 9 1 11 10 8 12 1 6 0 15 16 1 6 0 15 18 2 10 20 0 0 21 1 24 23 0 25 1 23 0 0 26 1 24 0 23 29 2 24 0 0 0 30 3 32 24 31 0 24 33 1 34 10 0 35 1 6 27 0 38 1 34 39 0 40 2 39 0 0 0 41 3 43 39 42 0 39 44 1 34 8 0 46 2 47 20 8 0 48 2 34 20 0 10 50 2 6 0 10 15 52 1 6 55 0 56 2 23 20 34 0 57 2 6 0 10 15 59 3 6 0 0 47 66 67 1 10 8 0 69 1 71 6 0 72 3 6 0 0 36 66 75 2 6 0 0 77 78 1 34 71 0 85 2 71 20 0 0 86 1 6 0 55 87 2 10 20 0 8 89 2 10 93 0 7 94 1 71 6 0 95 2 24 0 34 0 96 1 6 20 10 97 1 6 39 0 99 3 34 0 10 71 39 100 1 10 101 0 102 2 104 103 10 71 105 1 6 91 0 107 2 6 20 0 0 108 1 6 91 0 111 2 34 20 0 8 112 3 6 0 0 55 0 115 3 6 0 0 27 15 117 3 6 0 0 27 15 119 1 121 6 0 122 1 121 6 0 123 1 124 20 0 125 1 0 20 0 126 1 124 20 0 127 1 0 20 0 128 1 6 129 0 130 1 0 27 0 28 2 0 0 0 77 120 2 0 0 0 79 80 1 0 91 0 110 1 0 55 0 109 1 0 0 0 19 1 0 0 15 54 1 0 36 0 37 1 0 10 10 90 1 0 20 0 128 2 0 0 73 55 88 1 0 91 0 92 2 0 0 10 15 98 2 0 0 10 0 60 2 0 20 0 8 113 2 0 20 0 10 114 1 0 39 0 45 2 0 20 0 8 49 2 0 20 0 0 58 1 0 20 0 126 3 0 0 0 10 73 76 3 0 0 0 36 66 84 3 0 0 0 10 65 70 3 0 0 0 36 81 82 3 0 0 0 8 65 68 3 0 0 0 8 73 74 3 0 0 0 47 81 83 2 0 0 0 77 118 2 0 0 10 15 106 5 0 0 10 0 0 0 0 64 3 0 0 10 0 0 62 4 0 0 10 0 0 0 63 2 0 0 10 0 61 2 0 0 0 0 116 1 0 0 0 51 1 0 0 15 53 1 0 0 0 17 1 0 20 10 22)))))) (QUOTE |lookupComplete|))) 
-@
 \section{package ES1 ExpressionSpaceFunctions1}
 <<package ES1 ExpressionSpaceFunctions1>>=
 )abbrev package ES1 ExpressionSpaceFunctions1
@@ -506,654 +56,6 @@ ExpressionSpaceFunctions2(E:ExpressionSpace, F:ExpressionSpace): with
       (operator(operator k)$F) [f x for x in argument k]$List(F)
 
 @
-\section{category FS FunctionSpace}
-<<category FS FunctionSpace>>=
-)abbrev category FS FunctionSpace
-++ Category for formal functions
-++ Author: Manuel Bronstein
-++ Date Created: 22 March 1988
-++ Date Last Updated: 14 February 1994
-++ Description:
-++   A space of formal functions with arguments in an arbitrary
-++   ordered set.
-++ Keywords: operator, kernel, function.
-FunctionSpace(R:OrderedSet): Category == Definition where
-  OP ==> BasicOperator
-  O  ==> OutputForm
-  SY ==> Symbol
-  N  ==> NonNegativeInteger
-  Z  ==> Integer
-  K  ==> Kernel %
-  Q  ==> Fraction R
-  PR ==> Polynomial R
-  MP ==> SparseMultivariatePolynomial(R, K)
-  QF==> PolynomialCategoryQuotientFunctions(IndexedExponents K,K,R,MP,%)
-
-  ODD  ==> "odd"
-  EVEN ==> "even"
-
-  SPECIALDIFF  ==> "%specialDiff"
-  SPECIALDISP  ==> "%specialDisp"
-  SPECIALEQUAL ==> "%specialEqual"
-  SPECIALINPUT ==> "%specialInput"
-
-  Definition ==> Join(ExpressionSpace, RetractableTo SY, Patternable R,
-                     FullyPatternMatchable R, FullyRetractableTo R) with
-       ground?   : % -> Boolean
-         ++ ground?(f) tests if f is an element of R.
-       ground    : % -> R
-         ++ ground(f) returns f as an element of R.
-         ++ An error occurs if f is not an element of R.
-       variables : %  -> List SY
-         ++ variables(f) returns the list of all the variables of f.
-       applyQuote: (SY, %) -> %
-         ++ applyQuote(foo, x) returns \spad{'foo(x)}.
-       applyQuote: (SY, %, %) -> %
-         ++ applyQuote(foo, x, y) returns \spad{'foo(x,y)}.
-       applyQuote: (SY, %, %, %) -> %
-         ++ applyQuote(foo, x, y, z) returns \spad{'foo(x,y,z)}.
-       applyQuote: (SY, %, %, %, %) -> %
-         ++ applyQuote(foo, x, y, z, t) returns \spad{'foo(x,y,z,t)}.
-       applyQuote: (SY, List %) -> %
-         ++ applyQuote(foo, [x1,...,xn]) returns \spad{'foo(x1,...,xn)}.
-       if R has ConvertibleTo InputForm then
-         ConvertibleTo InputForm
-         eval     : (%, SY) -> %
-           ++ eval(f, foo) unquotes all the foo's in f.
-         eval     : (%, List SY) -> %
-           ++ eval(f, [foo1,...,foon]) unquotes all the \spad{fooi}'s in f.
-         eval     : % -> %
-           ++ eval(f) unquotes all the quoted operators in f.
-         eval     : (%, OP, %, SY) -> %
-           ++ eval(x, s, f, y) replaces every \spad{s(a)} in x by \spad{f(y)}
-           ++ with \spad{y} replaced by \spad{a} for any \spad{a}.
-         eval     : (%, List OP, List %, SY) -> %
-           ++ eval(x, [s1,...,sm], [f1,...,fm], y) replaces every
-           ++ \spad{si(a)} in x by \spad{fi(y)}
-           ++ with \spad{y} replaced by \spad{a} for any \spad{a}.
-       if R has SemiGroup then
-         Monoid
-         -- the following line is necessary because of a compiler bug
-         "**"   : (%, N) -> %
-           ++ x**n returns x * x * x * ... * x (n times).
-         isTimes: % -> Union(List %, "failed")
-           ++ isTimes(p) returns \spad{[a1,...,an]}
-           ++ if \spad{p = a1*...*an} and \spad{n > 1}.
-         isExpt : % -> Union(Record(var:K,exponent:Z),"failed")
-           ++ isExpt(p) returns \spad{[x, n]} if \spad{p = x**n}
-           ++ and \spad{n <> 0}.
-       if R has Group then Group
-       if R has AbelianSemiGroup then
-         AbelianMonoid
-         isPlus: % -> Union(List %, "failed")
-           ++ isPlus(p) returns \spad{[m1,...,mn]}
-           ++ if \spad{p = m1 +...+ mn} and \spad{n > 1}.
-         isMult: % -> Union(Record(coef:Z, var:K),"failed")
-           ++ isMult(p) returns \spad{[n, x]} if \spad{p = n * x}
-           ++ and \spad{n <> 0}.
-       if R has AbelianGroup then AbelianGroup
-       if R has Ring then
-         Ring
-         RetractableTo PR
-         PartialDifferentialRing SY
-         FullyLinearlyExplicitRingOver R
-         coerce    : MP -> %
-           ++ coerce(p) returns p as an element of %.
-         numer     : %  -> MP
-           ++ numer(f) returns the
-           ++ numerator of f viewed as a polynomial in the kernels over R
-           ++ if R is an integral domain. If not, then numer(f) = f viewed
-           ++ as a polynomial in the kernels over R.
-           -- DO NOT change this meaning of numer!  MB 1/90
-         numerator : % -> %
-           ++ numerator(f) returns the numerator of \spad{f} converted to %.
-         isExpt:(%,OP) -> Union(Record(var:K,exponent:Z),"failed")
-           ++ isExpt(p,op) returns \spad{[x, n]} if \spad{p = x**n}
-           ++ and \spad{n <> 0} and \spad{x = op(a)}.
-         isExpt:(%,SY) -> Union(Record(var:K,exponent:Z),"failed")
-           ++ isExpt(p,f) returns \spad{[x, n]} if \spad{p = x**n}
-           ++ and \spad{n <> 0} and \spad{x = f(a)}.
-         isPower   : % -> Union(Record(val:%,exponent:Z),"failed")
-           ++ isPower(p) returns \spad{[x, n]} if \spad{p = x**n}
-           ++ and \spad{n <> 0}.
-         eval: (%, List SY, List N, List(% -> %)) -> %
-           ++ eval(x, [s1,...,sm], [n1,...,nm], [f1,...,fm]) replaces
-           ++ every \spad{si(a)**ni} in x by \spad{fi(a)} for any \spad{a}.
-         eval: (%, List SY, List N, List(List % -> %)) -> %
-           ++ eval(x, [s1,...,sm], [n1,...,nm], [f1,...,fm]) replaces
-           ++ every \spad{si(a1,...,an)**ni} in x by \spad{fi(a1,...,an)}
-           ++ for any a1,...,am.
-         eval: (%, SY, N, List % -> %) -> %
-           ++ eval(x, s, n, f) replaces every \spad{s(a1,...,am)**n} in x
-           ++ by \spad{f(a1,...,am)} for any a1,...,am.
-         eval: (%, SY, N, % -> %) -> %
-           ++ eval(x, s, n, f) replaces every \spad{s(a)**n} in x
-           ++ by \spad{f(a)} for any \spad{a}.
-       if R has CharacteristicZero then CharacteristicZero
-       if R has CharacteristicNonZero then CharacteristicNonZero
-       if R has CommutativeRing then
-         Algebra R
-       if R has IntegralDomain then
-         Field
-         RetractableTo Fraction PR
-         convert   : Factored % -> %
-           ++ convert(f1\^e1 ... fm\^em) returns \spad{(f1)\^e1 ... (fm)\^em}
-           ++ as an element of %, using formal kernels
-           ++ created using a \spadfunFrom{paren}{ExpressionSpace}.
-         denom     : %  -> MP
-           ++ denom(f) returns the denominator of f viewed as a
-           ++ polynomial in the kernels over R.
-         denominator : % -> %
-           ++ denominator(f) returns the denominator of \spad{f} converted to %.
-         "/"       : (MP, MP) -> %
-           ++ p1/p2 returns the quotient of p1 and p2 as an element of %.
-         coerce    : Q  -> %
-           ++ coerce(q) returns q as an element of %.
-         coerce    : Polynomial Q -> %
-           ++ coerce(p) returns p as an element of %.
-         coerce    : Fraction Polynomial Q -> %
-           ++ coerce(f) returns f as an element of %.
-         univariate: (%, K) -> Fraction SparseUnivariatePolynomial %
-           ++ univariate(f, k) returns f viewed as a univariate fraction in k.
-         if R has RetractableTo Z then RetractableTo Fraction Z
-   add
-    import BasicOperatorFunctions1(%)
-
-    -- these are needed in Ring only, but need to be declared here
-    -- because of compiler bug: if they are declared inside the Ring
-    -- case, then they are not visible inside the IntegralDomain case.
-    smpIsMult : MP -> Union(Record(coef:Z, var:K),"failed")
-    smpret    : MP -> Union(PR, "failed")
-    smpeval   : (MP, List K, List %) -> %
-    smpsubst  : (MP, List K, List %) -> %
-    smpderiv  : (MP, SY) -> %
-    smpunq    : (MP, List SY, Boolean) -> %
-    kerderiv  : (K, SY)  -> %
-    kderiv    : K -> List %
-    opderiv   : (OP, N) -> List(List % -> %)
-    smp2O     : MP -> O
-    bestKernel: List K -> K
-    worse?    : (K, K) -> Boolean
-    diffArg   : (List %, OP, N) -> List %
-    substArg  : (OP, List %, Z, %) -> %
-    dispdiff  : List % -> Record(name:O, sub:O, arg:List O, level:N)
-    ddiff     : List % -> O
-    diffEval  : List % -> %
-    dfeval    : (List %, K) -> %
-    smprep    : (List SY, List N, List(List % -> %), MP) -> %
-    diffdiff  : (List %, SY) -> %
-    diffdiff0 : (List %, SY, %, K, List %) -> %
-    subs      : (% -> %, K) -> %
-    symsub    : (SY, Z) -> SY
-    kunq      : (K, List SY, Boolean) -> %
-    pushunq   : (List SY, List %) -> List %
-    notfound  : (K -> %, List K, K) -> %
-
-    equaldiff : (K,K)->Boolean
-    debugA: (List % ,List %,Boolean) -> Boolean
-    opdiff := operator("%diff"::SY)$CommonOperators()
-    opquote := operator("applyQuote"::SY)$CommonOperators
-
-    ground? x                == retractIfCan(x)@Union(R,"failed") case R
-    ground  x                == retract x
-    coerce(x:SY):%             == kernel(x)@K :: %
-    retract(x:%):SY            == symbolIfCan(retract(x)@K)::SY
-    applyQuote(s:SY, x:%)      == applyQuote(s, [x])
-    applyQuote(s, x, y)        == applyQuote(s, [x, y])
-    applyQuote(s, x, y, z)     == applyQuote(s, [x, y, z])
-    applyQuote(s, x, y, z, t)  == applyQuote(s, [x, y, z, t])
-    applyQuote(s:SY, l:List %) == opquote concat(s::%, l)
-    belong? op                 == op = opdiff or op = opquote
-    subs(fn, k) == kernel(operator k,[fn x for x in argument k]$List(%))
-
-    operator op ==
-      is?(op, "%diff"::SY) => opdiff
-      is?(op, "%quote"::SY) => opquote
-      error "Unknown operator"
-
-    if R has ConvertibleTo InputForm then
-      INP==>InputForm
-      import MakeUnaryCompiledFunction(%, %, %)
-      indiff: List % -> INP
-      pint  : List INP-> INP
-      differentiand: List % -> %
-
-      differentiand l    == eval(first l, retract(second l)@K, third l)
-      pint l  == convert concat(convert("D"::SY)@INP, l)
-      indiff l ==
-         r2:= convert([convert("::"::SY)@INP,convert(third l)@INP,convert("Symbol"::SY)@INP]@List INP)@INP
-         pint [convert(differentiand l)@INP, r2] 
-      eval(f:%, s:SY)            == eval(f, [s])
-      eval(f:%, s:OP, g:%, x:SY) == eval(f, [s], [g], x)
-
-      eval(f:%, ls:List OP, lg:List %, x:SY) ==
-        eval(f, ls, [compiledFunction(g, x) for g in lg])
-
-      setProperty(opdiff,SPECIALINPUT,indiff@(List % -> InputForm) pretend None)
-
-    variables x ==
-      l := empty()$List(SY)
-      for k in tower x repeat
-        if ((s := symbolIfCan k) case SY) then l := concat(s::SY, l)
-      reverse_! l
-
-    retractIfCan(x:%):Union(SY, "failed") ==
-      (k := retractIfCan(x)@Union(K,"failed")) case "failed" => "failed"
-      symbolIfCan(k::K)
-
-    if R has Ring then
-      import UserDefinedPartialOrdering(SY)
-
--- cannot use new()$Symbol because of possible re-instantiation
-      gendiff := "%%0"::SY
-
-      characteristic()    == characteristic()$R
-      coerce(k:K):%       == k::MP::%
-      symsub(sy, i)       == concat(string sy, convert(i)@String)::SY
-      numerator x         == numer(x)::%
-      eval(x:%, s:SY, n:N, f:% -> %)     == eval(x,[s],[n],[f first #1])
-      eval(x:%, s:SY, n:N, f:List % -> %) == eval(x, [s], [n], [f])
-      eval(x:%, l:List SY, f:List(List % -> %)) == eval(x, l, new(#l, 1), f)
-
-      elt(op:OP, args:List %) ==
-        unary? op and ((od? := has?(op, ODD)) or has?(op, EVEN)) and
-          leadingCoefficient(numer first args) < 0 =>
-            x := op(- first args)
-            od? => -x
-            x
-        elt(op, args)$ExpressionSpace_&(%)
-
-      eval(x:%, s:List SY, n:List N, l:List(% -> %)) ==
-        eval(x, s, n, [f first #1 for f in l]$List(List % -> %))
-
-      -- op(arg)**m ==> func(arg)**(m quo n) * op(arg)**(m rem n)
-      smprep(lop, lexp, lfunc, p) ==
-        (v := mainVariable p) case "failed" => p::%
-        symbolIfCan(k := v::K) case SY => p::%
-        g := (op := operator k)
-           (arg := [eval(a,lop,lexp,lfunc) for a in argument k]$List(%))
-        q := map(eval(#1::%, lop, lexp, lfunc),
-                 univariate(p, k))$SparseUnivariatePolynomialFunctions2(MP, %)
-        (n := position(name op, lop)) < minIndex lop => q g
-        a:%  := 0
-        f    := eval((lfunc.n) arg, lop, lexp, lfunc)
-        e    := lexp.n
-        while q ^= 0 repeat
-          m  := degree q
-          qr := divide(m, e)
-          t1 := f ** (qr.quotient)::N
-          t2 := g ** (qr.remainder)::N
-          a  := a + leadingCoefficient(q) * t1 * t2
-          q  := reductum q
-        a
-
-      dispdiff l ==
-        s := second(l)::O
-        t := third(l)::O
-        a := argument(k := retract(first l)@K)
-        is?(k, opdiff) =>
-          rec := dispdiff a
-          i   := position(s, rec.arg)
-          rec.arg.i := t
-          [rec.name,
-             hconcat(rec.sub, hconcat(","::SY::O, (i+1-minIndex a)::O)),
-                        rec.arg, (zero?(rec.level) => 0; rec.level + 1)]
-        i   := position(second l, a)
-        m   := [x::O for x in a]$List(O)
-        m.i := t
-        [name(operator k)::O, hconcat(","::SY::O, (i+1-minIndex a)::O),
-                                             m, (empty? rest a => 1; 0)]
-
-      ddiff l ==
-        rec := dispdiff l
-        opname :=
-          zero?(rec.level) => sub(rec.name, rec.sub)
-          differentiate(rec.name, rec.level)
-        prefix(opname, rec.arg)
-
-      substArg(op, l, i, g) ==
-        z := copy l
-        z.i := g
-        kernel(op, z)
-
-
-      diffdiff(l, x) ==
-        f := kernel(opdiff, l)
-        diffdiff0(l, x, f, retract(f)@K, empty())
-
-      diffdiff0(l, x, expr, kd, done) ==
-        op  := operator(k := retract(first l)@K)
-        gg  := second l
-        u   := third l
-        arg := argument k
-        ans:% := 0
-        if (not member?(u,done)) and (ans := differentiate(u,x))^=0 then
-          ans := ans * kernel(opdiff,
-               [subst(expr, [kd], [kernel(opdiff, [first l, gg, gg])]),
-                             gg, u])
-        done := concat(gg, done)
-        is?(k, opdiff) => ans + diffdiff0(arg, x, expr, k, done)
-        for i in minIndex arg .. maxIndex arg for b in arg repeat
-          if (not member?(b,done)) and (bp:=differentiate(b,x))^=0 then
-            g   := symsub(gendiff, i)::%
-            ans := ans + bp * kernel(opdiff, [subst(expr, [kd],
-             [kernel(opdiff, [substArg(op, arg, i, g), gg, u])]), g, b])
-        ans
-
-      dfeval(l, g) ==
-        eval(differentiate(first l, symbolIfCan(g)::SY), g, third l)
-
-      diffEval l ==
-        k:K
-        g := retract(second l)@K
-        ((u := retractIfCan(first l)@Union(K, "failed")) case "failed")
-          or (u case K and symbolIfCan(k := u::K) case SY) => dfeval(l, g)
-        op := operator k
-        (ud := derivative op) case "failed" => 
-             -- possible trouble 
-             -- make sure it is a dummy var  
-             dumm:%:=symsub(gendiff,1)::%
-             ss:=subst(l.1,l.2=dumm)
-             -- output(nl::OutputForm)$OutputPackage
-             -- output("fixed"::OutputForm)$OutputPackage
-             nl:=[ss,dumm,l.3]
-             kernel(opdiff, nl)
-        (n := position(second l,argument k)) < minIndex l => 
-              dfeval(l,g)
-        d := ud::List(List % -> %)
-        eval((d.n)(argument k), g, third l)
-
-      diffArg(l, op, i) ==
-        n := i - 1 + minIndex l
-        z := copy l
-        z.n := g := symsub(gendiff, n)::%
-        [kernel(op, z), g, l.n]
-
-      opderiv(op, n) ==
---        one? n =>
-        (n = 1) =>
-          g := symsub(gendiff, n)::%
-          [kernel(opdiff,[kernel(op, g), g, first #1])]
-        [kernel(opdiff, diffArg(#1, op, i)) for i in 1..n]
-
-      kderiv k ==
-        zero?(n := #(args := argument k)) => empty()
-        op := operator k
-        grad :=
-          (u := derivative op) case "failed" => opderiv(op, n)
-          u::List(List % -> %)
-        if #grad ^= n then grad := opderiv(op, n)
-        [g args for g in grad]
-
-    -- SPECIALDIFF contains a map (List %, Symbol) -> %
-    -- it is used when the usual chain rule does not apply,
-    -- for instance with implicit algebraics.
-      kerderiv(k, x) ==
-        (v := symbolIfCan(k)) case SY =>
-          v::SY = x => 1
-          0
-        (fn := property(operator k, SPECIALDIFF)) case None =>
-           ((fn::None) pretend ((List %, SY) -> %)) (argument k, x)
-        +/[g * differentiate(y,x) for g in kderiv k for y in argument k]
-
-      smpderiv(p, x) ==
-        map(retract differentiate(#1::PR, x), p)::% +
-         +/[differentiate(p,k)::% * kerderiv(k, x) for k in variables p]
-
-      coerce(p:PR):% ==
-        map(#1::%, #1::%, p)$PolynomialCategoryLifting(
-                                      IndexedExponents SY, SY, R, PR, %)
-
-      worse?(k1, k2) ==
-        (u := less?(name operator k1,name operator k2)) case "failed" =>
-          k1 < k2
-        u::Boolean
-
-      bestKernel l ==
-        empty? rest l => first l
-        a := bestKernel rest l
-        worse?(first l, a) => a
-        first l
-
-      smp2O p ==
-        (r:=retractIfCan(p)@Union(R,"failed")) case R =>r::R::OutputForm
-        a :=
-          userOrdered?() => bestKernel variables p
-          mainVariable(p)::K
-        outputForm(map(#1::%, univariate(p,
-         a))$SparseUnivariatePolynomialFunctions2(MP, %), a::OutputForm)
-
-      smpsubst(p, lk, lv) ==
-        map(match(lk, lv, #1,
-            notfound(subs(subst(#1, lk, lv), #1), lk, #1))$ListToMap(K,%),
-             #1::%,p)$PolynomialCategoryLifting(IndexedExponents K,K,R,MP,%)
-
-      smpeval(p, lk, lv) ==
-        map(match(lk, lv, #1,
-            notfound(map(eval(#1, lk, lv), #1), lk, #1))$ListToMap(K,%),
-             #1::%,p)$PolynomialCategoryLifting(IndexedExponents K,K,R,MP,%)
-
--- this is called on k when k is not a member of lk
-      notfound(fn, lk, k) ==
-        empty? setIntersection(tower(f := k::%), lk) => f
-        fn k
-
-      if R has ConvertibleTo InputForm then
-        pushunq(l, arg) ==
-           empty? l => [eval a for a in arg]
-           [eval(a, l) for a in arg]
-
-        kunq(k, l, givenlist?) ==
-          givenlist? and empty? l => k::%
-          is?(k, opquote) and
-            (member?(s:=retract(first argument k)@SY, l) or empty? l) =>
-              interpret(convert(concat(convert(s)@InputForm,
-                [convert a for a in pushunq(l, rest argument k)
-                   ]@List(InputForm)))@InputForm)$InputFormFunctions1(%)
-          (operator k) pushunq(l, argument k)
-
-        smpunq(p, l, givenlist?) ==
-          givenlist? and empty? l => p::%
-          map(kunq(#1, l, givenlist?), #1::%,
-            p)$PolynomialCategoryLifting(IndexedExponents K,K,R,MP,%)
-
-      smpret p ==
-        "or"/[symbolIfCan(k) case "failed" for k in variables p] =>
-          "failed"
-        map(symbolIfCan(#1)::SY::PR, #1::PR,
-          p)$PolynomialCategoryLifting(IndexedExponents K, K, R, MP, PR)
-
-      isExpt(x:%, op:OP) ==
-        (u := isExpt x) case "failed" => "failed"
-        is?((u::Record(var:K, exponent:Z)).var, op) => u
-        "failed"
-
-      isExpt(x:%, sy:SY) ==
-        (u := isExpt x) case "failed" => "failed"
-        is?((u::Record(var:K, exponent:Z)).var, sy) => u
-        "failed"
-
-      if R has RetractableTo Z then
-          smpIsMult p ==
---            (u := mainVariable p) case K and one? degree(q:=univariate(p,u::K))
-            (u := mainVariable p) case K and (degree(q:=univariate(p,u::K))=1)
-              and zero?(leadingCoefficient reductum q)
-                and ((r:=retractIfCan(leadingCoefficient q)@Union(R,"failed"))
-                   case R)
-                     and (n := retractIfCan(r::R)@Union(Z, "failed")) case Z =>
-                       [n::Z, u::K]
-            "failed"
-
-      evaluate(opdiff, diffEval)
-
-      debugA(a1,a2,t) == 
-         -- uncomment for debugging
-         -- output(hconcat [a1::OutputForm,a2::OutputForm,t::OutputForm])$OutputPackage
-         t
-
-      equaldiff(k1,k2) ==
-        a1:=argument k1
-        a2:=argument k2
-        -- check the operator
-        res:=operator k1 = operator k2 
-        not res => debugA(a1,a2,res) 
-        -- check the evaluation point
-        res:= (a1.3 = a2.3)
-        not res => debugA(a1,a2,res)
-        -- check all the arguments
-        res:= (a1.1 = a2.1) and (a1.2 = a2.2)
-        res => debugA(a1,a2,res)
-        -- check the substituted arguments
-        (subst(a1.1,[retract(a1.2)@K],[a2.2]) = a2.1) => debugA(a1,a2,true)
-        debugA(a1,a2,false)
-      setProperty(opdiff,SPECIALEQUAL,
-                          equaldiff@((K,K) -> Boolean) pretend None)
-      setProperty(opdiff, SPECIALDIFF,
-                          diffdiff@((List %, SY) -> %) pretend None)
-      setProperty(opdiff, SPECIALDISP,
-                              ddiff@(List % -> OutputForm) pretend None)
-
-      if not(R has IntegralDomain) then
-        mainKernel x         == mainVariable numer x
-        kernels x            == variables numer x
-        retract(x:%):R       == retract numer x
-        retract(x:%):PR      == smpret(numer x)::PR
-        retractIfCan(x:%):Union(R,  "failed") == retract numer x
-        retractIfCan(x:%):Union(PR, "failed") == smpret numer x
-        eval(x:%, lk:List K, lv:List %)  == smpeval(numer x, lk, lv)
-        subst(x:%, lk:List K, lv:List %) == smpsubst(numer x, lk, lv)
-        differentiate(x:%, s:SY)         == smpderiv(numer x, s)
-        coerce(x:%):OutputForm           == smp2O numer x
-
-        if R has ConvertibleTo InputForm then
-          eval(f:%, l:List SY) == smpunq(numer f, l, true)
-          eval f               == smpunq(numer f, empty(), false)
-
-        eval(x:%, s:List SY, n:List N, f:List(List % -> %)) ==
-          smprep(s, n, f, numer x)
-
-        isPlus x ==
-          (u := isPlus numer x) case "failed" => "failed"
-          [p::% for p in u::List(MP)]
-
-        isTimes x ==
-          (u := isTimes numer x) case "failed" => "failed"
-          [p::% for p in u::List(MP)]
-
-        isExpt x ==
-          (u := isExpt numer x) case "failed" => "failed"
-          r := u::Record(var:K, exponent:NonNegativeInteger)
-          [r.var, r.exponent::Z]
-
-        isPower x ==
-          (u := isExpt numer x) case "failed" => "failed"
-          r := u::Record(var:K, exponent:NonNegativeInteger)
-          [r.var::%, r.exponent::Z]
-
-        if R has ConvertibleTo Pattern Z then
-          convert(x:%):Pattern(Z) == convert numer x
-
-        if R has ConvertibleTo Pattern Float then
-          convert(x:%):Pattern(Float) == convert numer x
-
-        if R has RetractableTo Z then
-          isMult x == smpIsMult numer x
-
-    if R has CommutativeRing then
-      r:R * x:% == r::MP::% * x
-
-    if R has IntegralDomain then
-      par   : % -> %
-
-      mainKernel x                    == mainVariable(x)$QF
-      kernels x                       == variables(x)$QF
-      univariate(x:%, k:K)            == univariate(x, k)$QF
-      isPlus x                        == isPlus(x)$QF
-      isTimes x                       == isTimes(x)$QF
-      isExpt x                        == isExpt(x)$QF
-      isPower x                       == isPower(x)$QF
-      denominator x                   == denom(x)::%
-      coerce(q:Q):%                   == (numer q)::MP / (denom q)::MP
-      coerce(q:Fraction PR):%         == (numer q)::% / (denom q)::%
-      coerce(q:Fraction Polynomial Q) == (numer q)::% / (denom q)::%
-      retract(x:%):PR                == retract(retract(x)@Fraction(PR))
-      retract(x:%):Fraction(PR) == smpret(numer x)::PR / smpret(denom x)::PR
-      retract(x:%):R == (retract(numer x)@R exquo retract(denom x)@R)::R
-
-      coerce(x:%):OutputForm ==
---        one?(denom x) => smp2O numer x
-        ((denom x) = 1) => smp2O numer x
-        smp2O(numer x) / smp2O(denom x)
-
-      retractIfCan(x:%):Union(R, "failed") ==
-        (n := retractIfCan(numer x)@Union(R, "failed")) case "failed" or
-          (d := retractIfCan(denom x)@Union(R, "failed")) case "failed"
-            or (r := n::R exquo d::R) case "failed" => "failed"
-        r::R
-
-      eval(f:%, l:List SY) ==
-        smpunq(numer f, l, true) / smpunq(denom f, l, true)
-
-      if R has ConvertibleTo InputForm then
-        eval f ==
-          smpunq(numer f, empty(), false) / smpunq(denom f, empty(), false)
-
-        eval(x:%, s:List SY, n:List N, f:List(List % -> %)) ==
-          smprep(s, n, f, numer x) / smprep(s, n, f, denom x)
-
-      differentiate(f:%, x:SY) ==
-        (smpderiv(numer f, x) * denom(f)::% -
-          numer(f)::% * smpderiv(denom f, x))
-            / (denom(f)::% ** 2)
-
-      eval(x:%, lk:List K, lv:List %) ==
-        smpeval(numer x, lk, lv) / smpeval(denom x, lk, lv)
-
-      subst(x:%, lk:List K, lv:List %) ==
-        smpsubst(numer x, lk, lv) / smpsubst(denom x, lk, lv)
-
-      par x ==
-        (r := retractIfCan(x)@Union(R, "failed")) case R => x
-        paren x
-
-      convert(x:Factored %):% ==
-        par(unit x) * */[par(f.factor) ** f.exponent for f in factors x]
-
-      retractIfCan(x:%):Union(PR, "failed") ==
-        (u := retractIfCan(x)@Union(Fraction PR,"failed")) case "failed"
-          => "failed"
-        retractIfCan(u::Fraction(PR))
-
-      retractIfCan(x:%):Union(Fraction PR, "failed") ==
-        (n := smpret numer x) case "failed" => "failed"
-        (d := smpret denom x) case "failed" => "failed"
-        n::PR / d::PR
-
-      coerce(p:Polynomial Q):% ==
-        map(#1::%, #1::%,
-           p)$PolynomialCategoryLifting(IndexedExponents SY, SY,
-                                                     Q, Polynomial Q, %)
-
-      if R has RetractableTo Z then
-        coerce(x:Fraction Z):% == numer(x)::MP / denom(x)::MP
-
-        isMult x ==
-           (u := smpIsMult numer x) case "failed"
-              or (v := retractIfCan(denom x)@Union(R, "failed")) case "failed"
-                 or (w := retractIfCan(v::R)@Union(Z, "failed")) case "failed"
-                     => "failed"
-           r := u::Record(coef:Z, var:K)
-           (q := r.coef exquo w::Z) case "failed" => "failed"
-           [q::Z, r.var]
-
-      if R has ConvertibleTo Pattern Z then
-        convert(x:%):Pattern(Z) == convert(numer x) / convert(denom x)
-
-      if R has ConvertibleTo Pattern Float then
-        convert(x:%):Pattern(Float) ==
-          convert(numer x) / convert(denom x)
-
-@
 \section{package FS2 FunctionSpaceFunctions2}
 <<package FS2 FunctionSpaceFunctions2>>=
 )abbrev package FS2 FunctionSpaceFunctions2
@@ -1233,10 +135,8 @@ FunctionSpaceFunctions2(R, A, S, B): Exports == Implementation where
 --
 --   op  kl  FSPACE  expr funcpkgs
 
-<<category ES ExpressionSpace>>
 <<package ES1 ExpressionSpaceFunctions1>>
 <<package ES2 ExpressionSpaceFunctions2>>
-<<category FS FunctionSpace>>
 <<package FS2 FunctionSpaceFunctions2>>
 @
 \eject
diff --git a/src/algebra/indexedp.spad.pamphlet b/src/algebra/indexedp.spad.pamphlet
index 41f9bc8..12c1cdb 100644
--- a/src/algebra/indexedp.spad.pamphlet
+++ b/src/algebra/indexedp.spad.pamphlet
@@ -9,45 +9,6 @@
 \eject
 \tableofcontents
 \eject
-\section{category IDPC IndexedDirectProductCategory}
-<<category IDPC IndexedDirectProductCategory>>=
-)abbrev category IDPC IndexedDirectProductCategory
-++ Author: James Davenport
-++ Date Created:
-++ Date Last Updated:
-++ Basic Functions:
-++ Related Constructors:
-++ Also See:
-++ AMS Classifications:
-++ Keywords:
-++ References:
-++ Description:
-++ This category represents the direct product of some set with
-++ respect to an ordered indexing set.
-
-IndexedDirectProductCategory(A:SetCategory,S:OrderedSet): Category ==
-  SetCategory with
-    map:           (A -> A, %) -> %
-       ++ map(f,z) returns the new element created by applying the
-       ++ function f to each component of the direct product element z.
-    monomial:         (A, S) -> %
-       ++ monomial(a,s) constructs a direct product element with the s
-       ++ component set to \spad{a}
-    leadingCoefficient:   % -> A
-       ++ leadingCoefficient(z) returns the coefficient of the leading
-       ++ (with respect to the ordering on the indexing set)
-       ++ monomial of z.
-       ++ Error: if z has no support.
-    leadingSupport:   % -> S
-       ++ leadingSupport(z) returns the index of leading
-       ++ (with respect to the ordering on the indexing set) monomial of z.
-       ++ Error: if z has no support.
-    reductum:      % -> %
-       ++ reductum(z) returns a new element created by removing the
-       ++ leading coefficient/support pair from the element z.
-       ++ Error: if z has no support.
-
-@
 \section{domain IDPO IndexedDirectProductObject}
 <<domain IDPO IndexedDirectProductObject>>=
 )abbrev domain IDPO IndexedDirectProductObject
@@ -336,7 +297,6 @@ IndexedDirectProductAbelianGroup(A:AbelianGroup,S:OrderedSet):
 <<*>>=
 <<license>>
 
-<<category IDPC IndexedDirectProductCategory>>
 <<domain IDPO IndexedDirectProductObject>>
 <<domain IDPAM IndexedDirectProductAbelianMonoid>>
 <<domain IDPOAM IndexedDirectProductOrderedAbelianMonoid>>
diff --git a/src/algebra/interval.spad.pamphlet b/src/algebra/interval.spad.pamphlet
index ab9bfa9..9fb1c3b 100644
--- a/src/algebra/interval.spad.pamphlet
+++ b/src/algebra/interval.spad.pamphlet
@@ -9,51 +9,6 @@
 \eject
 \tableofcontents
 \eject
-\section{category INTCAT IntervalCategory}
-<<category INTCAT IntervalCategory>>=
-)abbrev category INTCAT IntervalCategory
-+++ Author: Mike Dewar
-+++ Date Created: November 1996
-+++ Date Last Updated:
-+++ Basic Functions:
-+++ Related Constructors: 
-+++ Also See:
-+++ AMS Classifications:
-+++ Keywords:
-+++ References:
-+++ Description:
-+++ This category implements of interval arithmetic and transcendental
-+++ functions over intervals.
-IntervalCategory(R: Join(FloatingPointSystem,TranscendentalFunctionCategory)):
- Category == Join(GcdDomain, OrderedSet, TranscendentalFunctionCategory, RadicalCategory, RetractableTo(Integer)) with
-  approximate
-  interval : (R,R) -> %
-    ++ interval(inf,sup) creates a new interval, either \axiom{[inf,sup]} if
-    ++ \axiom{inf <= sup} or \axiom{[sup,in]} otherwise.
-  qinterval : (R,R) -> %
-    ++ qinterval(inf,sup) creates a new interval \axiom{[inf,sup]}, without
-    ++ checking the ordering on the elements.
-  interval : R -> %
-    ++ interval(f) creates a new interval around f.
-  interval : Fraction Integer -> %
-    ++ interval(f) creates a new interval around f.
-  inf : % -> R
-    ++ inf(u) returns the infinum of \axiom{u}.
-  sup : % -> R
-    ++ sup(u) returns the supremum of \axiom{u}.
-  width : % -> R
-    ++ width(u) returns \axiom{sup(u) - inf(u)}.
-  positive? : % -> Boolean
-    ++ positive?(u) returns \axiom{true} if every element of u is positive,
-    ++ \axiom{false} otherwise.
-  negative? : % -> Boolean
-    ++ negative?(u) returns \axiom{true} if every element of u is negative,
-    ++ \axiom{false} otherwise.
-  contains? : (%,R) -> Boolean
-    ++ contains?(i,f) returns true if \axiom{f} is contained within the interval
-    ++ \axiom{i}, false otherwise.
-
-@
 \section{domain INTRVL Interval}
 <<domain INTRVL Interval>>=
 )abbrev domain INTRVL Interval
@@ -534,7 +489,6 @@ Interval(R:Join(FloatingPointSystem,TranscendentalFunctionCategory)): IntervalCa
 <<*>>=
 <<license>>
 
-<<category INTCAT IntervalCategory>>
 <<domain INTRVL Interval>>
 
 @
