diff --git a/books/Makefile.pamphlet b/books/Makefile.pamphlet
index 6836403..d5e906d 100644
--- a/books/Makefile.pamphlet
+++ b/books/Makefile.pamphlet
@@ -90,6 +90,7 @@ ${PDF}/toc.pdf: ${BOOKS}
 	@echo 13 making ${PDF}/toc.pdf
 	@(cd ${PDF} ; \
 	echo "\\documentclass{book}" >toc.tex ; \
+	echo "\\usepackage{amssymb}" >>toc.tex ; \
 	echo "\\begin{document}" >>toc.tex ; \
 	echo "{\\bf Volume ~ 0}: Axiom {\\sl Jenks and Sutor}\\\\" >toc.toc ; \
 	echo "{\\bf Volume ~ 1}: Axiom {\\sl Tutorial}\\\\" >>toc.toc ; \
diff --git a/books/bookvol10.3.pamphlet b/books/bookvol10.3.pamphlet
index 57e113b..6e000ec 100644
--- a/books/bookvol10.3.pamphlet
+++ b/books/bookvol10.3.pamphlet
@@ -286,6 +286,8 @@ November 10, 2003 ((iHy))
 \section{domain ALGFF AlgebraicFunctionField}
 \pagehead{AlgebraicFunctionField}{ALGFF}
 \pagepic{ps/v103algebraicfunctionfield.ps}{ALGFF}{1.00}
+See also:\\
+\refto{RadicalFunctionField}{RADFF}
 <<domain ALGFF AlgebraicFunctionField>>=
 )abbrev domain ALGFF AlgebraicFunctionField
 ++ Function field defined by f(x, y) = 0
@@ -449,6 +451,8 @@ AlgebraicFunctionField(F, UP, UPUP, modulus): Exports == Impl where
 @
 \pagehead{AlgebraicNumber}{AN}
 \pagepic{ps/v103algebraicnumber.ps}{AN}{1.00}
+See also:\\
+\refto{InnerAlgebraicNumber}{IAN}
 <<domain AN AlgebraicNumber>>=
 )abbrev domain AN AlgebraicNumber
 ++ Algebraic closure of the rational numbers
@@ -500,6 +504,211 @@ AlgebraicNumber(): Exports == Implementation where
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain ANTISYM AntiSymm}
+\pagehead{AntiSymm}{ANTISYM}
+\pagepic{ps/v103antisymm.ps}{ANTISYM}{1.00}
+See also:\\
+\refto{ExtAlgBasis}{EAB}
+\refto{DeRhamComplex}{DERHAM}
+<<domain ANTISYM AntiSymm>>=
+)abbrev domain ANTISYM AntiSymm
+++   Author: Larry A. Lambe
+++   Date     : 01/26/91.
+++   Revised  : 30 Nov 94
+++
+++   based on AntiSymmetric '89
+++
+++   Needs: ExtAlgBasis, FreeModule(Ring,OrderedSet), LALG, LALG-
+++
+++   Description: The domain of antisymmetric polynomials.
+ 
+ 
+AntiSymm(R:Ring, lVar:List Symbol): Export == Implement where
+  LALG ==> LeftAlgebra
+  FMR  ==> FM(R,EAB)
+  FM   ==> FreeModule
+  I    ==> Integer
+  L    ==> List
+  EAB  ==> ExtAlgBasis     -- these are exponents of basis elements in order
+  NNI  ==> NonNegativeInteger
+  O    ==> OutputForm
+  base ==> k
+  coef ==> c
+  Term ==> Record(k:EAB,c:R)
+ 
+  Export == Join(LALG(R), RetractableTo(R)) with
+      leadingCoefficient : %           -> R
+	++ leadingCoefficient(p) returns the leading
+	++ coefficient of antisymmetric polynomial p.
+--    leadingSupport       : %           -> EAB
+      leadingBasisTerm     : %           -> %
+	++ leadingBasisTerm(p) returns the leading
+	++ basis term of antisymmetric polynomial p.
+      reductum           : %           -> %
+	++ reductum(p), where p is an antisymmetric polynomial,
+        ++ returns p minus the leading
+	++ term of p if p has at least two terms, and 0 otherwise.
+      coefficient        : (%,%)     -> R 
+	++ coefficient(p,u) returns the coefficient of 
+	++ the term in p containing the basis term u if such 
+        ++ a term exists, and 0 otherwise.
+	++ Error: if the second argument u is not a basis element.
+      generator          : NNI         -> %
+	++ generator(n) returns the nth multiplicative generator,
+	++ a basis term.
+      exp                : L I         -> %
+	++  exp([i1,...in]) returns \spad{u_1\^{i_1} ... u_n\^{i_n}}
+      homogeneous?       : %           -> Boolean
+	++  homogeneous?(p) tests if all of the terms of 
+	++  p have the same degree.
+      retractable?       : %           -> Boolean
+	++  retractable?(p) tests if p is a 0-form,
+	++  i.e., if degree(p) = 0.
+      degree             : %           -> NNI
+	++  degree(p) returns the homogeneous degree of p.
+      map                : (R -> R, %) -> %
+	++  map(f,p) changes each coefficient of p by the
+	++  application of f.
+
+
+--    1 corresponds to the empty monomial Nul = [0,...,0]
+--    from EAB.  In terms of the exterior algebra on X,
+--    it corresponds to the identity element which lives
+--    in homogeneous degree 0.
+ 
+  Implement == FMR add
+      Rep := L Term
+      x,y :  EAB
+      a,b :  %
+      r   :  R
+      m   :  I
+
+      dim := #lVar
+
+      1 == [[ Nul(dim)$EAB, 1$R ]]
+
+      coefficient(a,u) ==
+        not null u.rest => error "2nd argument must be a basis element"
+        x := u.first.base
+        for t in a repeat
+          if t.base = x then return t.coef
+          if t.base < x then return 0
+        0
+
+      retractable?(a) ==
+        null a or (a.first.k  =  Nul(dim))
+
+      retractIfCan(a):Union(R,"failed") ==
+        null a               => 0$R
+        a.first.k = Nul(dim) => leadingCoefficient a
+        "failed"
+
+      retract(a):R ==
+        null a => 0$R
+        leadingCoefficient a
+
+      homogeneous? a ==
+        null a => true
+        siz := _+/exponents(a.first.base)
+        for ta in reductum a repeat
+          _+/exponents(ta.base) ^= siz => return false
+        true
+
+      degree a ==
+        null a => 0$NNI
+        homogeneous? a => (_+/exponents(a.first.base)) :: NNI
+        error "not a homogeneous element"
+
+      zo : (I,I) -> L I
+      zo(p,q) ==
+        p = 0 => [1,q]
+        q = 0 => [1,1]
+        [0,0]
+
+      getsgn : (EAB,EAB) -> I
+      getsgn(x,y) ==
+        sgn:I  := 0
+        xx:L I := exponents x
+        yy:L I := exponents y
+        for i in 1 .. (dim-1) repeat
+          xx  := rest xx
+          sgn := sgn + (_+/xx)*yy.i
+        sgn rem 2 = 0 => 1
+        -1
+
+      Nalpha: (EAB,EAB) -> L I
+      Nalpha(x,y) ==
+        i:I := 1
+        dum2:L I := [0 for i in 1..dim]
+        for j in 1..dim repeat
+          dum:=zo((exponents x).j,(exponents y).j)
+          (i:= i*dum.1) = 0 => leave
+          dum2.j := dum.2
+        i = 0 => cons(i, dum2)
+        cons(getsgn(x,y), dum2)
+
+      a * b ==
+        null a => 0
+        null b => 0
+        ((null a.rest) and (a.first.k = Nul(dim))) => a.first.c * b
+        ((null b.rest) and (b.first.k = Nul(dim))) => b.first.c * a
+        z:% := 0
+        for tb in b repeat
+          for ta in a repeat
+            stuff:=Nalpha(ta.base,tb.base)
+            r:=first(stuff)*ta.coef*tb.coef
+            if r ^= 0 then z := z + [[rest(stuff)::EAB, r]]
+        z
+
+      coerce(r):% == 
+        r = 0 => 0
+        [ [Nul(dim), r] ]
+
+      coerce(m):% == 
+        m = 0 => 0
+        [ [Nul(dim), m::R] ]
+
+      characteristic() == characteristic()$R
+
+      generator(j) == 
+        -- j < 1 or j > dim => error "your subscript is out of range"
+        -- error will be generated by dum.j if out of range
+        dum:L I := [0 for i in 1..dim]
+        dum.j:=1
+        [[dum::EAB, 1::R]]
+
+      exp(li:(L I)) ==  [[li::EAB, 1]]
+ 
+      leadingBasisTerm a ==
+        [[a.first.k, 1]]
+
+      displayList:EAB -> O
+      displayList(x):O ==
+        le: L I := exponents(x)$EAB
+--      reduce(_*,[(lVar.i)::O for i in 1..dim | le.i = 1])$L(O)
+--        reduce(_*,[(lVar.i)::O for i in 1..dim | one?(le.i)])$L(O)
+        reduce(_*,[(lVar.i)::O for i in 1..dim | ((le.i) = 1)])$L(O)
+
+      makeTerm:(R,EAB) -> O
+      makeTerm(r,x) ==
+      -- we know that r ^= 0
+        x = Nul(dim)$EAB  => r::O
+--        one? r => displayList(x)
+        (r = 1) => displayList(x)
+--      r = 1 => displayList(x)
+--      r = 0 => 0$I::O
+--      x = Nul(dim)$EAB  => r::O
+        r::O * displayList(x)
+
+      coerce(a):O ==
+        zero? a     => 0$I::O
+        null rest(a @ Rep) => 
+                 t := first(a @ Rep)
+                 makeTerm(t.coef,t.base)
+        reduce(_+,[makeTerm(t.coef,t.base) for t in (a @ Rep)])$L(O)
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{domain ANY Any}
 <<dot>>=
 "ANY" -> "SETCAT"
@@ -507,6 +716,8 @@ AlgebraicNumber(): Exports == Implementation where
 @
 \pagehead{Any}{ANY}
 \pagepic{ps/v103any.ps}{ANY}{1.00}
+See also:\\
+\refto{None}{NONE}
 <<domain ANY Any>>=
 )abbrev domain ANY Any
 ++ Author: Robert S. Sutor
@@ -595,6 +806,11 @@ Any(): SetCategory with
 @
 \pagehead{ArrayStack}{ASTACK}
 \pagepic{ps/v103arraystack.ps}{ASTACK}{1.00}
+See also:\\
+\refto{Stack}{STACK}
+\refto{Queue}{QUEUE}
+\refto{Dequeue}{DEQUEUE}
+\refto{Heap}{HEAP}
 <<domain ASTACK ArrayStack>>=
 )abbrev domain ASTACK ArrayStack
 ++ Author: Michael Monagan and Stephen Watt
@@ -4959,6 +5175,10 @@ Asp9(name): Exports == Implementation where
 @
 \pagehead{Bits}{BITS}
 \pagepic{ps/v103bits.ps}{BITS}{1.00}
+See also:\\
+\refto{Reference}{REF}
+\refto{Boolean}{BOOLEAN}
+\refto{IndexedBits}{IBITS}
 <<domain BITS Bits>>=
 )abbrev domain BITS Bits
 ++ Author: Stephen M. Watt
@@ -4991,6 +5211,10 @@ Bits(): Exports == Implementation where
 @
 \pagehead{Boolean}{BOOLEAN}
 \pagepic{ps/v103boolean.ps}{BOOLEAN}{1.00}
+See also:\\
+\refto{Reference}{REF}
+\refto{IndexedBits}{IBITS}
+\refto{Bits}{BITS}
 <<domain BOOLEAN Boolean>>=
 )abbrev domain BOOLEAN Boolean
 ++ Author: Stephen M. Watt
@@ -6406,6 +6630,8 @@ o $AXIOM/doc/src/algebra/clifford.spad
 @
 \pagehead{CliffordAlgebra}{CLIF}
 \pagepic{ps/v103cliffordalgebra.ps}{CLIF}{1.00}
+See also:\\
+\refto{QuadraticForm}{QFORM}
 <<domain CLIF CliffordAlgebra>>=
 )abbrev domain CLIF CliffordAlgebra
 ++ Author: Stephen M. Watt
@@ -8184,6 +8410,8 @@ CartesianTensor(minix, dim, R): Exports == Implementation where
 @
 \pagehead{Color}{COLOR}
 \pagepic{ps/v103color.ps}{COLOR}{1.00}
+See also:\\
+\refto{Palette}{PALETTE}
 <<domain COLOR Color>>=
 )abbrev domain COLOR Color
 ++ Author: Jim Wen
@@ -9167,6 +9395,10 @@ ContinuedFraction(R): Exports == Implementation where
 @
 \pagehead{Database}{DBASE}
 \pagepic{ps/v103database.ps}{DBASE}{1.00}
+See also:\\
+\refto{DataList}{DLIST}
+\refto{IndexCard}{ICARD}
+\refto{QueryEquation}{QEQUAT}
 <<domain DBASE Database>>=
 )abbrev domain DBASE Database
 ++ This domain implements a simple view of a database whose fields are 
@@ -9224,6 +9456,10 @@ Database(S): Exports == Implementation where
 @
 \pagehead{DataList}{DLIST}
 \pagepic{ps/v103datalist.ps}{DLIST}{1.00}
+See also:\\
+\refto{IndexCard}{ICARD}
+\refto{Database}{DBASE}
+\refto{QueryEquation}{QEQUAT}
 <<domain DLIST DataList>>=
 )abbrev domain DLIST DataList
 ++ This domain provides some nice functions on lists
@@ -10943,6 +11179,11 @@ DenavitHartenbergMatrix(R): Exports == Implementation where
 @
 \pagehead{Dequeue}{DEQUEUE}
 \pagepic{ps/v103dequeue.ps}{DEQUEUE}{1.00}
+See also:\\
+\refto{Stack}{STACK}
+\refto{ArrayStack}{ASTACK}
+\refto{Queue}{QUEUE}
+\refto{Heap}{HEAP}
 <<domain DEQUEUE Dequeue>>=
 )abbrev domain DEQUEUE Dequeue
 ++ Author: Michael Monagan and Stephen Watt
@@ -11000,11 +11241,4840 @@ Dequeue(S:SetCategory): DequeueAggregate S with
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain DERHAM DeRhamComplex}
+<<DeRhamComplex.input>>=
+-- derham.spad.pamphlet DeRhamComplex.input
+)spool DeRhamComplex.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 34
+coefRing := Integer
+--R 
+--R
+--R   (1)  Integer
+--R                                                                 Type: Domain
+--E 1
+
+--S 2 of 34
+lv : List Symbol := [x,y,z] 
+--R 
+--R
+--R   (2)  [x,y,z]
+--R                                                            Type: List Symbol
+--E 2
+
+--S 3 of 34
+der := DERHAM(coefRing,lv) 
+--R 
+--R
+--R   (3)  DeRhamComplex(Integer,[x,y,z])
+--R                                                                 Type: Domain
+--E 3
+
+--S 4 of 34
+R := Expression coefRing
+--R 
+--R
+--R   (4)  Expression Integer
+--R                                                                 Type: Domain
+--E 4
+
+--S 5 of 34
+f : R := x**2*y*z-5*x**3*y**2*z**5
+--R 
+--R
+--R            3 2 5    2
+--R   (5)  - 5x y z  + x y z
+--R                                                     Type: Expression Integer
+--E 5
+
+--S 6 of 34
+g : R := z**2*y*cos(z)-7*sin(x**3*y**2)*z**2 
+--R 
+--R
+--R            2     3 2       2
+--R   (6)  - 7z sin(x y ) + y z cos(z)
+--R                                                     Type: Expression Integer
+--E 6
+
+--S 7 of 34
+h : R :=x*y*z-2*x**3*y*z**2 
+--R 
+--R
+--R            3   2
+--R   (7)  - 2x y z  + x y z
+--R                                                     Type: Expression Integer
+--E 7
+
+--S 8 of 34
+dx : der := generator(1)
+--R 
+--R
+--R   (8)  dx
+--R                                         Type: DeRhamComplex(Integer,[x,y,z])
+--E 8
+
+--S 9 of 34
+dy : der := generator(2)
+--R 
+--R
+--R   (9)  dy
+--R                                         Type: DeRhamComplex(Integer,[x,y,z])
+--E 9
+
+--S 10 of 34
+dz : der := generator(3)
+--R 
+--R
+--R   (10)  dz
+--R                                         Type: DeRhamComplex(Integer,[x,y,z])
+--E 10
+
+--S 11 of 34
+[dx,dy,dz] := [generator(i)$der for i in 1..3]
+--R 
+--R
+--R   (11)  [dx,dy,dz]
+--R                                    Type: List DeRhamComplex(Integer,[x,y,z])
+--E 11
+
+--S 12 of 34
+alpha : der := f*dx + g*dy + h*dz
+--R 
+--R
+--R   (12)
+--R          3   2                   2     3 2       2
+--R     (- 2x y z  + x y z)dz + (- 7z sin(x y ) + y z cos(z))dy
+--R   + 
+--R          3 2 5    2
+--R     (- 5x y z  + x y z)dx
+--R                                         Type: DeRhamComplex(Integer,[x,y,z])
+--E 12
+
+--S 13 of 34
+beta  : der := cos(tan(x*y*z)+x*y*z)*dx + x*dy
+--R 
+--R
+--R   (13)  x dy + cos(tan(x y z) + x y z)dx
+--R                                         Type: DeRhamComplex(Integer,[x,y,z])
+--E 13
+
+--S 14 of 34
+exteriorDifferential alpha
+--R 
+--R
+--R   (14)
+--R         2                  3 2                    3 2
+--R     (y z sin(z) + 14z sin(x y ) - 2y z cos(z) - 2x z  + x z)dy dz
+--R   + 
+--R         3 2 4     2   2          2
+--R     (25x y z  - 6x y z  + y z - x y)dx dz
+--R   + 
+--R           2 2 2     3 2       3   5    2
+--R     (- 21x y z cos(x y ) + 10x y z  - x z)dx dy
+--R                                         Type: DeRhamComplex(Integer,[x,y,z])
+--E 14
+
+--S 15 of 34
+exteriorDifferential %
+--R 
+--R
+--R   (15)  0
+--R                                         Type: DeRhamComplex(Integer,[x,y,z])
+--E 15
+
+--S 16 of 34
+gamma := alpha * beta
+--R 
+--R
+--R   (16)
+--R        4   2    2               3   2
+--R     (2x y z  - x y z)dy dz + (2x y z  - x y z)cos(tan(x y z) + x y z)dx dz
+--R   + 
+--R       2     3 2       2                                   4 2 5    3
+--R   ((7z sin(x y ) - y z cos(z))cos(tan(x y z) + x y z) - 5x y z  + x y z)dx dy
+--R                                         Type: DeRhamComplex(Integer,[x,y,z])
+--E 16
+
+--S 17 of 34
+exteriorDifferential(gamma) - (exteriorDifferential(alpha)*beta - alpha * exteriorDifferential(beta)) 
+--R 
+--R
+--R   (17)  0
+--R                                         Type: DeRhamComplex(Integer,[x,y,z])
+--E 17
+
+--S 18 of 34
+a : BOP := operator('a)
+--R 
+--R
+--R   (18)  a
+--R                                                          Type: BasicOperator
+--E 18
+
+--S 19 of 34
+b : BOP := operator('b)
+--R 
+--R
+--R   (19)  b
+--R                                                          Type: BasicOperator
+--E 19
+
+--S 20 of 34
+c : BOP := operator('c)
+--R 
+--R
+--R   (20)  c
+--R                                                          Type: BasicOperator
+--E 20
+
+--S 21 of 34
+sigma := a(x,y,z) * dx + b(x,y,z) * dy + c(x,y,z) * dz 
+--R 
+--R
+--R   (21)  c(x,y,z)dz + b(x,y,z)dy + a(x,y,z)dx
+--R                                         Type: DeRhamComplex(Integer,[x,y,z])
+--E 21
+
+--S 22 of 34
+theta  := a(x,y,z) * dx * dy + b(x,y,z) * dx * dz + c(x,y,z) * dy * dz 
+--R 
+--R
+--R   (22)  c(x,y,z)dy dz + b(x,y,z)dx dz + a(x,y,z)dx dy
+--R                                         Type: DeRhamComplex(Integer,[x,y,z])
+--E 22
+
+--S 23 of 34
+totalDifferential(a(x,y,z))$der 
+--R 
+--R
+--R   (23)  a  (x,y,z)dz + a  (x,y,z)dy + a  (x,y,z)dx
+--R          ,3             ,2             ,1
+--R                                         Type: DeRhamComplex(Integer,[x,y,z])
+--E 23
+
+--S 24 of 34
+exteriorDifferential sigma
+--R 
+--R
+--R   (24)
+--R     (c  (x,y,z) - b  (x,y,z))dy dz + (c  (x,y,z) - a  (x,y,z))dx dz
+--R       ,2           ,3                  ,1           ,3
+--R   + 
+--R     (b  (x,y,z) - a  (x,y,z))dx dy
+--R       ,1           ,2
+--R                                         Type: DeRhamComplex(Integer,[x,y,z])
+--E 24
+
+--S 25 of 34
+exteriorDifferential theta
+--R 
+--R
+--R   (25)  (c  (x,y,z) - b  (x,y,z) + a  (x,y,z))dx dy dz
+--R           ,1           ,2           ,3
+--R                                         Type: DeRhamComplex(Integer,[x,y,z])
+--E 25
+
+--S 26 of 34
+one : der := 1
+--R 
+--R
+--R   (26)  1
+--R                                         Type: DeRhamComplex(Integer,[x,y,z])
+--E 26
+
+--S 27 of 34
+g1 : der := a([x,t,y,u,v,z,e]) * one 
+--R 
+--R
+--R   (27)  a(x,t,y,u,v,z,e)
+--R                                         Type: DeRhamComplex(Integer,[x,y,z])
+--E 27
+
+--S 28 of 34
+h1 : der := a([x,y,x,t,x,z,y,r,u,x]) * one 
+--R 
+--R
+--R   (28)  a(x,y,x,t,x,z,y,r,u,x)
+--R                                         Type: DeRhamComplex(Integer,[x,y,z])
+--E 28
+
+--S 29 of 34
+exteriorDifferential g1 
+--R 
+--R
+--R   (29)  a  (x,t,y,u,v,z,e)dz + a  (x,t,y,u,v,z,e)dy + a  (x,t,y,u,v,z,e)dx
+--R          ,6                     ,3                     ,1
+--R                                         Type: DeRhamComplex(Integer,[x,y,z])
+--E 29
+
+--S 30 of 34
+exteriorDifferential h1
+--R 
+--R
+--R   (30)
+--R     a  (x,y,x,t,x,z,y,r,u,x)dz
+--R      ,6
+--R   + 
+--R     (a  (x,y,x,t,x,z,y,r,u,x) + a  (x,y,x,t,x,z,y,r,u,x))dy
+--R       ,7                         ,2
+--R   + 
+--R         a   (x,y,x,t,x,z,y,r,u,x) + a  (x,y,x,t,x,z,y,r,u,x)
+--R          ,10                         ,5
+--R       + 
+--R         a  (x,y,x,t,x,z,y,r,u,x) + a  (x,y,x,t,x,z,y,r,u,x)
+--R          ,3                         ,1
+--R    *
+--R       dx
+--R                                         Type: DeRhamComplex(Integer,[x,y,z])
+--E 30
+
+--S 31 of 34
+coefficient(gamma, dx*dy)
+--R 
+--R
+--R            2     3 2       2                                   4 2 5    3
+--R   (31)  (7z sin(x y ) - y z cos(z))cos(tan(x y z) + x y z) - 5x y z  + x y z
+--R                                                     Type: Expression Integer
+--E 31
+
+--S 32 of 34
+coefficient(gamma, one)
+--R 
+--R
+--R   (32)  0
+--R                                                     Type: Expression Integer
+--E 32
+
+--S 33 of 34
+coefficient(g1,one)
+--R 
+--R
+--R   (33)  a(x,t,y,u,v,z,e)
+--R                                                     Type: Expression Integer
+--E 33
+
+--S 34 of 34
+gamma := alpha * beta
+--R 
+--R
+--R   (34)
+--R        4   2    2               3   2
+--R     (2x y z  - x y z)dy dz + (2x y z  - x y z)cos(tan(x y z) + x y z)dx dz
+--R   + 
+--R       2     3 2       2                                   4 2 5    3
+--R   ((7z sin(x y ) - y z cos(z))cos(tan(x y z) + x y z) - 5x y z  + x y z)dx dy
+--R                                         Type: DeRhamComplex(Integer,[x,y,z])
+--E 34
+)spool
+)lisp (bye)
+@
+<<DeRhamComplex.help>>=
+====================================================================
+DeRhamComplex examples
+====================================================================
+
+The domain constructor DeRhamComplex creates the class of differential
+forms of arbitrary degree over a coefficient ring.  The De Rham
+complex constructor takes two arguments: a ring, coefRing, and a list
+of coordinate variables.
+
+This is the ring of coefficients.
+
+  coefRing := Integer
+   Integer
+                      Type: Domain
+
+These are the coordinate variables.
+
+  lv : List Symbol := [x,y,z] 
+   [x,y,z]
+                      Type: List Symbol
+
+
+This is the De Rham complex of Euclidean three-space using coordinates
+x, y and z.
+
+  der := DERHAM(coefRing,lv) 
+   DeRhamComplex(Integer,[x,y,z])
+                      Type: Domain
+
+This complex allows us to describe differential forms having
+expressions of integers as coefficients.  These coefficients can
+involve any number of variables, for example, f(x,t,r,y,u,z).  As
+we've chosen to work with ordinary Euclidean three-space, expressions
+involving these forms are treated as functions of x, y and z with the
+additional arguments t, r and u regarded as symbolic constants.
+
+Here are some examples of coefficients.
+
+  R := Expression coefRing
+   Expression Integer
+                     Type: Domain
+
+  f : R := x**2*y*z-5*x**3*y**2*z**5
+       3 2 5    2
+   - 5x y z  + x y z
+                     Type: Expression Integer
+
+  g : R := z**2*y*cos(z)-7*sin(x**3*y**2)*z**2 
+       2     3 2       2
+   - 7z sin(x y ) + y z cos(z)
+                     Type: Expression Integer
+
+  h : R :=x*y*z-2*x**3*y*z**2 
+       3   2
+   - 2x y z  + x y z
+                     Type: Expression Integer
+
+We now define the multiplicative basis elements for the exterior
+algebra over R.
+
+  dx : der := generator(1)
+   dx
+                     Type: DeRhamComplex(Integer,[x,y,z])
+
+  dy : der := generator(2)
+   dy
+                     Type: DeRhamComplex(Integer,[x,y,z])
+
+  dz : der := generator(3)
+   dz
+                     Type: DeRhamComplex(Integer,[x,y,z])
+
+This is an alternative way to give the above assignments.
+
+  [dx,dy,dz] := [generator(i)$der for i in 1..3]
+    [dx,dy,dz]
+                     Type: List DeRhamComplex(Integer,[x,y,z])
+
+Now we define some one-forms.
+
+  alpha : der := f*dx + g*dy + h*dz
+          3   2                   2     3 2       2
+     (- 2x y z  + x y z)dz + (- 7z sin(x y ) + y z cos(z))dy
+   + 
+          3 2 5    2
+     (- 5x y z  + x y z)dx
+                     Type: DeRhamComplex(Integer,[x,y,z])
+
+  beta  : der := cos(tan(x*y*z)+x*y*z)*dx + x*dy
+    x dy + cos(tan(x y z) + x y z)dx
+                     Type: DeRhamComplex(Integer,[x,y,z])
+
+A well-known theorem states that the composition of exteriorDifferential 
+with itself is the zero map for continuous forms. Let's verify this 
+theorem for alpha.
+
+  exteriorDifferential alpha
+         2                  3 2                    3 2
+     (y z sin(z) + 14z sin(x y ) - 2y z cos(z) - 2x z  + x z)dy dz
+   + 
+         3 2 4     2   2          2
+     (25x y z  - 6x y z  + y z - x y)dx dz
+   + 
+           2 2 2     3 2       3   5    2
+     (- 21x y z cos(x y ) + 10x y z  - x z)dx dy
+                      Type: DeRhamComplex(Integer,[x,y,z])
+
+We see a lengthy output of the last expression, but nevertheless, the
+composition is zero.
+
+  exteriorDifferential %
+    0
+                      Type: DeRhamComplex(Integer,[x,y,z])
+
+Now we check that exteriorDifferential is a "graded derivation" D,
+that is, D satisfies:
+
+  D(a*b) = D(a)*b + (-1)**degree(a)*a*D(b)
+
+  gamma := alpha * beta
+        4   2    2               3   2
+     (2x y z  - x y z)dy dz + (2x y z  - x y z)cos(tan(x y z) + x y z)dx dz
+   + 
+       2     3 2       2                                   4 2 5    3
+   ((7z sin(x y ) - y z cos(z))cos(tan(x y z) + x y z) - 5x y z  + x y z)dx dy
+                      Type: DeRhamComplex(Integer,[x,y,z])
+
+We try this for the one-forms alpha and beta.
+
+  exteriorDifferential(gamma) - (exteriorDifferential(alpha)*beta - alpha * exteriorDifferential(beta)) 
+    0
+                      Type: DeRhamComplex(Integer,[x,y,z])
+
+Now we define some "basic operators"
+
+  a : BOP := operator('a)
+    a
+                      Type: BasicOperator
+
+  b : BOP := operator('b)
+    b
+                      Type: BasicOperator
+
+  c : BOP := operator('c)
+    c
+                      Type: BasicOperator
+
+We also define some indeterminate one- and two-forms using these
+operators.
+
+  sigma := a(x,y,z) * dx + b(x,y,z) * dy + c(x,y,z) * dz 
+    c(x,y,z)dz + b(x,y,z)dy + a(x,y,z)dx
+                      Type: DeRhamComplex(Integer,[x,y,z])
+
+  theta  := a(x,y,z) * dx * dy + b(x,y,z) * dx * dz + c(x,y,z) * dy * dz 
+    c(x,y,z)dy dz + b(x,y,z)dx dz + a(x,y,z)dx dy
+                      Type: DeRhamComplex(Integer,[x,y,z])
+
+This allows us to get formal definitions for the "gradient" ...
+
+  totalDifferential(a(x,y,z))$der 
+   (23)  a  (x,y,z)dz + a  (x,y,z)dy + a  (x,y,z)dx
+          ,3             ,2             ,1
+                      Type: DeRhamComplex(Integer,[x,y,z])
+the "curl" ...
+
+  exteriorDifferential sigma
+     (c  (x,y,z) - b  (x,y,z))dy dz + (c  (x,y,z) - a  (x,y,z))dx dz
+       ,2           ,3                  ,1           ,3
+   + 
+     (b  (x,y,z) - a  (x,y,z))dx dy
+       ,1           ,2
+                       Type: DeRhamComplex(Integer,[x,y,z])
+
+and the "divergence."
+
+  exteriorDifferential theta
+    (c  (x,y,z) - b  (x,y,z) + a  (x,y,z))dx dy dz
+      ,1           ,2           ,3
+                       Type: DeRhamComplex(Integer,[x,y,z])
+
+Note that the De Rham complex is an algebra with unity.  This element
+1 is the basis for elements for zero-forms, that is, functions in our
+space.
+
+  one : der := 1
+    1
+                       Type: DeRhamComplex(Integer,[x,y,z])
+
+To convert a function to a function lying in the De Rham complex,
+multiply the function by "one."
+
+  g1 : der := a([x,t,y,u,v,z,e]) * one 
+    a(x,t,y,u,v,z,e)
+                       Type: DeRhamComplex(Integer,[x,y,z])
+
+A current limitation of Axiom forces you to write functions with more
+than four arguments using square brackets in this way.
+
+  h1 : der := a([x,y,x,t,x,z,y,r,u,x]) * one 
+    a(x,y,x,t,x,z,y,r,u,x)
+                        Type: DeRhamComplex(Integer,[x,y,z])
+
+Now note how the system keeps track of where your coordinate functions
+are located in expressions.
+
+  exteriorDifferential g1 
+    a  (x,t,y,u,v,z,e)dz + a  (x,t,y,u,v,z,e)dy + a  (x,t,y,u,v,z,e)dx
+     ,6                     ,3                     ,1
+                        Type: DeRhamComplex(Integer,[x,y,z])
+
+  exteriorDifferential h1
+     a  (x,y,x,t,x,z,y,r,u,x)dz
+      ,6
+   + 
+     (a  (x,y,x,t,x,z,y,r,u,x) + a  (x,y,x,t,x,z,y,r,u,x))dy
+       ,7                         ,2
+   + 
+         a   (x,y,x,t,x,z,y,r,u,x) + a  (x,y,x,t,x,z,y,r,u,x)
+          ,10                         ,5
+       + 
+         a  (x,y,x,t,x,z,y,r,u,x) + a  (x,y,x,t,x,z,y,r,u,x)
+          ,3                         ,1
+    *
+       dx
+                       Type: DeRhamComplex(Integer,[x,y,z])
+
+In this example of Euclidean three-space, the basis for the De Rham complex
+consists of the eight forms: 1, dx, dy, dz, dx*dy, dx*dz, dy*dz, and dx*dy*dz.
+
+  coefficient(gamma, dx*dy)
+       2     3 2       2                                   4 2 5    3
+    (7z sin(x y ) - y z cos(z))cos(tan(x y z) + x y z) - 5x y z  + x y z
+                       Type: Expression Integer
+
+  coefficient(gamma, one)
+    0
+                       Type: Expression Integer
+
+  coefficient(g1,one)
+    a(x,t,y,u,v,z,e)
+                       Type: Expression Integer
+
+See Also:
+o )help Operator
+o )show DeRhamComplex
+o $AXIOM/doc/src/algebra/derham.spad.dvi
+
+@
+\pagehead{DeRhamComplex}{DERHAM}
+\pagepic{ps/v103derhamcomplex.ps}{DERHAM}{1.00}
+See also:\\
+\refto{ExtAlgBasis}{EAB}
+\refto{AntiSymm}{ANTISYM}
+<<domain DERHAM DeRhamComplex>>=
+)abbrev domain DERHAM DeRhamComplex
+++ Author: Larry A. Lambe
+++ Date    : 01/26/91.
+++ Revised : 12/01/91.
+++
+++ based on code from '89 (AntiSymmetric)
+++
+++ Needs: LeftAlgebra, ExtAlgBasis, FreeMod(Ring,OrderedSet)
+++
+++ Description: The deRham complex of Euclidean space, that is, the
+++ class of differential forms of arbitary degree over a coefficient ring.
+++ See Flanders, Harley, Differential Forms, With Applications to the Physical
+++ Sciences, New York, Academic Press, 1963.
+ 
+DeRhamComplex(CoefRing,listIndVar:List Symbol): Export == Implement where
+  CoefRing :  Join(Ring, OrderedSet)
+  ASY     ==> AntiSymm(R,listIndVar)
+  DIFRING ==> DifferentialRing
+  LALG    ==> LeftAlgebra
+  FMR     ==> FreeMod(R,EAB)
+  I       ==> Integer
+  L       ==> List
+  EAB     ==> ExtAlgBasis  -- these are exponents of basis elements in order
+  NNI     ==> NonNegativeInteger
+  O       ==> OutputForm
+  R       ==> Expression(CoefRing)
+ 
+  Export == Join(LALG(R), RetractableTo(R)) with
+      leadingCoefficient : %           -> R
+	++ leadingCoefficient(df) returns the leading
+	++ coefficient of differential form df.
+      leadingBasisTerm   : %           -> %
+	++ leadingBasisTerm(df) returns the leading
+	++ basis term of differential form df.
+      reductum           : %           -> %
+	++ reductum(df), where df is a differential form, 
+        ++ returns df minus the leading
+	++ term of df if df has two or more terms, and
+	++ 0 otherwise.
+      coefficient        : (%,%)     -> R 
+	++ coefficient(df,u), where df is a differential form,
+        ++ returns the coefficient of df containing the basis term u
+        ++ if such a term exists, and 0 otherwise.
+      generator          : NNI         -> %
+	++ generator(n) returns the nth basis term for a differential form.
+      homogeneous?       : %           -> Boolean
+	++  homogeneous?(df) tests if all of the terms of 
+	++  differential form df have the same degree.
+      retractable?       : %           -> Boolean
+	++  retractable?(df) tests if differential form df is a 0-form,
+	++  i.e., if degree(df) = 0.
+      degree             : %           -> I
+	++  degree(df) returns the homogeneous degree of differential form df.
+      map                : (R -> R, %) -> %
+	++  map(f,df) replaces each coefficient x of differential 
+        ++  form df by \spad{f(x)}.
+      totalDifferential    : R -> %
+	++  totalDifferential(x) returns the total differential 
+	++  (gradient) form for element x.
+      exteriorDifferential : % -> %
+	++  exteriorDifferential(df) returns the exterior 
+	++  derivative (gradient, curl, divergence, ...) of
+	++  the differential form df.
+
+  Implement == ASY add
+      Rep := ASY 
+
+      dim := #listIndVar
+
+      totalDifferential(f) ==
+        divs:=[differentiate(f,listIndVar.i)*generator(i)$ASY for i in 1..dim]
+        reduce("+",divs)
+
+      termDiff : (R, %) -> %
+      termDiff(r,e) ==
+        totalDifferential(r) * e
+
+      exteriorDifferential(x) ==
+        x = 0 => 0
+        termDiff(leadingCoefficient(x)$Rep,leadingBasisTerm x) + exteriorDifferential(reductum x)
+
+      lv := [concat("d",string(liv))$String::Symbol for liv in listIndVar]
+
+      displayList:EAB -> O
+      displayList(x):O ==
+        le: L I := exponents(x)$EAB
+--      reduce(_*,[(lv.i)::O for i in 1..dim | le.i = 1])$L(O)
+--        reduce(_*,[(lv.i)::O for i in 1..dim | one?(le.i)])$L(O)
+        reduce(_*,[(lv.i)::O for i in 1..dim | ((le.i) = 1)])$L(O)
+
+      makeTerm:(R,EAB) -> O
+      makeTerm(r,x) ==
+      -- we know that r ^= 0
+        x = Nul(dim)$EAB  => r::O
+--        one? r => displayList(x)
+        (r = 1) => displayList(x)
+--      r = 1 => displayList(x)
+        r::O * displayList(x)
+
+      terms : % -> List Record(k: EAB, c: R)
+      terms(a) ==
+        -- it is the case that there are at least two terms in a
+        a pretend List Record(k: EAB, c: R)
+        
+      coerce(a):O ==
+        a           = 0$Rep => 0$I::O
+        ta := terms a
+--      reductum(a) = 0$Rep => makeTerm(leadingCoefficient a, a.first.k)
+        null ta.rest => makeTerm(ta.first.c, ta.first.k)
+        reduce(_+,[makeTerm(t.c,t.k) for t in ta])$L(O)
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain DSMP DifferentialSparseMultivariatePolynomial}
+\pagehead{DifferentialSparseMultivariatePolynomial}{DSMP}
+\pagepic{ps/v103differentialsparsemultivariatepolynomial.ps}{DSMP}{1.00}
+See also:\\
+\refto{OrderlyDifferentialVariable}{ODVAR}
+\refto{SequentialDifferentialVariable}{SDVAR}
+\refto{OrderlyDifferentialPolynomial}{ODPOL}
+\refto{SequentialDifferentialPolynomial}{SDPOL}
+<<domain DSMP DifferentialSparseMultivariatePolynomial>>=
+)abbrev domain DSMP DifferentialSparseMultivariatePolynomial
+++ Author:  William Sit
+++ Date Created: 19 July 1990
+++ Date Last Updated: 13 September 1991
+++ Basic Operations:DifferentialPolynomialCategory
+++ Related Constructors:
+++ See Also:
+++ AMS Classifications:12H05
+++ Keywords: differential indeterminates, ranking, differential polynomials,
+++           order, weight, leader, separant, initial, isobaric
+++ References:Kolchin, E.R. "Differential Algebra and Algebraic Groups"
+++   (Academic Press, 1973).
+++ Description:
+++   \spadtype{DifferentialSparseMultivariatePolynomial} implements
+++   an ordinary differential polynomial ring by combining a
+++   domain belonging to the category \spadtype{DifferentialVariableCategory}
+++   with the domain \spadtype{SparseMultivariatePolynomial}.
+++
+
+DifferentialSparseMultivariatePolynomial(R, S, V):
+     Exports == Implementation where
+  R: Ring
+  S: OrderedSet
+  V: DifferentialVariableCategory S
+  E   ==> IndexedExponents(V)
+  PC  ==> PolynomialCategory(R,IndexedExponents(V),V)
+  PCL ==> PolynomialCategoryLifting
+  P   ==> SparseMultivariatePolynomial(R, V)
+  SUP ==> SparseUnivariatePolynomial
+  SMP ==> SparseMultivariatePolynomial(R, S)
+
+  Exports ==> Join(DifferentialPolynomialCategory(R,S,V,E),
+                   RetractableTo SMP)
+
+  Implementation ==> P add
+    retractIfCan(p:$):Union(SMP, "failed") ==
+      zero? order p =>
+        map(retract(#1)@S :: SMP, #1::SMP, p)$PCL(
+                                  IndexedExponents V, V, R, $, SMP)
+      "failed"
+
+    coerce(p:SMP):$ ==
+      map(#1::V::$, #1::$, p)$PCL(IndexedExponents S, S, R, SMP, $)
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain DROPT DrawOption}
+\pagehead{DrawOption}{DROPT}
+\pagepic{ps/v103drawoption.ps}{DROPT}{1.00}
+<<domain DROPT DrawOption>>=
+)abbrev domain DROPT DrawOption
+++ Author: Stephen Watt
+++ Date Created: 1 March 1990
+++ Date Last Updated: 31 Oct 1990, Jim Wen
+++ Basic Operations: adaptive, clip, title, style, toScale, coordinates,
+++ pointColor, curveColor, colorFunction, tubeRadius, range, ranges,
+++ var1Steps, var2Steps, tubePoints, unit
+++ Related Constructors:
+++ Also See:
+++ AMS Classifications:
+++ Keywords:
+++ References:
+++ Description: DrawOption allows the user to specify defaults for the 
+++ creation and rendering of plots.
+
+DrawOption(): Exports == Implementation where 
+ RANGE ==> List Segment Float
+ UNIT  ==> List Float
+ PAL   ==> Palette
+ POINT ==> Point(DoubleFloat)
+ SEG   ==> Segment Float
+ SF     ==> DoubleFloat
+ SPACE3 ==> ThreeSpace(DoubleFloat)
+ VIEWPT ==> Record(theta:SF, phi:SF, scale:SF, scaleX:SF, scaleY:SF, scaleZ:SF, deltaX:SF, deltaY:SF )
+
+ Exports ==> SetCategory with
+  adaptive : Boolean -> %
+    ++ adaptive(b) turns adaptive 2D plotting on if b is true, or off if b is
+    ++ false. This option is expressed in the form \spad{adaptive == b}.
+  clip : Boolean -> %
+    ++ clip(b) turns 2D clipping on if b is true, or off if b is false. 
+    ++ This option is expressed in the form \spad{clip == b}.
+  viewpoint : VIEWPT -> %
+    ++ viewpoint(vp) creates a viewpoint data structure corresponding to the 
+    ++ list of values. The values are interpreted as [theta, phi, scale, 
+    ++ scaleX, scaleY, scaleZ, deltaX, deltaY].  This option is expressed 
+    ++ in the form \spad{viewpoint == ls}.
+  title  : String -> %
+    ++ title(s) specifies a title for a plot by the indicated string s. 
+    ++ This option is expressed in the form \spad{title == s}.
+  style  : String -> %
+    ++ style(s) specifies the drawing style in which the graph will be plotted
+    ++ by the indicated string s. This option is expressed in the 
+    ++ form \spad{style == s}.
+  toScale : Boolean -> %
+    ++ toScale(b) specifies whether or not a plot is to be drawn to scale;
+    ++ if b is true it is drawn to scale, if b is false it is not. This option
+    ++ is expressed in the form \spad{toScale == b}.
+  clip : List SEG -> %
+    ++ clip([l]) provides ranges for user-defined clipping as specified
+    ++ in the list l. This option is expressed in the form \spad{clip == [l]}.
+  coordinates : (POINT -> POINT) -> % 
+    ++ coordinates(p) specifies a change of coordinate systems of point p. 
+    ++ This option is expressed in the form \spad{coordinates == p}.
+  pointColor : Float -> %
+    ++ pointColor(v) specifies a color, v, for 2D graph points. This option
+    ++ is expressed in the form \spad{pointColor == v}.
+  pointColor : PAL -> %
+    ++ pointColor(p) specifies a color index for 2D graph points from the 
+    ++ spadcolors palette p. This option is expressed in the 
+    ++ form \spad{pointColor == p}.
+  curveColor : Float -> %
+    ++ curveColor(v) specifies a color, v, for 2D graph curves. 
+    ++ This option is expressed in the form \spad{curveColor == v}.
+  curveColor : PAL -> %
+    ++ curveColor(p) specifies a color index for 2D graph curves from the 
+    ++ spadcolors palette p. 
+    ++ This option is expressed in the form \spad{curveColor ==p}.
+  colorFunction : (SF -> SF) -> %
+    ++ colorFunction(f(z)) specifies the color based upon the z-component of 
+    ++ three dimensional plots. This option is expressed in the 
+    ++ form \spad{colorFunction == f(z)}.
+  colorFunction : ((SF,SF) -> SF) -> %
+    ++ colorFunction(f(u,v)) specifies the color for three dimensional plots
+    ++ as a function based upon the two parametric variables. This option 
+    ++ is expressed in the form \spad{colorFunction == f(u,v)}.
+  colorFunction : ((SF,SF,SF) -> SF) -> %
+    ++ colorFunction(f(x,y,z)) specifies the color for three dimensional 
+    ++ plots as a function of x, y, and z coordinates. This option is 
+    ++ expressed in the form \spad{colorFunction == f(x,y,z)}.
+  tubeRadius : Float -> %
+    ++ tubeRadius(r) specifies a radius, r, for a tube plot around a 3D curve;
+    ++ is expressed in the form \spad{tubeRadius == 4}.
+  range : List SEG -> %
+    ++ range([l]) provides a user-specified range l. 
+    ++ This option is expressed in the form \spad{range == [l]}.
+  range : List Segment Fraction Integer -> %
+    ++ range([i]) provides a user-specified range i.
+    ++ This option is expressed in the form \spad{range == [i]}.
+  ranges : RANGE -> %
+    ++ ranges(l) provides a list of user-specified ranges l. 
+    ++ This option is expressed in the form \spad{ranges == l}.
+  space : SPACE3 -> %
+    ++ space specifies the space into which we will draw.  If none is given
+    ++ then a new space is created.
+  var1Steps : PositiveInteger -> %
+    ++ var1Steps(n) indicates the number of subdivisions, n, of the first 
+    ++ range variable. This option is expressed in the 
+    ++ form \spad{var1Steps == n}.
+  var2Steps : PositiveInteger -> %
+    ++ var2Steps(n) indicates the number of subdivisions, n,  of the second 
+    ++ range variable. This option is expressed in the 
+    ++ form \spad{var2Steps == n}.
+  tubePoints : PositiveInteger -> %
+    ++ tubePoints(n) specifies the number of points, n, defining the circle
+    ++ which creates the tube around a 3D curve, the default is 6. 
+    ++ This option is expressed in the form \spad{tubePoints == n}.
+  coord : (POINT->POINT) -> %
+    ++ coord(p) specifies a change of coordinates of point p. 
+    ++ This option is expressed in the form \spad{coord == p}.
+  unit   : UNIT -> %
+    ++ unit(lf) will mark off the units according to the indicated list lf.
+    ++ This option is expressed in the form \spad{unit == [f1,f2]}.
+  option : (List %, Symbol) -> Union(Any, "failed")
+    ++ option() is not to be used at the top level; 
+    ++ option determines internally which drawing options are indicated in 
+    ++ a draw command.
+  option?: (List %, Symbol) -> Boolean
+    ++ option?() is not to be used at the top level;
+    ++ option? internally returns true for drawing options which are 
+    ++ indicated in a draw command, or false for those which are not.
+ Implementation ==> add
+  import AnyFunctions1(String)
+  import AnyFunctions1(Segment Float)
+  import AnyFunctions1(VIEWPT)
+  import AnyFunctions1(List Segment Float)
+  import AnyFunctions1(List Segment Fraction Integer)
+  import AnyFunctions1(List Integer)
+  import AnyFunctions1(PositiveInteger)
+  import AnyFunctions1(Boolean)
+  import AnyFunctions1(RANGE)
+  import AnyFunctions1(UNIT)
+  import AnyFunctions1(Float)
+  import AnyFunctions1(POINT -> POINT)
+  import AnyFunctions1(SF -> SF)
+  import AnyFunctions1((SF,SF) -> SF)
+  import AnyFunctions1((SF,SF,SF) -> SF)
+  import AnyFunctions1(POINT)
+  import AnyFunctions1(PAL)
+  import AnyFunctions1(SPACE3)
+
+  Rep := Record(keyword:Symbol, value:Any)
+
+  length:List SEG -> NonNegativeInteger
+  -- these lists will become tuples in a later version
+  length tup == # tup
+
+  lengthR:List Segment Fraction Integer -> NonNegativeInteger
+  -- these lists will become tuples in a later version
+  lengthR tup == # tup
+
+  lengthI:List Integer -> NonNegativeInteger
+  -- these lists will become tuples in a later version
+  lengthI tup == # tup
+
+  viewpoint vp == 
+    ["viewpoint"::Symbol, vp::Any]
+
+  title s == ["title"::Symbol, s::Any]
+  style s == ["style"::Symbol, s::Any]
+  toScale b == ["toScale"::Symbol, b::Any]
+  clip(b:Boolean) == ["clipBoolean"::Symbol, b::Any]
+  adaptive b == ["adaptive"::Symbol, b::Any]
+
+  pointColor(x:Float) == ["pointColorFloat"::Symbol, x::Any]
+  pointColor(c:PAL) == ["pointColorPalette"::Symbol, c::Any]
+  curveColor(x:Float) == ["curveColorFloat"::Symbol, x::Any]
+  curveColor(c:PAL) == ["curveColorPalette"::Symbol, c::Any]
+  colorFunction(f:SF -> SF) == ["colorFunction1"::Symbol, f::Any]
+  colorFunction(f:(SF,SF) -> SF) == ["colorFunction2"::Symbol, f::Any]
+  colorFunction(f:(SF,SF,SF) -> SF) == ["colorFunction3"::Symbol, f::Any]
+  clip(tup:List SEG) == 
+    length tup > 3 =>
+      error "clip: at most 3 segments may be specified"
+    ["clipSegment"::Symbol, tup::Any]
+  coordinates f == ["coordinates"::Symbol, f::Any]
+  tubeRadius x == ["tubeRadius"::Symbol, x::Any]
+  range(tup:List Segment Float) == 
+    ((n := length tup) > 3) =>
+      error "range: at most 3 segments may be specified"
+    n < 2 =>
+      error "range: at least 2 segments may be specified"
+    ["rangeFloat"::Symbol, tup::Any]
+  range(tup:List Segment Fraction Integer) == 
+    ((n := lengthR tup) > 3) =>
+      error "range: at most 3 segments may be specified"
+    n < 2 =>
+      error "range: at least 2 segments may be specified"
+    ["rangeRat"::Symbol, tup::Any]
+
+  ranges s               == ["ranges"::Symbol, s::Any]
+  space s                == ["space"::Symbol, s::Any]
+  var1Steps s            == ["var1Steps"::Symbol, s::Any]
+  var2Steps s            == ["var2Steps"::Symbol, s::Any]
+  tubePoints s           == ["tubePoints"::Symbol, s::Any]
+  coord s                == ["coord"::Symbol, s::Any]
+  unit s                 == ["unit"::Symbol, s::Any]
+  coerce(x:%):OutputForm == x.keyword::OutputForm = x.value::OutputForm
+  x:% = y:%              == x.keyword = y.keyword and x.value = y.value
+
+  option?(l, s) ==
+    for x in l repeat
+      x.keyword = s => return true
+    false
+
+  option(l, s) ==
+    for x in l repeat
+      x.keyword = s => return(x.value)
+    "failed"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain D01AJFA d01ajfAnnaType}
+\pagehead{d01ajfAnnaType}{D01AJFA}
+\pagepic{ps/v103d01ajfannatype.ps}{D01AJFA}{1.00}
+<<domain D01AJFA d01ajfAnnaType>>=
+)abbrev domain D01AJFA d01ajfAnnaType
+++ Author: Brian Dupee
+++ Date Created: March 1994
+++ Date Last Updated: December 1997
+++ Basic Operations: measure, numericalIntegration
+++ Related Constructors: Result, RoutinesTable
+++ Description:
+++ \axiomType{d01ajfAnnaType} is a domain of 
+++ \axiomType{NumericalIntegrationCategory}
+++ for the NAG routine D01AJF, a general numerical integration routine which
+++ can handle some singularities in the input function.  The function
+++ \axiomFun{measure} measures the usefulness of the routine D01AJF
+++ for the given problem.  The function \axiomFun{numericalIntegration}
+++ performs the integration by using \axiomType{NagIntegrationPackage}.
+
+d01ajfAnnaType(): NumericalIntegrationCategory == Result add
+  EF2	==> ExpressionFunctions2
+  EDF	==> Expression DoubleFloat
+  LDF	==> List DoubleFloat
+  SDF	==> Stream DoubleFloat
+  DF	==> DoubleFloat
+  FI	==> Fraction Integer
+  EFI	==> Expression Fraction Integer
+  SOCDF	==> Segment OrderedCompletion DoubleFloat
+  NIA	==> Record(var:Symbol,fn:EDF,range:SOCDF,abserr:DF,relerr:DF)
+  MDNIA	==> Record(fn:EDF,range:List SOCDF,abserr:DF,relerr:DF)
+  INT	==> Integer
+  BOP	==> BasicOperator
+  S	==> Symbol
+  ST	==> String
+  LST	==> List String
+  RT	==> RoutinesTable
+  Rep:=Result
+  import Rep, NagIntegrationPackage, d01AgentsPackage
+
+  measure(R:RT,args:NIA) ==
+    ext:Result := empty()$Result
+    pp:SDF := singularitiesOf(args)
+    not (empty?(pp)$SDF) =>
+      [0.1,"d01ajf: There is a possible problem at the following point(s): "
+           commaSeparate(sdf2lst(pp)) ,ext]
+    [getMeasure(R,d01ajf :: S)$RT,
+       "The general routine d01ajf is our default",ext]
+
+  numericalIntegration(args:NIA,hints:Result) ==
+    ArgsFn := map(convert(#1)$DF,args.fn)$EF2(DF,Float)
+    b:Float := getButtonValue("d01ajf","functionEvaluations")$AttributeButtons
+    fEvals:INT := wholePart exp(1.1513*(1.0/(2.0*(1.0-b))))
+    iw:INT := 75*fEvals
+    f : Union(fn:FileName,fp:Asp1(F)) := [retract(ArgsFn)$Asp1(F)]
+    d01ajf(getlo(args.range),gethi(args.range),args.abserr,_
+           args.relerr,4*iw,iw,-1,f)
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain D01AKFA d01akfAnnaType}
+\pagehead{d01akfAnnaType}{D01AKFA}
+\pagepic{ps/v103d01akfannatype.ps}{D01AKFA}{1.00}
+<<domain D01AKFA d01akfAnnaType>>=
+)abbrev domain D01AKFA d01akfAnnaType
+++ Author: Brian Dupee
+++ Date Created: March 1994
+++ Date Last Updated: December 1997
+++ Basic Operations: measure, numericalIntegration
+++ Related Constructors: Result, RoutinesTable
+++ Description:
+++ \axiomType{d01akfAnnaType} is a domain of
+++ \axiomType{NumericalIntegrationCategory}
+++ for the NAG routine D01AKF, a numerical integration routine which is
+++ is suitable for oscillating, non-singular functions.  The function
+++ \axiomFun{measure} measures the usefulness of the routine D01AKF
+++ for the given problem.  The function \axiomFun{numericalIntegration}
+++ performs the integration by using \axiomType{NagIntegrationPackage}.
+
+d01akfAnnaType(): NumericalIntegrationCategory == Result add
+  EF2	==> ExpressionFunctions2
+  EDF	==> Expression DoubleFloat
+  LDF	==> List DoubleFloat
+  SDF	==> Stream DoubleFloat
+  DF	==> DoubleFloat
+  FI	==> Fraction Integer
+  EFI	==> Expression Fraction Integer
+  SOCDF	==> Segment OrderedCompletion DoubleFloat
+  NIA	==> Record(var:Symbol,fn:EDF,range:SOCDF,abserr:DF,relerr:DF)
+  MDNIA	==> Record(fn:EDF,range:List SOCDF,abserr:DF,relerr:DF)
+  INT	==> Integer
+  BOP	==> BasicOperator
+  S	==> Symbol
+  ST	==> String
+  LST	==> List String
+  RT	==> RoutinesTable
+  Rep:=Result
+  import Rep, d01AgentsPackage, NagIntegrationPackage
+
+  measure(R:RT,args:NIA) ==
+    ext:Result := empty()$Result
+    pp:SDF := singularitiesOf(args)
+    not (empty?(pp)$SDF) =>
+      [0.0,"d01akf: There is a possible problem at the following point(s): "
+              commaSeparate(sdf2lst(pp)) ,ext]
+    o:Float := functionIsOscillatory(args)
+    one := 1.0
+    m:Float := (getMeasure(R,d01akf@S)$RT)*(one-one/(one+sqrt(o)))**2
+    m > 0.8 => [m,"d01akf: The expression shows much oscillation",ext]
+    m > 0.6 => [m,"d01akf: The expression shows some oscillation",ext]
+    m > 0.5 => [m,"d01akf: The expression shows little oscillation",ext]
+    [m,"d01akf: The expression shows little or no oscillation",ext]
+
+  numericalIntegration(args:NIA,hints:Result) ==
+    ArgsFn := map(convert(#1)$DF,args.fn)$EF2(DF,Float)
+    b:Float := getButtonValue("d01akf","functionEvaluations")$AttributeButtons
+    fEvals:INT := wholePart exp(1.1513*(1.0/(2.0*(1.0-b))))
+    iw:INT := 75*fEvals
+    f : Union(fn:FileName,fp:Asp1(F)) := [retract(ArgsFn)$Asp1(F)]
+    d01akf(getlo(args.range),gethi(args.range),args.abserr,_
+           args.relerr,4*iw,iw,-1,f)
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain D01ALFA d01alfAnnaType}
+\pagehead{d01alfAnnaType}{D01ALFA}
+\pagepic{ps/v103d01alfannatype.ps}{D01ALFA}{1.00}
+<<domain D01ALFA d01alfAnnaType>>=
+)abbrev domain D01ALFA d01alfAnnaType
+++ Author: Brian Dupee
+++ Date Created: March 1994
+++ Date Last Updated: December 1997
+++ Basic Operations: measure, numericalIntegration
+++ Related Constructors: Result, RoutinesTable
+++ Description:
+++ \axiomType{d01alfAnnaType} is a domain of
+++ \axiomType{NumericalIntegrationCategory}
+++ for the NAG routine D01ALF, a general numerical integration routine which
+++ can handle a list of singularities.  The 
+++ function \axiomFun{measure} measures the usefulness of the routine D01ALF
+++ for the given problem.  The function \axiomFun{numericalIntegration}
+++ performs the integration by using \axiomType{NagIntegrationPackage}.
+
+d01alfAnnaType(): NumericalIntegrationCategory == Result add
+  EF2	==> ExpressionFunctions2
+  EDF	==> Expression DoubleFloat
+  LDF	==> List DoubleFloat
+  SDF	==> Stream DoubleFloat
+  DF	==> DoubleFloat
+  FI	==> Fraction Integer
+  EFI	==> Expression Fraction Integer
+  SOCDF	==> Segment OrderedCompletion DoubleFloat
+  NIA	==> Record(var:Symbol,fn:EDF,range:SOCDF,abserr:DF,relerr:DF)
+  MDNIA	==> Record(fn:EDF,range:List SOCDF,abserr:DF,relerr:DF)
+  INT	==> Integer
+  BOP	==> BasicOperator
+  S	==> Symbol
+  ST	==> String
+  LST	==> List String
+  RT	==> RoutinesTable
+  Rep:=Result
+  import Rep, d01AgentsPackage, NagIntegrationPackage
+
+  measure(R:RT,args:NIA) ==
+    ext:Result := empty()$Result
+    streamOfZeros:SDF := singularitiesOf(args)
+    listOfZeros:LST := removeDuplicates!(sdf2lst(streamOfZeros))
+    numberOfZeros:INT := # listOfZeros
+    (numberOfZeros > 15)@Boolean => 
+      [0.0,"d01alf: The list of singularities is too long", ext]
+    positive?(numberOfZeros) =>
+      l:LDF := entries(complete(streamOfZeros)$SDF)$SDF
+      lany:Any := coerce(l)$AnyFunctions1(LDF)
+      ex:Record(key:S,entry:Any) := [d01alfextra@S,lany]
+      ext := insert!(ex,ext)$Result
+      st:ST := "Recommended is d01alf with the singularities "
+                     commaSeparate(listOfZeros)
+      m := 
+--        one?(numberOfZeros) => 0.4
+        (numberOfZeros = 1) => 0.4
+        getMeasure(R,d01alf@S)$RT
+      [m, st, ext]
+    [0.0, "d01alf: A list of suitable singularities has not been found", ext]
+
+  numericalIntegration(args:NIA,hints:Result) ==
+    la:Any := coerce(search((d01alfextra@S),hints)$Result)@Any
+    listOfZeros:LDF := retract(la)$AnyFunctions1(LDF)
+    l:= removeDuplicates(listOfZeros)$LDF
+    n:Integer := (#(l))$List(DF)
+    M:Matrix DF := matrix([l])$(Matrix DF)
+    b:Float := getButtonValue("d01alf","functionEvaluations")$AttributeButtons
+    fEvals:INT := wholePart exp(1.1513*(1.0/(2.0*(1.0-b))))
+    iw:INT := 75*fEvals
+    ArgsFn := map(convert(#1)$DF,args.fn)$EF2(DF,Float)
+    f : Union(fn:FileName,fp:Asp1(F)) := [retract(ArgsFn)$Asp1(F)]
+    d01alf(getlo(args.range),gethi(args.range),n,M,_
+           args.abserr,args.relerr,2*n*iw,n*iw,-1,f)
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain D01AMFA d01amfAnnaType}
+\pagehead{d01amfAnnaType}{D01AMFA}
+\pagepic{ps/v103d01amfannatype.ps}{D01AMFA}{1.00}
+<<domain D01AMFA d01amfAnnaType>>=
+)abbrev domain D01AMFA d01amfAnnaType
+++ Author: Brian Dupee
+++ Date Created: March 1994
+++ Date Last Updated: December 1997
+++ Basic Operations: measure, numericalIntegration
+++ Related Constructors: Result, RoutinesTable
+++ Description:
+++ \axiomType{d01amfAnnaType} is a domain of
+++ \axiomType{NumericalIntegrationCategory}
+++ for the NAG routine D01AMF, a general numerical integration routine which
+++ can handle infinite or semi-infinite range of the input function.  The 
+++ function \axiomFun{measure} measures the usefulness of the routine D01AMF
+++ for the given problem.  The function \axiomFun{numericalIntegration}
+++ performs the integration by using \axiomType{NagIntegrationPackage}.
+
+d01amfAnnaType(): NumericalIntegrationCategory == Result add
+  EF2	==> ExpressionFunctions2
+  EDF	==> Expression DoubleFloat
+  LDF	==> List DoubleFloat
+  SDF	==> Stream DoubleFloat
+  DF	==> DoubleFloat
+  FI	==> Fraction Integer
+  EFI	==> Expression Fraction Integer
+  SOCDF	==> Segment OrderedCompletion DoubleFloat
+  NIA	==> Record(var:Symbol,fn:EDF,range:SOCDF,abserr:DF,relerr:DF)
+  MDNIA	==> Record(fn:EDF,range:List SOCDF,abserr:DF,relerr:DF)
+  INT	==> Integer
+  BOP	==> BasicOperator
+  S	==> Symbol
+  ST	==> String
+  LST	==> List String
+  RT	==> RoutinesTable
+  Rep:=Result
+  import Rep, d01AgentsPackage, NagIntegrationPackage
+
+  measure(R:RT,args:NIA) ==
+    ext:Result := empty()$Result
+    Range:=rangeIsFinite(args)
+    pp:SDF := singularitiesOf(args)
+    not (empty?(pp)$SDF) =>
+      [0.0,"d01amf: There is a possible problem at the following point(s): "
+                     commaSeparate(sdf2lst(pp)), ext]
+    [getMeasure(R,d01amf@S)$RT, "d01amf is a reasonable choice if the "
+         "integral is infinite or semi-infinite and d01transform cannot "
+           "do better than using general routines",ext]
+
+  numericalIntegration(args:NIA,hints:Result) ==
+    r:INT
+    bound:DF
+    ArgsFn := map(convert(#1)$DF,args.fn)$EF2(DF,Float)
+    b:Float := getButtonValue("d01amf","functionEvaluations")$AttributeButtons
+    fEvals:INT := wholePart exp(1.1513*(1.0/(2.0*(1.0-b))))
+    iw:INT := 150*fEvals
+    f : Union(fn:FileName,fp:Asp1(F)) := [retract(ArgsFn)$Asp1(F)]
+    Range:=rangeIsFinite(args)
+    if (Range case upperInfinite) then
+      bound := getlo(args.range)
+      r := 1
+    else if (Range case lowerInfinite) then
+      bound := gethi(args.range)
+      r := -1
+    else 
+      bound := 0$DF
+      r := 2
+    d01amf(bound,r,args.abserr,args.relerr,4*iw,iw,-1,f)
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain D01ANFA d01anfAnnaType}
+\pagehead{d01anfAnnaType}{D01ANFA}
+\pagepic{ps/v103d01anfannatype.ps}{D01ANFA}{1.00}
+<<domain D01ANFA d01anfAnnaType>>=
+)abbrev domain D01ANFA d01anfAnnaType
+++ Author: Brian Dupee
+++ Date Created: March 1994
+++ Date Last Updated: December 1997
+++ Basic Operations: measure, numericalIntegration
+++ Related Constructors: Result, RoutinesTable
+++ Description:
+++ \axiomType{d01anfAnnaType} is a domain of
+++ \axiomType{NumericalIntegrationCategory}
+++ for the NAG routine D01ANF, a numerical integration routine which can
+++ handle weight functions of the form cos(\omega x) or sin(\omega x).  The 
+++ function \axiomFun{measure} measures the usefulness of the routine D01ANF
+++ for the given problem.  The function \axiomFun{numericalIntegration}
+++ performs the integration by using \axiomType{NagIntegrationPackage}.
+
+d01anfAnnaType(): NumericalIntegrationCategory == Result add
+  EF2	==> ExpressionFunctions2
+  EDF	==> Expression DoubleFloat
+  LDF	==> List DoubleFloat
+  SDF	==> Stream DoubleFloat
+  DF	==> DoubleFloat
+  FI	==> Fraction Integer
+  EFI	==> Expression Fraction Integer
+  SOCDF	==> Segment OrderedCompletion DoubleFloat
+  NIA	==> Record(var:Symbol,fn:EDF,range:SOCDF,abserr:DF,relerr:DF)
+  MDNIA	==> Record(fn:EDF,range:List SOCDF,abserr:DF,relerr:DF)
+  INT	==> Integer
+  BOP	==> BasicOperator
+  S	==> Symbol
+  ST	==> String
+  LST	==> List String
+  RT	==> RoutinesTable
+  Rep:=Result
+  import Rep, d01WeightsPackage, d01AgentsPackage, NagIntegrationPackage
+
+  measure(R:RT,args:NIA) ==
+    ext:Result := empty()$Result
+    weight:Union(Record(op:BOP,w:DF),"failed") :=
+      exprHasWeightCosWXorSinWX(args)
+    weight case "failed" => 
+      [0.0,"d01anf: A suitable weight has not been found", ext]
+    weight case Record(op:BOP,w:DF) =>
+      wany := coerce(weight)$AnyFunctions1(Record(op:BOP,w:DF))
+      ex:Record(key:S,entry:Any) := [d01anfextra@S,wany]
+      ext := insert!(ex,ext)$Result
+      ws:ST := string(name(weight.op)$BOP)$S "(" df2st(weight.w)
+                          string(args.var)$S ")"
+      [getMeasure(R,d01anf@S)$RT,
+        "d01anf: The expression has a suitable weight:- " ws, ext]
+    
+  numericalIntegration(args:NIA,hints:Result) ==
+    a:INT
+    r:Any := coerce(search((d01anfextra@S),hints)$Result)@Any
+    rec:Record(op:BOP,w:DF) := retract(r)$AnyFunctions1(Record(op:BOP,w:DF))
+    Var := args.var :: EDF
+    o:BOP := rec.op
+    den:EDF := o((rec.w*Var)$EDF)
+    Argsfn:EDF := args.fn/den
+    if (name(o) = cos@S)@Boolean then a := 1
+    else a := 2
+    b:Float := getButtonValue("d01anf","functionEvaluations")$AttributeButtons
+    fEvals:INT := wholePart exp(1.1513*(1.0/(2.0*(1.0-b))))
+    iw:INT := 75*fEvals
+    ArgsFn := map(convert(#1)$DF,Argsfn)$EF2(DF,Float)
+    f : Union(fn:FileName,fp:Asp1(G)) := [retract(ArgsFn)$Asp1(G)]
+    d01anf(getlo(args.range),gethi(args.range),rec.w,a,_
+           args.abserr,args.relerr,4*iw,iw,-1,f)
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain D01APFA d01apfAnnaType}
+\pagehead{d01apfAnnaType}{D01APFA}
+\pagepic{ps/v103d01apfannatype.ps}{D01APFA}{1.00}
+<<domain D01APFA d01apfAnnaType>>=
+)abbrev domain D01APFA d01apfAnnaType
+++ Author: Brian Dupee
+++ Date Created: March 1994
+++ Date Last Updated: December 1997
+++ Basic Operations: measure, numericalIntegration
+++ Related Constructors: Result, RoutinesTable
+++ Description:
+++ \axiomType{d01apfAnnaType} is a domain of
+++ \axiomType{NumericalIntegrationCategory}
+++ for the NAG routine D01APF, a general numerical integration routine which
+++ can handle end point singularities of the algebraico-logarithmic form
+++ w(x) = (x-a)^c * (b-x)^d.  The 
+++ function \axiomFun{measure} measures the usefulness of the routine D01APF
+++ for the given problem.  The function \axiomFun{numericalIntegration}
+++ performs the integration by using \axiomType{NagIntegrationPackage}.
+
+d01apfAnnaType(): NumericalIntegrationCategory == Result add
+  EF2	==> ExpressionFunctions2
+  EDF	==> Expression DoubleFloat
+  LDF	==> List DoubleFloat
+  SDF	==> Stream DoubleFloat
+  DF	==> DoubleFloat
+  FI	==> Fraction Integer
+  EFI	==> Expression Fraction Integer
+  SOCDF	==> Segment OrderedCompletion DoubleFloat
+  NIA	==> Record(var:Symbol,fn:EDF,range:SOCDF,abserr:DF,relerr:DF)
+  MDNIA	==> Record(fn:EDF,range:List SOCDF,abserr:DF,relerr:DF)
+  INT	==> Integer
+  BOP	==> BasicOperator
+  S	==> Symbol
+  ST	==> String
+  LST	==> List String
+  RT	==> RoutinesTable
+  Rep:=Result
+  import Rep, NagIntegrationPackage, d01AgentsPackage, d01WeightsPackage
+
+  measure(R:RT,args:NIA) ==
+    ext:Result := empty()$Result
+    d := (c := 0$DF)
+    if ((a := exprHasAlgebraicWeight(args)) case LDF) then
+      if  (a.1 > -1) then c := a.1
+      if  (a.2 > -1) then d := a.2
+    l:INT := exprHasLogarithmicWeights(args)
+--    (zero? c) and (zero? d) and (one? l) =>
+    (zero? c) and (zero? d) and (l = 1) =>
+        [0.0,"d01apf: A suitable singularity has not been found", ext]
+    out:LDF := [c,d,l :: DF]
+    outany:Any := coerce(out)$AnyFunctions1(LDF)
+    ex:Record(key:S,entry:Any) := [d01apfextra@S,outany]
+    ext := insert!(ex,ext)$Result
+    st:ST :=  "Recommended is d01apf with c = " df2st(c) ", d = " 
+                            df2st(d) " and l = " string(l)$ST
+    [getMeasure(R,d01apf@S)$RT, st, ext]
+
+  numericalIntegration(args:NIA,hints:Result) ==
+
+    Var:EDF := coerce(args.var)$EDF
+    la:Any := coerce(search((d01apfextra@S),hints)$Result)@Any
+    list:LDF := retract(la)$AnyFunctions1(LDF)
+    Fac1:EDF := (Var - (getlo(args.range) :: EDF))$EDF
+    Fac2:EDF := ((gethi(args.range) :: EDF) - Var)$EDF
+    c := first(list)$LDF
+    d := second(list)$LDF
+    l := (retract(third(list)$LDF)@INT)$DF
+    thebiz:EDF := (Fac1**(c :: EDF))*(Fac2**(d :: EDF))
+    if l > 1 then
+      if l = 2 then
+        thebiz := thebiz*log(Fac1)
+      else if l = 3 then
+        thebiz := thebiz*log(Fac2)
+      else
+        thebiz := thebiz*log(Fac1)*log(Fac2)
+    Fn :=  (args.fn/thebiz)$EDF
+    ArgsFn := map(convert(#1)$DF,Fn)$EF2(DF,Float)
+    b:Float := getButtonValue("d01apf","functionEvaluations")$AttributeButtons
+    fEvals:INT := wholePart exp(1.1513*(1.0/(2.0*(1.0-b))))
+    iw:INT := 75*fEvals
+    f : Union(fn:FileName,fp:Asp1(G)) := [retract(ArgsFn)$Asp1(G)]
+    d01apf(getlo(args.range),gethi(args.range),c,d,l,_
+           args.abserr,args.relerr,4*iw,iw,-1,f)
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain D01AQFA d01aqfAnnaType}
+\pagehead{d01aqfAnnaType}{D01AQFA}
+\pagepic{ps/v103d01aqfannatype.ps}{D01AQFA}{1.00}
+<<domain D01AQFA d01aqfAnnaType>>=
+)abbrev domain D01AQFA d01aqfAnnaType
+++ Author: Brian Dupee
+++ Date Created: March 1994
+++ Date Last Updated: December 1997
+++ Basic Operations: measure, numericalIntegration
+++ Related Constructors: Result, RoutinesTable
+++ Description:
+++ \axiomType{d01aqfAnnaType} is a domain of
+++ \axiomType{NumericalIntegrationCategory}
+++ for the NAG routine D01AQF, a general numerical integration routine which
+++ can solve an integral of the form \newline
+++ \centerline{\inputbitmap{/home/bjd/Axiom/anna/hypertex/bitmaps/d01aqf.xbm}}
+++ The function \axiomFun{measure} measures the usefulness of the routine 
+++ D01AQF for the given problem.  The function \axiomFun{numericalIntegration}
+++ performs the integration by using \axiomType{NagIntegrationPackage}.
+
+d01aqfAnnaType(): NumericalIntegrationCategory == Result add
+  EF2	==> ExpressionFunctions2
+  EDF	==> Expression DoubleFloat
+  LDF	==> List DoubleFloat
+  SDF	==> Stream DoubleFloat
+  DF	==> DoubleFloat
+  FI	==> Fraction Integer
+  EFI	==> Expression Fraction Integer
+  SOCDF	==> Segment OrderedCompletion DoubleFloat
+  NIA	==> Record(var:Symbol,fn:EDF,range:SOCDF,abserr:DF,relerr:DF)
+  MDNIA	==> Record(fn:EDF,range:List SOCDF,abserr:DF,relerr:DF)
+  INT	==> Integer
+  BOP	==> BasicOperator
+  S	==> Symbol
+  ST	==> String
+  LST	==> List String
+  RT	==> RoutinesTable
+  Rep:=Result
+  import Rep, d01AgentsPackage, NagIntegrationPackage
+
+  measure(R:RT,args:NIA) ==
+    ext:Result := empty()$Result
+    Den := denominator(args.fn)
+--    one? Den =>
+    (Den = 1) =>
+      [0.0,"d01aqf: A suitable weight function has not been found", ext]
+    listOfZeros:LDF := problemPoints(args.fn,args.var,args.range)
+    numberOfZeros := (#(listOfZeros))$LDF
+    zero?(numberOfZeros) =>
+      [0.0,"d01aqf: A suitable weight function has not been found", ext]
+    numberOfZeros = 1 =>
+      s:SDF := singularitiesOf(args)
+      more?(s,1)$SDF => 
+        [0.0,"d01aqf: Too many singularities have been found", ext]
+      cFloat:Float := (convert(first(listOfZeros)$LDF)@Float)$DF
+      cString:ST := (convert(cFloat)@ST)$Float
+      lany:Any := coerce(listOfZeros)$AnyFunctions1(LDF)
+      ex:Record(key:S,entry:Any) := [d01aqfextra@S,lany]
+      ext := insert!(ex,ext)$Result
+      [getMeasure(R,d01aqf@S)$RT, "Recommended is d01aqf with the "
+        "hilbertian weight function of 1/(x-c) where c = " cString, ext]
+    [0.0,"d01aqf: More than one factor has been found and so does not "
+                "have a suitable weight function",ext]
+
+  numericalIntegration(args:NIA,hints:Result) ==
+    Args := copy args
+    ca:Any :=  coerce(search((d01aqfextra@S),hints)$Result)@Any
+    c:DF := first(retract(ca)$AnyFunctions1(LDF))$LDF
+    ci:FI := df2fi(c)$ExpertSystemToolsPackage
+    Var:EFI := Args.var :: EFI
+    Gx:EFI := (Var-(ci::EFI))*(edf2efi(Args.fn)$ExpertSystemToolsPackage)
+    ArgsFn := map(convert(#1)$FI,Gx)$EF2(FI,Float)
+    b:Float := getButtonValue("d01aqf","functionEvaluations")$AttributeButtons
+    fEvals:INT := wholePart exp(1.1513*(1.0/(2.0*(1.0-b))))
+    iw:INT := 75*fEvals
+    f : Union(fn:FileName,fp:Asp1(G)) := [retract(ArgsFn)$Asp1(G)]
+    d01aqf(getlo(Args.range),gethi(Args.range),c,_
+           Args.abserr,Args.relerr,4*iw,iw,-1,f)
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain D01ASFA d01asfAnnaType}
+\pagehead{d01asfAnnaType}{D01ASFA}
+\pagepic{ps/v103d01asfannatype.ps}{D01ASFA}{1.00}
+<<domain D01ASFA d01asfAnnaType>>=
+)abbrev domain D01ASFA d01asfAnnaType
+++ Author: Brian Dupee
+++ Date Created: March 1994
+++ Date Last Updated: December 1997
+++ Basic Operations: measure, numericalIntegration
+++ Related Constructors: Result, RoutinesTable
+++ Description:
+++ \axiomType{d01asfAnnaType} is a domain of
+++ \axiomType{NumericalIntegrationCategory}
+++ for the NAG routine D01ASF, a numerical integration routine which can
+++ handle weight functions of the form cos(\omega x) or sin(\omega x) on an
+++ semi-infinite range.  The 
+++ function \axiomFun{measure} measures the usefulness of the routine D01ASF
+++ for the given problem.  The function \axiomFun{numericalIntegration}
+++ performs the integration by using \axiomType{NagIntegrationPackage}.
+
+d01asfAnnaType(): NumericalIntegrationCategory == Result add
+  EF2	==> ExpressionFunctions2
+  EDF	==> Expression DoubleFloat
+  LDF	==> List DoubleFloat
+  SDF	==> Stream DoubleFloat
+  DF	==> DoubleFloat
+  FI	==> Fraction Integer
+  EFI	==> Expression Fraction Integer
+  SOCDF	==> Segment OrderedCompletion DoubleFloat
+  NIA	==> Record(var:Symbol,fn:EDF,range:SOCDF,abserr:DF,relerr:DF)
+  MDNIA	==> Record(fn:EDF,range:List SOCDF,abserr:DF,relerr:DF)
+  INT	==> Integer
+  BOP	==> BasicOperator
+  S	==> Symbol
+  ST	==> String
+  LST	==> List String
+  RT	==> RoutinesTable
+  Rep:=Result
+  import Rep, d01WeightsPackage, d01AgentsPackage, NagIntegrationPackage
+
+  measure(R:RT,args:NIA) ==
+    ext:Result := empty()$Result
+    Range := rangeIsFinite(args)
+    not(Range case upperInfinite) =>
+      [0.0,"d01asf is not a suitable routine for infinite integrals",ext]
+    weight: Union(Record(op:BOP,w:DF),"failed") :=
+      exprHasWeightCosWXorSinWX(args)
+    weight case "failed" => 
+      [0.0,"d01asf: A suitable weight has not been found", ext]
+    weight case Record(op:BOP,w:DF) =>
+      wany := coerce(weight)$AnyFunctions1(Record(op:BOP,w:DF))
+      ex:Record(key:S,entry:Any) := [d01asfextra@S,wany]
+      ext := insert!(ex,ext)$Result
+      ws:ST := string(name(weight.op)$BOP)$S "(" df2st(weight.w)
+                          string(args.var)$S ")"
+      [getMeasure(R,d01asf@S)$RT,
+        "d01asf: A suitable weight has been found:- " ws, ext]
+    
+  numericalIntegration(args:NIA,hints:Result) ==
+    i:INT
+    r:Any := coerce(search((d01asfextra@S),hints)$Result)@Any
+    rec:Record(op:BOP,w:DF) := retract(r)$AnyFunctions1(Record(op:BOP,w:DF))
+    Var := args.var :: EDF
+    o:BOP := rec.op
+    den:EDF := o((rec.w*Var)$EDF)
+    Argsfn:EDF := args.fn/den
+    if (name(o) = cos@S)@Boolean then i := 1
+    else i := 2
+    b:Float := getButtonValue("d01asf","functionEvaluations")$AttributeButtons
+    fEvals:INT := wholePart exp(1.1513*(1.0/(2.0*(1.0-b))))
+    iw:INT := 75*fEvals
+    ArgsFn := map(convert(#1)$DF,Argsfn)$EF2(DF,Float)
+    f : Union(fn:FileName,fp:Asp1(G)) := [retract(ArgsFn)$Asp1(G)]
+    err :=
+      positive?(args.abserr) => args.abserr
+      args.relerr
+    d01asf(getlo(args.range),rec.w,i,err,50,4*iw,2*iw,-1,f)
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain D01FCFA d01fcfAnnaType}
+\pagehead{d01fcfAnnaType}{D01FCFA}
+\pagepic{ps/v103d01fcfannatype.ps}{D01FCFA}{1.00}
+<<domain D01FCFA d01fcfAnnaType>>=
+)abbrev domain D01FCFA d01fcfAnnaType
+++ Author: Brian Dupee
+++ Date Created: March 1994
+++ Date Last Updated: December 1997
+++ Basic Operations: measure, numericalIntegration
+++ Related Constructors: Result, RoutinesTable
+++ Description:
+++ \axiomType{d01fcfAnnaType} is a domain of
+++ \axiomType{NumericalIntegrationCategory}
+++ for the NAG routine D01FCF, a numerical integration routine which can
+++ handle multi-dimensional quadrature over a finite region.  The 
+++ function \axiomFun{measure} measures the usefulness of the routine D01GBF
+++ for the given problem.  The function \axiomFun{numericalIntegration}
+++ performs the integration by using \axiomType{NagIntegrationPackage}.
+
+d01fcfAnnaType(): NumericalIntegrationCategory == Result add
+  EF2	==> ExpressionFunctions2
+  EDF	==> Expression DoubleFloat
+  LDF	==> List DoubleFloat
+  SDF	==> Stream DoubleFloat
+  DF	==> DoubleFloat
+  FI	==> Fraction Integer
+  EFI	==> Expression Fraction Integer
+  SOCDF	==> Segment OrderedCompletion DoubleFloat
+  NIA	==> Record(var:Symbol,fn:EDF,range:SOCDF,abserr:DF,relerr:DF)
+  MDNIA	==> Record(fn:EDF,range:List SOCDF,abserr:DF,relerr:DF)
+  INT	==> Integer
+  BOP	==> BasicOperator
+  S	==> Symbol
+  ST	==> String
+  LST	==> List String
+  RT	==> RoutinesTable
+  Rep:=Result
+  import Rep, d01AgentsPackage, NagIntegrationPackage
+
+  measure(R:RT,args:MDNIA) ==
+    ext:Result := empty()$Result
+    segs := args.range
+    vars := variables(args.fn)$EDF
+    for i in 1..# vars repeat
+      nia:NIA := [vars.i,args.fn,segs.i,args.abserr,args.relerr]
+      not rangeIsFinite(nia) case finite => return
+        [0.0,"d01fcf is not a suitable routine for infinite integrals",ext]
+    [getMeasure(R,d01fcf@S)$RT, "Recommended is d01fcf", ext]
+
+  numericalIntegration(args:MDNIA,hints:Result) ==
+    import Integer
+    segs := args.range
+    dim := # segs
+    err := args.relerr
+    low:Matrix DF := matrix([[getlo(segs.i) for i in 1..dim]])$(Matrix DF)
+    high:Matrix DF := matrix([[gethi(segs.i) for i in 1..dim]])$(Matrix DF)
+    b:Float := getButtonValue("d01fcf","functionEvaluations")$AttributeButtons
+    a:Float:= exp(1.1513*(1.0/(2.0*(1.0-b))))
+    alpha:INT := 2**dim+2*dim**2+2*dim+1
+    d:Float := max(1.e-3,nthRoot(convert(err)@Float,4))$Float
+    minpts:INT := (fEvals := wholePart(a))*wholePart(alpha::Float/d)
+    maxpts:INT := 5*minpts
+    lenwrk:INT := (dim+2)*(1+(33*fEvals))
+    ArgsFn := map(convert(#1)$DF,args.fn)$EF2(DF,Float)
+    f : Union(fn:FileName,fp:Asp4(FUNCTN)) := [retract(ArgsFn)$Asp4(FUNCTN)]
+    out:Result := d01fcf(dim,low,high,maxpts,err,lenwrk,minpts,-1,f)
+    changeName(finval@Symbol,result@Symbol,out)
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain D01GBFA d01gbfAnnaType}
+\pagehead{d01gbfAnnaType}{D01GBFA}
+\pagepic{ps/v103d01gbfannatype.ps}{D01GBFA}{1.00}
+<<domain D01GBFA d01gbfAnnaType>>=
+)abbrev domain D01GBFA d01gbfAnnaType
+++ Author: Brian Dupee
+++ Date Created: March 1994
+++ Date Last Updated: December 1997
+++ Basic Operations: measure, numericalIntegration
+++ Related Constructors: Result, RoutinesTable
+++ Description:
+++ \axiomType{d01gbfAnnaType} is a domain of
+++ \axiomType{NumericalIntegrationCategory}
+++ for the NAG routine D01GBF, a numerical integration routine which can
+++ handle multi-dimensional quadrature over a finite region.  The 
+++ function \axiomFun{measure} measures the usefulness of the routine D01GBF
+++ for the given problem.  The function \axiomFun{numericalIntegration}
+++ performs the integration by using \axiomType{NagIntegrationPackage}.
+
+d01gbfAnnaType(): NumericalIntegrationCategory == Result add
+  EF2	==> ExpressionFunctions2
+  EDF	==> Expression DoubleFloat
+  LDF	==> List DoubleFloat
+  SDF	==> Stream DoubleFloat
+  DF	==> DoubleFloat
+  FI	==> Fraction Integer
+  EFI	==> Expression Fraction Integer
+  SOCDF	==> Segment OrderedCompletion DoubleFloat
+  NIA	==> Record(var:Symbol,fn:EDF,range:SOCDF,abserr:DF,relerr:DF)
+  MDNIA	==> Record(fn:EDF,range:List SOCDF,abserr:DF,relerr:DF)
+  INT	==> Integer
+  BOP	==> BasicOperator
+  S	==> Symbol
+  ST	==> String
+  LST	==> List String
+  RT	==> RoutinesTable
+  Rep:=Result
+  import Rep, d01AgentsPackage, NagIntegrationPackage
+
+  measure(R:RT,args:MDNIA) ==
+    ext:Result := empty()$Result
+    (rel := args.relerr) < 0.01 :: DF => 
+      [0.1, "d01gbf: The relative error requirement is too small",ext]
+    segs := args.range
+    vars := variables(args.fn)$EDF
+    for i in 1..# vars repeat
+      nia:NIA := [vars.i,args.fn,segs.i,args.abserr,rel]
+      not rangeIsFinite(nia) case finite => return
+        [0.0,"d01gbf is not a suitable routine for infinite integrals",ext]
+    [getMeasure(R,d01gbf@S)$RT, "Recommended is d01gbf", ext]
+
+  numericalIntegration(args:MDNIA,hints:Result) ==
+    import Integer
+    segs := args.range
+    dim:INT := # segs
+    low:Matrix DF := matrix([[getlo(segs.i) for i in 1..dim]])$(Matrix DF)
+    high:Matrix DF := matrix([[gethi(segs.i) for i in 1..dim]])$(Matrix DF)
+    b:Float := getButtonValue("d01gbf","functionEvaluations")$AttributeButtons
+    a:Float:= exp(1.1513*(1.0/(2.0*(1.0-b))))
+    maxcls:INT := 1500*(dim+1)*(fEvals:INT := wholePart(a))
+    mincls:INT := 300*fEvals
+    c:Float := nthRoot((maxcls::Float)/4.0,dim)$Float
+    lenwrk:INT := 3*dim*(d:INT := wholePart(c))+10*dim
+    wrkstr:Matrix DF := matrix([[0$DF for i in 1..lenwrk]])$(Matrix DF)
+    ArgsFn := map(convert(#1)$DF,args.fn)$EF2(DF,Float)
+    f : Union(fn:FileName,fp:Asp4(FUNCTN)) := [retract(ArgsFn)$Asp4(FUNCTN)]
+    out:Result := _
+       d01gbf(dim,low,high,maxcls,args.relerr,lenwrk,mincls,wrkstr,-1,f)
+    changeName(finest@Symbol,result@Symbol,out)
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain D01TRNS d01TransformFunctionType}
+\pagehead{d01TransformFunctionType}{D01TRNS}
+\pagepic{ps/v103d01transformfunctiontype.ps}{D01TRNS}{1.00}
+<<domain D01TRNS d01TransformFunctionType>>=
+)abbrev domain D01TRNS d01TransformFunctionType
+++ Author: Brian Dupee
+++ Date Created: April 1994
+++ Date Last Updated: December 1997
+++ Basic Operations: measure, numericalIntegration
+++ Related Constructors: Result, RoutinesTable
+++ Description:
+++ Since an infinite integral cannot be evaluated numerically
+++ it is necessary to transform the integral onto finite ranges.
+++ \axiomType{d01TransformFunctionType} uses the mapping \spad{x -> 1/x}
+++ and contains the functions \axiomFun{measure} and
+++ \axiomFun{numericalIntegration}.
+EDF	==> Expression DoubleFloat
+EEDF	==> Equation Expression DoubleFloat
+FI	==> Fraction Integer
+EFI	==> Expression Fraction Integer
+EEFI	==> Equation Expression Fraction Integer
+EF2	==> ExpressionFunctions2
+DF	==> DoubleFloat
+F	==> Float
+SOCDF	==> Segment OrderedCompletion DoubleFloat
+OCDF	==> OrderedCompletion DoubleFloat
+NIA	==> Record(var:Symbol,fn:EDF,range:SOCDF,abserr:DF,relerr:DF)
+INT     ==> Integer
+PI	==> PositiveInteger
+HINT	==> Record(str:String,fn:EDF,range:SOCDF,ext:Result)
+S	==> Symbol
+ST	==> String
+LST	==> List String
+Measure	==> Record(measure:F,explanations:ST,extra:Result)
+MS	==> Record(measure:F,name:ST,explanations:LST,extra:Result)
+
+d01TransformFunctionType():NumericalIntegrationCategory == Result add
+  Rep:=Result
+  import d01AgentsPackage,Rep
+
+  rec2any(re:Record(str:ST,fn:EDF,range:SOCDF)):Any ==
+    coerce(re)$AnyFunctions1(Record(str:ST,fn:EDF,range:SOCDF))
+
+  changeName(ans:Result,name:ST):Result ==
+    sy:S := coerce(name "Answer")$S
+    anyAns:Any := coerce(ans)$AnyFunctions1(Result)
+    construct([[sy,anyAns]])$Result
+
+  getIntegral(args:NIA,hint:HINT) : Result ==
+   Args := copy args
+   Args.fn := hint.fn
+   Args.range := hint.range
+   integrate(Args::NumericalIntegrationProblem)$AnnaNumericalIntegrationPackage
+
+  transformFunction(args:NIA) : NIA ==
+    Args := copy args    
+    Var := Args.var :: EFI                 -- coerce Symbol to EFI
+    NewVar:EFI := inv(Var)$EFI             -- invert it
+    VarEqn:EEFI:=equation(Var,NewVar)$EEFI -- turn it into an equation
+    Afn:EFI := edf2efi(Args.fn)$ExpertSystemToolsPackage
+    Afn := subst(Afn,VarEqn)$EFI           -- substitute into function
+    Var2:EFI := Var**2
+    Afn:= simplify(Afn/Var2)$TranscendentalManipulations(FI,EFI)
+    Args.fn:= map(convert(#1)$FI,Afn)$EF2(FI,DF)
+    Args
+
+  doit(seg:SOCDF,args:NIA):MS ==
+    Args := copy args
+    Args.range := seg
+    measure(Args::NumericalIntegrationProblem)$AnnaNumericalIntegrationPackage
+
+  transform(c:Boolean,args:NIA):Measure ==
+    if c then
+      l := coerce(recip(lo(args.range)))@OCDF
+      Seg:SOCDF := segment(0$OCDF,l)
+    else
+      h := coerce(recip(hi(args.range)))@OCDF
+      Seg:SOCDF := segment(h,0$OCDF)
+    Args := transformFunction(args)
+    m:MS := doit(Seg,Args)
+    out1:ST := 
+       "The recommendation is to transform the function and use " m.name
+    out2:List(HINT) := [[m.name,Args.fn,Seg,m.extra]]
+    out2Any:Any := coerce(out2)$AnyFunctions1(List(HINT))
+    ex:Record(key:S,entry:Any) := [d01transformextra@S,out2Any]
+    extr:Result := construct([ex])$Result
+    [m.measure,out1,extr]
+      
+  split(c:PI,args:NIA):Measure ==
+    Args := copy args
+    Args.relerr := Args.relerr/2
+    Args.abserr := Args.abserr/2
+    if (c = 1)@Boolean then 
+      seg1:SOCDF := segment(-1$OCDF,1$OCDF)
+    else if (c = 2)@Boolean then
+      seg1 := segment(lo(Args.range),1$OCDF)
+    else
+      seg1 := segment(-1$OCDF,hi(Args.range))
+    m1:MS := doit(seg1,Args)
+    Args := transformFunction Args
+    if (c = 2)@Boolean then
+      seg2:SOCDF := segment(0$OCDF,1$OCDF)
+    else if (c = 3)@Boolean then
+      seg2 := segment(-1$OCDF,0$OCDF)
+    else seg2 := seg1
+    m2:MS := doit(seg2,Args)
+    m1m:F := m1.measure
+    m2m:F := m2.measure
+    m:F := m1m*m2m/((m1m*m2m)+(1.0-m1m)*(1.0-m2m))
+    out1:ST := "The recommendation is to transform the function and use "
+                               m1.name " and " m2.name
+    out2:List(HINT) :=
+             [[m1.name,args.fn,seg1,m1.extra],[m2.name,Args.fn,seg2,m2.extra]]
+    out2Any:Any := coerce(out2)$AnyFunctions1(List(HINT))
+    ex:Record(key:S,entry:Any) := [d01transformextra@S,out2Any]
+    extr:Result := construct([ex])$Result
+    [m,out1,extr]
+
+  measure(R:RoutinesTable,args:NIA) ==
+    Range:=rangeIsFinite(args)
+    Range case bothInfinite => split(1,args)
+    Range case upperInfinite =>
+      positive?(lo(args.range))$OCDF =>
+        transform(true,args)
+      split(2,args)
+    Range case lowerInfinite =>
+      negative?(hi(args.range))$OCDF =>
+        transform(false,args)
+      split(3,args)
+
+  numericalIntegration(args:NIA,hints:Result) ==
+    mainResult:DF := mainAbserr:DF := 0$DF
+    ans:Result := empty()$Result
+    hla:Any := coerce(search((d01transformextra@S),hints)$Result)@Any
+    hintList := retract(hla)$AnyFunctions1(List(HINT))
+    methodName:ST := empty()$ST
+    repeat
+      if (empty?(hintList)$(List(HINT))) 
+        then leave
+      item := first(hintList)$List(HINT)
+      a:Result := getIntegral(args,item)
+      anyRes := coerce(search((result@S),a)$Result)@Any
+      midResult := retract(anyRes)$AnyFunctions1(DF)
+      anyErr := coerce(search((abserr pretend S),a)$Result)@Any
+      midAbserr := retract(anyErr)$AnyFunctions1(DF)
+      mainResult := mainResult+midResult
+      mainAbserr := mainAbserr+midAbserr
+      if (methodName = item.str)@Boolean then
+        methodName := concat([item.str,"1"])$ST
+      else
+        methodName := item.str
+      ans := concat(ans,changeName(a,methodName))$ExpertSystemToolsPackage
+      hintList := rest(hintList)$(List(HINT))
+    anyResult := coerce(mainResult)$AnyFunctions1(DF)
+    anyAbserr := coerce(mainAbserr)$AnyFunctions1(DF)
+    recResult:Record(key:S,entry:Any):=[result@S,anyResult]
+    recAbserr:Record(key:S,entry:Any):=[abserr pretend S,anyAbserr]
+    insert!(recAbserr,insert!(recResult,ans))$Result
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain D02BBFA d02bbfAnnaType}
+\pagehead{d02bbfAnnaType}{D02BBFA}
+\pagepic{ps/v103d02bbfannatype.ps}{D02BBFA}{1.00}
+<<domain D02BBFA d02bbfAnnaType>>=
+)abbrev domain D02BBFA d02bbfAnnaType
+++ Author: Brian Dupee
+++ Date Created: February 1995
+++ Date Last Updated: January 1996
+++ Basic Operations: 
+++ Description:
+++ \axiomType{d02bbfAnnaType} is a domain of 
+++ \axiomType{OrdinaryDifferentialEquationsInitialValueProblemSolverCategory}
+++ for the NAG routine D02BBF, a ODE routine which uses an  
+++ Runge-Kutta method to solve a system of differential 
+++ equations.  The function \axiomFun{measure} measures the
+++ usefulness of the routine D02BBF for the given problem.  The 
+++ function \axiomFun{ODESolve} performs the integration by using 
+++ \axiomType{NagOrdinaryDifferentialEquationsPackage}.
+
+
+d02bbfAnnaType():OrdinaryDifferentialEquationsSolverCategory == Result add  
+  -- Runge Kutta
+
+  EDF	==> Expression DoubleFloat
+  LDF	==> List DoubleFloat
+  MDF	==> Matrix DoubleFloat
+  DF	==> DoubleFloat
+  F	==> Float
+  FI	==> Fraction Integer
+  EFI	==> Expression Fraction Integer
+  SOCDF	==> Segment OrderedCompletion DoubleFloat
+  VEDF	==> Vector Expression DoubleFloat
+  VEF	==> Vector Expression Float
+  EF	==> Expression Float
+  VDF	==> Vector DoubleFloat
+  VMF	==> Vector MachineFloat
+  MF	==> MachineFloat
+  ODEA	==> Record(xinit:DF,xend:DF,fn:VEDF,yinit:LDF,intvals:LDF,_
+                      g:EDF,abserr:DF,relerr:DF)
+  RSS	==> Record(stiffnessFactor:F,stabilityFactor:F)
+  INT	==> Integer
+  EF2	==> ExpressionFunctions2
+
+  import d02AgentsPackage, NagOrdinaryDifferentialEquationsPackage
+  import AttributeButtons
+
+  accuracyCF(ode:ODEA):F ==
+    b := getButtonValue("d02bbf","accuracy")$AttributeButtons
+    accuracyIntensityValue := combineFeatureCompatibility(b,accuracyIF(ode))
+    accuracyIntensityValue > 0.999 => 0$F
+    0.8*exp(-((10*accuracyIntensityValue)**3)$F/266)$F
+
+  stiffnessCF(stiffnessIntensityValue:F):F ==
+    b := getButtonValue("d02bbf","stiffness")$AttributeButtons
+    0.5*exp(-(2*combineFeatureCompatibility(b,stiffnessIntensityValue))**2)$F
+
+  stabilityCF(stabilityIntensityValue:F):F ==
+    b := getButtonValue("d02bbf","stability")$AttributeButtons
+    0.5 * cos(combineFeatureCompatibility(b,stabilityIntensityValue))$F
+
+  expenseOfEvaluationCF(ode:ODEA):F ==
+    b := getButtonValue("d02bbf","expense")$AttributeButtons
+    expenseOfEvaluationIntensityValue := 
+      combineFeatureCompatibility(b,expenseOfEvaluationIF(ode))
+    0.35+0.2*exp(-(2.0*expenseOfEvaluationIntensityValue)**3)$F
+    
+  measure(R:RoutinesTable,args:ODEA) ==
+    m := getMeasure(R,d02bbf :: Symbol)$RoutinesTable
+    ssf := stiffnessAndStabilityOfODEIF args
+    m := combineFeatureCompatibility(m,[accuracyCF(args),
+            stiffnessCF(ssf.stiffnessFactor),
+              expenseOfEvaluationCF(args),
+                stabilityCF(ssf.stabilityFactor)])
+    [m,"Runge-Kutta Merson method"]
+
+  ODESolve(ode:ODEA) ==
+    i:LDF := ode.intvals
+    M := inc(# i)$INT
+    irelab := 0$INT
+    if positive?(a := ode.abserr) then 
+      inc(irelab)$INT
+    if positive?(r := ode.relerr) then
+      inc(irelab)$INT
+    if positive?(a+r) then
+      tol:DF := a + r
+    else
+      tol := float(1,-4,10)$DF
+    asp7:Union(fn:FileName,fp:Asp7(FCN)) :=
+      [retract(vedf2vef(ode.fn)$ExpertSystemToolsPackage)$Asp7(FCN)]
+    asp8:Union(fn:FileName,fp:Asp8(OUTPUT)) := 
+      [coerce(ldf2vmf(i)$ExpertSystemToolsPackage)$Asp8(OUTPUT)]
+    d02bbf(ode.xend,M,# ode.fn,irelab,ode.xinit,matrix([ode.yinit])$MDF,
+             tol,-1,asp7,asp8)
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain D02BHFA d02bhfAnnaType}
+\pagehead{d02bhfAnnaType}{D02BHFA}
+\pagepic{ps/v103d02bhfannatype.ps}{D02BHFA}{1.00}
+<<domain D02BHFA d02bhfAnnaType>>=
+)abbrev domain D02BHFA d02bhfAnnaType
+++ Author: Brian Dupee
+++ Date Created: February 1995
+++ Date Last Updated: January 1996
+++ Basic Operations: 
+++ Description:
+++ \axiomType{d02bhfAnnaType} is a domain of 
+++ \axiomType{OrdinaryDifferentialEquationsInitialValueProblemSolverCategory}
+++ for the NAG routine D02BHF, a ODE routine which uses an  
+++ Runge-Kutta method to solve a system of differential 
+++ equations.  The function \axiomFun{measure} measures the
+++ usefulness of the routine D02BHF for the given problem.  The 
+++ function \axiomFun{ODESolve} performs the integration by using 
+++ \axiomType{NagOrdinaryDifferentialEquationsPackage}.
+
+d02bhfAnnaType():OrdinaryDifferentialEquationsSolverCategory == Result add  
+  -- Runge Kutta
+  EDF	==> Expression DoubleFloat
+  LDF	==> List DoubleFloat
+  MDF	==> Matrix DoubleFloat
+  DF	==> DoubleFloat
+  F	==> Float
+  FI	==> Fraction Integer
+  EFI	==> Expression Fraction Integer
+  SOCDF	==> Segment OrderedCompletion DoubleFloat
+  VEDF	==> Vector Expression DoubleFloat
+  VEF	==> Vector Expression Float
+  EF	==> Expression Float
+  VDF	==> Vector DoubleFloat
+  VMF	==> Vector MachineFloat
+  MF	==> MachineFloat
+  ODEA	==> Record(xinit:DF,xend:DF,fn:VEDF,yinit:LDF,intvals:LDF,_
+                      g:EDF,abserr:DF,relerr:DF)
+  RSS	==> Record(stiffnessFactor:F,stabilityFactor:F)
+  INT	==> Integer
+  EF2	==> ExpressionFunctions2
+
+  import d02AgentsPackage, NagOrdinaryDifferentialEquationsPackage
+  import AttributeButtons
+
+  accuracyCF(ode:ODEA):F ==
+    b := getButtonValue("d02bhf","accuracy")$AttributeButtons
+    accuracyIntensityValue := combineFeatureCompatibility(b,accuracyIF(ode))
+    accuracyIntensityValue > 0.999 => 0$F
+    0.8*exp(-((10*accuracyIntensityValue)**3)$F/266)$F
+
+  stiffnessCF(stiffnessIntensityValue:F):F ==
+    b := getButtonValue("d02bhf","stiffness")$AttributeButtons
+    0.5*exp(-(2*combineFeatureCompatibility(b,stiffnessIntensityValue))**2)$F
+
+  stabilityCF(stabilityIntensityValue:F):F ==
+    b := getButtonValue("d02bhf","stability")$AttributeButtons
+    0.5 * cos(combineFeatureCompatibility(b,stabilityIntensityValue))$F
+
+  expenseOfEvaluationCF(ode:ODEA):F ==
+    b := getButtonValue("d02bhf","expense")$AttributeButtons
+    expenseOfEvaluationIntensityValue := 
+      combineFeatureCompatibility(b,expenseOfEvaluationIF(ode))
+    0.35+0.2*exp(-(2.0*expenseOfEvaluationIntensityValue)**3)$F
+    
+  measure(R:RoutinesTable,args:ODEA) ==
+    m := getMeasure(R,d02bhf :: Symbol)$RoutinesTable
+    ssf := stiffnessAndStabilityOfODEIF args
+    m := combineFeatureCompatibility(m,[accuracyCF(args),
+            stiffnessCF(ssf.stiffnessFactor),
+              expenseOfEvaluationCF(args),
+                stabilityCF(ssf.stabilityFactor)])
+    [m,"Runge-Kutta Merson method"]
+
+  ODESolve(ode:ODEA) ==
+    irelab := 0$INT
+    if positive?(a := ode.abserr) then 
+      inc(irelab)$INT
+    if positive?(r := ode.relerr) then
+      inc(irelab)$INT
+    if positive?(a+r) then
+      tol := max(a,r)$DF
+    else
+      tol:DF := float(1,-4,10)$DF
+    asp7:Union(fn:FileName,fp:Asp7(FCN)) := 
+      [retract(e:VEF := vedf2vef(ode.fn)$ExpertSystemToolsPackage)$Asp7(FCN)]
+    asp9:Union(fn:FileName,fp:Asp9(G)) := 
+      [retract(edf2ef(ode.g)$ExpertSystemToolsPackage)$Asp9(G)]
+    d02bhf(ode.xend,# e,irelab,0$DF,ode.xinit,matrix([ode.yinit])$MDF,
+             tol,-1,asp9,asp7)
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain D02CJFA d02cjfAnnaType}
+\pagehead{d02cjfAnnaType}{D02CJFA}
+\pagepic{ps/v103d02cjfannatype.ps}{D02CJFA}{1.00}
+<<domain D02CJFA d02cjfAnnaType>>=
+)abbrev domain D02CJFA d02cjfAnnaType
+++ Author: Brian Dupee
+++ Date Created: February 1995
+++ Date Last Updated: January 1996
+++ Basic Operations: 
+++ Description:
+++ \axiomType{d02cjfAnnaType} is a domain of 
+++ \axiomType{OrdinaryDifferentialEquationsInitialValueProblemSolverCategory}
+++ for the NAG routine D02CJF, a ODE routine which uses an  
+++ Adams-Moulton-Bashworth method to solve a system of differential 
+++ equations.  The function \axiomFun{measure} measures the
+++ usefulness of the routine D02CJF for the given problem.  The 
+++ function \axiomFun{ODESolve} performs the integration by using 
+++ \axiomType{NagOrdinaryDifferentialEquationsPackage}.
+
+d02cjfAnnaType():OrdinaryDifferentialEquationsSolverCategory == Result add 
+  -- Adams
+  EDF	==> Expression DoubleFloat
+  LDF	==> List DoubleFloat
+  MDF	==> Matrix DoubleFloat
+  DF	==> DoubleFloat
+  F	==> Float
+  FI	==> Fraction Integer
+  EFI	==> Expression Fraction Integer
+  SOCDF	==> Segment OrderedCompletion DoubleFloat
+  VEDF	==> Vector Expression DoubleFloat
+  VEF	==> Vector Expression Float
+  EF	==> Expression Float
+  VDF	==> Vector DoubleFloat
+  VMF	==> Vector MachineFloat
+  MF	==> MachineFloat
+  ODEA	==> Record(xinit:DF,xend:DF,fn:VEDF,yinit:LDF,intvals:LDF,_
+                      g:EDF,abserr:DF,relerr:DF)
+  RSS	==> Record(stiffnessFactor:F,stabilityFactor:F)
+  INT	==> Integer
+  EF2	==> ExpressionFunctions2
+
+  import d02AgentsPackage, NagOrdinaryDifferentialEquationsPackage
+
+  accuracyCF(ode:ODEA):F ==
+    b := getButtonValue("d02cjf","accuracy")$AttributeButtons
+    accuracyIntensityValue := combineFeatureCompatibility(b,accuracyIF(ode))
+    accuracyIntensityValue > 0.9999 => 0$F
+    0.6*(cos(accuracyIntensityValue*(pi()$F)/2)$F)**0.755
+
+  stiffnessCF(ode:ODEA):F ==
+    b := getButtonValue("d02cjf","stiffness")$AttributeButtons
+    ssf := stiffnessAndStabilityOfODEIF ode
+    stiffnessIntensityValue := 
+      combineFeatureCompatibility(b,ssf.stiffnessFactor)
+    0.5*exp(-(1.1*stiffnessIntensityValue)**3)$F
+
+  measure(R:RoutinesTable,args:ODEA) ==
+    m := getMeasure(R,d02cjf :: Symbol)$RoutinesTable
+    m := combineFeatureCompatibility(m,[accuracyCF(args), stiffnessCF(args)])
+    [m,"Adams method"]
+
+  ODESolve(ode:ODEA) ==
+    i:LDF := ode.intvals
+    if empty?(i) then
+      i := [ode.xend]
+    M := inc(# i)$INT
+    if positive?((a := ode.abserr)*(r := ode.relerr))$DF then
+      ire:String := "D"
+    else 
+      if positive?(a) then
+        ire:String := "A"
+      else 
+        ire:String := "R"
+    tol := max(a,r)$DF
+    asp7:Union(fn:FileName,fp:Asp7(FCN)) := 
+      [retract(e:VEF := vedf2vef(ode.fn)$ExpertSystemToolsPackage)$Asp7(FCN)]
+    asp8:Union(fn:FileName,fp:Asp8(OUTPUT)) := 
+      [coerce(ldf2vmf(i)$ExpertSystemToolsPackage)$Asp8(OUTPUT)]
+    asp9:Union(fn:FileName,fp:Asp9(G)) := 
+      [retract(edf2ef(ode.g)$ExpertSystemToolsPackage)$Asp9(G)]
+    d02cjf(ode.xend,M,# e,tol,ire,ode.xinit,matrix([ode.yinit])$MDF,
+             -1,asp9,asp7,asp8)
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain D02EJFA d02ejfAnnaType}
+<<domain D02EJFA d02ejfAnnaType>>=
+\pagehead{d02ejfAnnaType}{D02EJFA}
+\pagepic{ps/v103d02ejfannatype.ps}{D02EJFA}{1.00}
+)abbrev domain D02EJFA d02ejfAnnaType
+++ Author: Brian Dupee
+++ Date Created: February 1995
+++ Date Last Updated: January 1996
+++ Basic Operations: 
+++ Description:
+++ \axiomType{d02ejfAnnaType} is a domain of 
+++ \axiomType{OrdinaryDifferentialEquationsInitialValueProblemSolverCategory}
+++ for the NAG routine D02EJF, a ODE routine which uses a backward 
+++ differentiation formulae method to handle a stiff system 
+++ of differential equations.  The function \axiomFun{measure} measures
+++ the usefulness of the routine D02EJF for the given problem.  The 
+++ function \axiomFun{ODESolve} performs the integration by using 
+++ \axiomType{NagOrdinaryDifferentialEquationsPackage}.
+
+d02ejfAnnaType():OrdinaryDifferentialEquationsSolverCategory == Result add 
+  -- BDF "Stiff"
+  EDF	==> Expression DoubleFloat
+  LDF	==> List DoubleFloat
+  MDF	==> Matrix DoubleFloat
+  DF	==> DoubleFloat
+  F	==> Float
+  FI	==> Fraction Integer
+  EFI	==> Expression Fraction Integer
+  SOCDF	==> Segment OrderedCompletion DoubleFloat
+  VEDF	==> Vector Expression DoubleFloat
+  VEF	==> Vector Expression Float
+  EF	==> Expression Float
+  VDF	==> Vector DoubleFloat
+  VMF	==> Vector MachineFloat
+  MF	==> MachineFloat
+  ODEA	==> Record(xinit:DF,xend:DF,fn:VEDF,yinit:LDF,intvals:LDF,_
+                      g:EDF,abserr:DF,relerr:DF)
+  RSS	==> Record(stiffnessFactor:F,stabilityFactor:F)
+  INT	==> Integer
+  EF2	==> ExpressionFunctions2
+
+  import d02AgentsPackage, NagOrdinaryDifferentialEquationsPackage
+
+  accuracyCF(ode:ODEA):F ==
+    b := getButtonValue("d02ejf","accuracy")$AttributeButtons
+    accuracyIntensityValue :=  combineFeatureCompatibility(b,accuracyIF(ode))
+    accuracyIntensityValue > 0.999 => 0$F
+    0.5*exp(-((10*accuracyIntensityValue)**3)$F/250)$F
+
+  intermediateResultsCF(ode:ODEA):F ==
+    intermediateResultsIntensityValue := intermediateResultsIF(ode)
+    i := 0.5 * exp(-(intermediateResultsIntensityValue/1.649)**3)$F
+    a := accuracyCF(ode)
+    i+(0.5-i)*(0.5-a)
+
+  stabilityCF(ode:ODEA):F ==
+    b := getButtonValue("d02ejf","stability")$AttributeButtons
+    ssf := stiffnessAndStabilityOfODEIF ode
+    stabilityIntensityValue := 
+      combineFeatureCompatibility(b,ssf.stabilityFactor)
+    0.68 - 0.5 * exp(-(stabilityIntensityValue)**3)$F
+
+  expenseOfEvaluationCF(ode:ODEA):F ==
+    b := getButtonValue("d02ejf","expense")$AttributeButtons
+    expenseOfEvaluationIntensityValue := 
+      combineFeatureCompatibility(b,expenseOfEvaluationIF(ode))
+    0.5 * exp(-(1.7*expenseOfEvaluationIntensityValue)**3)$F
+    
+  systemSizeCF(args:ODEA):F ==
+    (1$F - systemSizeIF(args))/2.0
+
+  measure(R:RoutinesTable,args:ODEA) ==
+    arg := copy args
+    m := getMeasure(R,d02ejf :: Symbol)$RoutinesTable
+    m := combineFeatureCompatibility(m,[intermediateResultsCF(arg),
+           accuracyCF(arg),
+             systemSizeCF(arg),
+               expenseOfEvaluationCF(arg),
+                 stabilityCF(arg)])
+    [m,"BDF method for Stiff Systems"]
+
+  ODESolve(ode:ODEA) ==
+    i:LDF := ode.intvals
+    m := inc(# i)$INT
+    if positive?((a := ode.abserr)*(r := ode.relerr))$DF then
+      ire:String := "D"
+    else 
+      if positive?(a) then
+        ire:String := "A"
+      else 
+        ire:String := "R"
+    if positive?(a+r)$DF then
+      tol := max(a,r)$DF
+    else 
+      tol := float(1,-4,10)$DF
+    asp7:Union(fn:FileName,fp:Asp7(FCN)) := 
+      [retract(e:VEF := vedf2vef(ode.fn)$ExpertSystemToolsPackage)$Asp7(FCN)]
+    asp31:Union(fn:FileName,fp:Asp31(PEDERV)) := 
+      [retract(e)$Asp31(PEDERV)]
+    asp8:Union(fn:FileName,fp:Asp8(OUTPUT)) := 
+      [coerce(ldf2vmf(i)$ExpertSystemToolsPackage)$Asp8(OUTPUT)]
+    asp9:Union(fn:FileName,fp:Asp9(G)) :=
+      [retract(edf2ef(ode.g)$ExpertSystemToolsPackage)$Asp9(G)]
+    n:INT := # ode.yinit
+    iw:INT := (12+n)*n+50
+    ans := d02ejf(ode.xend,m,n,ire,iw,ode.xinit,matrix([ode.yinit])$MDF,
+             tol,-1,asp9,asp7,asp31,asp8)
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain D03EEFA d03eefAnnaType}
+\pagehead{d03eefAnnaType}{D03EEFA}
+\pagepic{ps/v103d03eefannatype.ps}{D03EEFA}{1.00}
+<<domain D03EEFA d03eefAnnaType>>=
+)abbrev domain D03EEFA d03eefAnnaType
+++ Author: Brian Dupee
+++ Date Created: June 1996
+++ Date Last Updated: June 1996
+++ Basic Operations: 
+++ Description:
+++ \axiomType{d03eefAnnaType} is a domain of 
+++ \axiomType{PartialDifferentialEquationsSolverCategory}
+++ for the NAG routines D03EEF/D03EDF.
+d03eefAnnaType():PartialDifferentialEquationsSolverCategory == Result add
+  -- 2D Elliptic PDE
+  LEDF	==> List Expression DoubleFloat
+  EDF	==> Expression DoubleFloat
+  LDF	==> List DoubleFloat
+  MDF	==> Matrix DoubleFloat
+  DF	==> DoubleFloat
+  F	==> Float
+  FI	==> Fraction Integer
+  VEF	==> Vector Expression Float
+  EF	==> Expression Float
+  MEF	==> Matrix Expression Float
+  NNI	==> NonNegativeInteger
+  INT	==> Integer
+  PDEC	==> Record(start:DF, finish:DF, grid:NNI, boundaryType:INT,
+                      dStart:MDF, dFinish:MDF)
+  PDEB	==> Record(pde:LEDF, constraints:List PDEC,
+                      f:List LEDF, st:String, tol:DF)
+
+  import d03AgentsPackage, NagPartialDifferentialEquationsPackage
+  import ExpertSystemToolsPackage
+
+  measure(R:RoutinesTable,args:PDEB) ==
+    (# (args.constraints) > 2)@Boolean =>
+      [0$F,"d03eef/d03edf is unsuitable for PDEs of order more than 2"]
+    elliptic?(args) => 
+      m := getMeasure(R,d03eef :: Symbol)$RoutinesTable
+      [m,"d03eef/d03edf is suitable"]
+    [0$F,"d03eef/d03edf is unsuitable for hyperbolic or parabolic PDEs"]
+
+  PDESolve(args:PDEB) ==
+    xcon := first(args.constraints)
+    ycon := second(args.constraints) 
+    nx := xcon.grid
+    ny := ycon.grid 
+    p := args.pde
+    x1 := xcon.start
+    x2 := xcon.finish
+    y1 := ycon.start
+    y2 := ycon.finish
+    lda := ((4*(nx+1)*(ny+1)+2) quo 3)$INT
+    scheme:String :=
+     central?((x2-x1)/2,(y2-y1)/2,args.pde) => "C"
+     "U"
+    asp73:Union(fn:FileName,fp:Asp73(PDEF)) :=
+     [retract(vector([edf2ef u for u in p])$VEF)$Asp73(PDEF)]
+    asp74:Union(fn:FileName,fp:Asp74(BNDY)) := 
+     [retract(matrix([[edf2ef v for v in w] for w in args.f])$MEF)$Asp74(BNDY)]
+    fde := d03eef(x1,x2,y1,y2,nx,ny,lda,scheme,-1,asp73,asp74)
+    ub := new(1,nx*ny,0$DF)$MDF
+    A := search(a::Symbol,fde)$Result
+    A case "failed" => empty()$Result
+    AA := A::Any
+    fdea := retract(AA)$AnyFunctions1(MDF)
+    r := search(rhs::Symbol,fde)$Result
+    r case "failed" => empty()$Result
+    rh := r::Any
+    fderhs := retract(rh)$AnyFunctions1(MDF)
+    d03edf(nx,ny,lda,15,args.tol,0,fdea,fderhs,ub,-1)
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain D03FAFA d03fafAnnaType}
+\pagehead{d03fafAnnaType}{D03FAFA}
+\pagepic{ps/v103d03fafannatype.ps}{D03FAFA}{1.00}
+<<domain D03FAFA d03fafAnnaType>>=
+)abbrev domain D03FAFA d03fafAnnaType
+++ Author: Brian Dupee
+++ Date Created: July 1996
+++ Date Last Updated: July 1996
+++ Basic Operations: 
+++ Description:
+++ \axiomType{d03fafAnnaType} is a domain of 
+++ \axiomType{PartialDifferentialEquationsSolverCategory}
+++ for the NAG routine D03FAF.
+d03fafAnnaType():PartialDifferentialEquationsSolverCategory == Result add
+  -- 3D Helmholtz PDE
+  LEDF	==> List Expression DoubleFloat
+  EDF	==> Expression DoubleFloat
+  LDF	==> List DoubleFloat
+  MDF	==> Matrix DoubleFloat
+  DF	==> DoubleFloat
+  F	==> Float
+  FI	==> Fraction Integer
+  VEF	==> Vector Expression Float
+  EF	==> Expression Float
+  MEF	==> Matrix Expression Float
+  NNI	==> NonNegativeInteger
+  INT	==> Integer
+  PDEC	==> Record(start:DF, finish:DF, grid:NNI, boundaryType:INT,
+                      dStart:MDF, dFinish:MDF)
+  PDEB	==> Record(pde:LEDF, constraints:List PDEC,
+                      f:List LEDF, st:String, tol:DF)
+
+  import d03AgentsPackage, NagPartialDifferentialEquationsPackage
+  import ExpertSystemToolsPackage
+
+  measure(R:RoutinesTable,args:PDEB) ==
+    (# (args.constraints) < 3)@Boolean =>
+      [0$F,"d03faf is unsuitable for PDEs of order other than 3"]
+    [0$F,"d03faf isn't finished"]
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \chapter{Chapter E}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain EXPEXPAN ExponentialExpansion}
+\pagehead{ExponentialExpansion}{EXPEXPAN}
+\pagepic{ps/v103exponentialexpansion.ps}{EXPEXPAN}{1.00}
+See also:\\
+\refto{ExponentialOfUnivariatePuiseuxSeries}{EXPUPXS}
+\refto{UnivariatePuiseuxSeriesWithExponentialSingularity}{UPXSSING}
+<<domain EXPEXPAN ExponentialExpansion>>=
+)abbrev domain EXPEXPAN ExponentialExpansion
+++ Author: Clifton J. Williamson
+++ Date Created: 13 August 1992
+++ Date Last Updated: 27 August 1992
+++ Basic Operations:
+++ Related Domains: UnivariatePuiseuxSeries(FE,var,cen),
+++                  ExponentialOfUnivariatePuiseuxSeries(FE,var,cen)
+++ Also See:
+++ AMS Classifications:
+++ Keywords: limit, functional expression, power series
+++ Examples:
+++ References:
+++ Description:
+++   UnivariatePuiseuxSeriesWithExponentialSingularity is a domain used to
+++   represent essential singularities of functions.  Objects in this domain
+++   are quotients of sums, where each term in the sum is a univariate Puiseux
+++   series times the exponential of a univariate Puiseux series.
+ExponentialExpansion(R,FE,var,cen): Exports == Implementation where
+  R   : Join(OrderedSet,RetractableTo Integer,_
+             LinearlyExplicitRingOver Integer,GcdDomain)
+  FE  : Join(AlgebraicallyClosedField,TranscendentalFunctionCategory,_
+             FunctionSpace R)
+  var : Symbol
+  cen : FE
+  RN       ==> Fraction Integer
+  UPXS     ==> UnivariatePuiseuxSeries(FE,var,cen)
+  EXPUPXS  ==> ExponentialOfUnivariatePuiseuxSeries(FE,var,cen)
+  UPXSSING ==> UnivariatePuiseuxSeriesWithExponentialSingularity(R,FE,var,cen)
+  OFE      ==> OrderedCompletion FE
+  Result   ==> Union(OFE,"failed")
+  PxRec    ==> Record(k: Fraction Integer,c:FE)
+  Term     ==> Record(%coef:UPXS,%expon:EXPUPXS,%expTerms:List PxRec)
+  TypedTerm ==> Record(%term:Term,%type:String)
+  SIGNEF   ==> ElementaryFunctionSign(R,FE)
+
+  Exports ==> Join(QuotientFieldCategory UPXSSING,RetractableTo UPXS) with
+    limitPlus : % -> Union(OFE,"failed")
+      ++ limitPlus(f(var)) returns \spad{limit(var -> a+,f(var))}.
+    coerce: UPXS -> %
+      ++ coerce(f) converts a \spadtype{UnivariatePuiseuxSeries} to
+      ++ an \spadtype{ExponentialExpansion}.
+
+  Implementation ==> Fraction(UPXSSING) add
+    coeff : Term -> UPXS
+    exponent : Term -> EXPUPXS
+    upxssingIfCan : % -> Union(UPXSSING,"failed")
+    seriesQuotientLimit: (UPXS,UPXS) -> Union(OFE,"failed")
+    seriesQuotientInfinity: (UPXS,UPXS) -> Union(OFE,"failed")
+
+    Rep := Fraction UPXSSING
+
+    ZEROCOUNT : RN := 1000/1
+
+    coeff term == term.%coef
+    exponent term == term.%expon
+
+    --!! why is this necessary?
+    --!! code can run forever in retractIfCan if original assignment
+    --!! for 'ff' is used
+    upxssingIfCan f ==
+--      one? denom f => numer f
+      (denom f = 1) => numer f
+      "failed"
+
+    retractIfCan(f:%):Union(UPXS,"failed") ==
+      --ff := (retractIfCan$Rep)(f)@Union(UPXSSING,"failed")
+      --ff case "failed" => "failed"
+      (ff := upxssingIfCan f) case "failed" => "failed"
+      (fff := retractIfCan(ff::UPXSSING)@Union(UPXS,"failed")) case "failed" =>
+        "failed"
+      fff :: UPXS
+
+    f:UPXSSING / g:UPXSSING ==
+      (rec := recip g) case "failed" => f /$Rep g
+      f * (rec :: UPXSSING) :: %
+
+    f:% / g:% ==
+      (rec := recip numer g) case "failed" => f /$Rep g
+      (rec :: UPXSSING) * (denom g) * f
+
+    coerce(f:UPXS) == f :: UPXSSING :: %
+
+    seriesQuotientLimit(num,den) ==
+      -- limit of the quotient of two series
+      series := num / den
+      (ord := order(series,1)) > 0 => 0
+      coef := coefficient(series,ord)
+      member?(var,variables coef) => "failed"
+      ord = 0 => coef :: OFE
+      (sig := sign(coef)$SIGNEF) case "failed" => return "failed"
+      (sig :: Integer) = 1 => plusInfinity()
+      minusInfinity()
+
+    seriesQuotientInfinity(num,den) ==
+      -- infinite limit: plus or minus?
+      -- look at leading coefficients of series to tell
+      (numOrd := order(num,ZEROCOUNT)) = ZEROCOUNT => "failed"
+      (denOrd := order(den,ZEROCOUNT)) = ZEROCOUNT => "failed"
+      cc := coefficient(num,numOrd)/coefficient(den,denOrd)
+      member?(var,variables cc) => "failed"
+      (sig := sign(cc)$SIGNEF) case "failed" => return "failed"
+      (sig :: Integer) = 1 => plusInfinity()
+      minusInfinity()
+
+    limitPlus f ==
+      zero? f => 0
+      (den := denom f) = 1 => limitPlus numer f
+      (numerTerm := dominantTerm(num := numer f)) case "failed" => "failed"
+      numType := (numTerm := numerTerm :: TypedTerm).%type
+      (denomTerm := dominantTerm den) case "failed" => "failed"
+      denType := (denTerm := denomTerm :: TypedTerm).%type
+      numExpon := exponent numTerm.%term; denExpon := exponent denTerm.%term
+      numCoef := coeff numTerm.%term; denCoef := coeff denTerm.%term
+      -- numerator tends to zero exponentially
+      (numType = "zero") =>
+        -- denominator tends to zero exponentially
+        (denType = "zero") =>
+          (exponDiff := numExpon - denExpon) = 0 =>
+            seriesQuotientLimit(numCoef,denCoef)
+          expCoef := coefficient(exponDiff,order exponDiff)
+          (sig := sign(expCoef)$SIGNEF) case "failed" => return "failed"
+          (sig :: Integer) = -1 => 0
+          seriesQuotientInfinity(numCoef,denCoef)
+        0 -- otherwise limit is zero
+      -- numerator is a Puiseux series
+      (numType = "series") =>
+        -- denominator tends to zero exponentially
+        (denType = "zero") =>
+          seriesQuotientInfinity(numCoef,denCoef)
+        -- denominator is a series
+        (denType = "series") => seriesQuotientLimit(numCoef,denCoef)
+        0
+      -- remaining case: numerator tends to infinity exponentially
+      -- denominator tends to infinity exponentially
+      (denType = "infinity") =>
+        (exponDiff := numExpon - denExpon) = 0 =>
+          seriesQuotientLimit(numCoef,denCoef)
+        expCoef := coefficient(exponDiff,order exponDiff)
+        (sig := sign(expCoef)$SIGNEF) case "failed" => return "failed"
+        (sig :: Integer) = -1 => 0
+        seriesQuotientInfinity(numCoef,denCoef)
+      -- denominator tends to zero exponentially or is a series
+      seriesQuotientInfinity(numCoef,denCoef)
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain EXPR Expression}
+<<Expression.input>>=
+-- expr.spad.pamphlet Expression.input
+)spool Expression.output
+)set message test on
+)set message auto off
+)clear all
+--S 1
+sin(x) + 3*cos(x)**2
+--R 
+--R
+--R                        2
+--R   (1)  sin(x) + 3cos(x)
+--R                                                     Type: Expression Integer
+--E 1
+
+--S 2
+tan(x) - 3.45*x
+--R 
+--R
+--R   (2)  tan(x) - 3.45 x
+--R                                                       Type: Expression Float
+--E 2
+
+--S 3
+(tan sqrt 7 - sin sqrt 11)**2 / (4 - cos(x - y))
+--R 
+--R
+--R               +-+ 2         +--+      +-+         +--+ 2
+--R        - tan(\|7 )  + 2sin(\|11 )tan(\|7 ) - sin(\|11 )
+--R   (3)  -------------------------------------------------
+--R                          cos(y - x) - 4
+--R                                                     Type: Expression Integer
+--E 3
+
+--S 4
+log(exp  x)@Expression(Integer)
+--R 
+--R
+--R   (4)  x
+--R                                                     Type: Expression Integer
+--E 4
+
+--S 5
+log(exp  x)@Expression(Complex Integer)
+--R 
+--R
+--R              x
+--R   (5)  log(%e )
+--R                                             Type: Expression Complex Integer
+--E 5
+
+--S 6
+sqrt 3 + sqrt(2 + sqrt(-5))
+--R 
+--R
+--R         +----------+
+--R         | +---+         +-+
+--R   (6)  \|\|- 5  + 2  + \|3
+--R                                                        Type: AlgebraicNumber
+--E 6
+
+--S 7
+% :: Expression Integer
+--R 
+--R
+--R         +----------+
+--R         | +---+         +-+
+--R   (7)  \|\|- 5  + 2  + \|3
+--R                                                     Type: Expression Integer
+--E 7
+
+--S 8
+height mainKernel sin(x + 4)
+--R 
+--R
+--R   (8)  2
+--R                                                        Type: PositiveInteger
+--E 8
+
+--S 9
+e := (sin(x) - 4)**2 / ( 1 - 2*y*sqrt(- y) ) 
+--R 
+--R
+--R                2
+--R        - sin(x)  + 8sin(x) - 16
+--R   (9)  ------------------------
+--R                 +---+
+--R              2y\|- y  - 1
+--R                                                     Type: Expression Integer
+--E 9
+
+--S 10
+numer e 
+--R 
+--R
+--R                 2
+--R   (10)  - sin(x)  + 8sin(x) - 16
+--R        Type: SparseMultivariatePolynomial(Integer,Kernel Expression Integer)
+--E 10
+
+--S 11
+denom e
+--R 
+--R
+--R            +---+
+--R   (11)  2y\|- y  - 1
+--R        Type: SparseMultivariatePolynomial(Integer,Kernel Expression Integer)
+--E 11
+
+--S 12
+D(e, x) 
+--R 
+--R
+--R                                        +---+
+--R         (4y cos(x)sin(x) - 16y cos(x))\|- y  - 2cos(x)sin(x) + 8cos(x)
+--R   (12)  --------------------------------------------------------------
+--R                                  +---+     3
+--R                               4y\|- y  + 4y  - 1
+--R                                                     Type: Expression Integer
+--E 12
+
+--S 13
+D(e, [x, y], [1, 2])
+--R 
+--R
+--R   (13)
+--R                7       4                      7        4         +---+
+--R       ((- 2304y  + 960y )cos(x)sin(x) + (9216y  - 3840y )cos(x))\|- y
+--R     + 
+--R              9        6       3
+--R       (- 960y  + 2160y  - 180y  - 3)cos(x)sin(x)
+--R     + 
+--R             9        6       3
+--R       (3840y  - 8640y  + 720y  + 12)cos(x)
+--R  /
+--R            12        9        6       3      +---+        11        8       5
+--R       (256y   - 1792y  + 1120y  - 112y  + 1)\|- y  - 1024y   + 1792y  - 448y
+--R     + 
+--R          2
+--R       16y
+--R                                                     Type: Expression Integer
+--E 13
+
+--S 14
+complexNumeric(cos(2 - 3*%i))
+--R 
+--R
+--R   (14)  - 4.1896256909 688072301 + 9.1092278937 55336598 %i
+--R                                                          Type: Complex Float
+--E 14
+
+--S 15
+numeric(tan 3.8)
+--R 
+--R
+--R   (15)  0.7735560905 0312607286
+--R                                                                  Type: Float
+--E 15
+
+--S 16
+e2 := cos(x**2 - y + 3) 
+--R 
+--R
+--R                  2
+--R   (16)  cos(y - x  - 3)
+--R                                                     Type: Expression Integer
+--E 16
+
+--S 17
+e3 := asin(e2) - %pi/2
+--R 
+--R
+--R                2
+--R   (17)  - y + x  + 3
+--R                                                     Type: Expression Integer
+--E 17
+
+--S 18
+e3 :: Polynomial Integer
+--R 
+--R
+--R                2
+--R   (18)  - y + x  + 3
+--R                                                     Type: Polynomial Integer
+--E 18
+
+--S 19
+e3 :: DMP([x, y], Integer) 
+--R 
+--R
+--R          2
+--R   (19)  x  - y + 3
+--R                       Type: DistributedMultivariatePolynomial([x,y],Integer)
+--E 19
+
+--S 20
+sin %pi
+--R 
+--R
+--R   (20)  0
+--R                                                     Type: Expression Integer
+--E 20
+
+--S 21
+cos(%pi / 4)
+--R 
+--R
+--R          +-+
+--R         \|2
+--R   (21)  ----
+--R           2
+--R                                                     Type: Expression Integer
+--E 21
+
+--S 22
+tan(x)**6 + 3*tan(x)**4 + 3*tan(x)**2 + 1 
+--R 
+--R
+--R               6          4          2
+--R   (22)  tan(x)  + 3tan(x)  + 3tan(x)  + 1
+--R                                                     Type: Expression Integer
+--E 22
+
+--S 23
+simplify % 
+--R 
+--R
+--R            1
+--R   (23)  -------
+--R               6
+--R         cos(x)
+--R                                                     Type: Expression Integer
+--E 23
+)spool
+)lisp (bye)
+@
+<<Expression.help>>=
+====================================================================
+Expression examples
+====================================================================
+
+Expression is a constructor that creates domains whose objects
+can have very general symbolic forms.  Here are some examples:
+
+This is an object of type Expression Integer.
+
+  sin(x) + 3*cos(x)**2
+
+This is an object of type Expression Float.
+
+  tan(x) - 3.45*x
+
+This object contains symbolic function applications, sums,
+products, square roots, and a quotient.
+
+  (tan sqrt 7 - sin sqrt 11)**2 / (4 - cos(x - y))
+
+As you can see, Expression actually takes an argument domain.  The
+coefficients of the terms within the expression belong to the argument
+domain.  Integer and Float, along with Complex Integer and Complex
+Float are the most common coefficient domains.
+
+The choice of whether to use a Complex coefficient domain or not is
+important since Axiom can perform some simplifications on real-valued
+objects
+
+  log(exp  x)@Expression(Integer)
+
+... which are not valid on complex ones.
+
+  log(exp  x)@Expression(Complex Integer)
+
+Many potential coefficient domains, such as AlgebraicNumber, are not
+usually used because Expression can subsume them.
+
+  sqrt 3 + sqrt(2 + sqrt(-5))
+
+  % :: Expression Integer
+
+Note that we sometimes talk about "an object of type Expression."
+This is not really correct because we should say, for example, "an
+object of type Expression Integer" or "an object of type Expression
+Float."  By a similar abuse of language, when we refer to an
+"expression" in this section we will mean an object of type Expression
+R for some domain R.
+
+The Axiom documentation contains many examples of the use of
+Expression.  For the rest of this section, we'll give you some
+pointers to those examples plus give you some idea of how to
+manipulate expressions.
+
+It is important for you to know that Expression creates domains that
+have category Field.  Thus you can invert any non-zero expression and
+you shouldn't expect an operation like factor to give you much
+information.  You can imagine expressions as being represented as
+quotients of "multivariate" polynomials where the "variables" are
+kernels. A kernel can either be a symbol such as x or a symbolic
+function application like sin(x + 4).  The second example is actually
+a nested kernel since the argument to sin contains the kernel x.
+
+  height mainKernel sin(x + 4)
+
+Actually, the argument to sin is an expression, and so the structure
+of Expression is recursive. See Kernel which demonstrates how to
+extract the kernels in an expression.
+
+Use the HyperDoc Browse facility to see what operations are applicable
+to expression.  At the time of this writing, there were 262 operations
+with 147 distinct name in Expression Integer.  For example, numer and
+denom extract the numerator and denominator of an expression.
+
+  e := (sin(x) - 4)**2 / ( 1 - 2*y*sqrt(- y) ) 
+
+  numer e 
+
+  denom e
+
+Use D to compute partial derivatives.
+
+  D(e, x) 
+
+  D(e, [x, y], [1, 2])
+
+When an expression involves no ``symbol kernels'' (for example, x), it
+may be possible to numerically evaluate the expression.
+
+If you suspect the evaluation will create a complex number, use 
+complexNumeric.
+
+  complexNumeric(cos(2 - 3*%i))
+
+If you know it will be real, use numeric.
+
+  numeric(tan 3.8)
+
+The numeric operation will display an error message if the evaluation
+yields a calue with an non-zero imaginary part.  Both of these
+operations have an optional second argument n which specifies that the
+accuracy of the approximation be up to n decimal places.
+
+When an expression involves no "symbolic application" kernels, it
+may be possible to convert it a polynomial or rational function in the
+variables that are present.
+
+  e2 := cos(x**2 - y + 3) 
+
+  e3 := asin(e2) - %pi/2
+
+  e3 :: Polynomial Integer
+
+This also works for the polynomial types where specific variables
+and their ordering are given.
+
+  e3 :: DMP([x, y], Integer) 
+
+Finally, a certain amount of simplication takes place as expressions
+are constructed.
+
+  sin %pi
+
+  cos(%pi / 4)
+
+For simplications that involve multiple terms of the expression, use
+simplify.
+
+  tan(x)**6 + 3*tan(x)**4 + 3*tan(x)**2 + 1 
+
+  simplify % 
+
+See Also:
+o )show Kernel
+o )show Expression
+o $AXIOM/doc/src/algebra/void.spad.dvi
+
+@
+\pagehead{Expression}{EXPR}
+\pagepic{ps/v103expression.ps}{EXPR}{1.00}
+See also:\\
+\refto{Pi}{HACKPI}
+<<domain EXPR Expression>>=
+)abbrev domain EXPR Expression
+++ Top-level mathematical expressions
+++ Author: Manuel Bronstein
+++ Date Created: 19 July 1988
+++ Date Last Updated: October 1993 (P.Gianni), February 1995 (MB)
+++ Description: Expressions involving symbolic functions.
+++ Keywords: operator, kernel, function.
+Expression(R:OrderedSet): Exports == Implementation where
+  Q   ==> Fraction Integer
+  K   ==> Kernel %
+  MP  ==> SparseMultivariatePolynomial(R, K)
+  AF  ==> AlgebraicFunction(R, %)
+  EF  ==> ElementaryFunction(R, %)
+  CF  ==> CombinatorialFunction(R, %)
+  LF  ==> LiouvillianFunction(R, %)
+  AN  ==> AlgebraicNumber
+  KAN ==> Kernel AN
+  FSF ==> FunctionalSpecialFunction(R, %)
+  ESD ==> ExpressionSpace_&(%)
+  FSD ==> FunctionSpace_&(%, R)
+  SYMBOL ==> "%symbol"
+  ALGOP  ==> "%alg"
+  POWER  ==> "%power"::Symbol
+  SUP    ==> SparseUnivariatePolynomial
+
+  Exports ==> FunctionSpace R with
+    if R has IntegralDomain then
+      AlgebraicallyClosedFunctionSpace R
+      TranscendentalFunctionCategory
+      CombinatorialOpsCategory
+      LiouvillianFunctionCategory
+      SpecialFunctionCategory
+      reduce: % -> %
+        ++ reduce(f) simplifies all the unreduced algebraic quantities
+        ++ present in f by applying their defining relations.
+      number?: % -> Boolean
+	++ number?(f) tests if f is rational
+      simplifyPower: (%,Integer) -> %
+	++ simplifyPower?(f,n) \undocumented{}
+      if R has GcdDomain then
+        factorPolynomial : SUP  % -> Factored SUP %
+	   ++ factorPolynomial(p) \undocumented{}
+        squareFreePolynomial : SUP % -> Factored SUP %
+	   ++ squareFreePolynomial(p) \undocumented{}
+      if R has RetractableTo Integer then RetractableTo AN
+
+  Implementation ==> add
+    import KernelFunctions2(R, %)
+
+    retNotUnit     : % -> R
+    retNotUnitIfCan: % -> Union(R, "failed")
+
+    belong? op == true
+
+    retNotUnit x ==
+      (u := constantIfCan(k := retract(x)@K)) case R => u::R
+      error "Not retractable"
+
+    retNotUnitIfCan x ==
+      (r := retractIfCan(x)@Union(K,"failed")) case "failed" => "failed"
+      constantIfCan(r::K)
+
+    if R has IntegralDomain then
+      reduc  : (%, List Kernel %) -> %
+      commonk   : (%, %) -> List K
+      commonk0  : (List K, List K) -> List K
+      toprat    : % -> %
+      algkernels: List K -> List K
+      evl       : (MP, K, SparseUnivariatePolynomial %) -> Fraction MP
+      evl0      : (MP, K) -> SparseUnivariatePolynomial Fraction MP
+
+      Rep := Fraction MP
+      0                == 0$Rep
+      1                == 1$Rep
+--      one? x           == one?(x)$Rep
+      one? x           == (x = 1)$Rep
+      zero? x          == zero?(x)$Rep
+      - x:%            == -$Rep x
+      n:Integer * x:%  == n *$Rep x
+      coerce(n:Integer) ==  coerce(n)$Rep@Rep::%
+      x:% * y:%        == reduc(x *$Rep y, commonk(x, y))
+      x:% + y:%        == reduc(x +$Rep y, commonk(x, y))
+      (x:% - y:%):%    == reduc(x -$Rep y, commonk(x, y))
+      x:% / y:%        == reduc(x /$Rep y, commonk(x, y))
+
+      number?(x:%):Boolean ==
+        if R has RetractableTo(Integer) then
+          ground?(x) or ((retractIfCan(x)@Union(Q,"failed")) case Q)
+        else
+          ground?(x)
+
+      simplifyPower(x:%,n:Integer):% ==
+        k : List K := kernels x
+        is?(x,POWER) =>
+          -- Look for a power of a number in case we can do a simplification
+          args : List % := argument first k
+          not(#args = 2) => error "Too many arguments to **"
+          number?(args.1) =>
+             reduc((args.1) **$Rep n, algkernels kernels (args.1))**(args.2)
+          (first args)**(n*second(args))
+        reduc(x **$Rep n, algkernels k)
+
+      x:% ** n:NonNegativeInteger ==
+        n = 0 => 1$%
+        n = 1 => x
+        simplifyPower(numerator x,n pretend Integer) / simplifyPower(denominator x,n pretend Integer)
+
+      x:% ** n:Integer ==
+        n = 0 => 1$%
+        n = 1 => x
+        n = -1 => 1/x
+        simplifyPower(numerator x,n) / simplifyPower(denominator x,n)
+
+      x:% ** n:PositiveInteger == 
+        n = 1 => x
+        simplifyPower(numerator x,n pretend Integer) / simplifyPower(denominator x,n pretend Integer)
+
+      x:% < y:%        == x <$Rep y
+      x:% = y:%        == x =$Rep y
+      numer x          == numer(x)$Rep
+      denom x          == denom(x)$Rep
+      coerce(p:MP):%   == coerce(p)$Rep
+      reduce x         == reduc(x, algkernels kernels x)
+      commonk(x, y)    == commonk0(algkernels kernels x, algkernels kernels y)
+      algkernels l     == select_!(has?(operator #1, ALGOP), l)
+      toprat f == ratDenom(f, algkernels kernels f)$AlgebraicManipulations(R, %)
+
+      x:MP / y:MP ==
+        reduc(x /$Rep y,commonk0(algkernels variables x,algkernels variables y))
+
+-- since we use the reduction from FRAC SMP which asssumes that the
+-- variables are independent, we must remove algebraic from the denominators
+      reducedSystem(m:Matrix %):Matrix(R) ==
+        mm:Matrix(MP) := reducedSystem(map(toprat, m))$Rep
+        reducedSystem(mm)$MP
+
+-- since we use the reduction from FRAC SMP which asssumes that the
+-- variables are independent, we must remove algebraic from the denominators
+      reducedSystem(m:Matrix %, v:Vector %):
+       Record(mat:Matrix R, vec:Vector R) ==
+        r:Record(mat:Matrix MP, vec:Vector MP) :=
+          reducedSystem(map(toprat, m), map(toprat, v))$Rep
+        reducedSystem(r.mat, r.vec)$MP
+
+-- The result MUST be left sorted deepest first   MB 3/90
+      commonk0(x, y) ==
+        ans := empty()$List(K)
+        for k in reverse_! x repeat if member?(k, y) then ans := concat(k, ans)
+        ans
+
+      rootOf(x:SparseUnivariatePolynomial %, v:Symbol) == rootOf(x,v)$AF
+      pi()                      == pi()$EF
+      exp x                     == exp(x)$EF
+      log x                     == log(x)$EF
+      sin x                     == sin(x)$EF
+      cos x                     == cos(x)$EF
+      tan x                     == tan(x)$EF
+      cot x                     == cot(x)$EF
+      sec x                     == sec(x)$EF
+      csc x                     == csc(x)$EF
+      asin x                    == asin(x)$EF
+      acos x                    == acos(x)$EF
+      atan x                    == atan(x)$EF
+      acot x                    == acot(x)$EF
+      asec x                    == asec(x)$EF
+      acsc x                    == acsc(x)$EF
+      sinh x                    == sinh(x)$EF
+      cosh x                    == cosh(x)$EF
+      tanh x                    == tanh(x)$EF
+      coth x                    == coth(x)$EF
+      sech x                    == sech(x)$EF
+      csch x                    == csch(x)$EF
+      asinh x                   == asinh(x)$EF
+      acosh x                   == acosh(x)$EF
+      atanh x                   == atanh(x)$EF
+      acoth x                   == acoth(x)$EF
+      asech x                   == asech(x)$EF
+      acsch x                   == acsch(x)$EF
+
+      abs x                     == abs(x)$FSF
+      Gamma x                   == Gamma(x)$FSF
+      Gamma(a, x)               == Gamma(a, x)$FSF
+      Beta(x,y)                 == Beta(x,y)$FSF
+      digamma x                 == digamma(x)$FSF
+      polygamma(k,x)            == polygamma(k,x)$FSF
+      besselJ(v,x)              == besselJ(v,x)$FSF
+      besselY(v,x)              == besselY(v,x)$FSF
+      besselI(v,x)              == besselI(v,x)$FSF
+      besselK(v,x)              == besselK(v,x)$FSF
+      airyAi x                  == airyAi(x)$FSF
+      airyBi x                  == airyBi(x)$FSF
+
+      x:% ** y:%                == x **$CF y
+      factorial x               == factorial(x)$CF
+      binomial(n, m)            == binomial(n, m)$CF
+      permutation(n, m)         == permutation(n, m)$CF
+      factorials x              == factorials(x)$CF
+      factorials(x, n)          == factorials(x, n)$CF
+      summation(x:%, n:Symbol)           == summation(x, n)$CF
+      summation(x:%, s:SegmentBinding %) == summation(x, s)$CF
+      product(x:%, n:Symbol)             == product(x, n)$CF
+      product(x:%, s:SegmentBinding %)   == product(x, s)$CF
+
+      erf x                              == erf(x)$LF
+      Ei x                               == Ei(x)$LF
+      Si x                               == Si(x)$LF
+      Ci x                               == Ci(x)$LF
+      li x                               == li(x)$LF
+      dilog x                            == dilog(x)$LF
+      integral(x:%, n:Symbol)            == integral(x, n)$LF
+      integral(x:%, s:SegmentBinding %)  == integral(x, s)$LF
+
+      operator op ==
+        belong?(op)$AF  => operator(op)$AF
+        belong?(op)$EF  => operator(op)$EF
+        belong?(op)$CF  => operator(op)$CF
+        belong?(op)$LF  => operator(op)$LF
+        belong?(op)$FSF => operator(op)$FSF
+        belong?(op)$FSD => operator(op)$FSD
+        belong?(op)$ESD => operator(op)$ESD
+        nullary? op and has?(op, SYMBOL) => operator(kernel(name op)$K)
+        (n := arity op) case "failed" => operator name op
+        operator(name op, n::NonNegativeInteger)
+
+      reduc(x, l) ==
+        for k in l repeat
+          p := minPoly k
+          x := evl(numer x, k, p) /$Rep evl(denom x, k, p)
+        x
+
+      evl0(p, k) ==
+        numer univariate(p::Fraction(MP),
+                     k)$PolynomialCategoryQuotientFunctions(IndexedExponents K,
+                                                            K,R,MP,Fraction MP)
+
+      -- uses some operations from Rep instead of % in order not to
+      -- reduce recursively during those operations.
+      evl(p, k, m) ==
+        degree(p, k) < degree m => p::Fraction(MP)
+        (((evl0(p, k) pretend SparseUnivariatePolynomial($)) rem m)
+           pretend SparseUnivariatePolynomial Fraction MP) (k::MP::Fraction(MP))
+
+      if R has GcdDomain then
+        noalg?: SUP % -> Boolean
+
+        noalg? p ==
+          while p ^= 0 repeat
+            not empty? algkernels kernels leadingCoefficient p => return false
+            p := reductum p
+          true
+
+        gcdPolynomial(p:SUP %, q:SUP %) ==
+          noalg? p and noalg? q => gcdPolynomial(p, q)$Rep
+          gcdPolynomial(p, q)$GcdDomain_&(%)
+
+        factorPolynomial(x:SUP %) : Factored SUP % ==
+          uf:= factor(x pretend SUP(Rep))$SupFractionFactorizer(
+                                          IndexedExponents K,K,R,MP)
+          uf pretend Factored SUP %
+
+        squareFreePolynomial(x:SUP %) : Factored SUP % ==
+          uf:= squareFree(x pretend SUP(Rep))$SupFractionFactorizer(
+                                          IndexedExponents K,K,R,MP)
+          uf pretend Factored SUP %
+
+      if R is AN then
+        -- this is to force the coercion R -> EXPR R to be used
+        -- instead of the coercioon AN -> EXPR R which loops.
+        -- simpler looking code will fail! MB 10/91
+        coerce(x:AN):% == (monomial(x, 0$IndexedExponents(K))$MP)::%
+
+      if (R has RetractableTo Integer) then
+        x:% ** r:Q                           == x **$AF r
+        minPoly k                            == minPoly(k)$AF
+        definingPolynomial x                 == definingPolynomial(x)$AF
+        retract(x:%):Q                       == retract(x)$Rep
+        retractIfCan(x:%):Union(Q, "failed") == retractIfCan(x)$Rep
+
+        if not(R is AN) then
+          k2expr  : KAN -> %
+          smp2expr: SparseMultivariatePolynomial(Integer, KAN) -> %
+          R2AN    : R  -> Union(AN, "failed")
+          k2an    : K  -> Union(AN, "failed")
+          smp2an  : MP -> Union(AN, "failed")
+
+
+          coerce(x:AN):% == smp2expr(numer x) / smp2expr(denom x)
+          k2expr k       == map(#1::%, k)$ExpressionSpaceFunctions2(AN, %)
+
+          smp2expr p ==
+            map(k2expr,#1::%,p)$PolynomialCategoryLifting(IndexedExponents KAN,
+                   KAN, Integer, SparseMultivariatePolynomial(Integer, KAN), %)
+
+          retractIfCan(x:%):Union(AN, "failed") ==
+            ((n:= smp2an numer x) case AN) and ((d:= smp2an denom x) case AN)
+                 => (n::AN) / (d::AN)
+            "failed"
+
+          R2AN r ==
+            (u := retractIfCan(r::%)@Union(Q, "failed")) case Q => u::Q::AN
+            "failed"
+
+          k2an k ==
+            not(belong?(op := operator k)$AN) => "failed"
+            arg:List(AN) := empty()
+            for x in argument k repeat
+              if (a := retractIfCan(x)@Union(AN, "failed")) case "failed" then
+                return "failed"
+              else arg := concat(a::AN, arg)
+            (operator(op)$AN) reverse_!(arg)
+
+          smp2an p ==
+            (x1 := mainVariable p) case "failed" => R2AN leadingCoefficient p
+            up := univariate(p, k := x1::K)
+            (t  := k2an k) case "failed" => "failed"
+            ans:AN := 0
+            while not ground? up repeat
+              (c:=smp2an leadingCoefficient up) case "failed" => return "failed"
+              ans := ans + (c::AN) * (t::AN) ** (degree up)
+              up  := reductum up
+            (c := smp2an leadingCoefficient up) case "failed" => "failed"
+            ans + c::AN
+
+      if R has ConvertibleTo InputForm then
+        convert(x:%):InputForm == convert(x)$Rep
+        import MakeUnaryCompiledFunction(%, %, %)
+        eval(f:%, op: BasicOperator, g:%, x:Symbol):% == 
+          eval(f,[op],[g],x)
+        eval(f:%, ls:List BasicOperator, lg:List %, x:Symbol) ==
+	  -- handle subsrcipted symbols by renaming -> eval -> renaming back
+          llsym:List List Symbol:=[variables g for g in lg]
+          lsym:List Symbol:= removeDuplicates concat llsym
+          lsd:List Symbol:=select (scripted?,lsym)
+          empty? lsd=> eval(f,ls,[compiledFunction(g, x) for g in lg])
+          ns:List Symbol:=[new()$Symbol for i in lsd]
+          lforwardSubs:List Equation % := [(i::%)= (j::%) for i in lsd for j in ns]
+          lbackwardSubs:List Equation % := [(j::%)= (i::%) for i in lsd for j in ns]
+          nlg:List % :=[subst(g,lforwardSubs) for g in lg]
+          res:% :=eval(f, ls, [compiledFunction(g, x) for g in nlg])
+          subst(res,lbackwardSubs)
+      if R has PatternMatchable Integer then
+        patternMatch(x:%, p:Pattern Integer,
+         l:PatternMatchResult(Integer, %)) ==
+          patternMatch(x, p, l)$PatternMatchFunctionSpace(Integer, R, %)
+
+      if R has PatternMatchable Float then
+        patternMatch(x:%, p:Pattern Float,
+         l:PatternMatchResult(Float, %)) ==
+          patternMatch(x, p, l)$PatternMatchFunctionSpace(Float, R, %)
+
+    else  -- R is not an integral domain
+      operator op ==
+        belong?(op)$FSD => operator(op)$FSD
+        belong?(op)$ESD => operator(op)$ESD
+        nullary? op and has?(op, SYMBOL) => operator(kernel(name op)$K)
+        (n := arity op) case "failed" => operator name op
+        operator(name op, n::NonNegativeInteger)
+
+      if R has Ring then
+        Rep := MP
+        0              == 0$Rep
+        1              == 1$Rep
+        - x:%          == -$Rep x
+        n:Integer *x:% == n *$Rep x
+        x:% * y:%      == x *$Rep y
+        x:% + y:%      == x +$Rep y
+        x:% = y:%      == x =$Rep y
+        x:% < y:%      == x <$Rep y
+        numer x        == x@Rep
+        coerce(p:MP):% == p
+
+        reducedSystem(m:Matrix %):Matrix(R) ==
+          reducedSystem(m)$Rep
+
+        reducedSystem(m:Matrix %, v:Vector %):
+         Record(mat:Matrix R, vec:Vector R) ==
+          reducedSystem(m, v)$Rep
+
+        if R has ConvertibleTo InputForm then
+          convert(x:%):InputForm == convert(x)$Rep
+
+        if R has PatternMatchable Integer then
+          kintmatch: (K,Pattern Integer,PatternMatchResult(Integer,Rep))
+                                     -> PatternMatchResult(Integer, Rep)
+
+          kintmatch(k, p, l) ==
+            patternMatch(k, p, l pretend PatternMatchResult(Integer, %)
+              )$PatternMatchKernel(Integer, %)
+                pretend PatternMatchResult(Integer, Rep)
+
+          patternMatch(x:%, p:Pattern Integer,
+           l:PatternMatchResult(Integer, %)) ==
+            patternMatch(x@Rep, p,
+                         l pretend PatternMatchResult(Integer, Rep),
+                          kintmatch
+                           )$PatternMatchPolynomialCategory(Integer,
+                            IndexedExponents K, K, R, Rep)
+                              pretend PatternMatchResult(Integer, %)
+
+        if R has PatternMatchable Float then
+          kfltmatch: (K, Pattern Float, PatternMatchResult(Float, Rep))
+                                     -> PatternMatchResult(Float, Rep)
+
+          kfltmatch(k, p, l) ==
+            patternMatch(k, p, l pretend PatternMatchResult(Float, %)
+              )$PatternMatchKernel(Float, %)
+                pretend PatternMatchResult(Float, Rep)
+
+          patternMatch(x:%, p:Pattern Float,
+           l:PatternMatchResult(Float, %)) ==
+            patternMatch(x@Rep, p,
+                         l pretend PatternMatchResult(Float, Rep),
+                          kfltmatch
+                           )$PatternMatchPolynomialCategory(Float,
+                            IndexedExponents K, K, R, Rep)
+                              pretend PatternMatchResult(Float, %)
+
+      else   -- R is not even a ring
+        if R has AbelianMonoid then
+          import ListToMap(K, %)
+
+          kereval        : (K, List K, List %) -> %
+          subeval        : (K, List K, List %) -> %
+
+          Rep := FreeAbelianGroup K
+
+          0              == 0$Rep
+          x:% + y:%      == x +$Rep y
+          x:% = y:%      == x =$Rep y
+          x:% < y:%      == x <$Rep y
+          coerce(k:K):%  == coerce(k)$Rep
+          kernels x      == [f.gen for f in terms x]
+          coerce(x:R):%  == (zero? x => 0; constantKernel(x)::%)
+          retract(x:%):R == (zero? x => 0; retNotUnit x)
+          coerce(x:%):OutputForm == coerce(x)$Rep
+          kereval(k, lk, lv) == match(lk, lv, k, map(eval(#1, lk, lv), #1))
+
+          subeval(k, lk, lv) ==
+            match(lk, lv, k,
+              kernel(operator #1, [subst(a, lk, lv) for a in argument #1]))
+
+          isPlus x ==
+            empty?(l := terms x) or empty? rest l => "failed"
+            [t.exp *$Rep t.gen for t in l]$List(%)
+
+          isMult x ==
+            empty?(l := terms x) or not empty? rest l => "failed"
+            t := first l
+            [t.exp, t.gen]
+
+          eval(x:%, lk:List K, lv:List %) ==
+            _+/[t.exp * kereval(t.gen, lk, lv) for t in terms x]
+
+          subst(x:%, lk:List K, lv:List %) ==
+            _+/[t.exp * subeval(t.gen, lk, lv) for t in terms x]
+
+          retractIfCan(x:%):Union(R, "failed") ==
+            zero? x => 0
+            retNotUnitIfCan x
+
+          if R has AbelianGroup then -(x:%) == -$Rep x
+
+--      else      -- R is not an AbelianMonoid
+--        if R has SemiGroup then
+--    Rep := FreeGroup K
+--    1              == 1$Rep
+--    x:% * y:%      == x *$Rep y
+--    x:% = y:%      == x =$Rep y
+--    coerce(k:K):%  == k::Rep
+--    kernels x      == [f.gen for f in factors x]
+--    coerce(x:R):%  == (one? x => 1; constantKernel x)
+--    retract(x:%):R == (one? x => 1; retNotUnit x)
+--    coerce(x:%):OutputForm == coerce(x)$Rep
+
+--    retractIfCan(x:%):Union(R, "failed") ==
+--      one? x => 1
+--      retNotUnitIfCan x
+
+--    if R has Group then inv(x:%):% == inv(x)$Rep
+
+        else   -- R is nothing
+            import ListToMap(K, %)
+
+            Rep := K
+
+            x:% < y:%      == x <$Rep y
+            x:% = y:%      == x =$Rep y
+            coerce(k:K):%  == k
+            kernels x      == [x pretend K]
+            coerce(x:R):%  == constantKernel x
+            retract(x:%):R == retNotUnit x
+            retractIfCan(x:%):Union(R, "failed") == retNotUnitIfCan x
+            coerce(x:%):OutputForm               == coerce(x)$Rep
+
+            eval(x:%, lk:List K, lv:List %) ==
+              match(lk, lv, x pretend K, map(eval(#1, lk, lv), #1))
+
+            subst(x, lk, lv) ==
+              match(lk, lv, x pretend K,
+                kernel(operator #1, [subst(a, lk, lv) for a in argument #1]))
+
+            if R has ConvertibleTo InputForm then
+              convert(x:%):InputForm == convert(x)$Rep
+
+--          if R has PatternMatchable Integer then
+--            convert(x:%):Pattern(Integer) == convert(x)$Rep
+--
+--            patternMatch(x:%, p:Pattern Integer,
+--             l:PatternMatchResult(Integer, %)) ==
+--              patternMatch(x pretend K,p,l)$PatternMatchKernel(Integer, %)
+--
+--          if R has PatternMatchable Float then
+--            convert(x:%):Pattern(Float) == convert(x)$Rep
+--
+--            patternMatch(x:%, p:Pattern Float,
+--             l:PatternMatchResult(Float, %)) ==
+--              patternMatch(x pretend K, p, l)$PatternMatchKernel(Float, %)
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain EXPUPXS ExponentialOfUnivariatePuiseuxSeries}
+\pagehead{ExponentialOfUnivariatePuiseuxSeries}{EXPUPXS}
+\pagepic{ps/v103exponentialofunivariatepuiseuxseries.ps}{EXPUPXS}{1.00}
+See also:\\
+\refto{UnivariatePuiseuxSeriesWithExponentialSingularity}{UPXSSING}
+\refto{ExponentialExpansion}{EXPEXPAN}
+<<domain EXPUPXS ExponentialOfUnivariatePuiseuxSeries>>=
+)abbrev domain EXPUPXS ExponentialOfUnivariatePuiseuxSeries
+++ Author: Clifton J. Williamson
+++ Date Created: 4 August 1992
+++ Date Last Updated: 27 August 1992
+++ Basic Operations:
+++ Related Domains: UnivariatePuiseuxSeries(FE,var,cen)
+++ Also See:
+++ AMS Classifications:
+++ Keywords: limit, functional expression, power series, essential singularity
+++ Examples:
+++ References:
+++ Description:
+++   ExponentialOfUnivariatePuiseuxSeries is a domain used to represent
+++   essential singularities of functions.  An object in this domain is a
+++   function of the form \spad{exp(f(x))}, where \spad{f(x)} is a Puiseux
+++   series with no terms of non-negative degree.  Objects are ordered
+++   according to order of singularity, with functions which tend more
+++   rapidly to zero or infinity considered to be larger.  Thus, if
+++   \spad{order(f(x)) < order(g(x))}, i.e. the first non-zero term of
+++   \spad{f(x)} has lower degree than the first non-zero term of \spad{g(x)},
+++   then \spad{exp(f(x)) > exp(g(x))}.  If \spad{order(f(x)) = order(g(x))},
+++   then the ordering is essentially random.  This domain is used
+++   in computing limits involving functions with essential singularities.
+ExponentialOfUnivariatePuiseuxSeries(FE,var,cen):_
+      Exports == Implementation where
+  FE  : Join(Field,OrderedSet)
+  var : Symbol
+  cen : FE
+  UPXS ==> UnivariatePuiseuxSeries(FE,var,cen)
+
+  Exports ==> Join(UnivariatePuiseuxSeriesCategory(FE),OrderedAbelianMonoid) _
+        with
+    exponential : UPXS -> %
+      ++ exponential(f(x)) returns \spad{exp(f(x))}.
+      ++ Note: the function does NOT check that \spad{f(x)} has no
+      ++ non-negative terms.
+    exponent : % -> UPXS
+      ++ exponent(exp(f(x))) returns \spad{f(x)}
+    exponentialOrder: % -> Fraction Integer
+      ++ exponentialOrder(exp(c * x **(-n) + ...)) returns \spad{-n}.
+      ++ exponentialOrder(0) returns \spad{0}.
+
+  Implementation ==> UPXS add
+
+    Rep := UPXS
+
+    exponential f == complete f
+    exponent f == f pretend UPXS
+    exponentialOrder f == order(exponent f,0)
+
+    zero? f == empty? entries complete terms f
+
+    f = g ==
+    -- we redefine equality because we know that we are dealing with
+    -- a FINITE series, so there is no danger in computing all terms
+      (entries complete terms f) = (entries complete terms g)
+
+    f < g ==
+      zero? f => not zero? g
+      zero? g => false
+      (ordf := exponentialOrder f) > (ordg := exponentialOrder g) => true
+      ordf < ordg => false
+      (fCoef := coefficient(f,ordf)) = (gCoef := coefficient(g,ordg)) =>
+        reductum(f) < reductum(g)
+      fCoef < gCoef  -- this is "random" if FE is EXPR INT
+
+    coerce(f:%):OutputForm ==
+      ("%e" :: OutputForm) ** ((coerce$Rep)(complete f)@OutputForm)
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain EAB ExtAlgBasis}
+\pagehead{ExtAlgBasis}{EAB}
+\pagepic{ps/v103extalgbasis.ps}{EAB}{1.00}
+See also:\\
+\refto{AntiSymm}{ANTISYM}
+\refto{DeRhamComplex}{DERHAM}
+<<domain EAB ExtAlgBasis>>=
+)abbrev domain EAB ExtAlgBasis
+--% ExtAlgBasis
+++  Author: Larry Lambe
+++  Date created: 03/14/89
+++  Description:
+++  A domain used in the construction of the exterior algebra on a set
+++  X over a ring R.  This domain represents the set of all ordered
+++  subsets of the set X, assumed to be in correspondance with
+++  {1,2,3, ...}.  The ordered subsets are themselves ordered 
+++  lexicographically and are in bijective correspondance with an ordered 
+++  basis of the exterior algebra.  In this domain we are dealing strictly
+++  with the exponents of basis elements which can only be 0 or 1.
+--  Thus we really have L({0,1}).
+++
+++  The multiplicative identity element of the exterior algebra corresponds
+++  to the empty subset of X.  A coerce from List Integer to an
+++  ordered basis element is provided to allow the convenient input of 
+++  expressions. Another exported function forgets the ordered structure
+++  and simply returns the list corresponding to an ordered subset.
+ 
+ExtAlgBasis(): Export == Implement where
+   I   ==> Integer
+   L   ==> List
+   NNI ==> NonNegativeInteger
+ 
+   Export == OrderedSet with
+     coerce     : L I -> %
+	++ coerce(l) converts a list of 0's and 1's into a basis
+	++ element, where 1 (respectively 0) designates that the
+        ++ variable of the corresponding index of l is (respectively, is not)
+        ++ present.
+        ++ Error: if an element of l is not 0 or 1.
+     degree     : %   -> NNI
+	++ degree(x) gives the numbers of 1's in x, i.e., the number
+	++ of non-zero exponents in the basis element that x represents.
+     exponents  : %   -> L I
+	++ exponents(x) converts a domain element into a list of zeros
+	++ and ones corresponding to the exponents in the basis element
+	++ that x represents.
+--   subscripts : %   -> L I
+	-- subscripts(x) looks at the exponents in x and converts 
+	-- them to the proper subscripts
+     Nul        : NNI -> %
+	++ Nul() gives the basis element 1 for the algebra generated
+	++ by n generators.
+ 
+   Implement == add
+     Rep := L I
+     x,y :  %
+
+     x = y == x =$Rep y
+
+     x < y ==
+       null x            => not null y 
+       null y            => false
+       first x = first y => rest x < rest y
+       first x > first y
+
+     coerce(li:(L I)) == 
+       for x in li repeat
+         if x ^= 1 and x ^= 0 then error "coerce: values can only be 0 and 1"
+       li
+
+     degree x         == (_+/x)::NNI
+
+     exponents x      == copy(x @ Rep)
+
+--   subscripts x     ==
+--      cntr:I := 1
+--      result: L I := []
+--      for j in x repeat
+--        if j = 1 then result := cons(cntr,result)
+--        cntr:=cntr+1
+--      reverse_! result
+
+     Nul n            == [0 for i in 1..n]
+
+     coerce x         == coerce(x @ Rep)$(L I)
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain EQ Equation}
+<<Equation.input>>=
+-- equation2.spad.pamphlet Equation.input
+)spool Equation.output
+)set message test on
+)set message auto off
+)clear all
+--S 1
+eq1 := 3*x + 4*y = 5 
+--R 
+--R
+--R   (1)  4y + 3x= 5
+--R                                            Type: Equation Polynomial Integer
+--E 1
+
+--S 2
+eq2 := 2*x + 2*y = 3 
+--R 
+--R
+--R   (2)  2y + 2x= 3
+--R                                            Type: Equation Polynomial Integer
+--E 2
+
+--S 3
+lhs eq1
+--R 
+--R
+--R   (3)  4y + 3x
+--R                                                     Type: Polynomial Integer
+--E 3
+
+--S 4
+rhs eq1
+--R 
+--R
+--R   (4)  5
+--R                                                     Type: Polynomial Integer
+--E 4
+
+--S 5
+eq1 + eq2 
+--R 
+--R
+--R   (5)  6y + 5x= 8
+--R                                            Type: Equation Polynomial Integer
+--E 5
+
+--S 6
+eq1 * eq2 
+--R 
+--R
+--R          2             2
+--R   (6)  8y  + 14x y + 6x = 15
+--R                                            Type: Equation Polynomial Integer
+--E 6
+
+--S 7
+2*eq2 - eq1
+--R 
+--R
+--R   (7)  x= 1
+--R                                            Type: Equation Polynomial Integer
+--E 7
+
+--S 8
+eq1**2
+--R 
+--R
+--R           2             2
+--R   (8)  16y  + 24x y + 9x = 25
+--R                                            Type: Equation Polynomial Integer
+--E 8
+
+--S 9
+if x+1 = y then "equal" else "unequal"
+--R 
+--R
+--R   (9)  "unequal"
+--R                                                                 Type: String
+--E 9
+
+--S 10
+eqpol := x+1 = y 
+--R 
+--R
+--R   (10)  x + 1= y
+--R                                            Type: Equation Polynomial Integer
+--E 10
+
+--S 11
+if eqpol then "equal" else "unequal"
+--R 
+--R
+--R   (11)  "unequal"
+--R                                                                 Type: String
+--E 11
+
+--S 12
+eqpol::Boolean
+--R 
+--R
+--R   (12)  false
+--R                                                                Type: Boolean
+--E 12
+)spool
+)lisp (bye)
+@
+<<Equation.help>>=
+====================================================================
+Equation examples
+====================================================================
+
+The Equation domain provides equations as mathematical objects.  These
+are used, for example, as the input to various solve operations.
+
+Equations are created using the equals symbol, =.
+
+  eq1 := 3*x + 4*y = 5 
+   4y + 3x= 5
+                         Type: Equation Polynomial Integer
+
+  eq2 := 2*x + 2*y = 3 
+   2y + 2x= 3
+                         Type: Equation Polynomial Integer
+
+The left- and right-hand sides of an equation are accessible using
+the operations lhs and rhs.
+
+  lhs eq1
+   4y + 3x
+                         Type: Polynomial Integer
+
+  rhs eq1
+   5
+                         Type: Polynomial Integer
+
+Arithmetic operations are supported and operate on both sides of the
+equation.
+
+  eq1 + eq2 
+   6y + 5x= 8
+                         Type: Equation Polynomial Integer
+
+  eq1 * eq2 
+     2             2
+   8y  + 14x y + 6x = 15
+                         Type: Equation Polynomial Integer
+
+  2*eq2 - eq1
+   x= 1
+                         Type: Equation Polynomial Integer
+
+Equations may be created for any type so the arithmetic operations
+will be defined only when they make sense.  For example, exponentiation 
+is not defined for equations involving non-square matrices.
+
+  eq1**2
+      2             2
+   16y  + 24x y + 9x = 25
+                          Type: Equation Polynomial Integer
+
+Note that an equals symbol is also used to test for equality of values
+in certain contexts.  For example, x+1 and y are unequal as polynomials.
+
+  if x+1 = y then "equal" else "unequal"
+   "unequal"
+                           Type: String
+
+  eqpol := x+1 = y 
+   x + 1= y
+                           Type: Equation Polynomial Integer
+
+If an equation is used where a Boolean value is required, then
+it is evaluated using the equality test from the operand type.
+
+  if eqpol then "equal" else "unequal"
+   "unequal"
+                           Type: String
+
+If one wants a Boolean value rather than an equation, all one has to
+do is ask!
+
+  eqpol::Boolean
+   false
+                           Type: Boolean
+
+See Also:
+o )show Equation
+o $AXIOM/doc/src/algebra/equation2.spad.dvi
+
+@
+\pagehead{Equation}{EQ}
+\pagepic{ps/v103equation.ps}{EQ}{1.00}
+<<domain EQ Equation>>=
+)abbrev domain EQ Equation
+--FOR THE BENEFIT  OF LIBAX0 GENERATION
+++ Author: Stephen M. Watt, enhancements by Johannes Grabmeier
+++ Date Created: April 1985
+++ Date Last Updated: June 3, 1991; September 2, 1992
+++ Basic Operations: =
+++ Related Domains:
+++ Also See:
+++ AMS Classifications:
+++ Keywords: equation
+++ Examples:
+++ References:
+++ Description:
+++   Equations as mathematical objects.  All properties of the basis domain,
+++   e.g. being an abelian group are carried over the equation domain, by
+++   performing the structural operations on the left and on the
+++   right hand side.
+--   The interpreter translates "=" to "equation".  Otherwise, it will
+--   find a modemap for "=" in the domain of the arguments.
+
+Equation(S: Type): public == private where
+  Ex ==> OutputForm
+  public ==> Type with
+    "=": (S, S) -> $
+        ++ a=b creates an equation.
+    equation: (S, S) -> $
+        ++ equation(a,b) creates an equation.
+    swap: $ -> $
+        ++ swap(eq) interchanges left and right hand side of equation eq.
+    lhs: $ -> S
+        ++ lhs(eqn) returns the left hand side of equation eqn.
+    rhs: $ -> S
+        ++ rhs(eqn) returns the right hand side of equation eqn.
+    map: (S -> S, $) -> $
+        ++ map(f,eqn) constructs a new equation by applying f to both
+        ++ sides of eqn.
+    if S has InnerEvalable(Symbol,S) then
+             InnerEvalable(Symbol,S)
+    if S has SetCategory then
+        SetCategory
+        CoercibleTo Boolean
+        if S has Evalable(S) then
+           eval: ($, $) -> $
+               ++ eval(eqn, x=f) replaces x by f in equation eqn.
+           eval: ($, List $) -> $
+               ++ eval(eqn, [x1=v1, ... xn=vn]) replaces xi by vi in equation eqn.
+    if S has AbelianSemiGroup then
+        AbelianSemiGroup
+        "+": (S, $) -> $
+            ++ x+eqn produces a new equation by adding x to both sides of
+            ++ equation eqn.
+        "+": ($, S) -> $
+            ++ eqn+x produces a new equation by adding x to  both sides of
+            ++ equation eqn.
+    if S has AbelianGroup then
+        AbelianGroup
+        leftZero : $ -> $
+          ++ leftZero(eq) subtracts the left hand side.
+        rightZero : $ -> $
+          ++ rightZero(eq) subtracts the right hand side.
+        "-": (S, $) -> $
+            ++ x-eqn produces a new equation by subtracting both sides of
+            ++ equation eqn from x.
+        "-": ($, S) -> $
+            ++ eqn-x produces a new equation by subtracting x from  both sides of
+            ++ equation eqn.
+    if S has SemiGroup then
+        SemiGroup
+        "*": (S, $) -> $
+            ++ x*eqn produces a new equation by multiplying both sides of
+            ++ equation eqn by x.
+        "*": ($, S) -> $
+            ++ eqn*x produces a new equation by multiplying both sides of
+            ++ equation eqn by x.
+    if S has Monoid then
+        Monoid
+        leftOne : $ -> Union($,"failed")
+          ++ leftOne(eq) divides by the left hand side, if possible.
+        rightOne : $ -> Union($,"failed")
+          ++ rightOne(eq) divides by the right hand side, if possible.
+    if S has Group then
+        Group
+        leftOne : $ -> Union($,"failed")
+          ++ leftOne(eq) divides by the left hand side.
+        rightOne : $ -> Union($,"failed")
+          ++ rightOne(eq) divides by the right hand side.
+    if S has Ring then
+      Ring
+      BiModule(S,S)
+    if S has CommutativeRing then
+      Module(S)
+      --Algebra(S)
+    if S has IntegralDomain then
+      factorAndSplit : $ -> List $
+        ++ factorAndSplit(eq) make the right hand side 0 and
+        ++ factors the new left hand side. Each factor is equated
+        ++ to 0 and put into the resulting list without repetitions.
+    if S has PartialDifferentialRing(Symbol) then
+      PartialDifferentialRing(Symbol)
+    if S has Field then
+      VectorSpace(S)
+      "/": ($, $) -> $
+          ++ e1/e2 produces a new equation by dividing the left and right
+          ++ hand sides of equations e1 and e2.
+      inv: $ -> $
+          ++ inv(x) returns the multiplicative inverse of x.
+    if S has ExpressionSpace then
+        subst: ($, $) -> $
+             ++ subst(eq1,eq2) substitutes eq2 into both sides of eq1
+             ++ the lhs of eq2 should be a kernel
+
+  private ==> add
+    Rep := Record(lhs: S, rhs: S)
+    eq1,eq2: $
+    s : S
+    if S has IntegralDomain then
+        factorAndSplit eq ==
+          (S has factor : S -> Factored S) =>
+            eq0 := rightZero eq
+            [equation(rcf.factor,0) for rcf in factors factor lhs eq0]
+          [eq]
+    l:S = r:S      == [l, r]
+    equation(l, r) == [l, r]    -- hack!  See comment above.
+    lhs eqn        == eqn.lhs
+    rhs eqn        == eqn.rhs
+    swap eqn     == [rhs eqn, lhs eqn]
+    map(fn, eqn)   == equation(fn(eqn.lhs), fn(eqn.rhs))
+
+    if S has InnerEvalable(Symbol,S) then
+        s:Symbol
+        ls:List Symbol
+        x:S
+        lx:List S
+        eval(eqn,s,x) == eval(eqn.lhs,s,x) = eval(eqn.rhs,s,x)
+        eval(eqn,ls,lx) == eval(eqn.lhs,ls,lx) = eval(eqn.rhs,ls,lx)
+    if S has Evalable(S) then
+        eval(eqn1:$, eqn2:$):$ ==
+           eval(eqn1.lhs, eqn2 pretend Equation S) =
+               eval(eqn1.rhs, eqn2 pretend Equation S)
+        eval(eqn1:$, leqn2:List $):$ ==
+           eval(eqn1.lhs, leqn2 pretend List Equation S) =
+               eval(eqn1.rhs, leqn2 pretend List Equation S)
+    if S has SetCategory then
+        eq1 = eq2 == (eq1.lhs = eq2.lhs)@Boolean and
+                     (eq1.rhs = eq2.rhs)@Boolean
+        coerce(eqn:$):Ex == eqn.lhs::Ex = eqn.rhs::Ex
+        coerce(eqn:$):Boolean == eqn.lhs = eqn.rhs
+    if S has AbelianSemiGroup then
+        eq1 + eq2 == eq1.lhs + eq2.lhs = eq1.rhs + eq2.rhs
+        s + eq2 == [s,s] + eq2
+        eq1 + s == eq1 + [s,s]
+    if S has AbelianGroup then
+        - eq == (- lhs eq) = (-rhs eq)
+        s - eq2 == [s,s] - eq2
+        eq1 - s == eq1 - [s,s]
+        leftZero eq == 0 = rhs eq - lhs eq
+        rightZero eq == lhs eq - rhs eq = 0
+        0 == equation(0$S,0$S)
+        eq1 - eq2 == eq1.lhs - eq2.lhs = eq1.rhs - eq2.rhs
+    if S has SemiGroup then
+        eq1:$ * eq2:$ == eq1.lhs * eq2.lhs = eq1.rhs * eq2.rhs
+        l:S   * eqn:$ == l       * eqn.lhs = l       * eqn.rhs
+        l:S * eqn:$  ==  l * eqn.lhs    =    l * eqn.rhs
+        eqn:$ * l:S  ==  eqn.lhs * l    =    eqn.rhs * l
+        -- We have to be a bit careful here: raising to a +ve integer is OK
+        -- (since it's the equivalent of repeated multiplication)
+        -- but other powers may cause contradictions
+        -- Watch what else you add here! JHD 2/Aug 1990
+    if S has Monoid then
+        1 == equation(1$S,1$S)
+        recip eq ==
+          (lh := recip lhs eq) case "failed" => "failed"
+          (rh := recip rhs eq) case "failed" => "failed"
+          [lh :: S, rh :: S]
+        leftOne eq ==
+          (re := recip lhs eq) case "failed" => "failed"
+          1 = rhs eq * re
+        rightOne eq ==
+          (re := recip rhs eq) case "failed" => "failed"
+          lhs eq * re = 1
+    if S has Group then
+        inv eq == [inv lhs eq, inv rhs eq]
+        leftOne eq == 1 = rhs eq * inv rhs eq
+        rightOne eq == lhs eq * inv rhs eq = 1
+    if S has Ring then
+        characteristic() == characteristic()$S
+        i:Integer * eq:$ == (i::S) * eq
+    if S has IntegralDomain then
+        factorAndSplit eq ==
+          (S has factor : S -> Factored S) =>
+            eq0 := rightZero eq
+            [equation(rcf.factor,0) for rcf in factors factor lhs eq0]
+          (S has Polynomial Integer) =>
+            eq0 := rightZero eq
+            MF ==> MultivariateFactorize(Symbol, IndexedExponents Symbol, _
+               Integer, Polynomial Integer)
+            p : Polynomial Integer := (lhs eq0) pretend Polynomial Integer
+            [equation((rcf.factor) pretend S,0) for rcf in factors factor(p)$MF]
+          [eq]
+    if S has PartialDifferentialRing(Symbol) then
+        differentiate(eq:$, sym:Symbol):$ ==
+           [differentiate(lhs eq, sym), differentiate(rhs eq, sym)]
+    if S has Field then
+        dimension() == 2 :: CardinalNumber
+        eq1:$ / eq2:$ == eq1.lhs / eq2.lhs = eq1.rhs / eq2.rhs
+        inv eq == [inv lhs eq, inv rhs eq]
+    if S has ExpressionSpace then
+        subst(eq1,eq2) ==
+            eq3 := eq2 pretend Equation S
+            [subst(lhs eq1,eq3),subst(rhs eq1,eq3)]
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain E04DGFA e04dgfAnnaType}
+\pagehead{e04dgfAnnaType}{E04DGFA}
+\pagepic{ps/v103e04dgfannatype.ps}{E04DGFA}{1.00}
+See also:\\
+\refto{E04FDFA}{e04fdfAnnaType}
+\refto{E04GCFA}{e04gcfAnnaType}
+\refto{E04JAFA}{e04jafAnnaType}
+\refto{E04MBFA}{e04mbfAnnaType}
+\refto{E04NAFA}{e04nafAnnaType}
+\refto{E04UCFA}{e04ucfAnnaType}
+<<domain E04DGFA e04dgfAnnaType>>=
+)abbrev domain E04DGFA e04dgfAnnaType
+++ Author: Brian Dupee
+++ Date Created: February 1996
+++ Date Last Updated: February 1996
+++ Basic Operations: measure, numericalOptimization
+++ Related Constructors: Result, RoutinesTable
+++ Description:
+++ \axiomType{e04dgfAnnaType} is a domain of \axiomType{NumericalOptimization}
+++ for the NAG routine E04DGF, a general optimization routine which
+++ can handle some singularities in the input function.  The function
+++ \axiomFun{measure} measures the usefulness of the routine E04DGF
+++ for the given problem.  The function \axiomFun{numericalOptimization}
+++ performs the optimization by using \axiomType{NagOptimisationPackage}.
+
+e04dgfAnnaType(): NumericalOptimizationCategory == Result add
+  DF	==> DoubleFloat
+  EF	==> Expression Float
+  EDF	==> Expression DoubleFloat
+  PDF	==> Polynomial DoubleFloat
+  VPDF	==> Vector Polynomial DoubleFloat
+  LDF	==> List DoubleFloat
+  LOCDF	==> List OrderedCompletion DoubleFloat
+  MDF	==> Matrix DoubleFloat
+  MPDF	==> Matrix Polynomial DoubleFloat
+  MF	==> Matrix Float
+  MEF	==> Matrix Expression Float
+  LEDF	==> List Expression DoubleFloat
+  VEF	==> Vector Expression Float
+  NOA	==> Record(fn:EDF, init:LDF, lb:LOCDF, cf:LEDF, ub:LOCDF)
+  LSA	==> Record(lfn:LEDF, init:LDF)
+  EF2	==> ExpressionFunctions2
+  MI	==> Matrix Integer
+  INT	==> Integer
+  F	==> Float
+  NNI	==> NonNegativeInteger
+  S	==> Symbol
+  LS	==> List Symbol
+  MVCF	==> MultiVariableCalculusFunctions
+  ESTOOLS2 ==> ExpertSystemToolsPackage2
+  SDF	==> Stream DoubleFloat
+  LSDF	==> List Stream DoubleFloat
+  SOCDF	==> Segment OrderedCompletion DoubleFloat
+  OCDF	==> OrderedCompletion DoubleFloat
+
+  Rep:=Result
+  import Rep, NagOptimisationPackage, ExpertSystemToolsPackage
+
+  measure(R:RoutinesTable,args:NOA) ==
+    string:String := "e04dgf is "
+    positive?(#(args.cf) + #(args.lb) + #(args.ub)) =>
+      string := concat(string,"unsuitable for constrained problems. ")
+      [0.0,string]
+    string := concat(string,"recommended")
+    [getMeasure(R,e04dgf@Symbol)$RoutinesTable, string]
+
+  numericalOptimization(args:NOA) ==
+    argsFn:EDF := args.fn
+    n:NNI := #(variables(argsFn)$EDF)
+    fu:DF := float(4373903597,-24,10)$DF
+    it:INT := max(50,5*n)
+    lin:DF := float(9,-1,10)$DF
+    ma:DF := float(1,20,10)$DF
+    op:DF := float(326,-14,10)$DF
+    x:MDF := mat(args.init,n)
+    ArgsFn:Expression Float := edf2ef(argsFn)
+    f:Union(fn:FileName,fp:Asp49(OBJFUN)) := [retract(ArgsFn)$Asp49(OBJFUN)]
+    e04dgf(n,1$DF,fu,it,lin,true,ma,op,1,1,n,0,x,-1,f)
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain E04FDFA e04fdfAnnaType}
+\pagehead{e04fdfAnnaType}{E04FDFA}
+\pagepic{ps/v103e04fdfannatype.ps}{E04FDFA}{1.00}
+See also:\\
+\refto{E04DGFA}{e04dgfAnnaType}
+\refto{E04GCFA}{e04gcfAnnaType}
+\refto{E04JAFA}{e04jafAnnaType}
+\refto{E04MBFA}{e04mbfAnnaType}
+\refto{E04NAFA}{e04nafAnnaType}
+\refto{E04UCFA}{e04ucfAnnaType}
+<<domain E04FDFA e04fdfAnnaType>>=
+)abbrev domain E04FDFA e04fdfAnnaType
+++ Author: Brian Dupee
+++ Date Created: February 1996
+++ Date Last Updated: February 1996
+++ Basic Operations: measure, numericalOptimization
+++ Related Constructors: Result, RoutinesTable
+++ Description:
+++ \axiomType{e04fdfAnnaType} is a domain of \axiomType{NumericalOptimization}
+++ for the NAG routine E04FDF, a general optimization routine which
+++ can handle some singularities in the input function.  The function
+++ \axiomFun{measure} measures the usefulness of the routine E04FDF
+++ for the given problem.  The function \axiomFun{numericalOptimization}
+++ performs the optimization by using \axiomType{NagOptimisationPackage}.
+e04fdfAnnaType(): NumericalOptimizationCategory == Result add
+  DF	==> DoubleFloat
+  EF	==> Expression Float
+  EDF	==> Expression DoubleFloat
+  PDF	==> Polynomial DoubleFloat
+  VPDF	==> Vector Polynomial DoubleFloat
+  LDF	==> List DoubleFloat
+  LOCDF	==> List OrderedCompletion DoubleFloat
+  MDF	==> Matrix DoubleFloat
+  MPDF	==> Matrix Polynomial DoubleFloat
+  MF	==> Matrix Float
+  MEF	==> Matrix Expression Float
+  LEDF	==> List Expression DoubleFloat
+  VEF	==> Vector Expression Float
+  NOA	==> Record(fn:EDF, init:LDF, lb:LOCDF, cf:LEDF, ub:LOCDF)
+  LSA	==> Record(lfn:LEDF, init:LDF)
+  EF2	==> ExpressionFunctions2
+  MI	==> Matrix Integer
+  INT	==> Integer
+  F	==> Float
+  NNI	==> NonNegativeInteger
+  S	==> Symbol
+  LS	==> List Symbol
+  MVCF	==> MultiVariableCalculusFunctions
+  ESTOOLS2 ==> ExpertSystemToolsPackage2
+  SDF	==> Stream DoubleFloat
+  LSDF	==> List Stream DoubleFloat
+  SOCDF	==> Segment OrderedCompletion DoubleFloat
+  OCDF	==> OrderedCompletion DoubleFloat
+
+  Rep:=Result
+  import Rep, NagOptimisationPackage
+  import e04AgentsPackage,ExpertSystemToolsPackage
+
+  measure(R:RoutinesTable,args:NOA) ==
+    argsFn := args.fn
+    string:String := "e04fdf is "
+    positive?(#(args.cf) + #(args.lb) + #(args.ub)) =>
+      string := concat(string,"unsuitable for constrained problems. ")
+      [0.0,string]
+    n:NNI := #(variables(argsFn)$EDF)
+    (n>1)@Boolean => 
+      string := concat(string,"unsuitable for single instances of multivariate problems. ")
+      [0.0,string]
+    sumOfSquares(argsFn) case "failed" =>
+      string := concat(string,"unsuitable.")
+      [0.0,string]
+    string := concat(string,"recommended since the function is a sum of squares.")
+    [getMeasure(R,e04fdf@Symbol)$RoutinesTable, string]
+
+  measure(R:RoutinesTable,args:LSA) ==
+    string:String := "e04fdf is recommended"
+    [getMeasure(R,e04fdf@Symbol)$RoutinesTable, string]
+
+  numericalOptimization(args:NOA) ==
+    argsFn := args.fn
+    lw:INT := 14
+    x := mat(args.init,1)
+    (a := sumOfSquares(argsFn)) case EDF => 
+      ArgsFn := vector([edf2ef(a)])$VEF
+      f : Union(fn:FileName,fp:Asp50(LSFUN1)) := [retract(ArgsFn)$Asp50(LSFUN1)]
+      out:Result := e04fdf(1,1,1,lw,x,-1,f)
+      changeNameToObjf(fsumsq@Symbol,out)
+    empty()$Result
+
+  numericalOptimization(args:LSA) ==
+    argsFn := copy args.lfn
+    m:INT := #(argsFn)
+    n:NNI := #(variables(args))
+    nn:INT := n
+    lw:INT := 
+--      one?(nn) => 9+5*m
+      (nn = 1) => 9+5*m
+      nn*(7+n+2*m+((nn-1) quo 2)$INT)+3*m
+    x := mat(args.init,n)
+    ArgsFn := vector([edf2ef(i)$ExpertSystemToolsPackage for i in argsFn])$VEF
+    f : Union(fn:FileName,fp:Asp50(LSFUN1)) := [retract(ArgsFn)$Asp50(LSFUN1)]
+    out:Result := e04fdf(m,n,1,lw,x,-1,f)
+    changeNameToObjf(fsumsq@Symbol,out)
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain E04GCFA e04gcfAnnaType}
+\pagehead{e04gcfAnnaType}{E04GCFA}
+\pagepic{ps/v103e04gcfannatype.ps}{E04GCFA}{1.00}
+See also:\\
+\refto{E04DGFA}{e04dgfAnnaType}
+\refto{E04FDFA}{e04fdfAnnaType}
+\refto{E04JAFA}{e04jafAnnaType}
+\refto{E04MBFA}{e04mbfAnnaType}
+\refto{E04NAFA}{e04nafAnnaType}
+\refto{E04UCFA}{e04ucfAnnaType}
+<<domain E04GCFA e04gcfAnnaType>>=
+)abbrev domain E04GCFA e04gcfAnnaType
+++ Author: Brian Dupee
+++ Date Created: February 1996
+++ Date Last Updated: February 1996
+++ Basic Operations: measure, numericalOptimization
+++ Related Constructors: Result, RoutinesTable
+++ Description:
+++ \axiomType{e04gcfAnnaType} is a domain of \axiomType{NumericalOptimization}
+++ for the NAG routine E04GCF, a general optimization routine which
+++ can handle some singularities in the input function.  The function
+++ \axiomFun{measure} measures the usefulness of the routine E04GCF
+++ for the given problem.  The function \axiomFun{numericalOptimization}
+++ performs the optimization by using \axiomType{NagOptimisationPackage}.
+e04gcfAnnaType(): NumericalOptimizationCategory == Result add
+  DF	==> DoubleFloat
+  EF	==> Expression Float
+  EDF	==> Expression DoubleFloat
+  PDF	==> Polynomial DoubleFloat
+  VPDF	==> Vector Polynomial DoubleFloat
+  LDF	==> List DoubleFloat
+  LOCDF	==> List OrderedCompletion DoubleFloat
+  MDF	==> Matrix DoubleFloat
+  MPDF	==> Matrix Polynomial DoubleFloat
+  MF	==> Matrix Float
+  MEF	==> Matrix Expression Float
+  LEDF	==> List Expression DoubleFloat
+  VEF	==> Vector Expression Float
+  NOA	==> Record(fn:EDF, init:LDF, lb:LOCDF, cf:LEDF, ub:LOCDF)
+  LSA	==> Record(lfn:LEDF, init:LDF)
+  EF2	==> ExpressionFunctions2
+  MI	==> Matrix Integer
+  INT	==> Integer
+  F	==> Float
+  NNI	==> NonNegativeInteger
+  S	==> Symbol
+  LS	==> List Symbol
+  MVCF	==> MultiVariableCalculusFunctions
+  ESTOOLS2 ==> ExpertSystemToolsPackage2
+  SDF	==> Stream DoubleFloat
+  LSDF	==> List Stream DoubleFloat
+  SOCDF	==> Segment OrderedCompletion DoubleFloat
+  OCDF	==> OrderedCompletion DoubleFloat
+
+  Rep:=Result
+  import Rep, NagOptimisationPackage,ExpertSystemContinuityPackage
+  import e04AgentsPackage,ExpertSystemToolsPackage
+
+  measure(R:RoutinesTable,args:NOA) ==
+    argsFn:EDF := args.fn
+    string:String := "e04gcf is "
+    positive?(#(args.cf) + #(args.lb) + #(args.ub)) =>
+      string := concat(string,"unsuitable for constrained problems. ")
+      [0.0,string]
+    n:NNI := #(variables(argsFn)$EDF)
+    (n>1)@Boolean => 
+      string := concat(string,"unsuitable for single instances of multivariate problems. ")
+      [0.0,string]
+    a := coerce(float(10,0,10))$OCDF
+    seg:SOCDF := -a..a
+    sings := singularitiesOf(argsFn,variables(argsFn)$EDF,seg)
+    s := #(sdf2lst(sings))
+    positive? s => 
+      string := concat(string,"not recommended for discontinuous functions.")
+      [0.0,string]
+    sumOfSquares(args.fn) case "failed" =>
+      string := concat(string,"unsuitable.")
+      [0.0,string]
+    string := concat(string,"recommended since the function is a sum of squares.")
+    [getMeasure(R,e04gcf@Symbol)$RoutinesTable, string]
+
+  measure(R:RoutinesTable,args:LSA) ==
+    string:String := "e04gcf is "
+    a := coerce(float(10,0,10))$OCDF
+    seg:SOCDF := -a..a
+    sings := concat([singularitiesOf(i,variables(args),seg) for i in args.lfn])$SDF
+    s := #(sdf2lst(sings))
+    positive? s => 
+      string := concat(string,"not recommended for discontinuous functions.")
+      [0.0,string]
+    string := concat(string,"recommended.")
+    m := getMeasure(R,e04gcf@Symbol)$RoutinesTable
+    m := m-(1-exp(-(expenseOfEvaluation(args))**3))
+    [m, string]
+
+  numericalOptimization(args:NOA) ==
+    argsFn:EDF := args.fn
+    lw:INT := 16
+    x := mat(args.init,1)
+    (a := sumOfSquares(argsFn)) case EDF => 
+      ArgsFn := vector([edf2ef(a)$ExpertSystemToolsPackage])$VEF
+      f : Union(fn:FileName,fp:Asp19(LSFUN2)) := [retract(ArgsFn)$Asp19(LSFUN2)]
+      out:Result := e04gcf(1,1,1,lw,x,-1,f)
+      changeNameToObjf(fsumsq@Symbol,out)
+    empty()$Result
+
+  numericalOptimization(args:LSA) ==
+    argsFn := copy args.lfn
+    m:NNI := #(argsFn)
+    n:NNI := #(variables(args))
+    lw:INT := 
+--      one?(n) => 11+5*m
+      (n = 1) => 11+5*m
+      2*n*(4+n+m)+3*m
+    x := mat(args.init,n)
+    ArgsFn := vector([edf2ef(i)$ExpertSystemToolsPackage for i in argsFn])$VEF
+    f : Union(fn:FileName,fp:Asp19(LSFUN2)) := [retract(ArgsFn)$Asp19(LSFUN2)]
+    out:Result := e04gcf(m,n,1,lw,x,-1,f)
+    changeNameToObjf(fsumsq@Symbol,out)
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain E04JAFA e04jafAnnaType}
+\pagehead{e04jafAnnaType}{E04JAFA}
+\pagepic{ps/v103e04jafannatype.ps}{E04JAFA}{1.00}
+See also:\\
+\refto{E04DGFA}{e04dgfAnnaType}
+\refto{E04FDFA}{e04fdfAnnaType}
+\refto{E04GCFA}{e04gcfAnnaType}
+\refto{E04MBFA}{e04mbfAnnaType}
+\refto{E04NAFA}{e04nafAnnaType}
+\refto{E04UCFA}{e04ucfAnnaType}
+<<domain E04JAFA e04jafAnnaType>>=
+)abbrev domain E04JAFA e04jafAnnaType
+++ Author: Brian Dupee
+++ Date Created: February 1996
+++ Date Last Updated: February 1996
+++ Basic Operations: measure, numericalOptimization
+++ Related Constructors: Result, RoutinesTable
+++ Description:
+++ \axiomType{e04jafAnnaType} is a domain of \axiomType{NumericalOptimization}
+++ for the NAG routine E04JAF, a general optimization routine which
+++ can handle some singularities in the input function.  The function
+++ \axiomFun{measure} measures the usefulness of the routine E04JAF
+++ for the given problem.  The function \axiomFun{numericalOptimization}
+++ performs the optimization by using \axiomType{NagOptimisationPackage}.
+e04jafAnnaType(): NumericalOptimizationCategory == Result add
+  DF	==> DoubleFloat
+  EF	==> Expression Float
+  EDF	==> Expression DoubleFloat
+  PDF	==> Polynomial DoubleFloat
+  VPDF	==> Vector Polynomial DoubleFloat
+  LDF	==> List DoubleFloat
+  LOCDF	==> List OrderedCompletion DoubleFloat
+  MDF	==> Matrix DoubleFloat
+  MPDF	==> Matrix Polynomial DoubleFloat
+  MF	==> Matrix Float
+  MEF	==> Matrix Expression Float
+  LEDF	==> List Expression DoubleFloat
+  VEF	==> Vector Expression Float
+  NOA	==> Record(fn:EDF, init:LDF, lb:LOCDF, cf:LEDF, ub:LOCDF)
+  LSA	==> Record(lfn:LEDF, init:LDF)
+  EF2	==> ExpressionFunctions2
+  MI	==> Matrix Integer
+  INT	==> Integer
+  F	==> Float
+  NNI	==> NonNegativeInteger
+  S	==> Symbol
+  LS	==> List Symbol
+  MVCF	==> MultiVariableCalculusFunctions
+  ESTOOLS2 ==> ExpertSystemToolsPackage2
+  SDF	==> Stream DoubleFloat
+  LSDF	==> List Stream DoubleFloat
+  SOCDF	==> Segment OrderedCompletion DoubleFloat
+  OCDF	==> OrderedCompletion DoubleFloat
+
+  Rep:=Result
+  import Rep, NagOptimisationPackage
+  import e04AgentsPackage,ExpertSystemToolsPackage
+
+  bound(a:LOCDF,b:LOCDF):Integer ==  
+    empty?(concat(a,b)) => 1
+--    one?(#(removeDuplicates(a))) and  zero?(first(a)) => 2
+    (#(removeDuplicates(a)) = 1) and  zero?(first(a)) => 2
+--    one?(#(removeDuplicates(a))) and one?(#(removeDuplicates(b))) => 3
+    (#(removeDuplicates(a)) = 1) and (#(removeDuplicates(b)) = 1) => 3
+    0  
+
+  measure(R:RoutinesTable,args:NOA) ==
+    string:String := "e04jaf is "
+    if positive?(#(args.cf)) then
+      if not simpleBounds?(args.cf) then
+        string := 
+          concat(string,"suitable for simple bounds only, not constraint functions.")
+    (# string) < 20 => 
+      if zero?(#(args.lb) + #(args.ub)) then
+        string := concat(string, "usable if there are no constraints")
+        [getMeasure(R,e04jaf@Symbol)$RoutinesTable*0.5,string]
+      else
+        string := concat(string,"recommended")
+        [getMeasure(R,e04jaf@Symbol)$RoutinesTable, string]
+    [0.0,string]
+
+  numericalOptimization(args:NOA) ==
+    argsFn:EDF := args.fn
+    n:NNI := #(variables(argsFn)$EDF)
+    ibound:INT := bound(args.lb,args.ub)
+    m:INT := n 
+    lw:INT := max(13,12 * m + ((m * (m - 1)) quo 2)$INT)$INT
+    bl := mat(finiteBound(args.lb,float(1,6,10)$DF),n)
+    bu := mat(finiteBound(args.ub,float(1,6,10)$DF),n)
+    x := mat(args.init,n)
+    ArgsFn:EF := edf2ef(argsFn)
+    fr:Union(fn:FileName,fp:Asp24(FUNCT1)) := [retract(ArgsFn)$Asp24(FUNCT1)]
+    out:Result := e04jaf(n,ibound,n+2,lw,bl,bu,x,-1,fr)
+    changeNameToObjf(f@Symbol,out)
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain E04MBFA e04mbfAnnaType}
+\pagehead{e04mbfAnnaType}{E04MBFA}
+\pagepic{ps/v103e04mbfannatype.ps}{E04MBFA}{1.00}
+See also:\\
+\refto{E04DGFA}{e04dgfAnnaType}
+\refto{E04FDFA}{e04fdfAnnaType}
+\refto{E04GCFA}{e04gcfAnnaType}
+\refto{E04JAFA}{e04jafAnnaType}
+\refto{E04NAFA}{e04nafAnnaType}
+\refto{E04UCFA}{e04ucfAnnaType}
+<<domain E04MBFA e04mbfAnnaType>>=
+)abbrev domain E04MBFA e04mbfAnnaType
+++ Author: Brian Dupee
+++ Date Created: February 1996
+++ Date Last Updated: February 1996
+++ Basic Operations: measure, numericalOptimization
+++ Related Constructors: Result, RoutinesTable
+++ Description:
+++ \axiomType{e04mbfAnnaType} is a domain of \axiomType{NumericalOptimization}
+++ for the NAG routine E04MBF, an optimization routine for Linear functions.
+++ The function
+++ \axiomFun{measure} measures the usefulness of the routine E04MBF
+++ for the given problem.  The function \axiomFun{numericalOptimization}
+++ performs the optimization by using \axiomType{NagOptimisationPackage}.
+e04mbfAnnaType(): NumericalOptimizationCategory == Result add
+  DF	==> DoubleFloat
+  EF	==> Expression Float
+  EDF	==> Expression DoubleFloat
+  PDF	==> Polynomial DoubleFloat
+  VPDF	==> Vector Polynomial DoubleFloat
+  LDF	==> List DoubleFloat
+  LOCDF	==> List OrderedCompletion DoubleFloat
+  MDF	==> Matrix DoubleFloat
+  MPDF	==> Matrix Polynomial DoubleFloat
+  MF	==> Matrix Float
+  MEF	==> Matrix Expression Float
+  LEDF	==> List Expression DoubleFloat
+  VEF	==> Vector Expression Float
+  NOA	==> Record(fn:EDF, init:LDF, lb:LOCDF, cf:LEDF, ub:LOCDF)
+  LSA	==> Record(lfn:LEDF, init:LDF)
+  EF2	==> ExpressionFunctions2
+  MI	==> Matrix Integer
+  INT	==> Integer
+  F	==> Float
+  NNI	==> NonNegativeInteger
+  S	==> Symbol
+  LS	==> List Symbol
+  MVCF	==> MultiVariableCalculusFunctions
+  ESTOOLS2 ==> ExpertSystemToolsPackage2
+  SDF	==> Stream DoubleFloat
+  LSDF	==> List Stream DoubleFloat
+  SOCDF	==> Segment OrderedCompletion DoubleFloat
+  OCDF	==> OrderedCompletion DoubleFloat
+
+  Rep:=Result
+  import Rep, NagOptimisationPackage
+  import e04AgentsPackage,ExpertSystemToolsPackage
+
+  measure(R:RoutinesTable,args:NOA) ==
+    (not linear?([args.fn])) or (not linear?(args.cf)) => 
+      [0.0,"e04mbf is for a linear objective function and constraints only."]
+    [getMeasure(R,e04mbf@Symbol)$RoutinesTable,"e04mbf is recommended" ]
+
+  numericalOptimization(args:NOA) ==
+    argsFn:EDF := args.fn
+    c := args.cf
+    listVars:List LS := concat(variables(argsFn)$EDF,[variables(z)$EDF for z in c])
+    n:NNI := #(v := removeDuplicates(concat(listVars)$LS)$LS)
+    A:MDF := linearMatrix(args.cf,n)
+    nclin:NNI := # linearPart(c)
+    nrowa:NNI := max(1,nclin)
+    bl:MDF := mat(finiteBound(args.lb,float(1,21,10)$DF),n)
+    bu:MDF := mat(finiteBound(args.ub,float(1,21,10)$DF),n)
+    cvec:MDF := mat(coefficients(retract(argsFn)@PDF)$PDF,n)
+    x := mat(args.init,n)
+    lwork:INT := 
+      nclin < n => 2*nclin*(nclin+4)+2+6*n+nrowa
+      2*(n+3)*n+4*nclin+nrowa
+    out:Result := e04mbf(20,1,n,nclin,n+nclin,nrowa,A,bl,bu,cvec,true,2*n,lwork,x,-1)
+    changeNameToObjf(objlp@Symbol,out)
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain E04NAFA e04nafAnnaType}
+\pagehead{e04nafAnnaType}{E04NAFA}
+\pagepic{ps/v103e04nafannatype.ps}{E04NAFA}{1.00}
+See also:\\
+\refto{E04DGFA}{e04dgfAnnaType}
+\refto{E04FDFA}{e04fdfAnnaType}
+\refto{E04GCFA}{e04gcfAnnaType}
+\refto{E04JAFA}{e04jafAnnaType}
+\refto{E04MBFA}{e04mbfAnnaType}
+\refto{E04UCFA}{e04ucfAnnaType}
+<<domain E04NAFA e04nafAnnaType>>=
+)abbrev domain E04NAFA e04nafAnnaType
+++ Author: Brian Dupee
+++ Date Created: February 1996
+++ Date Last Updated: February 1996
+++ Basic Operations: measure, numericalOptimization
+++ Related Constructors: Result, RoutinesTable
+++ Description:
+++ \axiomType{e04nafAnnaType} is a domain of \axiomType{NumericalOptimization}
+++ for the NAG routine E04NAF, an optimization routine for Quadratic functions.
+++ The function
+++ \axiomFun{measure} measures the usefulness of the routine E04NAF
+++ for the given problem.  The function \axiomFun{numericalOptimization}
+++ performs the optimization by using \axiomType{NagOptimisationPackage}.
+e04nafAnnaType(): NumericalOptimizationCategory == Result add
+  DF	==> DoubleFloat
+  EF	==> Expression Float
+  EDF	==> Expression DoubleFloat
+  PDF	==> Polynomial DoubleFloat
+  VPDF	==> Vector Polynomial DoubleFloat
+  LDF	==> List DoubleFloat
+  LOCDF	==> List OrderedCompletion DoubleFloat
+  MDF	==> Matrix DoubleFloat
+  MPDF	==> Matrix Polynomial DoubleFloat
+  MF	==> Matrix Float
+  MEF	==> Matrix Expression Float
+  LEDF	==> List Expression DoubleFloat
+  VEF	==> Vector Expression Float
+  NOA	==> Record(fn:EDF, init:LDF, lb:LOCDF, cf:LEDF, ub:LOCDF)
+  LSA	==> Record(lfn:LEDF, init:LDF)
+  EF2	==> ExpressionFunctions2
+  MI	==> Matrix Integer
+  INT	==> Integer
+  F	==> Float
+  NNI	==> NonNegativeInteger
+  S	==> Symbol
+  LS	==> List Symbol
+  MVCF	==> MultiVariableCalculusFunctions
+  ESTOOLS2 ==> ExpertSystemToolsPackage2
+  SDF	==> Stream DoubleFloat
+  LSDF	==> List Stream DoubleFloat
+  SOCDF	==> Segment OrderedCompletion DoubleFloat
+  OCDF	==> OrderedCompletion DoubleFloat
+
+  Rep:=Result
+  import Rep, NagOptimisationPackage
+  import e04AgentsPackage,ExpertSystemToolsPackage
+
+  measure(R:RoutinesTable,args:NOA) ==
+    string:String := "e04naf is "
+    argsFn:EDF := args.fn
+    if not (quadratic?(argsFn) and linear?(args.cf)) then
+      string :=
+        concat(string,"for a quadratic function with linear constraints only.")
+    (# string) < 20 => 
+      string := concat(string,"recommended")
+      [getMeasure(R,e04naf@Symbol)$RoutinesTable, string]
+    [0.0,string]
+
+  numericalOptimization(args:NOA) ==
+    argsFn:EDF := args.fn
+    c := args.cf
+    listVars:List LS := concat(variables(argsFn)$EDF,[variables(z)$EDF for z in c])
+    n:NNI := #(v := sort(removeDuplicates(concat(listVars)$LS)$LS)$LS)
+    A:MDF := linearMatrix(c,n)
+    nclin:NNI := # linearPart(c)
+    nrowa:NNI := max(1,nclin)
+    big:DF := float(1,10,10)$DF
+    fea:MDF := new(1,n+nclin,float(1053,-11,10)$DF)$MDF
+    bl:MDF := mat(finiteBound(args.lb,float(1,21,10)$DF),n)
+    bu:MDF := mat(finiteBound(args.ub,float(1,21,10)$DF),n)
+    alin:EDF := splitLinear(argsFn)
+    p:PDF := retract(alin)@PDF
+    pl:List PDF := [coefficient(p,i,1)$PDF for i in v]
+    cvec:MDF := mat([pdf2df j for j in pl],n)
+    h1:MPDF := hessian(p,v)$MVCF(S,PDF,VPDF,LS)
+    hess:MDF := map(pdf2df,h1)$ESTOOLS2(PDF,DF)
+    h2:MEF := map(df2ef,hess)$ESTOOLS2(DF,EF)
+    x := mat(args.init,n)
+    istate:MI := zero(1,n+nclin)$MI
+    lwork:INT := 2*n*(n+2*nclin)+nrowa
+    qphess:Union(fn:FileName,fp:Asp20(QPHESS)) := [retract(h2)$Asp20(QPHESS)]
+    out:Result := e04naf(20,1,n,nclin,n+nclin,nrowa,n,n,big,A,bl,bu,cvec,fea,
+                           hess,true,false,true,2*n,lwork,x,istate,-1,qphess)
+    changeNameToObjf(obj@Symbol,out)
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain E04UCFA e04ucfAnnaType}
+\pagehead{e04ucfAnnaType}{E04UCFA}
+\pagepic{ps/v103e04ucfannatype.ps}{E04UCFA}{1.00}
+See also:\\
+\refto{E04DGFA}{e04dgfAnnaType}
+\refto{E04FDFA}{e04fdfAnnaType}
+\refto{E04GCFA}{e04gcfAnnaType}
+\refto{E04JAFA}{e04jafAnnaType}
+\refto{E04MBFA}{e04mbfAnnaType}
+\refto{E04NAFA}{e04nafAnnaType}
+<<domain E04UCFA e04ucfAnnaType>>=
+)abbrev domain E04UCFA e04ucfAnnaType
+++ Author: Brian Dupee
+++ Date Created: February 1996
+++ Date Last Updated: November 1997
+++ Basic Operations: measure, numericalOptimization
+++ Related Constructors: Result, RoutinesTable
+++ Description:
+++ \axiomType{e04ucfAnnaType} is a domain of \axiomType{NumericalOptimization}
+++ for the NAG routine E04UCF, a general optimization routine which
+++ can handle some singularities in the input function.  The function
+++ \axiomFun{measure} measures the usefulness of the routine E04UCF
+++ for the given problem.  The function \axiomFun{numericalOptimization}
+++ performs the optimization by using \axiomType{NagOptimisationPackage}.
+e04ucfAnnaType(): NumericalOptimizationCategory == Result add
+  DF	==> DoubleFloat
+  EF	==> Expression Float
+  EDF	==> Expression DoubleFloat
+  PDF	==> Polynomial DoubleFloat
+  VPDF	==> Vector Polynomial DoubleFloat
+  LDF	==> List DoubleFloat
+  LOCDF	==> List OrderedCompletion DoubleFloat
+  MDF	==> Matrix DoubleFloat
+  MPDF	==> Matrix Polynomial DoubleFloat
+  MF	==> Matrix Float
+  MEF	==> Matrix Expression Float
+  LEDF	==> List Expression DoubleFloat
+  VEF	==> Vector Expression Float
+  NOA	==> Record(fn:EDF, init:LDF, lb:LOCDF, cf:LEDF, ub:LOCDF)
+  LSA	==> Record(lfn:LEDF, init:LDF)
+  EF2	==> ExpressionFunctions2
+  MI	==> Matrix Integer
+  INT	==> Integer
+  F	==> Float
+  NNI	==> NonNegativeInteger
+  S	==> Symbol
+  LS	==> List Symbol
+  MVCF	==> MultiVariableCalculusFunctions
+  ESTOOLS2 ==> ExpertSystemToolsPackage2
+  SDF	==> Stream DoubleFloat
+  LSDF	==> List Stream DoubleFloat
+  SOCDF	==> Segment OrderedCompletion DoubleFloat
+  OCDF	==> OrderedCompletion DoubleFloat
+
+  Rep:=Result
+  import Rep,NagOptimisationPackage
+  import e04AgentsPackage,ExpertSystemToolsPackage
+
+  measure(R:RoutinesTable,args:NOA) ==
+    zero?(#(args.lb) + #(args.ub)) =>
+      [0.0,"e04ucf is not recommended if there are no bounds specified"]
+    zero?(#(args.cf)) =>
+      string:String := "e04ucf is usable but not always recommended if there are no constraints"
+      [getMeasure(R,e04ucf@Symbol)$RoutinesTable*0.5,string]
+    [getMeasure(R,e04ucf@Symbol)$RoutinesTable,"e04ucf is recommended"]
+
+  numericalOptimization(args:NOA) ==
+    Args := sortConstraints(args)
+    argsFn := Args.fn
+    c := Args.cf
+    listVars:List LS := concat(variables(argsFn)$EDF,[variables(z)$EDF for z in c])
+    n:NNI := #(v := sort(removeDuplicates(concat(listVars)$LS)$LS)$LS)
+    lin:NNI := #(linearPart(c))
+    nlcf := nonLinearPart(c)
+    nonlin:NNI := #(nlcf)
+    if empty?(nlcf) then 
+      nlcf := new(n,coerce(first(v)$LS)$EDF)$LEDF
+    nrowa:NNI := max(1,lin)
+    nrowj:NNI := max(1,nonlin)
+    A:MDF := linearMatrix(c,n)
+    bl:MDF := mat(finiteBound(Args.lb,float(1,25,10)$DF),n)
+    bu:MDF := mat(finiteBound(Args.ub,float(1,25,10)$DF),n)
+    liwork:INT := 3*n+lin+2*nonlin
+    lwork:INT :=
+      zero?(lin+nonlin) => 20*n
+      zero?(nonlin) => 2*n*(n+10)+11*lin
+      2*n*(n+nonlin+10)+(11+n)*lin + 21*nonlin
+    cra:DF := float(1,-2,10)$DF
+    fea:DF := float(1053671201,-17,10)$DF
+    fun:DF := float(4373903597,-24,10)$DF
+    infb:DF := float(1,15,10)$DF
+    lint:DF := float(9,-1,10)$DF
+    maji:INT := max(50,3*(n+lin)+10*nonlin)
+    mini:INT := max(50,3*(n+lin+nonlin))
+    nonf:DF := float(105,-10,10)$DF
+    opt:DF := float(326,-10,10)$DF
+    ste:DF := float(2,0,10)$DF
+    istate:MI := zero(1,n+lin+nonlin)$MI
+    cjac:MDF := 
+      positive?(nonlin) => zero(nrowj,n)$MDF
+      zero(nrowj,1)$MDF
+    clambda:MDF := zero(1,n+lin+nonlin)$MDF
+    r:MDF := zero(n,n)$MDF
+    x:MDF := mat(Args.init,n)
+    VectCF:VEF := vector([edf2ef e for e in nlcf])$VEF
+    ArgsFn:EF := edf2ef(argsFn)
+    fasp : Union(fn:FileName,fp:Asp49(OBJFUN)) := [retract(ArgsFn)$Asp49(OBJFUN)]
+    casp : Union(fn:FileName,fp:Asp55(CONFUN)) := [retract(VectCF)$Asp55(CONFUN)]
+    e04ucf(n,lin,nonlin,nrowa,nrowj,n,A,bl,bu,liwork,lwork,false,cra,3,fea,
+            fun,true,infb,infb,fea,lint,true,maji,1,mini,0,-1,nonf,opt,ste,1,
+             1,n,n,3,istate,cjac,clambda,r,x,-1,casp,fasp)
+
+@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \chapter{Chapter F}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain FDIV FiniteDivisor}
+\pagehead{FiniteDivisor}{FDIV}
+\pagepic{ps/v103finitedivisor.ps}{FDIV}{1.00}
+See also:\\
+\refto{FractionalIdeal}{FRIDEAL}
+\refto{FramedModule}{FRMOD}
+\refto{HyperellipticFiniteDivisor}{HELLFDIV}
+<<domain FDIV FiniteDivisor>>=
+)abbrev domain FDIV FiniteDivisor
+++ Finite rational divisors on a curve
+++ Author: Manuel Bronstein
+++ Date Created: 1987
+++ Date Last Updated: 29 July 1993
+++ Description:
+++ This domains implements finite rational divisors on a curve, that
+++ is finite formal sums SUM(n * P) where the n's are integers and the
+++ P's are finite rational points on the curve.
+++ Keywords: divisor, algebraic, curve.
+++ Examples: )r FDIV INPUT
+FiniteDivisor(F, UP, UPUP, R): Exports == Implementation where
+  F   : Field
+  UP  : UnivariatePolynomialCategory F
+  UPUP: UnivariatePolynomialCategory Fraction UP
+  R   : FunctionFieldCategory(F, UP, UPUP)
+
+  N   ==> NonNegativeInteger
+  RF  ==> Fraction UP
+  ID  ==> FractionalIdeal(UP, RF, UPUP, R)
+
+  Exports ==> FiniteDivisorCategory(F, UP, UPUP, R) with
+    finiteBasis: % -> Vector R
+      ++ finiteBasis(d) returns a basis for d as a module over {\em K[x]}.
+    lSpaceBasis: % -> Vector R
+      ++ lSpaceBasis(d) returns a basis for \spad{L(d) = {f | (f) >= -d}}
+      ++ as a module over \spad{K[x]}.
+
+  Implementation ==> add
+    if hyperelliptic()$R case UP then
+      Rep := HyperellipticFiniteDivisor(F, UP, UPUP, R)
+
+      0                       == 0$Rep
+      coerce(d:$):OutputForm  == coerce(d)$Rep
+      d1 = d2                 == d1 =$Rep d2
+      n * d                   == n *$Rep d
+      d1 + d2                 == d1 +$Rep d2
+      - d                     == -$Rep d
+      ideal d                 == ideal(d)$Rep
+      reduce d                == reduce(d)$Rep
+      generator d             == generator(d)$Rep
+      decompose d             == decompose(d)$Rep
+      divisor(i:ID)           == divisor(i)$Rep
+      divisor(f:R)            == divisor(f)$Rep
+      divisor(a, b)           == divisor(a, b)$Rep
+      divisor(a, b, n)        == divisor(a, b, n)$Rep
+      divisor(h, d, dp, g, r) == divisor(h, d, dp, g, r)$Rep
+
+    else
+      Rep := Record(id:ID, fbasis:Vector(R))
+
+      import CommonDenominator(UP, RF, Vector RF)
+      import UnivariatePolynomialCommonDenominator(UP, RF, UPUP)
+
+      makeDivisor : (UP, UPUP, UP) -> %
+      intReduce   : (R, UP) -> R
+
+      ww := integralBasis()$R
+
+      0                       == [1, empty()]
+      divisor(i:ID)           == [i, empty()]
+      divisor(f:R)            == divisor ideal [f]
+      coerce(d:%):OutputForm  == ideal(d)::OutputForm
+      ideal d                 == d.id
+      decompose d             == [ideal d, 1]
+      d1 = d2                 == basis(ideal d1) = basis(ideal d2)
+      n * d                   == divisor(ideal(d) ** n)
+      d1 + d2                 == divisor(ideal d1 * ideal d2)
+      - d                     == divisor inv ideal d
+      divisor(h, d, dp, g, r) == makeDivisor(d, lift h - (r * dp)::RF::UPUP, g)
+
+      intReduce(h, b) ==
+        v := integralCoordinates(h).num
+        integralRepresents(
+                      [qelt(v, i) rem b for i in minIndex v .. maxIndex v], 1)
+
+      divisor(a, b) ==
+        x := monomial(1, 1)$UP
+        not ground? gcd(d := x - a::UP, retract(discriminant())@UP) =>
+                                          error "divisor: point is singular"
+        makeDivisor(d, monomial(1, 1)$UPUP - b::UP::RF::UPUP, 1)
+
+      divisor(a, b, n) ==
+        not(ground? gcd(d := monomial(1, 1)$UP - a::UP,
+            retract(discriminant())@UP)) and
+                  ((n exquo rank()) case "failed") =>
+                                    error "divisor: point is singular"
+        m:N :=
+          n < 0 => (-n)::N
+          n::N
+        g := makeDivisor(d**m,(monomial(1,1)$UPUP - b::UP::RF::UPUP)**m,1)
+        n < 0 => -g
+        g
+
+      reduce d ==
+        (i := minimize(j := ideal d)) = j => d
+        #(n := numer i) ^= 2 => divisor i
+        cd := splitDenominator lift n(1 + minIndex n)
+        b  := gcd(cd.den * retract(retract(n minIndex n)@RF)@UP,
+                  retract(norm reduce(cd.num))@UP)
+        e  := cd.den * denom i
+        divisor ideal([(b / e)::R,
+                reduce map((retract(#1)@UP rem b) / e, cd.num)]$Vector(R))
+
+      finiteBasis d ==
+        if empty?(d.fbasis) then
+          d.fbasis := normalizeAtInfinity
+                        basis module(ideal d)$FramedModule(UP, RF, UPUP, R, ww)
+        d.fbasis
+
+      generator d ==
+        bsis := finiteBasis d
+        for i in minIndex bsis .. maxIndex bsis repeat
+          integralAtInfinity? qelt(bsis, i) =>
+            return primitivePart qelt(bsis,i)
+        "failed"
+
+      lSpaceBasis d ==
+        map_!(primitivePart, reduceBasisAtInfinity finiteBasis(-d))
+
+-- b = center, hh = integral function, g = gcd(b, discriminant)
+      makeDivisor(b, hh, g) ==
+        b := gcd(b, retract(norm(h := reduce hh))@UP)
+        h := intReduce(h, b)
+        if not ground? gcd(g, b) then h := intReduce(h ** rank(), b)
+        divisor ideal [b::RF::R, h]$Vector(R)
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{domain FARRAY FlexibleArray}
 <<FlexibleArray.input>>=
 -- array1.spad.pamphlet FlexibleArray.input
@@ -11278,6 +16348,12 @@ o $AXIOM/doc/src/algebra/array1.spad.dvi
 @
 \pagehead{FlexibleArray}{FARRAY}
 \pagepic{ps/v103flexiblearray.ps}{FARRAY}{1.00}
+See also:\\
+\refto{PrimitiveArray}{PRIMARR}
+\refto{Tuple}{TUPLE}
+\refto{IndexedFlexibleArray}{IFARRAY}
+\refto{IndexedOneDimensionalArray}{IARRAY1}
+\refto{OneDimensionalArray}{ARRAY1}
 <<domain FARRAY FlexibleArray>>=
 )abbrev domain FARRAY FlexibleArray
 ++ A FlexibleArray is the notion of an array intended to allow for growth
@@ -11302,6 +16378,295 @@ FlexibleArray(S: Type) == Implementation where
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain FRIDEAL FractionalIdeal}
+\pagehead{FractionalIdeal}{FRIDEAL}
+\pagepic{ps/v103fractionalideal.ps}{FRIDEAL}{1.00}
+See also:\\
+\refto{FramedModule}{FRMOD}
+\refto{HyperellipticFiniteDivisor}{HELLFDIV}
+\refto{FiniteDivisor}{FDIV}
+<<domain FRIDEAL FractionalIdeal>>=
+)abbrev domain FRIDEAL FractionalIdeal
+++ Author: Manuel Bronstein
+++ Date Created: 27 Jan 1989
+++ Date Last Updated: 30 July 1993
+++ Keywords: ideal, algebra, module.
+++ Examples: )r FRIDEAL INPUT
+++ Description: Fractional ideals in a framed algebra.
+FractionalIdeal(R, F, UP, A): Exports == Implementation where
+  R : EuclideanDomain
+  F : QuotientFieldCategory R
+  UP: UnivariatePolynomialCategory F
+  A : Join(FramedAlgebra(F, UP), RetractableTo F)
+
+  VF  ==> Vector F
+  VA  ==> Vector A
+  UPA ==> SparseUnivariatePolynomial A
+  QF  ==> Fraction UP
+
+  Exports ==> Group with
+    ideal   : VA -> %
+      ++ ideal([f1,...,fn]) returns the ideal \spad{(f1,...,fn)}.
+    basis   : %  -> VA
+      ++ basis((f1,...,fn)) returns the vector \spad{[f1,...,fn]}.
+    norm    : %  -> F
+      ++ norm(I) returns the norm of the ideal I.
+    numer   : %  -> VA
+      ++ numer(1/d * (f1,...,fn)) = the vector \spad{[f1,...,fn]}.
+    denom   : %  -> R
+      ++ denom(1/d * (f1,...,fn)) returns d.
+    minimize: %  -> %
+      ++ minimize(I) returns a reduced set of generators for \spad{I}.
+    randomLC: (NonNegativeInteger, VA) -> A
+      ++ randomLC(n,x) should be local but conditional.
+
+  Implementation ==> add
+    import CommonDenominator(R, F, VF)
+    import MatrixCommonDenominator(UP, QF)
+    import InnerCommonDenominator(R, F, List R, List F)
+    import MatrixCategoryFunctions2(F, Vector F, Vector F, Matrix F,
+                        UP, Vector UP, Vector UP, Matrix UP)
+    import MatrixCategoryFunctions2(UP, Vector UP, Vector UP,
+                        Matrix UP, F, Vector F, Vector F, Matrix F)
+    import MatrixCategoryFunctions2(UP, Vector UP, Vector UP,
+                        Matrix UP, QF, Vector QF, Vector QF, Matrix QF)
+
+    Rep := Record(num:VA, den:R)
+
+    poly    : % -> UPA
+    invrep  : Matrix F -> A
+    upmat   : (A, NonNegativeInteger) -> Matrix UP
+    summat  : % -> Matrix UP
+    num2O   : VA -> OutputForm
+    agcd    : List A -> R
+    vgcd    : VF -> R
+    mkIdeal : (VA, R) -> %
+    intIdeal: (List A, R) -> %
+    ret?    : VA -> Boolean
+    tryRange: (NonNegativeInteger, VA, R, %) -> Union(%, "failed")
+
+    1               == [[1]$VA, 1]
+    numer i         == i.num
+    denom i         == i.den
+    mkIdeal(v, d)   == [v, d]
+    invrep m        == represents(transpose(m) * coordinates(1$A))
+    upmat(x, i)     == map(monomial(#1, i)$UP, regularRepresentation x)
+    ret? v          == any?(retractIfCan(#1)@Union(F,"failed") case F, v)
+    x = y           == denom(x) = denom(y) and numer(x) = numer(y)
+    agcd l  == reduce("gcd", [vgcd coordinates a for a in l]$List(R), 0)
+
+    norm i ==
+      ("gcd"/[retract(u)@R for u in coefficients determinant summat i])
+              / denom(i) ** rank()$A
+
+    tryRange(range, nm, nrm, i) ==
+      for j in 0..10 repeat
+        a := randomLC(10 * range, nm)
+        unit? gcd((retract(norm a)@R exquo nrm)::R, nrm) =>
+                                return intIdeal([nrm::F::A, a], denom i)
+      "failed"
+
+    summat i ==
+      m := minIndex(v := numer i)
+      reduce("+",
+            [upmat(qelt(v, j + m), j) for j in 0..#v-1]$List(Matrix UP))
+
+    inv i ==
+      m  := inverse(map(#1::QF, summat i))::Matrix(QF)
+      cd  := splitDenominator(denom(i)::F::UP::QF * m)
+      cd2 := splitDenominator coefficients(cd.den)
+      invd:= cd2.den / reduce("gcd", cd2.num)
+      d   := reduce("max", [degree p for p in parts(cd.num)])
+      ideal
+        [invd * invrep map(coefficient(#1, j), cd.num) for j in 0..d]$VA
+
+    ideal v ==
+      d := reduce("lcm", [commonDenominator coordinates qelt(v, i)
+                          for i in minIndex v .. maxIndex v]$List(R))
+      intIdeal([d::F * qelt(v, i) for i in minIndex v .. maxIndex v], d)
+
+    intIdeal(l, d) ==
+      lr := empty()$List(R)
+      nr := empty()$List(A)
+      for x in removeDuplicates l repeat
+        if (u := retractIfCan(x)@Union(F, "failed")) case F
+          then lr := concat(retract(u::F)@R, lr)
+          else nr := concat(x, nr)
+      r    := reduce("gcd", lr, 0)
+      g    := agcd nr
+      a    := (r quo (b := gcd(gcd(d, r), g)))::F::A
+      d    := d quo b
+      r ^= 0 and ((g exquo r) case R) => mkIdeal([a], d)
+      invb := inv(b::F)
+      va:VA := [invb * m for m in nr]
+      zero? a => mkIdeal(va, d)
+      mkIdeal(concat(a, va), d)
+
+    vgcd v ==
+      reduce("gcd",
+             [retract(v.i)@R for i in minIndex v .. maxIndex v]$List(R))
+
+    poly i ==
+      m := minIndex(v := numer i)
+      +/[monomial(qelt(v, i + m), i) for i in 0..#v-1]
+
+    i1 * i2 ==
+      intIdeal(coefficients(poly i1 * poly i2), denom i1 * denom i2)
+
+    i:$ ** m:Integer ==
+      m < 0 => inv(i) ** (-m)
+      n := m::NonNegativeInteger
+      v := numer i
+      intIdeal([qelt(v, j) ** n for j in minIndex v .. maxIndex v],
+               denom(i) ** n)
+
+    num2O v ==
+      paren [qelt(v, i)::OutputForm
+             for i in minIndex v .. maxIndex v]$List(OutputForm)
+
+    basis i ==
+      v := numer i
+      d := inv(denom(i)::F)
+      [d * qelt(v, j) for j in minIndex v .. maxIndex v]
+
+    coerce(i:$):OutputForm ==
+      nm := num2O numer i
+--      one? denom i => nm
+      (denom i = 1) => nm
+      (1::Integer::OutputForm) / (denom(i)::OutputForm) * nm
+
+    if F has Finite then
+      randomLC(m, v) ==
+        +/[random()$F * qelt(v, j) for j in minIndex v .. maxIndex v]
+    else
+      randomLC(m, v) ==
+        +/[(random()$Integer rem m::Integer) * qelt(v, j)
+            for j in minIndex v .. maxIndex v]
+
+    minimize i ==
+      n := (#(nm := numer i))
+--      one?(n) or (n < 3 and ret? nm) => i
+      (n = 1) or (n < 3 and ret? nm) => i
+      nrm    := retract(norm mkIdeal(nm, 1))@R
+      for range in 1..5 repeat
+        (u := tryRange(range, nm, nrm, i)) case $ => return(u::$)
+      i
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain FRMOD FramedModule}
+\pagehead{FramedModule}{FRMOD}
+\pagepic{ps/v103framedmodule.ps}{FRMOD}{1.00}
+See also:\\
+\refto{FractionalIdeal}{FRIDEAL}
+\refto{HyperellipticFiniteDivisor}{HELLFDIV}
+\refto{FiniteDivisor}{FDIV}
+<<domain FRMOD FramedModule>>=
+)abbrev domain FRMOD FramedModule
+++ Author: Manuel Bronstein
+++ Date Created: 27 Jan 1989
+++ Date Last Updated: 24 Jul 1990
+++ Keywords: ideal, algebra, module.
+++ Examples: )r FRIDEAL INPUT
+++ Description: Module representation of fractional ideals.
+FramedModule(R, F, UP, A, ibasis): Exports == Implementation where
+  R     : EuclideanDomain
+  F     : QuotientFieldCategory R
+  UP    : UnivariatePolynomialCategory F
+  A     : FramedAlgebra(F, UP)
+  ibasis: Vector A
+
+  VR  ==> Vector R
+  VF  ==> Vector F
+  VA  ==> Vector A
+  M   ==> Matrix F
+
+  Exports ==> Monoid with
+    basis : %  -> VA
+      ++ basis((f1,...,fn)) = the vector \spad{[f1,...,fn]}.
+    norm  : %  -> F
+      ++ norm(f) returns the norm of the module f.
+    module: VA -> %
+      ++ module([f1,...,fn]) = the module generated by \spad{(f1,...,fn)}
+      ++ over R.
+    if A has RetractableTo F then
+      module: FractionalIdeal(R, F, UP, A) -> %
+        ++ module(I) returns I viewed has a module over R.
+
+  Implementation ==> add
+    import MatrixCommonDenominator(R, F)
+    import ModularHermitianRowReduction(R)
+
+    Rep  := VA
+
+    iflag?:Reference(Boolean) := ref true
+    wflag?:Reference(Boolean) := ref true
+    imat := new(#ibasis, #ibasis, 0)$M
+    wmat := new(#ibasis, #ibasis, 0)$M
+
+    rowdiv      : (VR, R)  -> VF
+    vectProd    : (VA, VA) -> VA
+    wmatrix     : VA -> M
+    W2A         : VF -> A
+    intmat      : () -> M
+    invintmat   : () -> M
+    getintmat   : () -> Boolean
+    getinvintmat: () -> Boolean
+
+    1                      == ibasis
+    module(v:VA)           == v
+    basis m                == m pretend VA
+    rowdiv(r, f)           == [r.i / f for i in minIndex r..maxIndex r]
+    coerce(m:%):OutputForm == coerce(basis m)$VA
+    W2A v                  == represents(v * intmat())
+    wmatrix v              == coordinates(v) * invintmat()
+
+    getinvintmat() ==
+      m := inverse(intmat())::M
+      for i in minRowIndex m .. maxRowIndex m repeat
+        for j in minColIndex m .. maxColIndex m repeat
+          imat(i, j) := qelt(m, i, j)
+      false
+
+    getintmat() ==
+      m := coordinates ibasis
+      for i in minRowIndex m .. maxRowIndex m repeat
+        for j in minColIndex m .. maxColIndex m repeat
+          wmat(i, j) := qelt(m, i, j)
+      false
+
+    invintmat() ==
+      if iflag?() then iflag?() := getinvintmat()
+      imat
+
+    intmat() ==
+      if wflag?() then wflag?() := getintmat()
+      wmat
+
+    vectProd(v1, v2) ==
+      k := minIndex(v := new(#v1 * #v2, 0)$VA)
+      for i in minIndex v1 .. maxIndex v1 repeat
+        for j in minIndex v2 .. maxIndex v2 repeat
+          qsetelt_!(v, k, qelt(v1, i) * qelt(v2, j))
+          k := k + 1
+      v pretend VA
+
+    norm m ==
+      #(basis m) ^= #ibasis => error "Module not of rank n"
+      determinant(coordinates(basis m) * invintmat())
+
+    m1 * m2 ==
+      m := rowEch((cd := splitDenominator wmatrix(
+                                     vectProd(basis m1, basis m2))).num)
+      module [u for i in minRowIndex m .. maxRowIndex m |
+                           (u := W2A rowdiv(row(m, i), cd.den)) ^= 0]$VA
+
+    if A has RetractableTo F then
+      module(i:FractionalIdeal(R, F, UP, A)) ==
+        module(basis i) * module(ibasis)
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \chapter{Chapter G}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -11450,6 +16815,11 @@ o $AXIOM/doc/src/algebra/bags.spad.dvi
 @
 \pagehead{Heap}{HEAP}
 \pagepic{ps/v103heap.ps}{HEAP}{1.00}
+See also:\\
+\refto{Stack}{STACK}
+\refto{ArrayStack}{ASTACK}
+\refto{Queue}{QUEUE}
+\refto{Dequeue}{DEQUEUE}
 <<domain HEAP Heap>>=
 )abbrev domain HEAP Heap
 ++ Author: Michael Monagan and Stephen Watt
@@ -11530,6 +16900,182 @@ Heap(S:OrderedSet): Exports == Implementation where
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain HELLFDIV HyperellipticFiniteDivisor}
+\pagehead{HyperellipticFiniteDivisor}{HELLFDIV}
+\pagepic{ps/v103hyperellipticfinitedivisor.ps}{HELLFDIV}{1.00}
+See also:\\
+\refto{FractionalIdeal}{FRIDEAL}
+\refto{FramedModule}{FRMOD}
+\refto{FiniteDivisor}{FDIV}
+<<domain HELLFDIV HyperellipticFiniteDivisor>>=
+)abbrev domain HELLFDIV HyperellipticFiniteDivisor
+++ Finite rational divisors on an hyperelliptic curve
+++ Author: Manuel Bronstein
+++ Date Created: 19 May 1993
+++ Date Last Updated: 20 July 1998
+++ Description:
+++ This domains implements finite rational divisors on an hyperelliptic curve,
+++ that is finite formal sums SUM(n * P) where the n's are integers and the
+++ P's are finite rational points on the curve.
+++ The equation of the curve must be  y^2 = f(x) and f must have odd degree.
+++ Keywords: divisor, algebraic, curve.
+++ Examples: )r FDIV INPUT
+HyperellipticFiniteDivisor(F, UP, UPUP, R): Exports == Implementation where
+  F   : Field
+  UP  : UnivariatePolynomialCategory F
+  UPUP: UnivariatePolynomialCategory Fraction UP
+  R   : FunctionFieldCategory(F, UP, UPUP)
+
+  O   ==> OutputForm
+  Z   ==> Integer
+  RF  ==> Fraction UP
+  ID  ==> FractionalIdeal(UP, RF, UPUP, R)
+  ERR ==> error "divisor: incomplete implementation for hyperelliptic curves"
+
+  Exports ==> FiniteDivisorCategory(F, UP, UPUP, R)
+
+  Implementation ==> add
+    if (uhyper:Union(UP, "failed") := hyperelliptic()$R) case "failed" then
+              error "HyperellipticFiniteDivisor: curve must be hyperelliptic"
+
+-- we use the semi-reduced representation from D.Cantor, "Computing in the
+-- Jacobian of a HyperellipticCurve", Mathematics of Computation, vol 48,
+-- no.177, January 1987, 95-101.
+-- The representation [a,b,f] for D means D = [a,b] + div(f)
+-- and [a,b] is a semi-reduced representative on the Jacobian
+    Rep := Record(center:UP, polyPart:UP, principalPart:R, reduced?:Boolean)
+
+    hyper:UP := uhyper::UP
+    gen:Z    := ((degree(hyper)::Z - 1) exquo 2)::Z     -- genus of the curve
+    dvd:O    := "div"::Symbol::O
+    zer:O    := 0::Z::O
+
+    makeDivisor  : (UP, UP, R) -> %
+    intReduc     : (R, UP) -> R
+    princ?       : % -> Boolean
+    polyIfCan    : R -> Union(UP, "failed")
+    redpolyIfCan : (R, UP) -> Union(UP, "failed")
+    intReduce    : (R, UP) -> R
+    mkIdeal      : (UP, UP) -> ID
+    reducedTimes : (Z, UP, UP) -> %
+    reducedDouble: (UP, UP) -> %
+
+    0                    == divisor(1$R)
+    divisor(g:R)         == [1, 0, g, true]
+    makeDivisor(a, b, g) == [a, b, g, false]
+--    princ? d             == one?(d.center) and zero?(d.polyPart)
+    princ? d             == (d.center = 1) and zero?(d.polyPart)
+    ideal d     == ideal([d.principalPart]) * mkIdeal(d.center, d.polyPart)
+    decompose d == [ideal makeDivisor(d.center, d.polyPart, 1),d.principalPart]
+    mkIdeal(a, b) == ideal [a::RF::R, reduce(monomial(1, 1)$UPUP-b::RF::UPUP)]
+
+-- keep the sum reduced if d1 and d2 are both reduced at the start
+    d1 + d2 ==
+      a1  := d1.center;   a2 := d2.center
+      b1  := d1.polyPart; b2 := d2.polyPart
+      rec := principalIdeal [a1, a2, b1 + b2]
+      d   := rec.generator
+      h   := rec.coef              -- d = h1 a1 + h2 a2 + h3(b1 + b2)
+      a   := ((a1 * a2) exquo d**2)::UP
+      b:UP:= first(h) * a1 * b2
+      b   := b + second(h) * a2 * b1
+      b   := b + third(h) * (b1*b2 + hyper)
+      b   := (b exquo d)::UP rem a
+      dd  := makeDivisor(a, b, d::RF * d1.principalPart * d2.principalPart)
+      d1.reduced? and d2.reduced? => reduce dd
+      dd
+
+-- if is cheaper to keep on reducing as we exponentiate if d is already reduced
+    n:Z * d:% ==
+      zero? n => 0
+      n < 0 => (-n) * (-d)
+      divisor(d.principalPart ** n) + divisor(mkIdeal(d.center,d.polyPart)**n)
+
+    divisor(i:ID) ==
+--      one?(n := #(v := basis minimize i)) => divisor v minIndex v
+      (n := #(v := basis minimize i)) = 1 => divisor v minIndex v
+      n ^= 2 => ERR
+      a := v minIndex v
+      h := v maxIndex v
+      (u := polyIfCan a) case UP =>
+        (w := redpolyIfCan(h, u::UP)) case UP => makeDivisor(u::UP, w::UP, 1)
+        ERR
+      (u := polyIfCan h) case UP =>
+        (w := redpolyIfCan(a, u::UP)) case UP => makeDivisor(u::UP, w::UP, 1)
+        ERR
+      ERR
+
+    polyIfCan a ==
+      (u := retractIfCan(a)@Union(RF, "failed")) case "failed" => "failed"
+      (v := retractIfCan(u::RF)@Union(UP, "failed")) case "failed" => "failed"
+      v::UP
+
+    redpolyIfCan(h, a) ==
+      degree(p := lift h) ^= 1 => "failed"
+      q := - coefficient(p, 0) / coefficient(p, 1)
+      rec := extendedEuclidean(denom q, a)
+      not ground?(rec.generator) => "failed"
+      ((numer(q) * rec.coef1) exquo rec.generator)::UP rem a
+
+    coerce(d:%):O ==
+      r := bracket [d.center::O, d.polyPart::O]
+      g := prefix(dvd, [d.principalPart::O])
+--      z := one?(d.principalPart)
+      z := (d.principalPart = 1)
+      princ? d => (z => zer; g)
+      z => r
+      r + g
+
+    reduce d ==
+      d.reduced? => d
+      degree(a := d.center) <= gen => (d.reduced? := true; d)
+      b  := d.polyPart
+      a0 := ((hyper - b**2) exquo a)::UP
+      b0 := (-b) rem a0
+      g  := d.principalPart * reduce(b::RF::UPUP-monomial(1,1)$UPUP)/a0::RF::R
+      reduce makeDivisor(a0, b0, g)
+
+    generator d ==
+      d := reduce d
+      princ? d => d.principalPart
+      "failed"
+
+    - d ==
+      a := d.center
+      makeDivisor(a, - d.polyPart, inv(a::RF * d.principalPart))
+
+    d1 = d2 ==
+      d1 := reduce d1
+      d2 := reduce d2
+      d1.center = d2.center and d1.polyPart = d2.polyPart
+        and d1.principalPart = d2.principalPart
+
+    divisor(a, b) ==
+      x := monomial(1, 1)$UP
+      not ground? gcd(d := x - a::UP, retract(discriminant())@UP) =>
+                                  error "divisor: point is singular"
+      makeDivisor(d, b::UP, 1)
+
+    intReduce(h, b) ==
+      v := integralCoordinates(h).num
+      integralRepresents(
+                [qelt(v, i) rem b for i in minIndex v .. maxIndex v], 1)
+
+-- with hyperelliptic curves, it is cheaper to keep divisors in reduced form
+    divisor(h, a, dp, g, r) ==
+      h  := h - (r * dp)::RF::R
+      a  := gcd(a, retract(norm h)@UP)
+      h  := intReduce(h, a)
+      if not ground? gcd(g, a) then h := intReduce(h ** rank(), a)
+      hh := lift h
+      b  := - coefficient(hh, 0) / coefficient(hh, 1)
+      rec := extendedEuclidean(denom b, a)
+      not ground?(rec.generator) => ERR
+      bb := ((numer(b) * rec.coef1) exquo rec.generator)::UP rem a
+      reduce makeDivisor(a, bb, 1)
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \chapter{Chapter I}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{domain ICARD IndexCard}
@@ -11539,6 +17085,10 @@ Heap(S:OrderedSet): Exports == Implementation where
 @
 \pagehead{IndexCard}{ICARD}
 \pagepic{ps/v103indexcard.ps}{ICARD}{1.00}
+See also:\\
+\refto{DataList}{DLIST}
+\refto{Database}{DBASE}
+\refto{QueryEquation}{QEQUAT}
 <<domain ICARD IndexCard>>=
 )abbrev domain ICARD IndexCard
 ++ This domain implements a container of information
@@ -11605,6 +17155,10 @@ IndexCard() : Exports == Implementation where
 @
 \pagehead{IndexedBits}{IBITS}
 \pagepic{ps/v103indexedbits.ps}{IBITS}{1.00}
+See also:\\
+\refto{Reference}{REF}
+\refto{Boolean}{BOOLEAN}
+\refto{Bits}{BITS}
 <<domain IBITS IndexedBits>>=
 )abbrev domain IBITS IndexedBits
 ++ Author: Stephen Watt and Michael Monagan
@@ -11680,6 +17234,12 @@ IndexedBits(mn:Integer): BitAggregate() with
 @
 \pagehead{IndexedFlexibleArray}{IFARRAY}
 \pagepic{ps/v103indexedflexiblearray.ps}{IFARRAY}{1.00}
+See also:\\
+\refto{PrimitiveArray}{PRIMARR}
+\refto{Tuple}{TUPLE}
+\refto{FlexibleArray}{FARRAY}
+\refto{IndexedOneDimensionalArray}{IARRAY1}
+\refto{OneDimensionalArray}{ARRAY1}
 <<domain IFARRAY IndexedFlexibleArray>>=
 )abbrev domain IFARRAY IndexedFlexibleArray
 ++ Author: Michael Monagan July/87, modified SMW June/91
@@ -11923,6 +17483,12 @@ IndexedFlexibleArray(S:Type, mn: Integer): Exports == Implementation where
 @
 \pagehead{IndexedOneDimensionalArray}{IARRAY1}
 \pagepic{ps/v103indexedonedimensionalarray.ps}{IARRAY1}{1.00}
+See also:\\
+\refto{PrimitiveArray}{PRIMARR}
+\refto{Tuple}{TUPLE}
+\refto{IndexedFlexibleArray}{IFARRAY}
+\refto{FlexibleArray}{FARRAY}
+\refto{OneDimensionalArray}{ARRAY1}
 <<domain IARRAY1 IndexedOneDimensionalArray>>=
 )abbrev domain IARRAY1 IndexedOneDimensionalArray
 ++ Author Micheal Monagan Aug/87
@@ -12031,6 +17597,9 @@ first column in an array and vice versa.
 @
 \pagehead{IndexedTwoDimensionalArray}{IARRAY2}
 \pagepic{ps/v103indexedtwodimensionalarray.ps}{IARRAY2}{1.00}
+See also:\\
+\refto{InnerIndexedTwoDimensionalArray}{IIARRAY2}
+\refto{TwoDimensionalArray}{ARRAY2}
 <<domain IARRAY2 IndexedTwoDimensionalArray>>=
 )abbrev domain IARRAY2 IndexedTwoDimensionalArray
 IndexedTwoDimensionalArray(R,mnRow,mnCol):Exports == Implementation where
@@ -12069,6 +17638,8 @@ IndexedTwoDimensionalArray(R,mnRow,mnCol):Exports == Implementation where
 @
 \pagehead{InnerAlgebraicNumber}{IAN}
 \pagepic{ps/v103inneralgebraicnumber.ps}{IAN}{1.00}
+See also:\\
+\refto{AlgebraicNumber}{AN}
 <<domain IAN InnerAlgebraicNumber>>=
 )abbrev domain IAN InnerAlgebraicNumber
 ++ Algebraic closure of the rational numbers
@@ -12225,6 +17796,9 @@ This is an internal type which provides an implementation of
 @
 \pagehead{InnerIndexedTwoDimensionalArray}{IIARRAY2}
 \pagepic{ps/v103innerindexedtwodimensionalarray.ps}{IIARRAY2}{1.00}
+See also:\\
+\refto{IndexedTwoDimensionalArray}{IARRAY2}
+\refto{TwoDimensionalArray}{ARRAY2}
 <<domain IIARRAY2 InnerIndexedTwoDimensionalArray>>=
 )abbrev domain IIARRAY2 InnerIndexedTwoDimensionalArray
 InnerIndexedTwoDimensionalArray(R,mnRow,mnCol,Row,Col):_
@@ -12310,6 +17884,108 @@ InnerIndexedTwoDimensionalArray(R,mnRow,mnCol,Row,Col):_
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain INTFTBL IntegrationFunctionsTable}
+\pagehead{IntegrationFunctionsTable}{INTFTBL}
+\pagepic{ps/v103integrationfunctionstable.ps}{INTFTBL}{1.00}
+<<domain INTFTBL IntegrationFunctionsTable>>=
+)abbrev domain INTFTBL IntegrationFunctionsTable
+++ Author: Brian Dupee
+++ Date Created: March 1995
+++ Date Last Updated: June 1995
+++ Description:
+++
+IntegrationFunctionsTable(): E == I where
+  EF2	==> ExpressionFunctions2
+  EFI	==> Expression Fraction Integer
+  FI	==> Fraction Integer
+  LEDF	==> List Expression DoubleFloat
+  KEDF	==> Kernel Expression DoubleFloat
+  EEDF	==> Equation Expression DoubleFloat
+  EDF	==> Expression DoubleFloat
+  PDF	==> Polynomial DoubleFloat
+  LDF	==> List DoubleFloat
+  SDF	==> Stream DoubleFloat
+  DF	==> DoubleFloat
+  F	==> Float
+  ST	==> String
+  LST	==> List String
+  SI	==> SingleInteger
+  SOCDF	==> Segment OrderedCompletion DoubleFloat
+  OCDF	==> OrderedCompletion DoubleFloat
+  OCEDF	==> OrderedCompletion Expression DoubleFloat
+  EOCEFI  ==> Equation OrderedCompletion Expression Fraction Integer
+  OCEFI   ==> OrderedCompletion Expression Fraction Integer
+  OCFI    ==> OrderedCompletion Fraction Integer
+  NIA	==> Record(var:Symbol,fn:EDF,range:SOCDF,abserr:DF,relerr:DF)
+  INT	==> Integer
+  CTYPE	==> Union(continuous: "Continuous at the end points",
+             lowerSingular: "There is a singularity at the lower end point",
+              upperSingular: "There is a singularity at the upper end point",
+               bothSingular: "There are singularities at both end points",
+                notEvaluated: "End point continuity not yet evaluated")
+  RTYPE	==> Union(finite: "The range is finite",
+              lowerInfinite: "The bottom of range is infinite",
+                upperInfinite: "The top of range is infinite",
+                  bothInfinite: "Both top and bottom points are infinite",
+                    notEvaluated: "Range not yet evaluated")
+  STYPE	==> Union(str:SDF,
+                   notEvaluated:"Internal singularities not yet evaluated")
+  ATT	==> Record(endPointContinuity:CTYPE,
+                    singularitiesStream:STYPE,range:RTYPE)
+  ROA	==> Record(key:NIA,entry:ATT)
+
+  E ==> with
+
+    showTheFTable:() -> $
+      ++ showTheFTable() returns the current table of functions.
+    clearTheFTable : () -> Void
+      ++ clearTheFTable() clears the current table of functions.
+    keys : $ -> List(NIA)
+      ++ keys(f) returns the list of keys of f
+    fTable: List Record(key:NIA,entry:ATT) -> $
+      ++ fTable(l) creates a functions table from the elements of l.
+    insert!:Record(key:NIA,entry:ATT) -> $
+      ++ insert!(r) inserts an entry r into theIFTable
+    showAttributes:NIA -> Union(ATT,"failed")
+      ++ showAttributes(x) \undocumented{}
+    entries : $ -> List Record(key:NIA,entry:ATT)
+      ++ entries(x) \undocumented{}
+    entry:NIA -> ATT
+      ++ entry(n) \undocumented{}
+  I ==> add
+
+    Rep := Table(NIA,ATT)
+    import Rep
+
+    theFTable:$ := empty()$Rep
+
+    showTheFTable():$ ==
+      theFTable
+
+    clearTheFTable():Void ==
+      theFTable := empty()$Rep
+      void()$Void
+
+    fTable(l:List Record(key:NIA,entry:ATT)):$ ==
+      theFTable := table(l)$Rep
+
+    insert!(r:Record(key:NIA,entry:ATT)):$ ==
+      insert!(r,theFTable)$Rep
+
+    keys(t:$):List NIA ==
+      keys(t)$Rep
+
+    showAttributes(k:NIA):Union(ATT,"failed") ==
+      search(k,theFTable)$Rep
+
+    entries(t:$):List Record(key:NIA,entry:ATT) ==
+      members(t)$Rep
+
+    entry(k:NIA):ATT ==
+      qelt(theFTable,k)$Rep
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \chapter{Chapter J}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -12397,6 +18073,8 @@ o $AXIOM/doc/src/algebra/any.spad.dvi
 @
 \pagehead{None}{NONE}
 \pagepic{ps/v103none.ps}{NONE}{1.00}
+See also:\\
+\refto{Any}{ANY}
 <<domain NONE None>>=
 )abbrev domain NONE None
 ++ Author:
@@ -12671,6 +18349,88 @@ NumericalPDEProblem():SetCategory with
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \chapter{Chapter O}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain ODEIFTBL ODEIntensityFunctionsTable}
+\pagehead{ODEIntensityFunctionsTable}{ODEIFTBL}
+\pagepic{ps/v103odeintensityfunctionstable.ps}{ODEIFTBL}{1.00}
+<<domain ODEIFTBL ODEIntensityFunctionsTable>>=
+)abbrev domain ODEIFTBL ODEIntensityFunctionsTable
+++ Author: Brian Dupee
+++ Date Created: May 1994
+++ Date Last Updated: January 1996
+++ Basic Operations: showTheIFTable, insert!
+++ Description:
+++ \axiom{ODEIntensityFunctionsTable()} provides a dynamic table and a set of
+++ functions to store details found out about sets of ODE's.
+
+ODEIntensityFunctionsTable(): E == I where
+  LEDF	==> List Expression DoubleFloat
+  LEEDF	==> List Equation Expression DoubleFloat
+  EEDF	==> Equation Expression DoubleFloat
+  VEDF	==> Vector Expression DoubleFloat
+  MEDF	==> Matrix Expression DoubleFloat
+  MDF	==> Matrix DoubleFloat
+  EDF	==> Expression DoubleFloat
+  DF	==> DoubleFloat
+  F	==> Float
+  INT	==> Integer
+  CDF	==> Complex DoubleFloat
+  LDF	==> List DoubleFloat
+  LF	==> List Float
+  S	==> Symbol
+  LS	==> List Symbol
+  MFI	==> Matrix Fraction Integer
+  LFI	==> List Fraction Integer
+  FI	==> Fraction Integer
+  ODEA	==> Record(xinit:DF,xend:DF,fn:VEDF,yinit:LDF,intvals:LDF,g:EDF,abserr:DF,relerr:DF)
+  ON	==> Record(additions:INT,multiplications:INT,exponentiations:INT,functionCalls:INT)
+  RVE 	==> Record(val:EDF,exponent:INT)
+  RSS	==> Record(stiffnessFactor:F,stabilityFactor:F)
+  ATT	==> Record(stiffness:F,stability:F,expense:F,accuracy:F,intermediateResults:F)
+  ROA	==> Record(key:ODEA,entry:ATT)
+
+  E ==> with
+    showTheIFTable:() -> $
+      ++ showTheIFTable() returns the current table of intensity functions.
+    clearTheIFTable : () -> Void
+      ++ clearTheIFTable() clears the current table of intensity functions.
+    keys : $ -> List(ODEA)
+      ++ keys(tab) returns the list of keys of f
+    iFTable: List Record(key:ODEA,entry:ATT) -> $
+      ++ iFTable(l) creates an intensity-functions table from the elements 
+      ++ of l.
+    insert!:Record(key:ODEA,entry:ATT) -> $
+      ++ insert!(r) inserts an entry r into theIFTable
+    showIntensityFunctions:ODEA -> Union(ATT,"failed")
+      ++ showIntensityFunctions(k) returns the entries in the 
+      ++ table of intensity functions k.
+
+  I ==> add
+    Rep := Table(ODEA,ATT)
+    import Rep
+
+    theIFTable:$ := empty()$Rep
+
+    showTheIFTable():$ ==
+      theIFTable
+
+    clearTheIFTable():Void ==
+      theIFTable := empty()$Rep
+      void()$Void
+
+    iFTable(l:List Record(key:ODEA,entry:ATT)):$ ==
+      theIFTable := table(l)$Rep
+
+    insert!(r:Record(key:ODEA,entry:ATT)):$ ==
+      insert!(r,theIFTable)$Rep
+
+    keys(t:$):List ODEA ==
+      keys(t)$Rep
+
+    showIntensityFunctions(k:ODEA):Union(ATT,"failed") ==
+      search(k,theIFTable)$Rep
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{domain ARRAY1 OneDimensionalArray}
 <<OneDimensionalArray.input>>=
 -- array1.spad.pamphlet OneDimensionalArray.input
@@ -12834,6 +18594,12 @@ o $AXIOM/doc/src/algebra/array1.spad.dvi
 @
 \pagehead{OneDimensionalArray}{ARRAY1}
 \pagepic{ps/v103onedimensionalarray.ps}{ARRAY1}{1.00}
+See also:\\
+\refto{PrimitiveArray}{PRIMARR}
+\refto{Tuple}{TUPLE}
+\refto{IndexedFlexibleArray}{IFARRAY}
+\refto{FlexibleArray}{FARRAY}
+\refto{IndexedOneDimensionalArray}{IARRAY1}
 <<domain ARRAY1 OneDimensionalArray>>=
 )abbrev domain ARRAY1 OneDimensionalArray
 ++ This is the domain of 1-based one dimensional arrays
@@ -12871,6 +18637,8 @@ OneDimensionalArray(S:Type): Exports == Implementation where
 @
 \pagehead{OnePointCompletion}{ONECOMP}
 \pagepic{ps/v103onepointcompletion.ps}{ONECOMP}{1.00}
+See also:\\
+\refto{OrderedCompletion}{ORDCOMP}
 <<domain ONECOMP OnePointCompletion>>=
 )abbrev domain ONECOMP OnePointCompletion
 ++ Completion with infinity
@@ -12984,6 +18752,8 @@ OnePointCompletion(R:SetCategory): Exports == Implementation where
 @
 \pagehead{OrderedCompletion}{ORDCOMP}
 \pagepic{ps/v103orderedcompletion.ps}{ORDCOMP}{1.00}
+See also:\\
+\refto{OnePointCompletion}{ONECOMP}
 <<domain ORDCOMP OrderedCompletion>>=
 )abbrev domain ORDCOMP OrderedCompletion
 ++ Completion with + and - infinity
@@ -13114,6 +18884,743 @@ OrderedCompletion(R:SetCategory): Exports == Implementation where
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain ODPOL OrderlyDifferentialPolynomial}
+See also:\\
+\refto{OrderlyDifferentialVariable}{ODVAR}
+\refto{SequentialDifferentialVariable}{SDVAR}
+\refto{DifferentialSparseMultivariatePolynomial}{DSMP}
+\refto{SequentialDifferentialPolynomial}{SDPOL}
+<<OrderlyDifferentialPolynomial.input>>=
+-- dpolcat.spad.pamphlet OrderlyDifferentialPolynomial.input
+)spool OrderlyDifferentialPolynomial.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 36
+dpol:= ODPOL(FRAC INT)
+--R 
+--R
+--R   (1)  OrderlyDifferentialPolynomial Fraction Integer
+--R                                                                 Type: Domain
+--E 1
+
+--S 2 of 36
+w := makeVariable('w)$dpol
+--R 
+--R
+--R   (2)  theMap(DPOLCAT-;makeVariable;AM;17!0,0)
+--R Type: (NonNegativeInteger -> OrderlyDifferentialPolynomial Fraction Integer)
+--E 2
+
+--S 3 of 36
+z := makeVariable('z)$dpol
+--R 
+--R
+--R   (3)  theMap(DPOLCAT-;makeVariable;AM;17!0,0)
+--R Type: (NonNegativeInteger -> OrderlyDifferentialPolynomial Fraction Integer)
+--E 3
+
+--S 4 of 36
+w.5
+--R 
+--R
+--R   (4)  w
+--R         5
+--R                         Type: OrderlyDifferentialPolynomial Fraction Integer
+--E 4
+
+--S 5 of 36
+w 0
+--R 
+--R
+--R   (5)  w
+--R                         Type: OrderlyDifferentialPolynomial Fraction Integer
+--E 5
+
+--S 6 of 36
+[z.i for i in 1..5]
+--R 
+--R
+--R   (6)  [z ,z ,z ,z ,z ]
+--R          1  2  3  4  5
+--R                    Type: List OrderlyDifferentialPolynomial Fraction Integer
+--E 6
+
+--S 7 of 36
+f:= w.4 - w.1 * w.1 * z.3 
+--R 
+--R
+--R               2
+--R   (7)  w  - w  z
+--R         4    1  3
+--R                         Type: OrderlyDifferentialPolynomial Fraction Integer
+--E 7
+
+--S 8 of 36
+g:=(z.1)**3 * (z.2)**2 - w.2
+--R 
+--R
+--R          3  2
+--R   (8)  z  z   - w
+--R         1  2     2
+--R                         Type: OrderlyDifferentialPolynomial Fraction Integer
+--E 8
+
+--S 9 of 36
+D(f)
+--R 
+--R
+--R               2
+--R   (9)  w  - w  z  - 2w w z
+--R         5    1  4     1 2 3
+--R                         Type: OrderlyDifferentialPolynomial Fraction Integer
+--E 9
+
+--S 10 of 36
+D(f,4)
+--R 
+--R
+--R   (10)
+--R            2                               2
+--R     w  - w  z  - 8w w z  + (- 12w w  - 12w  )z  - 2w z w
+--R      8    1  7     1 2 6         1 3      2   5     1 3 5
+--R   + 
+--R                                         2
+--R     (- 8w w  - 24w w )z  - 8w z w  - 6w  z
+--R          1 4      2 3  4     2 3 4     3  3
+--R                         Type: OrderlyDifferentialPolynomial Fraction Integer
+--E 10
+
+--S 11 of 36
+df:=makeVariable(f)$dpol
+--R 
+--R
+--R   (11)  theMap(DPOLCAT-;makeVariable;AM;17!0,0)
+--R Type: (NonNegativeInteger -> OrderlyDifferentialPolynomial Fraction Integer)
+--E 11
+
+--S 12 of 36
+df.4
+--R 
+--R
+--R   (12)
+--R            2                               2
+--R     w  - w  z  - 8w w z  + (- 12w w  - 12w  )z  - 2w z w
+--R      8    1  7     1 2 6         1 3      2   5     1 3 5
+--R   + 
+--R                                         2
+--R     (- 8w w  - 24w w )z  - 8w z w  - 6w  z
+--R          1 4      2 3  4     2 3 4     3  3
+--R                         Type: OrderlyDifferentialPolynomial Fraction Integer
+--E 12
+
+--S 13 of 36
+order(g)
+--R 
+--R
+--R   (13)  2
+--R                                                        Type: PositiveInteger
+--E 13
+
+--S 14 of 36
+order(g, 'w)
+--R 
+--R
+--R   (14)  2
+--R                                                        Type: PositiveInteger
+--E 14
+
+--S 15 of 36
+differentialVariables(g)
+--R 
+--R
+--R   (15)  [z,w]
+--R                                                            Type: List Symbol
+--E 15
+
+--S 16 of 36
+degree(g)
+--R 
+--R
+--R           2  3
+--R   (16)  z  z
+--R          2  1
+--R                    Type: IndexedExponents OrderlyDifferentialVariable Symbol
+--E 16
+
+--S 17 of 36
+degree(g, 'w) 
+--R 
+--R
+--R   (17)  1
+--R                                                        Type: PositiveInteger
+--E 17
+
+--S 18 of 36
+weights(g)
+--R 
+--R
+--R   (18)  [7,2]
+--R                                                Type: List NonNegativeInteger
+--E 18
+
+--S 19 of 36
+weights(g,'w)
+--R 
+--R
+--R   (19)  [2]
+--R                                                Type: List NonNegativeInteger
+--E 19
+
+--S 20 of 36
+weight(g)
+--R 
+--R
+--R   (20)  7
+--R                                                        Type: PositiveInteger
+--E 20
+
+--S 21 of 36
+isobaric?(g)
+--R 
+--R
+--R   (21)  false
+--R                                                                Type: Boolean
+--E 21
+
+--S 22 of 36
+eval(g,['w::Symbol],[f])
+--R 
+--R
+--R                  2                           2        3  2
+--R   (22)  - w  + w  z  + 4w w z  + (2w w  + 2w  )z  + z  z
+--R            6    1  5     1 2 4      1 3     2   3    1  2
+--R                         Type: OrderlyDifferentialPolynomial Fraction Integer
+--E 22
+
+--S 23 of 36
+eval(g,variables(w.0),[f])
+--R 
+--R
+--R           3  2
+--R   (23)  z  z   - w
+--R          1  2     2
+--R                         Type: OrderlyDifferentialPolynomial Fraction Integer
+--E 23
+
+--S 24 of 36
+monomials(g)
+--R 
+--R
+--R            3  2
+--R   (24)  [z  z  ,- w ]
+--R           1  2     2
+--R                    Type: List OrderlyDifferentialPolynomial Fraction Integer
+--E 24
+
+--S 25 of 36
+variables(g)
+--R 
+--R
+--R   (25)  [z ,w ,z ]
+--R           2  2  1
+--R                                Type: List OrderlyDifferentialVariable Symbol
+--E 25
+
+--S 26 of 36
+gcd(f,g)
+--R 
+--R
+--R   (26)  1
+--R                         Type: OrderlyDifferentialPolynomial Fraction Integer
+--E 26
+
+--S 27 of 36
+groebner([f,g])
+--R 
+--R
+--R                 2     3  2
+--R   (27)  [w  - w  z ,z  z   - w ]
+--R           4    1  3  1  2     2
+--R                    Type: List OrderlyDifferentialPolynomial Fraction Integer
+--E 27
+
+--S 28 of 36
+lg:=leader(g)
+--R 
+--R
+--R   (28)  z
+--R          2
+--R                                     Type: OrderlyDifferentialVariable Symbol
+--E 28
+
+--S 29 of 36
+sg:=separant(g)
+--R 
+--R
+--R            3
+--R   (29)  2z  z
+--R           1  2
+--R                         Type: OrderlyDifferentialPolynomial Fraction Integer
+--E 29
+
+--S 30 of 36
+ig:=initial(g)
+--R 
+--R
+--R           3
+--R   (30)  z
+--R          1
+--R                         Type: OrderlyDifferentialPolynomial Fraction Integer
+--E 30
+
+--S 31 of 36
+g1 := D g
+--R 
+--R
+--R            3               2  3
+--R   (31)  2z  z z  - w  + 3z  z
+--R           1  2 3    3     1  2
+--R                         Type: OrderlyDifferentialPolynomial Fraction Integer
+--E 31
+
+--S 32 of 36
+lg1:= leader g1
+--R 
+--R
+--R   (32)  z
+--R          3
+--R                                     Type: OrderlyDifferentialVariable Symbol
+--E 32
+
+--S 33 of 36
+pdf:=D(f, lg1)
+--R 
+--R
+--R             2
+--R   (33)  - w
+--R            1
+--R                         Type: OrderlyDifferentialPolynomial Fraction Integer
+--E 33
+
+--S 34 of 36
+prf:=sg * f- pdf * g1
+--R 
+--R
+--R            3         2        2  2  3
+--R   (34)  2z  z w  - w  w  + 3w  z  z
+--R           1  2 4    1  3     1  1  2
+--R                         Type: OrderlyDifferentialPolynomial Fraction Integer
+--E 34
+
+--S 35 of 36
+lcf:=leadingCoefficient univariate(prf, lg)
+--R 
+--R
+--R            2  2
+--R   (35)  3w  z
+--R           1  1
+--R                         Type: OrderlyDifferentialPolynomial Fraction Integer
+--E 35
+
+--S 36 of 36
+ig * prf - lcf * g * lg
+--R 
+--R
+--R            6         2  3        2  2
+--R   (36)  2z  z w  - w  z  w  + 3w  z  w z
+--R           1  2 4    1  1  3     1  1  2 2
+--R                         Type: OrderlyDifferentialPolynomial Fraction Integer
+--E 36
+)spool
+)lisp (bye)
+@
+<<OrderlyDifferentialPolynomial.help>>=
+====================================================================
+OrderlyDifferentialPolynomial examples
+====================================================================
+
+Many systems of differential equations may be transformed to equivalent 
+systems of ordinary differential equations where the equations are expressed 
+polynomially in terms of the unknown functions.  In Axiom, the domain 
+constructors OrderlyDifferentialPolynomial (abbreviated ODPOL) and
+SequentialDifferentialPolynomial (abbreviation SDPOL) implement two
+domains of ordinary differential polynomials over any differential
+ring.  In the simplest case, this differential ring is usually either
+the ring of integers, or the field of rational numbers.  However,
+Axiom can handle ordinary differential polynomials over a field of
+rational functions in a single indeterminate.
+
+The two domains ODPOL and SDPOL are almost identical, the only difference 
+being the choice of a different ranking, which is an ordering of the 
+derivatives of the indeterminates.  The first domain uses an orderly ranking, 
+that is, derivatives of higher order are ranked higher, and derivatives of 
+the same order are ranked alphabetically.  The second domain uses a 
+sequential ranking, where derivatives are ordered first alphabetically 
+by the differential indeterminates, and then by order.  A more general 
+domain constructor, DifferentialSparseMultivariatePolynomial (abbreviation 
+DSMP) allows both a user-provided list of differential indeterminates
+as well as a user-defined ranking.  We shall illustrate ODPOL(FRAC INT), 
+which constructs a domain of ordinary differential polynomials in an 
+arbitrary number of differential indeterminates with rational numbers 
+as coefficients.
+
+  dpol:= ODPOL(FRAC INT)
+    OrderlyDifferentialPolynomial Fraction Integer
+                            Type: Domain
+
+A differential indeterminate w may be viewed as an infinite sequence of 
+algebraic indeterminates, which are the derivatives of w. To facilitate 
+referencing these, Axiom provides the operation makeVariable to convert 
+an element of type Symbol to a map from the natural numbers to the 
+differential polynomial ring.
+
+  w := makeVariable('w)$dpol
+    theMap(DPOLCAT-;makeVariable;AM;17!0,0)
+ Type: (NonNegativeInteger -> OrderlyDifferentialPolynomial Fraction Integer)
+
+  z := makeVariable('z)$dpol
+    theMap(DPOLCAT-;makeVariable;AM;17!0,0)
+ Type: (NonNegativeInteger -> OrderlyDifferentialPolynomial Fraction Integer)
+
+The fifth derivative of w can be obtained by applying the map w to the 
+number 5.  Note that the order of differentiation is given as a subscript 
+(except when the order is 0).
+
+  w.5
+    w
+     5
+                      Type: OrderlyDifferentialPolynomial Fraction Integer
+
+  w 0
+    w
+                      Type: OrderlyDifferentialPolynomial Fraction Integer
+
+The first five derivatives of z can be generated by a list.
+
+  [z.i for i in 1..5]
+    [z ,z ,z ,z ,z ]
+      1  2  3  4  5
+                    Type: List OrderlyDifferentialPolynomial Fraction Integer
+
+The usual arithmetic can be used to form a differential polynomial from
+the derivatives.
+
+  f:= w.4 - w.1 * w.1 * z.3 
+           2
+    w  - w  z
+     4    1  3
+                    Type: OrderlyDifferentialPolynomial Fraction Integer
+
+  g:=(z.1)**3 * (z.2)**2 - w.2
+      3  2
+    z  z   - w
+     1  2     2
+                    Type: OrderlyDifferentialPolynomial Fraction Integer
+
+The operation D computes the derivative of any differential polynomial.
+
+  D(f)
+           2
+    w  - w  z  - 2w w z
+     5    1  4     1 2 3
+                    Type: OrderlyDifferentialPolynomial Fraction Integer
+
+The same operation can compute higher derivatives, like the fourth derivative.
+
+  D(f,4)
+            2                               2
+     w  - w  z  - 8w w z  + (- 12w w  - 12w  )z  - 2w z w
+      8    1  7     1 2 6         1 3      2   5     1 3 5
+   + 
+                                         2
+     (- 8w w  - 24w w )z  - 8w z w  - 6w  z
+          1 4      2 3  4     2 3 4     3  3
+                         Type: OrderlyDifferentialPolynomial Fraction Integer
+
+The operation makeVariable creates a map to facilitate referencing the 
+derivatives of f, similar to the map w.
+
+  df:=makeVariable(f)$dpol
+    theMap(DPOLCAT-;makeVariable;AM;17!0,0)
+ Type: (NonNegativeInteger -> OrderlyDifferentialPolynomial Fraction Integer)
+
+The fourth derivative of f may be referenced easily.
+
+  df.4
+            2                               2
+     w  - w  z  - 8w w z  + (- 12w w  - 12w  )z  - 2w z w
+      8    1  7     1 2 6         1 3      2   5     1 3 5
+   + 
+                                         2
+     (- 8w w  - 24w w )z  - 8w z w  - 6w  z
+          1 4      2 3  4     2 3 4     3  3
+                    Type: OrderlyDifferentialPolynomial Fraction Integer
+
+The operation order returns the order of a differential polynomial, 
+or the order in a specified differential indeterminate.
+
+  order(g)
+    2
+                    Type: PositiveInteger
+
+  order(g, 'w)
+    2
+                    Type: PositiveInteger
+
+The operation differentialVariables returns a list of differential 
+indeterminates occurring in a differential polynomial.
+
+  differentialVariables(g)
+    [z,w]
+                    Type: List Symbol
+
+The operation degree returns the degree, or the degree in the differential 
+indeterminate specified.
+
+  degree(g)
+       2  3
+     z  z
+      2  1
+                    Type: IndexedExponents OrderlyDifferentialVariable Symbol
+
+  degree(g, 'w) 
+    1
+                    Type: PositiveInteger
+
+The operation weights returns a list of weights of differential monomials 
+appearing in differential polynomial, or a list of weights in a specified 
+differential indeterminate.
+
+  weights(g)
+    [7,2]
+                    Type: List NonNegativeInteger
+
+  weights(g,'w)
+    [2]
+                    Type: List NonNegativeInteger
+
+The operation weight returns the maximum weight of all differential 
+monomials appearing in the differential polynomial.
+
+  weight(g)
+    7
+                    Type: PositiveInteger
+
+A differential polynomial is isobaric if the weights of all differential 
+monomials appearing in it are equal.
+
+  isobaric?(g)
+    false
+                    Type: Boolean
+
+To substitute differentially, use eval. Note that we must coerce 'w to 
+Symbol, since in ODPOL, differential indeterminates belong to the domain 
+Symbol.  Compare this result to the next, which substitutes algebraically
+(no substitution is done since w.0 does not appear in g).
+
+  eval(g,['w::Symbol],[f])
+              2                           2        3  2
+     - w  + w  z  + 4w w z  + (2w w  + 2w  )z  + z  z
+        6    1  5     1 2 4      1 3     2   3    1  2
+                    Type: OrderlyDifferentialPolynomial Fraction Integer
+
+  eval(g,variables(w.0),[f])
+       3  2
+     z  z   - w
+      1  2     2
+                    Type: OrderlyDifferentialPolynomial Fraction Integer
+
+Since OrderlyDifferentialPolynomial belongs to PolynomialCategory, all 
+the operations defined in the latter category, or in packages for the 
+latter category, are available.
+
+  monomials(g)
+        3  2
+     [z  z  ,- w ]
+       1  2     2
+                    Type: List OrderlyDifferentialPolynomial Fraction Integer
+
+  variables(g)
+    [z ,w ,z ]
+      2  2  1
+                    Type: List OrderlyDifferentialVariable Symbol
+
+  gcd(f,g)
+    1
+                    Type: OrderlyDifferentialPolynomial Fraction Integer
+
+  groebner([f,g])
+             2     3  2
+     [w  - w  z ,z  z   - w ]
+       4    1  3  1  2     2
+                    Type: List OrderlyDifferentialPolynomial Fraction Integer
+
+The next three operations are essential for elimination procedures in
+differential polynomial rings.  The operation leader returns the leader
+of a differential polynomial, which is the highest ranked derivative
+of the differential indeterminates that occurs.
+
+  lg:=leader(g)
+     z
+      2
+                    Type: OrderlyDifferentialVariable Symbol
+
+The operation separant returns the separant of a differential polynomial, 
+which is the partial derivative with respect to the leader.
+
+  sg:=separant(g)
+       3
+    2z  z
+      1  2
+                    Type: OrderlyDifferentialPolynomial Fraction Integer
+
+The operation initial returns the initial, which is the leading coefficient 
+when the given differential polynomial is expressed as a polynomial in 
+the leader.
+
+  ig:=initial(g)
+      3
+    z
+     1
+                    Type: OrderlyDifferentialPolynomial Fraction Integer
+
+Using these three operations, it is possible to reduce f modulo the 
+differential ideal generated by g.  The general scheme is to first 
+reduce the order, then reduce the degree in the leader.  First, eliminate 
+z.3 using the derivative of g.
+
+  g1 := D g
+       3               2  3
+    2z  z z  - w  + 3z  z
+      1  2 3    3     1  2
+                    Type: OrderlyDifferentialPolynomial Fraction Integer
+
+Find its leader.
+
+  lg1:= leader g1
+    z
+     3
+                    Type: OrderlyDifferentialVariable Symbol
+
+Differentiate f partially with respect to this leader.
+
+  pdf:=D(f, lg1)
+        2
+    - w
+       1
+                    Type: OrderlyDifferentialPolynomial Fraction Integer
+
+Compute the partial remainder of f with respect to g.
+
+  prf:=sg * f- pdf * g1
+       3         2        2  2  3
+    2z  z w  - w  w  + 3w  z  z
+      1  2 4    1  3     1  1  2
+                     Type: OrderlyDifferentialPolynomial Fraction Integer
+
+Note that high powers of lg still appear in prf.  Compute the leading 
+coefficient of prf as a polynomial in the leader of g.
+
+  lcf:=leadingCoefficient univariate(prf, lg)
+       2  2
+    3w  z
+      1  1
+                     Type: OrderlyDifferentialPolynomial Fraction Integer
+
+Finally, continue eliminating the high powers of lg appearing in prf to 
+obtain the (pseudo) remainder of f modulo g and its derivatives.
+
+  ig * prf - lcf * g * lg
+       6         2  3        2  2
+    2z  z w  - w  z  w  + 3w  z  w z
+      1  2 4    1  1  3     1  1  2 2
+                     Type: OrderlyDifferentialPolynomial Fraction Integer
+
+See Also:
+o )show OrderlyDifferentialPolynomial
+o $AXIOM/doc/src/algebra/dpolcat.spad.dvi
+
+@
+\pagehead{OrderlyDifferentialPolynomial}{ODPOL}
+\pagepic{ps/v103orderlydifferentialpolynomial.ps}{ODPOL}{1.00}
+<<domain ODPOL OrderlyDifferentialPolynomial>>=
+)abbrev domain ODPOL OrderlyDifferentialPolynomial
+++ Author:  William Sit
+++ Date Created: 24 September, 1991
+++ Date Last Updated: 7 February, 1992
+++ Basic Operations:DifferentialPolynomialCategory
+++ Related Constructors: DifferentialSparseMultivariatePolynomial
+++ See Also:
+++ AMS Classifications:12H05
+++ Keywords: differential indeterminates, ranking, differential polynomials,
+++           order, weight, leader, separant, initial, isobaric
+++ References:Kolchin, E.R. "Differential Algebra and Algebraic Groups"
+++   (Academic Press, 1973).
+++ Description:
+++   \spadtype{OrderlyDifferentialPolynomial} implements
+++   an ordinary differential polynomial ring in arbitrary number
+++   of differential indeterminates, with coefficients in a
+++   ring.  The ranking on the differential indeterminate is orderly.
+++   This is analogous to the domain \spadtype{Polynomial}.
+++
+
+OrderlyDifferentialPolynomial(R):
+     Exports == Implementation where
+  R: Ring
+  S  ==> Symbol
+  V  ==> OrderlyDifferentialVariable S
+  E   ==> IndexedExponents(V)
+  SMP ==> SparseMultivariatePolynomial(R, S)
+  Exports ==> Join(DifferentialPolynomialCategory(R,S,V,E),
+                   RetractableTo SMP)
+
+  Implementation ==> DifferentialSparseMultivariatePolynomial(R,S,V)
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain ODVAR OrderlyDifferentialVariable}
+\pagehead{OrderlyDifferentialVariable}{ODVAR}
+\pagepic{ps/v103orderlydifferentialvariable.ps}{ODVAR}{1.00}
+See also:\\
+\refto{SequentialDifferentialVariable}{SDVAR}
+\refto{DifferentialSparseMultivariatePolynomial}{DSMP}
+\refto{OrderlyDifferentialPolynomial}{ODPOL}
+\refto{SequentialDifferentialPolynomial}{SDPOL}
+<<domain ODVAR OrderlyDifferentialVariable>>=
+)abbrev domain ODVAR OrderlyDifferentialVariable
+++ Author:  William Sit
+++ Date Created: 19 July 1990
+++ Date Last Updated: 13 September 1991
+++ Basic Operations:differentiate, order, variable,<
+++ Related Domains: OrderedVariableList,
+++                  SequentialDifferentialVariable.
+++ See Also: DifferentialVariableCategory
+++ AMS Classifications:12H05
+++ Keywords: differential indeterminates, orderly ranking.
+++ References:Kolchin, E.R. "Differential Algebra and Algebraic Groups"
+++   (Academic Press, 1973).
+++ Description:
+++   \spadtype{OrderlyDifferentialVariable} adds a commonly used orderly
+++   ranking to the set of derivatives of an ordered list of differential
+++   indeterminates.  An orderly ranking is a ranking \spadfun{<} of the
+++   derivatives with the property that for two derivatives u and v,
+++   u \spadfun{<} v if the \spadfun{order} of u is less than that
+++   of v.
+++   This domain belongs to \spadtype{DifferentialVariableCategory}.  It
+++   defines \spadfun{weight} to be just \spadfun{order}, and it
+++   defines an orderly ranking \spadfun{<} on derivatives u via the
+++   lexicographic order on the pair
+++   (\spadfun{order}(u), \spadfun{variable}(u)).
+OrderlyDifferentialVariable(S:OrderedSet):DifferentialVariableCategory(S)
+  == add
+    Rep := Record(var:S, ord:NonNegativeInteger)
+    makeVariable(s,n) == [s, n]
+    variable v     == v.var
+    order v        == v.ord
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \chapter{Chapter P}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{domain PALETTE Palette}
@@ -13123,6 +19630,8 @@ OrderedCompletion(R:SetCategory): Exports == Implementation where
 @
 \pagehead{Palette}{PALETTE}
 \pagepic{ps/v103palette.ps}{PALETTE}{1.00}
+See also:\\
+\refto{Color}{COLOR}
 <<domain PALETTE Palette>>=
 )abbrev domain PALETTE Palette
 ++ Author: Jim Wen
@@ -14431,6 +20940,76 @@ PlaneAlgebraicCurvePlot(): PlottablePlaneCurveCategory _
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain HACKPI Pi}
+\pagehead{Pi}{HACKPI}
+\pagepic{ps/v103pi.ps}{HACKPI}{1.00}
+See also:\\
+\refto{Expression}{EXPR}
+<<domain HACKPI Pi>>=
+)abbrev domain HACKPI Pi
+++ Expressions in %pi only
+++ Author: Manuel Bronstein
+++ Description:
+++  Symbolic fractions in %pi with integer coefficients;
+++  The point for using Pi as the default domain for those fractions
+++  is that Pi is coercible to the float types, and not Expression.
+++ Date Created: 21 Feb 1990
+++ Date Last Updated: 12 Mai 1992
+Pi(): Exports == Implementation where
+  PZ ==> Polynomial Integer
+  UP ==> SparseUnivariatePolynomial Integer
+  RF ==> Fraction UP
+
+  Exports ==> Join(Field, CharacteristicZero, RetractableTo Integer,
+                   RetractableTo Fraction Integer, RealConstant,
+                   CoercibleTo DoubleFloat, CoercibleTo Float,
+                   ConvertibleTo RF, ConvertibleTo InputForm) with
+    pi: () -> % ++ pi() returns the symbolic %pi.
+  Implementation ==> RF add
+    Rep := RF
+
+    sympi := "%pi"::Symbol
+
+    p2sf: UP -> DoubleFloat
+    p2f : UP -> Float
+    p2o : UP -> OutputForm
+    p2i : UP -> InputForm
+    p2p:  UP -> PZ
+
+    pi()                    == (monomial(1, 1)$UP :: RF) pretend %
+    convert(x:%):RF         == x pretend RF
+    convert(x:%):Float      == x::Float
+    convert(x:%):DoubleFloat == x::DoubleFloat
+    coerce(x:%):DoubleFloat  == p2sf(numer x) / p2sf(denom x)
+    coerce(x:%):Float       == p2f(numer x) / p2f(denom x)
+    p2o p                   == outputForm(p, sympi::OutputForm)
+    p2i p                   == convert p2p p
+
+    p2p p ==
+      ans:PZ := 0
+      while p ^= 0 repeat
+        ans := ans + monomial(leadingCoefficient(p)::PZ, sympi, degree p)
+        p   := reductum p
+      ans
+
+    coerce(x:%):OutputForm ==
+      (r := retractIfCan(x)@Union(UP, "failed")) case UP => p2o(r::UP)
+      p2o(numer x) / p2o(denom x)
+
+    convert(x:%):InputForm ==
+      (r := retractIfCan(x)@Union(UP, "failed")) case UP => p2i(r::UP)
+      p2i(numer x) / p2i(denom x)
+
+    p2sf p ==
+      map(#1::DoubleFloat, p)$SparseUnivariatePolynomialFunctions2(
+        Integer, DoubleFloat) (pi()$DoubleFloat)
+
+    p2f p ==
+      map(#1::Float, p)$SparseUnivariatePolynomialFunctions2(
+        Integer, Float) (pi()$Float)
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{domain PRIMARR PrimitiveArray}
 <<dot>>=
 "PRIMARR" -> "A1AGG"
@@ -14438,6 +21017,12 @@ PlaneAlgebraicCurvePlot(): PlottablePlaneCurveCategory _
 @
 \pagehead{PrimitiveArray}{PRIMARR}
 \pagepic{ps/v103primitivearray.ps}{PRIMARR}{1.00}
+See also:\\
+\refto{Tuple}{TUPLE}
+\refto{IndexedFlexibleArray}{IFARRAY}
+\refto{FlexibleArray}{FARRAY}
+\refto{IndexedOneDimensionalArray}{IARRAY1}
+\refto{OneDimensionalArray}{ARRAY1}
 <<domain PRIMARR PrimitiveArray>>=
 )abbrev domain PRIMARR PrimitiveArray
 ++ This provides a fast array type with no bound checking on elt's.
@@ -14472,6 +21057,8 @@ PrimitiveArray(S:Type): OneDimensionalArrayAggregate S == add
 @
 \pagehead{QuadraticForm}{QFORM}
 \pagepic{ps/v103quadraticform.ps}{QFORM}{1.00}
+See also:\\
+\refto{CliffordAlgebra}{CLIF}
 <<domain QFORM QuadraticForm>>=
 )abbrev domain QFORM QuadraticForm
 ++ Author: Stephen M. Watt
@@ -14522,6 +21109,10 @@ QuadraticForm(n, K): T == Impl where
 @
 \pagehead{QueryEquation}{QEQUAT}
 \pagepic{ps/v103queryequation.ps}{QEQUAT}{1.00}
+See also:\\
+\refto{DataList}{DLIST}
+\refto{IndexCard}{ICARD}
+\refto{Database}{DBASE}
 <<domain QEQUAT QueryEquation>>=
 )abbrev domain QEQUAT QueryEquation
 ++ This domain implements simple database queries 
@@ -14549,6 +21140,11 @@ QueryEquation(): Exports == Implementation where
 @
 \pagehead{Queue}{QUEUE}
 \pagepic{ps/v103queue.ps}{QUEUE}{1.00}
+See also:\\
+\refto{Stack}{STACK}
+\refto{ArrayStack}{ASTACK}
+\refto{Dequeue}{DEQUEUE}
+\refto{Heap}{HEAP}
 <<domain QUEUE Queue>>=
 )abbrev domain QUEUE Queue
 ++ Author: Michael Monagan and Stephen Watt
@@ -14610,6 +21206,8 @@ Queue(S:SetCategory): QueueAggregate S with
 @
 \pagehead{RadicalFunctionField}{RADFF}
 \pagepic{ps/v103radicalfunctionfield.ps}{RADFF}{1.00}
+See also:\\
+\refto{AlgebraicFunctionField}{ALGFF}
 <<domain RADFF RadicalFunctionField>>=
 )abbrev domain RADFF RadicalFunctionField
 ++ Function field defined by y**n = f(x)
@@ -14818,6 +21416,10 @@ RadicalFunctionField(F, UP, UPUP, radicnd, n): Exports == Impl where
 @
 \pagehead{Reference}{REF}
 \pagepic{ps/v103reference.ps}{REF}{1.00}
+See also:\\
+\refto{Boolean}{BOOLEAN}
+\refto{IndexedBits}{IBITS}
+\refto{Bits}{BITS}
 <<domain REF Reference>>=
 )abbrev domain REF Reference
 ++ Author: Stephen M. Watt
@@ -14863,6 +21465,93 @@ Reference(S:Type): Type with
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \chapter{Chapter S}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain SDPOL SequentialDifferentialPolynomial}
+\pagehead{SequentialDifferentialPolynomial}{SDPOL}
+\pagepic{ps/v103sequentialdifferentialpolynomial.ps}{SDPOL}{1.00}
+See also:\\
+\refto{OrderlyDifferentialVariable}{ODVAR}
+\refto{SequentialDifferentialVariable}{SDVAR}
+\refto{DifferentialSparseMultivariatePolynomial}{DSMP}
+\refto{OrderlyDifferentialPolynomial}{ODPOL}
+<<domain SDPOL SequentialDifferentialPolynomial>>=
+)abbrev domain SDPOL SequentialDifferentialPolynomial
+++ Author:  William Sit
+++ Date Created: 24 September, 1991
+++ Date Last Updated: 7 February, 1992
+++ Basic Operations:DifferentialPolynomialCategory
+++ Related Constructors: DifferentialSparseMultivariatePolynomial
+++ See Also:
+++ AMS Classifications:12H05
+++ Keywords: differential indeterminates, ranking, differential polynomials,
+++           order, weight, leader, separant, initial, isobaric
+++ References:Kolchin, E.R. "Differential Algebra and Algebraic Groups"
+++   (Academic Press, 1973).
+++ Description:
+++   \spadtype{SequentialDifferentialPolynomial} implements
+++   an ordinary differential polynomial ring in arbitrary number
+++   of differential indeterminates, with coefficients in a
+++   ring.  The ranking on the differential indeterminate is sequential.
+++
+
+SequentialDifferentialPolynomial(R):
+     Exports == Implementation where
+  R: Ring
+  S  ==> Symbol
+  V  ==> SequentialDifferentialVariable S
+  E   ==> IndexedExponents(V)
+  SMP ==> SparseMultivariatePolynomial(R, S)
+  Exports ==> Join(DifferentialPolynomialCategory(R,S,V,E),
+                   RetractableTo SMP)
+
+  Implementation ==> DifferentialSparseMultivariatePolynomial(R,S,V)
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain SDVAR SequentialDifferentialVariable}
+\pagehead{SequentialDifferentialVariable}{SDVAR}
+\pagepic{ps/v103sequentialdifferentialvariable.ps}{SDVAR}{1.00}
+See also:\\
+\refto{OrderlyDifferentialVariable}{ODVAR}
+\refto{DifferentialSparseMultivariatePolynomial}{DSMP}
+\refto{OrderlyDifferentialPolynomial}{ODPOL}
+\refto{SequentialDifferentialPolynomial}{SDPOL}
+<<domain SDVAR SequentialDifferentialVariable>>=
+)abbrev domain SDVAR SequentialDifferentialVariable
+++ Author:  William Sit
+++ Date Created: 19 July 1990
+++ Date Last Updated: 13 September 1991
+++ Basic Operations:differentiate, order, variable, <
+++ Related Domains: OrderedVariableList,
+++                  OrderlyDifferentialVariable.
+++ See Also:DifferentialVariableCategory
+++ AMS Classifications:12H05
+++ Keywords: differential indeterminates, sequential ranking.
+++ References:Kolchin, E.R. "Differential Algebra and Algebraic Groups"
+++   (Academic Press, 1973).
+++ Description:
+++   \spadtype{OrderlyDifferentialVariable} adds a commonly used sequential
+++   ranking to the set of derivatives of an ordered list of differential
+++   indeterminates.  A sequential ranking is a ranking \spadfun{<} of the
+++   derivatives with the property that for any derivative v,
+++   there are only a finite number of derivatives u with u \spadfun{<} v.
+++   This domain belongs to \spadtype{DifferentialVariableCategory}.  It
+++   defines \spadfun{weight} to be just \spadfun{order}, and it
+++   defines a sequential ranking \spadfun{<} on derivatives u by the
+++   lexicographic order on the pair
+++   (\spadfun{variable}(u), \spadfun{order}(u)).
+
+SequentialDifferentialVariable(S:OrderedSet):DifferentialVariableCategory(S)
+  == add
+    Rep := Record(var:S, ord:NonNegativeInteger)
+    makeVariable(s,n) == [s, n]
+    variable v     == v.var
+    order v        == v.ord
+    v < u ==
+      variable v = variable u => order v < order u
+      variable v < variable u
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{domain SAE SimpleAlgebraicExtension}
 <<dot>>=
 "SimpleAlgebraicExtension(a:FRAC(UPOLYC(UFD)),b:UPOLYC(FRAC(UPOLYC(UFD))))"
@@ -15064,6 +21753,11 @@ SimpleAlgebraicExtension(R:CommutativeRing,
 @
 \pagehead{Stack}{STACK}
 \pagepic{ps/v103stack.ps}{STACK}{1.00}
+See also:\\
+\refto{ArrayStack}{ASTACK}
+\refto{Queue}{QUEUE}
+\refto{Dequeue}{DEQUEUE}
+\refto{Heap}{HEAP}
 <<domain STACK Stack>>=
 )abbrev domain STACK Stack
 ++ Author: Michael Monagan and Stephen Watt
@@ -15122,6 +21816,12 @@ Stack(S:SetCategory): StackAggregate S with
 @
 \pagehead{Tuple}{TUPLE}
 \pagepic{ps/v103tuple.ps}{TUPLE}{1.00}
+See also:\\
+\refto{PrimitiveArray}{PRIMARR}
+\refto{IndexedFlexibleArray}{IFARRAY}
+\refto{FlexibleArray}{FARRAY}
+\refto{IndexedOneDimensionalArray}{IARRAY1}
+\refto{OneDimensionalArray}{ARRAY1}
 <<domain TUPLE Tuple>>=
 )abbrev domain TUPLE Tuple
 ++ This domain is used to interface with the interpreter's notion
@@ -15625,6 +22325,9 @@ o $AXIOM/doc/src/algebra/array2.spad.dvi
 @
 \pagehead{TwoDimensionalArray}{ARRAY2}
 \pagepic{ps/v103twodimensionalarray.ps}{ARRAY2}{1.00}
+See also:\\
+\refto{InnerIndexedTwoDimensionalArray}{IIARRAY2}
+\refto{IndexedTwoDimensionalArray}{IARRAY2}
 <<domain ARRAY2 TwoDimensionalArray>>=
 )abbrev domain ARRAY2 TwoDimensionalArray
 TwoDimensionalArray(R):Exports == Implementation where
@@ -15644,6 +22347,291 @@ TwoDimensionalArray(R):Exports == Implementation where
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \chapter{Chapter U}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain UPXSSING UnivariatePuiseuxSeriesWithExponentialSingularity}
+\pagehead{UnivariatePuiseuxSeriesWithExponentialSingularity}{UPXSSING}
+\pagepic{ps/v103univariatepuiseuxserieswithexponentialsingularity.ps}{UPXSSING}{1.00}
+See also:\\
+\refto{ExponentialOfUnivariatePuiseuxSeries}{EXPUPXS}
+\refto{ExponentialExpansion}{EXPEXPAN}
+<<domain UPXSSING UnivariatePuiseuxSeriesWithExponentialSingularity>>=
+)abbrev domain UPXSSING UnivariatePuiseuxSeriesWithExponentialSingularity
+++ Author: Clifton J. Williamson
+++ Date Created: 4 August 1992
+++ Date Last Updated: 27 August 1992
+++ Basic Operations:
+++ Related Domains: UnivariatePuiseuxSeries(FE,var,cen),
+++                  ExponentialOfUnivariatePuiseuxSeries(FE,var,cen)
+++                  ExponentialExpansion(R,FE,var,cen)
+++ Also See:
+++ AMS Classifications:
+++ Keywords: limit, functional expression, power series
+++ Examples:
+++ References:
+++ Description:
+++   UnivariatePuiseuxSeriesWithExponentialSingularity is a domain used to
+++   represent functions with essential singularities.  Objects in this
+++   domain are sums, where each term in the sum is a univariate Puiseux
+++   series times the exponential of a univariate Puiseux series.  Thus,
+++   the elements of this domain are sums of expressions of the form
+++   \spad{g(x) * exp(f(x))}, where g(x) is a univariate Puiseux series
+++   and f(x) is a univariate Puiseux series with no terms of non-negative
+++   degree.
+UnivariatePuiseuxSeriesWithExponentialSingularity(R,FE,var,cen):_
+  Exports == Implementation where
+  R   : Join(OrderedSet,RetractableTo Integer,_
+             LinearlyExplicitRingOver Integer,GcdDomain)
+  FE  : Join(AlgebraicallyClosedField,TranscendentalFunctionCategory,_
+             FunctionSpace R)
+  var : Symbol
+  cen : FE
+  B       ==> Boolean
+  I       ==> Integer
+  L       ==> List
+  RN      ==> Fraction Integer
+  UPXS    ==> UnivariatePuiseuxSeries(FE,var,cen)
+  EXPUPXS ==> ExponentialOfUnivariatePuiseuxSeries(FE,var,cen)
+  OFE     ==> OrderedCompletion FE
+  Result  ==> Union(OFE,"failed")
+  PxRec   ==> Record(k: Fraction Integer,c:FE)
+  Term    ==> Record(%coef:UPXS,%expon:EXPUPXS,%expTerms:List PxRec)
+    -- the %expTerms field is used to record the list of the terms (a 'term'
+    -- records an exponent and a coefficient) in the exponent %expon
+  TypedTerm ==> Record(%term:Term,%type:String)
+    -- a term together with a String which tells whether it has an infinite,
+    -- zero, or unknown limit as var -> cen+
+  TRec    ==> Record(%zeroTerms: List Term,_
+                     %infiniteTerms: List Term,_
+                     %failedTerms: List Term,_
+                     %puiseuxSeries: UPXS)
+  SIGNEF  ==> ElementaryFunctionSign(R,FE)
+
+  Exports ==> Join(FiniteAbelianMonoidRing(UPXS,EXPUPXS),IntegralDomain) with
+    limitPlus : % -> Union(OFE,"failed")
+      ++ limitPlus(f(var)) returns \spad{limit(var -> cen+,f(var))}.
+    dominantTerm : % -> Union(TypedTerm,"failed")
+      ++ dominantTerm(f(var)) returns the term that dominates the limiting
+      ++ behavior of \spad{f(var)} as \spad{var -> cen+} together with a
+      ++ \spadtype{String} which briefly describes that behavior.  The
+      ++ value of the \spadtype{String} will be \spad{"zero"} (resp.
+      ++ \spad{"infinity"}) if the term tends to zero (resp. infinity)
+      ++ exponentially and will \spad{"series"} if the term is a
+      ++ Puiseux series.
+
+  Implementation ==> PolynomialRing(UPXS,EXPUPXS) add
+    makeTerm : (UPXS,EXPUPXS) -> Term
+    coeff : Term -> UPXS
+    exponent : Term -> EXPUPXS
+    exponentTerms : Term -> List PxRec
+    setExponentTerms_! : (Term,List PxRec) -> List PxRec
+    computeExponentTerms_! : Term -> List PxRec
+    terms : % -> List Term
+    sortAndDiscardTerms: List Term -> TRec
+    termsWithExtremeLeadingCoef : (L Term,RN,I) -> Union(L Term,"failed")
+    filterByOrder: (L Term,(RN,RN) -> B) -> Record(%list:L Term,%order:RN)
+    dominantTermOnList : (L Term,RN,I) -> Union(Term,"failed")
+    iDominantTerm : L Term -> Union(Record(%term:Term,%type:String),"failed")
+
+    retractIfCan f ==
+      (numberOfMonomials f = 1) and (zero? degree f) => leadingCoefficient f
+      "failed"
+
+    recip f ==
+      numberOfMonomials f = 1 =>
+        monomial(inv leadingCoefficient f,- degree f)
+      "failed"
+
+    makeTerm(coef,expon) == [coef,expon,empty()]
+    coeff term == term.%coef
+    exponent term == term.%expon
+    exponentTerms term == term.%expTerms
+    setExponentTerms_!(term,list) == term.%expTerms := list
+    computeExponentTerms_! term ==
+      setExponentTerms_!(term,entries complete terms exponent term)
+
+    terms f ==
+      -- terms with a higher order singularity will appear closer to the
+      -- beginning of the list because of the ordering in EXPPUPXS;
+      -- no "expnonent terms" are computed by this function
+      zero? f => empty()
+      concat(makeTerm(leadingCoefficient f,degree f),terms reductum f)
+
+    sortAndDiscardTerms termList ==
+      -- 'termList' is the list of terms of some function f(var), ordered
+      -- so that terms with a higher order singularity occur at the
+      -- beginning of the list.
+      -- This function returns lists of candidates for the "dominant
+      -- term" in 'termList', i.e. the term which describes the
+      -- asymptotic behavior of f(var) as var -> cen+.
+      -- 'zeroTerms' will contain terms which tend to zero exponentially
+      -- and contains only those terms with the lowest order singularity.
+      -- 'zeroTerms' will be non-empty only when there are no terms of
+      -- infinite or series type.
+      -- 'infiniteTerms' will contain terms which tend to infinity
+      -- exponentially and contains only those terms with the highest
+      -- order singularity.
+      -- 'failedTerms' will contain terms which have an exponential
+      -- singularity, where we cannot say whether the limiting value
+      -- is zero or infinity. Only terms with a higher order sigularity
+      -- than the terms on 'infiniteList' are included.
+      -- 'pSeries' will be a Puiseux series representing a term without an
+      -- exponential singularity.  'pSeries' will be non-zero only when no
+      -- other terms are known to tend to infinity exponentially
+      zeroTerms : List Term := empty()
+      infiniteTerms : List Term := empty()
+      failedTerms : List Term := empty()
+      -- we keep track of whether or not we've found an infinite term
+      -- if so, 'infTermOrd' will be set to a negative value
+      infTermOrd : RN := 0
+      -- we keep track of whether or not we've found a zero term
+      -- if so, 'zeroTermOrd' will be set to a negative value
+      zeroTermOrd : RN := 0
+      ord : RN := 0; pSeries : UPXS := 0  -- dummy values
+      while not empty? termList repeat
+        -- 'expon' is a Puiseux series
+        expon := exponent(term := first termList)
+        -- quit if there is an infinite term with a higher order singularity
+        (ord := order(expon,0)) > infTermOrd => leave "infinite term dominates"
+        -- if ord = 0, we've hit the end of the list
+        (ord = 0) =>
+          -- since we have a series term, don't bother with zero terms
+          leave(pSeries := coeff(term); zeroTerms := empty())
+        coef := coefficient(expon,ord)
+        -- if we can't tell if the lowest order coefficient is positive or
+        -- negative, we have a "failed term"
+        (signum := sign(coef)$SIGNEF) case "failed" =>
+          failedTerms := concat(term,failedTerms)
+          termList := rest termList
+        -- if the lowest order coefficient is positive, we have an
+        -- "infinite term"
+        (sig := signum :: Integer) = 1 =>
+          infTermOrd := ord
+          infiniteTerms := concat(term,infiniteTerms)
+          -- since we have an infinite term, don't bother with zero terms
+          zeroTerms := empty()
+          termList := rest termList
+        -- if the lowest order coefficient is negative, we have a
+        -- "zero term" if there are no infinite terms and no failed
+        -- terms, add the term to 'zeroTerms'
+        if empty? infiniteTerms then
+          zeroTerms :=
+            ord = zeroTermOrd => concat(term,zeroTerms)
+            zeroTermOrd := ord
+            list term
+        termList := rest termList
+      -- reverse "failed terms" so that higher order singularities
+      -- appear at the beginning of the list
+      [zeroTerms,infiniteTerms,reverse_! failedTerms,pSeries]
+
+    termsWithExtremeLeadingCoef(termList,ord,signum) ==
+      -- 'termList' consists of terms of the form [g(x),exp(f(x)),...];
+      -- when 'signum' is +1 (resp. -1), this function filters 'termList'
+      -- leaving only those terms such that coefficient(f(x),ord) is
+      -- maximal (resp. minimal)
+      while (coefficient(exponent first termList,ord) = 0) repeat
+        termList := rest termList
+      empty? termList => error "UPXSSING: can't happen"
+      coefExtreme := coefficient(exponent first termList,ord)
+      outList := list first termList; termList := rest termList
+      for term in termList repeat
+        (coefDiff := coefficient(exponent term,ord) - coefExtreme) = 0 =>
+          outList := concat(term,outList)
+        (sig := sign(coefDiff)$SIGNEF) case "failed" => return "failed"
+        (sig :: Integer) = signum => outList := list term
+      outList
+
+    filterByOrder(termList,predicate) ==
+      -- 'termList' consists of terms of the form [g(x),exp(f(x)),expTerms],
+      -- where 'expTerms' is a list containing some of the terms in the
+      -- series f(x).
+      -- The function filters 'termList' and, when 'predicate' is < (resp. >),
+      -- leaves only those terms with the lowest (resp. highest) order term
+      -- in 'expTerms'
+      while empty? exponentTerms first termList repeat
+        termList := rest termList
+        empty? termList => error "UPXSING: can't happen"
+      ordExtreme := (first exponentTerms first termList).k
+      outList := list first termList
+      for term in rest termList repeat
+        not empty? exponentTerms term =>
+          (ord := (first exponentTerms term).k) = ordExtreme =>
+            outList := concat(term,outList)
+          predicate(ord,ordExtreme) =>
+            ordExtreme := ord
+            outList := list term
+      -- advance pointers on "exponent terms" on terms on 'outList'
+      for term in outList repeat
+        setExponentTerms_!(term,rest exponentTerms term)
+      [outList,ordExtreme]
+
+    dominantTermOnList(termList,ord0,signum) ==
+      -- finds dominant term on 'termList'
+      -- it is known that "exponent terms" of order < 'ord0' are
+      -- the same for all terms on 'termList'
+      newList := termsWithExtremeLeadingCoef(termList,ord0,signum)
+      newList case "failed" => "failed"
+      termList := newList :: List Term
+      empty? rest termList => first termList
+      filtered :=
+        signum = 1 => filterByOrder(termList,#1 < #2)
+        filterByOrder(termList,#1 > #2)
+      termList := filtered.%list
+      empty? rest termList => first termList
+      dominantTermOnList(termList,filtered.%order,signum)
+
+    iDominantTerm termList ==
+      termRecord := sortAndDiscardTerms termList
+      zeroTerms := termRecord.%zeroTerms
+      infiniteTerms := termRecord.%infiniteTerms
+      failedTerms := termRecord.%failedTerms
+      pSeries := termRecord.%puiseuxSeries
+      -- in future versions, we will deal with "failed terms"
+      -- at present, if any occur, we cannot determine the limit
+      not empty? failedTerms => "failed"
+      not zero? pSeries => [makeTerm(pSeries,0),"series"]
+      not empty? infiniteTerms =>
+        empty? rest infiniteTerms => [first infiniteTerms,"infinity"]
+        for term in infiniteTerms repeat computeExponentTerms_! term
+        ord0 := order exponent first infiniteTerms
+        (dTerm := dominantTermOnList(infiniteTerms,ord0,1)) case "failed" =>
+          return "failed"
+        [dTerm :: Term,"infinity"]
+      empty? rest zeroTerms => [first zeroTerms,"zero"]
+      for term in zeroTerms repeat computeExponentTerms_! term
+      ord0 := order exponent first zeroTerms
+      (dTerm := dominantTermOnList(zeroTerms,ord0,-1)) case "failed" =>
+        return "failed"
+      [dTerm :: Term,"zero"]
+
+    dominantTerm f == iDominantTerm terms f
+
+    limitPlus f ==
+      -- list the terms occurring in 'f'; if there are none, then f = 0
+      empty?(termList := terms f) => 0
+      -- compute dominant term
+      (tInfo := iDominantTerm termList) case "failed" => "failed"
+      termInfo := tInfo :: Record(%term:Term,%type:String)
+      domTerm := termInfo.%term
+      (type := termInfo.%type) = "series" =>
+        -- find limit of series term
+        (ord := order(pSeries := coeff domTerm,1)) > 0 => 0
+        coef := coefficient(pSeries,ord)
+        member?(var,variables coef) => "failed"
+        ord = 0 => coef :: OFE
+        -- in the case of an infinite limit, we need to know the sign
+        -- of the first non-zero coefficient
+        (signum := sign(coef)$SIGNEF) case "failed" => "failed"
+        (signum :: Integer) = 1 => plusInfinity()
+        minusInfinity()
+      type = "zero" => 0
+      -- examine lowest order coefficient in series part of 'domTerm'
+      ord := order(pSeries := coeff domTerm)
+      coef := coefficient(pSeries,ord)
+      member?(var,variables coef) => "failed"
+      (signum := sign(coef)$SIGNEF) case "failed" => "failed"
+      (signum :: Integer) = 1 => plusInfinity()
+      minusInfinity()
+
+@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \chapter{Chapter V}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -16215,6 +23203,7 @@ Note that this code is not included in the generated catdef.spad file.
 <<algebra>>=
 <<domain ALGFF AlgebraicFunctionField>>
 <<domain AN AlgebraicNumber>>
+<<domain ANTISYM AntiSymm>>
 <<domain ANY Any>>
 <<domain ASTACK ArrayStack>>
 <<domain ASP1 Asp1>>
@@ -16260,10 +23249,47 @@ Note that this code is not included in the generated catdef.spad file.
 <<domain DBASE Database>>
 <<domain DLIST DataList>>
 <<domain DEQUEUE Dequeue>>
+<<domain DERHAM DeRhamComplex>>
+<<domain DSMP DifferentialSparseMultivariatePolynomial>>
+<<domain DROPT DrawOption>>
+<<domain D01AJFA d01ajfAnnaType>>
+<<domain D01AKFA d01akfAnnaType>>
+<<domain D01ALFA d01alfAnnaType>>
+<<domain D01AMFA d01amfAnnaType>>
+<<domain D01ANFA d01anfAnnaType>>
+<<domain D01APFA d01apfAnnaType>>
+<<domain D01AQFA d01aqfAnnaType>>
+<<domain D01ASFA d01asfAnnaType>>
+<<domain D01FCFA d01fcfAnnaType>>
+<<domain D01GBFA d01gbfAnnaType>>
+<<domain D01TRNS d01TransformFunctionType>>
+<<domain D02BBFA d02bbfAnnaType>>
+<<domain D02BHFA d02bhfAnnaType>>
+<<domain D02CJFA d02cjfAnnaType>>
+<<domain D02EJFA d02ejfAnnaType>>
+<<domain D03EEFA d03eefAnnaType>>
+<<domain D03FAFA d03fafAnnaType>>
+
+<<domain EAB ExtAlgBasis>>
+<<domain EQ Equation>>
+<<domain EXPEXPAN ExponentialExpansion>>
+<<domain EXPUPXS ExponentialOfUnivariatePuiseuxSeries>>
+<<domain EXPR Expression>>
+<<domain E04DGFA e04dgfAnnaType>>
+<<domain E04FDFA e04fdfAnnaType>>
+<<domain E04GCFA e04gcfAnnaType>>
+<<domain E04JAFA e04jafAnnaType>>
+<<domain E04MBFA e04mbfAnnaType>>
+<<domain E04NAFA e04nafAnnaType>>
+<<domain E04UCFA e04ucfAnnaType>>
 
 <<domain FARRAY FlexibleArray>>
+<<domain FDIV FiniteDivisor>>
+<<domain FRIDEAL FractionalIdeal>>
+<<domain FRMOD FramedModule>>
 
 <<domain HEAP Heap>>
+<<domain HELLFDIV HyperellipticFiniteDivisor>>
 
 <<domain ICARD IndexCard>>
 <<domain IBITS IndexedBits>>
@@ -16272,6 +23298,7 @@ Note that this code is not included in the generated catdef.spad file.
 <<domain IARRAY2 IndexedTwoDimensionalArray>>
 <<domain IAN InnerAlgebraicNumber>>
 <<domain IIARRAY2 InnerIndexedTwoDimensionalArray>>
+<<domain INTFTBL IntegrationFunctionsTable>>
 
 <<domain NONE None>>
 <<domain NIPROB NumericalIntegrationProblem>>
@@ -16280,12 +23307,16 @@ Note that this code is not included in the generated catdef.spad file.
 <<domain OPTPROB NumericalOptimizationProblem>>
 <<domain PDEPROB NumericalPDEProblem>>
 
+<<domain ODEIFTBL ODEIntensityFunctionsTable>>
 <<domain ARRAY1 OneDimensionalArray>>
 <<domain ONECOMP OnePointCompletion>>
 <<domain ORDCOMP OrderedCompletion>>
+<<domain ODPOL OrderlyDifferentialPolynomial>>
+<<domain ODVAR OrderlyDifferentialVariable>>
 
 <<domain ACPLOT PlaneAlgebraicCurvePlot>>
 <<domain PALETTE Palette>>
+<<domain HACKPI Pi>>
 <<domain PRIMARR PrimitiveArray>>
 
 <<domain QFORM QuadraticForm>> 
@@ -16296,10 +23327,15 @@ Note that this code is not included in the generated catdef.spad file.
 <<domain REF Reference>>
 
 <<domain SAE SimpleAlgebraicExtension>>
+<<domain SDPOL SequentialDifferentialPolynomial>>
+<<domain SDVAR SequentialDifferentialVariable>>
 <<domain STACK Stack>>
 
 <<domain TUPLE Tuple>>
 <<domain ARRAY2 TwoDimensionalArray>>
+
+<<domain UPXSSING UnivariatePuiseuxSeriesWithExponentialSingularity>>
+
 @
 \begin{thebibliography}{99}
 \bibitem{1} Lounesto, P.
diff --git a/books/bookvol7.1.pamphlet b/books/bookvol7.1.pamphlet
index a88a865..efb5a02 100644
--- a/books/bookvol7.1.pamphlet
+++ b/books/bookvol7.1.pamphlet
@@ -71202,7 +71202,7 @@ find a solution.
 Some computer algebra systems use heuristics or table-driven
 approaches to integration.  When these systems cannot determine the
 answer to an integration problem, they reply ``I don't know.'' Axiom
-uses a algorithm for integration.  that conclusively proves that an
+uses an algorithm for integration.  that conclusively proves that an
 integral cannot be expressed in terms of elementary functions.
 
 \xtc{
diff --git a/books/ps/v103e04dgfannatype.ps b/books/ps/v103e04dgfannatype.ps
new file mode 100644
index 0000000..09dd3c0
--- /dev/null
+++ b/books/ps/v103e04dgfannatype.ps
@@ -0,0 +1,248 @@
+%!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 156 80
+%%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 156 80
+%%PageOrientation: Portrait
+gsave
+36 36 120 44 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 42 lineto
+118 42 lineto
+118 -6 lineto
+closepath
+fill
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 42 lineto
+118 42 lineto
+118 -6 lineto
+closepath
+stroke
+0.000 0.000 0.000 graphcolor
+14.00 /Times-Roman set_font
+% e04dgfAnnaType
+[ /Rect [ 0 0 112 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.3.pdf#nameddest=E04DGFA) >>
+  /Subtype /Link
+/ANN pdfmark
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 112 36 moveto
+0 36 lineto
+0 0 lineto
+112 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 112 36 moveto
+0 36 lineto
+0 0 lineto
+112 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+7 13 moveto
+(e04dgfAnnaType)
+[6.24 7.2 6.96 6.96 6.96 4.56 10.08 6.96 6.96 6.24 7.2 6.96 6.96 6.24]
+xshow
+end grestore
+end grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+end
+restore
+%%EOF
diff --git a/books/ps/v103e04fdfannatype.ps b/books/ps/v103e04fdfannatype.ps
new file mode 100644
index 0000000..9fb8b85
--- /dev/null
+++ b/books/ps/v103e04fdfannatype.ps
@@ -0,0 +1,248 @@
+%!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 154 80
+%%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 154 80
+%%PageOrientation: Portrait
+gsave
+36 36 118 44 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 42 lineto
+116 42 lineto
+116 -6 lineto
+closepath
+fill
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 42 lineto
+116 42 lineto
+116 -6 lineto
+closepath
+stroke
+0.000 0.000 0.000 graphcolor
+14.00 /Times-Roman set_font
+% e04fdfAnnaType
+[ /Rect [ 0 0 110 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.3.pdf#nameddest=E04FDFA) >>
+  /Subtype /Link
+/ANN pdfmark
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 110 36 moveto
+0 36 lineto
+0 0 lineto
+110 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 110 36 moveto
+0 36 lineto
+0 0 lineto
+110 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+7 13 moveto
+(e04fdfAnnaType)
+[6.24 7.2 6.96 4.56 6.96 4.56 10.08 6.96 6.96 6.24 7.2 6.96 6.96 6.24]
+xshow
+end grestore
+end grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+end
+restore
+%%EOF
diff --git a/books/ps/v103e04gcfannatype.ps b/books/ps/v103e04gcfannatype.ps
new file mode 100644
index 0000000..c1733b1
--- /dev/null
+++ b/books/ps/v103e04gcfannatype.ps
@@ -0,0 +1,248 @@
+%!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 156 80
+%%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 156 80
+%%PageOrientation: Portrait
+gsave
+36 36 120 44 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 42 lineto
+118 42 lineto
+118 -6 lineto
+closepath
+fill
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 42 lineto
+118 42 lineto
+118 -6 lineto
+closepath
+stroke
+0.000 0.000 0.000 graphcolor
+14.00 /Times-Roman set_font
+% e04gcfAnnaType
+[ /Rect [ 0 0 112 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.3.pdf#nameddest=E04GCFA) >>
+  /Subtype /Link
+/ANN pdfmark
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 112 36 moveto
+0 36 lineto
+0 0 lineto
+112 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 112 36 moveto
+0 36 lineto
+0 0 lineto
+112 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+8 13 moveto
+(e04gcfAnnaType)
+[6.24 7.2 6.96 6.96 6.24 4.56 10.08 6.96 6.96 6.24 7.2 6.96 6.96 6.24]
+xshow
+end grestore
+end grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+end
+restore
+%%EOF
diff --git a/books/ps/v103e04jafannatype.ps b/books/ps/v103e04jafannatype.ps
new file mode 100644
index 0000000..973dd30
--- /dev/null
+++ b/books/ps/v103e04jafannatype.ps
@@ -0,0 +1,248 @@
+%!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 152 80
+%%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 152 80
+%%PageOrientation: Portrait
+gsave
+36 36 116 44 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 42 lineto
+114 42 lineto
+114 -6 lineto
+closepath
+fill
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 42 lineto
+114 42 lineto
+114 -6 lineto
+closepath
+stroke
+0.000 0.000 0.000 graphcolor
+14.00 /Times-Roman set_font
+% e04jafAnnaType
+[ /Rect [ 0 0 108 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.3.pdf#nameddest=E04JAFA) >>
+  /Subtype /Link
+/ANN pdfmark
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 108 36 moveto
+0 36 lineto
+0 0 lineto
+108 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 108 36 moveto
+0 36 lineto
+0 0 lineto
+108 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+7 13 moveto
+(e04jafAnnaType)
+[6.24 7.2 6.96 3.84 6.24 4.56 10.08 6.96 6.96 6.24 7.2 6.96 6.96 6.24]
+xshow
+end grestore
+end grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+end
+restore
+%%EOF
diff --git a/books/ps/v103e04mbfannatype.ps b/books/ps/v103e04mbfannatype.ps
new file mode 100644
index 0000000..a6ad348
--- /dev/null
+++ b/books/ps/v103e04mbfannatype.ps
@@ -0,0 +1,248 @@
+%!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 160 80
+%%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 160 80
+%%PageOrientation: Portrait
+gsave
+36 36 124 44 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 42 lineto
+122 42 lineto
+122 -6 lineto
+closepath
+fill
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 42 lineto
+122 42 lineto
+122 -6 lineto
+closepath
+stroke
+0.000 0.000 0.000 graphcolor
+14.00 /Times-Roman set_font
+% e04mbfAnnaType
+[ /Rect [ 0 0 116 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.3.pdf#nameddest=E04MBFA) >>
+  /Subtype /Link
+/ANN pdfmark
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 116 36 moveto
+0 36 lineto
+0 0 lineto
+116 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 116 36 moveto
+0 36 lineto
+0 0 lineto
+116 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+7 13 moveto
+(e04mbfAnnaType)
+[6.24 7.2 6.96 10.8 6.96 4.56 10.08 6.96 6.96 6.24 7.2 6.96 6.96 6.24]
+xshow
+end grestore
+end grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+end
+restore
+%%EOF
diff --git a/books/ps/v103e04nafannatype.ps b/books/ps/v103e04nafannatype.ps
new file mode 100644
index 0000000..4d9f9d3
--- /dev/null
+++ b/books/ps/v103e04nafannatype.ps
@@ -0,0 +1,248 @@
+%!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 156 80
+%%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 156 80
+%%PageOrientation: Portrait
+gsave
+36 36 120 44 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 42 lineto
+118 42 lineto
+118 -6 lineto
+closepath
+fill
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 42 lineto
+118 42 lineto
+118 -6 lineto
+closepath
+stroke
+0.000 0.000 0.000 graphcolor
+14.00 /Times-Roman set_font
+% e04nafAnnaType
+[ /Rect [ 0 0 112 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.3.pdf#nameddest=E04NAFA) >>
+  /Subtype /Link
+/ANN pdfmark
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 112 36 moveto
+0 36 lineto
+0 0 lineto
+112 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 112 36 moveto
+0 36 lineto
+0 0 lineto
+112 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+8 13 moveto
+(e04nafAnnaType)
+[6.24 7.2 6.96 6.96 6.24 4.56 10.08 6.96 6.96 6.24 7.2 6.96 6.96 6.24]
+xshow
+end grestore
+end grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+end
+restore
+%%EOF
diff --git a/books/ps/v103e04ucfannatype.ps b/books/ps/v103e04ucfannatype.ps
new file mode 100644
index 0000000..aa764f9
--- /dev/null
+++ b/books/ps/v103e04ucfannatype.ps
@@ -0,0 +1,248 @@
+%!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 156 80
+%%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 156 80
+%%PageOrientation: Portrait
+gsave
+36 36 120 44 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 42 lineto
+118 42 lineto
+118 -6 lineto
+closepath
+fill
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 42 lineto
+118 42 lineto
+118 -6 lineto
+closepath
+stroke
+0.000 0.000 0.000 graphcolor
+14.00 /Times-Roman set_font
+% e04ucfAnnaType
+[ /Rect [ 0 0 112 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.3.pdf#nameddest=E04UCFA) >>
+  /Subtype /Link
+/ANN pdfmark
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 112 36 moveto
+0 36 lineto
+0 0 lineto
+112 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 112 36 moveto
+0 36 lineto
+0 0 lineto
+112 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+8 13 moveto
+(e04ucfAnnaType)
+[6.24 7.2 6.96 6.96 6.24 4.56 10.08 6.96 6.96 6.24 7.2 6.96 6.96 6.24]
+xshow
+end grestore
+end grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+end
+restore
+%%EOF
diff --git a/books/ps/v103equation.ps b/books/ps/v103equation.ps
new file mode 100644
index 0000000..6a9d608
--- /dev/null
+++ b/books/ps/v103equation.ps
@@ -0,0 +1,248 @@
+%!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 110 80
+%%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 110 80
+%%PageOrientation: Portrait
+gsave
+36 36 74 44 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 42 lineto
+72 42 lineto
+72 -6 lineto
+closepath
+fill
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 42 lineto
+72 42 lineto
+72 -6 lineto
+closepath
+stroke
+0.000 0.000 0.000 graphcolor
+14.00 /Times-Roman set_font
+% Equation
+[ /Rect [ 0 0 66 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.3.pdf#nameddest=EQ) >>
+  /Subtype /Link
+/ANN pdfmark
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 66 36 moveto
+0 36 lineto
+0 0 lineto
+66 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 66 36 moveto
+0 36 lineto
+0 0 lineto
+66 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+7 13 moveto
+(Equation)
+[8.64 6.72 6.96 6.24 3.84 3.84 6.96 6.96]
+xshow
+end grestore
+end grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+end
+restore
+%%EOF
diff --git a/books/ps/v103exponentialexpansion.ps b/books/ps/v103exponentialexpansion.ps
new file mode 100644
index 0000000..6626311
--- /dev/null
+++ b/books/ps/v103exponentialexpansion.ps
@@ -0,0 +1,248 @@
+%!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 186 80
+%%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 186 80
+%%PageOrientation: Portrait
+gsave
+36 36 150 44 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 42 lineto
+148 42 lineto
+148 -6 lineto
+closepath
+fill
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 42 lineto
+148 42 lineto
+148 -6 lineto
+closepath
+stroke
+0.000 0.000 0.000 graphcolor
+14.00 /Times-Roman set_font
+% ExponentialExpansion
+[ /Rect [ 0 0 142 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.3.pdf#nameddest=EXPEXPAN) >>
+  /Subtype /Link
+/ANN pdfmark
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 142 36 moveto
+0 36 lineto
+0 0 lineto
+142 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 142 36 moveto
+0 36 lineto
+0 0 lineto
+142 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+7 13 moveto
+(ExponentialExpansion)
+[8.64 6.96 6.96 6.96 6.96 6.24 6.96 3.84 3.84 6.24 3.84 8.64 6.96 6.96 6.24 6.96 5.52 3.84 6.96 6.96]
+xshow
+end grestore
+end grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+end
+restore
+%%EOF
diff --git a/books/ps/v103exponentialofunivariatepuiseuxseries.ps b/books/ps/v103exponentialofunivariatepuiseuxseries.ps
new file mode 100644
index 0000000..6e701c1
--- /dev/null
+++ b/books/ps/v103exponentialofunivariatepuiseuxseries.ps
@@ -0,0 +1,248 @@
+%!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 280 80
+%%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 280 80
+%%PageOrientation: Portrait
+gsave
+36 36 244 44 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 42 lineto
+242 42 lineto
+242 -6 lineto
+closepath
+fill
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 42 lineto
+242 42 lineto
+242 -6 lineto
+closepath
+stroke
+0.000 0.000 0.000 graphcolor
+14.00 /Times-Roman set_font
+% ExponentialOfUnivariatePuiseuxSeries
+[ /Rect [ 0 0 236 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.3.pdf#nameddest=EXPUPXS) >>
+  /Subtype /Link
+/ANN pdfmark
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 236 36 moveto
+0 36 lineto
+0 0 lineto
+236 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 236 36 moveto
+0 36 lineto
+0 0 lineto
+236 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+8 13 moveto
+(ExponentialOfUnivariatePuiseuxSeries)
+[8.64 6.96 6.96 6.96 6.96 6.24 6.96 3.84 3.84 6.24 3.84 10.08 4.56 9.6 6.96 3.84 6.72 6.24 5.04 3.84 6.24 3.84 6.24 7.68 6.96 3.84 5.52 6.24 6.96 6.96 7.68 6.24 5.04 3.84 6.24 5.52]
+xshow
+end grestore
+end grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+end
+restore
+%%EOF
diff --git a/books/ps/v103expression.ps b/books/ps/v103expression.ps
new file mode 100644
index 0000000..74f49d8
--- /dev/null
+++ b/books/ps/v103expression.ps
@@ -0,0 +1,248 @@
+%!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 122 80
+%%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 122 80
+%%PageOrientation: Portrait
+gsave
+36 36 86 44 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 42 lineto
+84 42 lineto
+84 -6 lineto
+closepath
+fill
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 42 lineto
+84 42 lineto
+84 -6 lineto
+closepath
+stroke
+0.000 0.000 0.000 graphcolor
+14.00 /Times-Roman set_font
+% Expression
+[ /Rect [ 0 0 78 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.3.pdf#nameddest=EXPR) >>
+  /Subtype /Link
+/ANN pdfmark
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 78 36 moveto
+0 36 lineto
+0 0 lineto
+78 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 78 36 moveto
+0 36 lineto
+0 0 lineto
+78 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+7 13 moveto
+(Expression)
+[8.64 6.96 6.96 4.8 6.24 5.52 5.52 3.84 6.96 6.96]
+xshow
+end grestore
+end grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+end
+restore
+%%EOF
diff --git a/books/ps/v103pi.ps b/books/ps/v103pi.ps
new file mode 100644
index 0000000..5c4d047
--- /dev/null
+++ b/books/ps/v103pi.ps
@@ -0,0 +1,248 @@
+%!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 98 80
+%%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 98 80
+%%PageOrientation: Portrait
+gsave
+36 36 62 44 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 42 lineto
+60 42 lineto
+60 -6 lineto
+closepath
+fill
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 42 lineto
+60 42 lineto
+60 -6 lineto
+closepath
+stroke
+0.000 0.000 0.000 graphcolor
+14.00 /Times-Roman set_font
+% Pi
+[ /Rect [ 0 0 54 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.3.pdf#nameddest=HACKPI) >>
+  /Subtype /Link
+/ANN pdfmark
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 54 36 moveto
+0 36 lineto
+0 0 lineto
+54 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 54 36 moveto
+0 36 lineto
+0 0 lineto
+54 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+20 13 moveto
+(Pi)
+[7.68 3.84]
+xshow
+end grestore
+end grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+end
+restore
+%%EOF
diff --git a/books/ps/v103univariatepuiseuxserieswithexponentialsingularity.ps b/books/ps/v103univariatepuiseuxserieswithexponentialsingularity.ps
new file mode 100644
index 0000000..ae7509b
--- /dev/null
+++ b/books/ps/v103univariatepuiseuxserieswithexponentialsingularity.ps
@@ -0,0 +1,248 @@
+%!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 356 80
+%%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 356 80
+%%PageOrientation: Portrait
+gsave
+36 36 320 44 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 42 lineto
+318 42 lineto
+318 -6 lineto
+closepath
+fill
+0.167 0.600 1.000 graphcolor
+newpath -6 -6 moveto
+-6 42 lineto
+318 42 lineto
+318 -6 lineto
+closepath
+stroke
+0.000 0.000 0.000 graphcolor
+14.00 /Times-Roman set_font
+% UnivariatePuiseuxSeriesWithExponentialSingularity
+[ /Rect [ 0 0 312 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.3.pdf#nameddest=UPXSSING) >>
+  /Subtype /Link
+/ANN pdfmark
+gsave 10 dict begin
+filled
+0.537 0.247 0.902 nodecolor
+0.537 0.247 0.902 nodecolor
+newpath 312 36 moveto
+0 36 lineto
+0 0 lineto
+312 0 lineto
+closepath
+fill
+0.537 0.247 0.902 nodecolor
+newpath 312 36 moveto
+0 36 lineto
+0 0 lineto
+312 0 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+8 13 moveto
+(UnivariatePuiseuxSeriesWithExponentialSingularity)
+[9.6 6.96 3.84 6.72 6.24 5.04 3.84 6.24 3.84 6.24 7.68 6.96 3.84 5.52 6.24 6.96 6.96 7.68 6.24 5.04 3.84 6.24 5.52 12.96 3.84 4.08 6.96 8.64 6.96 6.96 6.96 6.96 6.24 6.96 3.84 3.84 6.24 3.84 7.68 3.84 6.96 6.96 6.96 3.84 6.24 5.04 3.84 3.84 6.96]
+xshow
+end grestore
+end grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+end
+restore
+%%EOF
diff --git a/changelog b/changelog
index bfd5dfb..fa626d9 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,33 @@
+20081201 tpd books/Makefile move amssymb to preamble
+20081201 kxh books/bookvol7.1 fix syntax
+20081201 tpd src/interp/setq.lisp add Karl Hegbloom
+20081201 tpd readme add Karl Hegbloom
+20081201 kxh Karl Hegbloom <harl.hegbloom@gmail.com>	
+20081201 tpd src/algebra/omserver.spad fix unexpected HT command
+20081201 tpd src/algebra/fparfrac.spad fix unexpected HT command
+20081201 tpd src/axiom-website/patches.html 20081201.03.tpd.patch
+20081201 tpd books/ps/v103univariatepuiseuxserieswithexponentialsingularity.ps
+20081201 tpd books/ps/v103pi.ps added
+20081201 tpd books/ps/v103expression.ps added
+20081201 tpd books/ps/v103exponentialofunivariatepuiseuxseries.ps added
+20081201 tpd books/ps/v103exponentialexpansion.ps added
+20081201 tpd books/ps/v103equation.ps added
+20081201 tpd books/ps/v103e04ucfannatype.ps added
+20081201 tpd books/ps/v103e04nafannatype.ps added
+20081201 tpd books/ps/v103e04mbfannatype.ps added
+20081201 tpd books/ps/v103e04jafannatype.ps added
+20081201 tpd books/ps/v103e04gcfannatype.ps added
+20081201 tpd books/ps/v103e04fdfannatype.ps added
+20081201 tpd books/ps/v103e04dgfannatype.ps added
+20081201 tpd books/Makefile fix handling of mathbb
+20081201 tpd books/bookvol10.3 add new domains
+20081201 tpd src/algebra/Makefile add Expression.help, Expression.input
+20081201 tpd src/algebra/expr.spad move domains to bookvol10.3
+20081201 tpd src/algebra/Makefile remove expexpan.spad
+20081201 tpd src/algebra/expexpan.spad removed, domains moved to bookvol10.3
+20081201 tpd src/algebra/equation2.spad move domain to bookvol10.3
+20081201 tpd src/algebra/Makefile remove e04routine.spad
+20081201 tpd src/algebra/e04routine.spad removed, domains moved to bookvol10.3
 20081201 tpd src/axiom-website/patches.html 20081201.01 and 20081201.02
 20081201 tpd books/ps/v103sequentialdifferentialvariable.ps added
 20081201 tpd books/ps/v103sequentialdifferentialpolynomial.ps added
diff --git a/readme b/readme
index ed7a981..b9c3c20 100644
--- a/readme
+++ b/readme
@@ -209,8 +209,8 @@ at the axiom command prompt will prettyprint the list.
 "Steve Hague            Satoshi Hamaguchi      Mike Hansen"
 "Richard Harke          Vilya Harvey           Martin Hassner"
 "Arthur S. Hathaway     Dan Hatton             Waldek Hebisch"
-"Ralf Hemmecke          Henderson              Antoine Hersen"
-"Gernot Hueber"
+"Karl Hegbloom          Ralf Hemmecke          Henderson"
+"Antoine Hersen         Gernot Hueber"
 "Pietro Iglio"
 "Alejandro Jakubi       Richard Jenks"
 "Kai Kaminski           Grant Keady            Tony Kennedy"
diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet
index 753049b..f098028 100644
--- a/src/algebra/Makefile.pamphlet
+++ b/src/algebra/Makefile.pamphlet
@@ -657,7 +657,6 @@ LAYER14=\
 \subsection{Layer15}
 \subsubsection{Completed spad files}
 \begin{verbatim}
-dpolcat.spad.pamphlet (DVARCAT ODVAR SDVAR DPOLCAT DSMP ODPOL SDPOL)
 plot.spad.pamphlet (PLOT PLOT1)
 \end{verbatim}
 
@@ -849,10 +848,7 @@ d01.spad.pamphlet (NAGD01)
 efstruc.spad.pamphlet (SYMFUNC TANEXP EFSTRUC ITRIGMNP TRIGMNIP CTRIGMNP)
 elemntry.spad.pamphlet (EF)
 elfuts.spad.pamphlet (ELFUTS)
-expexpan.spad.pamphlet (EXPUPXS UPXSSING EXPEXPAN)
 exprode.spad.pamphlet (EXPRODE)
-e04routine.spad.pamphlet (E04DFGA E04FDFA E04GCFA E04JAFA E04MBFA E04NAFA 
-                          E04UCFA)
 f01.spad.pamphlet (NAGF01)
 f02.spad.pamphlet (NAGF02)
 f04.spad.pamphlet (NAGF04)
@@ -1166,14 +1162,14 @@ SPADFILES= \
  ${OUTSRC}/d03.spad ${OUTSRC}/ddfact.spad \
  ${OUTSRC}/defaults.spad ${OUTSRC}/defintef.spad ${OUTSRC}/defintrf.spad \
  ${OUTSRC}/degred.spad \
- ${OUTSRC}/divisor.spad ${OUTSRC}/dpolcat.spad ${OUTSRC}/drawopt.spad \
+ ${OUTSRC}/divisor.spad  ${OUTSRC}/drawopt.spad \
  ${OUTSRC}/drawpak.spad ${OUTSRC}/draw.spad \
  ${OUTSRC}/e01.spad ${OUTSRC}/e02.spad ${OUTSRC}/e04agents.spad \
- ${OUTSRC}/e04package.spad ${OUTSRC}/e04routine.spad ${OUTSRC}/e04.spad \
+ ${OUTSRC}/e04package.spad  ${OUTSRC}/e04.spad \
  ${OUTSRC}/efstruc.spad ${OUTSRC}/efuls.spad ${OUTSRC}/efupxs.spad \
  ${OUTSRC}/eigen.spad ${OUTSRC}/elemntry.spad ${OUTSRC}/elfuts.spad \
  ${OUTSRC}/equation2.spad ${OUTSRC}/error.spad \
- ${OUTSRC}/expexpan.spad ${OUTSRC}/expr2ups.spad \
+ ${OUTSRC}/expr2ups.spad \
  ${OUTSRC}/exprode.spad ${OUTSRC}/expr.spad \
  ${OUTSRC}/f01.spad ${OUTSRC}/f02.spad ${OUTSRC}/f04.spad \
  ${OUTSRC}/f07.spad ${OUTSRC}/facutil.spad ${OUTSRC}/ffcat.spad \
@@ -1324,14 +1320,14 @@ DOCFILES= \
  ${DOC}/d03.spad.dvi ${DOC}/ddfact.spad.dvi \
  ${DOC}/defaults.spad.dvi ${DOC}/defintef.spad.dvi ${DOC}/defintrf.spad.dvi \
  ${DOC}/degred.spad.dvi   \
- ${DOC}/divisor.spad.dvi ${DOC}/dpolcat.spad.dvi ${DOC}/drawopt.spad.dvi \
+ ${DOC}/divisor.spad.dvi  ${DOC}/drawopt.spad.dvi \
  ${DOC}/drawpak.spad.dvi ${DOC}/draw.spad.dvi \
  ${DOC}/e01.spad.dvi ${DOC}/e02.spad.dvi ${DOC}/e04agents.spad.dvi \
- ${DOC}/e04package.spad.dvi ${DOC}/e04routine.spad.dvi ${DOC}/e04.spad.dvi \
+ ${DOC}/e04package.spad.dvi  ${DOC}/e04.spad.dvi \
  ${DOC}/efstruc.spad.dvi ${DOC}/efuls.spad.dvi ${DOC}/efupxs.spad.dvi \
  ${DOC}/eigen.spad.dvi ${DOC}/elemntry.spad.dvi ${DOC}/elfuts.spad.dvi \
  ${DOC}/equation2.spad.dvi ${DOC}/error.spad.dvi \
- ${DOC}/expexpan.spad.dvi ${DOC}/exposed.lsp.dvi ${DOC}/expr2ups.spad.dvi \
+ ${DOC}/exposed.lsp.dvi ${DOC}/expr2ups.spad.dvi \
  ${DOC}/exprode.spad.dvi ${DOC}/expr.spad.dvi \
  ${DOC}/f01.spad.dvi ${DOC}/f02.spad.dvi ${DOC}/f04.spad.dvi \
  ${DOC}/f07.spad.dvi ${DOC}/facutil.spad.dvi ${DOC}/ffcat.spad.dvi \
@@ -2043,6 +2039,7 @@ SPADHELP=\
  ${HELP}/CycleIndicators.help        ${HELP}/DeRhamComplex.help \
  ${HELP}/DecimalExpansion.help       ${HELP}/DoubleFloat.help \
  ${HELP}/EqTable.help                ${HELP}/Equation.help \
+ ${HELP}/Expression.help \
  ${HELP}/DistributedMultivariatePolynomial.help \
  ${HELP}/Factored.help               ${HELP}/FactoredFunctions2.help \
  ${HELP}/File.help                   ${HELP}/FileName.help \
@@ -2106,8 +2103,9 @@ REGRESS=\
  Complex.regress                ContinuedFraction.regress \
  CycleIndicators.regress        DeRhamComplex.regress \
  DecimalExpansion.regress       DoubleFloat.regress \
- EqTable.regress                Equation.regress \
  DistributedMultivariatePolynomial.regress \
+ EqTable.regress                Equation.regress \
+ Expression.regress \
  Factored.regress               FactoredFunctions2.regress \
  File.regress                   FileName.regress \
  FlexibleArray.regress          Float.regress \
@@ -2329,14 +2327,22 @@ ${HELP}/EqTable.help: ${IN}/table.spad.pamphlet
 	@${TANGLE} -R"EqTable.input" ${IN}/table.spad.pamphlet \
             >${INPUT}/EqTable.input
 
-${HELP}/Equation.help: ${IN}/equation2.spad.pamphlet
-	@echo 7018 create Equation.help from ${IN}/equation2.spad.pamphlet
-	@${TANGLE} -R"Equation.help" ${IN}/equation2.spad.pamphlet \
+${HELP}/Equation.help: ${BOOKS}/bookvol10.3.pamphlet
+	@echo 7018 create Equation.help from ${BOOKS}/bookvol10.3.pamphlet
+	@${TANGLE} -R"Equation.help" ${BOOKS}/bookvol10.3.pamphlet \
             >${HELP}/Equation.help
 	@cp ${HELP}/Equation.help ${HELP}/EQ.help
-	@${TANGLE} -R"Equation.input" ${IN}/equation2.spad.pamphlet \
+	@${TANGLE} -R"Equation.input" ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/Equation.input
 
+${HELP}/Expression.help: ${BOOKS}/bookvol10.3.pamphlet
+	@echo 7018 create Expression.help from ${BOOKS}/bookvol10.3.pamphlet
+	@${TANGLE} -R"Expression.help" ${BOOKS}/bookvol10.3.pamphlet \
+            >${HELP}/Expression.help
+	@cp ${HELP}/Expression.help ${HELP}/EQ.help
+	@${TANGLE} -R"Expression.input" ${BOOKS}/bookvol10.3.pamphlet \
+            >${INPUT}/Expression.input
+
 ${HELP}/Factored.help: ${IN}/fr.spad.pamphlet
 	@echo 7019 create Factored.help from ${IN}/fr.spad.pamphlet
 	@${TANGLE} -R"Factored.help" ${IN}/fr.spad.pamphlet \
@@ -2706,15 +2712,15 @@ ${HELP}/OrderedVariableList.help: ${IN}/variable.spad.pamphlet
 	@${TANGLE} -R"OrderedVariableList.input" ${IN}/variable.spad.pamphlet \
             >${INPUT}/OrderedVariableList.input
 
-${HELP}/OrderlyDifferentialPolynomial.help: ${IN}/dpolcat.spad.pamphlet
+${HELP}/OrderlyDifferentialPolynomial.help: ${BOOKS}/bookvol10.3.pamphlet
 	@echo 7060 create OrderlyDifferentialPolynomial.help from \
-           ${IN}/dpolcat.spad.pamphlet
+           ${BOOKS}/bookvol10.3.pamphlet
 	@${TANGLE} -R"OrderlyDifferentialPolynomial.help" \
-           ${IN}/dpolcat.spad.pamphlet \
+           ${BOOKS}/bookvol10.3.pamphlet \
            >${HELP}/OrderlyDifferentialPolynomial.help
 	@cp ${HELP}/OrderlyDifferentialPolynomial.help ${HELP}/ODPOL.help
 	@${TANGLE} -R"OrderlyDifferentialPolynomial.input" \
-            ${IN}/dpolcat.spad.pamphlet \
+            ${BOOKS}/bookvol10.3.pamphlet \
             >${INPUT}/OrderlyDifferentialPolynomial.input
 
 ${HELP}/PartialFraction.help: ${IN}/pfr.spad.pamphlet
diff --git a/src/algebra/e04routine.spad.pamphlet b/src/algebra/e04routine.spad.pamphlet
deleted file mode 100644
index 876f969..0000000
--- a/src/algebra/e04routine.spad.pamphlet
+++ /dev/null
@@ -1,691 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/algebra e04routine.spad}
-\author{Brian Dupee}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{domain E04DGFA e04dgfAnnaType}
-<<domain E04DGFA e04dgfAnnaType>>=
-)abbrev domain E04DGFA e04dgfAnnaType
-++ Author: Brian Dupee
-++ Date Created: February 1996
-++ Date Last Updated: February 1996
-++ Basic Operations: measure, numericalOptimization
-++ Related Constructors: Result, RoutinesTable
-++ Description:
-++ \axiomType{e04dgfAnnaType} is a domain of \axiomType{NumericalOptimization}
-++ for the NAG routine E04DGF, a general optimization routine which
-++ can handle some singularities in the input function.  The function
-++ \axiomFun{measure} measures the usefulness of the routine E04DGF
-++ for the given problem.  The function \axiomFun{numericalOptimization}
-++ performs the optimization by using \axiomType{NagOptimisationPackage}.
-
-e04dgfAnnaType(): NumericalOptimizationCategory == Result add
-  DF	==> DoubleFloat
-  EF	==> Expression Float
-  EDF	==> Expression DoubleFloat
-  PDF	==> Polynomial DoubleFloat
-  VPDF	==> Vector Polynomial DoubleFloat
-  LDF	==> List DoubleFloat
-  LOCDF	==> List OrderedCompletion DoubleFloat
-  MDF	==> Matrix DoubleFloat
-  MPDF	==> Matrix Polynomial DoubleFloat
-  MF	==> Matrix Float
-  MEF	==> Matrix Expression Float
-  LEDF	==> List Expression DoubleFloat
-  VEF	==> Vector Expression Float
-  NOA	==> Record(fn:EDF, init:LDF, lb:LOCDF, cf:LEDF, ub:LOCDF)
-  LSA	==> Record(lfn:LEDF, init:LDF)
-  EF2	==> ExpressionFunctions2
-  MI	==> Matrix Integer
-  INT	==> Integer
-  F	==> Float
-  NNI	==> NonNegativeInteger
-  S	==> Symbol
-  LS	==> List Symbol
-  MVCF	==> MultiVariableCalculusFunctions
-  ESTOOLS2 ==> ExpertSystemToolsPackage2
-  SDF	==> Stream DoubleFloat
-  LSDF	==> List Stream DoubleFloat
-  SOCDF	==> Segment OrderedCompletion DoubleFloat
-  OCDF	==> OrderedCompletion DoubleFloat
-
-  Rep:=Result
-  import Rep, NagOptimisationPackage, ExpertSystemToolsPackage
-
-  measure(R:RoutinesTable,args:NOA) ==
-    string:String := "e04dgf is "
-    positive?(#(args.cf) + #(args.lb) + #(args.ub)) =>
-      string := concat(string,"unsuitable for constrained problems. ")
-      [0.0,string]
-    string := concat(string,"recommended")
-    [getMeasure(R,e04dgf@Symbol)$RoutinesTable, string]
-
-  numericalOptimization(args:NOA) ==
-    argsFn:EDF := args.fn
-    n:NNI := #(variables(argsFn)$EDF)
-    fu:DF := float(4373903597,-24,10)$DF
-    it:INT := max(50,5*n)
-    lin:DF := float(9,-1,10)$DF
-    ma:DF := float(1,20,10)$DF
-    op:DF := float(326,-14,10)$DF
-    x:MDF := mat(args.init,n)
-    ArgsFn:Expression Float := edf2ef(argsFn)
-    f:Union(fn:FileName,fp:Asp49(OBJFUN)) := [retract(ArgsFn)$Asp49(OBJFUN)]
-    e04dgf(n,1$DF,fu,it,lin,true,ma,op,1,1,n,0,x,-1,f)
-
-@
-\section{domain E04FDFA e04fdfAnnaType}
-<<domain E04FDFA e04fdfAnnaType>>=
-)abbrev domain E04FDFA e04fdfAnnaType
-++ Author: Brian Dupee
-++ Date Created: February 1996
-++ Date Last Updated: February 1996
-++ Basic Operations: measure, numericalOptimization
-++ Related Constructors: Result, RoutinesTable
-++ Description:
-++ \axiomType{e04fdfAnnaType} is a domain of \axiomType{NumericalOptimization}
-++ for the NAG routine E04FDF, a general optimization routine which
-++ can handle some singularities in the input function.  The function
-++ \axiomFun{measure} measures the usefulness of the routine E04FDF
-++ for the given problem.  The function \axiomFun{numericalOptimization}
-++ performs the optimization by using \axiomType{NagOptimisationPackage}.
-e04fdfAnnaType(): NumericalOptimizationCategory == Result add
-  DF	==> DoubleFloat
-  EF	==> Expression Float
-  EDF	==> Expression DoubleFloat
-  PDF	==> Polynomial DoubleFloat
-  VPDF	==> Vector Polynomial DoubleFloat
-  LDF	==> List DoubleFloat
-  LOCDF	==> List OrderedCompletion DoubleFloat
-  MDF	==> Matrix DoubleFloat
-  MPDF	==> Matrix Polynomial DoubleFloat
-  MF	==> Matrix Float
-  MEF	==> Matrix Expression Float
-  LEDF	==> List Expression DoubleFloat
-  VEF	==> Vector Expression Float
-  NOA	==> Record(fn:EDF, init:LDF, lb:LOCDF, cf:LEDF, ub:LOCDF)
-  LSA	==> Record(lfn:LEDF, init:LDF)
-  EF2	==> ExpressionFunctions2
-  MI	==> Matrix Integer
-  INT	==> Integer
-  F	==> Float
-  NNI	==> NonNegativeInteger
-  S	==> Symbol
-  LS	==> List Symbol
-  MVCF	==> MultiVariableCalculusFunctions
-  ESTOOLS2 ==> ExpertSystemToolsPackage2
-  SDF	==> Stream DoubleFloat
-  LSDF	==> List Stream DoubleFloat
-  SOCDF	==> Segment OrderedCompletion DoubleFloat
-  OCDF	==> OrderedCompletion DoubleFloat
-
-  Rep:=Result
-  import Rep, NagOptimisationPackage
-  import e04AgentsPackage,ExpertSystemToolsPackage
-
-  measure(R:RoutinesTable,args:NOA) ==
-    argsFn := args.fn
-    string:String := "e04fdf is "
-    positive?(#(args.cf) + #(args.lb) + #(args.ub)) =>
-      string := concat(string,"unsuitable for constrained problems. ")
-      [0.0,string]
-    n:NNI := #(variables(argsFn)$EDF)
-    (n>1)@Boolean => 
-      string := concat(string,"unsuitable for single instances of multivariate problems. ")
-      [0.0,string]
-    sumOfSquares(argsFn) case "failed" =>
-      string := concat(string,"unsuitable.")
-      [0.0,string]
-    string := concat(string,"recommended since the function is a sum of squares.")
-    [getMeasure(R,e04fdf@Symbol)$RoutinesTable, string]
-
-  measure(R:RoutinesTable,args:LSA) ==
-    string:String := "e04fdf is recommended"
-    [getMeasure(R,e04fdf@Symbol)$RoutinesTable, string]
-
-  numericalOptimization(args:NOA) ==
-    argsFn := args.fn
-    lw:INT := 14
-    x := mat(args.init,1)
-    (a := sumOfSquares(argsFn)) case EDF => 
-      ArgsFn := vector([edf2ef(a)])$VEF
-      f : Union(fn:FileName,fp:Asp50(LSFUN1)) := [retract(ArgsFn)$Asp50(LSFUN1)]
-      out:Result := e04fdf(1,1,1,lw,x,-1,f)
-      changeNameToObjf(fsumsq@Symbol,out)
-    empty()$Result
-
-  numericalOptimization(args:LSA) ==
-    argsFn := copy args.lfn
-    m:INT := #(argsFn)
-    n:NNI := #(variables(args))
-    nn:INT := n
-    lw:INT := 
---      one?(nn) => 9+5*m
-      (nn = 1) => 9+5*m
-      nn*(7+n+2*m+((nn-1) quo 2)$INT)+3*m
-    x := mat(args.init,n)
-    ArgsFn := vector([edf2ef(i)$ExpertSystemToolsPackage for i in argsFn])$VEF
-    f : Union(fn:FileName,fp:Asp50(LSFUN1)) := [retract(ArgsFn)$Asp50(LSFUN1)]
-    out:Result := e04fdf(m,n,1,lw,x,-1,f)
-    changeNameToObjf(fsumsq@Symbol,out)
-
-@
-\section{domain E04GCFA e04gcfAnnaType}
-<<domain E04GCFA e04gcfAnnaType>>=
-)abbrev domain E04GCFA e04gcfAnnaType
-++ Author: Brian Dupee
-++ Date Created: February 1996
-++ Date Last Updated: February 1996
-++ Basic Operations: measure, numericalOptimization
-++ Related Constructors: Result, RoutinesTable
-++ Description:
-++ \axiomType{e04gcfAnnaType} is a domain of \axiomType{NumericalOptimization}
-++ for the NAG routine E04GCF, a general optimization routine which
-++ can handle some singularities in the input function.  The function
-++ \axiomFun{measure} measures the usefulness of the routine E04GCF
-++ for the given problem.  The function \axiomFun{numericalOptimization}
-++ performs the optimization by using \axiomType{NagOptimisationPackage}.
-e04gcfAnnaType(): NumericalOptimizationCategory == Result add
-  DF	==> DoubleFloat
-  EF	==> Expression Float
-  EDF	==> Expression DoubleFloat
-  PDF	==> Polynomial DoubleFloat
-  VPDF	==> Vector Polynomial DoubleFloat
-  LDF	==> List DoubleFloat
-  LOCDF	==> List OrderedCompletion DoubleFloat
-  MDF	==> Matrix DoubleFloat
-  MPDF	==> Matrix Polynomial DoubleFloat
-  MF	==> Matrix Float
-  MEF	==> Matrix Expression Float
-  LEDF	==> List Expression DoubleFloat
-  VEF	==> Vector Expression Float
-  NOA	==> Record(fn:EDF, init:LDF, lb:LOCDF, cf:LEDF, ub:LOCDF)
-  LSA	==> Record(lfn:LEDF, init:LDF)
-  EF2	==> ExpressionFunctions2
-  MI	==> Matrix Integer
-  INT	==> Integer
-  F	==> Float
-  NNI	==> NonNegativeInteger
-  S	==> Symbol
-  LS	==> List Symbol
-  MVCF	==> MultiVariableCalculusFunctions
-  ESTOOLS2 ==> ExpertSystemToolsPackage2
-  SDF	==> Stream DoubleFloat
-  LSDF	==> List Stream DoubleFloat
-  SOCDF	==> Segment OrderedCompletion DoubleFloat
-  OCDF	==> OrderedCompletion DoubleFloat
-
-  Rep:=Result
-  import Rep, NagOptimisationPackage,ExpertSystemContinuityPackage
-  import e04AgentsPackage,ExpertSystemToolsPackage
-
-  measure(R:RoutinesTable,args:NOA) ==
-    argsFn:EDF := args.fn
-    string:String := "e04gcf is "
-    positive?(#(args.cf) + #(args.lb) + #(args.ub)) =>
-      string := concat(string,"unsuitable for constrained problems. ")
-      [0.0,string]
-    n:NNI := #(variables(argsFn)$EDF)
-    (n>1)@Boolean => 
-      string := concat(string,"unsuitable for single instances of multivariate problems. ")
-      [0.0,string]
-    a := coerce(float(10,0,10))$OCDF
-    seg:SOCDF := -a..a
-    sings := singularitiesOf(argsFn,variables(argsFn)$EDF,seg)
-    s := #(sdf2lst(sings))
-    positive? s => 
-      string := concat(string,"not recommended for discontinuous functions.")
-      [0.0,string]
-    sumOfSquares(args.fn) case "failed" =>
-      string := concat(string,"unsuitable.")
-      [0.0,string]
-    string := concat(string,"recommended since the function is a sum of squares.")
-    [getMeasure(R,e04gcf@Symbol)$RoutinesTable, string]
-
-  measure(R:RoutinesTable,args:LSA) ==
-    string:String := "e04gcf is "
-    a := coerce(float(10,0,10))$OCDF
-    seg:SOCDF := -a..a
-    sings := concat([singularitiesOf(i,variables(args),seg) for i in args.lfn])$SDF
-    s := #(sdf2lst(sings))
-    positive? s => 
-      string := concat(string,"not recommended for discontinuous functions.")
-      [0.0,string]
-    string := concat(string,"recommended.")
-    m := getMeasure(R,e04gcf@Symbol)$RoutinesTable
-    m := m-(1-exp(-(expenseOfEvaluation(args))**3))
-    [m, string]
-
-  numericalOptimization(args:NOA) ==
-    argsFn:EDF := args.fn
-    lw:INT := 16
-    x := mat(args.init,1)
-    (a := sumOfSquares(argsFn)) case EDF => 
-      ArgsFn := vector([edf2ef(a)$ExpertSystemToolsPackage])$VEF
-      f : Union(fn:FileName,fp:Asp19(LSFUN2)) := [retract(ArgsFn)$Asp19(LSFUN2)]
-      out:Result := e04gcf(1,1,1,lw,x,-1,f)
-      changeNameToObjf(fsumsq@Symbol,out)
-    empty()$Result
-
-  numericalOptimization(args:LSA) ==
-    argsFn := copy args.lfn
-    m:NNI := #(argsFn)
-    n:NNI := #(variables(args))
-    lw:INT := 
---      one?(n) => 11+5*m
-      (n = 1) => 11+5*m
-      2*n*(4+n+m)+3*m
-    x := mat(args.init,n)
-    ArgsFn := vector([edf2ef(i)$ExpertSystemToolsPackage for i in argsFn])$VEF
-    f : Union(fn:FileName,fp:Asp19(LSFUN2)) := [retract(ArgsFn)$Asp19(LSFUN2)]
-    out:Result := e04gcf(m,n,1,lw,x,-1,f)
-    changeNameToObjf(fsumsq@Symbol,out)
-
-@
-\section{domain E04JAFA e04jafAnnaType}
-<<domain E04JAFA e04jafAnnaType>>=
-)abbrev domain E04JAFA e04jafAnnaType
-++ Author: Brian Dupee
-++ Date Created: February 1996
-++ Date Last Updated: February 1996
-++ Basic Operations: measure, numericalOptimization
-++ Related Constructors: Result, RoutinesTable
-++ Description:
-++ \axiomType{e04jafAnnaType} is a domain of \axiomType{NumericalOptimization}
-++ for the NAG routine E04JAF, a general optimization routine which
-++ can handle some singularities in the input function.  The function
-++ \axiomFun{measure} measures the usefulness of the routine E04JAF
-++ for the given problem.  The function \axiomFun{numericalOptimization}
-++ performs the optimization by using \axiomType{NagOptimisationPackage}.
-e04jafAnnaType(): NumericalOptimizationCategory == Result add
-  DF	==> DoubleFloat
-  EF	==> Expression Float
-  EDF	==> Expression DoubleFloat
-  PDF	==> Polynomial DoubleFloat
-  VPDF	==> Vector Polynomial DoubleFloat
-  LDF	==> List DoubleFloat
-  LOCDF	==> List OrderedCompletion DoubleFloat
-  MDF	==> Matrix DoubleFloat
-  MPDF	==> Matrix Polynomial DoubleFloat
-  MF	==> Matrix Float
-  MEF	==> Matrix Expression Float
-  LEDF	==> List Expression DoubleFloat
-  VEF	==> Vector Expression Float
-  NOA	==> Record(fn:EDF, init:LDF, lb:LOCDF, cf:LEDF, ub:LOCDF)
-  LSA	==> Record(lfn:LEDF, init:LDF)
-  EF2	==> ExpressionFunctions2
-  MI	==> Matrix Integer
-  INT	==> Integer
-  F	==> Float
-  NNI	==> NonNegativeInteger
-  S	==> Symbol
-  LS	==> List Symbol
-  MVCF	==> MultiVariableCalculusFunctions
-  ESTOOLS2 ==> ExpertSystemToolsPackage2
-  SDF	==> Stream DoubleFloat
-  LSDF	==> List Stream DoubleFloat
-  SOCDF	==> Segment OrderedCompletion DoubleFloat
-  OCDF	==> OrderedCompletion DoubleFloat
-
-  Rep:=Result
-  import Rep, NagOptimisationPackage
-  import e04AgentsPackage,ExpertSystemToolsPackage
-
-  bound(a:LOCDF,b:LOCDF):Integer ==  
-    empty?(concat(a,b)) => 1
---    one?(#(removeDuplicates(a))) and  zero?(first(a)) => 2
-    (#(removeDuplicates(a)) = 1) and  zero?(first(a)) => 2
---    one?(#(removeDuplicates(a))) and one?(#(removeDuplicates(b))) => 3
-    (#(removeDuplicates(a)) = 1) and (#(removeDuplicates(b)) = 1) => 3
-    0  
-
-  measure(R:RoutinesTable,args:NOA) ==
-    string:String := "e04jaf is "
-    if positive?(#(args.cf)) then
-      if not simpleBounds?(args.cf) then
-        string := 
-          concat(string,"suitable for simple bounds only, not constraint functions.")
-    (# string) < 20 => 
-      if zero?(#(args.lb) + #(args.ub)) then
-        string := concat(string, "usable if there are no constraints")
-        [getMeasure(R,e04jaf@Symbol)$RoutinesTable*0.5,string]
-      else
-        string := concat(string,"recommended")
-        [getMeasure(R,e04jaf@Symbol)$RoutinesTable, string]
-    [0.0,string]
-
-  numericalOptimization(args:NOA) ==
-    argsFn:EDF := args.fn
-    n:NNI := #(variables(argsFn)$EDF)
-    ibound:INT := bound(args.lb,args.ub)
-    m:INT := n 
-    lw:INT := max(13,12 * m + ((m * (m - 1)) quo 2)$INT)$INT
-    bl := mat(finiteBound(args.lb,float(1,6,10)$DF),n)
-    bu := mat(finiteBound(args.ub,float(1,6,10)$DF),n)
-    x := mat(args.init,n)
-    ArgsFn:EF := edf2ef(argsFn)
-    fr:Union(fn:FileName,fp:Asp24(FUNCT1)) := [retract(ArgsFn)$Asp24(FUNCT1)]
-    out:Result := e04jaf(n,ibound,n+2,lw,bl,bu,x,-1,fr)
-    changeNameToObjf(f@Symbol,out)
-
-@
-\section{domain E04MBFA e04mbfAnnaType}
-<<domain E04MBFA e04mbfAnnaType>>=
-)abbrev domain E04MBFA e04mbfAnnaType
-++ Author: Brian Dupee
-++ Date Created: February 1996
-++ Date Last Updated: February 1996
-++ Basic Operations: measure, numericalOptimization
-++ Related Constructors: Result, RoutinesTable
-++ Description:
-++ \axiomType{e04mbfAnnaType} is a domain of \axiomType{NumericalOptimization}
-++ for the NAG routine E04MBF, an optimization routine for Linear functions.
-++ The function
-++ \axiomFun{measure} measures the usefulness of the routine E04MBF
-++ for the given problem.  The function \axiomFun{numericalOptimization}
-++ performs the optimization by using \axiomType{NagOptimisationPackage}.
-e04mbfAnnaType(): NumericalOptimizationCategory == Result add
-  DF	==> DoubleFloat
-  EF	==> Expression Float
-  EDF	==> Expression DoubleFloat
-  PDF	==> Polynomial DoubleFloat
-  VPDF	==> Vector Polynomial DoubleFloat
-  LDF	==> List DoubleFloat
-  LOCDF	==> List OrderedCompletion DoubleFloat
-  MDF	==> Matrix DoubleFloat
-  MPDF	==> Matrix Polynomial DoubleFloat
-  MF	==> Matrix Float
-  MEF	==> Matrix Expression Float
-  LEDF	==> List Expression DoubleFloat
-  VEF	==> Vector Expression Float
-  NOA	==> Record(fn:EDF, init:LDF, lb:LOCDF, cf:LEDF, ub:LOCDF)
-  LSA	==> Record(lfn:LEDF, init:LDF)
-  EF2	==> ExpressionFunctions2
-  MI	==> Matrix Integer
-  INT	==> Integer
-  F	==> Float
-  NNI	==> NonNegativeInteger
-  S	==> Symbol
-  LS	==> List Symbol
-  MVCF	==> MultiVariableCalculusFunctions
-  ESTOOLS2 ==> ExpertSystemToolsPackage2
-  SDF	==> Stream DoubleFloat
-  LSDF	==> List Stream DoubleFloat
-  SOCDF	==> Segment OrderedCompletion DoubleFloat
-  OCDF	==> OrderedCompletion DoubleFloat
-
-  Rep:=Result
-  import Rep, NagOptimisationPackage
-  import e04AgentsPackage,ExpertSystemToolsPackage
-
-  measure(R:RoutinesTable,args:NOA) ==
-    (not linear?([args.fn])) or (not linear?(args.cf)) => 
-      [0.0,"e04mbf is for a linear objective function and constraints only."]
-    [getMeasure(R,e04mbf@Symbol)$RoutinesTable,"e04mbf is recommended" ]
-
-  numericalOptimization(args:NOA) ==
-    argsFn:EDF := args.fn
-    c := args.cf
-    listVars:List LS := concat(variables(argsFn)$EDF,[variables(z)$EDF for z in c])
-    n:NNI := #(v := removeDuplicates(concat(listVars)$LS)$LS)
-    A:MDF := linearMatrix(args.cf,n)
-    nclin:NNI := # linearPart(c)
-    nrowa:NNI := max(1,nclin)
-    bl:MDF := mat(finiteBound(args.lb,float(1,21,10)$DF),n)
-    bu:MDF := mat(finiteBound(args.ub,float(1,21,10)$DF),n)
-    cvec:MDF := mat(coefficients(retract(argsFn)@PDF)$PDF,n)
-    x := mat(args.init,n)
-    lwork:INT := 
-      nclin < n => 2*nclin*(nclin+4)+2+6*n+nrowa
-      2*(n+3)*n+4*nclin+nrowa
-    out:Result := e04mbf(20,1,n,nclin,n+nclin,nrowa,A,bl,bu,cvec,true,2*n,lwork,x,-1)
-    changeNameToObjf(objlp@Symbol,out)
-
-@
-\section{domain E04NAFA e04nafAnnaType}
-<<domain E04NAFA e04nafAnnaType>>=
-)abbrev domain E04NAFA e04nafAnnaType
-++ Author: Brian Dupee
-++ Date Created: February 1996
-++ Date Last Updated: February 1996
-++ Basic Operations: measure, numericalOptimization
-++ Related Constructors: Result, RoutinesTable
-++ Description:
-++ \axiomType{e04nafAnnaType} is a domain of \axiomType{NumericalOptimization}
-++ for the NAG routine E04NAF, an optimization routine for Quadratic functions.
-++ The function
-++ \axiomFun{measure} measures the usefulness of the routine E04NAF
-++ for the given problem.  The function \axiomFun{numericalOptimization}
-++ performs the optimization by using \axiomType{NagOptimisationPackage}.
-e04nafAnnaType(): NumericalOptimizationCategory == Result add
-  DF	==> DoubleFloat
-  EF	==> Expression Float
-  EDF	==> Expression DoubleFloat
-  PDF	==> Polynomial DoubleFloat
-  VPDF	==> Vector Polynomial DoubleFloat
-  LDF	==> List DoubleFloat
-  LOCDF	==> List OrderedCompletion DoubleFloat
-  MDF	==> Matrix DoubleFloat
-  MPDF	==> Matrix Polynomial DoubleFloat
-  MF	==> Matrix Float
-  MEF	==> Matrix Expression Float
-  LEDF	==> List Expression DoubleFloat
-  VEF	==> Vector Expression Float
-  NOA	==> Record(fn:EDF, init:LDF, lb:LOCDF, cf:LEDF, ub:LOCDF)
-  LSA	==> Record(lfn:LEDF, init:LDF)
-  EF2	==> ExpressionFunctions2
-  MI	==> Matrix Integer
-  INT	==> Integer
-  F	==> Float
-  NNI	==> NonNegativeInteger
-  S	==> Symbol
-  LS	==> List Symbol
-  MVCF	==> MultiVariableCalculusFunctions
-  ESTOOLS2 ==> ExpertSystemToolsPackage2
-  SDF	==> Stream DoubleFloat
-  LSDF	==> List Stream DoubleFloat
-  SOCDF	==> Segment OrderedCompletion DoubleFloat
-  OCDF	==> OrderedCompletion DoubleFloat
-
-  Rep:=Result
-  import Rep, NagOptimisationPackage
-  import e04AgentsPackage,ExpertSystemToolsPackage
-
-  measure(R:RoutinesTable,args:NOA) ==
-    string:String := "e04naf is "
-    argsFn:EDF := args.fn
-    if not (quadratic?(argsFn) and linear?(args.cf)) then
-      string :=
-        concat(string,"for a quadratic function with linear constraints only.")
-    (# string) < 20 => 
-      string := concat(string,"recommended")
-      [getMeasure(R,e04naf@Symbol)$RoutinesTable, string]
-    [0.0,string]
-
-  numericalOptimization(args:NOA) ==
-    argsFn:EDF := args.fn
-    c := args.cf
-    listVars:List LS := concat(variables(argsFn)$EDF,[variables(z)$EDF for z in c])
-    n:NNI := #(v := sort(removeDuplicates(concat(listVars)$LS)$LS)$LS)
-    A:MDF := linearMatrix(c,n)
-    nclin:NNI := # linearPart(c)
-    nrowa:NNI := max(1,nclin)
-    big:DF := float(1,10,10)$DF
-    fea:MDF := new(1,n+nclin,float(1053,-11,10)$DF)$MDF
-    bl:MDF := mat(finiteBound(args.lb,float(1,21,10)$DF),n)
-    bu:MDF := mat(finiteBound(args.ub,float(1,21,10)$DF),n)
-    alin:EDF := splitLinear(argsFn)
-    p:PDF := retract(alin)@PDF
-    pl:List PDF := [coefficient(p,i,1)$PDF for i in v]
-    cvec:MDF := mat([pdf2df j for j in pl],n)
-    h1:MPDF := hessian(p,v)$MVCF(S,PDF,VPDF,LS)
-    hess:MDF := map(pdf2df,h1)$ESTOOLS2(PDF,DF)
-    h2:MEF := map(df2ef,hess)$ESTOOLS2(DF,EF)
-    x := mat(args.init,n)
-    istate:MI := zero(1,n+nclin)$MI
-    lwork:INT := 2*n*(n+2*nclin)+nrowa
-    qphess:Union(fn:FileName,fp:Asp20(QPHESS)) := [retract(h2)$Asp20(QPHESS)]
-    out:Result := e04naf(20,1,n,nclin,n+nclin,nrowa,n,n,big,A,bl,bu,cvec,fea,
-                           hess,true,false,true,2*n,lwork,x,istate,-1,qphess)
-    changeNameToObjf(obj@Symbol,out)
-
-@
-\section{domain E04UCFA e04ucfAnnaType}
-<<domain E04UCFA e04ucfAnnaType>>=
-)abbrev domain E04UCFA e04ucfAnnaType
-++ Author: Brian Dupee
-++ Date Created: February 1996
-++ Date Last Updated: November 1997
-++ Basic Operations: measure, numericalOptimization
-++ Related Constructors: Result, RoutinesTable
-++ Description:
-++ \axiomType{e04ucfAnnaType} is a domain of \axiomType{NumericalOptimization}
-++ for the NAG routine E04UCF, a general optimization routine which
-++ can handle some singularities in the input function.  The function
-++ \axiomFun{measure} measures the usefulness of the routine E04UCF
-++ for the given problem.  The function \axiomFun{numericalOptimization}
-++ performs the optimization by using \axiomType{NagOptimisationPackage}.
-e04ucfAnnaType(): NumericalOptimizationCategory == Result add
-  DF	==> DoubleFloat
-  EF	==> Expression Float
-  EDF	==> Expression DoubleFloat
-  PDF	==> Polynomial DoubleFloat
-  VPDF	==> Vector Polynomial DoubleFloat
-  LDF	==> List DoubleFloat
-  LOCDF	==> List OrderedCompletion DoubleFloat
-  MDF	==> Matrix DoubleFloat
-  MPDF	==> Matrix Polynomial DoubleFloat
-  MF	==> Matrix Float
-  MEF	==> Matrix Expression Float
-  LEDF	==> List Expression DoubleFloat
-  VEF	==> Vector Expression Float
-  NOA	==> Record(fn:EDF, init:LDF, lb:LOCDF, cf:LEDF, ub:LOCDF)
-  LSA	==> Record(lfn:LEDF, init:LDF)
-  EF2	==> ExpressionFunctions2
-  MI	==> Matrix Integer
-  INT	==> Integer
-  F	==> Float
-  NNI	==> NonNegativeInteger
-  S	==> Symbol
-  LS	==> List Symbol
-  MVCF	==> MultiVariableCalculusFunctions
-  ESTOOLS2 ==> ExpertSystemToolsPackage2
-  SDF	==> Stream DoubleFloat
-  LSDF	==> List Stream DoubleFloat
-  SOCDF	==> Segment OrderedCompletion DoubleFloat
-  OCDF	==> OrderedCompletion DoubleFloat
-
-  Rep:=Result
-  import Rep,NagOptimisationPackage
-  import e04AgentsPackage,ExpertSystemToolsPackage
-
-  measure(R:RoutinesTable,args:NOA) ==
-    zero?(#(args.lb) + #(args.ub)) =>
-      [0.0,"e04ucf is not recommended if there are no bounds specified"]
-    zero?(#(args.cf)) =>
-      string:String := "e04ucf is usable but not always recommended if there are no constraints"
-      [getMeasure(R,e04ucf@Symbol)$RoutinesTable*0.5,string]
-    [getMeasure(R,e04ucf@Symbol)$RoutinesTable,"e04ucf is recommended"]
-
-  numericalOptimization(args:NOA) ==
-    Args := sortConstraints(args)
-    argsFn := Args.fn
-    c := Args.cf
-    listVars:List LS := concat(variables(argsFn)$EDF,[variables(z)$EDF for z in c])
-    n:NNI := #(v := sort(removeDuplicates(concat(listVars)$LS)$LS)$LS)
-    lin:NNI := #(linearPart(c))
-    nlcf := nonLinearPart(c)
-    nonlin:NNI := #(nlcf)
-    if empty?(nlcf) then 
-      nlcf := new(n,coerce(first(v)$LS)$EDF)$LEDF
-    nrowa:NNI := max(1,lin)
-    nrowj:NNI := max(1,nonlin)
-    A:MDF := linearMatrix(c,n)
-    bl:MDF := mat(finiteBound(Args.lb,float(1,25,10)$DF),n)
-    bu:MDF := mat(finiteBound(Args.ub,float(1,25,10)$DF),n)
-    liwork:INT := 3*n+lin+2*nonlin
-    lwork:INT :=
-      zero?(lin+nonlin) => 20*n
-      zero?(nonlin) => 2*n*(n+10)+11*lin
-      2*n*(n+nonlin+10)+(11+n)*lin + 21*nonlin
-    cra:DF := float(1,-2,10)$DF
-    fea:DF := float(1053671201,-17,10)$DF
-    fun:DF := float(4373903597,-24,10)$DF
-    infb:DF := float(1,15,10)$DF
-    lint:DF := float(9,-1,10)$DF
-    maji:INT := max(50,3*(n+lin)+10*nonlin)
-    mini:INT := max(50,3*(n+lin+nonlin))
-    nonf:DF := float(105,-10,10)$DF
-    opt:DF := float(326,-10,10)$DF
-    ste:DF := float(2,0,10)$DF
-    istate:MI := zero(1,n+lin+nonlin)$MI
-    cjac:MDF := 
-      positive?(nonlin) => zero(nrowj,n)$MDF
-      zero(nrowj,1)$MDF
-    clambda:MDF := zero(1,n+lin+nonlin)$MDF
-    r:MDF := zero(n,n)$MDF
-    x:MDF := mat(Args.init,n)
-    VectCF:VEF := vector([edf2ef e for e in nlcf])$VEF
-    ArgsFn:EF := edf2ef(argsFn)
-    fasp : Union(fn:FileName,fp:Asp49(OBJFUN)) := [retract(ArgsFn)$Asp49(OBJFUN)]
-    casp : Union(fn:FileName,fp:Asp55(CONFUN)) := [retract(VectCF)$Asp55(CONFUN)]
-    e04ucf(n,lin,nonlin,nrowa,nrowj,n,A,bl,bu,liwork,lwork,false,cra,3,fea,
-            fun,true,infb,infb,fea,lint,true,maji,1,mini,0,-1,nonf,opt,ste,1,
-             1,n,n,3,istate,cjac,clambda,r,x,-1,casp,fasp)
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
---    - Redistributions of source code must retain the above copyright
---      notice, this list of conditions and the following disclaimer.
---
---    - Redistributions in binary form must reproduce the above copyright
---      notice, this list of conditions and the following disclaimer in
---      the documentation and/or other materials provided with the
---      distribution.
---
---    - Neither the name of The Numerical ALgorithms Group Ltd. nor the
---      names of its contributors may be used to endorse or promote products
---      derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<domain E04DGFA e04dgfAnnaType>>
-<<domain E04FDFA e04fdfAnnaType>>
-<<domain E04GCFA e04gcfAnnaType>>
-<<domain E04JAFA e04jafAnnaType>>
-<<domain E04MBFA e04mbfAnnaType>>
-<<domain E04NAFA e04nafAnnaType>>
-<<domain E04UCFA e04ucfAnnaType>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/equation2.spad.pamphlet b/src/algebra/equation2.spad.pamphlet
index d29c808..1f9eab1 100644
--- a/src/algebra/equation2.spad.pamphlet
+++ b/src/algebra/equation2.spad.pamphlet
@@ -9,410 +9,6 @@
 \eject
 \tableofcontents
 \eject
-\section{domain EQ Equation}
-<<Equation.input>>=
--- equation2.spad.pamphlet Equation.input
-)spool Equation.output
-)set message test on
-)set message auto off
-)clear all
---S 1
-eq1 := 3*x + 4*y = 5 
---R 
---R
---R   (1)  4y + 3x= 5
---R                                            Type: Equation Polynomial Integer
---E 1
-
---S 2
-eq2 := 2*x + 2*y = 3 
---R 
---R
---R   (2)  2y + 2x= 3
---R                                            Type: Equation Polynomial Integer
---E 2
-
---S 3
-lhs eq1
---R 
---R
---R   (3)  4y + 3x
---R                                                     Type: Polynomial Integer
---E 3
-
---S 4
-rhs eq1
---R 
---R
---R   (4)  5
---R                                                     Type: Polynomial Integer
---E 4
-
---S 5
-eq1 + eq2 
---R 
---R
---R   (5)  6y + 5x= 8
---R                                            Type: Equation Polynomial Integer
---E 5
-
---S 6
-eq1 * eq2 
---R 
---R
---R          2             2
---R   (6)  8y  + 14x y + 6x = 15
---R                                            Type: Equation Polynomial Integer
---E 6
-
---S 7
-2*eq2 - eq1
---R 
---R
---R   (7)  x= 1
---R                                            Type: Equation Polynomial Integer
---E 7
-
---S 8
-eq1**2
---R 
---R
---R           2             2
---R   (8)  16y  + 24x y + 9x = 25
---R                                            Type: Equation Polynomial Integer
---E 8
-
---S 9
-if x+1 = y then "equal" else "unequal"
---R 
---R
---R   (9)  "unequal"
---R                                                                 Type: String
---E 9
-
---S 10
-eqpol := x+1 = y 
---R 
---R
---R   (10)  x + 1= y
---R                                            Type: Equation Polynomial Integer
---E 10
-
---S 11
-if eqpol then "equal" else "unequal"
---R 
---R
---R   (11)  "unequal"
---R                                                                 Type: String
---E 11
-
---S 12
-eqpol::Boolean
---R 
---R
---R   (12)  false
---R                                                                Type: Boolean
---E 12
-)spool
-)lisp (bye)
-@
-<<Equation.help>>=
-====================================================================
-Equation examples
-====================================================================
-
-The Equation domain provides equations as mathematical objects.  These
-are used, for example, as the input to various solve operations.
-
-Equations are created using the equals symbol, =.
-
-  eq1 := 3*x + 4*y = 5 
-   4y + 3x= 5
-                         Type: Equation Polynomial Integer
-
-  eq2 := 2*x + 2*y = 3 
-   2y + 2x= 3
-                         Type: Equation Polynomial Integer
-
-The left- and right-hand sides of an equation are accessible using
-the operations lhs and rhs.
-
-  lhs eq1
-   4y + 3x
-                         Type: Polynomial Integer
-
-  rhs eq1
-   5
-                         Type: Polynomial Integer
-
-Arithmetic operations are supported and operate on both sides of the
-equation.
-
-  eq1 + eq2 
-   6y + 5x= 8
-                         Type: Equation Polynomial Integer
-
-  eq1 * eq2 
-     2             2
-   8y  + 14x y + 6x = 15
-                         Type: Equation Polynomial Integer
-
-  2*eq2 - eq1
-   x= 1
-                         Type: Equation Polynomial Integer
-
-Equations may be created for any type so the arithmetic operations
-will be defined only when they make sense.  For example, exponentiation 
-is not defined for equations involving non-square matrices.
-
-  eq1**2
-      2             2
-   16y  + 24x y + 9x = 25
-                          Type: Equation Polynomial Integer
-
-Note that an equals symbol is also used to test for equality of values
-in certain contexts.  For example, x+1 and y are unequal as polynomials.
-
-  if x+1 = y then "equal" else "unequal"
-   "unequal"
-                           Type: String
-
-  eqpol := x+1 = y 
-   x + 1= y
-                           Type: Equation Polynomial Integer
-
-If an equation is used where a Boolean value is required, then
-it is evaluated using the equality test from the operand type.
-
-  if eqpol then "equal" else "unequal"
-   "unequal"
-                           Type: String
-
-If one wants a Boolean value rather than an equation, all one has to
-do is ask!
-
-  eqpol::Boolean
-   false
-                           Type: Boolean
-
-See Also:
-o )show Equation
-o $AXIOM/doc/src/algebra/equation2.spad.dvi
-
-@
-<<domain EQ Equation>>=
-)abbrev domain EQ Equation
---FOR THE BENEFIT  OF LIBAX0 GENERATION
-++ Author: Stephen M. Watt, enhancements by Johannes Grabmeier
-++ Date Created: April 1985
-++ Date Last Updated: June 3, 1991; September 2, 1992
-++ Basic Operations: =
-++ Related Domains:
-++ Also See:
-++ AMS Classifications:
-++ Keywords: equation
-++ Examples:
-++ References:
-++ Description:
-++   Equations as mathematical objects.  All properties of the basis domain,
-++   e.g. being an abelian group are carried over the equation domain, by
-++   performing the structural operations on the left and on the
-++   right hand side.
---   The interpreter translates "=" to "equation".  Otherwise, it will
---   find a modemap for "=" in the domain of the arguments.
-
-Equation(S: Type): public == private where
-  Ex ==> OutputForm
-  public ==> Type with
-    "=": (S, S) -> $
-        ++ a=b creates an equation.
-    equation: (S, S) -> $
-        ++ equation(a,b) creates an equation.
-    swap: $ -> $
-        ++ swap(eq) interchanges left and right hand side of equation eq.
-    lhs: $ -> S
-        ++ lhs(eqn) returns the left hand side of equation eqn.
-    rhs: $ -> S
-        ++ rhs(eqn) returns the right hand side of equation eqn.
-    map: (S -> S, $) -> $
-        ++ map(f,eqn) constructs a new equation by applying f to both
-        ++ sides of eqn.
-    if S has InnerEvalable(Symbol,S) then
-             InnerEvalable(Symbol,S)
-    if S has SetCategory then
-        SetCategory
-        CoercibleTo Boolean
-        if S has Evalable(S) then
-           eval: ($, $) -> $
-               ++ eval(eqn, x=f) replaces x by f in equation eqn.
-           eval: ($, List $) -> $
-               ++ eval(eqn, [x1=v1, ... xn=vn]) replaces xi by vi in equation eqn.
-    if S has AbelianSemiGroup then
-        AbelianSemiGroup
-        "+": (S, $) -> $
-            ++ x+eqn produces a new equation by adding x to both sides of
-            ++ equation eqn.
-        "+": ($, S) -> $
-            ++ eqn+x produces a new equation by adding x to  both sides of
-            ++ equation eqn.
-    if S has AbelianGroup then
-        AbelianGroup
-        leftZero : $ -> $
-          ++ leftZero(eq) subtracts the left hand side.
-        rightZero : $ -> $
-          ++ rightZero(eq) subtracts the right hand side.
-        "-": (S, $) -> $
-            ++ x-eqn produces a new equation by subtracting both sides of
-            ++ equation eqn from x.
-        "-": ($, S) -> $
-            ++ eqn-x produces a new equation by subtracting x from  both sides of
-            ++ equation eqn.
-    if S has SemiGroup then
-        SemiGroup
-        "*": (S, $) -> $
-            ++ x*eqn produces a new equation by multiplying both sides of
-            ++ equation eqn by x.
-        "*": ($, S) -> $
-            ++ eqn*x produces a new equation by multiplying both sides of
-            ++ equation eqn by x.
-    if S has Monoid then
-        Monoid
-        leftOne : $ -> Union($,"failed")
-          ++ leftOne(eq) divides by the left hand side, if possible.
-        rightOne : $ -> Union($,"failed")
-          ++ rightOne(eq) divides by the right hand side, if possible.
-    if S has Group then
-        Group
-        leftOne : $ -> Union($,"failed")
-          ++ leftOne(eq) divides by the left hand side.
-        rightOne : $ -> Union($,"failed")
-          ++ rightOne(eq) divides by the right hand side.
-    if S has Ring then
-      Ring
-      BiModule(S,S)
-    if S has CommutativeRing then
-      Module(S)
-      --Algebra(S)
-    if S has IntegralDomain then
-      factorAndSplit : $ -> List $
-        ++ factorAndSplit(eq) make the right hand side 0 and
-        ++ factors the new left hand side. Each factor is equated
-        ++ to 0 and put into the resulting list without repetitions.
-    if S has PartialDifferentialRing(Symbol) then
-      PartialDifferentialRing(Symbol)
-    if S has Field then
-      VectorSpace(S)
-      "/": ($, $) -> $
-          ++ e1/e2 produces a new equation by dividing the left and right
-          ++ hand sides of equations e1 and e2.
-      inv: $ -> $
-          ++ inv(x) returns the multiplicative inverse of x.
-    if S has ExpressionSpace then
-        subst: ($, $) -> $
-             ++ subst(eq1,eq2) substitutes eq2 into both sides of eq1
-             ++ the lhs of eq2 should be a kernel
-
-  private ==> add
-    Rep := Record(lhs: S, rhs: S)
-    eq1,eq2: $
-    s : S
-    if S has IntegralDomain then
-        factorAndSplit eq ==
-          (S has factor : S -> Factored S) =>
-            eq0 := rightZero eq
-            [equation(rcf.factor,0) for rcf in factors factor lhs eq0]
-          [eq]
-    l:S = r:S      == [l, r]
-    equation(l, r) == [l, r]    -- hack!  See comment above.
-    lhs eqn        == eqn.lhs
-    rhs eqn        == eqn.rhs
-    swap eqn     == [rhs eqn, lhs eqn]
-    map(fn, eqn)   == equation(fn(eqn.lhs), fn(eqn.rhs))
-
-    if S has InnerEvalable(Symbol,S) then
-        s:Symbol
-        ls:List Symbol
-        x:S
-        lx:List S
-        eval(eqn,s,x) == eval(eqn.lhs,s,x) = eval(eqn.rhs,s,x)
-        eval(eqn,ls,lx) == eval(eqn.lhs,ls,lx) = eval(eqn.rhs,ls,lx)
-    if S has Evalable(S) then
-        eval(eqn1:$, eqn2:$):$ ==
-           eval(eqn1.lhs, eqn2 pretend Equation S) =
-               eval(eqn1.rhs, eqn2 pretend Equation S)
-        eval(eqn1:$, leqn2:List $):$ ==
-           eval(eqn1.lhs, leqn2 pretend List Equation S) =
-               eval(eqn1.rhs, leqn2 pretend List Equation S)
-    if S has SetCategory then
-        eq1 = eq2 == (eq1.lhs = eq2.lhs)@Boolean and
-                     (eq1.rhs = eq2.rhs)@Boolean
-        coerce(eqn:$):Ex == eqn.lhs::Ex = eqn.rhs::Ex
-        coerce(eqn:$):Boolean == eqn.lhs = eqn.rhs
-    if S has AbelianSemiGroup then
-        eq1 + eq2 == eq1.lhs + eq2.lhs = eq1.rhs + eq2.rhs
-        s + eq2 == [s,s] + eq2
-        eq1 + s == eq1 + [s,s]
-    if S has AbelianGroup then
-        - eq == (- lhs eq) = (-rhs eq)
-        s - eq2 == [s,s] - eq2
-        eq1 - s == eq1 - [s,s]
-        leftZero eq == 0 = rhs eq - lhs eq
-        rightZero eq == lhs eq - rhs eq = 0
-        0 == equation(0$S,0$S)
-        eq1 - eq2 == eq1.lhs - eq2.lhs = eq1.rhs - eq2.rhs
-    if S has SemiGroup then
-        eq1:$ * eq2:$ == eq1.lhs * eq2.lhs = eq1.rhs * eq2.rhs
-        l:S   * eqn:$ == l       * eqn.lhs = l       * eqn.rhs
-        l:S * eqn:$  ==  l * eqn.lhs    =    l * eqn.rhs
-        eqn:$ * l:S  ==  eqn.lhs * l    =    eqn.rhs * l
-        -- We have to be a bit careful here: raising to a +ve integer is OK
-        -- (since it's the equivalent of repeated multiplication)
-        -- but other powers may cause contradictions
-        -- Watch what else you add here! JHD 2/Aug 1990
-    if S has Monoid then
-        1 == equation(1$S,1$S)
-        recip eq ==
-          (lh := recip lhs eq) case "failed" => "failed"
-          (rh := recip rhs eq) case "failed" => "failed"
-          [lh :: S, rh :: S]
-        leftOne eq ==
-          (re := recip lhs eq) case "failed" => "failed"
-          1 = rhs eq * re
-        rightOne eq ==
-          (re := recip rhs eq) case "failed" => "failed"
-          lhs eq * re = 1
-    if S has Group then
-        inv eq == [inv lhs eq, inv rhs eq]
-        leftOne eq == 1 = rhs eq * inv rhs eq
-        rightOne eq == lhs eq * inv rhs eq = 1
-    if S has Ring then
-        characteristic() == characteristic()$S
-        i:Integer * eq:$ == (i::S) * eq
-    if S has IntegralDomain then
-        factorAndSplit eq ==
-          (S has factor : S -> Factored S) =>
-            eq0 := rightZero eq
-            [equation(rcf.factor,0) for rcf in factors factor lhs eq0]
-          (S has Polynomial Integer) =>
-            eq0 := rightZero eq
-            MF ==> MultivariateFactorize(Symbol, IndexedExponents Symbol, _
-               Integer, Polynomial Integer)
-            p : Polynomial Integer := (lhs eq0) pretend Polynomial Integer
-            [equation((rcf.factor) pretend S,0) for rcf in factors factor(p)$MF]
-          [eq]
-    if S has PartialDifferentialRing(Symbol) then
-        differentiate(eq:$, sym:Symbol):$ ==
-           [differentiate(lhs eq, sym), differentiate(rhs eq, sym)]
-    if S has Field then
-        dimension() == 2 :: CardinalNumber
-        eq1:$ / eq2:$ == eq1.lhs / eq2.lhs = eq1.rhs / eq2.rhs
-        inv eq == [inv lhs eq, inv rhs eq]
-    if S has ExpressionSpace then
-        subst(eq1,eq2) ==
-            eq3 := eq2 pretend Equation S
-            [subst(lhs eq1,eq3),subst(rhs eq1,eq3)]
-
-@
 \section{package EQ2 EquationFunctions2}
 <<package EQ2 EquationFunctions2>>=
 )abbrev package EQ2 EquationFunctions2
@@ -471,7 +67,6 @@ EquationFunctions2(S: Type, R: Type): with
 <<*>>=
 <<license>>
 
-<<domain EQ Equation>>
 <<package EQ2 EquationFunctions2>>
 @
 \eject
diff --git a/src/algebra/expexpan.spad.pamphlet b/src/algebra/expexpan.spad.pamphlet
deleted file mode 100644
index 30e4877..0000000
--- a/src/algebra/expexpan.spad.pamphlet
+++ /dev/null
@@ -1,555 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/algebra expexpan.spad}
-\author{Clifton J. Williamson}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{domain EXPUPXS ExponentialOfUnivariatePuiseuxSeries}
-<<domain EXPUPXS ExponentialOfUnivariatePuiseuxSeries>>=
-)abbrev domain EXPUPXS ExponentialOfUnivariatePuiseuxSeries
-++ Author: Clifton J. Williamson
-++ Date Created: 4 August 1992
-++ Date Last Updated: 27 August 1992
-++ Basic Operations:
-++ Related Domains: UnivariatePuiseuxSeries(FE,var,cen)
-++ Also See:
-++ AMS Classifications:
-++ Keywords: limit, functional expression, power series, essential singularity
-++ Examples:
-++ References:
-++ Description:
-++   ExponentialOfUnivariatePuiseuxSeries is a domain used to represent
-++   essential singularities of functions.  An object in this domain is a
-++   function of the form \spad{exp(f(x))}, where \spad{f(x)} is a Puiseux
-++   series with no terms of non-negative degree.  Objects are ordered
-++   according to order of singularity, with functions which tend more
-++   rapidly to zero or infinity considered to be larger.  Thus, if
-++   \spad{order(f(x)) < order(g(x))}, i.e. the first non-zero term of
-++   \spad{f(x)} has lower degree than the first non-zero term of \spad{g(x)},
-++   then \spad{exp(f(x)) > exp(g(x))}.  If \spad{order(f(x)) = order(g(x))},
-++   then the ordering is essentially random.  This domain is used
-++   in computing limits involving functions with essential singularities.
-ExponentialOfUnivariatePuiseuxSeries(FE,var,cen):_
-      Exports == Implementation where
-  FE  : Join(Field,OrderedSet)
-  var : Symbol
-  cen : FE
-  UPXS ==> UnivariatePuiseuxSeries(FE,var,cen)
-
-  Exports ==> Join(UnivariatePuiseuxSeriesCategory(FE),OrderedAbelianMonoid) _
-        with
-    exponential : UPXS -> %
-      ++ exponential(f(x)) returns \spad{exp(f(x))}.
-      ++ Note: the function does NOT check that \spad{f(x)} has no
-      ++ non-negative terms.
-    exponent : % -> UPXS
-      ++ exponent(exp(f(x))) returns \spad{f(x)}
-    exponentialOrder: % -> Fraction Integer
-      ++ exponentialOrder(exp(c * x **(-n) + ...)) returns \spad{-n}.
-      ++ exponentialOrder(0) returns \spad{0}.
-
-  Implementation ==> UPXS add
-
-    Rep := UPXS
-
-    exponential f == complete f
-    exponent f == f pretend UPXS
-    exponentialOrder f == order(exponent f,0)
-
-    zero? f == empty? entries complete terms f
-
-    f = g ==
-    -- we redefine equality because we know that we are dealing with
-    -- a FINITE series, so there is no danger in computing all terms
-      (entries complete terms f) = (entries complete terms g)
-
-    f < g ==
-      zero? f => not zero? g
-      zero? g => false
-      (ordf := exponentialOrder f) > (ordg := exponentialOrder g) => true
-      ordf < ordg => false
-      (fCoef := coefficient(f,ordf)) = (gCoef := coefficient(g,ordg)) =>
-        reductum(f) < reductum(g)
-      fCoef < gCoef  -- this is "random" if FE is EXPR INT
-
-    coerce(f:%):OutputForm ==
-      ("%e" :: OutputForm) ** ((coerce$Rep)(complete f)@OutputForm)
-
-@
-\section{domain UPXSSING UnivariatePuiseuxSeriesWithExponentialSingularity}
-<<domain UPXSSING UnivariatePuiseuxSeriesWithExponentialSingularity>>=
-)abbrev domain UPXSSING UnivariatePuiseuxSeriesWithExponentialSingularity
-++ Author: Clifton J. Williamson
-++ Date Created: 4 August 1992
-++ Date Last Updated: 27 August 1992
-++ Basic Operations:
-++ Related Domains: UnivariatePuiseuxSeries(FE,var,cen),
-++                  ExponentialOfUnivariatePuiseuxSeries(FE,var,cen)
-++                  ExponentialExpansion(R,FE,var,cen)
-++ Also See:
-++ AMS Classifications:
-++ Keywords: limit, functional expression, power series
-++ Examples:
-++ References:
-++ Description:
-++   UnivariatePuiseuxSeriesWithExponentialSingularity is a domain used to
-++   represent functions with essential singularities.  Objects in this
-++   domain are sums, where each term in the sum is a univariate Puiseux
-++   series times the exponential of a univariate Puiseux series.  Thus,
-++   the elements of this domain are sums of expressions of the form
-++   \spad{g(x) * exp(f(x))}, where g(x) is a univariate Puiseux series
-++   and f(x) is a univariate Puiseux series with no terms of non-negative
-++   degree.
-UnivariatePuiseuxSeriesWithExponentialSingularity(R,FE,var,cen):_
-  Exports == Implementation where
-  R   : Join(OrderedSet,RetractableTo Integer,_
-             LinearlyExplicitRingOver Integer,GcdDomain)
-  FE  : Join(AlgebraicallyClosedField,TranscendentalFunctionCategory,_
-             FunctionSpace R)
-  var : Symbol
-  cen : FE
-  B       ==> Boolean
-  I       ==> Integer
-  L       ==> List
-  RN      ==> Fraction Integer
-  UPXS    ==> UnivariatePuiseuxSeries(FE,var,cen)
-  EXPUPXS ==> ExponentialOfUnivariatePuiseuxSeries(FE,var,cen)
-  OFE     ==> OrderedCompletion FE
-  Result  ==> Union(OFE,"failed")
-  PxRec   ==> Record(k: Fraction Integer,c:FE)
-  Term    ==> Record(%coef:UPXS,%expon:EXPUPXS,%expTerms:List PxRec)
-    -- the %expTerms field is used to record the list of the terms (a 'term'
-    -- records an exponent and a coefficient) in the exponent %expon
-  TypedTerm ==> Record(%term:Term,%type:String)
-    -- a term together with a String which tells whether it has an infinite,
-    -- zero, or unknown limit as var -> cen+
-  TRec    ==> Record(%zeroTerms: List Term,_
-                     %infiniteTerms: List Term,_
-                     %failedTerms: List Term,_
-                     %puiseuxSeries: UPXS)
-  SIGNEF  ==> ElementaryFunctionSign(R,FE)
-
-  Exports ==> Join(FiniteAbelianMonoidRing(UPXS,EXPUPXS),IntegralDomain) with
-    limitPlus : % -> Union(OFE,"failed")
-      ++ limitPlus(f(var)) returns \spad{limit(var -> cen+,f(var))}.
-    dominantTerm : % -> Union(TypedTerm,"failed")
-      ++ dominantTerm(f(var)) returns the term that dominates the limiting
-      ++ behavior of \spad{f(var)} as \spad{var -> cen+} together with a
-      ++ \spadtype{String} which briefly describes that behavior.  The
-      ++ value of the \spadtype{String} will be \spad{"zero"} (resp.
-      ++ \spad{"infinity"}) if the term tends to zero (resp. infinity)
-      ++ exponentially and will \spad{"series"} if the term is a
-      ++ Puiseux series.
-
-  Implementation ==> PolynomialRing(UPXS,EXPUPXS) add
-    makeTerm : (UPXS,EXPUPXS) -> Term
-    coeff : Term -> UPXS
-    exponent : Term -> EXPUPXS
-    exponentTerms : Term -> List PxRec
-    setExponentTerms_! : (Term,List PxRec) -> List PxRec
-    computeExponentTerms_! : Term -> List PxRec
-    terms : % -> List Term
-    sortAndDiscardTerms: List Term -> TRec
-    termsWithExtremeLeadingCoef : (L Term,RN,I) -> Union(L Term,"failed")
-    filterByOrder: (L Term,(RN,RN) -> B) -> Record(%list:L Term,%order:RN)
-    dominantTermOnList : (L Term,RN,I) -> Union(Term,"failed")
-    iDominantTerm : L Term -> Union(Record(%term:Term,%type:String),"failed")
-
-    retractIfCan f ==
-      (numberOfMonomials f = 1) and (zero? degree f) => leadingCoefficient f
-      "failed"
-
-    recip f ==
-      numberOfMonomials f = 1 =>
-        monomial(inv leadingCoefficient f,- degree f)
-      "failed"
-
-    makeTerm(coef,expon) == [coef,expon,empty()]
-    coeff term == term.%coef
-    exponent term == term.%expon
-    exponentTerms term == term.%expTerms
-    setExponentTerms_!(term,list) == term.%expTerms := list
-    computeExponentTerms_! term ==
-      setExponentTerms_!(term,entries complete terms exponent term)
-
-    terms f ==
-      -- terms with a higher order singularity will appear closer to the
-      -- beginning of the list because of the ordering in EXPPUPXS;
-      -- no "expnonent terms" are computed by this function
-      zero? f => empty()
-      concat(makeTerm(leadingCoefficient f,degree f),terms reductum f)
-
-    sortAndDiscardTerms termList ==
-      -- 'termList' is the list of terms of some function f(var), ordered
-      -- so that terms with a higher order singularity occur at the
-      -- beginning of the list.
-      -- This function returns lists of candidates for the "dominant
-      -- term" in 'termList', i.e. the term which describes the
-      -- asymptotic behavior of f(var) as var -> cen+.
-      -- 'zeroTerms' will contain terms which tend to zero exponentially
-      -- and contains only those terms with the lowest order singularity.
-      -- 'zeroTerms' will be non-empty only when there are no terms of
-      -- infinite or series type.
-      -- 'infiniteTerms' will contain terms which tend to infinity
-      -- exponentially and contains only those terms with the highest
-      -- order singularity.
-      -- 'failedTerms' will contain terms which have an exponential
-      -- singularity, where we cannot say whether the limiting value
-      -- is zero or infinity. Only terms with a higher order sigularity
-      -- than the terms on 'infiniteList' are included.
-      -- 'pSeries' will be a Puiseux series representing a term without an
-      -- exponential singularity.  'pSeries' will be non-zero only when no
-      -- other terms are known to tend to infinity exponentially
-      zeroTerms : List Term := empty()
-      infiniteTerms : List Term := empty()
-      failedTerms : List Term := empty()
-      -- we keep track of whether or not we've found an infinite term
-      -- if so, 'infTermOrd' will be set to a negative value
-      infTermOrd : RN := 0
-      -- we keep track of whether or not we've found a zero term
-      -- if so, 'zeroTermOrd' will be set to a negative value
-      zeroTermOrd : RN := 0
-      ord : RN := 0; pSeries : UPXS := 0  -- dummy values
-      while not empty? termList repeat
-        -- 'expon' is a Puiseux series
-        expon := exponent(term := first termList)
-        -- quit if there is an infinite term with a higher order singularity
-        (ord := order(expon,0)) > infTermOrd => leave "infinite term dominates"
-        -- if ord = 0, we've hit the end of the list
-        (ord = 0) =>
-          -- since we have a series term, don't bother with zero terms
-          leave(pSeries := coeff(term); zeroTerms := empty())
-        coef := coefficient(expon,ord)
-        -- if we can't tell if the lowest order coefficient is positive or
-        -- negative, we have a "failed term"
-        (signum := sign(coef)$SIGNEF) case "failed" =>
-          failedTerms := concat(term,failedTerms)
-          termList := rest termList
-        -- if the lowest order coefficient is positive, we have an
-        -- "infinite term"
-        (sig := signum :: Integer) = 1 =>
-          infTermOrd := ord
-          infiniteTerms := concat(term,infiniteTerms)
-          -- since we have an infinite term, don't bother with zero terms
-          zeroTerms := empty()
-          termList := rest termList
-        -- if the lowest order coefficient is negative, we have a
-        -- "zero term" if there are no infinite terms and no failed
-        -- terms, add the term to 'zeroTerms'
-        if empty? infiniteTerms then
-          zeroTerms :=
-            ord = zeroTermOrd => concat(term,zeroTerms)
-            zeroTermOrd := ord
-            list term
-        termList := rest termList
-      -- reverse "failed terms" so that higher order singularities
-      -- appear at the beginning of the list
-      [zeroTerms,infiniteTerms,reverse_! failedTerms,pSeries]
-
-    termsWithExtremeLeadingCoef(termList,ord,signum) ==
-      -- 'termList' consists of terms of the form [g(x),exp(f(x)),...];
-      -- when 'signum' is +1 (resp. -1), this function filters 'termList'
-      -- leaving only those terms such that coefficient(f(x),ord) is
-      -- maximal (resp. minimal)
-      while (coefficient(exponent first termList,ord) = 0) repeat
-        termList := rest termList
-      empty? termList => error "UPXSSING: can't happen"
-      coefExtreme := coefficient(exponent first termList,ord)
-      outList := list first termList; termList := rest termList
-      for term in termList repeat
-        (coefDiff := coefficient(exponent term,ord) - coefExtreme) = 0 =>
-          outList := concat(term,outList)
-        (sig := sign(coefDiff)$SIGNEF) case "failed" => return "failed"
-        (sig :: Integer) = signum => outList := list term
-      outList
-
-    filterByOrder(termList,predicate) ==
-      -- 'termList' consists of terms of the form [g(x),exp(f(x)),expTerms],
-      -- where 'expTerms' is a list containing some of the terms in the
-      -- series f(x).
-      -- The function filters 'termList' and, when 'predicate' is < (resp. >),
-      -- leaves only those terms with the lowest (resp. highest) order term
-      -- in 'expTerms'
-      while empty? exponentTerms first termList repeat
-        termList := rest termList
-        empty? termList => error "UPXSING: can't happen"
-      ordExtreme := (first exponentTerms first termList).k
-      outList := list first termList
-      for term in rest termList repeat
-        not empty? exponentTerms term =>
-          (ord := (first exponentTerms term).k) = ordExtreme =>
-            outList := concat(term,outList)
-          predicate(ord,ordExtreme) =>
-            ordExtreme := ord
-            outList := list term
-      -- advance pointers on "exponent terms" on terms on 'outList'
-      for term in outList repeat
-        setExponentTerms_!(term,rest exponentTerms term)
-      [outList,ordExtreme]
-
-    dominantTermOnList(termList,ord0,signum) ==
-      -- finds dominant term on 'termList'
-      -- it is known that "exponent terms" of order < 'ord0' are
-      -- the same for all terms on 'termList'
-      newList := termsWithExtremeLeadingCoef(termList,ord0,signum)
-      newList case "failed" => "failed"
-      termList := newList :: List Term
-      empty? rest termList => first termList
-      filtered :=
-        signum = 1 => filterByOrder(termList,#1 < #2)
-        filterByOrder(termList,#1 > #2)
-      termList := filtered.%list
-      empty? rest termList => first termList
-      dominantTermOnList(termList,filtered.%order,signum)
-
-    iDominantTerm termList ==
-      termRecord := sortAndDiscardTerms termList
-      zeroTerms := termRecord.%zeroTerms
-      infiniteTerms := termRecord.%infiniteTerms
-      failedTerms := termRecord.%failedTerms
-      pSeries := termRecord.%puiseuxSeries
-      -- in future versions, we will deal with "failed terms"
-      -- at present, if any occur, we cannot determine the limit
-      not empty? failedTerms => "failed"
-      not zero? pSeries => [makeTerm(pSeries,0),"series"]
-      not empty? infiniteTerms =>
-        empty? rest infiniteTerms => [first infiniteTerms,"infinity"]
-        for term in infiniteTerms repeat computeExponentTerms_! term
-        ord0 := order exponent first infiniteTerms
-        (dTerm := dominantTermOnList(infiniteTerms,ord0,1)) case "failed" =>
-          return "failed"
-        [dTerm :: Term,"infinity"]
-      empty? rest zeroTerms => [first zeroTerms,"zero"]
-      for term in zeroTerms repeat computeExponentTerms_! term
-      ord0 := order exponent first zeroTerms
-      (dTerm := dominantTermOnList(zeroTerms,ord0,-1)) case "failed" =>
-        return "failed"
-      [dTerm :: Term,"zero"]
-
-    dominantTerm f == iDominantTerm terms f
-
-    limitPlus f ==
-      -- list the terms occurring in 'f'; if there are none, then f = 0
-      empty?(termList := terms f) => 0
-      -- compute dominant term
-      (tInfo := iDominantTerm termList) case "failed" => "failed"
-      termInfo := tInfo :: Record(%term:Term,%type:String)
-      domTerm := termInfo.%term
-      (type := termInfo.%type) = "series" =>
-        -- find limit of series term
-        (ord := order(pSeries := coeff domTerm,1)) > 0 => 0
-        coef := coefficient(pSeries,ord)
-        member?(var,variables coef) => "failed"
-        ord = 0 => coef :: OFE
-        -- in the case of an infinite limit, we need to know the sign
-        -- of the first non-zero coefficient
-        (signum := sign(coef)$SIGNEF) case "failed" => "failed"
-        (signum :: Integer) = 1 => plusInfinity()
-        minusInfinity()
-      type = "zero" => 0
-      -- examine lowest order coefficient in series part of 'domTerm'
-      ord := order(pSeries := coeff domTerm)
-      coef := coefficient(pSeries,ord)
-      member?(var,variables coef) => "failed"
-      (signum := sign(coef)$SIGNEF) case "failed" => "failed"
-      (signum :: Integer) = 1 => plusInfinity()
-      minusInfinity()
-
-@
-\section{domain EXPEXPAN ExponentialExpansion}
-<<domain EXPEXPAN ExponentialExpansion>>=
-)abbrev domain EXPEXPAN ExponentialExpansion
-++ Author: Clifton J. Williamson
-++ Date Created: 13 August 1992
-++ Date Last Updated: 27 August 1992
-++ Basic Operations:
-++ Related Domains: UnivariatePuiseuxSeries(FE,var,cen),
-++                  ExponentialOfUnivariatePuiseuxSeries(FE,var,cen)
-++ Also See:
-++ AMS Classifications:
-++ Keywords: limit, functional expression, power series
-++ Examples:
-++ References:
-++ Description:
-++   UnivariatePuiseuxSeriesWithExponentialSingularity is a domain used to
-++   represent essential singularities of functions.  Objects in this domain
-++   are quotients of sums, where each term in the sum is a univariate Puiseux
-++   series times the exponential of a univariate Puiseux series.
-ExponentialExpansion(R,FE,var,cen): Exports == Implementation where
-  R   : Join(OrderedSet,RetractableTo Integer,_
-             LinearlyExplicitRingOver Integer,GcdDomain)
-  FE  : Join(AlgebraicallyClosedField,TranscendentalFunctionCategory,_
-             FunctionSpace R)
-  var : Symbol
-  cen : FE
-  RN       ==> Fraction Integer
-  UPXS     ==> UnivariatePuiseuxSeries(FE,var,cen)
-  EXPUPXS  ==> ExponentialOfUnivariatePuiseuxSeries(FE,var,cen)
-  UPXSSING ==> UnivariatePuiseuxSeriesWithExponentialSingularity(R,FE,var,cen)
-  OFE      ==> OrderedCompletion FE
-  Result   ==> Union(OFE,"failed")
-  PxRec    ==> Record(k: Fraction Integer,c:FE)
-  Term     ==> Record(%coef:UPXS,%expon:EXPUPXS,%expTerms:List PxRec)
-  TypedTerm ==> Record(%term:Term,%type:String)
-  SIGNEF   ==> ElementaryFunctionSign(R,FE)
-
-  Exports ==> Join(QuotientFieldCategory UPXSSING,RetractableTo UPXS) with
-    limitPlus : % -> Union(OFE,"failed")
-      ++ limitPlus(f(var)) returns \spad{limit(var -> a+,f(var))}.
-    coerce: UPXS -> %
-      ++ coerce(f) converts a \spadtype{UnivariatePuiseuxSeries} to
-      ++ an \spadtype{ExponentialExpansion}.
-
-  Implementation ==> Fraction(UPXSSING) add
-    coeff : Term -> UPXS
-    exponent : Term -> EXPUPXS
-    upxssingIfCan : % -> Union(UPXSSING,"failed")
-    seriesQuotientLimit: (UPXS,UPXS) -> Union(OFE,"failed")
-    seriesQuotientInfinity: (UPXS,UPXS) -> Union(OFE,"failed")
-
-    Rep := Fraction UPXSSING
-
-    ZEROCOUNT : RN := 1000/1
-
-    coeff term == term.%coef
-    exponent term == term.%expon
-
-    --!! why is this necessary?
-    --!! code can run forever in retractIfCan if original assignment
-    --!! for 'ff' is used
-    upxssingIfCan f ==
---      one? denom f => numer f
-      (denom f = 1) => numer f
-      "failed"
-
-    retractIfCan(f:%):Union(UPXS,"failed") ==
-      --ff := (retractIfCan$Rep)(f)@Union(UPXSSING,"failed")
-      --ff case "failed" => "failed"
-      (ff := upxssingIfCan f) case "failed" => "failed"
-      (fff := retractIfCan(ff::UPXSSING)@Union(UPXS,"failed")) case "failed" =>
-        "failed"
-      fff :: UPXS
-
-    f:UPXSSING / g:UPXSSING ==
-      (rec := recip g) case "failed" => f /$Rep g
-      f * (rec :: UPXSSING) :: %
-
-    f:% / g:% ==
-      (rec := recip numer g) case "failed" => f /$Rep g
-      (rec :: UPXSSING) * (denom g) * f
-
-    coerce(f:UPXS) == f :: UPXSSING :: %
-
-    seriesQuotientLimit(num,den) ==
-      -- limit of the quotient of two series
-      series := num / den
-      (ord := order(series,1)) > 0 => 0
-      coef := coefficient(series,ord)
-      member?(var,variables coef) => "failed"
-      ord = 0 => coef :: OFE
-      (sig := sign(coef)$SIGNEF) case "failed" => return "failed"
-      (sig :: Integer) = 1 => plusInfinity()
-      minusInfinity()
-
-    seriesQuotientInfinity(num,den) ==
-      -- infinite limit: plus or minus?
-      -- look at leading coefficients of series to tell
-      (numOrd := order(num,ZEROCOUNT)) = ZEROCOUNT => "failed"
-      (denOrd := order(den,ZEROCOUNT)) = ZEROCOUNT => "failed"
-      cc := coefficient(num,numOrd)/coefficient(den,denOrd)
-      member?(var,variables cc) => "failed"
-      (sig := sign(cc)$SIGNEF) case "failed" => return "failed"
-      (sig :: Integer) = 1 => plusInfinity()
-      minusInfinity()
-
-    limitPlus f ==
-      zero? f => 0
-      (den := denom f) = 1 => limitPlus numer f
-      (numerTerm := dominantTerm(num := numer f)) case "failed" => "failed"
-      numType := (numTerm := numerTerm :: TypedTerm).%type
-      (denomTerm := dominantTerm den) case "failed" => "failed"
-      denType := (denTerm := denomTerm :: TypedTerm).%type
-      numExpon := exponent numTerm.%term; denExpon := exponent denTerm.%term
-      numCoef := coeff numTerm.%term; denCoef := coeff denTerm.%term
-      -- numerator tends to zero exponentially
-      (numType = "zero") =>
-        -- denominator tends to zero exponentially
-        (denType = "zero") =>
-          (exponDiff := numExpon - denExpon) = 0 =>
-            seriesQuotientLimit(numCoef,denCoef)
-          expCoef := coefficient(exponDiff,order exponDiff)
-          (sig := sign(expCoef)$SIGNEF) case "failed" => return "failed"
-          (sig :: Integer) = -1 => 0
-          seriesQuotientInfinity(numCoef,denCoef)
-        0 -- otherwise limit is zero
-      -- numerator is a Puiseux series
-      (numType = "series") =>
-        -- denominator tends to zero exponentially
-        (denType = "zero") =>
-          seriesQuotientInfinity(numCoef,denCoef)
-        -- denominator is a series
-        (denType = "series") => seriesQuotientLimit(numCoef,denCoef)
-        0
-      -- remaining case: numerator tends to infinity exponentially
-      -- denominator tends to infinity exponentially
-      (denType = "infinity") =>
-        (exponDiff := numExpon - denExpon) = 0 =>
-          seriesQuotientLimit(numCoef,denCoef)
-        expCoef := coefficient(exponDiff,order exponDiff)
-        (sig := sign(expCoef)$SIGNEF) case "failed" => return "failed"
-        (sig :: Integer) = -1 => 0
-        seriesQuotientInfinity(numCoef,denCoef)
-      -- denominator tends to zero exponentially or is a series
-      seriesQuotientInfinity(numCoef,denCoef)
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
---    - Redistributions of source code must retain the above copyright
---      notice, this list of conditions and the following disclaimer.
---
---    - Redistributions in binary form must reproduce the above copyright
---      notice, this list of conditions and the following disclaimer in
---      the documentation and/or other materials provided with the
---      distribution.
---
---    - Neither the name of The Numerical ALgorithms Group Ltd. nor the
---      names of its contributors may be used to endorse or promote products
---      derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<domain EXPUPXS ExponentialOfUnivariatePuiseuxSeries>>
-<<domain UPXSSING UnivariatePuiseuxSeriesWithExponentialSingularity>>
-<<domain EXPEXPAN ExponentialExpansion>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/expr.spad.pamphlet b/src/algebra/expr.spad.pamphlet
index ec03f7f..58be511 100644
--- a/src/algebra/expr.spad.pamphlet
+++ b/src/algebra/expr.spad.pamphlet
@@ -9,902 +9,6 @@
 \eject
 \tableofcontents
 \eject
-\section{domain EXPR Expression}
-<<Expression.input>>=
--- expr.spad.pamphlet Expression.input
-)spool Expression.output
-)set message test on
-)set message auto off
-)clear all
---S 1
-sin(x) + 3*cos(x)**2
---R 
---R
---R                        2
---R   (1)  sin(x) + 3cos(x)
---R                                                     Type: Expression Integer
---E 1
-
---S 2
-tan(x) - 3.45*x
---R 
---R
---R   (2)  tan(x) - 3.45 x
---R                                                       Type: Expression Float
---E 2
-
---S 3
-(tan sqrt 7 - sin sqrt 11)**2 / (4 - cos(x - y))
---R 
---R
---R               +-+ 2         +--+      +-+         +--+ 2
---R        - tan(\|7 )  + 2sin(\|11 )tan(\|7 ) - sin(\|11 )
---R   (3)  -------------------------------------------------
---R                          cos(y - x) - 4
---R                                                     Type: Expression Integer
---E 3
-
---S 4
-log(exp  x)@Expression(Integer)
---R 
---R
---R   (4)  x
---R                                                     Type: Expression Integer
---E 4
-
---S 5
-log(exp  x)@Expression(Complex Integer)
---R 
---R
---R              x
---R   (5)  log(%e )
---R                                             Type: Expression Complex Integer
---E 5
-
---S 6
-sqrt 3 + sqrt(2 + sqrt(-5))
---R 
---R
---R         +----------+
---R         | +---+         +-+
---R   (6)  \|\|- 5  + 2  + \|3
---R                                                        Type: AlgebraicNumber
---E 6
-
---S 7
-% :: Expression Integer
---R 
---R
---R         +----------+
---R         | +---+         +-+
---R   (7)  \|\|- 5  + 2  + \|3
---R                                                     Type: Expression Integer
---E 7
-
---S 8
-height mainKernel sin(x + 4)
---R 
---R
---R   (8)  2
---R                                                        Type: PositiveInteger
---E 8
-
---S 9
-e := (sin(x) - 4)**2 / ( 1 - 2*y*sqrt(- y) ) 
---R 
---R
---R                2
---R        - sin(x)  + 8sin(x) - 16
---R   (9)  ------------------------
---R                 +---+
---R              2y\|- y  - 1
---R                                                     Type: Expression Integer
---E 9
-
---S 10
-numer e 
---R 
---R
---R                 2
---R   (10)  - sin(x)  + 8sin(x) - 16
---R        Type: SparseMultivariatePolynomial(Integer,Kernel Expression Integer)
---E 10
-
---S 11
-denom e
---R 
---R
---R            +---+
---R   (11)  2y\|- y  - 1
---R        Type: SparseMultivariatePolynomial(Integer,Kernel Expression Integer)
---E 11
-
---S 12
-D(e, x) 
---R 
---R
---R                                        +---+
---R         (4y cos(x)sin(x) - 16y cos(x))\|- y  - 2cos(x)sin(x) + 8cos(x)
---R   (12)  --------------------------------------------------------------
---R                                  +---+     3
---R                               4y\|- y  + 4y  - 1
---R                                                     Type: Expression Integer
---E 12
-
---S 13
-D(e, [x, y], [1, 2])
---R 
---R
---R   (13)
---R                7       4                      7        4         +---+
---R       ((- 2304y  + 960y )cos(x)sin(x) + (9216y  - 3840y )cos(x))\|- y
---R     + 
---R              9        6       3
---R       (- 960y  + 2160y  - 180y  - 3)cos(x)sin(x)
---R     + 
---R             9        6       3
---R       (3840y  - 8640y  + 720y  + 12)cos(x)
---R  /
---R            12        9        6       3      +---+        11        8       5
---R       (256y   - 1792y  + 1120y  - 112y  + 1)\|- y  - 1024y   + 1792y  - 448y
---R     + 
---R          2
---R       16y
---R                                                     Type: Expression Integer
---E 13
-
---S 14
-complexNumeric(cos(2 - 3*%i))
---R 
---R
---R   (14)  - 4.1896256909 688072301 + 9.1092278937 55336598 %i
---R                                                          Type: Complex Float
---E 14
-
---S 15
-numeric(tan 3.8)
---R 
---R
---R   (15)  0.7735560905 0312607286
---R                                                                  Type: Float
---E 15
-
---S 16
-e2 := cos(x**2 - y + 3) 
---R 
---R
---R                  2
---R   (16)  cos(y - x  - 3)
---R                                                     Type: Expression Integer
---E 16
-
---S 17
-e3 := asin(e2) - %pi/2
---R 
---R
---R                2
---R   (17)  - y + x  + 3
---R                                                     Type: Expression Integer
---E 17
-
---S 18
-e3 :: Polynomial Integer
---R 
---R
---R                2
---R   (18)  - y + x  + 3
---R                                                     Type: Polynomial Integer
---E 18
-
---S 19
-e3 :: DMP([x, y], Integer) 
---R 
---R
---R          2
---R   (19)  x  - y + 3
---R                       Type: DistributedMultivariatePolynomial([x,y],Integer)
---E 19
-
---S 20
-sin %pi
---R 
---R
---R   (20)  0
---R                                                     Type: Expression Integer
---E 20
-
---S 21
-cos(%pi / 4)
---R 
---R
---R          +-+
---R         \|2
---R   (21)  ----
---R           2
---R                                                     Type: Expression Integer
---E 21
-
---S 22
-tan(x)**6 + 3*tan(x)**4 + 3*tan(x)**2 + 1 
---R 
---R
---R               6          4          2
---R   (22)  tan(x)  + 3tan(x)  + 3tan(x)  + 1
---R                                                     Type: Expression Integer
---E 22
-
---S 23
-simplify % 
---R 
---R
---R            1
---R   (23)  -------
---R               6
---R         cos(x)
---R                                                     Type: Expression Integer
---E 23
-)spool
-)lisp (bye)
-@
-<<Expression.help>>=
-====================================================================
-Expression examples
-====================================================================
-
-Expression is a constructor that creates domains whose objects
-can have very general symbolic forms.  Here are some examples:
-
-This is an object of type Expression Integer.
-
-  sin(x) + 3*cos(x)**2
-
-This is an object of type Expression Float.
-
-  tan(x) - 3.45*x
-
-This object contains symbolic function applications, sums,
-products, square roots, and a quotient.
-
-  (tan sqrt 7 - sin sqrt 11)**2 / (4 - cos(x - y))
-
-As you can see, Expression actually takes an argument domain.  The
-coefficients of the terms within the expression belong to the argument
-domain.  Integer and Float, along with Complex Integer and Complex
-Float are the most common coefficient domains.
-
-The choice of whether to use a Complex coefficient domain or not is
-important since Axiom can perform some simplifications on real-valued
-objects
-
-  log(exp  x)@Expression(Integer)
-
-... which are not valid on complex ones.
-
-  log(exp  x)@Expression(Complex Integer)
-
-Many potential coefficient domains, such as AlgebraicNumber, are not
-usually used because Expression can subsume them.
-
-  sqrt 3 + sqrt(2 + sqrt(-5))
-
-  % :: Expression Integer
-
-Note that we sometimes talk about "an object of type Expression."
-This is not really correct because we should say, for example, "an
-object of type Expression Integer" or "an object of type Expression
-Float."  By a similar abuse of language, when we refer to an
-"expression" in this section we will mean an object of type Expression
-R for some domain R.
-
-The Axiom documentation contains many examples of the use of
-Expression.  For the rest of this section, we'll give you some
-pointers to those examples plus give you some idea of how to
-manipulate expressions.
-
-It is important for you to know that Expression creates domains that
-have category Field.  Thus you can invert any non-zero expression and
-you shouldn't expect an operation like factor to give you much
-information.  You can imagine expressions as being represented as
-quotients of "multivariate" polynomials where the "variables" are
-kernels. A kernel can either be a symbol such as x or a symbolic
-function application like sin(x + 4).  The second example is actually
-a nested kernel since the argument to sin contains the kernel x.
-
-  height mainKernel sin(x + 4)
-
-Actually, the argument to sin is an expression, and so the structure
-of Expression is recursive. See Kernel which demonstrates how to
-extract the kernels in an expression.
-
-Use the HyperDoc Browse facility to see what operations are applicable
-to expression.  At the time of this writing, there were 262 operations
-with 147 distinct name in Expression Integer.  For example, numer and
-denom extract the numerator and denominator of an expression.
-
-  e := (sin(x) - 4)**2 / ( 1 - 2*y*sqrt(- y) ) 
-
-  numer e 
-
-  denom e
-
-Use D to compute partial derivatives.
-
-  D(e, x) 
-
-  D(e, [x, y], [1, 2])
-
-When an expression involves no ``symbol kernels'' (for example, x), it
-may be possible to numerically evaluate the expression.
-
-If you suspect the evaluation will create a complex number, use 
-complexNumeric.
-
-  complexNumeric(cos(2 - 3*%i))
-
-If you know it will be real, use numeric.
-
-  numeric(tan 3.8)
-
-The numeric operation will display an error message if the evaluation
-yields a calue with an non-zero imaginary part.  Both of these
-operations have an optional second argument n which specifies that the
-accuracy of the approximation be up to n decimal places.
-
-When an expression involves no "symbolic application" kernels, it
-may be possible to convert it a polynomial or rational function in the
-variables that are present.
-
-  e2 := cos(x**2 - y + 3) 
-
-  e3 := asin(e2) - %pi/2
-
-  e3 :: Polynomial Integer
-
-This also works for the polynomial types where specific variables
-and their ordering are given.
-
-  e3 :: DMP([x, y], Integer) 
-
-Finally, a certain amount of simplication takes place as expressions
-are constructed.
-
-  sin %pi
-
-  cos(%pi / 4)
-
-For simplications that involve multiple terms of the expression, use
-simplify.
-
-  tan(x)**6 + 3*tan(x)**4 + 3*tan(x)**2 + 1 
-
-  simplify % 
-
-See Also:
-o )show Kernel
-o )show Expression
-o $AXIOM/doc/src/algebra/void.spad.dvi
-
-@
-<<domain EXPR Expression>>=
-)abbrev domain EXPR Expression
-++ Top-level mathematical expressions
-++ Author: Manuel Bronstein
-++ Date Created: 19 July 1988
-++ Date Last Updated: October 1993 (P.Gianni), February 1995 (MB)
-++ Description: Expressions involving symbolic functions.
-++ Keywords: operator, kernel, function.
-Expression(R:OrderedSet): Exports == Implementation where
-  Q   ==> Fraction Integer
-  K   ==> Kernel %
-  MP  ==> SparseMultivariatePolynomial(R, K)
-  AF  ==> AlgebraicFunction(R, %)
-  EF  ==> ElementaryFunction(R, %)
-  CF  ==> CombinatorialFunction(R, %)
-  LF  ==> LiouvillianFunction(R, %)
-  AN  ==> AlgebraicNumber
-  KAN ==> Kernel AN
-  FSF ==> FunctionalSpecialFunction(R, %)
-  ESD ==> ExpressionSpace_&(%)
-  FSD ==> FunctionSpace_&(%, R)
-  SYMBOL ==> "%symbol"
-  ALGOP  ==> "%alg"
-  POWER  ==> "%power"::Symbol
-  SUP    ==> SparseUnivariatePolynomial
-
-  Exports ==> FunctionSpace R with
-    if R has IntegralDomain then
-      AlgebraicallyClosedFunctionSpace R
-      TranscendentalFunctionCategory
-      CombinatorialOpsCategory
-      LiouvillianFunctionCategory
-      SpecialFunctionCategory
-      reduce: % -> %
-        ++ reduce(f) simplifies all the unreduced algebraic quantities
-        ++ present in f by applying their defining relations.
-      number?: % -> Boolean
-	++ number?(f) tests if f is rational
-      simplifyPower: (%,Integer) -> %
-	++ simplifyPower?(f,n) \undocumented{}
-      if R has GcdDomain then
-        factorPolynomial : SUP  % -> Factored SUP %
-	   ++ factorPolynomial(p) \undocumented{}
-        squareFreePolynomial : SUP % -> Factored SUP %
-	   ++ squareFreePolynomial(p) \undocumented{}
-      if R has RetractableTo Integer then RetractableTo AN
-
-  Implementation ==> add
-    import KernelFunctions2(R, %)
-
-    retNotUnit     : % -> R
-    retNotUnitIfCan: % -> Union(R, "failed")
-
-    belong? op == true
-
-    retNotUnit x ==
-      (u := constantIfCan(k := retract(x)@K)) case R => u::R
-      error "Not retractable"
-
-    retNotUnitIfCan x ==
-      (r := retractIfCan(x)@Union(K,"failed")) case "failed" => "failed"
-      constantIfCan(r::K)
-
-    if R has IntegralDomain then
-      reduc  : (%, List Kernel %) -> %
-      commonk   : (%, %) -> List K
-      commonk0  : (List K, List K) -> List K
-      toprat    : % -> %
-      algkernels: List K -> List K
-      evl       : (MP, K, SparseUnivariatePolynomial %) -> Fraction MP
-      evl0      : (MP, K) -> SparseUnivariatePolynomial Fraction MP
-
-      Rep := Fraction MP
-      0                == 0$Rep
-      1                == 1$Rep
---      one? x           == one?(x)$Rep
-      one? x           == (x = 1)$Rep
-      zero? x          == zero?(x)$Rep
-      - x:%            == -$Rep x
-      n:Integer * x:%  == n *$Rep x
-      coerce(n:Integer) ==  coerce(n)$Rep@Rep::%
-      x:% * y:%        == reduc(x *$Rep y, commonk(x, y))
-      x:% + y:%        == reduc(x +$Rep y, commonk(x, y))
-      (x:% - y:%):%    == reduc(x -$Rep y, commonk(x, y))
-      x:% / y:%        == reduc(x /$Rep y, commonk(x, y))
-
-      number?(x:%):Boolean ==
-        if R has RetractableTo(Integer) then
-          ground?(x) or ((retractIfCan(x)@Union(Q,"failed")) case Q)
-        else
-          ground?(x)
-
-      simplifyPower(x:%,n:Integer):% ==
-        k : List K := kernels x
-        is?(x,POWER) =>
-          -- Look for a power of a number in case we can do a simplification
-          args : List % := argument first k
-          not(#args = 2) => error "Too many arguments to **"
-          number?(args.1) =>
-             reduc((args.1) **$Rep n, algkernels kernels (args.1))**(args.2)
-          (first args)**(n*second(args))
-        reduc(x **$Rep n, algkernels k)
-
-      x:% ** n:NonNegativeInteger ==
-        n = 0 => 1$%
-        n = 1 => x
-        simplifyPower(numerator x,n pretend Integer) / simplifyPower(denominator x,n pretend Integer)
-
-      x:% ** n:Integer ==
-        n = 0 => 1$%
-        n = 1 => x
-        n = -1 => 1/x
-        simplifyPower(numerator x,n) / simplifyPower(denominator x,n)
-
-      x:% ** n:PositiveInteger == 
-        n = 1 => x
-        simplifyPower(numerator x,n pretend Integer) / simplifyPower(denominator x,n pretend Integer)
-
-      x:% < y:%        == x <$Rep y
-      x:% = y:%        == x =$Rep y
-      numer x          == numer(x)$Rep
-      denom x          == denom(x)$Rep
-      coerce(p:MP):%   == coerce(p)$Rep
-      reduce x         == reduc(x, algkernels kernels x)
-      commonk(x, y)    == commonk0(algkernels kernels x, algkernels kernels y)
-      algkernels l     == select_!(has?(operator #1, ALGOP), l)
-      toprat f == ratDenom(f, algkernels kernels f)$AlgebraicManipulations(R, %)
-
-      x:MP / y:MP ==
-        reduc(x /$Rep y,commonk0(algkernels variables x,algkernels variables y))
-
--- since we use the reduction from FRAC SMP which asssumes that the
--- variables are independent, we must remove algebraic from the denominators
-      reducedSystem(m:Matrix %):Matrix(R) ==
-        mm:Matrix(MP) := reducedSystem(map(toprat, m))$Rep
-        reducedSystem(mm)$MP
-
--- since we use the reduction from FRAC SMP which asssumes that the
--- variables are independent, we must remove algebraic from the denominators
-      reducedSystem(m:Matrix %, v:Vector %):
-       Record(mat:Matrix R, vec:Vector R) ==
-        r:Record(mat:Matrix MP, vec:Vector MP) :=
-          reducedSystem(map(toprat, m), map(toprat, v))$Rep
-        reducedSystem(r.mat, r.vec)$MP
-
--- The result MUST be left sorted deepest first   MB 3/90
-      commonk0(x, y) ==
-        ans := empty()$List(K)
-        for k in reverse_! x repeat if member?(k, y) then ans := concat(k, ans)
-        ans
-
-      rootOf(x:SparseUnivariatePolynomial %, v:Symbol) == rootOf(x,v)$AF
-      pi()                      == pi()$EF
-      exp x                     == exp(x)$EF
-      log x                     == log(x)$EF
-      sin x                     == sin(x)$EF
-      cos x                     == cos(x)$EF
-      tan x                     == tan(x)$EF
-      cot x                     == cot(x)$EF
-      sec x                     == sec(x)$EF
-      csc x                     == csc(x)$EF
-      asin x                    == asin(x)$EF
-      acos x                    == acos(x)$EF
-      atan x                    == atan(x)$EF
-      acot x                    == acot(x)$EF
-      asec x                    == asec(x)$EF
-      acsc x                    == acsc(x)$EF
-      sinh x                    == sinh(x)$EF
-      cosh x                    == cosh(x)$EF
-      tanh x                    == tanh(x)$EF
-      coth x                    == coth(x)$EF
-      sech x                    == sech(x)$EF
-      csch x                    == csch(x)$EF
-      asinh x                   == asinh(x)$EF
-      acosh x                   == acosh(x)$EF
-      atanh x                   == atanh(x)$EF
-      acoth x                   == acoth(x)$EF
-      asech x                   == asech(x)$EF
-      acsch x                   == acsch(x)$EF
-
-      abs x                     == abs(x)$FSF
-      Gamma x                   == Gamma(x)$FSF
-      Gamma(a, x)               == Gamma(a, x)$FSF
-      Beta(x,y)                 == Beta(x,y)$FSF
-      digamma x                 == digamma(x)$FSF
-      polygamma(k,x)            == polygamma(k,x)$FSF
-      besselJ(v,x)              == besselJ(v,x)$FSF
-      besselY(v,x)              == besselY(v,x)$FSF
-      besselI(v,x)              == besselI(v,x)$FSF
-      besselK(v,x)              == besselK(v,x)$FSF
-      airyAi x                  == airyAi(x)$FSF
-      airyBi x                  == airyBi(x)$FSF
-
-      x:% ** y:%                == x **$CF y
-      factorial x               == factorial(x)$CF
-      binomial(n, m)            == binomial(n, m)$CF
-      permutation(n, m)         == permutation(n, m)$CF
-      factorials x              == factorials(x)$CF
-      factorials(x, n)          == factorials(x, n)$CF
-      summation(x:%, n:Symbol)           == summation(x, n)$CF
-      summation(x:%, s:SegmentBinding %) == summation(x, s)$CF
-      product(x:%, n:Symbol)             == product(x, n)$CF
-      product(x:%, s:SegmentBinding %)   == product(x, s)$CF
-
-      erf x                              == erf(x)$LF
-      Ei x                               == Ei(x)$LF
-      Si x                               == Si(x)$LF
-      Ci x                               == Ci(x)$LF
-      li x                               == li(x)$LF
-      dilog x                            == dilog(x)$LF
-      integral(x:%, n:Symbol)            == integral(x, n)$LF
-      integral(x:%, s:SegmentBinding %)  == integral(x, s)$LF
-
-      operator op ==
-        belong?(op)$AF  => operator(op)$AF
-        belong?(op)$EF  => operator(op)$EF
-        belong?(op)$CF  => operator(op)$CF
-        belong?(op)$LF  => operator(op)$LF
-        belong?(op)$FSF => operator(op)$FSF
-        belong?(op)$FSD => operator(op)$FSD
-        belong?(op)$ESD => operator(op)$ESD
-        nullary? op and has?(op, SYMBOL) => operator(kernel(name op)$K)
-        (n := arity op) case "failed" => operator name op
-        operator(name op, n::NonNegativeInteger)
-
-      reduc(x, l) ==
-        for k in l repeat
-          p := minPoly k
-          x := evl(numer x, k, p) /$Rep evl(denom x, k, p)
-        x
-
-      evl0(p, k) ==
-        numer univariate(p::Fraction(MP),
-                     k)$PolynomialCategoryQuotientFunctions(IndexedExponents K,
-                                                            K,R,MP,Fraction MP)
-
-      -- uses some operations from Rep instead of % in order not to
-      -- reduce recursively during those operations.
-      evl(p, k, m) ==
-        degree(p, k) < degree m => p::Fraction(MP)
-        (((evl0(p, k) pretend SparseUnivariatePolynomial($)) rem m)
-           pretend SparseUnivariatePolynomial Fraction MP) (k::MP::Fraction(MP))
-
-      if R has GcdDomain then
-        noalg?: SUP % -> Boolean
-
-        noalg? p ==
-          while p ^= 0 repeat
-            not empty? algkernels kernels leadingCoefficient p => return false
-            p := reductum p
-          true
-
-        gcdPolynomial(p:SUP %, q:SUP %) ==
-          noalg? p and noalg? q => gcdPolynomial(p, q)$Rep
-          gcdPolynomial(p, q)$GcdDomain_&(%)
-
-        factorPolynomial(x:SUP %) : Factored SUP % ==
-          uf:= factor(x pretend SUP(Rep))$SupFractionFactorizer(
-                                          IndexedExponents K,K,R,MP)
-          uf pretend Factored SUP %
-
-        squareFreePolynomial(x:SUP %) : Factored SUP % ==
-          uf:= squareFree(x pretend SUP(Rep))$SupFractionFactorizer(
-                                          IndexedExponents K,K,R,MP)
-          uf pretend Factored SUP %
-
-      if R is AN then
-        -- this is to force the coercion R -> EXPR R to be used
-        -- instead of the coercioon AN -> EXPR R which loops.
-        -- simpler looking code will fail! MB 10/91
-        coerce(x:AN):% == (monomial(x, 0$IndexedExponents(K))$MP)::%
-
-      if (R has RetractableTo Integer) then
-        x:% ** r:Q                           == x **$AF r
-        minPoly k                            == minPoly(k)$AF
-        definingPolynomial x                 == definingPolynomial(x)$AF
-        retract(x:%):Q                       == retract(x)$Rep
-        retractIfCan(x:%):Union(Q, "failed") == retractIfCan(x)$Rep
-
-        if not(R is AN) then
-          k2expr  : KAN -> %
-          smp2expr: SparseMultivariatePolynomial(Integer, KAN) -> %
-          R2AN    : R  -> Union(AN, "failed")
-          k2an    : K  -> Union(AN, "failed")
-          smp2an  : MP -> Union(AN, "failed")
-
-
-          coerce(x:AN):% == smp2expr(numer x) / smp2expr(denom x)
-          k2expr k       == map(#1::%, k)$ExpressionSpaceFunctions2(AN, %)
-
-          smp2expr p ==
-            map(k2expr,#1::%,p)$PolynomialCategoryLifting(IndexedExponents KAN,
-                   KAN, Integer, SparseMultivariatePolynomial(Integer, KAN), %)
-
-          retractIfCan(x:%):Union(AN, "failed") ==
-            ((n:= smp2an numer x) case AN) and ((d:= smp2an denom x) case AN)
-                 => (n::AN) / (d::AN)
-            "failed"
-
-          R2AN r ==
-            (u := retractIfCan(r::%)@Union(Q, "failed")) case Q => u::Q::AN
-            "failed"
-
-          k2an k ==
-            not(belong?(op := operator k)$AN) => "failed"
-            arg:List(AN) := empty()
-            for x in argument k repeat
-              if (a := retractIfCan(x)@Union(AN, "failed")) case "failed" then
-                return "failed"
-              else arg := concat(a::AN, arg)
-            (operator(op)$AN) reverse_!(arg)
-
-          smp2an p ==
-            (x1 := mainVariable p) case "failed" => R2AN leadingCoefficient p
-            up := univariate(p, k := x1::K)
-            (t  := k2an k) case "failed" => "failed"
-            ans:AN := 0
-            while not ground? up repeat
-              (c:=smp2an leadingCoefficient up) case "failed" => return "failed"
-              ans := ans + (c::AN) * (t::AN) ** (degree up)
-              up  := reductum up
-            (c := smp2an leadingCoefficient up) case "failed" => "failed"
-            ans + c::AN
-
-      if R has ConvertibleTo InputForm then
-        convert(x:%):InputForm == convert(x)$Rep
-        import MakeUnaryCompiledFunction(%, %, %)
-        eval(f:%, op: BasicOperator, g:%, x:Symbol):% == 
-          eval(f,[op],[g],x)
-        eval(f:%, ls:List BasicOperator, lg:List %, x:Symbol) ==
-	  -- handle subsrcipted symbols by renaming -> eval -> renaming back
-          llsym:List List Symbol:=[variables g for g in lg]
-          lsym:List Symbol:= removeDuplicates concat llsym
-          lsd:List Symbol:=select (scripted?,lsym)
-          empty? lsd=> eval(f,ls,[compiledFunction(g, x) for g in lg])
-          ns:List Symbol:=[new()$Symbol for i in lsd]
-          lforwardSubs:List Equation % := [(i::%)= (j::%) for i in lsd for j in ns]
-          lbackwardSubs:List Equation % := [(j::%)= (i::%) for i in lsd for j in ns]
-          nlg:List % :=[subst(g,lforwardSubs) for g in lg]
-          res:% :=eval(f, ls, [compiledFunction(g, x) for g in nlg])
-          subst(res,lbackwardSubs)
-      if R has PatternMatchable Integer then
-        patternMatch(x:%, p:Pattern Integer,
-         l:PatternMatchResult(Integer, %)) ==
-          patternMatch(x, p, l)$PatternMatchFunctionSpace(Integer, R, %)
-
-      if R has PatternMatchable Float then
-        patternMatch(x:%, p:Pattern Float,
-         l:PatternMatchResult(Float, %)) ==
-          patternMatch(x, p, l)$PatternMatchFunctionSpace(Float, R, %)
-
-    else  -- R is not an integral domain
-      operator op ==
-        belong?(op)$FSD => operator(op)$FSD
-        belong?(op)$ESD => operator(op)$ESD
-        nullary? op and has?(op, SYMBOL) => operator(kernel(name op)$K)
-        (n := arity op) case "failed" => operator name op
-        operator(name op, n::NonNegativeInteger)
-
-      if R has Ring then
-        Rep := MP
-        0              == 0$Rep
-        1              == 1$Rep
-        - x:%          == -$Rep x
-        n:Integer *x:% == n *$Rep x
-        x:% * y:%      == x *$Rep y
-        x:% + y:%      == x +$Rep y
-        x:% = y:%      == x =$Rep y
-        x:% < y:%      == x <$Rep y
-        numer x        == x@Rep
-        coerce(p:MP):% == p
-
-        reducedSystem(m:Matrix %):Matrix(R) ==
-          reducedSystem(m)$Rep
-
-        reducedSystem(m:Matrix %, v:Vector %):
-         Record(mat:Matrix R, vec:Vector R) ==
-          reducedSystem(m, v)$Rep
-
-        if R has ConvertibleTo InputForm then
-          convert(x:%):InputForm == convert(x)$Rep
-
-        if R has PatternMatchable Integer then
-          kintmatch: (K,Pattern Integer,PatternMatchResult(Integer,Rep))
-                                     -> PatternMatchResult(Integer, Rep)
-
-          kintmatch(k, p, l) ==
-            patternMatch(k, p, l pretend PatternMatchResult(Integer, %)
-              )$PatternMatchKernel(Integer, %)
-                pretend PatternMatchResult(Integer, Rep)
-
-          patternMatch(x:%, p:Pattern Integer,
-           l:PatternMatchResult(Integer, %)) ==
-            patternMatch(x@Rep, p,
-                         l pretend PatternMatchResult(Integer, Rep),
-                          kintmatch
-                           )$PatternMatchPolynomialCategory(Integer,
-                            IndexedExponents K, K, R, Rep)
-                              pretend PatternMatchResult(Integer, %)
-
-        if R has PatternMatchable Float then
-          kfltmatch: (K, Pattern Float, PatternMatchResult(Float, Rep))
-                                     -> PatternMatchResult(Float, Rep)
-
-          kfltmatch(k, p, l) ==
-            patternMatch(k, p, l pretend PatternMatchResult(Float, %)
-              )$PatternMatchKernel(Float, %)
-                pretend PatternMatchResult(Float, Rep)
-
-          patternMatch(x:%, p:Pattern Float,
-           l:PatternMatchResult(Float, %)) ==
-            patternMatch(x@Rep, p,
-                         l pretend PatternMatchResult(Float, Rep),
-                          kfltmatch
-                           )$PatternMatchPolynomialCategory(Float,
-                            IndexedExponents K, K, R, Rep)
-                              pretend PatternMatchResult(Float, %)
-
-      else   -- R is not even a ring
-        if R has AbelianMonoid then
-          import ListToMap(K, %)
-
-          kereval        : (K, List K, List %) -> %
-          subeval        : (K, List K, List %) -> %
-
-          Rep := FreeAbelianGroup K
-
-          0              == 0$Rep
-          x:% + y:%      == x +$Rep y
-          x:% = y:%      == x =$Rep y
-          x:% < y:%      == x <$Rep y
-          coerce(k:K):%  == coerce(k)$Rep
-          kernels x      == [f.gen for f in terms x]
-          coerce(x:R):%  == (zero? x => 0; constantKernel(x)::%)
-          retract(x:%):R == (zero? x => 0; retNotUnit x)
-          coerce(x:%):OutputForm == coerce(x)$Rep
-          kereval(k, lk, lv) == match(lk, lv, k, map(eval(#1, lk, lv), #1))
-
-          subeval(k, lk, lv) ==
-            match(lk, lv, k,
-              kernel(operator #1, [subst(a, lk, lv) for a in argument #1]))
-
-          isPlus x ==
-            empty?(l := terms x) or empty? rest l => "failed"
-            [t.exp *$Rep t.gen for t in l]$List(%)
-
-          isMult x ==
-            empty?(l := terms x) or not empty? rest l => "failed"
-            t := first l
-            [t.exp, t.gen]
-
-          eval(x:%, lk:List K, lv:List %) ==
-            _+/[t.exp * kereval(t.gen, lk, lv) for t in terms x]
-
-          subst(x:%, lk:List K, lv:List %) ==
-            _+/[t.exp * subeval(t.gen, lk, lv) for t in terms x]
-
-          retractIfCan(x:%):Union(R, "failed") ==
-            zero? x => 0
-            retNotUnitIfCan x
-
-          if R has AbelianGroup then -(x:%) == -$Rep x
-
---      else      -- R is not an AbelianMonoid
---        if R has SemiGroup then
---    Rep := FreeGroup K
---    1              == 1$Rep
---    x:% * y:%      == x *$Rep y
---    x:% = y:%      == x =$Rep y
---    coerce(k:K):%  == k::Rep
---    kernels x      == [f.gen for f in factors x]
---    coerce(x:R):%  == (one? x => 1; constantKernel x)
---    retract(x:%):R == (one? x => 1; retNotUnit x)
---    coerce(x:%):OutputForm == coerce(x)$Rep
-
---    retractIfCan(x:%):Union(R, "failed") ==
---      one? x => 1
---      retNotUnitIfCan x
-
---    if R has Group then inv(x:%):% == inv(x)$Rep
-
-        else   -- R is nothing
-            import ListToMap(K, %)
-
-            Rep := K
-
-            x:% < y:%      == x <$Rep y
-            x:% = y:%      == x =$Rep y
-            coerce(k:K):%  == k
-            kernels x      == [x pretend K]
-            coerce(x:R):%  == constantKernel x
-            retract(x:%):R == retNotUnit x
-            retractIfCan(x:%):Union(R, "failed") == retNotUnitIfCan x
-            coerce(x:%):OutputForm               == coerce(x)$Rep
-
-            eval(x:%, lk:List K, lv:List %) ==
-              match(lk, lv, x pretend K, map(eval(#1, lk, lv), #1))
-
-            subst(x, lk, lv) ==
-              match(lk, lv, x pretend K,
-                kernel(operator #1, [subst(a, lk, lv) for a in argument #1]))
-
-            if R has ConvertibleTo InputForm then
-              convert(x:%):InputForm == convert(x)$Rep
-
---          if R has PatternMatchable Integer then
---            convert(x:%):Pattern(Integer) == convert(x)$Rep
---
---            patternMatch(x:%, p:Pattern Integer,
---             l:PatternMatchResult(Integer, %)) ==
---              patternMatch(x pretend K,p,l)$PatternMatchKernel(Integer, %)
---
---          if R has PatternMatchable Float then
---            convert(x:%):Pattern(Float) == convert(x)$Rep
---
---            patternMatch(x:%, p:Pattern Float,
---             l:PatternMatchResult(Float, %)) ==
---              patternMatch(x pretend K, p, l)$PatternMatchKernel(Float, %)
-
-@
 \section{package PAN2EXPR PolynomialAN2Expression}
 <<package PAN2EXPR PolynomialAN2Expression>>=
 )abbrev package PAN2EXPR PolynomialAN2Expression
@@ -1142,71 +246,6 @@ PatternMatchAssertions(): Exports == Implementation where
     assert(x, s) == assert(x::FE, s)
 
 @
-\section{domain HACKPI Pi}
-<<domain HACKPI Pi>>=
-)abbrev domain HACKPI Pi
-++ Expressions in %pi only
-++ Author: Manuel Bronstein
-++ Description:
-++  Symbolic fractions in %pi with integer coefficients;
-++  The point for using Pi as the default domain for those fractions
-++  is that Pi is coercible to the float types, and not Expression.
-++ Date Created: 21 Feb 1990
-++ Date Last Updated: 12 Mai 1992
-Pi(): Exports == Implementation where
-  PZ ==> Polynomial Integer
-  UP ==> SparseUnivariatePolynomial Integer
-  RF ==> Fraction UP
-
-  Exports ==> Join(Field, CharacteristicZero, RetractableTo Integer,
-                   RetractableTo Fraction Integer, RealConstant,
-                   CoercibleTo DoubleFloat, CoercibleTo Float,
-                   ConvertibleTo RF, ConvertibleTo InputForm) with
-    pi: () -> % ++ pi() returns the symbolic %pi.
-  Implementation ==> RF add
-    Rep := RF
-
-    sympi := "%pi"::Symbol
-
-    p2sf: UP -> DoubleFloat
-    p2f : UP -> Float
-    p2o : UP -> OutputForm
-    p2i : UP -> InputForm
-    p2p:  UP -> PZ
-
-    pi()                    == (monomial(1, 1)$UP :: RF) pretend %
-    convert(x:%):RF         == x pretend RF
-    convert(x:%):Float      == x::Float
-    convert(x:%):DoubleFloat == x::DoubleFloat
-    coerce(x:%):DoubleFloat  == p2sf(numer x) / p2sf(denom x)
-    coerce(x:%):Float       == p2f(numer x) / p2f(denom x)
-    p2o p                   == outputForm(p, sympi::OutputForm)
-    p2i p                   == convert p2p p
-
-    p2p p ==
-      ans:PZ := 0
-      while p ^= 0 repeat
-        ans := ans + monomial(leadingCoefficient(p)::PZ, sympi, degree p)
-        p   := reductum p
-      ans
-
-    coerce(x:%):OutputForm ==
-      (r := retractIfCan(x)@Union(UP, "failed")) case UP => p2o(r::UP)
-      p2o(numer x) / p2o(denom x)
-
-    convert(x:%):InputForm ==
-      (r := retractIfCan(x)@Union(UP, "failed")) case UP => p2i(r::UP)
-      p2i(numer x) / p2i(denom x)
-
-    p2sf p ==
-      map(#1::DoubleFloat, p)$SparseUnivariatePolynomialFunctions2(
-        Integer, DoubleFloat) (pi()$DoubleFloat)
-
-    p2f p ==
-      map(#1::Float, p)$SparseUnivariatePolynomialFunctions2(
-        Integer, Float) (pi()$Float)
-
-@
 \section{package PICOERCE PiCoercions}
 <<package PICOERCE PiCoercions>>=
 )abbrev package PICOERCE PiCoercions
@@ -1273,14 +312,12 @@ PiCoercions(R:Join(OrderedSet, IntegralDomain)): with
 --
 --   op  kl  fspace  algfunc elemntry combfunc EXPR
 
-<<domain EXPR Expression>>
 <<package PAN2EXPR PolynomialAN2Expression>>
 <<package EXPR2 ExpressionFunctions2>>
 <<package PMPREDFS FunctionSpaceAttachPredicates>>
 <<package PMASSFS FunctionSpaceAssertions>>
 <<package PMPRED AttachPredicates>>
 <<package PMASS PatternMatchAssertions>>
-<<domain HACKPI Pi>>
 <<package PICOERCE PiCoercions>>
 @
 \eject
diff --git a/src/algebra/fparfrac.spad.pamphlet b/src/algebra/fparfrac.spad.pamphlet
index 09b6ba3..a5ad5b3 100644
--- a/src/algebra/fparfrac.spad.pamphlet
+++ b/src/algebra/fparfrac.spad.pamphlet
@@ -513,7 +513,7 @@ FullPartialFractionExpansion(F, UP): Exports == Implementation where
       ++ p + x returns the sum of p and x
     fullPartialFraction: RF -> $
       ++ fullPartialFraction(f) returns \spad{[p, [[j, Dj, Hj]...]]} such that
-      ++ \spad{f = p(x) + \sum_{[j,Dj,Hj] in l} \sum_{Dj(a)=0} Hj(a)/(x - a)\^j}.
+      ++ \spad{f = p(x) + sum_{[j,Dj,Hj] in l} sum_{Dj(a)=0} Hj(a)/(x - a)\^j}.
     polyPart:            $ -> UP
       ++ polyPart(f) returns the polynomial part of f.
     fracPart:            $  -> List REC
diff --git a/src/algebra/omserver.spad.pamphlet b/src/algebra/omserver.spad.pamphlet
index a6872f1..de74896 100644
--- a/src/algebra/omserver.spad.pamphlet
+++ b/src/algebra/omserver.spad.pamphlet
@@ -32,7 +32,7 @@ OpenMathServerPackage(): with
   ++ OMreceive(c) reads an OpenMath object from connection \axiom{c} and
   ++ returns the appropriate AXIOM object.
   OMsend    : (OpenMathConnection, Any) -> Void
-  ++ OMsend(c,u) attempts to output \axiom{u} on \aciom{c} in OpenMath.
+  ++ OMsend(c,u) attempts to output \axiom{u} on \axiom{c} in OpenMath.
   OMserve   : (SingleInteger, SingleInteger) -> Void
   ++ OMserve(portnum,timeout) puts AXIOM into server mode on port number
   ++ \axiom{portnum}.  The parameter \axiom{timeout} specifies the timeout
diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html
index 6c4c33a..ad638c8 100644
--- a/src/axiom-website/patches.html
+++ b/src/axiom-website/patches.html
@@ -767,6 +767,8 @@ website -- add videos page<br/>
 bookvol10.3 add domains<br/>
 <a href="patches/20081201.02.tpd.patch">20081201.02.tpd.patch</a>
 add missing files<br/>
+<a href="patches/20081201.03.tpd.patch">20081201.03.tpd.patch</a>
+bookvol10.3 add domains<br/>
 
  </body>
 </html>
\ No newline at end of file
diff --git a/src/interp/setq.lisp.pamphlet b/src/interp/setq.lisp.pamphlet
index 5777487..4073795 100644
--- a/src/interp/setq.lisp.pamphlet
+++ b/src/interp/setq.lisp.pamphlet
@@ -620,8 +620,8 @@
 "Steve Hague            Satoshi Hamaguchi      Mike Hansen"
 "Richard Harke          Vilya Harvey           Martin Hassner"
 "Arthur S. Hathaway     Dan Hatton             Waldek Hebisch"
-"Ralf Hemmecke          Henderson              Antoine Hersen"
-"Gernot Hueber"
+"Karl Hegbloom          Ralf Hemmecke          Henderson"
+"Antoine Hersen         Gernot Hueber"
 "Pietro Iglio"
 "Alejandro Jakubi       Richard Jenks"
 "Kai Kaminski           Grant Keady            Tony Kennedy"
