diff --git a/books/bookvol10.4.pamphlet b/books/bookvol10.4.pamphlet
index d659141..6079fb9 100644
--- a/books/bookvol10.4.pamphlet
+++ b/books/bookvol10.4.pamphlet
@@ -9367,6 +9367,88 @@ CycleIndicators: Exports == Implementation where
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package CSTTOOLS CyclicStreamTools}
+\pagehead{CyclicStreamTools}{CSTTOOLS}
+\pagepic{ps/v104cyclicstreamtools.ps}{CSTTOOLS}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package CSTTOOLS CyclicStreamTools>>=
+)abbrev package CSTTOOLS CyclicStreamTools
+++ Functions for dealing with cyclic streams
+++ Author: Clifton J. Williamson
+++ Date Created: 5 December 1989
+++ Date Last Updated: 5 December 1989
+++ Keywords: stream, cyclic
+++ Description:
+++ This package provides tools for working with cyclic streams.
+CyclicStreamTools(S,ST): Exports == Implementation where
+  S  : Type
+  ST : LazyStreamAggregate S
+
+  Exports ==> with
+
+    cycleElt: ST -> Union(ST,"failed")
+      ++ cycleElt(s) returns a pointer to a node in the cycle if the stream 
+      ++ s is cyclic and returns "failed" if s is not cyclic
+      ++
+      ++X p:=repeating([1,2,3])
+      ++X q:=cons(4,p)
+      ++X cycleElt q
+      ++X r:=[1,2,3]::Stream(Integer)
+      ++X cycleElt r
+
+    computeCycleLength: ST -> NonNegativeInteger
+      ++ computeCycleLength(s) returns the length of the cycle of a
+      ++ cyclic stream t, where s is a pointer to a node in the
+      ++ cyclic part of t.
+      ++
+      ++X p:=repeating([1,2,3])
+      ++X q:=cons(4,p)
+      ++X computeCycleLength(cycleElt(q))
+
+    computeCycleEntry: (ST,ST) -> ST
+      ++ computeCycleEntry(x,cycElt), where cycElt is a pointer to a
+      ++ node in the cyclic part of the cyclic stream x, returns a
+      ++ pointer to the first node in the cycle
+      ++
+      ++X p:=repeating([1,2,3])
+      ++X q:=cons(4,p)
+      ++X computeCycleEntry(q,cycleElt(q))
+
+  Implementation ==> add
+
+    cycleElt x ==
+      y := x
+      for i in 0.. repeat
+        (explicitlyEmpty? y) or (lazy? y) => return "failed"
+        y := rst y
+        if odd? i then x := rst x
+        eq?(x,y) => return y
+
+    computeCycleLength cycElt ==
+      i : NonNegativeInteger
+      y := cycElt
+      for i in 1.. repeat
+        y := rst y
+        eq?(y,cycElt) => return i
+
+    computeCycleEntry(x,cycElt) ==
+      y := rest(x, computeCycleLength cycElt)
+      repeat
+        eq?(x,y) => return x
+        x := rst x ; y := rst y
+
+@
+<<CSTTOOLS.dotabb>>=
+"CSTTOOLS" [color="#FF4488",href="bookvol10.4.pdf#nameddest=CSTTOOLS"]
+"LZSTAGG" [color="#4488FF",href="bookvol10.2.pdf#nameddest=LZSTAGG"]
+"CSTTOOLS" -> "LZSTAGG"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{package CYCLOTOM CyclotomicPolynomialPackage}
 \pagehead{CyclotomicPolynomialPackage}{CYCLOTOM}
 \pagepic{ps/v104cyclotomicpolynomialpackage.ps}{CYCLOTOM}{1.00}
@@ -9763,6 +9845,198 @@ DegreeReductionPackage(R1, R2): Cat == Capsule where
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package DIOSP DiophantineSolutionPackage}
+\pagehead{DiophantineSolutionPackage}{DIOSP}
+\pagepic{ps/v104diophantinesolutionpackage.ps}{DIOSP}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package DIOSP DiophantineSolutionPackage>>=
+)abbrev package DIOSP DiophantineSolutionPackage
+++ Author: A. Fortenbacher
+++ Date Created: 29 March 1991
+++ Date Last Updated: 29 March 1991
+++ Basic Operations: dioSolve
+++ Related Constructors: Equation, Vector
+++ Also See:
+++ AMS Classifications:
+++ Keywords: Diophantine equation, nonnegative solutions,
+++   basis, depth-first-search
+++ Reference:
+++   M. Clausen, A. Fortenbacher: Efficient Solution of
+++   Linear Diophantine Equations. in JSC (1989) 8, 201-216
+++ Description:
+++   any solution of a homogeneous linear Diophantine equation
+++   can be represented as a sum of minimal solutions, which
+++   form a "basis" (a minimal solution cannot be represented
+++   as a nontrivial sum of solutions)
+++   in the case of an inhomogeneous linear Diophantine equation,
+++   each solution is the sum of a inhomogeneous solution and
+++   any number of homogeneous solutions
+++   therefore, it suffices to compute two sets:
+++      1. all minimal inhomogeneous solutions
+++      2. all minimal homogeneous solutions
+++   the algorithm implemented is a completion procedure, which
+++   enumerates all solutions in a recursive depth-first-search
+++   it can be seen as finding monotone paths in a graph
+++   for more details see Reference
+ 
+DiophantineSolutionPackage(): Cat == Capsule where
+ 
+  B ==> Boolean
+  I ==> Integer
+  NI ==> NonNegativeInteger
+ 
+  LI ==> List(I)
+  VI ==> Vector(I)
+  VNI ==> Vector(NI)
+ 
+  POLI ==> Polynomial(I)
+  EPOLI ==> Equation(POLI)
+  LPOLI ==> List(POLI)
+ 
+  S ==> Symbol
+  LS ==> List(S)
+ 
+  ListSol ==> List(VNI)
+  Solutions ==> Record(varOrder: LS, inhom: Union(ListSol,"failed"),
+                       hom: ListSol)
+ 
+  Node ==> Record(vert: VI, free: B)
+  Graph ==> Record(vn: Vector(Node), dim : NI, zeroNode: I)
+ 
+  Cat ==> with
+ 
+    dioSolve: EPOLI -> Solutions
+      ++ dioSolve(u) computes a basis of all minimal solutions for 
+      ++ linear homogeneous Diophantine equation u,
+      ++ then all minimal solutions of inhomogeneous equation
+ 
+  Capsule ==> add
+ 
+    import I
+    import POLI
+ 
+    -- local function specifications
+ 
+    initializeGraph: (LPOLI, I) -> Graph
+    createNode: (I, VI, NI, I) -> Node
+    findSolutions: (VNI, I, I, I, Graph, B) -> ListSol
+    verifyMinimality: (VNI, Graph, B) -> B
+    verifySolution: (VNI, I, I, I, Graph) -> B
+ 
+    -- exported functions
+ 
+    dioSolve(eq) ==
+      p := lhs(eq) - rhs(eq)
+      n := totalDegree(p)
+      n = 0 or n > 1 =>
+        error "a linear Diophantine equation is expected"
+      mon := empty()$LPOLI
+      c : I := 0
+      for x in monomials(p) repeat
+        ground?(x) =>
+          c := ground(x) :: I
+        mon := cons(x, mon)$LPOLI
+      graph := initializeGraph(mon, c)
+      sol := zero(graph.dim)$VNI
+      hs := findSolutions(sol, graph.zeroNode, 1, 1, graph, true)
+      ihs : ListSol :=
+        c = 0 => [sol]
+        findSolutions(sol, graph.zeroNode + c, 1, 1, graph, false)
+      vars := [first(variables(x))$LS for x in mon]
+      [vars, if empty?(ihs)$ListSol then "failed" else ihs, hs]
+ 
+    -- local functions
+ 
+    initializeGraph(mon, c) ==
+      coeffs := vector([first(coefficients(x))$LI for x in mon])$VI
+      k := #coeffs
+      m := min(c, reduce(min, coeffs)$VI)
+      n := max(c, reduce(max, coeffs)$VI)
+      [[createNode(i, coeffs, k, 1 - m) for i in m..n], k, 1 - m]
+ 
+    createNode(ind, coeffs, k, zeroNode) ==
+      -- create vertices from node ind to other nodes
+      v := zero(k)$VI
+      for i in 1..k repeat
+        ind > 0 =>
+          coeffs.i < 0 =>
+            v.i := zeroNode + ind + coeffs.i
+        coeffs.i > 0 =>
+          v.i := zeroNode + ind + coeffs.i
+      [v, true]
+ 
+    findSolutions(sol, ind, m, n, graph, flag) ==
+      -- return all solutions (paths) from node ind to node zeroNode
+      sols := empty()$ListSol
+      node := graph.vn.ind
+      node.free =>
+        node.free := false
+        v := node.vert
+        k := if ind < graph.zeroNode then m else n
+        for i in k..graph.dim repeat
+          x := sol.i
+          v.i > 0 =>  -- vertex exists to other node
+            sol.i := x + 1
+            v.i = graph.zeroNode =>  -- solution found
+              verifyMinimality(sol, graph, flag) =>
+                sols := cons(copy(sol)$VNI, sols)$ListSol
+                sol.i := x
+              sol.i := x
+            s :=
+              ind < graph.zeroNode =>
+                findSolutions(sol, v.i, i, n, graph, flag)
+              findSolutions(sol, v.i, m, i, graph, flag)
+            sols := append(s, sols)$ListSol
+            sol.i := x
+        node.free := true
+        sols
+      sols
+ 
+    verifyMinimality(sol, graph, flag) ==
+      -- test whether sol contains a minimal homogeneous solution
+      flag =>  -- sol is a homogeneous solution
+        i := 1
+        while sol.i = 0 repeat
+          i := i + 1
+        x := sol.i
+        sol.i := (x - 1) :: NI
+        flag := verifySolution(sol, graph.zeroNode, 1, 1, graph)
+        sol.i := x
+        flag
+      verifySolution(sol, graph.zeroNode, 1, 1, graph)
+ 
+    verifySolution(sol, ind, m, n, graph) ==
+      -- test whether sol contains a path from ind to zeroNode
+      flag := true
+      node := graph.vn.ind
+      v := node.vert
+      k := if ind < graph.zeroNode then m else n
+      for i in k..graph.dim while flag repeat
+        x := sol.i
+        x > 0 and v.i > 0 =>  -- vertex exists to other node
+          sol.i := (x - 1) :: NI
+          v.i = graph.zeroNode =>  -- solution found
+            flag := false
+            sol.i := x
+          flag :=
+            ind < graph.zeroNode =>
+              verifySolution(sol, v.i, i, n, graph)
+            verifySolution(sol, v.i, m, i, graph)
+          sol.i := x
+      flag
+
+@
+<<DIOSP.dotabb>>=
+"DIOSP" [color="#FF4488",href="bookvol10.4.pdf#nameddest=DIOSP"]
+"IVECTOR" [color="#88FF44",href="bookvol10.3.pdf#nameddest=IVECTOR"]
+"DIOSP" -> "IVECTOR"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{package DLP DiscreteLogarithmPackage}
 \pagehead{DiscreteLogarithmPackage}{DLP}
 \pagepic{ps/v104discretelogarithmpackage.ps}{DLP}{1.00}
@@ -10258,6 +10532,2128 @@ DistinctDegreeFactorize(F,FP): C == T
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package DFSFUN DoubleFloatSpecialFunctions}
+\pagehead{DoubleFloatSpecialFunctions}{DFSFUN}
+\pagepic{ps/v104doublefloatspecialfunctions.ps}{DFSFUN}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package DFSFUN DoubleFloatSpecialFunctions>>=
+)abbrev package DFSFUN DoubleFloatSpecialFunctions
+++ Author: Bruce W. Char, Timothy Daly, Stephen M. Watt
+++ Date Created:  1990
+++ Date Last Updated: Jan 19, 2008
+++ Basic Operations:
+++ Related Domains:
+++ Also See:
+++ AMS Classifications:
+++ Keywords:
+++ Examples:
+++ References:
+++ Description:
+++   This package provides special functions for double precision
+++   real and complex floating point.
+
+DoubleFloatSpecialFunctions(): Exports == Impl where
+    NNI ==> NonNegativeInteger
+    PI  ==> Integer
+    R   ==> DoubleFloat
+    C   ==> Complex DoubleFloat
+    OPR ==> OnePointCompletion R
+
+    Exports ==> with
+        Gamma: R -> R
+         ++ Gamma(x) is the Euler gamma function, \spad{Gamma(x)}, defined by
+         ++   \spad{Gamma(x) = integrate(t^(x-1)*exp(-t), t=0..%infinity)}.
+        Gamma: C -> C
+         ++ Gamma(x) is the Euler gamma function, \spad{Gamma(x)}, defined by
+         ++   \spad{Gamma(x) = integrate(t^(x-1)*exp(-t), t=0..%infinity)}.
+
+        E1: R -> OPR
+	 ++ E1(x) is the Exponential Integral function
+         ++ The current implementation is a piecewise approximation
+         ++ involving one poly from -4..4 and a second poly for x > 4
+
+        En: (PI,R) -> OPR
+         ++ En(n,x) is the nth Exponential Integral Function
+
+        Ei: (OPR) -> OPR
+         ++ Ei is the Exponential Integral function
+         ++ This is computed using a 6 part piecewise approximation.
+         ++ DoubleFloat can only preserve about 16 digits but the
+         ++ Chebyshev approximation used can give 30 digits.
+
+        Ei1: (OPR) -> OPR
+         ++ Ei1 is the first approximation of Ei where the result is
+         ++ x*%e^-x*Ei(x) from -infinity to -10 (preserves digits)
+
+        Ei2: (OPR) -> OPR
+         ++ Ei2 is the first approximation of Ei where the result is
+         ++ x*%e^-x*Ei(x) from -10 to -4 (preserves digits)
+
+        Ei3: (OPR) -> OPR
+         ++ Ei3 is the first approximation of Ei where the result is
+         ++ (Ei(x)-log |x| - gamma)/x from -4 to 4 (preserves digits)
+
+        Ei4: (OPR) -> OPR
+         ++ Ei4 is the first approximation of Ei where the result is
+         ++ x*%e^-x*Ei(x) from 4 to 12 (preserves digits)
+
+        Ei5: (OPR) -> OPR
+         ++ Ei5 is the first approximation of Ei where the result is
+         ++ x*%e^-x*Ei(x) from 12 to 32 (preserves digits)
+
+        Ei6: (OPR) -> OPR
+         ++ Ei6 is the first approximation of Ei where the result is
+         ++ x*%e^-x*Ei(x) from 32 to infinity (preserves digits)
+
+        Beta: (R, R) -> R
+         ++ Beta(x, y) is the Euler beta function, \spad{B(x,y)}, defined by
+         ++   \spad{Beta(x,y) = integrate(t^(x-1)*(1-t)^(y-1), t=0..1)}.
+         ++ This is related to \spad{Gamma(x)} by
+         ++   \spad{Beta(x,y) = Gamma(x)*Gamma(y) / Gamma(x + y)}.
+        Beta: (C, C) -> C
+         ++ Beta(x, y) is the Euler beta function, \spad{B(x,y)}, defined by
+         ++   \spad{Beta(x,y) = integrate(t^(x-1)*(1-t)^(y-1), t=0..1)}.
+         ++ This is related to \spad{Gamma(x)} by
+         ++   \spad{Beta(x,y) = Gamma(x)*Gamma(y) / Gamma(x + y)}.
+
+        logGamma: R -> R
+         ++ logGamma(x) is the natural log of \spad{Gamma(x)}.
+         ++ This can often be computed even if \spad{Gamma(x)} cannot.
+        logGamma: C -> C
+         ++ logGamma(x) is the natural log of \spad{Gamma(x)}.
+         ++ This can often be computed even if \spad{Gamma(x)} cannot.
+
+        digamma: R -> R
+         ++ digamma(x) is the function, \spad{psi(x)}, defined by
+         ++   \spad{psi(x) = Gamma'(x)/Gamma(x)}.
+        digamma: C -> C
+         ++ digamma(x) is the function, \spad{psi(x)}, defined by
+         ++   \spad{psi(x) = Gamma'(x)/Gamma(x)}.
+
+        polygamma: (NNI, R) -> R
+         ++ polygamma(n, x) is the n-th derivative of \spad{digamma(x)}.
+        polygamma: (NNI, C) -> C
+         ++ polygamma(n, x) is the n-th derivative of \spad{digamma(x)}.
+
+        besselJ: (R,R) -> R
+         ++ besselJ(v,x) is the Bessel function of the first kind,
+         ++ \spad{J(v,x)}.
+         ++ This function satisfies the differential equation:
+         ++   \spad{x^2 w''(x) + x w'(x) + (x^2-v^2)w(x) = 0}.
+        besselJ: (C,C) -> C
+         ++ besselJ(v,x) is the Bessel function of the first kind,
+         ++ \spad{J(v,x)}.
+         ++ This function satisfies the differential equation:
+         ++   \spad{x^2 w''(x) + x w'(x) + (x^2-v^2)w(x) = 0}.
+
+        besselY: (R, R) -> R
+         ++ besselY(v,x) is the Bessel function of the second kind,
+         ++ \spad{Y(v,x)}.
+         ++ This function satisfies the differential equation:
+         ++   \spad{x^2 w''(x) + x w'(x) + (x^2-v^2)w(x) = 0}.
+         ++ Note: The default implementation uses the relation
+         ++   \spad{Y(v,x) = (J(v,x) cos(v*%pi) - J(-v,x))/sin(v*%pi)}
+         ++ so is not valid for integer values of v.
+        besselY: (C, C) -> C
+         ++ besselY(v,x) is the Bessel function of the second kind,
+         ++ \spad{Y(v,x)}.
+         ++ This function satisfies the differential equation:
+         ++   \spad{x^2 w''(x) + x w'(x) + (x^2-v^2)w(x) = 0}.
+         ++ Note: The default implementation uses the relation
+         ++   \spad{Y(v,x) = (J(v,x) cos(v*%pi) - J(-v,x))/sin(v*%pi)}
+         ++ so is not valid for integer values of v.
+
+        besselI: (R,R) -> R
+         ++ besselI(v,x) is the modified Bessel function of the first kind,
+         ++ \spad{I(v,x)}.
+         ++ This function satisfies the differential equation:
+         ++   \spad{x^2 w''(x) + x w'(x) - (x^2+v^2)w(x) = 0}.
+        besselI: (C,C) -> C
+         ++ besselI(v,x) is the modified Bessel function of the first kind,
+         ++ \spad{I(v,x)}.
+         ++ This function satisfies the differential equation:
+         ++   \spad{x^2 w''(x) + x w'(x) - (x^2+v^2)w(x) = 0}.
+
+        besselK: (R, R) -> R
+         ++ besselK(v,x) is the modified Bessel function of the second kind,
+         ++ \spad{K(v,x)}.
+         ++ This function satisfies the differential equation:
+         ++   \spad{x^2 w''(x) + x w'(x) - (x^2+v^2)w(x) = 0}.
+         ++ Note: The default implementation uses the relation
+         ++   \spad{K(v,x) = %pi/2*(I(-v,x) - I(v,x))/sin(v*%pi)}.
+         ++ so is not valid for integer values of v.
+        besselK: (C, C) -> C
+         ++ besselK(v,x) is the modified Bessel function of the second kind,
+         ++ \spad{K(v,x)}.
+         ++ This function satisfies the differential equation:
+         ++   \spad{x^2 w''(x) + x w'(x) - (x^2+v^2)w(x) = 0}.
+         ++ Note: The default implementation uses the relation
+         ++   \spad{K(v,x) = %pi/2*(I(-v,x) - I(v,x))/sin(v*%pi)}
+         ++ so is not valid for integer values of v.
+
+        airyAi:   C -> C
+         ++ airyAi(x) is the Airy function \spad{Ai(x)}.
+         ++ This function satisfies the differential equation:
+         ++   \spad{Ai''(x) - x * Ai(x) = 0}.
+        airyAi:   R -> R
+         ++ airyAi(x) is the Airy function \spad{Ai(x)}.
+         ++ This function satisfies the differential equation:
+         ++   \spad{Ai''(x) - x * Ai(x) = 0}.
+
+        airyBi:   R -> R
+         ++ airyBi(x) is the Airy function \spad{Bi(x)}.
+         ++ This function satisfies the differential equation:
+         ++   \spad{Bi''(x) - x * Bi(x) = 0}.
+        airyBi:   C -> C
+         ++ airyBi(x) is the Airy function \spad{Bi(x)}.
+         ++ This function satisfies the differential equation:
+         ++   \spad{Bi''(x) - x * Bi(x) = 0}.
+
+        hypergeometric0F1: (R, R) -> R
+         ++ hypergeometric0F1(c,z) is the hypergeometric function
+         ++ \spad{0F1(; c; z)}.
+        hypergeometric0F1: (C, C) -> C
+         ++ hypergeometric0F1(c,z) is the hypergeometric function
+         ++ \spad{0F1(; c; z)}.
+
+
+    Impl ==> add
+        a, v, w, z: C
+        n, x, y: R
+
+        -- These are hooks to Bruce's boot code.
+        Gamma z         == CGAMMA(z)$Lisp
+        Gamma x         == RGAMMA(x)$Lisp
+
+@
+\subsection{The Exponential Integral}
+\subsection{The E1 function}
+(Quoted from Segletes\cite{2}):
+
+A number of useful integrals exist for which no exact solutions have
+been found. In other cases, an exact solution, if found, may be
+impractical to utilize over the complete domain of the function
+because of precision limitations associated with what usually ends up
+as a series solution to the challenging integral. For many of these
+integrals, tabulated values may be published in various mathematical
+handbooks and articles. In some handbooks, fits (usually piecewise)
+also are offered. In some cases, an application may be forced to
+resort to numerical integration in order to acquire the integrated
+function. In this context, compact ({\sl i.e.} not piecewise)
+analytical fits to some of these problematic integrals, accurate to
+within a small fraction of the numerically integrated value, serve as
+a useful tool to applications requiring the results of the
+integration, especially when the integration is required numerous
+times throughout the course of the application. Furthermore, the
+ability and methodology to develop intelligent fits, in contract to
+the more traditional ``brute force'' fits, provide the means to
+minimize parameters and maximize accuracy when tackling some of these
+difficult functions. The exponential integral will be used as an
+opportunity to both demonstrate a methodology for intelligent fitting
+as well as for providing an accurate, compact, analytical fit to the
+exponential integral.
+
+The exponential integral is a useful class of functions that arise in
+a variety of applications [...]. The real branch of the family of
+exponential integrals may be defined as
+\begin{equation}
+E_n(x)=x^{n-1}\int_x^\infty{\frac{e^{-t}}{t^n}\ dt}
+\end{equation}
+where $n$, a positive integer, denotes the specific member of the
+exponential integral family. The argument of the exponential integral,
+rather than expressing a lower limit of integration as in (1),
+may be thought of as describing the exponential decay
+constant, as given in this equivalent (and perhaps more popular)
+definition of the integral:
+\begin{equation}
+E_n(x)=\int_1^\infty{\frac{e^{-xt}}{t^n}\ dt}
+\end{equation}
+
+Integration by parts permits any member of the exponential integral
+family to be converted to an adjacent member of the family, by way of 
+\begin{equation}
+\int_x^\infty{\frac{e^{-t}}{t^{n+1}}\ dt}=\frac{1}{n}
+\left(
+\frac{e^{-x}}{x^n}-\int_x^\infty{\frac{e^{-t}}{t^n}\ dt}
+\right)
+\end{equation}
+expressable in terms of $E_n$ as
+\begin{equation}
+E_{n+1}(x)=\frac{1}{n}\left[e^{-x}-xE_n(x)\right]\ (n=1,2,3)
+\end{equation}
+
+Through recursive employment of this equation, all members of the
+exponential integral family may be analytically related. However, this
+technique only allows for the transformation of one integral into
+another. There remains the problem of evaluating $E_1(x)$. There is an
+exact solution to the integral of $(e^{-t}/t)$, appearing in a number
+of mathematical references \cite{4,5} which is obtainable by
+expanding the exponential into a power series and integrating term by
+term. That exact solution, which is convergent, may be used to specify
+$E_1(x)$ as 
+\begin{equation}
+E_1(x)=-\gamma-ln(x)
++\frac{x}{1!}
+-\frac{x^2}{2\cdot 2!}
++\frac{x^3}{3\cdot 3!}
+-\ldots
+\end{equation}
+
+Euler's constant, $\gamma$, equal to $0.57721\ldots$, arises when the
+power series expansion for $(e^{-t}/t)$ is integrated and evaluated at
+its upper limit, as $x\rightarrow\infty$\cite{6}.
+
+Employing eqn (5), however, to evaluate $E_1(x)$ is problematic for
+finite $x$ significantly larger than unity. One may well ask of the
+need to evaluate the exponential integral for large $x$, since the
+function to be integrated drops off so rapidly that the integral is
+surely a very flat function. Such reasoning is true when comparing the
+integrand at large $x$ to that at small $x$. However, the definition
+of eqn (1) has as its upper limit not a small value of $x$, but rather
+that of $\infty$. Therefore, the actual values for $E_n(x)$ are
+extremely small numbers for large values of $x$. Thus, it is not
+sufficient merely to select enough terms of eqn (5) to evaluate the
+integral to within a value of, for example $\pm 0.0001$ because the
+actual integral value for large $x$ would be smaller than this
+arbitrary tolerance. To draw an analogy, it would be like saying that
+it is good enough to approximate $e^{-x}$ as 0.0 for $x>10$, since its
+actual value is within 0.0001 of zero. For some applications, such an
+approximation may be warranted. In general, though, such an
+approximation is mathematically unacceptable. Worse yet, as seen from
+eqns (1) and (2), the need to evaluate the exponential integral for
+large arguments can arise in real-world problems from either a large
+integraion limit or a large value of an exponential decay
+constant. Thus, the need to evaluate exponential integrals for large
+values of the argument is established. It is here that the practical
+problems with the evaluation of eqn (5) become manifest.
+
+First, the number of terms, $N$, required to achieve convergence rises
+rapidly with increasing $x$, making the summation an inefficient tool,
+even when expressed as a recursion relation (for three digits of
+accuracy, $N$ is observed to vary roughly as $9+1.6x$, for $1<x<7$).
+More important, however, is the fact that, for calculations of finite
+precision, the accuracy of the complete summation will be governed by
+the individual term of greatest magnitude. The source of the problem
+is that as $x$ is increased, the total summation decreases in
+magnitude more rapidly than a decaying exponential, while at the same
+time, the largest individual term in the series is observed to grow
+rapidly with increasing $x$ (
+$\tilde{}10^1$ for $x=7$, 
+$\tilde{}10^2$ for $x=10$, 
+$\tilde{}10^3$ for $x=13$, {\sl etc.}). The magnitude of this largest
+individual term consumes the available precision and, as a result,
+leaves little or none left for the ever-diminishing net sum that
+constitutes the desired integral.
+
+Literally, the use of eqn (5), even with (32-bit) double precision,
+does not permit the exponential integral to be evaluated to three
+places for $x>14$ in any case, and with the situation worsening for
+lesser precision. For these reasons, the use of eqn (5) to evaluate
+the exponential integral numerically for large $x$ is wholly
+unsuitable.
+
+\begin{equation}
+E_1(x)=e^{-x}\cdot
+\frac{1}{\displaystyle x+
+\frac{1}{\displaystyle 1+
+\frac{1}{\displaystyle x+
+\frac{2}{\displaystyle 1+
+\frac{2}{\displaystyle x+\ldots}}}}}
+\end{equation}
+
+But as $x$ becomes smaller, the number of terms required for
+convergence rises quickly. Similar arguments apply for the use of an
+asymptotic expansion for $E_1$, which also converges for large $x$. As
+such, the more typical approach employed by handbooks is that of a
+fit. While some steps are taken to make the fits intelligent ({\sl
+e.g.}, transformation of variables), the fits are all piecewise over
+the domain of the integral.
+
+Cody and Thatcher \cite{7} performed what is perhaps the definitive
+work, with the use of Chebyshev\cite{18,19} approximations to the exponential 
+integral $E_1$. Like others, they fit the integral over a piecewise
+series of subdomains (three in their case) and provide the fitting
+parameters necessary to evaluate the function to various required
+precisions, down to relative errors of $10^-20$. One of the problems
+with piecewise fitting over two or more subdomains is that functional
+value and derivatives of the spliced fits will not, in general, match
+at the domain transition point, unless special accomodations are
+made. This sort of discontinuity in functional value and/or slope,
+curvature, {\sl etc.}, may cause difficulties for some numerical
+algorithms operating upon the fitted function. Numerical
+splicing/smoothing algorithms aimed at eliminating discontinuities in
+the value and/or derivatives of a piecewise fit are not, in general,
+computationally insignificant. Problems associated with piecewise
+splicing of fits may also be obviated by obtaining an accurate enough
+fit, such that the error is on the order of magnitude of the limiting
+machine precision. This alternative, however, requires the use of
+additional fitting parameters to acquire the improved precision. Thus,
+regardless of approach, the desire to eliminate discontinuities in the
+function and its derivatives, between piecewise splices, requires
+extra computational effort. One final benefit to be had by avoiding
+the use of piecewise fits is the concomitant avoidance of conditional
+({\sl i.e.}, IF...THEN) programming statements in the coding of the
+routine. The use of conditional statements can preclude maximum
+computing efficiency on certain parallel computing architectures.
+
+Segletes constructs an analytic, non-piecewise fit to the Exponential
+Integral but the precision is on the order of 4 decimal places and is
+not sufficient to compare against the Abramowitz and Stegun Handbook.
+
+Instead we have chosen to use a two piece fitting function based on
+the Chebyshev polynomial for computing $E_1$. This agrees with the
+handbook values to almost the last published digit. See the {\tt e1.input}
+pamphlet for regression testing against the handbook tables.
+
+\subsection{E1:R$\rightarrow$OPR}
+The special function E1 below was originally derived from a function
+written by T.Haavie as the {\tt expint.c} function in the Numlibc library
+by Lars Erik Lund. Haavie approximates the E1 function by two 
+Chebyshev polynomials. For the range $-4 < x < 4$ the Chebyshev
+coefficients are:
+\begin{verbatim}
+ 7.8737715392882774, -8.0314874286705335,  3.8797325768522250,
+-1.6042971072992259,  0.5630905453891458, -0.1704423017433357,
+ 0.0452099390015415, -0.0106538986439085,  0.0022562638123478,
+-0.0004335700473221,  0.0000762166811878, -0.0000123417443064,
+ 0.0000018519745698, -0.0000002588698662,  0.0000000338604319,
+-0.0000000041611418,  0.0000000004821606, -0.0000000000528465,
+ 0.0000000000054945, -0.0000000000005433,  0.0000000000000512,
+-0.0000000000000046,  0.0000000000000004 
+\end{verbatim}
+and for the range $x > 4$ the Chebyshev coefficients are:
+\begin{verbatim}
+ 0.2155283776715125,  0.1028106215227030, -0.0045526707131788,
+ 0.0003571613122851, -0.0000379341616932,  0.0000049143944914,
+-0.0000007355024922,  0.0000001230603606, -0.0000000225236907,
+ 0.0000000044412375, -0.0000000009328509,  0.0000000002069297,
+-0.0000000000481502,  0.0000000000116891, -0.0000000000029474,
+ 0.0000000000007691, -0.0000000000002070,  0.0000000000000573,
+-0.0000000000000163,  0.0000000000000047, -0.0000000000000014,
+ 0.0000000000000004, -0.0000000000000001
+\end{verbatim}
+
+I've rewritten the polynomial to use precomputed coefficients
+that take into account the scaling used by Haavie. I've also
+rewritten the polynomial using Horner's method so the large
+powers of $x$ are only computed once.
+
+The result can be either a double float or, or if the argument
+is zero, infinity. Thus we need to extend the result to be a
+one-point completion to include infinity.
+
+<<package DFSFUN DoubleFloatSpecialFunctions>>=
+        E1(x:R):OPR ==
+         x = 0.0::R => infinity()
+         x > 4.0::R =>
+          t1:R:=0.14999948967737774608E-15::R
+          t2:R:=0.9999999999993112::R
+          ta:R:=(t1*x+t2)
+          t3:R:=0.99999999953685760001::R
+          tb:R:=(ta*x-t3)
+          t4:R:=1.9999998808293376::R
+          tc:R:=(tb*x+t4)
+          t5:R:=5.999983407661056::R
+          td:R:=(tc*x-t5)
+          t6:R:=23.9985380938481664::R
+          te:R:=(td*x+t6)
+          t7:R:=119.9108830382784512::R
+          tf:R:=(te*x-t7)
+          t8:R:=716.01351020920176641::R
+          tg:R:=(tf*x+t8)
+          t9:R:=4903.3466623370985473::R
+          th:R:=(tg*x-t9)
+          t10:R:=36601.25841454446674::R
+          ti:R:=(th*x+t10)
+          t11:R:=279913.28608482691646::R
+          tj:R:=(ti*x-t11)
+          t12:R:=2060518.7020296525186::R
+          tk:R:=(tj*x+t12)
+          t13:R:=13859772.093039815059::R
+          tl:R:=(tk*x-t13)
+          t14:R:=81945572.630072918857::R
+          tm:R:=(tl*x+t14)
+          t15:R:=413965714.82128317479::R
+          tn:R:=(tm*x-t15)
+          t16:R:=1747209536.2595547568::R
+          to:R:=(tn*x+t16)
+          t17:R:=6036182333.96179427::R
+          tp:R:=(to*x-t17)
+          t18:R:=16693683576.106267572::R
+          tq:R:=(tp*x+t18)
+          t19:R:=35938625644.58286097::R
+          tr:R:=(tq*x-t19)
+          t20:R:=57888657293.609258888::R
+          ts:R:=(tr*x+t20)
+          t21:R:=65523779423.11290127::R
+          tt:R:=(ts*x-t21)
+          t22:R:=46422751473.201760309::R
+          tu:R:=(tt*x+t22)
+          t23:R:=15474250491.067253436::R
+          tv:R:=(tu*x-t23)
+          tw:R:=(-1.0::R*x)
+          tx:R:=exp(tw)
+          ty:R:=tv*tx
+          tz:R:=x**22
+          taz:R:=ty/tz
+          taz::OPR
+         x > -4.0::R => 
+          a1:R:=0.476837158203125E-22::R
+          a2:R:=0.10967254638671875E-20::R
+          aa:R:=(-a1*x+a2)
+          a3:R:=0.20217895507812500001E-19::R
+          ab:R:=(aa*x-a3)
+          a4:R:=0.42600631713867187501E-18::R
+          ac:R:=(ab*x+a4)
+          a5:R:=0.868625640869140625E-17::R
+          ad:R:=(ac*x-a5)
+          a6:R:=0.16553192138671875E-15::R
+          ae:R:=(ad*x+a6)
+          a7:R:=0.29870208740234375E-14::R
+          af:R:=(ae*x-a7)
+          a8:R:=0.5097890777587890625E-13::R
+          ag:R:=(af*x+a8)
+          a9:R:=0.81934069213867187499E-12::R
+          ah:R:=(ag*x-a9)
+          a10:R:=0.1235313123779296875E-10::R
+          ai:R:=(ah*x+a10)
+          a11:R:=0.1739729620849609375E-9::R
+          aj:R:=(ai*x-a11)
+          a12:R:=0.22774642697021484375E-8::R
+          ak:R:=(aj*x+a12)
+          a13:R:=0.275573192853515625E-7::R
+          al:R:=(ak*x-a13)
+          a14:R:=0.30619243635087890625E-6::R
+          am:R:=(al*x+a14)
+          a15:R:=0.000003100198412519140625::R
+          an:R:=(am*x-a15)
+          a16:R:=0.00002834467120045546875::R
+          ao:R:=(an*x+a16)
+          a17:R:=0.00023148148148176953125::R
+          ap:R:=(ao*x-a17)
+          a18:R:=0.0016666666666686609375::R
+          aq:R:=(ap*x+a18)
+          a19:R:=0.01041666666666646875::R
+          ar:R:=(aq*x-a19)
+          a20:R:=0.055555555555554168751::R
+          as:R:=(ar*x+a20)
+          a21:R:=0.2500000000000000375::R
+          at:R:=(as*x-a21)
+          a22:R:=1.000000000000000325::R
+          au:R:=(at*x+a22)
+          a23:R:=0.5772156649015328::R
+          av:R:=au*x-a23
+          aw:R:=- 1.0::R*log(abs(x)) + av
+          aw::OPR
+         error "E1: no approximation available"
+@
+\subsection{En:(PI,R)$\rightarrow$OPR}
+The $E_n$ function is computed using the recurrence relation:
+$$E_{n+1}(z)=\frac{1}{n}\left(e^{-z}-zE_n(z)\right)\ \ \ (n=1,2,3,\ldots)$$
+
+The base case of the recursion depends on E1 above.
+
+The formula is 5.1.14 in Abramowitz and Stegun, 1965, p229\cite{4}.
+<<package DFSFUN DoubleFloatSpecialFunctions>>=
+        En(n:PI,x:R):OPR == 
+          n=1 => E1(x) 
+          v:R:=retract(En((n-1)::PI,x))
+          w:R:=1/(n-1)*(exp(-x)-x*v)
+          w::OPR
+
+@
+\subsection{The Ei Function}
+This function is based on Kin L. Lee's work\cite{8}. See also \cite{21}.
+\subsection{Abstract}
+The exponential integral Ei(x) is evaluated via Chebyshev series
+expansion of its associated functions to achieve high relative
+accuracy throughout the entire real line. The Chebyshev coefficients
+for these functions are given to 30 significant digits. Clenshaw's\cite{20}
+method is modified to furnish an efficient procedure for the accurate
+solution of linear systems having near-triangular coefficient
+matrices.
+\subsection{Introduction}
+The evaulation of the exponential integral
+\begin{equation}
+Ei(x)=\int_{-\infty}^{X}{\frac{e^u}{u}}\ du=-E_1(-x), x \ne 0
+\end{equation}
+is usually based on the value of its associated functions, for
+example, $xe^{-x}Ei(x)$. High accuracy tabulations of integral (1) by
+means of Taylor series techniques are given by Harris \cite{9} and
+Miller and Hurst \cite{10}. The evaluation of $Ei(x)$ for
+$-4 \le x \le \infty$ by means of Chebyshev series is provided by
+Clenshaw \cite{11} to have the absolute accuracy of 20 decimal
+places. The evaluation of the same integral (1) by rational
+approximation of its associated functions is furnished by Cody and
+Thacher \cite{12,13} for $-\infty < x < \infty$, and has the relative
+accuracy of 17 significant figures.
+
+The approximation of Cody and Thacher from the point of view of
+efficient function evaluation are preferable to those of
+Clenshaw. However, the accuracy of the latter's procedure, unlike
+those of the former, is not limited by the accuracy or the
+availability of a master function, which is a means of explicitly
+evaluating the function in question.
+
+In this paper $Ei(x)$ (or equivalently $-E_1(-x)$) for the entire real
+line is evaluted via Chebyshev series expansion of its associated
+functions that are accurate to 30 significant figures by a
+modification of Clenshaw's procedure. To verify the accuracy of the
+several Chebyshev series, values of the associated functions were
+checked against those computed by Taylor series and those of Murnaghan
+and Wrench \cite{14} (see Remarks on Convergence and Accuracy).
+
+Although for most purposes fewer than 30 figures of accuracy are
+required, such high accuracy is desirable for the following
+reasons. In order to further reduce the number of arithmetical
+operations in the evaluation of a function, the Chebyshev series in
+question can either be converted into a rational function or
+rearranged into an ordinary polynomial. Since several figures may be
+lost in either of these procedures, it is necessary to provide the
+Chebyshev series with a sufficient number of figures to achieve the
+desired accuracy. Furthermore, general function approximation
+routines, such as those used for minimax rational function
+approximations, require the explicit evaluation of the function to be
+approximated. To take account of the errors commited by these
+routines, the function values must have an accuracy higher than the
+approximation to be determined. Consequently, high-precision results
+are useful as a master function for finding approximations for (or
+involving) $Ei(x)$ (e.g. \cite{12,13}) where prescribed accuracy is
+less than 30 figures.
+
+\subsection{Discussion}
+
+It is proposed here to provide for the evaluation of $Ei(x)$ by
+obtaining Chebyshev coefficients for the associated functions given by
+table 1.
+
+\noindent
+{\bf Table 1}: Associated Functions of $Ei(x)$ and their ranges of Chebyshev
+Series Expansions
+
+\begin{tabular}{clc}
+& Associated function & Range of expansion\\
+Ei1 & $xe^{-x}Ei(x)$ & $-\infty < x \le -10$\\
+Ei2 & $xe^{-x}Ei(x)$ & $-10 \le x \le -4$\\
+Ei3 & $\frac{Ei(x)-log\vert x\vert - \gamma}{x}$ & $-4 \le x \le d42$\\
+Ei4 & $xe^{-x}Ei(x)$ & $4 \le x \le 12$\\
+Ei5 & $xe^{-x}Ei(x)$ & $12 \le x \le 32$\\
+Ei6 & $xe^{-x}Ei(x)$ & $32 \le x < \infty$\\
+\end{tabular}\\
+\hbox{\hskip 2cm}($\gamma$ = 0.5772156649... is Euler's constant.)
+
+<<package DFSFUN DoubleFloatSpecialFunctions>>=
+
+        Ei(y:OPR):OPR ==
+          infinite? y => 1
+          x:R:=retract(y)
+          x < -10.0::R => 
+            ei:R:=retract(Ei1(y))
+            (ei/(x*exp(-x)))::OPR
+          x <  -4.0::R =>
+            ei:R:=retract(Ei2(y))
+            (ei/(x*exp(-x)))::OPR
+          x <   4.0::R => 
+            ei3:R:=retract(Ei3(y))
+            gamma:R:=0.577215664901532860606512090082::R
+            (ei3*x+log(abs(x))+gamma)::OPR
+          x <  12.0::R => 
+            ei:R:=retract(Ei4(y))
+            (ei/(x*exp(-x)))::OPR
+          x <  32.0::R => 
+            ei:R:=retract(Ei5(y))
+            (ei/(x*exp(-x)))::OPR
+          ei:R:=retract(Ei6(y))
+          (ei/(x*exp(-x)))::OPR
+
+@
+Note that the functions $[Ei(x)-log\vert x\vert - \gamma]/x$ and
+$xe^{-x}Ei(x)$ have the limiting values of unity at the origin and at
+infinity, respectively, and that the range of the associated function
+values is close to unity (see table 4). This makes for the evaluation
+of the associated functions over the indicated ranges in table 1 (and
+thus $Ei(x)$ over the entire real line) with high relative accuracy by
+means of the Chebyshev series. The reason for this will become
+apparent later.
+
+Some remarks about the choice of the intervals of expansion for the
+serveral Chebyshev series are in order here. The partition of the real
+line indicated by table 1 is chosen to allow for the approximation of
+the associated functions with a maximum error of $0.5\times 10^{-30}$
+by polynomials of degress $< 50$. The real line has also been
+partitioned with the objective of providing the interval about zero
+with the lowest degree of polynomial approximation of the six
+intervals. This should compensate for the computation of 
+$log\vert x\vert$ required in the evaluation of $Ei(x)$ over that
+interval. The ranges $-\infty < x \le -4$ and $4 \le x < \infty$ are
+partitioned into 2 and 3 intervals, respectively, to provide
+approximations to $xe^{-x}Ei(x)$ by polynomials of about the same
+degree. 
+
+\subsection{Expansions in Chebyshev Series}
+
+Let $\phi(t)$ be a differentiable function defined on [-1,1]. To
+facilitate discussion, denote its Chebyshev series and that of its
+derivative by 
+\begin{equation}
+\phi(t)=\sum_{k=0}^{\infty}\ ^{'}{A_k^{(0)}T_k(t)}\quad
+\phi^{'}(t)=\sum_{k=0}^{\infty}\ ^{'}{A_k^{(1)}T_k(t)}
+\end{equation}
+where $T_k(t)$ are Chebyshev polynomials defined by
+\begin{equation}
+T_k(t)=cos(k\ \arccos\ t),\quad -1 \le t \le 1
+\end{equation}
+(A prime over a summation sign indicates that the first term is to be
+halved.) 
+
+If $\phi(t)$ and $\phi^{'}(t)$ are continuous, the Chebyshev
+coefficients $A_k^{(0)}$ and $A_k^{(1)}$ can be obtained analytically
+(if possible) or by numerical quadrature. However, since each function
+in table 1 satisfies a linear differential equation with polynomial
+coefficients, the Chebyshev coefficients can be more readily evaluated
+by the method of Clenshaw \cite{16}.
+
+There are several variations of Clenshaw's procedure (see,
+e.g. \cite{17}), but for high-precision computation, where multiple
+precision arithmetic is employed, we find his original procedure
+easiest to implement. However, straightforward application of it may
+result in a loss of accuracy if the trial solutions selected are not
+sufficiently independent. How the difficulty is overcome will be
+pointed out subsequently.
+
+\subsection{The function $xe^{-x}Ei(x)$ on the Finite Interval}
+
+We consider first the Chebyshev series expansion of
+\begin{equation}
+f(x)=xe^{-x}Ei(x),\quad (a \le x \le b)
+\end{equation}
+with $x\ne 0$. One can easily verify that after the change of
+variables
+\begin{equation}
+x=[(b-a)T + a + b]/2,\quad(-1 \le t \le 1)
+\end{equation}
+the function
+\begin{equation}
+\phi(t)=f\left[\frac{(b-a)t + a + b}{2}\right]=f(x)
+\end{equation}
+satisfies the differential equation
+\begin{equation}
+2(pt+q)\phi^{'}(t)+p(pt+q-2)\phi(t)=p(pt+q)
+\end{equation}
+with\footnote{The value of $Ei(a)$ may be evaluated by means of the
+Taylor series. In this report $Ei(a)$ is computed by first finding the
+Chebyshev series approximation to $[Ei(x)-log\vert x\vert-\gamma]/x$
+to get $Ei(a)$. The quantities $e^a$ and $\log\vert a\vert$ for
+integral values of $a$ may be found in existing tables}
+\begin{equation}
+\phi(-1)=ae^{-a}Ei(a)
+\end{equation}
+where $p=b-a$ and $q=b+a$. Replacing $\phi(t)$ and $\phi^{'}(t)$ in
+equations 7 by their Chebyshev series, we obtain
+\begin{equation}
+\sum_{k=0}^{\infty}\ ^{'}{(-1)^kA_k^{(0)}}=\phi(-1)
+\end{equation}
+\begin{equation}
+2\sum_{k=0}^{\infty}\ {'}{A_k^{(1)}(pt+q)T_k(t)}+
+p\sum_{k=0}^{\infty}\ {'}{A_k^{(0)}(pt+q-2)T_k(t)}=
+p(pt+q)
+\end{equation}
+It can be demonstrated that if $B_k$ are the Chebyshev coefficients of
+a function $\Psi(t)$, then $C_k$, the Chebyshev coefficients of
+$t^r\Psi(t)$ for positive integers r, are given by \cite{16}
+\begin{equation}
+C_k=2^{-r}\sum_{i=0}^r\binom{r}{i}B_{\vert k-r+2i\vert}
+\end{equation}
+Consequently, the left member of equation 15 can be rearranged into a
+single series involving $T_k(t)$. The comparison of the coefficients
+of $T_k(t)$ that yields the infinite system of equations
+\begin{equation}
+\left.
+\begin{array}{c}
+\displaystyle\sum_{k=0}^{\infty}\ ^{'}{(-1)^kA_k^{(0)}} = \phi(-1)\\
+\\
+2pA_{\vert k-1\vert}^{(1)}+
+4qA_k^{(1)}+
+2pA_{k+1}^{(1)}+
+p^2A_{\vert k-1\vert}^{(0)}+
+2p(q-2)A_k^{(0)}+
+p^2A_{k+1}^{(0)}\\
+\\
+=\left\{
+\begin{array}{rcl}
+4pq & , & k=0\\
+2p^2 & , & k=1\\
+0 & , & k=2,3,\ldots
+\end{array}
+\right.
+\end{array}
+\right\}
+\end{equation}
+The relation \cite{16}
+\begin{equation}
+2kA_k^{(0)}=A_{k-1}^{(1)}-A_{k+1}^{(1)}
+\end{equation}
+can be used to reduce equation 18 to a system of equations involving
+only $A_k^{(0)}$. Thus, replacing $k$ of equations 18 by $k+2$ and
+subtracting the resulting equation from equations 18, we have, by
+means of equation 19, the system of equations
+\begin{equation}
+\left.
+\begin{array}{c}
+\displaystyle\sum_{k=0}^{\infty}\ ^{'}{(-1)^kA_k^{(0)}} = \phi(-1)\\
+\\
+2p(q-2)A_0+(8q+p^2)A_1+2p(6-q)A_2-p^2A_3=4pq\\
+\\
+p^2A_{k-1}+2p(2k+q-2)A_k+8q(k+1)A_{k+1}+2p(2k-q+6)A_{k+2}-p^2A_{k+3}\\
+\\
+=\left\{
+\begin{array}{rcl}
+2p^2 & , & k=1\\
+0 & , & k=2,3,\ldots
+\end{array}
+\right.
+\end{array}
+\right\}
+\end{equation}
+The superscript of $A_k^{(0)}$ is dropped for simplicity. In order to
+solve the infinite system 20, Clenshaw \cite{11} essentially
+considered the required solution as the limiting solution of the
+sequence of truncated systems consisting of the first $M+1$ equations
+of the same system, that is, the solution of the system
+\begin{equation}
+\sum_{k=0}^M\ ^{'}{(-1)^kA_k}=\phi(-1)
+\end{equation}
+\begin{equation}
+2p(q-2)A_0+(8q+p^2)A_1+2p(q-6)A_2-p^2A_3=4pq
+\end{equation}
+\begin{equation}
+\left.
+\begin{array}{c}
+p^2A_{k-1}+2p(2k+q-2)A_k+8q(k+1)A_{k+1}+2p(2k-q+6)A_{k+2}-p^2A_{k+3}\\
+\\
+=\left\{
+\begin{array}{rcl}
+2p^2 & , & k=1\\
+0 & , & k=2,3,\ldots,M-3
+\end{array}
+\right.\\
+\\
+p^2A_{M-3}+2p(2M+q-6)A_{M-2}+8q(M-1)A_{M-1}+2p(2M+4-q)A_M=0\\
+\\
+p^2A_{M-2}+2p(2M+q-4)A_{M-1}+8qMA_M=0
+\end{array}
+\right\}
+\end{equation}
+where $A_k$ is assumed to vanish for $K \ge M+1$. To solve system
+(21,22,23) consider first the subsystem 23 consisting of $M-2$
+equations in $M$ unknowns. Here use is made of the fact that the
+subsystem 23 is satisfied by
+\begin{equation}
+A_k=c_1\alpha_k+c_2\beta_k+\gamma_k\quad(k=0,1,2,\ldots)
+\end{equation}
+for arbitrary constants $c_1$ and $c_2$, where $\gamma_k$ is a
+particular solution of 23 and where $\alpha_k$ and $\beta_k$ are two
+independent solutions of the homogeneous equations (23 with $2p^2$
+deleted) of the same subsystem. Hence, if $\alpha_k$, $\beta_k$, and
+$\gamma_k$ are available, the solution of system (21,22,23) reduces to
+the determinant of $c_1$ and $c_2$ from equations 21 and 22.
+
+To solve equations (21,22,23), we note that
+\begin{equation}
+\gamma_0=2,\quad \gamma_k=0,\quad {\textrm for\ }k=1(1)M
+\end{equation}
+is obviously a particular solution of equation 23. The two independent
+solutions $\gamma_k$ and $\beta_k$ of the homogeneous equations of the
+same subsystem can be generated in turn by backward recurrence if we
+set
+\begin{equation}
+\left.
+\begin{array}{l}
+\hbox{\hskip 4cm}\alpha_{M-1}=0,\quad\alpha_M=1\\
+\textrm{and}\\
+\hbox{\hskip 4cm}\beta_{M-1}=1,\quad\beta_M=0\\
+\end{array}
+\right\}
+\end{equation}
+or choose any $\alpha{M-1}$, $\alpha_M$, and $\beta_{M-1}$, $\beta_M$
+for which $\alpha_{M-1}\beta_M-\alpha_M\beta_{M-1}\ne 0$. The
+arbitrary constants $c_1$ and $c_2$ are determined, and consequently
+the solution of equations (21,22,23) if equation 24 is substituted
+into equation 21 and 22 and the resulting equations
+\begin{equation}
+c_1R(\alpha)+c_2R(\beta)=\phi(-1)-1
+\end{equation}
+\begin{equation}
+c_1S(\alpha)+c_2S(\beta)=8p
+\end{equation}
+are solved as two equations in two unknowns. The terms $R(\alpha)$ and
+$S(\alpha)$ are equal, respectively, to the left members of equations
+21 and 22 corresponding to solution $\alpha_k$. (The identical
+designation holds for $R(\beta)$ and $S(\beta)$.)
+
+The quantities $\alpha_k$ and $\beta_k$ are known as trial solutions
+in reference \cite{12}. Clenshaw has pointed out that if $\alpha_k$
+and $\beta_k$ are not sufficiently independent, loss of significance
+will occur in the formation of the linear combination 24, with
+consequent loss of accuracy. Clenshaw suggested the Gauss-Seidel
+iteration procedure to improve the accuracy of the solution. However,
+this requires the application of an additional computing procedure and
+may prove to be extremely slow. A simpler procedure which does not
+alter the basic computing scheme given above is proposed here. The
+loss of accuracy can effectively be regained if we first generate a
+third trial solution $\delta_k$ (k=0,1,$\ldots$,M), where
+$\delta_{M-1}$ and $\delta_M$ are equal to 
+$c_1\alpha_{M-1}+c_2\beta_{M-1}$ and 
+$c_1\alpha_M+c_2\beta_M$, respectively, and where $\delta_k$
+(k=M-2,M-3,$\ldots$,0) is determined using backward recurrence as
+before by means of equation 23. Then either $\alpha_k$ or $\beta_k$ is
+replaced by $\delta_k$ and a new set of $c_1$ and $c_2$ is determined
+by equations 27 and 28. Such a procedure can be repeated until the
+required accuracy is reached. However, only one application of it was
+necessary in the computation of the coefficients of this report.
+
+As an example, consider the case for $4 \le x \le 12$ with $M=15$. The
+right member of equation 27 and of equation 28 assume, respectively,
+the values of $0.43820800$ and $64$. The trial solutions $\alpha_k$
+and $\beta_k$ generated with $\alpha_{14}=8$, $\alpha_{15}=9$ and
+$\beta_{14}=7$, $\beta_{15}=8$ are certainly independent, since 
+$\alpha_{14}\beta_{15}-\alpha_{15}\beta_{14}=1\ne 0$. A check of table
+2 shows that equations 27 and 28 have, respectively, the residuals of 
+$-0.137\times 10^-4$ and $-0.976\times 10^{-3}$. The same table also
+shows that $c_1\alpha_k$ is opposite in sign but nearly equal in
+magnitude to $c_2\beta_k$. Cancellations in the formation of the
+linear combination 24 causes a loss of significance of 2 to 6 figures
+in the computed $A_k$. In the second iteration, where a new set of
+$\beta_k$ is generated replacing $\beta_{14}$ and $\beta_{15}$,
+respectively, by $c_1\alpha_{14}+c_2\beta_{14}$ and 
+$c_1\alpha_{15}+c_2\beta_{15}$ of the first iteration, the new 
+$c_1\alpha_k$ and $c_2\beta_k$ differed from 2 to 5 orders of
+magnitude. Consequently, no cancellation of significant figures in the
+computation of $A_k$ occurred. Notice that equations 27 and 28 are now
+satisfied exactly. Further note that the new $c_1$ and $c_2$ are near
+zero and unity, respectively, for the reason that if equations 21, 22,
+and 23 are satisfied by equation 24 exactly in the first iteration,
+the new $c_1$ and $c_2$ should have the precise values zero and 1,
+respectively. The results of the third iteration show that the $A_k$
+of the second iteration are already accurate to eight decimal places,
+since the $A_k$ in the two iterations differ in less that 
+$0.5\times 10^{-8}$. Notice that for the third iteration, equations
+27 and 28 are also satisfied exactly and that $c_1=1$ and $c_2=0$
+(relative to 8 places of accuracy).
+
+\noindent
+{\bf Table 2}: Computation of Chebyshev Coefficients for $xe^{-x}Ei(x)$
+
+\hrule
+First iteration: $\alpha_{14}=8$, $\alpha_{15}=9$; $\beta_{14}=7$, 
+$\beta_{15}=8$
+\hrule
+\begin{tabular}{|r|r|r|r|}
+k & $c_1\alpha_k\hbox{\hskip 1cm}$ & $c_2\beta_k\hbox{\hskip 1cm}$ & 
+$A_k\hbox{\hskip 1cm}$\\
+&&&\\
+ 0 &  0.71690285E 03 & -0.71644773E 03 &  0.24551200E 01\\
+ 1 & -0.33302683E 03 &  0.33286440E 03 & -0.16243000E 00\\
+ 2 &  0.13469341E 03 & -0.13464845E 03 &  0.44960000E-01\\
+ 3 & -0.43211869E 02 &  0.43205127E 02 & -0.67420000E-02\\
+ 4 &  0.99929173E 01 & -0.99942238E 01 & -0.13065000E-02\\
+ 5 & -0.11670764E 01 &  0.11684574E 01 &  0.13810000E-02\\
+ 6 & -0.25552137E 00 &  0.25493635E 00 & -0.58502000E-02\\
+ 7 &  0.20617247E 00 & -0.20599754E 00 &  0.17493000E-03\\
+ 8 & -0.75797238E-01 &  0.75756767E-01 & -0.40471000E-04\\
+ 9 &  0.20550680E-01 & -0.20543463E-01 &  0.72170000E-05\\
+10 & -0.45192333E-02 &  0.45183721E-02 & -0.86120000E-06\\
+11 &  0.82656562E-03 & -0.82656589E-03 & -0.27000000E-09\\
+12 & -0.12333571E-03 &  0.12337366E-03 &  0.37950000E-07\\
+13 &  0.13300910E-04 & -0.13315328E-04 & -0.14418000E-07\\
+14 & -0.29699001E-06 &  0.30091136E-06 &  0.39213500E-08\\
+15 & -0.33941716E-06 &  0.33852528E-06 & -0.89188000E-09\\
+\end{tabular}\\
+\hbox{\hskip 3.0cm}$c_1=0.37613920E-07$\\
+\hbox{\hskip 3.0cm}$c_2=-0.42427144E-07$\\
+\hbox{\hskip 1.0cm}$c_1R(\alpha)+c_2R(\beta)-0.43820800E\ 00=-0.13700000E-04$\\
+\hbox{\hskip 1.0cm}$c_1S(\alpha)+c_2S(\beta)-0.64000000E\ 00=-0.97600000E-03$
+
+\hrule
+Second iteration: $\alpha_{14}=8$, $\alpha_{15}=9$; \\
+$\beta_{14}=0.39213500E-08$, $\beta_{15}=-0.89188000E-09$
+\hrule
+\begin{tabular}{|r|r|r|r|}
+k & $c_1\alpha_k\hbox{\hskip 1cm}$ & $c_2\beta_k\hbox{\hskip 1cm}$ & 
+$A_k\hbox{\hskip 1cm}$\\
+&&&\\
+ 0 &  0.36701576E-05 &  0.45512986E 00 &  0.24551335E 01\\
+ 1 & -0.17051695E-05 & -0.16243666E 00 & -0.16243837E 00\\
+ 2 &  0.68976566E-06 &  0.44956834E-01 &  0.44957523E-01\\
+ 3 & -0.22132756E-06 & -0.67413538E-02 & -0.67415751E-02\\
+ 4 &  0.51197561E-07 & -0.13067496E-02 & -0.13066984E-02\\
+ 5 & -0.59856744E-08 &  0.13810895E-02 &  0.13810835E-02\\
+ 6 & -0.13059663E-08 & -0.58502164E-03 & -0.58502294E-03\\
+ 7 &  0.10552667E-08 &  0.17492889E-03 &  0.17492994E-03\\
+ 8 & -0.38808033E-09 & -0.40472426E-04 & -0.40472814E-04\\
+ 9 &  0.10523831E-09 &  0.72169965E-05 &  0.72171017E-05\\
+10 & -0.23146333E-10 & -0.86125438E-06 & -0.86127752E-06\\
+11 &  0.42342615E-11 & -0.25542252E-09 & -0.25118825E-09\\
+12 & -0.63200810E-12 &  0.37946968E-07 &  0.37946336E-07\\
+13 &  0.68210630E-13 & -0.14417584E-07 & -0.14417516E-07\\
+14 & -0.15414832E-14 &  0.39212981E-08 &  0.39212965E-08\\
+15 & -0.17341686E-14 & -0.89186818E-09 & -0.89186991E-09\\
+\end{tabular}\\
+\hbox{\hskip 3.0cm}$c_1=-0.19268540E-15$\\
+\hbox{\hskip 3.0cm}$c_2=0.99998675E\ 00$\\
+\hbox{\hskip 1.0cm}$c_1R(\alpha)+c_2R(\beta)-0.43820800E\ 00=0.0$\\
+\hbox{\hskip 1.0cm}$c_1S(\alpha)+c_2S(\beta)-0.64000000E\ 00=0.0$
+
+\noindent
+{\bf Table 2}: Computation of Chebyshev Coefficients for
+$xe^{-x}Ei(x)$ - Concluded\\
+\hbox{\hskip 0.5cm}$[4 \le x \le 12 with M=15; \gamma_0=2, \gamma_k=0
+\textrm{for\ }k=1(1)15]$
+
+\hrule
+Third iteration: $\alpha_{14}=8$, $\alpha_{15}=9$;\\ 
+\hbox{\hskip 0.5cm}$\beta_{14}=0.39212965E-08$, $\beta_{15}=-0.89186991E-09$
+\hrule
+\begin{tabular}{|r|r|r|r|}
+k & $c_1\alpha_k\hbox{\hskip 1cm}$ & $c_2\beta_k\hbox{\hskip 1cm}$ & 
+$A_k\hbox{\hskip 1cm}$\\
+&&&\\
+ 0 & -0.23083059E-07 &  0.45513355E 00 &  0.24551335E 01\\
+ 1 &  0.10724479E-07 & -0.16243838E 00 & -0.16243837E 00\\
+ 2 & -0.43382065E-08 &  0.44957526E-01 &  0.44957522E-01\\
+ 3 &  0.13920157E-08 & -0.67415759E-02 & -0.67415745E-02\\
+ 4 & -0.32200152E-09 & -0.13066983E-02 & -0.13066986E-02\\
+ 5 &  0.37646251E-10 &  0.13810835E-02 &  0.13810836E-02\\
+ 6 &  0.82137336E-11 & -0.58502297E-03 & -0.58502296E-03\\
+ 7 & -0.66369857E-11 &  0.17492995E-03 &  0.17492994E-03\\
+ 8 &  0.24407892E-11 & -0.40472817E-04 & -0.40472814E-04\\
+ 9 & -0.66188494E-12 &  0.72171023E-05 &  0.72171017E-05\\
+10 &  0.14557636E-12 & -0.86127766E-06 & -0.86127751E-06\\
+11 & -0.26630930E-13 & -0.25116620E-09 & -0.25119283E-09\\
+12 &  0.39749465E-14 &  0.37946334E-07 &  0.37946337E-07\\
+13 & -0.42900337E-15 & -0.14417516E-07 & -0.14417516E-07\\
+14 &  0.96949915E-17 &  0.39212966E-08 &  0.39212966E-08\\
+15 &  0.10906865E-16 & -0.89186992E-09 & -0.89186990E-09\\
+\end{tabular}\\
+\hbox{\hskip 3.0cm}$c_1=0.12118739E-17$\\
+\hbox{\hskip 3.0cm}$c_2=0.10000000E\ 01$\\
+\hbox{\hskip 1.0cm}$c_1R(\alpha)+c_2R(\beta)-0.43820800E\ 00=0.0$\\
+\hbox{\hskip 1.0cm}$c_1S(\alpha)+c_2S(\beta)-0.64000000E\ 00=0.0$\\
+\hrule
+
+It is worth noting that the coefficient matrix of system (21,22,23)
+yields an upper triangular matrix of order $M-1$ after the deletion of
+the first two rows and the last two columns. Consequently, the
+procedure of this section is applicable to any linear system having
+this property. As a matter of fact, the same procedure can be
+generalized to solve linear systems having coefficient matrices of
+order N, the deletion of whose first $r$ ($r < N$) rows and last $r$
+columns yields upper triangular matrices of order $N-r$.
+
+\subsection{The Function $(1/x)[Ei(x)-log\vert x\vert-\gamma]$}
+
+Let
+\begin{equation}
+f(x)=(1/x)[Ei(x)-log\vert x\vert-\gamma],\quad g(x)=e^x,\quad
+\vert x\vert \le b
+\end{equation}
+These functions, with the change of variable $x=bt$, simultaneously
+satisfy the differential equations
+\begin{equation}
+bt^2\phi^{'}(t)+bt\phi(t)-\psi(t)=-1
+\end{equation}
+\begin{equation}
+\psi^{'}(t)-b\psi(t)=0,\quad -1 \le t \le 1
+\end{equation}
+Conversely,\footnote{The general solution of the differential
+equations has the form
+$$
+\phi(t)=(c_1/t)+[Ei(bt)-log\vert bt\vert-\gamma]/bt
+$$
+$$
+\psi(t)=c_2e^{bt}
+$$
+where the first and second terms of $\phi(t)$ are, respectively, the
+complementary solution and a particular integral of equation 30. The
+requirement that $\phi(t)$ is bounded makes the constant $c_1=0$. The
+fact that $\psi(0)=1$ is implicit in equation 30.} any solution of
+equations 30 and 31 is equal to the functions given by equations 29
+for the change of variable $x=bt$. Therefore, boundary conditions need
+not be imposed for the solution of the differential equations.
+
+A procedure similar to that of the previous section gives the coupled
+infinite recurrence relations
+\begin{equation}
+bA_1+bA_3-B_0+B_2=-2
+\end{equation}
+\begin{equation}
+\left.
+\begin{array}{c}
+kbA_{k-1}+2(k+1)bA_{k+1}+(k+2)bA_{k+3}-2B_k+2B_{k+2}=0\\
+\\
+bB_{k-1}-2kB_k-bB_{k+1}=0,\quad k=1,2,\ldots
+\end{array}
+\right\}
+\end{equation}
+where $A_k$ and $B_k$ are the Chebyshev coefficients of $\phi(t)$ and
+$\psi(t)$, respectively.
+
+Consider first the subsystem 33. If $A_k=\alpha_k$ and $B_k=\beta_k$
+are a simultaneous solution of the system, which is homogeneous, then
+\begin{equation}
+\left.
+\begin{array}{l}
+\hbox{\hskip 4cm}A_k=c\alpha_k\\
+\textrm{and}\\
+\hbox{\hskip 4cm}B_k=c\beta_k\\
+\end{array}
+\right\}
+\end{equation}
+are also a solution for an arbitrary constant $c$. Thus based on
+considerations analogous to the solution of equations 21, 22, and 23,
+one can initiate an approximate solution of equations 32 and 33 by
+setting 
+\begin{equation}
+\left.
+\begin{array}{l}
+\alpha_M=0,\quad\alpha_k=0\quad\textrm{for }k \ge M+1\\
+\\
+\beta_M=1,\quad\beta_k=0\quad\textrm{for }k \ge M+1
+\end{array}
+\right\}
+\end{equation}
+and then determining $\alpha_k$ and $\beta_k$ ($k=M-1, M-2, \ldots,
+0$) by backward recurrence by means of equation 33. The arbitrary
+constant $c$ is determined by substituting 34 into 32.
+
+\subsection{The Function $xe^{-x}Ei(x)$ on the Infinite Interval}
+Let
+\begin{equation}
+f(x)=xe^{-x}Ei(x),\quad -\infty < x \le b < 0,\quad or 0 < b \le x < \infty
+\end{equation}
+By making the change of variables,
+\begin{equation}
+x=2b/(t+1)
+\end{equation}
+we can easily demonstrate that
+\begin{equation}
+f(x)=f[2b/(t+1)]=\phi(t)
+\end{equation}
+satisfies the differential equation
+\begin{equation}
+(t+1)^2\phi^{'}(t)+(t+1-2b)\phi(t)=-2b
+\end{equation}
+with
+\begin{equation}
+\phi(1)=be^{-b}Ei(b)
+\end{equation}
+An infinite system of equations involving the Chebyshev coefficients
+$A_k$ of $\phi(t)$ is deducible from equations 39 and 40 by the same
+procedure as applied to equations 13 and 14 to obtain the infinite
+system 20; it is given as follows.
+\begin{equation}
+\sum_{k=0}^\infty\ ^{'}A_k=\phi(1)=be^{-b}Ei(b)
+\end{equation}
+\begin{equation}
+(1-2b)A_0+3A_1+(3+2b)A_2+A_3=-4b
+\end{equation}
+\begin{equation}
+\begin{array}{l}
+kA_{k-1}+2[(2k+1)-2b]A_k+6(k+1)A_{k+1}+2(2k+3+2b)A_{k+2}\\
+\hbox{\hskip 4.0cm}+(k+2)A_{k+3}=0,\quad k=1,2,\ldots
+\end{array}
+\end{equation}
+As in the case of equations 21, 22 and 23, the solution of 41, 42 and
+43 can be assumed to be
+\begin{equation}
+A_k=c_1\alpha_k+c_2\beta_k
+\end{equation}
+with $A_k$ vanishing for a $k \ge M$. Thus, we can set, say
+\begin{equation}
+\left.
+\begin{array}{ccc}
+\alpha_{M-1}=0 & , & \alpha_M=1\\
+\beta_{M-1}=1  & , & \beta_M=0
+\end{array}
+\right\}
+\end{equation}
+and determine the trial solutions $\alpha_k$ and $\beta_k$ 
+(k=M-1,M-2,$\ldots$,0) by means of equation 43 by backward
+recurrence. The required solution of equations 41,42,adn 43 is then
+determined by substituting equation 44 in equations 41 and 42 and
+solving the resulting equations for $c_1$ and $c_2$.
+
+Loss of accuracy in the computation of $A_k$ can also occur here, as
+in the solution of equations 21, 22 and 23, if the trial solutions are
+not sufficiently independent. The process used to improve the accuracy
+of $A_k$ of the system 21, 22 and 23 can also be applied here.
+
+For efficiency in computation, it is worth noting that for $b < 0$
+($-\infty < x \le b < 0$) the boundary condition 40 is not required
+for the solution of equation 39 and 40. This follows from the fact
+that any solution\footnote{The general solution of the differential
+equation 39. Since equation 39 has no bounded complementary solution
+for $-\infty < x \le b < 0$, every solution of it is equal to the
+particular integral $xe^{-x}Ei(x)$. On the other hand, a solution of
+equation 39 for $0 < x \le b < \infty$ would, in general, involve the
+complementary function. Hence, boundary condition 40 is required to
+guarantee that the solution of equation 39 is equal to
+$xe^{-x}Ei(x)$.} of the differential equation 39 is equal to 
+$xe^{-x}Ei(x)$ ($x=2b/(t+1)$). Hence the $A_k$ of $xe^{-x}Ei(x)$ for 
+$-\infty < x \le b < 0$ can be obtained without the use of equation
+39 and can be assumed to have the form
+\begin{equation}
+A_k = c\alpha_k,\quad(k=0,1,\ldots,M)
+\end{equation}
+The M+1 values of $\alpha_k$ can be generated by setting $\alpha_M=1$
+and computing $\alpha_k$ (k=0,1,$\ldots$,M-1) by means of equation
+43 by backward recurrence. The substitution of equation 46 into 42
+then enables one to determine $c$ from the resulting equation.
+
+\subsection{Remarks on Convergence and Accuracy}
+
+The Chebyshev coefficients of table 3 were computed on the IBM 7094
+with 50-digit normalized floating-point arithmetic. In order to assure
+that the sequence of approximate solutions (see Discusion) converged
+to the limiting solution of the differential equation in question, a
+trial M was incremented by 4 until the approximate Chebyshev
+coefficients showed no change greter than or equal to 
+$0.5\times 10^{-35}$. Hence the maximum error is bounded by
+\begin{equation}
+0.5(M+1)\times 10^{-35}+\sum_{M+1}^\infty{\vert A_k\vert}
+\end{equation}
+where the first term is the maximum error of the M+1 approximate
+Chebyshev coefficients, and the sum is the maximum error of the
+truncated Chebyshev series of M+1 terms. If the Chebyshev series is
+rapidly convergent, the maximum error of the approximate Chebyshev
+series should be of the order of $10^{-30}$. The coefficients of table
+3 have been rounded to 30 digits, and higher terms for $k > N$ giving
+the maximum residual
+\begin{equation}
+\sum_{k=N+1}^M{\vert A_k\vert} < 0.5\times 10^{-30}
+\end{equation}
+have been dropped. This should allow for evaluation of the relevant
+function that is accurate to 30 decimal places. Since the range of
+values of each function is bounded between 2/5 and 5, the evaluated
+function should be good to 30 significant digits. Taylor series
+evaluation also checks with that of the function values of table 4
+(computed with 30-digit floating-point arithmetic using the
+coefficients of table 3) for at least 28-1/2 significant
+digits. Evaluation of Ei(x) using the coefficients of table 3 also
+checked with Murnaghan and Wrench \cite{14} for 28-1/2 significant
+figures. 
+
+{\vbox{\vskip 1cm}}
+
+{\bf Table 3: Chebyshev Coefficients}
+(a)
+$$
+xe^{-x}Ei(x)=\sum_{k-0}^{40}\ {'}{A_kT_k(t)},\ \ t=(-20/x)-1,\ \ 
+(-\infty < x \le -10)
+$$
+\begin{tabular}{|r|r|}
+k & $A_k$\hbox{\hskip 3cm}\\
+&\\
+ 0 &  0.1912173225 8605534539 1519326510E 01\\
+ 1 & -0.4208355052 8684843755 0974986680E-01\\
+ 2 &  0.1722819627 2843267833 7118157835E-02\\
+ 3 & -0.9915782173 4445636455 9842322973E-04\\
+ 4 &  0.7176093168 0227750526 5590665592E-05\\
+ 5 & -0.6152733145 0951269682 7956791331E-06\\
+ 6 &  0.6024857106 5627583129 3999701610E-07\\
+ 7 & -0.6573848845 2883048229 5894189637E-08\\
+ 8 &  0.7853167541 8323998199 4810079871E-09\\
+ 9 & -0.1013730288 0038789855 4202774257E-09\\
+10 &  0.1399770413 2267686027 7823488623E-10\\
+11 & -0.2051008376 7838189961 8962318711E-11\\
+12 &  0.3168388726 0024778181 4907985818E-12\\
+13 & -0.5132760082 8391806541 5984751899E-13\\
+14 &  0.8680933040 7665493418 7433687383E-14\\
+15 & -0.1527015040 9030849719 8572355351E-14\\
+16 &  0.2784686251 6493573965 0105251453E-15\\
+17 & -0.5249890437 4217669680 8472933696E-16\\
+18 &  0.1020717991 2485612924 7455787226E-16\\
+\end{tabular}
+\begin{tabular}{|r|r|}
+19 & -0.2042264679 8997184130 8462421876E-17\\
+20 &  0.4197064172 7264847440 8827228562E-18\\
+21 & -0.8844508176 1728105081 6483737536E-19\\
+22 &  0.1908272629 5947174199 5060168262E-19\\
+23 & -0.4209746222 9351995033 6450865676E-20\\
+24 &  0.9483904058 1983732764 1500214512E-21\\
+25 & -0.2179467860 1366743199 4032574014E-21\\
+26 &  0.5103936869 0714509499 3452562741E-22\\
+27 & -0.1216883113 3344150908 9746779693E-22\\
+28 &  0.2951289166 4478751929 4773757144E-23\\
+29 & -0.7275353763 7728468971 4438950920E-24\\
+30 &  0.1821639048 6230739612 1667115976E-24\\
+31 & -0.4629629963 1633171661 2753482064E-25\\
+32 &  0.1193539790 9715779152 3052371292E-25\\
+33 & -0.3119493285 2201424493 1062147473E-26\\
+34 &  0.8261419734 5334664228 4170028518E-27\\
+35 & -0.2215803373 6609829830 2591177697E-27\\
+36 &  0.6016031671 6542638904 5303124429E-28\\
+37 & -0.1652725098 3821265964 9744302314E-28\\
+38 &  0.4592230358 7730270279 5636377166E-29\\
+39 & -0.1290062767 2132638473 7453212670E-29\\
+40 &  0.3662718481 0320025908 1177078922E-30\\
+\end{tabular}
+
+<<package DFSFUN DoubleFloatSpecialFunctions>>=
+
+        Ei1(y:OPR):OPR ==
+          infinite? y => 1
+          x:R:=retract(y)
+          t:R:=acos((-20.0::R/x)-1.0::R)::R
+          t01:=    0.191217322586055345391519326510E1::R*cos(0.0::R)/2.0::R
+          t02:=t01-0.420835505286848437550974986680E-01::R*cos(t::R)::R
+          t03:=t02+0.172281962728432678337118157835E-02::R*cos( 2.0::R*t)
+          t04:=t03-0.991578217344456364559842322973E-04::R*cos( 3.0::R*t)
+          t05:=t04+0.717609316802277505265590665592E-05::R*cos( 4.0::R*t)
+          t06:=t05-0.615273314509512696827956791331E-06::R*cos( 5.0::R*t)
+          t07:=t06+0.602485710656275831293999701610E-07::R*cos( 6.0::R*t)
+          t08:=t07-0.657384884528830482295894189637E-08::R*cos( 7.0::R*t)
+          t09:=t08+0.785316754183239981994810079871E-09::R*cos( 8.0::R*t)
+          t10:=t09-0.101373028800387898554202774257E-09::R*cos( 9.0::R*t)
+          t11:=t10+0.139977041322676860277823488623E-10::R*cos(10.0::R*t)
+          t12:=t11-0.205100837678381899618962318711E-11::R*cos(11.0::R*t)
+          t13:=t12+0.316838872600247781814907985818E-12::R*cos(12.0::R*t)
+          t14:=t13-0.513276008283918065415984751899E-13::R*cos(13.0::R*t)
+          t15:=t14+0.868093304076654934187433687383E-14::R*cos(14.0::R*t)
+          t16:=t15-0.152701504090308497198572355351E-14::R*cos(15.0::R*t)
+          t17:=t16+0.278468625164935739650105251453E-15::R*cos(16.0::R*t)
+          t18:=t17-0.524989043742176696808472933696E-16::R*cos(17.0::R*t)
+          t19:=t18+0.102071799124856129247455787226E-16::R*cos(18.0::R*t)
+          t20:=t19-0.204226467989971841308462421876E-17::R*cos(19.0::R*t)
+          t21:=t20+0.419706417272648474408827228562E-18::R*cos(20.0::R*t)
+          t22:=t21-0.884450817617281050816483737536E-19::R*cos(21.0::R*t)
+          t23:=t22+0.190827262959471741995060168262E-19::R*cos(22.0::R*t)
+          t24:=t23-0.420974622293519950336450865676E-20::R*cos(23.0::R*t)
+          t25:=t24+0.948390405819837327641500214512E-21::R*cos(24.0::R*t)
+          t26:=t25-0.217946786013667431994032574014E-21::R*cos(25.0::R*t)
+          t27:=t26+0.510393686907145094993452562741E-22::R*cos(26.0::R*t)
+          t28:=t27-0.121688311333441509089746779693E-22::R*cos(27.0::R*t)
+          t29:=t28+0.295128916644787519294773757144E-23::R*cos(28.0::R*t)
+          t30:=t29-0.727535376377284689714438950920E-24::R*cos(29.0::R*t)
+          t31:=t30+0.182163904862307396121667115976E-24::R*cos(30.0::R*t)
+          t32:=t31-0.462962996316331716612753482064E-25::R*cos(31.0::R*t)
+          t33:=t32+0.119353979097157791523052371292E-25::R*cos(32.0::R*t)
+          t34:=t33-0.311949328522014244931062147473E-26::R*cos(33.0::R*t)
+          t35:=t34+0.826141973453346642284170028518E-27::R*cos(34.0::R*t)
+          t36:=t35-0.221580337366098298302591177697E-27::R*cos(35.0::R*t)
+          t37:=t36+0.601603167165426389045303124429E-28::R*cos(36.0::R*t)
+          t38:=t37-0.165272509838212659649744302314E-28::R*cos(37.0::R*t)
+          t39:=t38+0.459223035877302702795636377166E-29::R*cos(38.0::R*t)
+          t40:=t39-0.129006276721326384737453212670E-29::R*cos(39.0::R*t)
+          t41:=t40+0.366271848103200259081177078922E-30::R*cos(40.0::R*t)
+          t41::OPR
+
+@
+
+{\vbox{\vskip 1cm}}
+
+{\bf Table 3: Chebyshev Coefficients - Continued}
+(b)
+$$
+xe^{-x}Ei(x)=\sum_{k-0}^{40}\ {'}{A_kT_k(t)},\ \ t=(x+7)/3,\ \ 
+(-10 \le x \le -4)
+$$
+\begin{tabular}{|r|r|}
+k & $A_k$\hbox{\hskip 3cm}\\
+&\\
+ 0 &  0.1757556496 0612937384 8762834691E 011\\
+ 1 & -0.4358541517 7361661170 5001867964E-01\\
+ 2 & -0.7979507139 5584254013 3217027492E-02\\
+ 3 & -0.1484372327 3037121385 0970210001E-02\\
+ 4 & -0.2800301984 3775145748 6203954948E-03\\
+ 5 & -0.5348648512 8657932303 9177361553E-04\\
+ 6 & -0.1032867243 5735548661 0233266460E-04\\
+ 7 & -0.2014083313 0055368773 2226198639E-05\\
+ 8 & -0.3961758434 2738664582 2338443500E-06\\
+ 9 & -0.7853872767 0966316306 7607656069E-07\\
+10 & -0.1567925981 0074698262 4616270279E-07\\
+11 & -0.3150055939 3763998825 0007372851E-08\\
+12 & -0.6365096822 5242037304 0380263972E-09\\
+13 & -0.1292888113 2805631835 6593121259E-09\\
+14 & -0.2638690999 6592557613 2149942808E-10\\
+15 & -0.5408958287 0450687349 1922207896E-11\\
+16 & -0.1113222784 6010898999 7676692708E-11\\
+17 & -0.2299624726 0744624618 4338864145E-12\\
+18 & -0.4766682389 4951902622 3913482091E-13\\
+19 & -0.9911756747 3352709450 6246643371E-14\\
+20 & -0.2067103580 4957072400 0900805021E-14\\
+\end{tabular}
+\begin{tabular}{|r|r|}
+21 & -0.4322776783 3833850564 5764394579E-15\\
+22 & -0.9063014799 6650172551 4905603356E-16\\
+23 & -0.1904669979 5816613974 4015963342E-16\\
+24 & -0.4011792326 3502786634 6744227520E-17\\
+25 & -0.8467772130 0168322313 4166334685E-18\\
+26 & -0.1790842733 6586966555 5826492204E-18\\
+27 & -0.3794490638 1714782440 1106175166E-19\\
+28 & -0.8053999236 7982798526 0999654058E-20\\
+29 & -0.1712339011 2362012974 3228671244E-20\\
+30 & -0.3646274058 7749686208 6576562816E-21\\
+31 & -0.7775969638 8939479435 3098157647E-22\\
+32 & -0.1660628498 4484020566 2531950966E-22\\
+33 & -0.3551178625 7882509300 5927145352E-23\\
+34 & -0.7603722685 9413580929 5734653294E-24\\
+35 & -0.1630074137 2584900288 9638374755E-24\\
+36 & -0.3498575202 7286322350 7538497255E-25\\
+37 & -0.7517179627 8900988246 0645145143E-26\\
+38 & -0.1616877440 0527227629 8777317918E-26\\
+39 & -0.3481270085 7247569174 8202271565E-27\\
+40 & -0.7502707775 5024654701 0642233720E-28\\
+41 & -0.1618454364 4959102680 7612330206E-28\\
+42 & -0.3494366771 7051616674 9482836452E-29\\
+43 & -0.7551036906 1261678585 6037026797E-30\\
+\end{tabular}
+
+<<package DFSFUN DoubleFloatSpecialFunctions>>=
+
+        Ei2(y:OPR):OPR ==
+          x:R:=retract(y)
+          t:R:=acos((x+7.0::R)/3.0::R)::R
+          t01:=    0.175755649606129373848762834691E1::R*cos(0.0::R)/2.0::R
+          t02:=t01-0.435854151773616611705001867964E-01::R*cos(t)
+          t03:=t02-0.797950713955842540133217027492E-02::R*cos( 2.0::R*t)
+          t04:=t03-0.148437232730371213850970210001E-02::R*cos( 3.0::R*t)
+          t05:=t04-0.280030198437751457486203954948E-03::R*cos( 4.0::R*t)
+          t06:=t05-0.534864851286579323039177361553E-04::R*cos( 5.0::R*t)
+          t07:=t06-0.103286724357355486610233266460E-04::R*cos( 6.0::R*t)
+          t08:=t07-0.201408331300553687732226198639E-05::R*cos( 7.0::R*t)
+          t09:=t08-0.396175843427386645822338443500E-06::R*cos( 8.0::R*t)
+          t10:=t09-0.785387276709663163067607656069E-07::R*cos( 9.0::R*t)
+          t11:=t10-0.156792598100746982624616270279E-07::R*cos(10.0::R*t)
+          t12:=t11-0.315005593937639988250007372851E-08::R*cos(11.0::R*t)
+          t13:=t12-0.636509682252420373040380263972E-09::R*cos(12.0::R*t)
+          t14:=t13-0.129288811328056318356593121259E-09::R*cos(13.0::R*t)
+          t15:=t14-0.263869099965925576132149942808E-10::R*cos(14.0::R*t)
+          t16:=t15-0.540895828704506873491922207896E-11::R*cos(15.0::R*t)
+          t17:=t16-0.111322278460108989997676692708E-11::R*cos(16.0::R*t)
+          t18:=t17-0.229962472607446246184338864145E-12::R*cos(17.0::R*t)
+          t19:=t18-0.476668238949519026223913482091E-13::R*cos(18.0::R*t)
+          t20:=t19-0.991175674733527094506246643371E-14::R*cos(19.0::R*t)
+          t21:=t20-0.206710358049570724000900805021E-14::R*cos(20.0::R*t)
+          t22:=t21-0.432277678338338505645764394579E-15::R*cos(21.0::R*t)
+          t23:=t22-0.906301479966501725514905603356E-16::R*cos(22.0::R*t)
+          t24:=t23-0.190466997958166139744015963342E-16::R*cos(23.0::R*t)
+          t25:=t24-0.401179232635027866346744227520E-17::R*cos(24.0::R*t)
+          t26:=t25-0.846777213001683223134166334685E-18::R*cos(25.0::R*t)
+          t27:=t26-0.179084273365869665555826492204E-18::R*cos(26.0::R*t)
+          t28:=t27-0.379449063817147824401106175166E-19::R*cos(27.0::R*t)
+          t29:=t28-0.805399923679827985260999654058E-20::R*cos(28.0::R*t)
+          t30:=t29-0.171233901123620129743228671244E-20::R*cos(29.0::R*t)
+          t31:=t30-0.364627405877496862086576562816E-21::R*cos(30.0::R*t)
+          t32:=t31-0.777596963889394794353098157647E-22::R*cos(31.0::R*t)
+          t33:=t32-0.166062849844840205662531950966E-22::R*cos(32.0::R*t)
+          t34:=t33-0.355117862578825093005927145352E-23::R*cos(33.0::R*t)
+          t35:=t34-0.760372268594135809295734653294E-24::R*cos(34.0::R*t)
+          t36:=t35-0.163007413725849002889638374755E-24::R*cos(35.0::R*t)
+          t37:=t36-0.349857520272863223507538497255E-25::R*cos(36.0::R*t)
+          t38:=t37-0.751717962789009882460645145143E-26::R*cos(37.0::R*t)
+          t39:=t38-0.161687744005272276298777317918E-26::R*cos(38.0::R*t)
+          t40:=t39-0.348127008572475691748202271565E-27::R*cos(39.0::R*t)
+          t41:=t40-0.750270777550246547010642233720E-28::R*cos(40.0::R*t)
+          t42:=t41-0.161845436449591026807612330206E-28::R*cos(41.0::R*t)
+          t43:=t42-0.349436677170516166749482836452E-29::R*cos(42.0::R*t)
+          t44:=t43-0.755103690612616785856037026797E-30::R*cos(43.0::R*t)
+          t44::OPR
+
+@
+{\vbox{\vskip 1cm}}
+
+{\bf Table 3: Chebyshev Coefficients - Continued}
+(c)
+$$
+[Ei-log\vert x\vert-\gamma]/x=
+\sum_{k-0}^{33}\ {'}{A_kT_k(t)},\ \ t=x/4,\ \ 
+(-4 \le x \le 4)
+$$
+\begin{tabular}{|r|r|}
+k & $A_k$\hbox{\hskip 3cm}\\
+&\\
+ 0 & 0.3293700103 7673912939 3905231421E 01\\
+ 1 & 0.1679835052 3713029156 5505796064E 01\\
+ 2 & 0.7220436105 6787543524 0299679644E 00\\
+ 3 & 0.2600312360 5480956171 3740181192E 00\\
+ 4 & 0.8010494308 1737502239 4742889237E-01\\
+ 5 & 0.2151403663 9763337548 0552483005E-01\\
+ 6 & 0.5116207789 9303312062 1968910894E-02\\
+ 7 & 0.1090932861 0073913560 5066199014E-02\\
+ 8 & 0.2107415320 2393891631 8348675226E-03\\
+ 9 & 0.3719904516 6518885709 5940815956E-04\\
+10 & 0.6043491637 1238787570 4767032866E-05\\
+11 & 0.9092954273 9626095264 9596541772E-06\\
+12 & 0.1273805160 6592647886 5567184969E-06\\
+13 & 0.1669185748 4109890739 0896143814E-07\\
+14 & 0.2054417026 4010479254 7612484551E-08\\
+15 & 0.2383584444 4668176591 4052321417E-09\\
+\end{tabular}
+\begin{tabular}{|r|r|}
+16 & 0.2615386378 8854429666 9068664148E-10\\
+17 & 0.2721858622 8541670644 6550268995E-11\\
+18 & 0.2693750031 9835792992 5326427442E-12\\
+19 & 0.2541220946 7072635546 7884089307E-13\\
+20 & 0.2290130406 8650370941 8510620516E-14\\
+21 & 0.1975465739 0746229940 1057650412E-15\\
+22 & 0.1634024551 9289317406 8635419984E-16\\
+23 & 0.1298235437 0796376099 1961293204E-17\\
+24 & 0.9922587925 0737105964 4632581302E-19\\
+25 & 0.7306252806 7221032944 7230880087E-20\\
+26 & 0.5189676834 6043451272 0780080019E-21\\
+27 & 0.3560409454 0997068112 8043162227E-22\\
+28 & 0.2361979432 5793864237 0187203948E-23\\
+29 & 0.1516837767 7214529754 9624516819E-24\\
+30 & 0.9439089722 2448744292 5310405245E-26\\
+31 & 0.5697227559 5036921198 9581737831E-27\\
+32 & 0.3338333627 7954330315 6597939562E-28\\
+33 & 0.1900626012 8161914852 6680482237E-29\\
+\end{tabular}
+
+\noindent
+($\gamma$=0.5772156649\ 0153286060\ 6512090082\ E\ 00)
+
+<<package DFSFUN DoubleFloatSpecialFunctions>>=
+
+        Ei3(y:OPR):OPR ==
+          x:R:=retract(y)
+          x = 0.0::R => 1
+          t:R:=acos(x/4.0::R)::R
+          t01:=    0.329370010376739129393905231421E1::R*cos(0.0::R)/2.0::R
+          t02:=t01+0.167983505237130291565505796064E1::R*cos(t)
+          t03:=t02+0.722043610567875435240299679644E0::R*cos( 2.0::R*t)
+          t04:=t03+0.260031236054809561713740181192E0::R*cos( 3.0::R*t)
+          t05:=t04+0.801049430817375022394742889237E-01::R*cos( 4.0::R*t)
+          t06:=t05+0.215140366397633375480552483005E-01::R*cos( 5.0::R*t)
+          t07:=t06+0.511620778993033120621968910894E-02::R*cos( 6.0::R*t)
+          t08:=t07+0.109093286100739135605066199014E-02::R*cos( 7.0::R*t)
+          t09:=t08+0.210741532023938916318348675226E-03::R*cos( 8.0::R*t)
+          t10:=t09+0.371990451665188857095940815956E-04::R*cos( 9.0::R*t)
+          t11:=t10+0.604349163712387875704767032866E-05::R*cos(10.0::R*t)
+          t12:=t11+0.909295427396260952649596541772E-06::R*cos(11.0::R*t)
+          t13:=t12+0.127380516065926478865567184969E-06::R*cos(12.0::R*t)
+          t14:=t13+0.166918574841098907390896143814E-07::R*cos(13.0::R*t)
+          t15:=t14+0.205441702640104792547612484551E-08::R*cos(14.0::R*t)
+          t16:=t15+0.238358444446681765914052321417E-09::R*cos(15.0::R*t)
+          t17:=t16+0.261538637888544296669068664148E-10::R*cos(16.0::R*t)
+          t18:=t17+0.272185862285416706446550268995E-11::R*cos(17.0::R*t)
+          t19:=t18+0.269375003198357929925326427442E-12::R*cos(18.0::R*t)
+          t20:=t19+0.254122094670726355467884089307E-13::R*cos(19.0::R*t)
+          t21:=t20+0.229013040686503709418510620516E-14::R*cos(20.0::R*t)
+          t22:=t21+0.197546573907462299401057650412E-15::R*cos(21.0::R*t)
+          t23:=t22+0.163402455192893174068635419984E-16::R*cos(22.0::R*t)
+          t24:=t23+0.129823543707963760991961293204E-17::R*cos(23.0::R*t)
+          t25:=t24+0.992258792507371059644632581302E-19::R*cos(24.0::R*t)
+          t26:=t25+0.730625280672210329447230880087E-20::R*cos(25.0::R*t)
+          t27:=t26+0.518967683460434512720780080019E-21::R*cos(26.0::R*t)
+          t28:=t27+0.356040945409970681128043162227E-22::R*cos(27.0::R*t)
+          t29:=t28+0.236197943257938642370187203948E-23::R*cos(28.0::R*t)
+          t30:=t29+0.151683776772145297549624516819E-24::R*cos(29.0::R*t)
+          t31:=t30+0.943908972224487442925310405245E-26::R*cos(30.0::R*t)
+          t32:=t31+0.569722755950369211989581737831E-27::R*cos(31.0::R*t)
+          t33:=t32+0.333833362779543303156597939562E-28::R*cos(32.0::R*t)
+          t34:=t33+0.190062601281619148526680482237E-29::R*cos(33.0::R*t)
+          t34::OPR
+
+@
+{\vbox{\vskip 1cm}}
+
+{\bf Table 3: Chebyshev Coefficients - Continued}
+(d) 
+$$
+xe^{-x}Ei(x)=\sum_{k-0}^{49}\ {'}{A_kT_k(t)},\ \ t=(x-8)/4,\ \ 
+(4 \le x \le 12)
+$$
+\begin{tabular}{|r|r|}
+k & $A_k$\hbox{\hskip 3cm}\\
+&\\
+ 0 &  0.2455133538 7812952867 3420457043E 01\\
+ 1 & -0.1624383791 3037652439 6002276856E 00\\
+ 2 &  0.4495753080 9357264148 0785417193E-01\\
+ 3 & -0.6741578679 9892299884 8718835050E-02\\
+ 4 & -0.1306697142 8032942805 1599341387E-02\\
+ 5 &  0.1381083146 0007257602 0202089820E-02\\
+ 6 & -0.5850228790 1596579868 7368242394E-03\\
+ 7 &  0.1749299341 0789197003 8740976432E-03\\
+ 8 & -0.4047281499 0529303552 2869333800E-04\\
+ 9 &  0.7217102412 1709975003 5752600049E-05\\
+10 & -0.8612776970 1986775241 4815450193E-06\\
+11 & -0.2514475296 5322559777 9084739054E-09 \\
+12 &  0.3794747138 2014951081 4074505574E-07\\
+13 & -0.1442117969 5211980616 0265640172E-07\\
+14 &  0.3935049295 9761013108 7190848042E-08\\
+15 & -0.9284689401 0633175304 7289210353E-09\\
+16 &  0.2031789568 0065461336 6090995698E-09\\
+17 & -0.4292498504 9923683142 7918026902E-10\\
+18 &  0.8992647177 7812393526 8001544182E-11\\
+19 & -0.1900869118 4121097524 2396635722E-11\\
+20 &  0.4092198912 2237383452 6121178338E-12\\
+21 & -0.8999253437 2931901982 5435824585E-13\\
+22 &  0.2019654670 8242638335 4948543451E-13\\
+23 & -0.4612930261 3830820719 4950531726E-14\\
+\end{tabular}
+\begin{tabular}{|r|r|}
+24 &  0.1069023072 9386369566 8857256409E-14\\
+25 & -0.2507030070 5700729569 2572254042E-15\\
+26 &  0.5937322503 7915516070 6073763509E-16\\
+27 & -0.1417734582 4376625234 4732005648E-16\\
+28 &  0.3409203754 3608089342 6806402093E-17\\
+29 & -0.8248290269 5054937928 8702529656E-18\\
+30 &  0.2006369712 6214423139 8824095937E-18\\
+31 & -0.4903851667 9674222440 3498152027E-19\\
+32 &  0.1203734482 3483321716 6664609324E-19\\
+33 & -0.2966282447 1413682538 1453572575E-20\\
+34 &  0.7335512384 2880759924 2142328436E-21\\
+35 & -0.1819924142 9085112734 4263485604E-21\\
+36 &  0.4528629374 2957606021 7359526404E-22\\
+37 & -0.1129980043 7506096133 8906717853E-22\\
+38 &  0.2826681251 2901165692 3764408445E-23\\
+39 & -0.7087717977 1690496166 6732640699E-24\\
+40 &  0.1781104524 0187095153 4401530034E-24\\
+41 & -0.4485004076 6189635731 2006142358E-25\\
+42 &  0.1131540292 5754766224 5053090840E-25\\
+43 & -0.2859957899 7793216379 0414326136E-26\\
+44 &  0.7240775806 9226736175 8172726753E-27\\
+45 & -0.1836132234 1257789805 0666710105E-27\\
+46 &  0.4663128735 2273048658 2600122073E-28\\
+47 & -0.1185959588 9190288794 6724005478E-28\\
+48 &  0.3020290590 5567131073 1137614875E-29\\
+49 & -0.7701650548 1663660609 8827057102E-30\\
+\end{tabular}
+
+<<package DFSFUN DoubleFloatSpecialFunctions>>=
+
+        Ei4(y:OPR):OPR ==
+          x:R:=retract(y)
+          t:R:=acos((x-8.0::R)/4.0::R)::R
+          t01:=    0.245513353878129528673420457043E1::R*cos(0.0::R)/2.0::R
+          t02:=t01-0.162438379130376524396002276856E0::R*cos(t)
+          t03:=t02+0.449575308093572641480785417193E-01::R*cos( 2.0::R*t)
+          t04:=t03-0.674157867998922998848718835050E-02::R*cos( 3.0::R*t)
+          t05:=t04-0.130669714280329428051599341387E-02::R*cos( 4.0::R*t)
+          t06:=t05+0.138108314600072576020202089820E-02::R*cos( 5.0::R*t)
+          t07:=t06-0.585022879015965798687368242394E-03::R*cos( 6.0::R*t)
+          t08:=t07+0.174929934107891970038740976432E-03::R*cos( 7.0::R*t)
+          t09:=t08-0.404728149905293035522869333800E-04::R*cos( 8.0::R*t)
+          t10:=t09+0.721710241217099750035752600049E-05::R*cos( 9.0::R*t)
+          t11:=t10-0.861277697019867752414815450193E-06::R*cos(10.0::R*t)
+          t12:=t11-0.251447529653225597779084739054E-09::R*cos(11.0::R*t)
+          t13:=t12+0.379474713820149510814074505574E-07::R*cos(12.0::R*t)
+          t14:=t13-0.144211796952119806160265640172E-07::R*cos(13.0::R*t)
+          t15:=t14+0.393504929597610131087190848042E-08::R*cos(14.0::R*t)
+          t16:=t15-0.928468940106331753047289210353E-09::R*cos(15.0::R*t)
+          t17:=t16+0.203178956800654613366090995698E-09::R*cos(16.0::R*t)
+          t18:=t17-0.429249850499236831427918026902E-10::R*cos(17.0::R*t)
+          t19:=t18+0.899264717778123935268001544182E-11::R*cos(18.0::R*t)
+          t20:=t19-0.190086911841210975242396635722E-11::R*cos(19.0::R*t)
+          t21:=t20+0.409219891222373834526121178338E-12::R*cos(20.0::R*t)
+          t22:=t21-0.899925343729319019825435824585E-13::R*cos(21.0::R*t)
+          t23:=t22+0.201965467082426383354948543451E-13::R*cos(22.0::R*t)
+          t24:=t23-0.461293026138308207194950531726E-14::R*cos(23.0::R*t)
+          t25:=t24+0.106902307293863695668857256409E-14::R*cos(24.0::R*t)
+          t26:=t25-0.250703007057007295692572254042E-15::R*cos(25.0::R*t)
+          t27:=t26+0.593732250379155160706073763509E-16::R*cos(26.0::R*t)
+          t28:=t27-0.141773458243766252344732005648E-16::R*cos(27.0::R*t)
+          t29:=t28+0.340920375436080893426806402093E-17::R*cos(28.0::R*t)
+          t30:=t29-0.824829026950549379288702529656E-18::R*cos(29.0::R*t)
+          t31:=t30+0.200636971262144231398824095937E-18::R*cos(30.0::R*t)
+          t32:=t31-0.490385166796742224403498152027E-19::R*cos(31.0::R*t)
+          t33:=t32+0.120373448234833217166664609324E-19::R*cos(32.0::R*t)
+          t34:=t33-0.296628244714136825381453572575E-20::R*cos(33.0::R*t)
+          t35:=t34+0.733551238428807599242142328436E-21::R*cos(34.0::R*t)
+          t36:=t35-0.181992414290851127344263485604E-21::R*cos(35.0::R*t)
+          t37:=t36+0.452862937429576060217359526404E-22::R*cos(36.0::R*t)
+          t38:=t37-0.112998004375060961338906717853E-22::R*cos(37.0::R*t)
+          t39:=t38+0.282668125129011656923764408445E-23::R*cos(38.0::R*t)
+          t40:=t39-0.708771797716904961666732640699E-24::R*cos(39.0::R*t)
+          t41:=t40+0.178110452401870951534401530034E-24::R*cos(40.0::R*t)
+          t42:=t41-0.448500407661896357312006142358E-25::R*cos(41.0::R*t)
+          t43:=t42+0.113154029257547662245053090840E-25::R*cos(42.0::R*t)
+          t44:=t43-0.285995789977932163790414326136E-26::R*cos(43.0::R*t)
+          t45:=t44+0.724077580692267361758172726753E-27::R*cos(44.0::R*t)
+          t46:=t45-0.183613223412577898050666710105E-27::R*cos(45.0::R*t)
+          t47:=t46+0.466312873522730486582600122073E-28::R*cos(46.0::R*t)
+          t48:=t47-0.118595958891902887946724005478E-28::R*cos(47.0::R*t)
+          t49:=t48+0.302029059055671310731137614875E-29::R*cos(48.0::R*t)
+          t50:=t49-0.770165054816636606098827057102E-30::R*cos(49.0::R*t)
+          t50::OPR
+
+@
+
+{\vbox{\vskip 1cm}}
+
+{\bf Table 3: Chebyshev Coefficients - Continued}
+(e)
+$$ xe^{-x}Ei(x)=\sum_{k-0}^{47}\ {'}{A_kT_k(t)},\ \ t=(x-22)/10,\ \ 
+(12 \le x \le 32)
+$$
+\begin{tabular}{|r|r|}
+k & $A_k$\hbox{\hskip 3cm}\\
+&\\
+ 0 &  0.2117028640 4369866832 9789991614E 01\\
+ 1 & -0.3204237273 7548579499 0618303177E-01\\
+ 2 &  0.8891732077 3531683589 0182400335E-02\\
+ 3 & -0.2507952805 1892993708 8352442063E-02\\
+ 4 &  0.7202789465 9598754887 5760902487E-03\\
+ 5 & -0.2103490058 5011305342 3531441256E-03\\
+ 6 &  0.6205732318 2769321658 8857730842E-04\\
+ 7 & -0.1826566749 8167026544 9155689733E-04\\
+ 8 &  0.5270651575 2893637580 7788296811E-05\\
+ 9 & -0.1459666547 6199457532 3066719367E-05\\
+10 &  0.3781719973 5896367198 0484193981E-06\\
+11 & -0.8842581282 8407192007 7971589012E-07\\
+12 &  0.1741749198 5383936137 7350309156E-07\\
+13 & -0.2313517747 0436906350 6474480152E-08\\
+14 & -0.1228609819 1808623883 2104835230E-09\\
+15 &  0.2349966236 3228637047 8311381926E-09\\
+16 & -0.1100719401 0272628769 0738963049E-09\\
+17 &  0.3848275157 8612071114 9705563369E-10\\
+18 & -0.1148440967 4900158965 8439301603E-10\\
+19 &  0.3056876293 0885208263 0893626200E-11\\
+20 & -0.7388278729 2847356645 4163131431E-12\\
+21 &  0.1630933094 1659411056 4148013749E-12\\
+22 & -0.3276989373 3127124965 7111774748E-13\\
+\end{tabular}
+\begin{tabular}{|r|r|}
+23 &  0.5898114347 0713196171 1164283918E-14\\
+24 & -0.9099707635 9564920464 3554720718E-15\\
+25 &  0.1040752382 6695538658 5405697541E-15\\
+26 & -0.1809815426 0592279322 7163355935E-17\\
+27 & -0.3777098842 5639477336 9593494417E-17\\
+28 &  0.1580332901 0284795713 6759888420E-17\\
+29 & -0.4684291758 8088273064 8433752957E-18\\
+30 &  0.1199516852 5919809370 7533478542E-18\\
+31 & -0.2823594749 8418651767 9349931117E-19\\
+32 &  0.6293738065 6446352262 7520190349E-20\\
+33 & -0.1352410249 5047975630 5343973177E-20\\
+34 &  0.2837106053 8552914159 0980426210E-21\\
+35 & -0.5867007420 2463832353 1936371015E-22\\
+36 &  0.1205247636 0954731111 2449686917E-22\\
+37 & -0.2474446616 9988486972 8416011246E-23\\
+38 &  0.5099962585 8378500814 2986465688E-24\\
+39 & -0.1058382578 7754224088 7093294733E-24\\
+40 &  0.2215276245 0704827856 6429387155E-25\\
+41 & -0.4679278754 7569625867 1852546231E-26\\
+42 &  0.9972872990 6020770482 4269828079E-27\\
+43 & -0.2143267945 2167880459 1907805844E-27\\
+44 &  0.4640656908 8381811433 8414829515E-28\\
+45 & -0.1011447349 2115139094 8461800780E-28\\
+46 &  0.2217211522 7100771109 3046878345E-29\\
+47 & -0.4884890469 2437855322 4914645512E-30\\
+\end{tabular}
+
+<<package DFSFUN DoubleFloatSpecialFunctions>>=
+
+        Ei5(y:OPR):OPR ==
+          x:R:=retract(y)
+          t:R:=acos((x-22.0::R)/10.0::R)::R
+          t01:=    0.211702864043698668329789991614E1::R*cos(0.0::R)::R/2.0::R
+          t02:=t01-0.320423727375485794990618303177E-01::R*cos(t)
+          t03:=t02+0.889173207735316835890182400335E-02::R*cos( 2.0::R*t)
+          t04:=t03-0.250795280518929937088352442063E-02::R*cos( 3.0::R*t)
+          t05:=t04+0.720278946595987548875760902487E-03::R*cos( 4.0::R*t)
+          t06:=t05-0.210349005850113053423531441256E-03::R*cos( 5.0::R*t)
+          t07:=t06+0.620573231827693216588857730842E-04::R*cos( 6.0::R*t)
+          t08:=t07-0.182656674981670265449155689733E-04::R*cos( 7.0::R*t)
+          t09:=t08+0.527065157528936375807788296811E-05::R*cos( 8.0::R*t)
+          t10:=t09-0.145966654761994575323066719367E-05::R*cos( 9.0::R*t)
+          t11:=t10+0.378171997358963671980484193981E-06::R*cos(10.0::R*t)
+          t12:=t11-0.884258128284071920077971589012E-07::R*cos(11.0::R*t)
+          t13:=t12+0.174174919853839361377350309156E-07::R*cos(12.0::R*t)
+          t14:=t13-0.231351774704369063506474480152E-08::R*cos(13.0::R*t)
+          t15:=t14-0.122860981918086238832104835230E-09::R*cos(14.0::R*t)
+          t16:=t15+0.234996623632286370478311381926E-09::R*cos(15.0::R*t)
+          t17:=t16-0.110071940102726287690738963049E-09::R*cos(16.0::R*t)
+          t18:=t17+0.384827515786120711149705563369E-10::R*cos(17.0::R*t)
+          t19:=t18-0.114844096749001589658439301603E-10::R*cos(18.0::R*t)
+          t20:=t19+0.305687629308852082630893626200E-11::R*cos(19.0::R*t)
+          t21:=t20-0.738827872928473566454163131431E-12::R*cos(20.0::R*t)
+          t22:=t21+0.163093309416594110564148013749E-12::R*cos(21.0::R*t)
+          t23:=t22-0.327698937331271249657111774748E-13::R*cos(22.0::R*t)
+          t24:=t23+0.589811434707131961711164283918E-14::R*cos(23.0::R*t)
+          t25:=t24-0.909970763595649204643554720718E-15::R*cos(24.0::R*t)
+          t26:=t25+0.104075238266955386585405697541E-15::R*cos(25.0::R*t)
+          t27:=t26-0.180981542605922793227163355935E-17::R*cos(26.0::R*t)
+          t28:=t27-0.377709884256394773369593494417E-17::R*cos(27.0::R*t)
+          t29:=t28+0.158033290102847957136759888420E-17::R*cos(28.0::R*t)
+          t30:=t29-0.468429175880882730648433752957E-18::R*cos(29.0::R*t)
+          t31:=t30+0.119951685259198093707533478542E-18::R*cos(30.0::R*t)
+          t32:=t31-0.282359474984186517679349931117E-19::R*cos(31.0::R*t)
+          t33:=t32+0.629373806564463522627520190349E-20::R*cos(32.0::R*t)
+          t34:=t33-0.135241024950479756305343973177E-20::R*cos(33.0::R*t)
+          t35:=t34+0.283710605385529141590980426210E-21::R*cos(34.0::R*t)
+          t36:=t35-0.586700742024638323531936371015E-22::R*cos(35.0::R*t)
+          t37:=t36+0.120524763609547311112449686917E-22::R*cos(36.0::R*t)
+          t38:=t37-0.247444661699884869728416011246E-23::R*cos(37.0::R*t)
+          t39:=t38+0.509996258583785008142986465688E-24::R*cos(38.0::R*t)
+          t40:=t39-0.105838257877542240887093294733E-24::R*cos(39.0::R*t)
+          t41:=t40+0.221527624507048278566429387155E-25::R*cos(40.0::R*t)
+          t42:=t41-0.467927875475696258671852546231E-26::R*cos(41.0::R*t)
+          t43:=t42+0.997287299060207704824269828079E-27::R*cos(42.0::R*t)
+          t44:=t42-0.214326794521678804591907805844E-27::R*cos(43.0::R*t)
+          t45:=t42+0.464065690883818114338414829515E-28::R*cos(44.0::R*t)
+          t46:=t42-0.101144734921151390948461800780E-28::R*cos(45.0::R*t)
+          t47:=t42+0.221721152271007711093046878345E-29::R*cos(46.0::R*t)
+          t48:=t42-0.488489046924378553224914645512E-30::R*cos(47.0::R*t)
+          t48::OPR
+
+@
+{\vbox{\vskip 1cm}}
+
+{\bf Table 3: Chebyshev Coefficients - Continued}
+(f)
+$$ xe^{-x}Ei(x)=\sum_{k-0}^{46}\ {'}{A_kT_k(t)},\ \ t=(64/x)-1,\ \ 
+(32 \le x < \infty)
+$$
+\begin{tabular}{|r|r|}
+k & $A_k$\hbox{\hskip 3cm}\\
+&\\
+ 0 &  0.2032843945 7961669908 7873844202E 01\\
+ 1 &  0.1669920452 0313628514 7618434339E-01\\
+ 2 &  0.2845284724 3613468074 2489985325E-03\\
+ 3 &  0.7563944358 5162064894 8786693854E-05\\
+ 4 &  0.2798971289 4508591575 0484318090E-06\\
+ 5 &  0.1357901828 5345310695 2556392593E-07\\
+ 6 &  0.8343596202 0404692558 5610289412E-09\\
+ 7 &  0.6370971727 6402484382 7524337306E-10\\
+ 8 &  0.6007247608 8118612357 6083084850E-11\\
+ 9 &  0.7022876174 6797735907 5059216588E-12\\
+10 &  0.1018302673 7036876930 9667322152E-12\\
+11 &  0.1761812903 4308800404 0656741554E-13\\
+12 &  0.3250828614 2353606942 4072007647E-14\\
+13 &  0.5071770025 5058186788 1479300685E-15\\
+14 &  0.1665177387 0432942985 3520036957E-16\\
+15 & -0.3166753890 7975144007 2410018963E-16\\
+16 & -0.1588403763 6641415154 8423134074E-16\\
+17 & -0.4175513256 1380188308 9626455063E-17\\
+18 & -0.2892347749 7071418820 2868862358E-18\\
+19 &  0.2800625903 3966080728 9978777339E-18\\
+20 &  0.1322938639 5392708914 0532005364E-18\\
+21 &  0.1804447444 1773019958 5334811191E-19\\
+22 & -0.7905384086 5226165620 2021080364E-20\\
+23 & -0.4435711366 3695734471 8167314045E-20\\
+\end{tabular}
+\begin{tabular}{|r|r|}
+24 & -0.4264103994 9781026176 0579779746E-21\\
+25 &  0.3920101766 9371439072 5625388636E-21\\
+26 &  0.1527378051 3439636447 2804486402E-21\\
+27 & -0.1024849527 0494906078 6953149788E-22\\
+28 & -0.2134907874 7710893794 8904287231E-22\\
+29 & -0.3239139475 1602368761 4279789345E-23\\
+30 &  0.2142183762 2964597029 6249355934E-23\\
+31 &  0.8234609419 6189955316 9207838151E-24\\
+32 & -0.1524652829 6206721081 1495038147E-24\\
+33 & -0.1378208282 4882440129 0438126477E-24\\
+34 &  0.2131311201 4287370679 1513005998E-26\\
+35 &  0.2012649651 8713266585 9213006507E-25\\
+36 &  0.1995535662 0563740232 0607178286E-26\\
+37 & -0.2798995812 2017971142 6020884464E-26\\
+38 & -0.5534511830 5070025094 9784942560E-27\\
+39 &  0.3884995422 6845525312 9749000696E-27\\
+40 &  0.1121304407 2330701254 0043264712E-27\\
+41 & -0.5566568286 7445948805 7823816866E-28\\
+42 & -0.2045482612 4651357628 8865878722E-28\\
+43 &  0.8453814064 4893808943 7361193598E-29\\
+44 &  0.3565755151 2015152659 0791715785E-29\\
+45 & -0.1383652423 4779775181 0195772006E-29\\
+46 & -0.6062142653 2093450576 7865286306E-30\\
+\end{tabular}
+
+<<package DFSFUN DoubleFloatSpecialFunctions>>=
+
+        Ei6(y:OPR):OPR ==
+          infinite? y => 1
+          x:R:=retract(y)
+          m:R:=64.0::R/x-1.0::R
+          t:R:=acos(m::R)::R
+          t01:=    0.203284394579616699087873844202E1::R*cos(0.0::R)::R/2.0::R
+          t02:=t01+0.166992045203136285147618434339E-01::R*cos(t)
+          t03:=t02+0.284528472436134680742489985325E-03::R*cos( 2.0::R*t)
+          t04:=t03+0.756394435851620648948786693854E-05::R*cos( 3.0::R*t)
+          t05:=t04+0.279897128945085915750484318090E-06::R*cos( 4.0::R*t)
+          t06:=t05+0.135790182853453106952556392593E-07::R*cos( 5.0::R*t)
+          t07:=t06+0.834359620204046925585610289412E-09::R*cos( 6.0::R*t)
+          t08:=t07+0.637097172764024843827524337306E-10::R*cos( 7.0::R*t)
+          t09:=t08+0.600724760881186123576083084850E-11::R*cos( 8.0::R*t)
+          t10:=t09+0.702287617467977359075059216588E-12::R*cos( 9.0::R*t)
+          t11:=t10+0.101830267370368769309667322152E-12::R*cos(10.0::R*t)
+          t12:=t11+0.176181290343088004040656741554E-13::R*cos(11.0::R*t)
+          t13:=t12+0.325082861423536069424072007647E-14::R*cos(12.0::R*t)
+          t14:=t13+0.507177002550581867881479300685E-15::R*cos(13.0::R*t)
+          t15:=t14+0.166517738704329429853520036957E-16::R*cos(14.0::R*t)
+          t16:=t15-0.316675389079751440072410018963E-16::R*cos(15.0::R*t)
+          t17:=t16-0.158840376366414151548423134074E-16::R*cos(16.0::R*t)
+          t18:=t17-0.417551325613801883089626455063E-17::R*cos(17.0::R*t)
+          t19:=t18-0.289234774970714188202868862358E-18::R*cos(18.0::R*t)
+          t20:=t19+0.280062590339660807289978777339E-18::R*cos(19.0::R*t)
+          t21:=t20+0.132293863953927089140532005364E-18::R*cos(20.0::R*t)
+          t22:=t21+0.180444744417730199585334811191E-19::R*cos(21.0::R*t)
+          t23:=t22-0.790538408652261656202021080364E-20::R*cos(22.0::R*t)
+          t24:=t23-0.443571136636957344718167314045E-20::R*cos(23.0::R*t)
+          t25:=t24-0.426410399497810261760579779746E-21::R*cos(24.0::R*t)
+          t26:=t25+0.392010176693714390725625388636E-21::R*cos(25.0::R*t)
+          t27:=t26+0.152737805134396364472804486402E-21::R*cos(26.0::R*t)
+          t28:=t27-0.102484952704949060786953149788E-22::R*cos(27.0::R*t)
+          t29:=t28-0.213490787477108937948904287231E-22::R*cos(28.0::R*t)
+          t30:=t29-0.323913947516023687614279789345E-23::R*cos(29.0::R*t)
+          t31:=t30+0.214218376229645970296249355934E-23::R*cos(30.0::R*t)
+          t32:=t31+0.823460941961899553169207838151E-24::R*cos(31.0::R*t)
+          t33:=t32-0.152465282962067210811495038147E-24::R*cos(32.0::R*t)
+          t34:=t33-0.137820828248824401290438126477E-24::R*cos(33.0::R*t)
+          t35:=t34+0.213131120142873706791513005998E-26::R*cos(34.0::R*t)
+          t36:=t35+0.201264965187132665859213006507E-25::R*cos(35.0::R*t)
+          t37:=t36+0.199553566205637402320607178286E-26::R*cos(36.0::R*t)
+          t38:=t37-0.279899581220179711426020884464E-26::R*cos(37.0::R*t)
+          t39:=t38-0.553451183050700250949784942560E-27::R*cos(38.0::R*t)
+          t40:=t39+0.388499542268455253129749000696E-27::R*cos(39.0::R*t)
+          t41:=t40+0.112130440723307012540043264712E-27::R*cos(40.0::R*t)
+          t42:=t41-0.556656828674459488057823816866E-28::R*cos(41.0::R*t)
+          t43:=t42-0.204548261246513576288865878722E-28::R*cos(42.0::R*t)
+          t44:=t43+0.845381406448938089437361193598E-29::R*cos(43.0::R*t)
+          t45:=t44+0.356575515120151526590791715785E-29::R*cos(44.0::R*t)
+          t46:=t45-0.138365242347797751810195772006E-29::R*cos(45.0::R*t)
+          t47:=t46-0.606214265320934505767865286306E-30::R*cos(46.0::R*t)
+          t47::OPR
+
+@
+
+{\vbox{\vskip 1cm}}
+
+{\bf Table 4: Function Values of the Associated Functions}
+
+{\vbox{\vskip 1cm}}
+
+\begin{tabular}{|r|c|r|}
+x\hbox{\hskip 0.5cm} & $t=-(20/x)-1$ & $xe^{-x}Ei(x)$\hbox{\hskip 3cm}\\
+&&\\
+$-\infty$ & -1.000 & 0.1000000000 0000000000 0000000000 E 01\\
+-160      & -0.875 & 0.9938266956 7406127387 8797850088 E 00\\
+-80       & -0.750 & 0.9878013330 9428877356 4522608410 E 00\\
+-53 1/3   & -0.625 & 0.9819162901 4319443961 7735426105 E 00\\
+-40       & -0.500 & 0.9761646031 8514305080 8000604060 E 00\\
+-32       & -0.375 & 0.9705398840 7466392046 2584664361 E 00\\
+-26 2/3   & -0.250 & 0.9650362511 2337703576 3536593528 E 00\\
+-22 6/7   & -0.125 & 0.9596482710 7936727616 5478970820 E 00\\
+-20       & -0.000 & 0.9543709099 1921683397 5195829433 E 00\\
+-17 7/9   &  0.125 & 0.9491994907 7974574460 6445346803 E 00\\
+-16       &  0.250 & 0.9441296577 3690297898 4149471583 E 00\\
+-14 6/11  &  0.375 & 0.9391573444 1928424124 0422409988 E 00\\
+-13 1/3   &  0.500 & 0.9342787466 5341046480 9375801650 E 00\\
+-12 4/13  &  0.625 & 0.9294902984 9721403772 5319679042 E 00\\
+-11 3/7   &  0.750 & 0.9247886511 4084169605 5993585492 E 00\\
+-10 2/3   &  0.875 & 0.9201706542 4944567620 2148012149 E 00\\
+-10       &  1.000 & 0.9156333393 9788081876 0698157666 E 00
+\end{tabular}
+
+{\vbox{\vskip 1cm}}
+
+\begin{tabular}{|r|c|r|}
+x\hbox{\hskip 0.5cm} & $t=-(x+7)/3$ & $xe^{-x}Ei(x)$\hbox{\hskip 3cm}\\
+&&\\
+-10.000 & -1.000 & 0.9156333393 9788081876 0698157661 E 01\\
+ -9.625 & -0.875 & 0.9128444614 6799341885 6575662217 E 00\\
+ -9.250 & -0.750 & 0.9098627515 2542413937 8954274597 E 00\\
+ -8.875 & -0.625 & 0.9066672706 5475388033 4995756418 E 00\\
+ -8.500 & -0.500 & 0.9032339019 7320784414 4682926135 E 00\\
+ -8.125 & -0.375 & 0.8995347176 8847383630 1415777697 E 00\\
+ -7.750 & -0.250 & 0.8955371870 8753915717 9475513219 E 00\\
+ -7.375 & -0.125 & 0.8912031763 2125431626 7087476258 E 00\\
+ -7.000 & -0.000 & 0.8864876725 3642935289 3993846569 E 00\\
+ -6.625 &  0.125 & 0.8813371384 6821020039 4305706270 E 00\\
+ -6.250 &  0.250 & 0.8756873647 8846593227 6462155532 E 00\\
+ -5.875 &  0.375 & 0.8694606294 5411341030 2047153364 E 00\\
+ -5.500 &  0.500 & 0.8625618846 9070142209 0918986586 E 00\\
+ -5.125 &  0.625 & 0.8548735538 9019954239 2425567234 E 00\\
+ -4.750 &  0.750 & 0.8462482991 0358736117 1665798810 E 00\\
+ -4.375 &  0.875 & 0.8364987545 5629874174 2152267582 E 00\\
+ -4.000 &  1.000 & 0.8253825996 0422333240 8183035504 E 00
+\end{tabular}
+
+{\vbox{\vskip 1cm}}
+
+\begin{tabular}{|r|c|r|}
+x\hbox{\hskip 0.5cm} & $t=x/4$ &
+$[Ei(x)-log\vert x\vert - \gamma]/x$\hbox{\hskip 2cm}\\
+&&\\
+ -4.0 & -1.000 & 0.4918223446 0781809647 9962798267 E 00\\
+ -3.5 & -0.875 & 0.5248425066 4412835691 8258753311 E 00\\
+ -3.0 & -0.750 & 0.5629587782 2127986313 8086024270 E 00\\
+ -2.5 & -0.625 & 0.6073685258 5838306451 4266925640 E 00\\
+ -2.0 & -0.500 & 0.6596316780 8476964479 5492023380 E 00\\
+ -1.5 & -0.375 & 0.7218002369 4421992965 7623030310 E 00\\
+ -1.0 & -0.250 & 0.7965995992 9705313428 3675865540 E 00\\
+ -0.5 & -0.125 & 0.8876841582 3549672587 2151815870 E 00\\
+  0.0 & -0.000 & 0.1000000000 0000000000 0000000000 E 01\\
+  0.5 &  0.125 & 0.1140302841 0431720574 6248768807 E 01\\
+  1.0 &  0.250 & 0.1317902151 4544038948 6000884424 E 01\\
+  1.5 &  0.375 & 0.1545736450 7467337302 4859074039 E 01\\
+  2.0 &  0.500 & 0.1841935755 2702059966 7788045934 E 01\\
+  2.5 &  0.625 & 0.2232103799 1211651144 5340506423 E 01\\
+  3.0 &  0.750 & 0.2752668205 6852580020 0219289740 E 01\\
+  3.5 &  0.875 & 0.3455821531 9301241243 7300898811 E 01\\
+  4.0 &  1.000 & 0.4416841111 0086991358 0118598668 E 01
+\end{tabular}
+
+{\vbox{\vskip 1cm}}
+
+\begin{tabular}{|r|c|r|}
+x\hbox{\hskip 0.5cm} & $t=(x-8)/4$ &$xe^{-x}Ei(x)$\hbox{\hskip 3cm}\\
+&&\\
+ 4.0 & -1.000 & 0.1438208031 4544827847 0968670330 E 01\\
+ 4.5 & -0.875 & 0.1396419029 6297460710 0674523183 E 01\\
+ 5.0 & -0.750 & 0.1353831277 4552859779 0189174047 E 01\\
+ 5.5 & -0.625 & 0.1314143565 7421192454 1219816991 E 01\\
+ 6.0 & -0.500 & 0.1278883860 4895616189 2314099578 E 01\\
+ 6.5 & -0.375 & 0.1248391155 0017014864 0741941387 E 01\\
+ 7.0 & -0.250 & 0.1222408052 3605310590 3656846622 E 01\\
+ 7.5 & -0.125 & 0.1200421499 5996307864 3879158950 E 01\\
+ 8.0 & -0.000 & 0.1181847986 9872079731 7739362644 E 01\\
+ 8.5 &  0.125 & 0.1166126525 8117484943 9918142965 E 01\\
+ 9.0 &  0.250 & 0.1152759208 7089248132 2396814952 E 01\\
+ 9.5 &  0.375 & 0.1141323475 9526242015 5338560641 E 01\\
+10.0 &  0.500 & 0.1131470204 7341077803 4051681355 E 01\\
+10.5 &  0.625 & 0.1122915570 0177606064 2888630755 E 01\\
+11.0 &  0.750 & 0.1115430938 9980384416 4779434229 E 01\\
+11.5 &  0.875 & 0.1108832926 3050773058 6855234934 E 01\\
+12.0 &  1.000 & 0.1102974544 9067590726 7241234953 E 01\\
+\end{tabular}
+
+{\vbox{\vskip 1cm}}
+
+\begin{tabular}{|r|c|r|}
+x\hbox{\hskip 0.5cm} & $t=(x-22)/10$ &$xe^{-x}Ei(x)$\hbox{\hskip 3cm}\\
+&&\\
+12.00 & -1.000 & 0.1102974544 9067590726 7241234952 E 01\\
+13.25 & -0.875 & 0.1090844898 2154756926 6468614954 E 01\\
+14.50 & -0.750 & 0.1081351395 7351912850 6346643795 E 01\\
+15.75 & -0.625 & 0.1073701384 1997572371 2157900374 E 01\\
+17.00 & -0.500 & 0.1067393691 9585378312 9572196197 E 01\\
+18.25 & -0.375 & 0.1062096608 6221502426 8372647556 E 01\\
+19.50 & -0.250 & 0.1057581342 1587250319 5393949410 E 01\\
+20.75 & -0.125 & 0.1053684451 2894094408 2102194964 E 01\\
+22.00 & -0.000 & 0.1050285719 6851897941 1780664532 E 01\\
+23.25 &  0.125 & 0.1047294551 7053248581 1492365591 E 01\\
+24.50 &  0.250 & 0.1044641267 9046436368 9761075289 E 01\\
+25.75 &  0.375 & 0.1042271337 2023202388 5710928048 E 01\\
+27.00 &  0.500 & 0.1040141438 3230104381 3713899754 E 01\\
+28.25 &  0.625 & 0.1038216700 3601458768 0056548394 E 01\\
+29.50 &  0.750 & 0.1036468726 2924118457 5154685419 E 01\\
+30.75 &  0.875 & 0.1034874149 8964796947 2990938990 E 01\\
+32.00 &  1.000 & 0.1033413564 2162410494 3493552567 E 01\\
+\end{tabular}
+
+{\vbox{\vskip 1cm}}
+
+\begin{tabular}{|r|c|r|}
+x\hbox{\hskip 0.5cm} & $t=(64/x)-1$ &$xe^{-x}Ei(x)$\hbox{\hskip 3cm}\\
+&&\\
+$\infty$ & -1.000 & 0.100000000 0000000000 00000000001 E 01\\
+512      & -0.875 & 0.100196079 9450711925 31337468473 E 01\\
+256      & -0.750 & 0.100393713 0905698627 88009078297 E 01\\
+170 2/3  & -0.625 & 0.100592927 5692929112 94663030932 E 01\\
+128      & -0.500 & 0.100793752 4408140182 81776821694 E 01\\
+102 2/5  & -0.375 & 0.100996217 7406449755 74367545570 E 01\\
+85 1/3   & -0.250 & 0.101200354 5332988482 01864466702 E 01\\
+73 1/7   & -0.125 & 0.101406194 9696971331 45942329335 E 01\\
+64       & -0.000 & 0.101613772 3494325321 70357100831 E 01\\
+56 8/9   &  0.125 & 0.101823121 1884832696 82337017143 E 01\\
+51 1/5   &  0.250 & 0.102034277 2930783774 87217829808 E 01\\
+46 6/11  &  0.375 & 0.102247277 8405420595 91275364791 E 01\\
+42 2/3   &  0.500 & 0.102462161 4681078391 01187804247 E 01\\
+39 5/13  &  0.625 & 0.102678968 3709028524 50984510823 E 01\\
+36 4/7   &  0.750 & 0.102897740 4105808008 63378435059 E 01\\
+34 2/15  &  0.875 & 0.103118521 2364659263 55875784663 E 01\\
+32       &  1.000 & 0.103341356 4216241049 43493552567 E 01\\
+\end{tabular}
+
+<<package DFSFUN DoubleFloatSpecialFunctions>>=
+
+        polygamma(k,z)  == CPSI(k, z)$Lisp
+        polygamma(k,x)  == RPSI(k, x)$Lisp
+
+        logGamma z      == CLNGAMMA(z)$Lisp
+        logGamma x      == RLNGAMMA(x)$Lisp
+
+        besselJ(v,z)    == CBESSELJ(v,z)$Lisp
+        besselJ(n,x)    == RBESSELJ(n,x)$Lisp
+
+        besselI(v,z)    == CBESSELI(v,z)$Lisp
+        besselI(n,x)    == RBESSELI(n,x)$Lisp
+
+        hypergeometric0F1(a,z) == CHYPER0F1(a, z)$Lisp
+        hypergeometric0F1(n,x) == retract hypergeometric0F1(n::C, x::C)
+
+
+        -- All others are defined in terms of these.
+        digamma x == polygamma(0, x)
+        digamma z == polygamma(0, z)
+
+        Beta(x,y) == Gamma(x)*Gamma(y)/Gamma(x+y)
+        Beta(w,z) == Gamma(w)*Gamma(z)/Gamma(w+z)
+
+        fuzz := (10::R)**(-7)
+
+        import IntegerRetractions(R)
+        import IntegerRetractions(C)
+
+        besselY(n,x) ==
+            if integer? n then n := n + fuzz
+            vp := n * pi()$R
+            (cos(vp) * besselJ(n,x) - besselJ(-n,x) )/sin(vp)
+        besselY(v,z) ==
+            if integer? v then v := v + fuzz::C
+            vp := v * pi()$C
+            (cos(vp) * besselJ(v,z) - besselJ(-v,z) )/sin(vp)
+
+        besselK(n,x) ==
+            if integer? n then n := n + fuzz
+            p    := pi()$R
+            vp   := n*p
+            ahalf:= 1/(2::R)
+            p * ahalf * ( besselI(-n,x) - besselI(n,x) )/sin(vp)
+        besselK(v,z) ==
+            if integer? v then v := v + fuzz::C
+            p    := pi()$C
+            vp   := v*p
+            ahalf:= 1/(2::C)
+            p * ahalf * ( besselI(-v,z) - besselI(v,z) )/sin(vp)
+
+        airyAi x ==
+            ahalf  := recip(2::R)::R
+            athird := recip(3::R)::R
+            eta := 2 * athird * (-x) ** (3*ahalf)
+            (-x)**ahalf * athird * (besselJ(-athird,eta) + besselJ(athird,eta))
+        airyAi z ==
+            ahalf  := recip(2::C)::C
+            athird := recip(3::C)::C
+            eta := 2 * athird * (-z) ** (3*ahalf)
+            (-z)**ahalf * athird * (besselJ(-athird,eta) + besselJ(athird,eta))
+
+        airyBi x ==
+            ahalf  := recip(2::R)::R
+            athird := recip(3::R)::R
+            eta := 2 * athird * (-x) ** (3*ahalf)
+            (-x*athird)**ahalf * ( besselJ(-athird,eta) - besselJ(athird,eta) )
+
+        airyBi z ==
+            ahalf  := recip(2::C)::C
+            athird := recip(3::C)::C
+            eta := 2 * athird * (-z) ** (3*ahalf)
+            (-z*athird)**ahalf * ( besselJ(-athird,eta) - besselJ(athird,eta) )
+
+@
+<<DFSFUN.dotabb>>=
+"DFSFUN" [color="#FF4488",href="bookvol10.4.pdf#nameddest=DFSFUN"]
+"COMPCAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=COMPCAT"]
+"DFSFUN" -> "COMPCAT"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{package DBLRESP DoubleResultantPackage}
 \pagehead{DoubleResultantPackage}{DBLRESP}
 \pagepic{ps/v104doubleresultantpackage.ps}{DBLRESP}{1.00}
@@ -18102,6 +20498,123 @@ ExpressionFunctions2(R:OrderedSet, S:OrderedSet):
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package EXPRSOL ExpressionSolve}
+
+\subsection{Bugs}
+
+\begin{verbatim}
+seriesSolve(sin f x / cos x, f, x, [1])$EXPRSOL(INT, EXPR INT, UFPS EXPR INT, UFPS SUPEXPR EXPR INT)
+\end{verbatim}
+returns 
+\begin{verbatim}
+(((0 . 1) 0 . 1) NonNullStream #<compiled-function |STREAM;generate;M$;62!0|> . UNPRINTABLE)
+\end{verbatim}
+
+but
+\begin{verbatim}
+U ==> UFPS SUPEXPR EXPR INT
+seriesSolve(s +-> sin s *((cos monomial(1,1)$U)**-1)$U, f, x, [0])$EXPRSOL(INT, EXPR INT, UFPS EXPR INT, UFPS SUPEXPR EXPR INT)
+\end{verbatim}
+
+works. This is probably due to missing ``/'' in UFPS.
+
+\begin{verbatim}
+  I'd really like to be able to specify a function that works for all domains
+  in a category. For example, [[x +-> y(x)^2 + sin x + x]] should \lq work\rq\
+  for [[EXPR INT]] as well as for [[UTS INT]], both being domains having
+  [[TranscendentalFunctionCategory]].
+\end{verbatim}
+
+\pagehead{ExpressionSolve}{EXPRSOL}
+\pagepic{ps/v104expressionsolve.ps}{EXPRSOL}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package EXPRSOL ExpressionSolve>>=
+)abb package EXPRSOL ExpressionSolve
+ExpressionSolve(R, F, UTSF, UTSSUPF): Exports == Implementation where
+    R: Join(OrderedSet, IntegralDomain, ConvertibleTo InputForm)
+    F: FunctionSpace R
+    UTSF: UnivariateTaylorSeriesCategory F
+    SUP  ==> SparseUnivariatePolynomialExpressions
+    UTSSUPF: UnivariateTaylorSeriesCategory SUP F
+    OP   ==> BasicOperator
+    SY   ==> Symbol
+    NNI  ==> NonNegativeInteger
+    MKF ==> MakeBinaryCompiledFunction(F, UTSSUPF, UTSSUPF, UTSSUPF)
+
+    Exports == with
+
+        seriesSolve: (F, OP, SY, List F) -> UTSF
+        replaceDiffs: (F, OP, Symbol) -> F
+
+    Implementation == add
+<<implementation: EXPRSOL ExpressionSolve>>
+@
+
+The general method is to transform the given expression into a form which can
+then be compiled. There is currently no other way in Axiom to transform an
+expression into a function.
+
+We need to replace the differentiation operator by the corresponding function
+in the power series category, and make composition explicit. Furthermore, we
+need to replace the variable by the corresponding variable in the power series.
+It turns out that the compiler doesn't find the right definition of
+monomial(1,1). Thus we introduce it as a second argument. In fact, maybe
+that's even cleaner. Also, we need to tell the compiler that kernels that are
+independent of the main variable should be coerced to elements of the
+coefficient ring, since it will complain otherwise.
+\begin{verbatim}
+  I cannot find an example for this behaviour right now. However, if I do use
+  the coerce, the following fails:
+
+     seriesSolve(h x -1-x*h x *h(q*x), h, x, [1])
+
+\end{verbatim}
+
+<<implementation: EXPRSOL ExpressionSolve>>=
+        opelt := operator("elt"::Symbol)$OP
+        opdiff := operator("D"::Symbol)$OP
+        opcoerce := operator("coerce"::Symbol)$OP
+
+--        replaceDiffs: (F, OP, Symbol) -> F
+        replaceDiffs (expr, op, sy) ==
+            lk := kernels expr
+            for k in lk repeat
+--                if freeOf?(coerce k, sy) then
+--                    expr := subst(expr, [k], [opcoerce [coerce k]])
+
+                if is?(k, op) then
+                    arg := first argument k
+                    if arg = sy::F 
+                    then expr := subst(expr, [k], [(name op)::F])
+                    else expr := subst(expr, [k], [opelt [(name op)::F, 
+                                                          replaceDiffs(arg, op,
+                                                          sy)]])
+--                    => "iterate"
+
+                if is?(k, %diff) then
+                    args := argument k
+                    differentiand := replaceDiffs(subst(args.1, args.2 = args.3), op, sy)
+                    expr := subst(expr, [k], [opdiff differentiand])
+--                    => "iterate"
+            expr
+
+
+        seriesSolve(expr, op, sy, l) ==
+            ex := replaceDiffs(expr, op, sy) 
+            f := compiledFunction(ex, name op, sy)$MKF
+            seriesSolve(f(#1, monomial(1,1)$UTSSUPF), l)$TaylorSolve(F, UTSF, UTSSUPF)
+@            
+<<EXPRSOL.dotabb>>=
+"EXPRSOL" [color="#FF4488",href="bookvol10.4.pdf#nameddest=EXPRSOL"]
+"UTSSOL" [color="#FF4488",href="bookvol10.4.pdf#nameddest=UTSSOL"]
+"EXPRSOL" -> "UTSSOL" 
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{package ES1 ExpressionSpaceFunctions1}
 \pagehead{ExpressionSpaceFunctions1}{ES1}
 \pagepic{ps/v104expressionspacefunctions1.ps}{ES1}{1.00}
@@ -29232,6 +31745,233 @@ GenusZeroIntegration(R, F, L): Exports == Implementation where
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package GOSPER GosperSummationMethod}
+\pagehead{GosperSummationMethod}{GOSPER}
+\pagepic{ps/v104gospersummationmethod.ps}{GOSPER}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package GOSPER GosperSummationMethod>>=
+)abbrev package GOSPER GosperSummationMethod
+++ Gosper's summation algorithm
+++ Author: SMW
+++ Date Created: ???
+++ Date Last Updated: 19 August 1991
+++ Description: Gosper's summation algorithm.
+GosperSummationMethod(E, V, R, P, Q): Exports == Impl where
+    E: OrderedAbelianMonoidSup
+    V: OrderedSet
+    R: IntegralDomain
+    P: PolynomialCategory(R, E, V)
+    Q: Join(RetractableTo Fraction Integer, Field with
+              (coerce: P -> %; numer : % -> P; denom : % -> P))
+
+    I   ==> Integer
+    RN  ==> Fraction I
+    PQ  ==> SparseMultivariatePolynomial(RN, V)
+    RQ  ==> Fraction PQ
+
+    Exports ==> with
+        GospersMethod: (Q, V, () -> V) -> Union(Q, "failed")
+            ++ GospersMethod(b, n, new) returns a rational function
+            ++ \spad{rf(n)} such that \spad{a(n) * rf(n)} is the indefinite
+            ++ sum of \spad{a(n)}
+            ++ with respect to upward difference on \spad{n}, i.e.
+            ++ \spad{a(n+1) * rf(n+1) - a(n) * rf(n) = a(n)},
+            ++ where \spad{b(n) = a(n)/a(n-1)} is a rational function.
+            ++ Returns "failed" if no such rational function \spad{rf(n)}
+            ++ exists.
+            ++ Note: \spad{new} is a nullary function returning a new
+            ++ V every time.
+            ++ The condition on \spad{a(n)} is that \spad{a(n)/a(n-1)}
+            ++ is a rational function of \spad{n}.
+            --++  \spad{sum(a(n), n) = rf(n) * a(n)}.
+
+    Impl ==> add
+      import PolynomialCategoryQuotientFunctions(E, V, R, P, Q)
+      import LinearSystemMatrixPackage(RQ,Vector RQ,Vector RQ,Matrix RQ)
+
+      InnerGospersMethod: (RQ, V, () -> V) -> Union(RQ, "failed")
+      GosperPQR:   (PQ, PQ, V, () -> V)       -> List PQ
+      GosperDegBd: (PQ, PQ, PQ, V, () -> V)    -> I
+      GosperF:     (I, PQ, PQ, PQ, V, () -> V) -> Union(RQ, "failed")
+      linearAndNNIntRoot: (PQ, V) -> Union(I, "failed")
+      deg0:    (PQ, V) -> I       -- degree with deg 0 = -1.
+      pCoef:   (PQ, PQ) -> PQ  -- pCoef(p, a*b**2)
+      RF2QIfCan: Q -> Union(RQ, "failed")
+      UP2QIfCan: P -> Union(PQ,"failed")
+      RFQ2R    : RQ -> Q
+      PQ2R     : PQ -> Q
+      rat?     : R  -> Boolean
+
+      deg0(p, v) == (zero? p => -1; degree(p, v))
+      rat? x     == retractIfCan(x::P::Q)@Union(RN, "failed") case RN
+      RFQ2R f    == PQ2R(numer f) / PQ2R(denom f)
+
+      PQ2R p ==
+        map(#1::P::Q, #1::Q, p)$PolynomialCategoryLifting(
+                                       IndexedExponents V, V, RN, PQ, Q)
+
+      GospersMethod(aquo, n, newV) ==
+        ((q := RF2QIfCan aquo) case "failed") or
+          ((u := InnerGospersMethod(q::RQ, n, newV)) case "failed") =>
+             "failed"
+        RFQ2R(u::RQ)
+
+      RF2QIfCan f ==
+        (n := UP2QIfCan numer f) case "failed" => "failed"
+        (d := UP2QIfCan denom f) case "failed" => "failed"
+        n::PQ / d::PQ
+
+      UP2QIfCan p ==
+        every?(rat?, coefficients p) =>
+          map(#1::PQ, (retractIfCan(#1::P::Q)@Union(RN, "failed"))::RN::PQ,
+              p)$PolynomialCategoryLifting(E, V, R, P, PQ)
+        "failed"
+
+      InnerGospersMethod(aquo, n, newV) ==
+            -- 1. Define coprime polys an,anm1 such that
+            --      an/anm1=a(n)/a(n-1)
+            an   := numer aquo
+            anm1 := denom aquo
+
+            -- 2. Define p,q,r such that
+            --      a(n)/a(n-1) = (p(n)/p(n-1)) * (q(n)/r(n))
+            --    and
+            --      gcd(q(n), r(n+j)) = 1, for all j: NNI.
+            pqr:= GosperPQR(an, anm1, n, newV)
+            pn := first pqr; qn := second pqr; rn := third pqr
+
+            -- 3. If the sum is a rational fn, there is a poly f with
+            --      sum(a(n), n) = q(n+1)/p(n) * a(n) * f(n).
+
+            -- 4. Bound the degree of f(n).
+            (k := GosperDegBd(pn, qn, rn, n, newV)) < 0 => "failed"
+
+            -- 5. Find a polynomial f of degree at most k, satisfying
+            --      p(n) = q(n+1)*f(n) - r(n)*f(n-1)
+            (ufn := GosperF(k, pn, qn, rn, n, newV)) case "failed" =>
+              "failed"
+            fn  := ufn::RQ
+
+            -- 6. The sum is q(n-1)/p(n)*f(n) * a(n). We leave out a(n).
+            --qnm1 := eval(qn,n,n::PQ - 1)
+            --qnm1/pn * fn
+            qn1 := eval(qn,n,n::PQ + 1)
+            qn1/pn * fn
+
+      GosperF(k, pn, qn, rn, n, newV) ==
+            mv := newV(); mp := mv::PQ; np := n::PQ
+            fn:       PQ := +/[mp**(i+1) * np**i for i in 0..k]
+            fnminus1: PQ := eval(fn, n, np-1)
+            qnplus1        := eval(qn, n, np+1)
+            zro  := qnplus1 * fn - rn * fnminus1 - pn
+            zron := univariate(zro, n)
+            dz  := degree zron
+            mat: Matrix RQ := zero(dz+1, (k+1)::NonNegativeInteger)
+            vec: Vector RQ := new(dz+1, 0)
+            while zron ^= 0 repeat
+                cz := leadingCoefficient zron
+                dz := degree zron
+                zron := reductum zron
+                mz := univariate(cz, mv)
+                while mz ^= 0 repeat
+                    cmz := leadingCoefficient(mz)::RQ
+                    dmz := degree mz
+                    mz := reductum mz
+                    dmz = 0 => vec(dz + minIndex vec) := -cmz
+                    qsetelt_!(mat, dz + minRowIndex mat,
+                                 dmz + minColIndex(mat) - 1, cmz)
+            (soln := particularSolution(mat, vec)) case "failed" => "failed"
+            vec := soln::Vector RQ
+            (+/[np**i * vec(i + minIndex vec) for i in 0..k])@RQ
+
+      GosperPQR(an, anm1, n, newV) ==
+            np := n::PQ   -- polynomial version of n
+            -- Initial guess.
+            pn: PQ := 1
+            qn: PQ := an
+            rn: PQ := anm1
+            -- Find all j: NNI giving common factors to q(n) and r(n+j).
+            j     := newV()
+            rnj   := eval(rn, n, np + j::PQ)
+            res   := resultant(qn, rnj, n)
+            fres  := factor(res)$MRationalFactorize(IndexedExponents V,
+                                                    V, I, PQ)
+            js    := [rt::I for fe in factors fres
+                       | (rt := linearAndNNIntRoot(fe.factor,j)) case I]
+            -- For each such j, change variables to remove the gcd.
+            for rt in js repeat
+                rtp:= rt::PQ  -- polynomial version of rt
+                gn := gcd(qn, eval(rn,n,np+rtp))
+                qn := (qn exquo gn)::PQ
+                rn := (rn exquo eval(gn, n, np-rtp))::PQ
+                pn := pn * */[eval(gn, n, np-i::PQ) for i in 0..rt-1]
+            [pn, qn, rn]
+
+        -- Find a degree bound for the polynomial f(n) which satisfies
+        --   p(n) = q(n+1)*f(n) - r(n)*f(n-1).
+      GosperDegBd(pn, qn, rn, n, newV) ==
+            np := n::PQ
+            qnplus1  := eval(qn, n, np+1)
+            lplus  := deg0(qnplus1 + rn,  n)
+            lminus := deg0(qnplus1 - rn, n)
+            degp   := deg0(pn, n)
+            k := degp - max(lplus-1, lminus)
+            lplus <= lminus => k
+            -- Find L(k), such that
+            --   p(n) = L(k)*c[k]*n**(k + lplus - 1) + ...
+            -- To do this, write f(n) and f(n-1) symbolically.
+            --   f(n)  = c[k]*n**k + c[k-1]*n**(k-1) +O(n**(k-2))
+            --   f(n-1)=c[k]*n**k + (c[k-1]-k*c[k])*n**(k-1)+O(n**(k-2))
+            kk := newV()::PQ
+            ck := newV()::PQ
+            ckm1 := newV()::PQ
+            nkm1:= newV()::PQ
+            nk := np*nkm1
+            headfn   := ck*nk +         ckm1*nkm1
+            headfnm1 := ck*nk + (ckm1-kk*ck)*nkm1
+            -- Then p(n) = q(n+1)*f(n) - r(n)*f(n-1) gives L(k).
+            pk   := qnplus1 * headfn - rn * headfnm1
+            lcpk := pCoef(pk, ck*np*nkm1)
+            -- The degree bd is now given by k, and the root of L.
+            k0 := linearAndNNIntRoot(lcpk, mainVariable(kk)::V)
+            k0 case "failed" => k
+            max(k0::I, k)
+
+      pCoef(p, nom) ==
+            not monomial? nom =>
+              error "pCoef requires a monomial 2nd arg"
+            vlist := variables nom
+            for v in vlist while p ^= 0 repeat
+                unom:= univariate(nom,v)
+                pow:=degree unom
+                nom:=leadingCoefficient unom
+                up  := univariate(p, v)
+                p   := coefficient(up, pow)
+            p
+
+      linearAndNNIntRoot(mp, v) ==
+            p := univariate(mp, v)
+            degree p ^= 1 => "failed"
+            (p1 := retractIfCan(coefficient(p, 1))@Union(RN,"failed"))
+             case "failed" or
+              (p0 := retractIfCan(coefficient(p, 0))@Union(RN,"failed"))
+               case "failed" => "failed"
+            rt := -(p0::RN)/(p1::RN)
+            rt < 0 or denom rt ^= 1 => "failed"
+            numer rt
+
+@
+<<GOSPER.dotabb>>=
+"GOSPER" [color="#FF4488",href="bookvol10.4.pdf#nameddest=GOSPER"]
+"PFECAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=PFECAT"]
+"GOSPER" -> "PFECAT"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{package GRDEF GraphicsDefaults}
 \pagehead{GraphicsDefaults}{GRDEF}
 \pagepic{ps/v104graphicsdefaults.ps}{GRDEF}{1.00}
@@ -35741,6 +38481,50 @@ IdealDecompositionPackage(vl,nv) : C == T -- take away nv, now doesn't
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package INCRMAPS IncrementingMaps}
+\pagehead{IncrementingMaps}{INCRMAPS}
+\pagepic{ps/v104incrementingmaps.ps}{INCRMAPS}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package INCRMAPS IncrementingMaps>>=
+)abbrev package INCRMAPS IncrementingMaps
+++ Author:
+++ Date Created:
+++ Date Last Updated: June 4, 1991
+++ Basic Operations:
+++ Related Domains: UniversalSegment
+++ Also See:
+++ AMS Classifications:
+++ Keywords: equation
+++ Examples:
+++ References:
+++ Description:
+++   This package provides operations to create incrementing functions.
+
+IncrementingMaps(R:Join(Monoid, AbelianSemiGroup)): with
+    increment: () -> (R -> R)
+        ++ increment() produces a function which adds \spad{1} to whatever
+        ++ argument it is given.  For example, if {f := increment()} then
+        ++ \spad{f x} is \spad{x+1}.
+    incrementBy: R -> (R -> R)
+        ++ incrementBy(n) produces a function which adds \spad{n} to whatever
+        ++ argument it is given.  For example, if {f := increment(n)} then
+        ++ \spad{f x} is \spad{x+n}.
+  == add
+    increment() == 1 + #1
+    incrementBy n == n + #1
+
+@
+<<INCRMAPS.dotabb>>=
+"INCRMAPS" [color="#FF4488",href="bookvol10.4.pdf#nameddest=INCRMAPS"]
+"SGROUP" [color="#4488FF",href="bookvol10.2.pdf#nameddest=SGROUP"]
+"INCRMAPS" -> "SGROUP"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{package INFPROD0 InfiniteProductCharacteristicZero}
 \pagehead{InfiniteProductCharacteristicZero}{INFPROD0}
 \pagepic{ps/v104infiniteproductcharacteristiczero.ps}{INFPROD0}{1.00}
@@ -38097,6 +40881,136 @@ InnerNumericFloatSolvePackage(K,F,Par): Cat == Cap where
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package INPSIGN InnerPolySign}
+\pagehead{InnerPolySign}{INPSIGN}
+\pagepic{ps/v104innerpolysign.ps}{INPSIGN}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package INPSIGN InnerPolySign>>=
+)abbrev package INPSIGN InnerPolySign
+--%% InnerPolySign
+++ Author: Manuel Bronstein
+++ Date Created: 23 Aug 1989
+++ Date Last Updated: 19 Feb 1990
+++ Description:
+++ Find the sign of a polynomial around a point or infinity.
+InnerPolySign(R, UP): Exports == Implementation where
+  R : Ring
+  UP: UnivariatePolynomialCategory R
+ 
+  U ==> Union(Integer, "failed")
+ 
+  Exports ==> with
+    signAround: (UP,    Integer, R -> U) -> U
+	++ signAround(u,i,f) \undocumented
+    signAround: (UP, R, Integer, R -> U) -> U
+	++ signAround(u,r,i,f) \undocumented
+    signAround: (UP, R,          R -> U) -> U
+	++ signAround(u,r,f) \undocumented
+ 
+  Implementation ==> add
+    signAround(p:UP, x:R, rsign:R -> U) ==
+      (ur := signAround(p, x,  1, rsign)) case "failed" => "failed"
+      (ul := signAround(p, x, -1, rsign)) case "failed" => "failed"
+      (ur::Integer) = (ul::Integer) => ur
+      "failed"
+ 
+    signAround(p, x, dir, rsign) ==
+      zero? p => 0
+      zero?(r := p x) =>
+        (u := signAround(differentiate p, x, dir, rsign)) case "failed"
+          => "failed"
+        dir * u::Integer
+      rsign r
+ 
+    signAround(p:UP, dir:Integer, rsign:R -> U) ==
+      zero? p => 0
+      (u := rsign leadingCoefficient p) case "failed" => "failed"
+      (dir > 0) or (even? degree p) => u::Integer
+      - (u::Integer)
+
+@
+<<INPSIGN.dotabb>>=
+"INPSIGN" [color="#FF4488",href="bookvol10.4.pdf#nameddest=INPSIGN"]
+"PFECAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=PFECAT"]
+"INPSIGN" -> "PFECAT"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package ISUMP InnerPolySum}
+\pagehead{InnerPolySum}{ISUMP}
+\pagepic{ps/v104innerpolysum.ps}{ISUMP}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package ISUMP InnerPolySum>>=
+)abbrev package ISUMP InnerPolySum
+++ Summation of polynomials
+++ Author: SMW
+++ Date Created: ???
+++ Date Last Updated: 19 April 1991
+++ Description: tools for the summation packages.
+InnerPolySum(E, V, R, P): Exports == Impl where
+    E: OrderedAbelianMonoidSup
+    V: OrderedSet
+    R: IntegralDomain
+    P: PolynomialCategory(R, E, V)
+
+    Z   ==> Integer
+    Q   ==> Fraction Z
+    SUP ==> SparseUnivariatePolynomial
+
+    Exports ==> with
+        sum: (P, V, Segment P) -> Record(num:P, den:Z)
+            ++ sum(p(n), n = a..b) returns \spad{p(a) + p(a+1) + ... + p(b)}.
+        sum: (P, V) -> Record(num:P, den: Z)
+            ++ sum(p(n), n) returns \spad{P(n)},
+            ++ the indefinite sum of \spad{p(n)} with respect to
+            ++ upward difference on n, i.e. \spad{P(n+1) - P(n) = a(n)};
+
+    Impl ==> add
+        import PolynomialNumberTheoryFunctions()
+        import UnivariatePolynomialCommonDenominator(Z, Q, SUP Q)
+
+        pmul: (P, SUP Q) -> Record(num:SUP P, den:Z)
+
+        pmul(c, p) ==
+            pn := (rec := splitDenominator p).num
+            [map(numer(#1) * c,
+                pn)$SparseUnivariatePolynomialFunctions2(Q, P), rec.den]
+
+        sum(p, v, s) ==
+          indef := sum(p, v)
+          [eval(indef.num, v, 1 + hi s) - eval(indef.num, v, lo s),
+           indef.den]
+
+        sum(p, v) ==
+            up := univariate(p, v)
+            lp := nil()$List(SUP P)
+            ld := nil()$List(Z)
+            while up ^= 0 repeat
+                ud  := degree up; uc := leadingCoefficient up
+                up  := reductum up
+                rec := pmul(uc, 1 / (ud+1) * bernoulli(ud+1))
+                lp  := concat(rec.num, lp)
+                ld  := concat(rec.den, ld)
+            d := lcm ld
+            vp := +/[(d exquo di)::Z * pi for di in ld for pi in lp]
+            [multivariate(vp, v), d]
+
+@
+<<ISUMP.dotabb>>=
+"ISUMP" [color="#FF4488",href="bookvol10.4.pdf#nameddest=ISUMP"]
+"PFECAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=PFECAT"]
+"ISUMP" -> "PFECAT"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{package ITRIGMNP InnerTrigonometricManipulations}
 \pagehead{InnerTrigonometricManipulations}{ITRIGMNP}
 \pagepic{ps/v104innertrigonometricmanipulations.ps}{ITRIGMNP}{1.00}
@@ -42988,6 +45902,274 @@ LinearPolynomialEquationByFractions(R:PolynomialFactorizationExplicit): with
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package LSMP LinearSystemMatrixPackage}
+\pagehead{LinearSystemMatrixPackage}{LSMP}
+\pagepic{ps/v104linearsystemmatrixpackage.ps}{LSMP}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package LSMP LinearSystemMatrixPackage>>=
+)abbrev package LSMP LinearSystemMatrixPackage
+++ Author: P.Gianni, S.Watt
+++ Date Created: Summer 1985
+++ Date Last Updated:Summer 1990
+++ Basic Functions: solve, particularSolution, hasSolution?, rank
+++ Related Constructors: LinearSystemMatrixPackage1
+++ Also See:
+++ AMS Classifications:
+++ Keywords:
+++ References:
+++ Description:
+++ This package solves linear system in the matrix form \spad{AX = B}.
+
+LinearSystemMatrixPackage(F, Row, Col, M): Cat == Capsule where
+    F: Field
+    Row: FiniteLinearAggregate F with shallowlyMutable
+    Col: FiniteLinearAggregate F with shallowlyMutable
+    M  : MatrixCategory(F, Row, Col)
+
+    N        ==> NonNegativeInteger
+    PartialV ==> Union(Col, "failed")
+    Both     ==> Record(particular: PartialV, basis: List Col)
+
+    Cat ==> with
+        solve       : (M, Col) -> Both
+          ++  solve(A,B) finds a particular solution of the system \spad{AX = B}
+          ++  and a basis of the associated homogeneous system \spad{AX = 0}.
+        solve       : (M, List Col) -> List Both
+          ++  solve(A,LB) finds a particular soln of the systems \spad{AX = B}
+          ++  and a basis of the associated homogeneous systems \spad{AX = 0}
+          ++  where B varies in the list of column vectors LB.
+
+        particularSolution: (M, Col) -> PartialV
+          ++ particularSolution(A,B) finds a particular solution of the linear
+          ++ system \spad{AX = B}.
+        hasSolution?: (M, Col) -> Boolean
+          ++ hasSolution?(A,B) tests if the linear system \spad{AX = B}
+          ++ has a solution.
+        rank        : (M, Col) -> N
+          ++ rank(A,B) computes the rank of the complete matrix \spad{(A|B)}
+          ++ of the linear system \spad{AX = B}.
+
+    Capsule ==> add
+      systemMatrix      : (M, Col) -> M
+      aSolution         :  M -> PartialV
+
+      -- rank theorem
+      hasSolution?(A, b) == rank A = rank systemMatrix(A, b)
+      systemMatrix(m, v) == horizConcat(m, -(v::M))
+      rank(A, b)         == rank systemMatrix(A, b)
+      particularSolution(A, b) == aSolution rowEchelon systemMatrix(A,b)
+
+      -- m should be in row-echelon form.
+      -- last column of m is -(right-hand-side of system)
+      aSolution m ==
+         nvar := (ncols m - 1)::N
+         rk := maxRowIndex m
+         while (rk >= minRowIndex m) and every?(zero?, row(m, rk))
+           repeat rk := dec rk
+         rk < minRowIndex m => new(nvar, 0)
+         ck := minColIndex m
+         while (ck < maxColIndex m) and zero? qelt(m, rk, ck) repeat
+           ck := inc ck
+         ck = maxColIndex m => "failed"
+         sol := new(nvar, 0)$Col
+         -- find leading elements of diagonal
+         v := new(nvar, minRowIndex m - 1)$PrimitiveArray(Integer)
+         for i in minRowIndex m .. rk repeat
+           for j in 0.. while zero? qelt(m, i, j+minColIndex m) repeat 0
+           v.j := i
+         for j in 0..nvar-1 repeat
+           if v.j >= minRowIndex m then
+             qsetelt_!(sol, j+minIndex sol, - qelt(m, v.j, maxColIndex m))
+         sol
+
+      solve(A:M, b:Col) ==
+          -- Special case for homogeneous systems.
+          every?(zero?, b) => [new(ncols A, 0), nullSpace A]
+          -- General case.
+          m   := rowEchelon systemMatrix(A, b)
+          [aSolution m,
+           nullSpace subMatrix(m, minRowIndex m, maxRowIndex m,
+                                      minColIndex m, maxColIndex m - 1)]
+
+      solve(A:M, l:List Col) ==
+          null l => [[new(ncols A, 0), nullSpace A]]
+          nl := (sol0 := solve(A, first l)).basis
+          cons(sol0,
+                 [[aSolution rowEchelon systemMatrix(A, b), nl]
+                                                       for b in rest l])
+
+@
+<<LSMP.dotabb>>=
+"LSMP" [color="#FF4488",href="bookvol10.4.pdf#nameddest=LSMP"]
+"MATCAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=MATCAT"]
+"LSMP" -> "MATCAT"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package LSMP1 LinearSystemMatrixPackage1}
+\pagehead{LinearSystemMatrixPackage1}{LSMP1}
+\pagepic{ps/v104linearsystemmatrixpackage1.ps}{LSMP1}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package LSMP1 LinearSystemMatrixPackage1>>=
+)abbrev package LSMP1 LinearSystemMatrixPackage1
+++ Author: R. Sutor
+++ Date Created: June, 1994
+++ Date Last Updated:
+++ Basic Functions: solve, particularSolution, hasSolution?, rank
+++ Related Constructors: LinearSystemMatrixPackage
+++ Also See:
+++ AMS Classifications:
+++ Keywords: solve
+++ References:
+++ Description:
+++ This package solves linear system in the matrix form \spad{AX = B}.
+++ It is essentially a particular instantiation of the package
+++ \spadtype{LinearSystemMatrixPackage} for Matrix and Vector. This
+++ package's existence makes it easier to use \spadfun{solve} in the
+++ AXIOM interpreter.
+
+LinearSystemMatrixPackage1(F): Cat == Capsule where
+    F: Field
+    Row      ==> Vector F
+    Col      ==> Vector F
+    M        ==> Matrix(F)
+    LL       ==> List List F
+
+    N        ==> NonNegativeInteger
+    PartialV ==> Union(Col, "failed")
+    Both     ==> Record(particular: PartialV, basis: List Col)
+    LSMP     ==> LinearSystemMatrixPackage(F, Row, Col, M)
+
+    Cat ==> with
+        solve       : (M, Col) -> Both
+          ++  solve(A,B) finds a particular solution of the system \spad{AX = B}
+          ++  and a basis of the associated homogeneous system \spad{AX = 0}.
+        solve       : (LL, Col) -> Both
+          ++  solve(A,B) finds a particular solution of the system \spad{AX = B}
+          ++  and a basis of the associated homogeneous system \spad{AX = 0}.
+        solve       : (M, List Col) -> List Both
+          ++  solve(A,LB) finds a particular soln of the systems \spad{AX = B}
+          ++  and a basis of the associated homogeneous systems \spad{AX = 0}
+          ++  where B varies in the list of column vectors LB.
+        solve       : (LL, List Col) -> List Both
+          ++  solve(A,LB) finds a particular soln of the systems \spad{AX = B}
+          ++  and a basis of the associated homogeneous systems \spad{AX = 0}
+          ++  where B varies in the list of column vectors LB.
+
+        particularSolution: (M, Col) -> PartialV
+          ++ particularSolution(A,B) finds a particular solution of the linear
+          ++ system \spad{AX = B}.
+        hasSolution?: (M, Col) -> Boolean
+          ++ hasSolution?(A,B) tests if the linear system \spad{AX = B}
+          ++ has a solution.
+        rank        : (M, Col) -> N
+          ++ rank(A,B) computes the rank of the complete matrix \spad{(A|B)}
+          ++ of the linear system \spad{AX = B}.
+
+    Capsule ==> add
+        solve(m : M, c: Col): Both == solve(m,c)$LSMP
+        solve(ll : LL, c: Col): Both == solve(matrix(ll)$M,c)$LSMP
+        solve(m : M, l : List Col): List Both == solve(m, l)$LSMP
+        solve(ll : LL, l : List Col): List Both == solve(matrix(ll)$M, l)$LSMP
+        particularSolution (m : M, c : Col): PartialV == particularSolution(m, c)$LSMP
+        hasSolution?(m :M, c : Col): Boolean == hasSolution?(m, c)$LSMP
+        rank(m : M, c : Col): N == rank(m, c)$LSMP
+
+@
+<<LSMP1.dotabb>>=
+"LSMP1" [color="#FF4488",href="bookvol10.4.pdf#nameddest=LSMP1"]
+"VECTCAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=VECTCAT"]
+"LSMP1" -> "VECTCAT"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package LSPP LinearSystemPolynomialPackage}
+\pagehead{LinearSystemPolynomialPackage}{LSPP}
+\pagepic{ps/v104linearsystempolynomialpackage.ps}{LSPP}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package LSPP LinearSystemPolynomialPackage>>=
+)abbrev package LSPP LinearSystemPolynomialPackage
+++ Author:  P.Gianni
+++ Date Created: Summer 1985
+++ Date Last Updated: Summer 1993
+++ Basic Functions:
+++ Related Constructors:
+++ Also See:
+++ AMS Classifications:
+++ Keywords:
+++ References: SystemSolvePackage
+++ Description:
+++ this package finds the solutions of linear systems presented as a
+++ list of polynomials.
+
+LinearSystemPolynomialPackage(R, E, OV, P): Cat == Capsule where
+    R          :   IntegralDomain
+    OV         :   OrderedSet
+    E          :   OrderedAbelianMonoidSup
+    P          :   PolynomialCategory(R,E,OV)
+
+    F        ==> Fraction P
+    NNI      ==> NonNegativeInteger
+    V        ==> Vector
+    M        ==> Matrix
+    Soln     ==> Record(particular: Union(V F, "failed"), basis: List V F)
+
+    Cat == with
+        linSolve:  (List P, List OV) -> Soln
+          ++ linSolve(lp,lvar) finds the solutions of the linear system
+          ++ of polynomials lp = 0 with respect to the list of symbols lvar.
+
+    Capsule == add
+
+                        ---- Local Functions ----
+
+        poly2vect:    (P,     List OV)    -> Record(coefvec: V F, reductum: F)
+        intoMatrix:   (List P,   List OV) -> Record(mat: M F, vec: V F)
+
+
+        poly2vect(p : P, vs : List OV) : Record(coefvec: V F, reductum: F) ==
+            coefs := new(#vs, 0)$(V F)
+            for v in vs for i in 1.. while p ^= 0 repeat
+              u := univariate(p, v)
+              degree u = 0 => "next v"
+              coefs.i := (c := leadingCoefficient u)::F
+              p := p - monomial(c,v, 1)
+            [coefs, p :: F]
+
+        intoMatrix(ps : List P, vs : List OV ) : Record(mat: M F, vec: V F) ==
+            m := zero(#ps, #vs)$M(F)
+            v := new(#ps, 0)$V(F)
+            for p in ps for i in 1.. repeat
+                totalDegree(p,vs) > 1 => error "The system is not linear"
+                r   := poly2vect(p,vs)
+                m:=setRow_!(m,i,r.coefvec)
+                v.i := - r.reductum
+            [m, v]
+
+        linSolve(ps, vs) ==
+            r := intoMatrix(ps, vs)
+            solve(r.mat, r.vec)$LinearSystemMatrixPackage(F,V F,V F,M F)
+
+@
+<<LSPP.dotabb>>=
+"LSPP" [color="#FF4488",href="bookvol10.4.pdf#nameddest=LSPP"]
+"PFECAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=PFECAT"]
+"LSPP" -> "PFECAT"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{package LGROBP LinGroebnerPackage}
 \pagehead{LinGroebnerPackage}{LGROBP}
 \pagepic{ps/v104lingroebnerpackage.ps}{LGROBP}{1.00}
@@ -48912,6 +52094,52 @@ MonomialExtensionTools(F, UP): Exports == Implementation where
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package MSYSCMD MoreSystemCommands}
+\pagehead{MoreSystemCommands}{MSYSCMD}
+\pagepic{ps/v104moresystemcommands.ps}{MSYSCMD}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package MSYSCMD MoreSystemCommands>>=
+)abbrev package MSYSCMD MoreSystemCommands
+++ Author:
+++ Date Created:
+++ Change History:
+++ Basic Operations: systemCommand
+++ Related Constructors:
+++ Also See:
+++ AMS Classification:
+++ Keywords: command
+++ Description:
+++   \spadtype{MoreSystemCommands} implements an interface with the
+++   system command facility. These are the commands that are issued
+++   from source files or the system interpreter and they start with
+++   a close parenthesis, e.g., \spadsyscom{what} commands.
+ 
+MoreSystemCommands: public == private where
+ 
+  public == with
+ 
+    systemCommand: String -> Void
+      ++ systemCommand(cmd) takes the string \spadvar{cmd} and passes
+      ++ it to the runtime environment for execution as a system
+      ++ command. Although various things may be printed, no usable
+      ++ value is returned.
+ 
+  private == add
+ 
+    systemCommand cmd == doSystemCommand(cmd)$Lisp
+
+@
+<<MSYSCMD.dotabb>>=
+"MSYSCMD" [color="#FF4488",href="bookvol10.4.pdf#nameddest=MSYSCMD"]
+"Package" [color="#FF4488"]
+"MSYSCMD" -> "Package"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{package MPCPF MPolyCatPolyFactorizer}
 \pagehead{MPolyCatPolyFactorizer}{MPCPF}
 \pagepic{ps/v104mpolycatpolyfactorizer.ps}{MPCPF}{1.00}
@@ -54864,6 +58092,799 @@ NagSeriesSummationPackage(): Exports == Implementation where
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package NAGS NagSpecialFunctionsPackage}
+\pagehead{NagSpecialFunctionsPackage}{NAGS}
+\pagepic{ps/v104nagspecialfunctionspackage.ps}{NAGS}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package NAGS NagSpecialFunctionsPackage>>=
+)abbrev package NAGS NagSpecialFunctionsPackage
+++ Author: Godfrey Nolan and Mike Dewar
+++ Date Created: Jan 1994
+++ Date Last Updated: Thu May 12 17:45:44 1994
+++ Description:
+++ This package uses the NAG Library to compute some commonly
+++ occurring physical and mathematical functions.
+++ See \downlink{Manual Page}{manpageXXs}.
+NagSpecialFunctionsPackage(): Exports == Implementation where
+  S ==> Symbol
+  FOP ==> FortranOutputStackPackage
+
+  Exports ==> with
+    s01eaf : (Complex DoubleFloat,Integer) -> Result 
+     ++ s01eaf(z,ifail)
+     ++ S01EAF evaluates the exponential function exp(z) , for complex z.
+     ++ See \downlink{Manual Page}{manpageXXs01eaf}.
+    s13aaf : (DoubleFloat,Integer) -> Result 
+     ++ s13aaf(x,ifail)
+     ++ returns the value of the exponential integral 
+     ++  E (x), via the routine name.
+     ++   1
+     ++ See \downlink{Manual Page}{manpageXXs13aaf}.
+    s13acf : (DoubleFloat,Integer) -> Result 
+     ++ s13acf(x,ifail)
+     ++ returns the value of the cosine integral
+     ++ See \downlink{Manual Page}{manpageXXs13acf}.
+    s13adf : (DoubleFloat,Integer) -> Result 
+     ++ s13adf(x,ifail)
+     ++ returns the value of the sine integral
+     ++ See \downlink{Manual Page}{manpageXXs13adf}.
+    s14aaf : (DoubleFloat,Integer) -> Result 
+     ++ s14aaf(x,ifail) returns the value of the Gamma function (Gamma)(x), via 
+     ++ the routine name.
+     ++ See \downlink{Manual Page}{manpageXXs14aaf}.
+    s14abf : (DoubleFloat,Integer) -> Result 
+     ++ s14abf(x,ifail) returns a value for the log, ln(Gamma(x)), via 
+     ++ the routine name.
+     ++ See \downlink{Manual Page}{manpageXXs14abf}.
+    s14baf : (DoubleFloat,DoubleFloat,DoubleFloat,Integer) -> Result 
+     ++ s14baf(a,x,tol,ifail)
+     ++ computes values for the incomplete gamma functions P(a,x) 
+     ++ and Q(a,x).
+     ++ See \downlink{Manual Page}{manpageXXs14baf}.
+    s15adf : (DoubleFloat,Integer) -> Result 
+     ++ s15adf(x,ifail)
+     ++ returns the value of the complementary error function, 
+     ++ erfc(x), via the routine name.
+     ++ See \downlink{Manual Page}{manpageXXs15adf}.
+    s15aef : (DoubleFloat,Integer) -> Result 
+     ++ s15aef(x,ifail)
+     ++ returns the value of the error function erf(x), via the 
+     ++ routine name.
+     ++ See \downlink{Manual Page}{manpageXXs15aef}.
+    s17acf : (DoubleFloat,Integer) -> Result 
+     ++ s17acf(x,ifail)
+     ++ returns the value of the Bessel Function 
+     ++  Y (x), via the routine name.
+     ++   0
+     ++ See \downlink{Manual Page}{manpageXXs17acf}.
+    s17adf : (DoubleFloat,Integer) -> Result 
+     ++ s17adf(x,ifail)
+     ++ returns the value of the Bessel Function
+     ++  Y (x), via the routine name.
+     ++   1
+     ++ See \downlink{Manual Page}{manpageXXs17adf}.
+    s17aef : (DoubleFloat,Integer) -> Result 
+     ++ s17aef(x,ifail)
+     ++ returns the value of the Bessel Function 
+     ++  J (x), via the routine name.
+     ++   0
+     ++ See \downlink{Manual Page}{manpageXXs17aef}.
+    s17aff : (DoubleFloat,Integer) -> Result 
+     ++ s17aff(x,ifail)
+     ++ returns the value of the Bessel Function 
+     ++  J (x), via the routine name.
+     ++   1
+     ++ See \downlink{Manual Page}{manpageXXs17aff}.
+    s17agf : (DoubleFloat,Integer) -> Result 
+     ++ s17agf(x,ifail)
+     ++ returns a value for the Airy function, Ai(x), via the 
+     ++ routine name.
+     ++ See \downlink{Manual Page}{manpageXXs17agf}.
+    s17ahf : (DoubleFloat,Integer) -> Result 
+     ++ s17ahf(x,ifail)
+     ++ returns a value of the Airy function, Bi(x), via the 
+     ++ routine name.
+     ++ See \downlink{Manual Page}{manpageXXs17ahf}.
+    s17ajf : (DoubleFloat,Integer) -> Result 
+     ++ s17ajf(x,ifail)
+     ++ returns a value of the derivative of the Airy function 
+     ++ Ai(x), via the routine name.
+     ++ See \downlink{Manual Page}{manpageXXs17ajf}.
+    s17akf : (DoubleFloat,Integer) -> Result 
+     ++ s17akf(x,ifail)
+     ++ returns a value for the derivative of the Airy function 
+     ++ Bi(x), via the routine name.
+     ++ See \downlink{Manual Page}{manpageXXs17akf}.
+    s17dcf : (DoubleFloat,Complex DoubleFloat,Integer,String,_
+	Integer) -> Result 
+     ++ s17dcf(fnu,z,n,scale,ifail)
+     ++ returns a sequence of values for the Bessel functions 
+     ++  Y      (z) for complex z, non-negative (nu) and n=0,1,...,N-1, 
+     ++   (nu)+n                                                       
+     ++ with an option for exponential scaling.
+     ++ See \downlink{Manual Page}{manpageXXs17dcf}.
+    s17def : (DoubleFloat,Complex DoubleFloat,Integer,String,_
+	Integer) -> Result 
+     ++ s17def(fnu,z,n,scale,ifail)
+     ++ returns a sequence of values for the Bessel functions 
+     ++  J      (z) for complex z, non-negative (nu) and n=0,1,...,N-1, 
+     ++   (nu)+n                                                       
+     ++ with an option for exponential scaling.
+     ++ See \downlink{Manual Page}{manpageXXs17def}.
+    s17dgf : (String,Complex DoubleFloat,String,Integer) -> Result 
+     ++ s17dgf(deriv,z,scale,ifail)
+     ++ returns the value of the Airy function Ai(z) or its 
+     ++ derivative Ai'(z) for complex z, with an option for exponential 
+     ++ scaling.
+     ++ See \downlink{Manual Page}{manpageXXs17dgf}.
+    s17dhf : (String,Complex DoubleFloat,String,Integer) -> Result 
+     ++ s17dhf(deriv,z,scale,ifail)
+     ++ returns the value of the Airy function Bi(z) or its 
+     ++ derivative Bi'(z) for complex z, with an option for exponential 
+     ++ scaling.
+     ++ See \downlink{Manual Page}{manpageXXs17dhf}.
+    s17dlf : (Integer,DoubleFloat,Complex DoubleFloat,Integer,_
+	String,Integer) -> Result 
+     ++ s17dlf(m,fnu,z,n,scale,ifail)
+     ++ returns a sequence of values for the Hankel functions 
+     ++   (1)           (2)                                           
+     ++  H      (z) or H      (z) for complex z, non-negative (nu) and 
+     ++   (nu)+n        (nu)+n                                        
+     ++ n=0,1,...,N-1, with an option for exponential scaling.
+     ++ See \downlink{Manual Page}{manpageXXs17dlf}.
+    s18acf : (DoubleFloat,Integer) -> Result 
+     ++ s18acf(x,ifail)
+     ++ returns the value of the modified Bessel Function 
+     ++  K (x), via the routine name.
+     ++   0    
+     ++ See \downlink{Manual Page}{manpageXXs18acf}.
+    s18adf : (DoubleFloat,Integer) -> Result 
+     ++ s18adf(x,ifail)
+     ++ returns the value of the modified Bessel Function 
+     ++  K (x), via the routine name.
+     ++   1    
+     ++ See \downlink{Manual Page}{manpageXXs18adf}.
+    s18aef : (DoubleFloat,Integer) -> Result 
+     ++ s18aef(x,ifail)
+     ++ returns the value of the modified Bessel Function 
+     ++  I (x), via the routine name.
+     ++   0    
+     ++ See \downlink{Manual Page}{manpageXXs18aef}.
+    s18aff : (DoubleFloat,Integer) -> Result 
+     ++ s18aff(x,ifail)
+     ++ returns a value for the modified Bessel Function 
+     ++  I (x), via the routine name.
+     ++   1    
+     ++ See \downlink{Manual Page}{manpageXXs18aff}.
+    s18dcf : (DoubleFloat,Complex DoubleFloat,Integer,String,_
+	Integer) -> Result 
+     ++ s18dcf(fnu,z,n,scale,ifail)
+     ++ returns a sequence of values for the modified Bessel functions
+     ++  K      (z) for complex z, non-negative (nu) and 
+     ++   (nu)+n                                        
+     ++ n=0,1,...,N-1, with an option for exponential scaling.
+     ++ See \downlink{Manual Page}{manpageXXs18dcf}.
+    s18def : (DoubleFloat,Complex DoubleFloat,Integer,String,_
+	Integer) -> Result 
+     ++ s18def(fnu,z,n,scale,ifail)
+     ++ returns a sequence of values for the modified Bessel functions
+     ++  I      (z) for complex z, non-negative (nu) and 
+     ++   (nu)+n                                        
+     ++ n=0,1,...,N-1, with an option for exponential scaling.
+     ++ See \downlink{Manual Page}{manpageXXs18def}.
+    s19aaf : (DoubleFloat,Integer) -> Result 
+     ++ s19aaf(x,ifail)
+     ++ returns a value for the Kelvin function ber(x) via the 
+     ++ routine name.
+     ++ See \downlink{Manual Page}{manpageXXs19aaf}.
+    s19abf : (DoubleFloat,Integer) -> Result 
+     ++ s19abf(x,ifail)
+     ++ returns a value for the Kelvin function bei(x) via the 
+     ++ routine name.
+     ++ See \downlink{Manual Page}{manpageXXs19abf}.
+    s19acf : (DoubleFloat,Integer) -> Result 
+     ++ s19acf(x,ifail)
+     ++ returns a value for the Kelvin function ker(x), via the 
+     ++ routine name.
+     ++ See \downlink{Manual Page}{manpageXXs19acf}.
+    s19adf : (DoubleFloat,Integer) -> Result 
+     ++ s19adf(x,ifail)
+     ++ returns a value for the Kelvin function kei(x) via the 
+     ++ routine name.
+     ++ See \downlink{Manual Page}{manpageXXs19adf}.
+    s20acf : (DoubleFloat,Integer) -> Result 
+     ++ s20acf(x,ifail)
+     ++ returns a value for the Fresnel Integral S(x), via the 
+     ++ routine name.
+     ++ See \downlink{Manual Page}{manpageXXs20acf}.
+    s20adf : (DoubleFloat,Integer) -> Result 
+     ++ s20adf(x,ifail)
+     ++ returns a value for the Fresnel Integral C(x), via the 
+     ++ routine name.
+     ++ See \downlink{Manual Page}{manpageXXs20adf}.
+    s21baf : (DoubleFloat,DoubleFloat,Integer) -> Result 
+     ++ s21baf(x,y,ifail)
+     ++ returns a value of an elementary integral, which occurs as
+     ++ a degenerate case of an elliptic integral of the first kind, via 
+     ++ the routine name.
+     ++ See \downlink{Manual Page}{manpageXXs21baf}.
+    s21bbf : (DoubleFloat,DoubleFloat,DoubleFloat,Integer) -> Result 
+     ++ s21bbf(x,y,z,ifail)
+     ++ returns a value of the symmetrised elliptic integral of 
+     ++ the first kind, via the routine name.
+     ++ See \downlink{Manual Page}{manpageXXs21bbf}.
+    s21bcf : (DoubleFloat,DoubleFloat,DoubleFloat,Integer) -> Result 
+     ++ s21bcf(x,y,z,ifail)
+     ++ returns a value of the symmetrised elliptic integral of 
+     ++ the second kind, via the routine name.
+     ++ See \downlink{Manual Page}{manpageXXs21bcf}.
+    s21bdf : (DoubleFloat,DoubleFloat,DoubleFloat,DoubleFloat,_
+	Integer) -> Result 
+     ++ s21bdf(x,y,z,r,ifail)
+     ++ returns a value of the symmetrised elliptic integral of 
+     ++ the third kind, via the routine name.
+     ++ See \downlink{Manual Page}{manpageXXs21bdf}.
+  Implementation ==> add
+
+    import Lisp
+    import DoubleFloat
+    import Any
+    import Record
+    import Integer
+    import Matrix DoubleFloat
+    import Boolean
+    import NAGLinkSupportPackage
+    import AnyFunctions1(Complex DoubleFloat)
+    import AnyFunctions1(Integer)
+    import AnyFunctions1(DoubleFloat)
+    import AnyFunctions1(String)
+
+
+    s01eaf(zArg:Complex DoubleFloat,ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s01eaf",_
+	["z"::S,"ifail"::S]$Lisp,_
+	[]$Lisp,_
+	[["integer"::S,"ifail"::S]$Lisp_
+	,["double complex"::S,"s01eafResult"::S,"z"::S]$Lisp_
+	]$Lisp,_
+	["s01eafResult"::S,"ifail"::S]$Lisp,_
+	[([zArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+    s13aaf(xArg:DoubleFloat,ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s13aaf",_
+	["x"::S,"ifail"::S]$Lisp,_
+	[]$Lisp,_
+	[["double"::S,"s13aafResult"::S,"x"::S]$Lisp_
+	,["integer"::S,"ifail"::S]$Lisp_
+	]$Lisp,_
+	["s13aafResult"::S,"ifail"::S]$Lisp,_
+	[([xArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+    s13acf(xArg:DoubleFloat,ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s13acf",_
+	["x"::S,"ifail"::S]$Lisp,_
+	[]$Lisp,_
+	[["double"::S,"s13acfResult"::S,"x"::S]$Lisp_
+	,["integer"::S,"ifail"::S]$Lisp_
+	]$Lisp,_
+	["s13acfResult"::S,"ifail"::S]$Lisp,_
+	[([xArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+    s13adf(xArg:DoubleFloat,ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s13adf",_
+	["x"::S,"ifail"::S]$Lisp,_
+	[]$Lisp,_
+	[["double"::S,"s13adfResult"::S,"x"::S]$Lisp_
+	,["integer"::S,"ifail"::S]$Lisp_
+	]$Lisp,_
+	["s13adfResult"::S,"ifail"::S]$Lisp,_
+	[([xArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+    s14aaf(xArg:DoubleFloat,ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s14aaf",_
+	["x"::S,"ifail"::S]$Lisp,_
+	[]$Lisp,_
+	[["double"::S,"s14aafResult"::S,"x"::S]$Lisp_
+	,["integer"::S,"ifail"::S]$Lisp_
+	]$Lisp,_
+	["s14aafResult"::S,"ifail"::S]$Lisp,_
+	[([xArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+    s14abf(xArg:DoubleFloat,ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s14abf",_
+	["x"::S,"ifail"::S]$Lisp,_
+	[]$Lisp,_
+	[["double"::S,"s14abfResult"::S,"x"::S]$Lisp_
+	,["integer"::S,"ifail"::S]$Lisp_
+	]$Lisp,_
+	["s14abfResult"::S,"ifail"::S]$Lisp,_
+	[([xArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+    s14baf(aArg:DoubleFloat,xArg:DoubleFloat,tolArg:DoubleFloat,_
+	ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s14baf",_
+	["a"::S,"x"::S,"tol"::S,"p"::S,"q"::S_
+	,"ifail"::S]$Lisp,_
+	["p"::S,"q"::S]$Lisp,_
+	[["double"::S,"a"::S,"x"::S,"tol"::S,"p"::S_
+	,"q"::S]$Lisp_
+	,["integer"::S,"ifail"::S]$Lisp_
+	]$Lisp,_
+	["p"::S,"q"::S,"ifail"::S]$Lisp,_
+	[([aArg::Any,xArg::Any,tolArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+    s15adf(xArg:DoubleFloat,ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s15adf",_
+	["x"::S,"ifail"::S]$Lisp,_
+	[]$Lisp,_
+	[["double"::S,"s15adfResult"::S,"x"::S]$Lisp_
+	,["integer"::S,"ifail"::S]$Lisp_
+	]$Lisp,_
+	["s15adfResult"::S,"ifail"::S]$Lisp,_
+	[([xArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+    s15aef(xArg:DoubleFloat,ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s15aef",_
+	["x"::S,"ifail"::S]$Lisp,_
+	[]$Lisp,_
+	[["double"::S,"s15aefResult"::S,"x"::S]$Lisp_
+	,["integer"::S,"ifail"::S]$Lisp_
+	]$Lisp,_
+	["s15aefResult"::S,"ifail"::S]$Lisp,_
+	[([xArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+    s17acf(xArg:DoubleFloat,ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s17acf",_
+	["x"::S,"ifail"::S]$Lisp,_
+	[]$Lisp,_
+	[["double"::S,"s17acfResult"::S,"x"::S]$Lisp_
+	,["integer"::S,"ifail"::S]$Lisp_
+	]$Lisp,_
+	["s17acfResult"::S,"ifail"::S]$Lisp,_
+	[([xArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+    s17adf(xArg:DoubleFloat,ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s17adf",_
+	["x"::S,"ifail"::S]$Lisp,_
+	[]$Lisp,_
+	[["double"::S,"s17adfResult"::S,"x"::S]$Lisp_
+	,["integer"::S,"ifail"::S]$Lisp_
+	]$Lisp,_
+	["s17adfResult"::S,"ifail"::S]$Lisp,_
+	[([xArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+    s17aef(xArg:DoubleFloat,ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s17aef",_
+	["x"::S,"ifail"::S]$Lisp,_
+	[]$Lisp,_
+	[["double"::S,"s17aefResult"::S,"x"::S]$Lisp_
+	,["integer"::S,"ifail"::S]$Lisp_
+	]$Lisp,_
+	["s17aefResult"::S,"ifail"::S]$Lisp,_
+	[([xArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+    s17aff(xArg:DoubleFloat,ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s17aff",_
+	["x"::S,"ifail"::S]$Lisp,_
+	[]$Lisp,_
+	[["double"::S,"s17affResult"::S,"x"::S]$Lisp_
+	,["integer"::S,"ifail"::S]$Lisp_
+	]$Lisp,_
+	["s17affResult"::S,"ifail"::S]$Lisp,_
+	[([xArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+    s17agf(xArg:DoubleFloat,ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s17agf",_
+	["x"::S,"ifail"::S]$Lisp,_
+	[]$Lisp,_
+	[["double"::S,"s17agfResult"::S,"x"::S]$Lisp_
+	,["integer"::S,"ifail"::S]$Lisp_
+	]$Lisp,_
+	["s17agfResult"::S,"ifail"::S]$Lisp,_
+	[([xArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+    s17ahf(xArg:DoubleFloat,ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s17ahf",_
+	["x"::S,"ifail"::S]$Lisp,_
+	[]$Lisp,_
+	[["double"::S,"s17ahfResult"::S,"x"::S]$Lisp_
+	,["integer"::S,"ifail"::S]$Lisp_
+	]$Lisp,_
+	["s17ahfResult"::S,"ifail"::S]$Lisp,_
+	[([xArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+    s17ajf(xArg:DoubleFloat,ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s17ajf",_
+	["x"::S,"ifail"::S]$Lisp,_
+	[]$Lisp,_
+	[["double"::S,"s17ajfResult"::S,"x"::S]$Lisp_
+	,["integer"::S,"ifail"::S]$Lisp_
+	]$Lisp,_
+	["s17ajfResult"::S,"ifail"::S]$Lisp,_
+	[([xArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+    s17akf(xArg:DoubleFloat,ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s17akf",_
+	["x"::S,"ifail"::S]$Lisp,_
+	[]$Lisp,_
+	[["double"::S,"s17akfResult"::S,"x"::S]$Lisp_
+	,["integer"::S,"ifail"::S]$Lisp_
+	]$Lisp,_
+	["s17akfResult"::S,"ifail"::S]$Lisp,_
+	[([xArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+
+    s17dcf(fnuArg:DoubleFloat,zArg:Complex DoubleFloat,nArg:Integer,_
+	scaleArg:String,ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s17dcf",_
+	["fnu"::S,"z"::S,"n"::S,"scale"::S,"nz"::S_
+	,"ifail"::S,"cy"::S,"cwrk"::S]$Lisp,_
+	["cy"::S,"nz"::S,"cwrk"::S]$Lisp,_
+	[["double"::S,"fnu"::S]$Lisp_
+	,["integer"::S,"n"::S,"nz"::S,"ifail"::S]$Lisp_
+	,["character"::S,"scale"::S]$Lisp_
+	,["double complex"::S,"z"::S,["cy"::S,"n"::S]$Lisp,["cwrk"::S,"n"::S]$Lisp]$Lisp_
+	]$Lisp,_
+	["cy"::S,"nz"::S,"ifail"::S]$Lisp,_
+	[([fnuArg::Any,zArg::Any,nArg::Any,scaleArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+    s17def(fnuArg:DoubleFloat,zArg:Complex DoubleFloat,nArg:Integer,_
+	scaleArg:String,ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s17def",_
+	["fnu"::S,"z"::S,"n"::S,"scale"::S,"nz"::S_
+	,"ifail"::S,"cy"::S]$Lisp,_
+	["cy"::S,"nz"::S]$Lisp,_
+	[["double"::S,"fnu"::S]$Lisp_
+	,["integer"::S,"n"::S,"nz"::S,"ifail"::S]$Lisp_
+	,["character"::S,"scale"::S]$Lisp_
+	,["double complex"::S,"z"::S,["cy"::S,"n"::S]$Lisp]$Lisp_
+	]$Lisp,_
+	["cy"::S,"nz"::S,"ifail"::S]$Lisp,_
+	[([fnuArg::Any,zArg::Any,nArg::Any,scaleArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+    s17dgf(derivArg:String,zArg:Complex DoubleFloat,scaleArg:String,_
+	ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s17dgf",_
+	["deriv"::S,"z"::S,"scale"::S,"ai"::S,"nz"::S_
+	,"ifail"::S]$Lisp,_
+	["ai"::S,"nz"::S]$Lisp,_
+	[["integer"::S,"nz"::S,"ifail"::S]$Lisp_
+	,["character"::S,"deriv"::S,"scale"::S]$Lisp_
+	,["double complex"::S,"z"::S,"ai"::S]$Lisp_
+	]$Lisp,_
+	["ai"::S,"nz"::S,"ifail"::S]$Lisp,_
+	[([derivArg::Any,zArg::Any,scaleArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+    s17dhf(derivArg:String,zArg:Complex DoubleFloat,scaleArg:String,_
+	ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s17dhf",_
+	["deriv"::S,"z"::S,"scale"::S,"bi"::S,"ifail"::S_
+	]$Lisp,_
+	["bi"::S]$Lisp,_
+	[["integer"::S,"ifail"::S]$Lisp_
+	,["character"::S,"deriv"::S,"scale"::S]$Lisp_
+	,["double complex"::S,"z"::S,"bi"::S]$Lisp_
+	]$Lisp,_
+	["bi"::S,"ifail"::S]$Lisp,_
+	[([derivArg::Any,zArg::Any,scaleArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+    s17dlf(mArg:Integer,fnuArg:DoubleFloat,zArg:Complex DoubleFloat,_
+	nArg:Integer,scaleArg:String,ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s17dlf",_
+	["m"::S,"fnu"::S,"z"::S,"n"::S,"scale"::S_
+	,"nz"::S,"ifail"::S,"cy"::S]$Lisp,_
+	["cy"::S,"nz"::S]$Lisp,_
+	[["double"::S,"fnu"::S]$Lisp_
+	,["integer"::S,"m"::S,"n"::S,"nz"::S,"ifail"::S_
+	]$Lisp_
+	,["character"::S,"scale"::S]$Lisp_
+	,["double complex"::S,"z"::S,["cy"::S,"n"::S]$Lisp]$Lisp_
+	]$Lisp,_
+	["cy"::S,"nz"::S,"ifail"::S]$Lisp,_
+	[([mArg::Any,fnuArg::Any,zArg::Any,nArg::Any,scaleArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+    s18acf(xArg:DoubleFloat,ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s18acf",_
+	["x"::S,"ifail"::S]$Lisp,_
+	[]$Lisp,_
+	[["double"::S,"s18acfResult"::S,"x"::S]$Lisp_
+	,["integer"::S,"ifail"::S]$Lisp_
+	]$Lisp,_
+	["s18acfResult"::S,"ifail"::S]$Lisp,_
+	[([xArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+    s18adf(xArg:DoubleFloat,ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s18adf",_
+	["x"::S,"ifail"::S]$Lisp,_
+	[]$Lisp,_
+	[["double"::S,"s18adfResult"::S,"x"::S]$Lisp_
+	,["integer"::S,"ifail"::S]$Lisp_
+	]$Lisp,_
+	["s18adfResult"::S,"ifail"::S]$Lisp,_
+	[([xArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+    s18aef(xArg:DoubleFloat,ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s18aef",_
+	["x"::S,"ifail"::S]$Lisp,_
+	[]$Lisp,_
+	[["double"::S,"s18aefResult"::S,"x"::S]$Lisp_
+	,["integer"::S,"ifail"::S]$Lisp_
+	]$Lisp,_
+	["s18aefResult"::S,"ifail"::S]$Lisp,_
+	[([xArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+    s18aff(xArg:DoubleFloat,ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s18aff",_
+	["x"::S,"ifail"::S]$Lisp,_
+	[]$Lisp,_
+	[["double"::S,"s18affResult"::S,"x"::S]$Lisp_
+	,["integer"::S,"ifail"::S]$Lisp_
+	]$Lisp,_
+	["s18affResult"::S,"ifail"::S]$Lisp,_
+	[([xArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+    s18dcf(fnuArg:DoubleFloat,zArg:Complex DoubleFloat,nArg:Integer,_
+	scaleArg:String,ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s18dcf",_
+	["fnu"::S,"z"::S,"n"::S,"scale"::S,"nz"::S_
+	,"ifail"::S,"cy"::S]$Lisp,_
+	["cy"::S,"nz"::S]$Lisp,_
+	[["double"::S,"fnu"::S]$Lisp_
+	,["integer"::S,"n"::S,"nz"::S,"ifail"::S]$Lisp_
+	,["character"::S,"scale"::S]$Lisp_
+	,["double complex"::S,"z"::S,["cy"::S,"n"::S]$Lisp]$Lisp_
+	]$Lisp,_
+	["cy"::S,"nz"::S,"ifail"::S]$Lisp,_
+	[([fnuArg::Any,zArg::Any,nArg::Any,scaleArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+    s18def(fnuArg:DoubleFloat,zArg:Complex DoubleFloat,nArg:Integer,_
+	scaleArg:String,ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s18def",_
+	["fnu"::S,"z"::S,"n"::S,"scale"::S,"nz"::S_
+	,"ifail"::S,"cy"::S]$Lisp,_
+	["cy"::S,"nz"::S]$Lisp,_
+	[["double"::S,"fnu"::S]$Lisp_
+	,["integer"::S,"n"::S,"nz"::S,"ifail"::S]$Lisp_
+	,["character"::S,"scale"::S]$Lisp_
+	,["double complex"::S,"z"::S,["cy"::S,"n"::S]$Lisp]$Lisp_
+	]$Lisp,_
+	["cy"::S,"nz"::S,"ifail"::S]$Lisp,_
+	[([fnuArg::Any,zArg::Any,nArg::Any,scaleArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+    s19aaf(xArg:DoubleFloat,ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s19aaf",_
+	["x"::S,"ifail"::S]$Lisp,_
+	[]$Lisp,_
+	[["double"::S,"s19aafResult"::S,"x"::S]$Lisp_
+	,["integer"::S,"ifail"::S]$Lisp_
+	]$Lisp,_
+	["s19aafResult"::S,"ifail"::S]$Lisp,_
+	[([xArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+    s19abf(xArg:DoubleFloat,ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s19abf",_
+	["x"::S,"ifail"::S]$Lisp,_
+	[]$Lisp,_
+	[["double"::S,"s19abfResult"::S,"x"::S]$Lisp_
+	,["integer"::S,"ifail"::S]$Lisp_
+	]$Lisp,_
+	["s19abfResult"::S,"ifail"::S]$Lisp,_
+	[([xArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+    s19acf(xArg:DoubleFloat,ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s19acf",_
+	["x"::S,"ifail"::S]$Lisp,_
+	[]$Lisp,_
+	[["double"::S,"s19acfResult"::S,"x"::S]$Lisp_
+	,["integer"::S,"ifail"::S]$Lisp_
+	]$Lisp,_
+	["s19acfResult"::S,"ifail"::S]$Lisp,_
+	[([xArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+    s19adf(xArg:DoubleFloat,ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s19adf",_
+	["x"::S,"ifail"::S]$Lisp,_
+	[]$Lisp,_
+	[["double"::S,"s19adfResult"::S,"x"::S]$Lisp_
+	,["integer"::S,"ifail"::S]$Lisp_
+	]$Lisp,_
+	["s19adfResult"::S,"ifail"::S]$Lisp,_
+	[([xArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+    s20acf(xArg:DoubleFloat,ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s20acf",_
+	["x"::S,"ifail"::S]$Lisp,_
+	[]$Lisp,_
+	[["double"::S,"s20acfResult"::S,"x"::S]$Lisp_
+	,["integer"::S,"ifail"::S]$Lisp_
+	]$Lisp,_
+	["s20acfResult"::S,"ifail"::S]$Lisp,_
+	[([xArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+    s20adf(xArg:DoubleFloat,ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s20adf",_
+	["x"::S,"ifail"::S]$Lisp,_
+	[]$Lisp,_
+	[["double"::S,"s20adfResult"::S,"x"::S]$Lisp_
+	,["integer"::S,"ifail"::S]$Lisp_
+	]$Lisp,_
+	["s20adfResult"::S,"ifail"::S]$Lisp,_
+	[([xArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+    s21baf(xArg:DoubleFloat,yArg:DoubleFloat,ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s21baf",_
+	["x"::S,"y"::S,"ifail"::S]$Lisp,_
+	[]$Lisp,_
+	[["double"::S,"s21bafResult"::S,"x"::S,"y"::S_
+	]$Lisp_
+	,["integer"::S,"ifail"::S]$Lisp_
+	]$Lisp,_
+	["s21bafResult"::S,"ifail"::S]$Lisp,_
+	[([xArg::Any,yArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+    s21bbf(xArg:DoubleFloat,yArg:DoubleFloat,zArg:DoubleFloat,_
+	ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s21bbf",_
+	["x"::S,"y"::S,"z"::S,"ifail"::S]$Lisp,_
+	[]$Lisp,_
+	[["double"::S,"s21bbfResult"::S,"x"::S,"y"::S_
+	,"z"::S]$Lisp_
+	,["integer"::S,"ifail"::S]$Lisp_
+	]$Lisp,_
+	["s21bbfResult"::S,"ifail"::S]$Lisp,_
+	[([xArg::Any,yArg::Any,zArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+    s21bcf(xArg:DoubleFloat,yArg:DoubleFloat,zArg:DoubleFloat,_
+	ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s21bcf",_
+	["x"::S,"y"::S,"z"::S,"ifail"::S]$Lisp,_
+	[]$Lisp,_
+	[["double"::S,"s21bcfResult"::S,"x"::S,"y"::S_
+	,"z"::S]$Lisp_
+	,["integer"::S,"ifail"::S]$Lisp_
+	]$Lisp,_
+	["s21bcfResult"::S,"ifail"::S]$Lisp,_
+	[([xArg::Any,yArg::Any,zArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+    s21bdf(xArg:DoubleFloat,yArg:DoubleFloat,zArg:DoubleFloat,_
+	rArg:DoubleFloat,ifailArg:Integer): Result == 
+	[(invokeNagman(NIL$Lisp,_
+	"s21bdf",_
+	["x"::S,"y"::S,"z"::S,"r"::S,"ifail"::S_
+	]$Lisp,_
+	[]$Lisp,_
+	[["double"::S,"s21bdfResult"::S,"x"::S,"y"::S_
+	,"z"::S,"r"::S]$Lisp_
+	,["integer"::S,"ifail"::S]$Lisp_
+	]$Lisp,_
+	["s21bdfResult"::S,"ifail"::S]$Lisp,_
+	[([xArg::Any,yArg::Any,zArg::Any,rArg::Any,ifailArg::Any ])_
+	@List Any]$Lisp)$Lisp)_
+	pretend List (Record(key:Symbol,entry:Any))]$Result
+
+@
+<<NAGS.dotabb>>=
+"NAGS" [color="#FF4488",href="bookvol10.4.pdf#nameddest=NAGS"]
+"ALIST" [color="#88FF44",href="bookvol10.3.pdf#nameddest=ALIST"]
+"NAGS" -> "ALIST"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{package NSUP2 NewSparseUnivariatePolynomialFunctions2}
 \pagehead{NewSparseUnivariatePolynomialFunctions2}{NSUP2}
 \pagepic{ps/v104newsparseunivariatepolynomialfunctions2.ps}{NSUP2}{1.00}
@@ -56280,6 +60301,90 @@ NumberFormats(): NFexports == NFimplementation where
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package NTPOLFN NumberTheoreticPolynomialFunctions}
+\pagehead{NumberTheoreticPolynomialFunctions}{NTPOLFN}
+\pagepic{ps/v104numbertheoreticpolynomialfunctions.ps}{NTPOLFN}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package NTPOLFN NumberTheoreticPolynomialFunctions>>=
+)abbrev package NTPOLFN NumberTheoreticPolynomialFunctions
+++ Author: Stephen M. Watt
+++ Date Created:  1990
+++ Date Last Updated: June 25, 1991
+++ Basic Operations:
+++ Related Domains:
+++ Also See:
+++ AMS Classifications:
+++ Keywords:
+++ Examples:
+++ References:
+++ Description:
+++   This package provides polynomials as functions on a ring.
+
+NumberTheoreticPolynomialFunctions(R: CommutativeRing): Exports == Impl where
+    NNI ==> NonNegativeInteger
+    RN  ==> Fraction Integer
+
+    Exports ==> with
+
+        cyclotomic: (NNI, R) -> R
+         ++ cyclotomic(n,r) \undocumented
+
+        if R has Algebra RN then
+            bernoulliB: (NNI, R) -> R
+             ++ bernoulliB(n,r) \undocumented
+            eulerE:     (NNI, R) -> R
+             ++ eulerE(n,r) \undocumented
+
+    Impl ==> add
+
+        import PolynomialNumberTheoryFunctions()
+
+        I   ==> Integer
+        SUP ==> SparseUnivariatePolynomial
+
+        -- This is the wrong way to evaluate the polynomial.
+        cyclotomic(k, x) ==
+            p: SUP(I) := cyclotomic(k)
+            r: R      := 0
+            while p ^= 0 repeat
+                d := degree p
+                c := leadingCoefficient p
+                p := reductum p
+                r := c*x**d + r
+            r
+
+        if R has Algebra RN then
+            eulerE(k, x) ==
+                p: SUP(RN) := euler(k)
+                r: R       := 0
+                while p ^= 0 repeat
+                    d := degree p
+                    c := leadingCoefficient p
+                    p := reductum p
+                    r := c*x**d + r
+                r
+            bernoulliB(k, x) ==
+                p: SUP(RN) := bernoulli(k)
+                r: R       := 0
+                while p ^= 0 repeat
+                    d := degree p
+                    c := leadingCoefficient p
+                    p := reductum p
+                    r := c*x**d + r
+                r
+
+@
+<<NTPOLFN.dotabb>>=
+"NTPOLFN" [color="#FF4488",href="bookvol10.4.pdf#nameddest=NTPOLFN"]
+"PFECAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=PFECAT"]
+"NTPOLFN" -> "PFECAT"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{package NUMERIC Numeric}
 \pagehead{Numeric}{NUMERIC}
 \pagepic{ps/v104numeric.ps}{NUMERIC}{1.00}
@@ -58434,6 +62539,34 @@ OpenMathServerPackage(): with
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package OPQUERY OperationsQuery}
+\pagehead{OperationsQuery}{OPQUERY}
+\pagepic{ps/v104operationsquery.ps}{OPQUERY}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package OPQUERY OperationsQuery>>=
+)abbrev package OPQUERY OperationsQuery
+++ This package exports tools to create AXIOM Library information databases.
+OperationsQuery(): Exports == Implementation where
+  Exports == with
+    getDatabase: String -> Database(IndexCard)
+      ++ getDatabase("char") returns a list of appropriate entries in the
+      ++ browser database.  The legal values for "char" are "o" (operations),
+      ++ "k" (constructors), "d" (domains), "c" (categories) or "p" (packages).
+  Implementation == add
+    getDatabase(s) == getBrowseDatabase(s)$Lisp
+
+@
+<<OPQUERY.dotabb>>=
+"OPQUERY" [color="#FF4488",href="bookvol10.4.pdf#nameddest=OPQUERY"]
+"ORDSET" [color="#4488FF",href="bookvol10.2.pdf#nameddest=ORDSET"]
+"OPQUERY" -> "ORDSET"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{package ORDCOMP2 OrderedCompletionFunctions2}
 \pagehead{OrderedCompletionFunctions2}{ORDCOMP2}
 \pagepic{ps/v104orderedcompletionfunctions2.ps}{ORDCOMP2}{1.00}
@@ -58570,31 +62703,124 @@ OrderingFunctions(dim,S) : T == C  where
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\section{package OPQUERY OperationsQuery}
-\pagehead{OperationsQuery}{OPQUERY}
-\pagepic{ps/v104operationsquery.ps}{OPQUERY}{1.00}
+\section{package ORTHPOL OrthogonalPolynomialFunctions}
+\pagehead{OrthogonalPolynomialFunctions}{ORTHPOL}
+\pagepic{ps/v104orthogonalpolynomialfunctions.ps}{ORTHPOL}{1.00}
 
 {\bf Exports:}\\
 \begin{tabular}{lllll}
 \end{tabular}
 
-<<package OPQUERY OperationsQuery>>=
-)abbrev package OPQUERY OperationsQuery
-++ This package exports tools to create AXIOM Library information databases.
-OperationsQuery(): Exports == Implementation where
-  Exports == with
-    getDatabase: String -> Database(IndexCard)
-      ++ getDatabase("char") returns a list of appropriate entries in the
-      ++ browser database.  The legal values for "char" are "o" (operations),
-      ++ "k" (constructors), "d" (domains), "c" (categories) or "p" (packages).
-  Implementation == add
-    getDatabase(s) == getBrowseDatabase(s)$Lisp
+<<package ORTHPOL OrthogonalPolynomialFunctions>>=
+)abbrev package ORTHPOL OrthogonalPolynomialFunctions
+++ Author: Stephen M. Watt
+++ Date Created:  1990
+++ Date Last Updated: June 25, 1991
+++ Basic Operations:
+++ Related Domains:
+++ Also See:
+++ AMS Classifications:
+++ Keywords:
+++ Examples:
+++ References:
+++ Description:
+++   This package provides orthogonal polynomials as functions on a ring.
 
-@
-<<OPQUERY.dotabb>>=
-"OPQUERY" [color="#FF4488",href="bookvol10.4.pdf#nameddest=OPQUERY"]
-"ORDSET" [color="#4488FF",href="bookvol10.2.pdf#nameddest=ORDSET"]
-"OPQUERY" -> "ORDSET"
+OrthogonalPolynomialFunctions(R: CommutativeRing): Exports == Impl where
+    NNI ==> NonNegativeInteger
+    RN  ==> Fraction Integer
+
+    Exports ==> with
+
+        chebyshevT: (NNI, R) -> R
+           ++ chebyshevT(n,x) is the n-th Chebyshev polynomial of the first
+           ++ kind, \spad{T[n](x)}.  These are defined by
+           ++ \spad{(1-t*x)/(1-2*t*x+t**2) = sum(T[n](x) *t**n, n = 0..)}.
+
+        chebyshevU: (NNI, R) -> R
+           ++ chebyshevU(n,x) is the n-th Chebyshev polynomial of the second
+           ++ kind, \spad{U[n](x)}. These are defined by
+           ++ \spad{1/(1-2*t*x+t**2) = sum(T[n](x) *t**n, n = 0..)}.
+
+        hermiteH:   (NNI, R) -> R
+           ++ hermiteH(n,x) is the n-th Hermite polynomial, \spad{H[n](x)}.
+           ++ These are defined by
+           ++ \spad{exp(2*t*x-t**2) = sum(H[n](x)*t**n/n!, n = 0..)}.
+
+        laguerreL:  (NNI, R) -> R
+           ++ laguerreL(n,x) is the n-th Laguerre polynomial, \spad{L[n](x)}.
+           ++ These are defined by
+           ++ \spad{exp(-t*x/(1-t))/(1-t) = sum(L[n](x)*t**n/n!, n = 0..)}.
+
+        laguerreL:  (NNI, NNI, R) -> R
+           ++ laguerreL(m,n,x) is the associated Laguerre polynomial,
+           ++ \spad{L<m>[n](x)}.  This is the m-th derivative of \spad{L[n](x)}.
+
+        if R has Algebra RN then
+            legendreP:  (NNI, R) -> R
+                ++ legendreP(n,x) is the n-th Legendre polynomial,
+                ++ \spad{P[n](x)}.  These are defined by
+                ++ \spad{1/sqrt(1-2*x*t+t**2) = sum(P[n](x)*t**n, n = 0..)}.
+
+    Impl ==> add
+        p0, p1: R
+        cx:     Integer
+
+        import IntegerCombinatoricFunctions()
+
+        laguerreL(n, x) ==
+            n = 0 => 1
+            (p1, p0) := (-x + 1, 1)
+            for i in 1..n-1 repeat
+                (p1, p0) := ((2*i::R + 1 - x)*p1 - i**2*p0, p1)
+            p1
+        laguerreL(m, n, x) ==
+            ni := n::Integer
+            mi := m::Integer
+            cx := (-1)**m * binomial(ni,ni-mi) * factorial(ni)
+            p0 := 1
+            p1 := cx::R
+            for j in 1..ni-mi repeat
+                cx := -cx*(ni-mi-j+1)
+                cx := (cx exquo ((mi+j)*j))::Integer
+                p0 := p0 * x
+                p1 := p1 + cx*p0
+            p1
+        chebyshevT(n, x) ==
+            n = 0 => 1
+            (p1, p0) := (x, 1)
+            for i in 1..n-1 repeat
+                (p1, p0) := (2*x*p1 - p0, p1)
+            p1
+        chebyshevU(n, x) ==
+            n = 0 => 1
+            (p1, p0) := (2*x, 1)
+            for i in 1..n-1 repeat
+                (p1, p0) := (2*x*p1 - p0, p1)
+            p1
+        hermiteH(n, x) ==
+            n = 0 => 1
+            (p1, p0) := (2*x, 1)
+            for i in 1..n-1 repeat
+                (p1, p0) := (2*x*p1 - 2*i*p0, p1)
+            p1
+        if R has Algebra RN then
+            legendreP(n, x) ==
+                n = 0 => 1
+                p0 := 1
+                p1 := x
+                for i in 1..n-1 repeat
+                    c: RN := 1/(i+1)
+                    (p1, p0) := (c*((2*i+1)*x*p1 - i*p0), p1)
+                p1
+
+@
+<<ORTHPOL.dotabb>>=
+"ORTHPOL" [color="#FF4488",href="bookvol10.4.pdf#nameddest=ORTHPOL"]
+"PID" [color="#4488FF",href="bookvol10.2.pdf#nameddest=PID"]
+"OAGROUP" [color="#4488FF",href="bookvol10.2.pdf#nameddest=OAGROUP"]
+"ORTHPOL" -> "PID"
+"ORTHPOL" -> "OAGROUP"
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -64990,6 +69216,293 @@ PolynomialRoots(E, V, R, P, F):Exports == Implementation where
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package SOLVEFOR PolynomialSolveByFormulas}
+\pagehead{PolynomialSolveByFormulas}{SOLVEFOR}
+\pagepic{ps/v104polynomialsolvebyformulas.ps}{SOLVEFOR}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package SOLVEFOR PolynomialSolveByFormulas>>=
+)abbrev package SOLVEFOR PolynomialSolveByFormulas
+--  Current fields with "**": (%, RationalNumber) -> % are
+--     ComplexFloat, RadicalExtension(K) and RationalRadical
+--  SMW June 86, BMT Sept 93
+++ Description:
+++ This package factors the formulas out of the general solve code,
+++ allowing their recursive use over different domains.
+++ Care is taken to introduce few radicals so that radical extension
+++ domains can more easily simplify the results.
+
+PolynomialSolveByFormulas(UP, F): PSFcat == PSFdef where
+
+    UP: UnivariatePolynomialCategory F
+    F:  Field with "**": (%, Fraction Integer) -> %
+
+    L  ==> List
+
+    PSFcat == with
+        solve:      UP -> L F
+		++ solve(u) \undocumented
+        particularSolution:  UP -> F
+		++ particularSolution(u) \undocumented
+        mapSolve:   (UP, F -> F) -> Record(solns: L F,
+                                           maps: L Record(arg:F,res:F))
+		++ mapSolve(u,f) \undocumented
+
+        linear:     UP -> L F
+		++ linear(u) \undocumented
+        quadratic:  UP -> L F
+		++ quadratic(u) \undocumented
+        cubic:      UP -> L F
+		++ cubic(u) \undocumented
+        quartic:    UP -> L F
+		++ quartic(u) \undocumented
+
+        -- Arguments give coefs from high to low degree.
+        linear:     (F, F)          -> L F
+		++ linear(f,g) \undocumented
+        quadratic:  (F, F, F)       -> L F
+		++ quadratic(f,g,h) \undocumented
+        cubic:      (F, F, F, F)    -> L F
+		++ cubic(f,g,h,i) \undocumented
+        quartic:    (F, F, F, F, F) -> L F
+		++ quartic(f,g,h,i,j) \undocumented
+
+        aLinear:    (F, F)          -> F
+		++ aLinear(f,g) \undocumented
+        aQuadratic: (F, F, F)       -> F
+		++ aQuadratic(f,g,h) \undocumented
+        aCubic:     (F, F, F, F)    -> F
+		++ aCubic(f,g,h,j) \undocumented
+        aQuartic:   (F, F, F, F, F) -> F
+		++ aQuartic(f,g,h,i,k) \undocumented
+
+    PSFdef == add
+
+        -----------------------------------------------------------------
+        -- Stuff for mapSolve
+        -----------------------------------------------------------------
+        id ==> (IDENTITY$Lisp)
+
+        maplist: List Record(arg: F, res: F) := []
+        mapSolving?: Boolean := false
+        -- map: F -> F := id #1    replaced with line below
+        map: Boolean := false
+
+        mapSolve(p, fn) ==
+            -- map := fn #1   replaced with line below
+            locmap: F -> F := fn #1; map := id locmap
+            mapSolving? := true;  maplist := []
+            slist := solve p
+            mapSolving? := false;
+            -- map := id #1   replaced with line below
+            locmap := id #1; map := id locmap
+            [slist, maplist]
+
+        part(s: F): F ==
+            not mapSolving? => s
+            -- t := map s     replaced with line below
+            t: F := SPADCALL(s, map)$Lisp
+            t = s => s
+            maplist := cons([t, s], maplist)
+            t
+
+        -----------------------------------------------------------------
+        -- Entry points and error handling
+        -----------------------------------------------------------------
+        cc ==> coefficient
+
+        -- local intsolve
+        intsolve(u:UP):L(F) ==
+            u := (factors squareFree u).1.factor
+            n := degree u
+            n=1 => linear    (cc(u,1), cc(u,0))
+            n=2 => quadratic (cc(u,2), cc(u,1), cc(u,0))
+            n=3 => cubic     (cc(u,3), cc(u,2), cc(u,1), cc(u,0))
+            n=4 => quartic   (cc(u,4), cc(u,3), cc(u,2), cc(u,1), cc(u,0))
+            error "All sqfr factors of polynomial must be of degree < 5"
+
+        solve u ==
+            ls := nil$L(F)
+            for f in factors squareFree u repeat
+               lsf := intsolve f.factor
+               for i in 1..(f.exponent) repeat ls := [:lsf,:ls]
+            ls
+
+        particularSolution u ==
+            u := (factors squareFree u).1.factor
+            n := degree u
+            n=1 => aLinear    (cc(u,1), cc(u,0))
+            n=2 => aQuadratic (cc(u,2), cc(u,1), cc(u,0))
+            n=3 => aCubic     (cc(u,3), cc(u,2), cc(u,1), cc(u,0))
+            n=4 => aQuartic   (cc(u,4), cc(u,3), cc(u,2), cc(u,1), cc(u,0))
+            error "All sqfr factors of polynomial must be of degree < 5"
+
+        needDegree(n: Integer, u: UP): Boolean ==
+            degree u = n => true
+            error concat("Polynomial must be of degree ", n::String)
+
+        needLcoef(cn: F): Boolean ==
+            cn ^= 0 => true
+            error "Leading coefficient must not be 0."
+
+        needChar0(): Boolean ==
+            characteristic()$F = 0 => true
+            error "Formula defined only for fields of characteristic 0."
+
+        linear u ==
+            needDegree(1, u)
+            linear (coefficient(u,1), coefficient(u,0))
+
+        quadratic u ==
+            needDegree(2, u)
+            quadratic (coefficient(u,2), coefficient(u,1),
+                       coefficient(u,0))
+
+        cubic u ==
+            needDegree(3, u)
+            cubic (coefficient(u,3), coefficient(u,2),
+                   coefficient(u,1), coefficient(u,0))
+
+        quartic u ==
+            needDegree(4, u)
+            quartic (coefficient(u,4),coefficient(u,3),
+                     coefficient(u,2),coefficient(u,1),coefficient(u,0))
+
+        -----------------------------------------------------------------
+        -- The formulas
+        -----------------------------------------------------------------
+
+        -- local function for testing equality of radicals.
+        --  This function is necessary to detect at least some of the
+        --  situations like sqrt(9)-3 = 0 --> false.
+        equ(x:F,y:F):Boolean ==
+            ( (recip(x-y)) case "failed" ) => true
+            false
+
+        linear(c1, c0) ==
+            needLcoef c1
+            [- c0/c1 ]
+
+        aLinear(c1, c0) ==
+            first linear(c1,c0)
+
+        quadratic(c2, c1, c0) ==
+            needLcoef c2; needChar0()
+            (c0 = 0) => [0$F,:linear(c2, c1)]
+            (c1 = 0) => [(-c0/c2)**(1/2),-(-c0/c2)**(1/2)]
+            D := part(c1**2 - 4*c2*c0)**(1/2)
+            [(-c1+D)/(2*c2), (-c1-D)/(2*c2)]
+
+        aQuadratic(c2, c1, c0) ==
+            needLcoef c2; needChar0()
+            (c0 = 0) => 0$F
+            (c1 = 0) => (-c0/c2)**(1/2)
+            D := part(c1**2 - 4*c2*c0)**(1/2)
+            (-c1+D)/(2*c2)
+
+        w3: F := (-1 + (-3::F)**(1/2)) / 2::F
+
+        cubic(c3, c2, c1, c0) ==
+            needLcoef c3; needChar0()
+
+            -- case one root = 0, not necessary but keeps result small
+            (c0 = 0) => [0$F,:quadratic(c3, c2, c1)]
+            a1 := c2/c3;  a2 := c1/c3;  a3 := c0/c3
+
+            -- case x**3-a3 = 0, not necessary but keeps result small
+            (a1 = 0 and a2 = 0) =>
+                [ u*(-a3)**(1/3) for u in [1, w3, w3**2 ] ]
+
+            -- case x**3 + a1*x**2 + a1**2*x/3 + a3 = 0, the general for-
+            --   mula is not valid in this case, but solution is easy.
+            P := part(-a1/3::F)
+            equ(a1**2,3*a2) =>
+              S := part((- a3 + (a1**3)/27::F)**(1/3))
+              [ P + S*u for u in [1,w3,w3**2] ]
+
+            -- general case
+            Q := part((3*a2 - a1**2)/9::F)
+            R := part((9*a1*a2 - 27*a3 - 2*a1**3)/54::F)
+            D := part(Q**3 + R**2)**(1/2)
+            S := part(R + D)**(1/3)
+            -- S = 0 is done in the previous case
+            [ P + S*u - Q/(S*u) for u in [1, w3, w3**2] ]
+
+        aCubic(c3, c2, c1, c0) ==
+            needLcoef c3; needChar0()
+            (c0 = 0) => 0$F
+            a1 := c2/c3;  a2 := c1/c3;  a3 := c0/c3
+            (a1 = 0 and a2 = 0) => (-a3)**(1/3)
+            P := part(-a1/3::F)
+            equ(a1**2,3*a2) =>
+              S := part((- a3 + (a1**3)/27::F)**(1/3))
+              P + S
+            Q := part((3*a2 - a1**2)/9::F)
+            R := part((9*a1*a2 - 27*a3 - 2*a1**3)/54::F)
+            D := part(Q**3 + R**2)**(1/2)
+            S := part(R + D)**(1/3)
+            P + S - Q/S
+
+        quartic(c4, c3, c2, c1, c0) ==
+            needLcoef c4; needChar0()
+
+            -- case one root = 0, not necessary but keeps result small
+            (c0 = 0) => [0$F,:cubic(c4, c3, c2, c1)]
+            -- Make monic:
+            a1 := c3/c4; a2 := c2/c4; a3 := c1/c4; a4 := c0/c4
+
+            -- case x**4 + a4 = 0 <=> (x**2-sqrt(-a4))*(x**2+sqrt(-a4))
+            -- not necessary but keeps result small.
+            (a1 = 0 and a2 = 0 and a3 = 0) =>
+                append( quadratic(1, 0, (-a4)**(1/2)),_
+                        quadratic(1 ,0, -((-a4)**(1/2))) )
+
+            -- Translate w = x+a1/4 to eliminate a1:  w**4+p*w**2+q*w+r
+            p := part(a2-3*a1*a1/8::F)
+            q := part(a3-a1*a2/2::F + a1**3/8::F)
+            r := part(a4-a1*a3/4::F + a1**2*a2/16::F - 3*a1**4/256::F)
+            -- t0 := the cubic resolvent of x**3-p*x**2-4*r*x+4*p*r-q**2
+            -- The roots of the translated polynomial are those of
+            -- two quadratics. (What about rt=0 ?)
+            -- rt=0 can be avoided by picking a root ^= p of the cubic
+            -- polynomial above. This is always possible provided that
+            -- the input is squarefree. In this case the two other roots
+            -- are +(-) 2*r**(1/2).
+            if equ(q,0)            -- this means p is a root
+              then t0 := part(2*(r**(1/2)))
+              else t0 := aCubic(1, -p, -4*r, 4*p*r - q**2)
+            rt    := part(t0 - p)**(1/2)
+            slist := append( quadratic( 1,  rt, (-q/rt + t0)/2::F ),
+                             quadratic( 1, -rt, ( q/rt + t0)/2::F ))
+            -- Translate back:
+            [s - a1/4::F for s in slist]
+
+        aQuartic(c4, c3, c2, c1, c0) ==
+            needLcoef c4; needChar0()
+            (c0 = 0) => 0$F
+            a1 := c3/c4; a2 := c2/c4; a3 := c1/c4; a4 := c0/c4
+            (a1 = 0 and a2 = 0 and a3 = 0) => (-a4)**(1/4)
+            p  := part(a2-3*a1*a1/8::F)
+            q  := part(a3-a1*a2/2::F + a1**2*a1/8::F)
+            r  := part(a4-a1*a3/4::F + a1**2*a2/16::F - 3*a1**4/256::F)
+            if equ(q,0)
+              then t0 := part(2*(r**(1/2)))
+              else t0 := aCubic(1, -p, -4*r, 4*p*r - q**2)
+            rt := part(t0 - p)**(1/2)
+            s  := aQuadratic( 1,  rt, (-q/rt + t0)/2::F )
+            s - a1/4::F
+
+@
+<<SOLVEFOR.dotabb>>=
+"SOLVEFOR" [color="#FF4488",href="bookvol10.4.pdf#nameddest=SOLVEFOR"]
+"PFECAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=PFECAT"]
+"SOLVEFOR" -> "PFECAT"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{package PSQFR PolynomialSquareFree}
 \pagehead{PolynomialSquareFree}{PSQFR}
 \pagepic{ps/v104polynomialsquarefree.ps}{PSQFR}{1.00}
@@ -68915,6 +73428,294 @@ RadicalEigenPackage() : C == T
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package SOLVERAD RadicalSolvePackage}
+\pagehead{RadicalSolvePackage}{SOLVERAD}
+\pagepic{ps/v104radicalsolvepackage.ps}{SOLVERAD}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package SOLVERAD RadicalSolvePackage>>=
+)abbrev package SOLVERAD RadicalSolvePackage
+++ Author: P.Gianni
+++ Date Created: Summer 1990
+++ Date Last Updated: October 1991
+++ Basic Functions:
+++ Related Constructors: SystemSolvePackage, FloatingRealPackage,
+++ FloatingComplexPackage
+++ Also See:
+++ AMS Classifications:
+++ Keywords:
+++ References:
+++ Description:
+++ This package tries to find solutions
+++ expressed in terms of radicals for systems of equations
+++ of rational functions with coefficients in an integral domain R.
+RadicalSolvePackage(R): Cat == Capsule where
+    R   :  Join(EuclideanDomain, OrderedSet, CharacteristicZero)
+    PI ==> PositiveInteger
+    NNI==> NonNegativeInteger
+    Z  ==> Integer
+    B  ==> Boolean
+    ST ==> String
+    PR ==> Polynomial R
+    UP ==> SparseUnivariatePolynomial PR
+    LA ==> LocalAlgebra(PR, Z, Z)
+    RF ==> Fraction PR
+    RE ==> Expression R
+    EQ ==> Equation
+    SY ==> Symbol
+    SU ==> SuchThat(List RE, List Equation RE)
+    SUP==> SparseUnivariatePolynomial
+    L  ==> List
+    P  ==> Polynomial
+
+    SOLVEFOR ==> PolynomialSolveByFormulas(SUP RE, RE)
+    UPF2     ==> SparseUnivariatePolynomialFunctions2(PR,RE)
+
+    Cat ==> with
+
+        radicalSolve :     (RF,SY)      -> L EQ RE
+          ++ radicalSolve(rf,x) finds the solutions expressed in terms of
+          ++ radicals of the equation rf = 0 with respect to the symbol x,
+          ++ where rf is a rational function.
+        radicalSolve :       RF         -> L EQ RE
+          ++ radicalSolve(rf) finds the solutions expressed in terms of
+          ++ radicals of the equation rf = 0, where rf is a
+          ++ univariate rational function.
+        radicalSolve :    (EQ RF,SY)    -> L EQ RE
+          ++ radicalSolve(eq,x) finds the solutions expressed in terms of
+          ++ radicals of the equation of rational functions eq
+          ++ with respect to the symbol x.
+        radicalSolve :      EQ RF       -> L EQ RE
+          ++ radicalSolve(eq) finds the solutions expressed in terms of
+          ++ radicals of the equation of rational functions eq
+          ++ with respect to the unique symbol x appearing in eq.
+        radicalSolve :    (L RF,L SY)   -> L L EQ RE
+          ++ radicalSolve(lrf,lvar) finds the solutions expressed in terms of
+          ++ radicals of the system of equations lrf = 0 with
+          ++ respect to the list of symbols lvar,
+          ++ where lrf is a list of rational functions.
+        radicalSolve :       L RF       -> L L EQ RE
+          ++ radicalSolve(lrf) finds the solutions expressed in terms of
+          ++ radicals of the system of equations lrf = 0, where lrf is a
+          ++ system of univariate rational functions.
+        radicalSolve :   (L EQ RF,L SY) -> L L EQ RE
+          ++ radicalSolve(leq,lvar) finds the solutions expressed in terms of
+          ++ radicals of the system of equations of rational functions leq
+          ++ with respect to the list of symbols lvar.
+        radicalSolve :     L EQ RF      -> L L EQ RE
+          ++ radicalSolve(leq) finds the solutions expressed in terms of
+          ++ radicals of the system of equations of rational functions leq
+          ++ with respect to the unique symbol x appearing in leq.
+        radicalRoots :      (RF,SY)     -> L RE
+          ++ radicalRoots(rf,x) finds the roots expressed in terms of radicals
+          ++ of the rational function rf with respect to the symbol x.
+        radicalRoots :    (L RF,L SY)   -> L L RE
+          ++ radicalRoots(lrf,lvar) finds the roots expressed in terms of
+          ++ radicals of the list of rational functions lrf
+          ++ with respect to the list of symbols lvar.
+        contractSolve:    (EQ RF,SY)  -> SU
+          ++ contractSolve(eq,x) finds the solutions expressed in terms of
+          ++ radicals of the equation of rational functions eq
+          ++ with respect to the symbol x.  The result contains new
+          ++ symbols for common subexpressions in order to reduce the
+          ++ size of the output.
+        contractSolve:    (RF,SY)     -> SU
+          ++ contractSolve(rf,x) finds the solutions expressed in terms of
+          ++ radicals of the equation rf = 0 with respect to the symbol x,
+          ++ where rf is a rational function. The result contains  new
+          ++ symbols for common subexpressions in order to reduce the
+          ++ size of the output.
+    Capsule ==> add
+        import DegreeReductionPackage(PR, R)
+        import SOLVEFOR
+
+        SideEquations: List EQ RE := []
+        ContractSoln:  B := false
+
+        ---- Local Function Declarations ----
+        solveInner:(PR, SY, B) -> SU
+        linear:    UP -> List RE
+        quadratic: UP -> List RE
+        cubic:     UP -> List RE
+        quartic:   UP -> List RE
+        rad:       PI -> RE
+        wrap:      RE -> RE
+        New:       RE -> RE
+        makeEq : (List RE,L SY) -> L EQ RE
+        select :    L L RE      -> L L RE
+        isGeneric? :  (L PR,L SY)  ->  Boolean
+        findGenZeros :  (L PR,L SY) -> L L RE
+        findZeros   :   (L PR,L SY) -> L L RE
+
+
+        New s ==
+            s = 0 => 0
+            S := new()$Symbol ::PR::RF::RE
+            SideEquations := append([S = s], SideEquations)
+            S
+
+        linear u    == [(-coefficient(u,0))::RE /(coefficient(u,1))::RE]
+        quadratic u == quadratic(map(coerce,u)$UPF2)$SOLVEFOR
+        cubic u     == cubic(map(coerce,u)$UPF2)$SOLVEFOR
+        quartic u   == quartic(map(coerce,u)$UPF2)$SOLVEFOR
+        rad n       == n::Z::RE
+        wrap s      == (ContractSoln => New s; s)
+
+
+        ---- Exported Functions ----
+
+
+       -- find the zeros of components in "generic" position --
+        findGenZeros(rlp:L PR,rlv:L SY) : L L RE ==
+         pp:=rlp.first
+         v:=first rlv
+         rlv:=rest rlv
+         res:L L RE:=[]
+         res:=append([reverse cons(r,[eval(
+           (-coefficient(univariate(p,vv),0)::RE)/(leadingCoefficient univariate(p,vv))::RE,
+              kernel(v)@Kernel(RE),r) for vv in rlv for p in rlp.rest])
+                for r in radicalRoots(pp::RF,v)],res)
+         res
+
+
+        findZeros(rlp:L PR,rlv:L SY) : L L RE ==
+         parRes:=[radicalRoots(p::RF,v) for p in rlp for v in rlv]
+         parRes:=select parRes
+         res:L L RE :=[]
+         res1:L RE
+         for par in parRes repeat
+           res1:=[par.first]
+           lv1:L Kernel(RE):=[kernel rlv.first]
+           rlv1:=rlv.rest
+           p1:=par.rest
+           while p1^=[] repeat
+             res1:=cons(eval(p1.first,lv1,res1),res1)
+             p1:=p1.rest
+             lv1:=cons(kernel rlv1.first,lv1)
+             rlv1:=rlv1.rest
+           res:=cons(res1,res)
+         res
+
+        radicalSolve(pol:RF,v:SY) ==
+          [equation(v::RE,r) for r in radicalRoots(pol,v)]
+
+        radicalSolve(p:RF) ==
+          zero? p =>
+             error "equation is always satisfied"
+          lv:=removeDuplicates
+             concat(variables numer p, variables denom p)
+          empty? lv => error "inconsistent equation"
+          #lv>1 => error "too many variables"
+          radicalSolve(p,lv.first)
+
+        radicalSolve(eq: EQ RF) ==
+          radicalSolve(lhs eq -rhs eq)
+
+        radicalSolve(eq: EQ RF,v:SY) ==
+           radicalSolve(lhs eq - rhs eq,v)
+
+        radicalRoots(lp: L RF,lv: L SY) ==
+          parRes:=triangularSystems(lp,lv)$SystemSolvePackage(R)
+          parRes= list [] => []
+           -- select the components in "generic" form
+          rlv:=reverse lv
+          rpRes:=[reverse res for res in parRes]
+          listGen:= [res for res in rpRes|isGeneric?(res,rlv)]
+          result:L L RE:=[]
+          if listGen^=[] then
+            result:="append"/[findGenZeros(res,rlv) for res in listGen]
+            for res in listGen repeat
+                rpRes:=delete(rpRes,position(res,rpRes))
+           --  non-generic components
+          rpRes = [] => result
+          append("append"/[findZeros(res,rlv) for res in rpRes],
+                         result)
+
+        radicalSolve(lp:L RF,lv:L SY) ==
+          [makeEq(lres,lv) for lres in radicalRoots(lp,lv)]
+
+        radicalSolve(lp: L RF) ==
+          lv:="setUnion"/[setUnion(variables numer p,variables denom p)
+                          for p in lp]
+          [makeEq(lres,lv) for lres in radicalRoots(lp,lv)]
+
+        radicalSolve(le:L EQ RF,lv:L SY) ==
+          lp:=[rhs p -lhs p for p in le]
+          [makeEq(lres,lv) for lres in radicalRoots(lp,lv)]
+
+        radicalSolve(le: L EQ RF) ==
+          lp:=[rhs p -lhs p for p in le]
+          lv:="setUnion"/[setUnion(variables numer p,variables denom p)
+                          for p in lp]
+          [makeEq(lres,lv) for lres in radicalRoots(lp,lv)]
+
+        contractSolve(eq:EQ RF, v:SY)==
+           solveInner(numer(lhs eq - rhs eq), v, true)
+
+        contractSolve(pq:RF, v:SY) == solveInner(numer pq, v, true)
+
+        radicalRoots(pq:RF, v:SY) == lhs solveInner(numer pq, v, false)
+
+
+       -- test if the ideal is radical in generic position --
+        isGeneric?(rlp:L PR,rlv:L SY) : Boolean ==
+          "and"/[degree(f,x)=1 for f in rest rlp  for x in rest rlv]
+
+        ---- select  the univariate factors
+        select(lp:L L RE) : L L RE ==
+          lp=[] => list []
+          [:[cons(f,lsel) for lsel in select lp.rest] for f in lp.first]
+
+        ---- Local Functions ----
+       -- construct the equation
+        makeEq(nres:L RE,lv:L SY) : L EQ RE ==
+          [equation(x :: RE,r) for x in lv for r in nres]
+
+        solveInner(pq:PR,v:SY,contractFlag:B) ==
+            SideEquations := []
+            ContractSoln  := contractFlag
+
+            factors:= factors
+               (factor pq)$MultivariateFactorize(SY,IndexedExponents SY,R,PR)
+
+            constants:  List PR     := []
+            unsolved:   List PR     := []
+            solutions:  List RE     := []
+
+            for f in factors repeat
+                ff:=f.factor
+                ^ member?(v, variables (ff)) =>
+                    constants := cons(ff, constants)
+                u := univariate(ff, v)
+                t := reduce u
+                u := t.pol
+                n := degree u
+                l: List RE :=
+                    n = 1 => linear u
+                    n = 2 => quadratic u
+                    n = 3 => cubic u
+                    n = 4 => quartic u
+                    unsolved := cons(ff, unsolved)
+                    []
+                for s in l repeat
+                    if t.deg > 1 then s := wrap s
+                    T0 := expand(s, t.deg)
+                    for i in 1..f.exponent repeat
+                        solutions := append(T0, solutions)
+                    re := SideEquations
+            [solutions, SideEquations]$SU
+
+@
+<<SOLVERAD.dotabb>>=
+"SOLVERAD" [color="#FF4488",href="bookvol10.4.pdf#nameddest=SOLVERAD"]
+"ACFS" [color="#4488FF",href="bookvol10.2.pdf#nameddest=ACFS"]
+"SOLVERAD" -> "ACFS"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{package RADUTIL RadixUtilities}
 \pagehead{RadixUtilities}{RADUTIL}
 \pagepic{ps/v104radixutilities.ps}{RADUTIL}{1.00}
@@ -69728,6 +74529,351 @@ RationalFunctionIntegration(F): Exports == Implementation where
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package LIMITRF RationalFunctionLimitPackage}
+\pagehead{RationalFunctionLimitPackage}{LIMITRF}
+\pagepic{ps/v104rationalfunctionlimitpackage.ps}{LIMITRF}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package LIMITRF RationalFunctionLimitPackage>>=
+)abbrev package LIMITRF RationalFunctionLimitPackage
+++ Computation of limits for rational functions
+++ Author: Manuel Bronstein
+++ Date Created: 4 October 1989
+++ Date Last Updated: 26 November 1991
+++ Description: Computation of limits for rational functions.
+++ Keywords: limit, rational function.
+RationalFunctionLimitPackage(R:GcdDomain):Exports==Implementation where
+  Z       ==> Integer
+  P       ==> Polynomial R
+  RF      ==> Fraction P
+  EQ      ==> Equation
+  ORF     ==> OrderedCompletion RF
+  OPF     ==> OnePointCompletion RF
+  UP      ==> SparseUnivariatePolynomial RF
+  SE      ==> Symbol
+  QF      ==> Fraction SparseUnivariatePolynomial RF
+  Result  ==> Union(ORF, "failed")
+  TwoSide ==> Record(leftHandLimit:Result, rightHandLimit:Result)
+  U       ==> Union(ORF, TwoSide, "failed")
+  RFSGN   ==> RationalFunctionSign(R)
+ 
+  Exports ==> with
+-- The following are the one we really want, but the interpreter cannot
+-- handle them...
+--  limit: (RF,EQ ORF) -> U
+--  ++ limit(f(x),x,a) computes the real two-sided limit lim(x -> a,f(x))
+ 
+--  complexLimit: (RF,EQ OPF) -> OPF
+--  ++ complexLimit(f(x),x,a) computes the complex limit lim(x -> a,f(x))
+ 
+-- ... so we replace them by the following 4:
+    limit: (RF,EQ OrderedCompletion P) -> U
+      ++ limit(f(x),x = a) computes the real two-sided limit
+      ++ of f as its argument x approaches \spad{a}.
+    limit: (RF,EQ RF) -> U
+      ++ limit(f(x),x = a) computes the real two-sided limit
+      ++ of f as its argument x approaches \spad{a}.
+    complexLimit: (RF,EQ OnePointCompletion P) -> OPF
+      ++ \spad{complexLimit(f(x),x = a)} computes the complex limit
+      ++ of \spad{f} as its argument x approaches \spad{a}.
+    complexLimit: (RF,EQ RF) -> OPF
+      ++ complexLimit(f(x),x = a) computes the complex limit
+      ++ of f as its argument x approaches \spad{a}.
+    limit: (RF,EQ RF,String) -> Result
+      ++ limit(f(x),x,a,"left") computes the real limit
+      ++ of f as its argument x approaches \spad{a} from the left;
+      ++ limit(f(x),x,a,"right") computes the corresponding limit as x
+      ++ approaches \spad{a} from the right.
+ 
+  Implementation ==> add
+    import ToolsForSign R
+    import InnerPolySign(RF, UP)
+    import RFSGN
+    import PolynomialCategoryQuotientFunctions(IndexedExponents SE,
+                                                      SE, R, P, RF)
+ 
+    finiteComplexLimit: (QF, RF) -> OPF
+    finiteLimit       : (QF, RF) -> U
+    fLimit            : (Z, UP, RF, Z) -> Result
+ 
+-- These 2 should be exported, see comment above
+    locallimit       : (RF, SE, ORF) -> U
+    locallimitcomplex: (RF, SE, OPF) -> OPF
+ 
+    limit(f:RF,eq:EQ RF) ==
+      (xx := retractIfCan(lhs eq)@Union(SE,"failed")) case "failed" =>
+        error "limit: left hand side must be a variable"
+      x := xx :: SE; a := rhs eq
+      locallimit(f,x,a::ORF)
+ 
+    complexLimit(f:RF,eq:EQ RF) ==
+      (xx := retractIfCan(lhs eq)@Union(SE,"failed")) case "failed" =>
+        error "limit: left hand side must be a variable"
+      x := xx :: SE; a := rhs eq
+      locallimitcomplex(f,x,a::OPF)
+ 
+    limit(f:RF,eq:EQ OrderedCompletion P) ==
+      (p := retractIfCan(lhs eq)@Union(P,"failed")) case "failed" =>
+        error "limit: left hand side must be a variable"
+      (xx := retractIfCan(p)@Union(SE,"failed")) case "failed" =>
+        error "limit: left hand side must be a variable"
+      x := xx :: SE
+      a := map(#1::RF,rhs eq)$OrderedCompletionFunctions2(P,RF)
+      locallimit(f,x,a)
+ 
+    complexLimit(f:RF,eq:EQ OnePointCompletion P) ==
+      (p := retractIfCan(lhs eq)@Union(P,"failed")) case "failed" =>
+        error "limit: left hand side must be a variable"
+      (xx := retractIfCan(p)@Union(SE,"failed")) case "failed" =>
+        error "limit: left hand side must be a variable"
+      x := xx :: SE
+      a := map(#1::RF,rhs eq)$OnePointCompletionFunctions2(P,RF)
+      locallimitcomplex(f,x,a)
+ 
+    fLimit(n, d, a, dir) ==
+      (s := signAround(d, a, dir, sign$RFSGN)) case "failed" => "failed"
+      n * (s::Z) * plusInfinity()
+ 
+    finiteComplexLimit(f, a) ==
+      zero?(n := (numer f) a) => 0
+      zero?(d := (denom f) a) => infinity()
+      (n / d)::OPF
+ 
+    finiteLimit(f, a) ==
+      zero?(n := (numer f) a) => 0
+      zero?(d := (denom f) a) =>
+        (s := sign(n)$RFSGN) case "failed" => "failed"
+        rhsl := fLimit(s::Z, denom f, a, 1)
+        lhsl := fLimit(s::Z, denom f, a, -1)
+        rhsl case "failed" =>
+          lhsl case "failed" => "failed"
+          [lhsl, rhsl]
+        lhsl case "failed" => [lhsl, rhsl]
+        rhsl::ORF = lhsl::ORF => lhsl::ORF
+        [lhsl, rhsl]
+      (n / d)::ORF
+ 
+    locallimit(f,x,a) ==
+      g := univariate(f, x)
+      zero?(n := whatInfinity a) => finiteLimit(g, retract a)
+      (dn := degree numer g) > (dd := degree denom g) =>
+        (sn := signAround(numer g, n, sign$RFSGN)) case "failed" => "failed"
+        (sd := signAround(denom g, n, sign$RFSGN)) case "failed" => "failed"
+        (sn::Z) * (sd::Z) * plusInfinity()
+      dn < dd => 0
+      ((leadingCoefficient numer g) / (leadingCoefficient denom g))::ORF
+ 
+    limit(f,eq,st) ==
+      (xx := retractIfCan(lhs eq)@Union(SE,"failed")) case "failed" =>
+        error "limit: left hand side must be a variable"
+      x := xx :: SE; a := rhs eq
+      zero?(n := (numer(g := univariate(f, x))) a) => 0
+      zero?(d := (denom g) a) =>
+        (s := sign(n)$RFSGN) case "failed" => "failed"
+        fLimit(s::Z, denom g, a, direction st)
+      (n / d)::ORF
+ 
+    locallimitcomplex(f,x,a) ==
+      g := univariate(f, x)
+      (r := retractIfCan(a)@Union(RF, "failed")) case RF =>
+        finiteComplexLimit(g, r::RF)
+      (dn := degree numer g) > (dd := degree denom g) => infinity()
+      dn < dd => 0
+      ((leadingCoefficient numer g) / (leadingCoefficient denom g))::OPF
+
+@
+<<LIMITRF.dotabb>>=
+"LIMITRF" [color="#FF4488",href="bookvol10.4.pdf#nameddest=LIMITRF"]
+"PFECAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=PFECAT"]
+"LIMITRF" -> "PFECAT"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package SIGNRF RationalFunctionSign}
+\pagehead{RationalFunctionSign}{SIGNRF}
+\pagepic{ps/v104rationalfunctionsign.ps}{SIGNRF}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package SIGNRF RationalFunctionSign>>=
+)abbrev package SIGNRF RationalFunctionSign
+--%% RationalFunctionSign
+++ Author: Manuel Bronstein
+++ Date Created: 23 August 1989
+++ Date Last Updated: 26 November 1991
+++ Description:
+++ Find the sign of a rational function around a point or infinity.
+RationalFunctionSign(R:GcdDomain): Exports == Implementation where
+  SE  ==> Symbol
+  P   ==> Polynomial R
+  RF  ==> Fraction P
+  ORF ==> OrderedCompletion RF
+  UP  ==> SparseUnivariatePolynomial RF
+  U   ==> Union(Integer, "failed")
+  SGN ==> ToolsForSign(R)
+ 
+  Exports ==> with
+    sign: RF -> U
+      ++ sign f returns the sign of f if it is constant everywhere.
+    sign: (RF, SE, ORF) -> U
+      ++ sign(f, x, a) returns the sign of f as x approaches \spad{a},
+      ++ from both sides if \spad{a} is finite.
+    sign: (RF, SE, RF, String) -> U
+      ++ sign(f, x, a, s) returns the sign of f as x nears \spad{a} from
+      ++ the left (below) if s is the string \spad{"left"},
+      ++ or from the right (above) if s is the string \spad{"right"}.
+ 
+  Implementation ==> add
+    import SGN
+    import InnerPolySign(RF, UP)
+    import PolynomialCategoryQuotientFunctions(IndexedExponents SE,
+                                                      SE, R, P, RF)
+ 
+    psign     : P -> U
+    sqfrSign  : P -> U
+    termSign  : P -> U
+    listSign  : (List P, Integer) -> U
+    finiteSign: (Fraction UP, RF) -> U
+ 
+    sign f ==
+      (un := psign numer f) case "failed" => "failed"
+      (ud := psign denom f) case "failed" => "failed"
+      (un::Integer) * (ud::Integer)
+ 
+    finiteSign(g, a) ==
+      (ud := signAround(denom g, a, sign$%)) case "failed" => "failed"
+      (un := signAround(numer g, a, sign$%)) case "failed" => "failed"
+      (un::Integer) * (ud::Integer)
+ 
+    sign(f, x, a) ==
+      g := univariate(f, x)
+      zero?(n := whatInfinity a) => finiteSign(g, retract a)
+      (ud := signAround(denom g, n, sign$%)) case "failed" => "failed"
+      (un := signAround(numer g, n, sign$%)) case "failed" => "failed"
+      (un::Integer) * (ud::Integer)
+ 
+    sign(f, x, a, st) ==
+      (ud := signAround(denom(g := univariate(f, x)), a,
+                    d := direction st, sign$%)) case "failed" => "failed"
+      (un := signAround(numer g, a, d, sign$%)) case "failed" => "failed"
+      (un::Integer) * (ud::Integer)
+ 
+    psign p ==
+      (r := retractIfCan(p)@Union(R, "failed")) case R => sign(r::R)$SGN
+      (u := sign(retract(unit(s := squareFree p))@R)$SGN) case "failed" =>
+        "failed"
+      ans := u::Integer
+      for term in factors s | odd?(term.exponent) repeat
+        (u := sqfrSign(term.factor)) case "failed" => return "failed"
+        ans := ans * (u::Integer)
+      ans
+ 
+    sqfrSign p ==
+      (u := termSign first(l := monomials p)) case "failed" => "failed"
+      listSign(rest l, u::Integer)
+ 
+    listSign(l, s) ==
+      for term in l repeat
+        (u := termSign term) case "failed" => return "failed"
+        u::Integer ^= s => return "failed"
+      s
+ 
+    termSign term ==
+      for var in variables term repeat
+        odd? degree(term, var) => return "failed"
+      sign(leadingCoefficient term)$SGN
+
+@
+<<SIGNRF.dotabb>>=
+"SIGNRF" [color="#FF4488",href="bookvol10.4.pdf#nameddest=SIGNRF"]
+"PFECAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=PFECAT"]
+"SIGNRF" -> "PFECAT"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package SUMRF RationalFunctionSum}
+\pagehead{RationalFunctionSum}{SUMRF}
+\pagepic{ps/v104rationalfunctionsum.ps}{SUMRF}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package SUMRF RationalFunctionSum>>=
+)abbrev package SUMRF RationalFunctionSum
+++ Summation of rational functions
+++ Author: Manuel Bronstein
+++ Date Created: ???
+++ Date Last Updated: 19 April 1991
+++ Description: Computes sums of rational functions;
+RationalFunctionSum(R): Exports == Impl where
+    R: Join(IntegralDomain, OrderedSet, RetractableTo Integer)
+
+    P   ==> Polynomial R
+    RF  ==> Fraction P
+    FE  ==> Expression R
+    SE  ==> Symbol
+
+    Exports ==> with
+        sum: (P, SE) -> RF
+            ++ sum(a(n), n) returns \spad{A} which
+            ++ is the indefinite sum of \spad{a} with respect to
+            ++ upward difference on \spad{n}, i.e. \spad{A(n+1) - A(n) = a(n)}.
+        sum: (RF, SE) -> Union(RF, FE)
+            ++ sum(a(n), n) returns \spad{A} which
+            ++ is the indefinite sum of \spad{a} with respect to
+            ++ upward difference on \spad{n}, i.e. \spad{A(n+1) - A(n) = a(n)}.
+        sum: (P, SegmentBinding P) -> RF
+            ++ sum(f(n), n = a..b) returns \spad{f(a) + f(a+1) + ... f(b)}.
+        sum: (RF, SegmentBinding RF) -> Union(RF, FE)
+            ++ sum(f(n), n = a..b) returns \spad{f(a) + f(a+1) + ... f(b)}.
+
+    Impl ==> add
+      import RationalFunction R
+      import GosperSummationMethod(IndexedExponents SE, SE, R, P, RF)
+
+      innersum    : (RF, SE) -> Union(RF, "failed")
+      innerpolysum: (P, SE) -> RF
+
+      sum(f:RF, s:SegmentBinding RF) ==
+        (indef := innersum(f, v := variable s)) case "failed" =>
+          summation(f::FE,map(#1::FE,s)$SegmentBindingFunctions2(RF,FE))
+        eval(indef::RF, v, 1 + hi segment s)
+          - eval(indef::RF, v,lo segment s)
+
+      sum(an:RF, n:SE) ==
+        (u := innersum(an, n)) case "failed" => summation(an::FE, n)
+        u::RF
+
+      sum(p:P, s:SegmentBinding P) ==
+        f := sum(p, v := variable s)
+        eval(f, v, (1 + hi segment s)::RF) - eval(f,v,lo(segment s)::RF)
+
+      innersum(an, n) ==
+        (r := retractIfCan(an)@Union(P, "failed")) case "failed" =>
+           an1 := eval(an, n, -1 + n::RF)
+           (u := GospersMethod(an/an1, n, new$SE)) case "failed" =>
+             "failed"
+           an1 * eval(u::RF, n, -1 + n::RF)
+        sum(r::P, n)
+
+      sum(p:P, n:SE) ==
+        rec := sum(p, n)$InnerPolySum(IndexedExponents SE, SE, R, P)
+        rec.num / (rec.den :: P)
+
+@
+<<SUMRF.dotabb>>=
+"SUMRF" [color="#FF4488",href="bookvol10.4.pdf#nameddest=SUMRF"]
+"PFECAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=PFECAT"]
+"SUMRF" -> "PFECAT"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{package INTRAT RationalIntegration}
 \pagehead{RationalIntegration}{INTRAT}
 \pagepic{ps/v104rationalintegration.ps}{INTRAT}{1.00}
@@ -74158,6 +79304,108 @@ ScriptFormulaFormat1(S : SetCategory): public == private where
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package SEGBIND2 SegmentBindingFunctions2}
+\pagehead{SegmentBindingFunctions2}{SEGBIND2}
+\pagepic{ps/v104segmentbindingfunctions2.ps}{SEGBIND2}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package SEGBIND2 SegmentBindingFunctions2>>=
+)abbrev package SEGBIND2 SegmentBindingFunctions2
+++ Author:
+++ Date Created:
+++ Date Last Updated: June 4, 1991
+++ Basic Operations:
+++ Related Domains: SegmentBinding, Segment, Equation
+++ Also See:
+++ AMS Classifications:
+++ Keywords: equation
+++ Examples:
+++ References:
+++ Description:
+++   This package provides operations for mapping functions onto
+++   \spadtype{SegmentBinding}s.
+SegmentBindingFunctions2(R:Type, S:Type): with
+  map: (R -> S, SegmentBinding R) -> SegmentBinding S
+      ++ map(f,v=a..b) returns the value given by \spad{v=f(a)..f(b)}.
+ == add
+  map(f, b) ==
+    equation(variable b, map(f, segment b)$SegmentFunctions2(R, S))
+
+@
+<<SEGBIND2.dotabb>>=
+"SEGBIND2" [color="#FF4488",href="bookvol10.4.pdf#nameddest=SEGBIND2"]
+"TYPE" [color="#4488FF",href="bookvol10.2.pdf#nameddest=TYPE"]
+"SEGBIND2" -> "TYPE"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package SEG2 SegmentFunctions2}
+\pagehead{SegmentFunctions2}{SEG2}
+\pagepic{ps/v104segmentfunctions2.ps}{SEG2}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package SEG2 SegmentFunctions2>>=
+)abbrev package SEG2 SegmentFunctions2
+++ Author:
+++ Date Created:
+++ Date Last Updated: June 4, 1991
+++ Basic Operations:
+++ Related Domains: Segment, UniversalSegment
+++ Also See:
+++ AMS Classifications:
+++ Keywords: equation
+++ Examples:
+++ References:
+++ Description:
+++   This package provides operations for mapping functions onto segments.
+
+SegmentFunctions2(R:Type, S:Type): public == private where
+  public ==> with
+    map: (R -> S, Segment R) -> Segment S
+        ++ map(f,l..h) returns a new segment \spad{f(l)..f(h)}.
+
+    if R has OrderedRing then
+      map: (R -> S, Segment R) -> List S
+        ++ map(f,s) expands the segment s, applying \spad{f} to each
+        ++ value.  For example, if \spad{s = l..h by k}, then the list
+        ++ \spad{[f(l), f(l+k),..., f(lN)]} is computed, where
+        ++ \spad{lN <= h < lN+k}.
+
+
+  private ==> add
+    map(f : R->S, r : Segment R): Segment S ==
+      SEGMENT(f lo r,f hi r)$Segment(S)
+
+    if R has OrderedRing then
+     map(f : R->S, r : Segment R): List S ==
+       lr := nil()$List(S)
+       l := lo r
+       h := hi r
+       inc := (incr r)::R
+       if inc > 0 then
+         while l <= h repeat
+           lr := concat(f(l), lr)
+           l := l + inc
+       else
+         while l >= h repeat
+           lr := concat(f(l), lr)
+           l := l + inc
+       reverse_! lr
+
+@
+<<SEG2.dotabb>>=
+"SEG2" [color="#FF4488",href="bookvol10.4.pdf#nameddest=SEG2"]
+"FLAGG" [color="#4488FF",href="bookvol10.2.pdf#nameddest=FLAGG"]
+"SEG2" -> "FLAGG"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{package SAEFACT SimpleAlgebraicExtensionAlgFactor}
 \pagehead{SimpleAlgebraicExtensionAlgFactor}{SAEFACT}
 \pagepic{ps/v104simplealgebraicextensionalgfactor.ps}{SAEFACT}{1.00}
@@ -74227,6 +79475,250 @@ SimplifyAlgebraicNumberConvertPackage(): with
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package SMITH SmithNormalForm}
+\pagehead{SmithNormalForm}{SMITH}
+\pagepic{ps/v104smithnormalform.ps}{SMITH}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package SMITH SmithNormalForm>>=
+)abbrev package SMITH SmithNormalForm
+++ Author: Patrizia Gianni
+++ Date Created: October 1992
+++ Date Last Updated: 
+++ Basic Operations:
+++ Related Domains: Matrix(R)
+++ Also See:
+++ AMS Classifications:
+++ Keywords: matrix, canonical forms, linear algebra
+++ Examples:
+++ References:
+++ Description:
+++   \spadtype{SmithNormalForm} is a package
+++   which provides some standard canonical forms for matrices.
+
+SmithNormalForm(R,Row,Col,M) : Exports == Implementation where
+
+  R   : EuclideanDomain
+  Row : FiniteLinearAggregate R
+  Col : FiniteLinearAggregate R
+  M   : MatrixCategory(R,Row,Col)
+
+  I            ==> Integer
+  NNI          ==> NonNegativeInteger
+  HermiteForm  ==>   Record(Hermite:M,eqMat:M)
+  SmithForm    ==>   Record(Smith : M, leftEqMat : M, rightEqMat : M) 
+  PartialV     ==> Union(Col, "failed")
+  Both         ==> Record(particular: PartialV, basis: List Col)
+
+  Exports ==  with
+    hermite : M -> M
+      ++ \spad{hermite(m)} returns the Hermite normal form of the
+      ++ matrix m.
+    completeHermite : M -> HermiteForm
+      ++ \spad{completeHermite} returns a record  that contains
+      ++ the Hermite normal form H of the matrix and the equivalence matrix
+      ++ U such that U*m = H
+    smith : M -> M
+      ++ \spad{smith(m)} returns the Smith Normal form of the matrix m.
+    completeSmith : M ->  SmithForm
+      ++ \spad{completeSmith} returns a record  that contains
+      ++ the Smith normal form H of the matrix and the left and right
+      ++ equivalence matrices U and V such that U*m*v = H
+    diophantineSystem : (M,Col) -> Both
+      ++ \spad{diophantineSystem(A,B)} returns a particular integer solution and 
+      ++ an integer  basis  of the equation \spad{AX = B}.
+
+  Implementation == add
+    MATCAT1 ==> MatrixCategoryFunctions2(R,Row,Col,M,QF,Row2,Col2,M2)
+    MATCAT2 ==> MatrixCategoryFunctions2(QF,Row2,Col2,M2,R,Row,Col,M)
+    QF      ==> Fraction R
+    Row2    ==> Vector QF
+    Col2    ==> Vector QF
+    M2      ==> Matrix QF
+
+                 ------  Local Functions -----
+    elRow1       :   (M,I,I)         ->  M
+    elRow2       :  (M,R,I,I)        ->  M
+    elColumn2    :  (M,R,I,I)        ->  M
+    isDiagonal?  :      M            ->  Boolean
+    ijDivide     : (SmithForm ,I,I)  ->  SmithForm 
+    lastStep     :   SmithForm       ->  SmithForm
+    test1        :  (M,Col,NNI)      ->  Union(NNI, "failed")
+    test2        : (M, Col,NNI,NNI)  ->  Union( Col, "failed")
+
+     -- inconsistent system : case  0 = c -- 
+    test1(sm:M,b:Col,m1 : NNI) : Union(NNI , "failed") ==
+      km:=m1
+      while zero? sm(km,km) repeat
+        if not zero?(b(km)) then return "failed"
+        km:= (km - 1) :: NNI
+      km
+
+    if Col has shallowlyMutable then
+
+      test2(sm : M ,b : Col, n1:NNI,dk:NNI) : Union( Col, "failed") ==
+        -- test divisibility --
+        sol:Col := new(n1,0)
+        for k in 1..dk repeat
+          if (c:=(b(k) exquo sm(k,k))) case "failed" then return "failed"
+          sol(k):= c::R
+        sol
+
+     -- test if the matrix is diagonal or pseudo-diagonal --   
+    isDiagonal?(m : M) : Boolean ==
+      m1:= nrows m
+      n1:= ncols m
+      for i in 1..m1 repeat
+        for j in 1..n1 | (j ^= i) repeat
+          if  not zero?(m(i,j)) then return false
+      true
+ 
+       -- elementary operation of first kind: exchange two rows --
+    elRow1(m:M,i:I,j:I) : M ==
+      vec:=row(m,i)
+      setRow!(m,i,row(m,j))
+      setRow!(m,j,vec)
+      m
+
+             -- elementary operation of second kind: add to row i--
+                         -- a*row j  (i^=j) --
+    elRow2(m : M,a:R,i:I,j:I) : M ==
+      vec:= map(a*#1,row(m,j))
+      vec:=map("+",row(m,i),vec)
+      setRow!(m,i,vec)
+      m
+             -- elementary operation of second kind: add to column i --
+                           -- a*column j (i^=j) --
+    elColumn2(m : M,a:R,i:I,j:I) : M ==
+      vec:= map(a*#1,column(m,j))
+      vec:=map("+",column(m,i),vec)
+      setColumn!(m,i,vec)
+      m
+
+       -- modify SmithForm in such a way that the term m(i,i) --
+           -- divides the term m(j,j). m is diagonal --
+    ijDivide(sf : SmithForm , i : I,j : I) : SmithForm ==
+      m:=sf.Smith
+      mii:=m(i,i)
+      mjj:=m(j,j)
+      extGcd:=extendedEuclidean(mii,mjj)
+      d := extGcd.generator
+      mii:=(mii exquo d)::R
+      mjj := (mjj exquo d) :: R
+      -- add to row j extGcd.coef1*row i --
+      lMat:=elRow2(sf.leftEqMat,extGcd.coef1,j,i)
+      -- switch rows i and j --
+      lMat:=elRow1(lMat,i,j)
+      -- add to row j -mii*row i --
+      lMat := elRow2(lMat,-mii,j,i)
+--      lMat := ijModify(mii,mjj,extGcd.coef1,extGcd.coef2,sf.leftEqMat,i,j)
+      m(j,j):= m(i,i) * mjj
+      m(i,i):= d
+      -- add to column i extGcd.coef2 * column j --
+      rMat := elColumn2(sf.rightEqMat,extGcd.coef2,i,j)
+      -- add to column j -mjj*column i --
+      rMat:=elColumn2(rMat,-mjj,j,i)
+      -- multiply by -1 column j --
+      setColumn!(rMat,j,map(-1 * #1,column(rMat,j)))
+      [m,lMat,rMat]
+               
+
+     -- given a diagonal matrix compute its Smith form --
+    lastStep(sf : SmithForm) : SmithForm ==
+      m:=sf.Smith
+      m1:=min(nrows m,ncols m)
+      for i in 1..m1 while (mii:=m(i,i)) ^=0 repeat
+        for j in i+1..m1 repeat
+          if (m(j,j) exquo mii) case "failed" then return
+             lastStep(ijDivide(sf,i,j))
+      sf
+
+    -- given m and t row-equivalent matrices, with t in upper triangular --
+          -- form  compute the matrix u such that u*m=t --
+    findEqMat(m :  M,t : M) : Record(Hermite : M, eqMat : M) ==
+      m1:=nrows m
+      n1:=ncols m
+      "and"/[zero? t(m1,j) for j in 1..n1] => -- there are 0 rows
+         if "and"/[zero? t(1,j) for j in 1..n1] 
+         then return [m,scalarMatrix(m1,1)]  -- m is the zero matrix
+         mm:=horizConcat(m,scalarMatrix(m1,1))
+         mmh:=rowEchelon mm
+         [subMatrix(mmh,1,m1,1,n1), subMatrix(mmh,1,m1,n1+1,n1+m1)]
+      u:M:=zero(m1,m1)
+      j:=1
+      while t(1,j)=0 repeat j:=j+1  -- there are 0 columns
+      t1:=copy t
+      mm:=copy m
+      if j>1 then 
+        t1:=subMatrix(t,1,m1,j,n1)
+        mm:=subMatrix(m,1,m1,j,n1)
+      t11:=t1(1,1)
+      for i in 1..m1 repeat
+        u(i,1) := (mm(i,1) exquo t11) :: R
+        for j in 2..m1 repeat
+          j0:=j
+          while zero?(tjj:=t1(j,j0)) repeat j0:=j0+1
+          u(i,j) :=((mm(i,j0) - ("+"/[u(i,k) * t1(k,j0) for k in 1..(j-1)])) exquo
+                    tjj) :: R
+      u1:M2:= map(#1 :: QF,u)$MATCAT1
+      [t,map(retract$QF,(inverse u1)::M2)$MATCAT2]
+
+                --- Hermite normal form of m ---
+    hermite(m:M) : M == rowEchelon m
+
+     -- Hermite normal form and equivalence matrix --
+    completeHermite(m : M) : Record(Hermite : M, eqMat : M) ==
+      findEqMat(m,rowEchelon m)
+ 
+    smith(m : M) : M == completeSmith(m).Smith
+
+    completeSmith(m : M) : Record(Smith : M, leftEqMat : M, rightEqMat : M) ==
+      cm1:=completeHermite m
+      leftm:=cm1.eqMat
+      m1:=cm1.Hermite
+      isDiagonal? m1 => lastStep([m1,leftm,scalarMatrix(ncols m,1)])
+      nr:=nrows m
+      cm1:=completeHermite transpose m1
+      rightm:= transpose cm1.eqMat
+      m1:=cm1.Hermite
+      isDiagonal? m1 => 
+        cm2:=lastStep([m1,leftm,rightm])
+        nrows(m:=cm2.Smith) = nr => cm2
+        [transpose m,cm2.leftEqMat, cm2.rightEqMat]
+      cm2:=completeSmith m1
+      cm2:=lastStep([cm2.Smith,transpose(cm2.rightEqMat)*leftm,
+                rightm*transpose(cm2.leftEqMat)])
+      nrows(m:=cm2.Smith) = nr => cm2
+      [transpose m, cm2.leftEqMat, cm2.rightEqMat]
+
+    -- Find the solution in R of the linear system mX = b --
+    diophantineSystem(m : M, b : Col) : Both  ==
+      sf:=completeSmith m
+      sm:=sf.Smith
+      m1:=nrows sm
+      lm:=sf.leftEqMat
+      b1:Col:= lm* b
+      (t1:=test1(sm,b1,m1)) case "failed" => ["failed",empty()]
+      dk:=t1 :: NNI
+      n1:=ncols sm
+      (t2:=test2(sm,b1,n1,dk)) case "failed" => ["failed",empty()]
+      rm := sf.rightEqMat
+      sol:=rm*(t2 :: Col)  -- particular solution
+      dk = n1  => [sol,list new(n1,0)]
+      lsol:List Col := [column(rm,i) for i in (dk+1)..n1]
+      [sol,lsol]
+
+@
+<<SMITH.dotabb>>=
+"SMITH" [color="#FF4488",href="bookvol10.4.pdf#nameddest=SMITH"]
+"PFECAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=PFECAT"]
+"SMITH" -> "PFECAT"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{package SCACHE SortedCache}
 \pagehead{SortedCache}{SCACHE}
 \pagepic{ps/v104sortedcache.ps}{SCACHE}{1.00}
@@ -74321,6 +79813,75 @@ SortedCache(S:CachableSet): Exports == Implementation where
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package SORTPAK SortPackage}
+\pagehead{SortPackage}{SORTPAK}
+\pagepic{ps/v104sortpackage.ps}{SORTPAK}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package SORTPAK SortPackage>>=
+)abbrev package SORTPAK SortPackage
+++ Description:
+++ This package exports sorting algorithnms
+SortPackage(S,A) : Exports == Implementation where
+  S: Type
+  A: IndexedAggregate(Integer,S)
+    with (finiteAggregate; shallowlyMutable)
+
+  Exports == with
+    bubbleSort_!: (A,(S,S) -> Boolean) -> A
+	++ bubbleSort!(a,f) \undocumented
+    insertionSort_!: (A, (S,S) -> Boolean) -> A
+	++ insertionSort!(a,f) \undocumented
+    if S has OrderedSet then
+      bubbleSort_!: A -> A
+	++ bubbleSort!(a) \undocumented
+      insertionSort_!: A -> A
+	++ insertionSort! \undocumented
+
+  Implementation == add
+    bubbleSort_!(m,f) ==
+      n := #m
+      for i in 1..(n-1) repeat
+        for j in n..(i+1) by -1 repeat
+          if f(m.j,m.(j-1)) then swap_!(m,j,j-1)
+      m
+    insertionSort_!(m,f) ==
+      for i in 2..#m repeat
+        j := i
+        while j > 1 and f(m.j,m.(j-1)) repeat
+          swap_!(m,j,j-1)
+          j := (j - 1) pretend PositiveInteger
+      m
+    if S has OrderedSet then
+      bubbleSort_!(m) == bubbleSort_!(m,_<$S)
+      insertionSort_!(m) == insertionSort_!(m,_<$S)
+    if A has UnaryRecursiveAggregate(S) then
+      bubbleSort_!(m,fn) ==
+        empty? m => m
+        l := m
+        while not empty? (r := l.rest) repeat
+           r := bubbleSort_!(r,fn)
+           x := l.first
+           if fn(r.first,x) then
+             l.first := r.first
+             r.first := x
+           l.rest := r
+           l := l.rest
+        m
+
+@
+<<SORTPAK.dotabb>>=
+"SORTPAK" [color="#FF4488",href="bookvol10.4.pdf#nameddest=SORTPAK"]
+"IXAGG" [color="#4488FF",href="bookvol10.2.pdf#nameddest=IXAGG"]
+"EVALAB" [color="#4488FF",href="bookvol10.2.pdf#nameddest=EVALAB"]
+"SORTPAK" -> "IXAGG"
+"SORTPAK" -> "EVALAB"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{package SUP2 SparseUnivariatePolynomialFunctions2}
 \pagehead{SparseUnivariatePolynomialFunctions2}{SUP2}
 \pagepic{ps/v104sparseunivariatepolynomialfunctions2.ps}{SUP2}{1.00}
@@ -74460,6 +80021,1167 @@ SpecialOutputPackage: public == private where
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package SFQCMPK SquareFreeQuasiComponentPackage}
+\pagehead{SquareFreeQuasiComponentPackage}{SFQCMPK}
+\pagepic{ps/v104squarefreequasicomponentpackage.ps}{SFQCMPK}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<SFQCMPK.dotabb>>=
+"SFQCMPK" [color="#FF4488",href="bookvol10.4.pdf#nameddest=SFQCMPK"]
+
+@
+<<package SFQCMPK SquareFreeQuasiComponentPackage>>=
+)abbrev package SFQCMPK SquareFreeQuasiComponentPackage
+++ Author: Marc Moreno Maza
+++ Date Created: 09/23/1998
+++ Date Last Updated: 12/16/1998
+++ Basic Functions:
+++ Related Constructors:
+++ Also See: 
+++ AMS Classifications:
+++ Keywords:
+++ Description: 
+++   A internal package for removing redundant quasi-components and redundant
+++   branches when decomposing a variety by means of quasi-components
+++   of regular triangular sets. \newline
+++ References :
+++  [1] D. LAZARD "A new method for solving algebraic systems of 
+++      positive dimension" Discr. App. Math. 33:147-160,1991
+++      Tech. Report (PoSSo project)
+++  [2] M. MORENO MAZA "Calculs de pgcd au-dessus des tours
+++      d'extensions simples et resolution des systemes d'equations
+++      algebriques" These, Universite P.etM. Curie, Paris, 1997.
+++  [3] M. MORENO MAZA "A new algorithm for computing triangular
+++      decomposition of algebraic varieties" NAG Tech. Rep. 4/98.
+++ Version: 1. 
+
+SquareFreeQuasiComponentPackage(R,E,V,P,TS): Exports == Implementation where
+
+  R : GcdDomain
+  E : OrderedAbelianMonoidSup
+  V : OrderedSet
+  P : RecursivePolynomialCategory(R,E,V)
+  TS : RegularTriangularSetCategory(R,E,V,P)
+  N ==> NonNegativeInteger
+  Z ==> Integer
+  B ==> Boolean
+  S ==> String
+  LP ==> List P
+  PtoP ==> P -> P
+  PS ==> GeneralPolynomialSet(R,E,V,P)
+  PWT ==> Record(val : P, tower : TS)
+  BWT ==> Record(val : Boolean, tower : TS)
+  LpWT ==> Record(val : (List P), tower : TS)
+  Branch ==> Record(eq: List P, tower: TS, ineq: List P)
+  UBF ==> Union(Branch,"failed")
+  Split ==> List TS
+  Key ==>  Record(left:TS, right:TS)
+  Entry ==> Boolean
+  H ==> TabulatedComputationPackage(Key, Entry)
+  polsetpack ==> PolynomialSetUtilitiesPackage(R,E,V,P)
+  SQUAREFREE ==> SquareFreeRegularTriangularSetCategory(R,E,V,P)
+
+  Exports ==  with
+     startTable!: (S,S,S) -> Void
+         ++ \axiom{startTableGcd!(s1,s2,s3)} 
+         ++ is an internal subroutine, exported only for developement.
+     stopTable!: () -> Void
+         ++ \axiom{stopTableGcd!()} 
+         ++ is an internal subroutine, exported only for developement.
+     supDimElseRittWu?: (TS,TS) -> Boolean
+         ++ \axiom{supDimElseRittWu(ts,us)} returns true iff \axiom{ts}
+         ++ has less elements than \axiom{us} otherwise if \axiom{ts}
+         ++ has higher rank than \axiom{us} w.r.t. Riit and Wu ordering.
+     algebraicSort: Split -> Split
+         ++ \axiom{algebraicSort(lts)} sorts \axiom{lts} w.r.t 
+         ++ \axiomOpFrom{supDimElseRittWu}{QuasiComponentPackage}.
+     moreAlgebraic?: (TS,TS) -> Boolean
+         ++ \axiom{moreAlgebraic?(ts,us)} returns false iff \axiom{ts}
+         ++ and \axiom{us} are both empty, or \axiom{ts}
+         ++ has less elements than \axiom{us}, or some variable is
+         ++ algebraic w.r.t. \axiom{us} and is not w.r.t. \axiom{ts}.
+     subTriSet?: (TS,TS) -> Boolean
+         ++ \axiom{subTriSet?(ts,us)} returns true iff \axiom{ts} is
+         ++ a sub-set of \axiom{us}.
+     subPolSet?: (LP, LP) -> Boolean
+         ++ \axiom{subPolSet?(lp1,lp2)} returns true iff \axiom{lp1} is
+         ++ a sub-set of \axiom{lp2}.
+     internalSubPolSet?: (LP, LP) -> Boolean
+         ++ \axiom{internalSubPolSet?(lp1,lp2)} returns true iff \axiom{lp1} is
+         ++ a sub-set of \axiom{lp2} assuming that these lists are sorted
+         ++ increasingly w.r.t. \axiomOpFrom{infRittWu?}{RecursivePolynomialCategory}.
+     internalInfRittWu?: (LP, LP) -> Boolean
+         ++ \axiom{internalInfRittWu?(lp1,lp2)}
+         ++ is an internal subroutine, exported only for developement.
+     infRittWu?: (LP, LP) -> Boolean
+         ++ \axiom{infRittWu?(lp1,lp2)}
+         ++ is an internal subroutine, exported only for developement.
+     internalSubQuasiComponent?: (TS,TS) -> Union(Boolean,"failed")
+         ++ \axiom{internalSubQuasiComponent?(ts,us)} returns a boolean \spad{b} value
+         ++ if the fact the regular zero set of \axiom{us} contains that of
+         ++ \axiom{ts} can be decided (and in that case \axiom{b} gives this 
+         ++ inclusion) otherwise returns \axiom{"failed"}.
+     subQuasiComponent?: (TS,TS) -> Boolean
+         ++ \axiom{subQuasiComponent?(ts,us)} returns true iff 
+         ++ \axiomOpFrom{internalSubQuasiComponent?(ts,us)}{QuasiComponentPackage}
+         ++ returs true.
+     subQuasiComponent?: (TS,Split) -> Boolean
+         ++ \axiom{subQuasiComponent?(ts,lus)} returns true iff
+         ++ \axiom{subQuasiComponent?(ts,us)} holds for one \spad{us} in \spad{lus}.
+     removeSuperfluousQuasiComponents: Split -> Split
+         ++ \axiom{removeSuperfluousQuasiComponents(lts)} removes from \axiom{lts}
+         ++ any \spad{ts} such that \axiom{subQuasiComponent?(ts,us)} holds for 
+         ++ another \spad{us} in \axiom{lts}.
+     subCase?: (LpWT,LpWT) -> Boolean
+         ++ \axiom{subCase?(lpwt1,lpwt2)}
+         ++ is an internal subroutine, exported only for developement.
+     removeSuperfluousCases: List LpWT -> List LpWT
+         ++ \axiom{removeSuperfluousCases(llpwt)}
+         ++ is an internal subroutine, exported only for developement.
+     prepareDecompose: (LP, List(TS),B,B) -> List Branch
+         ++ \axiom{prepareDecompose(lp,lts,b1,b2)}
+         ++ is an internal subroutine, exported only for developement.
+     branchIfCan: (LP,TS,LP,B,B,B,B,B) -> Union(Branch,"failed")
+         ++ \axiom{branchIfCan(leq,ts,lineq,b1,b2,b3,b4,b5)}
+         ++ is an internal subroutine, exported only for developement.
+
+  Implementation == add
+
+     squareFreeFactors(lp: LP): LP == 
+       lsflp: LP := []
+       for p in lp repeat 
+         lsfp := squareFreeFactors(p)$polsetpack
+         lsflp := concat(lsfp,lsflp)
+       sort(infRittWu?,removeDuplicates lsflp)
+
+     startTable!(ok: S, ko: S, domainName: S): Void == 
+       initTable!()$H
+       if (not empty? ok) and (not empty? ko) then printInfo!(ok,ko)$H
+       if (not empty? domainName) then startStats!(domainName)$H
+       void()
+
+     stopTable!(): Void ==   
+       if makingStats?()$H then printStats!()$H
+       clearTable!()$H
+
+     supDimElseRittWu? (ts:TS,us:TS): Boolean ==
+       #ts < #us => true
+       #ts > #us => false
+       lp1 :LP := members(ts)
+       lp2 :LP := members(us)
+       while (not empty? lp1) and (not infRittWu?(first(lp2),first(lp1))) repeat
+         lp1 := rest lp1
+         lp2 := rest lp2
+       not empty? lp1
+
+     algebraicSort (lts:Split): Split ==
+       lts := removeDuplicates lts
+       sort(supDimElseRittWu?,lts)
+
+     moreAlgebraic?(ts:TS,us:TS): Boolean  ==
+       empty? ts => empty? us 
+       empty? us => true
+       #ts < #us => false
+       for p in (members us) repeat 
+          not algebraic?(mvar(p),ts) => return false
+       true
+
+     subTriSet?(ts:TS,us:TS): Boolean  ==
+       empty? ts => true
+       empty? us => false
+       mvar(ts) > mvar(us) => false
+       mvar(ts) < mvar(us) => subTriSet?(ts,rest(us)::TS)
+       first(ts)::P = first(us)::P => subTriSet?(rest(ts)::TS,rest(us)::TS)
+       false
+
+     internalSubPolSet?(lp1: LP, lp2: LP): Boolean  ==
+       empty? lp1 => true
+       empty? lp2 => false
+       associates?(first lp1, first lp2) => 
+         internalSubPolSet?(rest lp1, rest lp2)
+       infRittWu?(first lp1, first lp2) => false
+       internalSubPolSet?(lp1, rest lp2)
+
+     subPolSet?(lp1: LP, lp2: LP): Boolean  ==
+       lp1 := sort(infRittWu?, lp1)
+       lp2 := sort(infRittWu?, lp2)
+       internalSubPolSet?(lp1,lp2)
+
+     infRittWu?(lp1: LP, lp2: LP): Boolean ==
+       lp1 := sort(infRittWu?, lp1)
+       lp2 := sort(infRittWu?, lp2)
+       internalInfRittWu?(lp1,lp2)
+
+     internalInfRittWu?(lp1: LP, lp2: LP): Boolean ==
+       empty? lp1 => not empty? lp2
+       empty? lp2 => false
+       infRittWu?(first lp1, first lp2)$P => true
+       infRittWu?(first lp2, first lp1)$P => false
+       infRittWu?(rest lp1, rest lp2)$$
+
+     subCase? (lpwt1:LpWT,lpwt2:LpWT): Boolean == 
+       -- ASSUME lpwt.{1,2}.val is sorted w.r.t. infRittWu?
+       not internalSubPolSet?(lpwt2.val, lpwt1.val) => false
+       subQuasiComponent?(lpwt1.tower,lpwt2.tower)
+
+     if TS has SquareFreeRegularTriangularSetCategory(R,E,V,P)
+     then
+
+       internalSubQuasiComponent?(ts:TS,us:TS): Union(Boolean,"failed") ==
+         subTriSet?(us,ts) => true
+         not moreAlgebraic?(ts,us) => false::Union(Boolean,"failed")
+         for p in (members us) repeat 
+           mdeg(p) < mdeg(select(ts,mvar(p))::P) => 
+             return("failed"::Union(Boolean,"failed"))
+         for p in (members us) repeat 
+           not zero? initiallyReduce(p,ts) =>
+             return("failed"::Union(Boolean,"failed"))
+         lsfp := squareFreeFactors(initials us)
+         for p in lsfp repeat 
+           b: B := invertible?(p,ts)$TS
+           not b => 
+             return(false::Union(Boolean,"failed"))
+         true::Union(Boolean,"failed")
+
+     else
+
+       internalSubQuasiComponent?(ts:TS,us:TS): Union(Boolean,"failed") ==
+         subTriSet?(us,ts) => true
+         not moreAlgebraic?(ts,us) => false::Union(Boolean,"failed")
+         for p in (members us) repeat 
+           mdeg(p) < mdeg(select(ts,mvar(p))::P) => 
+             return("failed"::Union(Boolean,"failed"))
+         for p in (members us) repeat 
+           not zero? reduceByQuasiMonic(p,ts) =>
+             return("failed"::Union(Boolean,"failed"))
+         true::Union(Boolean,"failed")
+
+     subQuasiComponent?(ts:TS,us:TS): Boolean ==
+       k: Key := [ts, us]
+       e := extractIfCan(k)$H
+       e case Entry => e::Entry
+       ubf: Union(Boolean,"failed") := internalSubQuasiComponent?(ts,us)
+       b: Boolean := (ubf case Boolean) and (ubf::Boolean)
+       insert!(k,b)$H
+       b
+
+     subQuasiComponent?(ts:TS,lus:Split): Boolean ==
+       for us in lus repeat
+          subQuasiComponent?(ts,us)@B => return true
+       false
+
+     removeSuperfluousCases (cases:List LpWT) ==
+       #cases < 2 => cases
+       toSee := sort(supDimElseRittWu?(#1.tower,#2.tower),cases)
+       lpwt1,lpwt2 : LpWT
+       toSave,headmaxcases,maxcases,copymaxcases : List LpWT
+       while not empty? toSee repeat
+         lpwt1 := first toSee
+         toSee := rest toSee
+         toSave := []
+         for lpwt2 in toSee repeat
+            if subCase?(lpwt1,lpwt2) 
+              then
+                lpwt1 := lpwt2
+              else
+                if not subCase?(lpwt2,lpwt1) 
+                  then
+                    toSave := cons(lpwt2,toSave)
+         if empty? maxcases
+           then
+             headmaxcases := [lpwt1]
+             maxcases := headmaxcases
+           else
+             copymaxcases := maxcases
+             while (not empty? copymaxcases) and _
+               (not subCase?(lpwt1,first(copymaxcases))) repeat
+                 copymaxcases := rest copymaxcases
+             if empty? copymaxcases
+               then
+                 setrest!(headmaxcases,[lpwt1])
+                 headmaxcases := rest headmaxcases
+         toSee := reverse toSave
+       maxcases
+
+     removeSuperfluousQuasiComponents(lts: Split): Split ==
+       lts := removeDuplicates lts
+       #lts < 2 => lts
+       toSee := algebraicSort lts
+       toSave,headmaxlts,maxlts,copymaxlts : Split
+       while not empty? toSee repeat
+         ts := first toSee
+         toSee := rest toSee
+         toSave := []
+         for us in toSee repeat
+            if subQuasiComponent?(ts,us)@B
+              then
+                ts := us
+              else
+                if not subQuasiComponent?(us,ts)@B 
+                  then
+                    toSave := cons(us,toSave)
+         if empty? maxlts
+           then
+             headmaxlts := [ts]
+             maxlts := headmaxlts
+           else
+             copymaxlts := maxlts
+             while (not empty? copymaxlts) and _
+               (not subQuasiComponent?(ts,first(copymaxlts))@B) repeat
+                 copymaxlts := rest copymaxlts
+             if empty? copymaxlts
+               then
+                 setrest!(headmaxlts,[ts])
+                 headmaxlts := rest headmaxlts
+         toSee := reverse toSave
+       algebraicSort maxlts
+
+     removeAssociates (lp:LP):LP ==
+       removeDuplicates [primitivePart(p) for p in lp]
+
+     branchIfCan(leq: LP,ts: TS,lineq: LP, b1:B,b2:B,b3:B,b4:B,b5:B):UBF ==
+        -- ASSUME pols in leq are squarefree and mainly primitive
+        -- if b1 then CLEAN UP leq
+        -- if b2 then CLEAN UP lineq
+        -- if b3 then SEARCH for ZERO in lineq with leq
+        -- if b4 then SEARCH for ZERO in lineq with ts
+        -- if b5 then SEARCH for ONE in leq with lineq
+        if b1 
+          then 
+            leq := removeAssociates(leq)
+            leq := remove(zero?,leq)
+            any?(ground?,leq) => 
+              return("failed"::Union(Branch,"failed"))
+        if b2
+          then
+            any?(zero?,lineq) =>
+              return("failed"::Union(Branch,"failed"))
+            lineq := removeRedundantFactors(lineq)$polsetpack
+        if b3
+          then
+            ps: PS := construct(leq)$PS
+            for q in lineq repeat
+              zero? remainder(q,ps).polnum =>
+                return("failed"::Union(Branch,"failed"))
+        (empty? leq) or (empty? lineq) => ([leq, ts, lineq]$Branch)::UBF
+        if b4
+          then
+            for q in lineq repeat
+              zero? initiallyReduce(q,ts) => 
+                return("failed"::Union(Branch,"failed"))
+        if b5
+          then
+            newleq: LP := []
+            for p in leq repeat
+              for q in lineq repeat
+                if mvar(p) = mvar(q)
+                  then
+                    g := gcd(p,q)
+                    newp := (p exquo g)::P
+                    ground? newp => 
+                      return("failed"::Union(Branch,"failed"))
+                    newleq := cons(newp,newleq)
+                  else
+                    newleq := cons(p,newleq)
+            leq := newleq
+        leq := sort(infRittWu?, removeDuplicates leq)
+        ([leq, ts, lineq]$Branch)::UBF
+
+     prepareDecompose(lp: LP, lts: List(TS), b1: B, b2: B): List Branch ==
+       -- if b1 then REMOVE REDUNDANT COMPONENTS in lts
+       -- if b2 then SPLIT the input system with squareFree
+       lp := sort(infRittWu?, remove(zero?,removeAssociates(lp)))
+       any?(ground?,lp) => []
+       empty? lts => []
+       if b1 then lts := removeSuperfluousQuasiComponents lts
+       not b2 =>
+         [[lp,ts,squareFreeFactors(initials ts)]$Branch for ts in lts]
+       toSee: List Branch 
+       lq: LP := []         
+       toSee := [[lq,ts,squareFreeFactors(initials ts)]$Branch for ts in lts]
+       empty? lp => toSee
+       for p in lp repeat
+         lsfp := squareFreeFactors(p)$polsetpack
+         branches: List Branch := []
+         lq := []
+         for f in lsfp repeat
+           for branch in toSee repeat
+             leq : LP := branch.eq
+             ts := branch.tower
+             lineq : LP := branch.ineq
+             ubf1: UBF := branchIfCan(leq,ts,lq,false,false,true,true,true)@UBF
+             ubf1 case "failed" => "leave"
+             ubf2: UBF := branchIfCan([f],ts,lineq,false,false,true,true,true)@UBF
+             ubf2 case "failed" => "leave"
+             leq := sort(infRittWu?,removeDuplicates concat(ubf1.eq,ubf2.eq))
+             lineq := sort(infRittWu?,removeDuplicates concat(ubf1.ineq,ubf2.ineq))
+             newBranch := branchIfCan(leq,ts,lineq,false,false,false,false,false)
+             branches:= cons(newBranch::Branch,branches)
+           lq := cons(f,lq)
+         toSee := branches
+       sort(supDimElseRittWu?(#1.tower,#2.tower),toSee)
+
+@
+<<SFQCMPK.dotabb>>=
+"SFQCMPK" [color="#FF4488",href="bookvol10.4.pdf#nameddest=SFQCMPK"]
+"SFRTCAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=SFRTCAT"]
+"SFQCMPK" -> "SFRTCAT"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package SRDCMPK SquareFreeRegularSetDecompositionPackage}
+\pagehead{SquareFreeRegularSetDecompositionPackage}{SRDCMPK}
+\pagepic{ps/v104squarefreeregularsetdecompositionpackage.ps}{SRDCMPK}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package SRDCMPK SquareFreeRegularSetDecompositionPackage>>=
+)abbrev package SRDCMPK SquareFreeRegularSetDecompositionPackage
+++ Author: Marc Moreno Maza
+++ Date Created: 09/23/1998
+++ Date Last Updated: 12/16/1998
+++ Basic Functions:
+++ Related Constructors:
+++ Also See: 
+++ AMS Classifications:
+++ Keywords:
+++ Description: 
+++ A package providing a new algorithm for solving polynomial systems
+++ by means of regular chains. Two ways of solving are provided:
+++ in the sense of Zariski closure (like in Kalkbrener's algorithm)
+++ or in the sense of the regular zeros (like in Wu, Wang or Lazard-
+++ Moreno methods). This algorithm is valid for nay type
+++ of regular set. It does not care about the way a polynomial is
+++ added in an regular set, or how two quasi-components are compared
+++ (by an inclusion-test), or how the invertibility test is made in
+++ the tower of simple extensions associated with a regular set.
+++ These operations are realized respectively by the domain \spad{TS}
+++ and the packages \spad{QCMPPK(R,E,V,P,TS)} and \spad{RSETGCD(R,E,V,P,TS)}.
+++ The same way it does not care about the way univariate polynomial
+++ gcds (with coefficients in the tower of simple extensions associated 
+++ with a regular set) are computed. The only requirement is that these
+++ gcds need to have invertible initials (normalized or not).
+++ WARNING. There is no need for a user to call diectly any operation
+++ of this package since they can be accessed by the domain \axiomType{TS}.
+++ Thus, the operations of this package are not documented.\newline
+++ References :
+++  [1] M. MORENO MAZA "A new algorithm for computing triangular
+++      decomposition of algebraic varieties" NAG Tech. Rep. 4/98.
+++ Version: 2. Does not use any unproved criteria.
+
+SquareFreeRegularSetDecompositionPackage(R,E,V,P,TS): Exports == Implementation where
+
+  R : GcdDomain
+  E : OrderedAbelianMonoidSup
+  V : OrderedSet
+  P : RecursivePolynomialCategory(R,E,V)
+  TS : SquareFreeRegularTriangularSetCategory(R,E,V,P)
+  N ==> NonNegativeInteger
+  Z ==> Integer
+  B ==> Boolean
+  LP ==> List P
+  PS ==> GeneralPolynomialSet(R,E,V,P)
+  PWT ==> Record(val : P, tower : TS)
+  BWT ==> Record(val : Boolean, tower : TS)
+  LpWT ==> Record(val : (List P), tower : TS)
+  Wip ==> Record(done: Split, todo: List LpWT)
+  Branch ==> Record(eq: List P, tower: TS, ineq: List P)
+  UBF ==> Union(Branch,"failed")
+  Split ==> List TS
+  iprintpack ==> InternalPrintPackage()
+  polsetpack ==> PolynomialSetUtilitiesPackage(R,E,V,P)
+  quasicomppack ==> SquareFreeQuasiComponentPackage(R,E,V,P,TS)
+  regsetgcdpack ==> SquareFreeRegularTriangularSetGcdPackage(R,E,V,P,TS)
+
+  Exports ==  with
+
+     KrullNumber: (LP, Split) -> N
+     numberOfVariables: (LP, Split) -> N
+     algebraicDecompose: (P,TS) -> Record(done: Split, todo: List LpWT) 
+     transcendentalDecompose: (P,TS,N) -> Record(done: Split, todo: List LpWT) 
+     transcendentalDecompose: (P,TS) -> Record(done: Split, todo: List LpWT) 
+     internalDecompose: (P,TS,N,B) -> Record(done: Split, todo: List LpWT)
+     internalDecompose: (P,TS,N) -> Record(done: Split, todo: List LpWT)
+     internalDecompose: (P,TS) -> Record(done: Split, todo: List LpWT)
+     decompose: (LP, Split, B, B) -> Split
+     decompose: (LP, Split, B, B, B, B, B) -> Split
+     upDateBranches: (LP,Split,List LpWT,Wip,N) -> List LpWT
+     convert: Record(val: List P,tower: TS) -> String
+     printInfo: (List Record(val: List P,tower: TS), N) -> Void
+
+  Implementation == add
+
+     KrullNumber(lp: LP, lts: Split): N ==
+       ln: List N := [#(ts) for ts in lts]
+       n := #lp + reduce(max,ln)
+
+     numberOfVariables(lp: LP, lts: Split): N ==
+       lv: List V := variables([lp]$PS)
+       for ts in lts repeat lv := concat(variables(ts), lv)
+       # removeDuplicates(lv)
+
+     algebraicDecompose(p: P, ts: TS): Record(done: Split, todo: List LpWT) ==
+       ground? p =>
+         error " in algebraicDecompose$REGSET: should never happen !"
+       v := mvar(p); n := #ts
+       ts_v_- := collectUnder(ts,v)
+       ts_v_+ := collectUpper(ts,v)
+       ts_v := select(ts,v)::P
+       lgwt: List PWT
+       if mdeg(p) < mdeg(ts_v)
+         then 
+           lgwt := stoseInternalLastSubResultant(ts_v,p,ts_v_-,true,false)$regsetgcdpack
+         else
+           lgwt := stoseInternalLastSubResultant(p,ts_v,ts_v_-,true,false)$regsetgcdpack
+       lts: Split := []
+       llpwt: List LpWT := []
+       for gwt in lgwt repeat
+         g := gwt.val; us := gwt.tower
+         zero? g => 
+           error " in algebraicDecompose$REGSET: should never happen !!"
+         ground? g => "leave"
+         h := leadingCoefficient(g,v)
+         lus := augment(members(ts_v_+),augment(ts_v,us)$TS)$TS
+         lsfp := squareFreeFactors(h)$polsetpack
+         for f in lsfp repeat
+           ground? f => "leave"
+           for vs in lus repeat
+             llpwt := cons([[f,p],vs]$LpWT, llpwt)
+         n < #us => 
+           error " in algebraicDecompose$REGSET: should never happen !!!"
+         mvar(g) = v => 
+           lts := concat(augment(members(ts_v_+),augment(g,us)$TS)$TS,lts)         
+       [lts,llpwt]
+
+     transcendentalDecompose(p: P, ts: TS,bound: N): Record(done: Split, todo: List LpWT) ==
+       lts: Split
+       if #ts < bound 
+         then
+           lts := augment(p,ts)$TS
+         else
+           lts := []
+       llpwt: List LpWT := []
+       [lts,llpwt]
+
+     transcendentalDecompose(p: P, ts: TS): Record(done: Split, todo: List LpWT) ==
+       lts: Split:= augment(p,ts)$TS
+       llpwt: List LpWT := []
+       [lts,llpwt]
+
+     internalDecompose(p: P, ts: TS,bound: N,clos?:B): Record(done: Split, todo: List LpWT) ==
+       clos? => internalDecompose(p,ts,bound)
+       internalDecompose(p,ts)
+
+     internalDecompose(p: P, ts: TS,bound: N): Record(done: Split, todo: List LpWT) ==
+       -- ASSUME p not constant
+       llpwt: List LpWT := []
+       lts: Split := []
+       -- EITHER mvar(p) is null
+       if (not zero? tail(p)) and (not ground? (lmp := leastMonomial(p)))
+         then
+           llpwt := cons([[mvar(p)::P],ts]$LpWT,llpwt)
+           p := (p exquo lmp)::P
+       ip := squareFreePart init(p); tp := tail p
+       p := mainPrimitivePart p
+       -- OR init(p) is null or not
+       lbwt: List BWT := stoseInvertible?_sqfreg(ip,ts)$regsetgcdpack
+       for bwt in lbwt repeat
+         bwt.val =>
+           if algebraic?(mvar(p),bwt.tower) 
+             then 
+               rsl := algebraicDecompose(p,bwt.tower)
+             else
+               rsl := transcendentalDecompose(p,bwt.tower,bound)
+           lts := concat(rsl.done,lts)
+           llpwt :=  concat(rsl.todo,llpwt)
+           (not ground? ip) =>
+             zero? tp => llpwt := cons([[ip],bwt.tower]$LpWT, llpwt)
+             (not ground? tp) => llpwt := cons([[ip,tp],bwt.tower]$LpWT, llpwt)
+         riv := removeZero(ip,bwt.tower)
+         (zero? riv) =>
+           zero? tp => lts := cons(bwt.tower,lts)
+           (not ground? tp) => llpwt := cons([[tp],bwt.tower]$LpWT, llpwt)
+         llpwt := cons([[riv * mainMonomial(p) + tp],bwt.tower]$LpWT, llpwt)
+       [lts,llpwt]
+
+     internalDecompose(p: P, ts: TS): Record(done: Split, todo: List LpWT) ==
+       -- ASSUME p not constant
+       llpwt: List LpWT := []
+       lts: Split := []
+       -- EITHER mvar(p) is null
+       if (not zero? tail(p)) and (not ground? (lmp := leastMonomial(p)))
+         then
+           llpwt := cons([[mvar(p)::P],ts]$LpWT,llpwt)
+           p := (p exquo lmp)::P
+       ip := squareFreePart init(p); tp := tail p
+       p := mainPrimitivePart p
+       -- OR init(p) is null or not
+       lbwt: List BWT := stoseInvertible?_sqfreg(ip,ts)$regsetgcdpack
+       for bwt in lbwt repeat
+         bwt.val =>
+           if algebraic?(mvar(p),bwt.tower) 
+             then 
+               rsl := algebraicDecompose(p,bwt.tower)
+             else
+               rsl := transcendentalDecompose(p,bwt.tower)
+           lts := concat(rsl.done,lts)
+           llpwt :=  concat(rsl.todo,llpwt)
+           (not ground? ip) => 
+             zero? tp => llpwt := cons([[ip],bwt.tower]$LpWT, llpwt)
+             (not ground? tp) => llpwt := cons([[ip,tp],bwt.tower]$LpWT, llpwt)
+         riv := removeZero(ip,bwt.tower)
+         (zero? riv) =>
+           zero? tp => lts := cons(bwt.tower,lts)
+           (not ground? tp) => llpwt := cons([[tp],bwt.tower]$LpWT, llpwt)
+         llpwt := cons([[riv * mainMonomial(p) + tp],bwt.tower]$LpWT, llpwt)
+       [lts,llpwt]
+
+     decompose(lp: LP, lts: Split, clos?: B, info?: B): Split ==
+       decompose(lp,lts,false,false,clos?,true,info?)
+
+     convert(lpwt: LpWT): String ==
+       ls: List String := ["<", string((#(lpwt.val))::Z), ",", string((#(lpwt.tower))::Z), ">" ]
+       concat ls
+
+     printInfo(toSee: List LpWT, n: N): Void ==
+       lpwt := first toSee
+       s: String := concat ["[", string((#toSee)::Z), " ", convert(lpwt)@String]
+       m: N := #(lpwt.val)
+       toSee := rest toSee
+       for lpwt in toSee repeat
+         m := m + #(lpwt.val)
+         s := concat [s, ",", convert(lpwt)@String]
+       s := concat [s, " -> |", string(m::Z), "|; {", string(n::Z),"}]"]
+       iprint(s)$iprintpack
+       void()
+
+     decompose(lp: LP, lts: Split, cleanW?: B, sqfr?: B, clos?: B, rem?: B, info?: B): Split ==
+       -- if cleanW? then REMOVE REDUNDANT COMPONENTS in lts
+       -- if sqfr? then SPLIT the system with SQUARE-FREE FACTORIZATION
+       -- if clos? then SOLVE in the closure sense 
+       -- if rem? then REDUCE the current p by using remainder
+       -- if info? then PRINT info
+       empty? lp => lts
+       branches: List Branch := prepareDecompose(lp,lts,cleanW?,sqfr?)$quasicomppack
+       empty? branches => []
+       toSee: List LpWT := [[br.eq,br.tower]$LpWT for br in branches]
+       toSave: Split := []
+       if clos? then bound := KrullNumber(lp,lts) else bound := numberOfVariables(lp,lts)
+       while (not empty? toSee) repeat
+         if info? then printInfo(toSee,#toSave)
+         lpwt := first toSee; toSee := rest toSee
+         lp := lpwt.val; ts := lpwt.tower
+         empty? lp => 
+           toSave := cons(ts, toSave)
+         p := first lp;  lp := rest lp
+         if rem? and (not ground? p) and (not empty? ts)  
+            then 
+              p := remainder(p,ts).polnum
+         p := removeZero(p,ts)
+         zero? p => toSee := cons([lp,ts]$LpWT, toSee)
+         ground? p => "leave"
+         rsl := internalDecompose(p,ts,bound,clos?)
+         toSee := upDateBranches(lp,toSave,toSee,rsl,bound)
+       removeSuperfluousQuasiComponents(toSave)$quasicomppack
+
+     upDateBranches(leq:LP,lts:Split,current:List LpWT,wip: Wip,n:N): List LpWT ==
+       newBranches: List LpWT := wip.todo
+       newComponents: Split := wip.done
+       branches1, branches2:  List LpWT 
+       branches1 := []; branches2  := []
+       for branch in newBranches repeat
+         us := branch.tower
+         #us > n => "leave"
+         newleq := sort(infRittWu?,concat(leq,branch.val))
+         --foo := rewriteSetWithReduction(newleq,us,initiallyReduce,initiallyReduced?)
+         --any?(ground?,foo)  => "leave"
+         branches1 := cons([newleq,us]$LpWT, branches1)
+       for us in newComponents repeat
+         #us > n => "leave"
+         subQuasiComponent?(us,lts)$quasicomppack => "leave"
+         --newleq := leq
+         --foo := rewriteSetWithReduction(newleq,us,initiallyReduce,initiallyReduced?)
+         --any?(ground?,foo)  => "leave"
+         branches2 := cons([leq,us]$LpWT, branches2)
+       empty? branches1 => 
+         empty? branches2 => current
+         concat(branches2, current)
+       branches := concat [branches2, branches1, current]
+       -- branches := concat(branches,current)
+       removeSuperfluousCases(branches)$quasicomppack
+
+@
+<<SRDCMPK.dotabb>>=
+"SRDCMPK" [color="#FF4488",href="bookvol10.4.pdf#nameddest=SRDCMPK"]
+"SFRTCAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=SFRTCAT"]
+"SRDCMPK" -> "SFRTCAT"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package SFRGCD SquareFreeRegularTriangularSetGcdPackage}
+\pagehead{SquareFreeRegularTriangularSetGcdPackage}{SFRGCD}
+\pagepic{ps/v104squarefreeregulartriangularsetgcdpackage.ps}{SFRGCD}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package SFRGCD SquareFreeRegularTriangularSetGcdPackage>>=
+)abbrev package SFRGCD SquareFreeRegularTriangularSetGcdPackage
+++ Author: Marc Moreno Maza
+++ Date Created: 09/23/1998
+++ Date Last Updated: 10/01/1998
+++ Basic Functions:
+++ Related Constructors:
+++ Also See: 
+++ AMS Classifications:
+++ Keywords:
+++ Description: 
+++ A internal package for computing gcds and resultants of univariate polynomials
+++ with coefficients in a tower of simple extensions of a field.
+++ There is no need to use directly this package since its main operations are
+++ available from \spad{TS}. \newline
+++ References :
+++  [1] M. MORENO MAZA and R. RIOBOO "Computations of gcd over
+++      algebraic towers of simple extensions" In proceedings of AAECC11
+++      Paris, 1995.
+++  [2] M. MORENO MAZA "Calculs de pgcd au-dessus des tours
+++      d'extensions simples et resolution des systemes d'equations
+++      algebriques" These, Universite P.etM. Curie, Paris, 1997.
+++  [3] M. MORENO MAZA "A new algorithm for computing triangular
+++      decomposition of algebraic varieties" NAG Tech. Rep. 4/98.
+++ Version: 1. 
+
+SquareFreeRegularTriangularSetGcdPackage(R,E,V,P,TS): Exports == Implementation where
+
+  R : GcdDomain
+  E : OrderedAbelianMonoidSup
+  V : OrderedSet
+  P : RecursivePolynomialCategory(R,E,V)
+  TS : RegularTriangularSetCategory(R,E,V,P)
+  N ==> NonNegativeInteger
+  Z ==> Integer
+  B ==> Boolean
+  S ==> String
+  LP ==> List P
+  PtoP ==> P -> P
+  PS ==> GeneralPolynomialSet(R,E,V,P)
+  PWT ==> Record(val : P, tower : TS)
+  BWT ==> Record(val : Boolean, tower : TS)
+  LpWT ==> Record(val : (List P), tower : TS)
+  Branch ==> Record(eq: List P, tower: TS, ineq: List P)
+  UBF ==> Union(Branch,"failed")
+  Split ==> List TS
+  KeyGcd ==> Record(arg1: P, arg2: P, arg3: TS, arg4: B)
+  EntryGcd ==> List PWT
+  HGcd ==> TabulatedComputationPackage(KeyGcd, EntryGcd)
+  KeyInvSet ==> Record(arg1: P, arg3: TS)
+  EntryInvSet ==> List TS
+  HInvSet ==> TabulatedComputationPackage(KeyInvSet, EntryInvSet)
+  iprintpack ==> InternalPrintPackage()
+  polsetpack ==> PolynomialSetUtilitiesPackage(R,E,V,P)
+  quasicomppack ==> SquareFreeQuasiComponentPackage(R,E,V,P,TS)
+
+  SQUAREFREE ==> SquareFreeRegularTriangularSetCategory(R,E,V,P)
+
+  Exports ==  with
+     startTableGcd!: (S,S,S) -> Void
+     stopTableGcd!: () -> Void
+     startTableInvSet!: (S,S,S) -> Void
+     stopTableInvSet!: () -> Void
+     stosePrepareSubResAlgo: (P,P,TS) -> List LpWT 
+     stoseInternalLastSubResultant: (P,P,TS,B,B) -> List PWT 
+     stoseInternalLastSubResultant: (List LpWT,V,B) -> List PWT 
+     stoseIntegralLastSubResultant: (P,P,TS) -> List PWT 
+     stoseLastSubResultant: (P,P,TS) -> List PWT 
+     stoseInvertible?: (P,TS) -> B
+     stoseInvertible?_sqfreg: (P,TS) -> List BWT
+     stoseInvertibleSet_sqfreg: (P,TS) -> Split
+     stoseInvertible?_reg: (P,TS) -> List BWT
+     stoseInvertibleSet_reg: (P,TS) -> Split
+     stoseInvertible?: (P,TS) -> List BWT
+     stoseInvertibleSet: (P,TS) -> Split
+     stoseSquareFreePart: (P,TS) -> List PWT 
+
+  Implementation == add
+
+     startTableGcd!(ok: S, ko: S, domainName: S): Void == 
+       initTable!()$HGcd
+       printInfo!(ok,ko)$HGcd
+       startStats!(domainName)$HGcd
+       void()
+
+     stopTableGcd!(): Void ==   
+       if makingStats?()$HGcd then printStats!()$HGcd
+       clearTable!()$HGcd
+
+     startTableInvSet!(ok: S, ko: S, domainName: S): Void == 
+       initTable!()$HInvSet
+       printInfo!(ok,ko)$HInvSet
+       startStats!(domainName)$HInvSet
+       void()
+
+     stopTableInvSet!(): Void ==   
+       if makingStats?()$HInvSet then printStats!()$HInvSet
+       clearTable!()$HInvSet
+
+     stoseInvertible?(p:P,ts:TS): Boolean == 
+       q := primitivePart initiallyReduce(p,ts)
+       zero? q => false
+       normalized?(q,ts) => true
+       v := mvar(q)
+       not algebraic?(v,ts) => 
+         toCheck: List BWT := stoseInvertible?(p,ts)@(List BWT)
+         for bwt in toCheck repeat
+           bwt.val = false => return false
+         return true
+       ts_v := select(ts,v)::P
+       ts_v_- := collectUnder(ts,v)
+       lgwt := stoseInternalLastSubResultant(ts_v,q,ts_v_-,false,true)
+       for gwt in lgwt repeat
+         g := gwt.val; 
+         (not ground? g) and (mvar(g) = v) => 
+           return false
+       true
+
+     stosePrepareSubResAlgo(p1:P,p2:P,ts:TS): List LpWT ==
+       -- ASSUME mvar(p1) = mvar(p2) > mvar(ts) and mdeg(p1) >= mdeg(p2)
+       -- ASSUME init(p1) invertible modulo ts !!!
+       toSee: List LpWT := [[[p1,p2],ts]$LpWT]
+       toSave: List LpWT := []
+       v := mvar(p1)
+       while (not empty? toSee) repeat
+         lpwt := first toSee; toSee := rest toSee
+         p1 := lpwt.val.1; p2 := lpwt.val.2
+         ts := lpwt.tower
+         lbwt := stoseInvertible?(leadingCoefficient(p2,v),ts)@(List BWT)
+         for bwt in lbwt repeat
+           (bwt.val = true) and (degree(p2,v) > 0) =>
+             p3 := prem(p1, -p2)
+             s: P := init(p2)**(mdeg(p1) - mdeg(p2))::N
+             toSave := cons([[p2,p3,s],bwt.tower]$LpWT,toSave)
+           -- p2 := initiallyReduce(p2,bwt.tower)
+           newp2 := primitivePart initiallyReduce(p2,bwt.tower)
+           (bwt.val = true) =>
+             -- toSave := cons([[p2,0,1],bwt.tower]$LpWT,toSave)
+             toSave := cons([[p2,0,1],bwt.tower]$LpWT,toSave)
+           -- zero? p2 => 
+           zero? newp2 => 
+             toSave := cons([[p1,0,1],bwt.tower]$LpWT,toSave)
+           -- toSee := cons([[p1,p2],bwt.tower]$LpWT,toSee)
+           toSee := cons([[p1,newp2],bwt.tower]$LpWT,toSee)
+       toSave
+
+     stoseIntegralLastSubResultant(p1:P,p2:P,ts:TS): List PWT ==
+       -- ASSUME mvar(p1) = mvar(p2) > mvar(ts) and mdeg(p1) >= mdeg(p2)
+       -- ASSUME p1 and p2 have no algebraic coefficients
+       lsr := lastSubResultant(p1, p2)
+       ground?(lsr) => [[lsr,ts]$PWT]
+       mvar(lsr) < mvar(p1) => [[lsr,ts]$PWT]
+       gi1i2 := gcd(init(p1),init(p2))
+       ex: Union(P,"failed") := (gi1i2 * lsr) exquo$P init(lsr)
+       ex case "failed" => [[lsr,ts]$PWT]
+       [[ex::P,ts]$PWT]
+            
+     stoseInternalLastSubResultant(p1:P,p2:P,ts:TS,b1:B,b2:B): List PWT ==
+       -- ASSUME mvar(p1) = mvar(p2) > mvar(ts) and mdeg(p1) >= mdeg(p2)
+       -- if b1 ASSUME init(p2) invertible w.r.t. ts
+       -- if b2 BREAK with the first non-trivial gcd 
+       k: KeyGcd := [p1,p2,ts,b2]
+       e := extractIfCan(k)$HGcd
+       e case EntryGcd => e::EntryGcd
+       toSave: List PWT 
+       empty? ts => 
+         toSave := stoseIntegralLastSubResultant(p1,p2,ts)
+         insert!(k,toSave)$HGcd
+         return toSave
+       toSee: List LpWT 
+       if b1
+         then
+           p3 := prem(p1, -p2)
+           s: P := init(p2)**(mdeg(p1) - mdeg(p2))::N
+           toSee := [[[p2,p3,s],ts]$LpWT]
+         else
+           toSee := stosePrepareSubResAlgo(p1,p2,ts)
+       toSave := stoseInternalLastSubResultant(toSee,mvar(p1),b2)
+       insert!(k,toSave)$HGcd
+       toSave
+
+     stoseInternalLastSubResultant(llpwt: List LpWT,v:V,b2:B): List PWT ==
+       toReturn: List PWT := []; toSee: List LpWT; 
+       while (not empty? llpwt) repeat
+         toSee := llpwt; llpwt := []
+         -- CONSIDER FIRST the vanishing current last subresultant
+         for lpwt in toSee repeat 
+           p1 := lpwt.val.1; p2 := lpwt.val.2; s := lpwt.val.3; ts := lpwt.tower
+           lbwt := stoseInvertible?(leadingCoefficient(p2,v),ts)@(List BWT)
+           for bwt in lbwt repeat
+             bwt.val = false => 
+               toReturn := cons([p1,bwt.tower]$PWT, toReturn)
+               b2 and positive?(degree(p1,v)) => return toReturn
+             llpwt := cons([[p1,p2,s],bwt.tower]$LpWT, llpwt)
+         empty? llpwt => "leave"
+         -- CONSIDER NOW the branches where the computations continue
+         toSee := llpwt; llpwt := []
+         lpwt := first toSee; toSee := rest toSee
+         p1 := lpwt.val.1; p2 := lpwt.val.2; s := lpwt.val.3
+         delta: N := (mdeg(p1) - degree(p2,v))::N
+         p3: P := LazardQuotient2(p2, leadingCoefficient(p2,v), s, delta)
+         zero?(degree(p3,v)) =>
+           toReturn := cons([p3,lpwt.tower]$PWT, toReturn)
+           for lpwt in toSee repeat 
+             toReturn := cons([p3,lpwt.tower]$PWT, toReturn)
+         (p1, p2) := (p3, next_subResultant2(p1, p2, p3, s))
+         s := leadingCoefficient(p1,v)
+         llpwt := cons([[p1,p2,s],lpwt.tower]$LpWT, llpwt)
+         for lpwt in toSee repeat 
+           llpwt := cons([[p1,p2,s],lpwt.tower]$LpWT, llpwt)
+       toReturn
+
+     stoseLastSubResultant(p1:P,p2:P,ts:TS): List PWT ==
+       ground? p1 => 
+         error"in stoseLastSubResultantElseSplit$SFRGCD  : bad #1"
+       ground? p2 => 
+         error"in stoseLastSubResultantElseSplit$SFRGCD : bad #2"
+       not (mvar(p2) = mvar(p1)) => 
+         error"in stoseLastSubResultantElseSplit$SFRGCD : bad #2"
+       algebraic?(mvar(p1),ts) =>
+         error"in stoseLastSubResultantElseSplit$SFRGCD : bad #1"
+       not initiallyReduced?(p1,ts) => 
+         error"in stoseLastSubResultantElseSplit$SFRGCD : bad #1"
+       not initiallyReduced?(p2,ts) => 
+         error"in stoseLastSubResultantElseSplit$SFRGCD : bad #2"
+       purelyTranscendental?(p1,ts) and purelyTranscendental?(p2,ts) =>
+         stoseIntegralLastSubResultant(p1,p2,ts)
+       if mdeg(p1) < mdeg(p2) then 
+          (p1, p2) := (p2, p1)
+          if odd?(mdeg(p1)) and odd?(mdeg(p2)) then p2 := - p2
+       stoseInternalLastSubResultant(p1,p2,ts,false,false)
+
+     stoseSquareFreePart_wip(p:P, ts: TS): List PWT ==
+     -- ASSUME p is not constant and mvar(p) > mvar(ts)
+     -- ASSUME init(p) is invertible w.r.t. ts
+     -- ASSUME p is mainly primitive
+--       one? mdeg(p) => [[p,ts]$PWT]
+       mdeg(p) = 1 => [[p,ts]$PWT]
+       v := mvar(p)$P
+       q: P := mainPrimitivePart D(p,v)
+       lgwt: List PWT := stoseInternalLastSubResultant(p,q,ts,true,false)
+       lpwt : List PWT := []
+       sfp : P
+       for gwt in lgwt repeat
+         g := gwt.val; us := gwt.tower
+         (ground? g) or (mvar(g) < v) =>
+           lpwt := cons([p,us],lpwt)
+         g := mainPrimitivePart g
+         sfp := lazyPquo(p,g)
+         sfp := mainPrimitivePart stronglyReduce(sfp,us)
+         lpwt := cons([sfp,us],lpwt)
+       lpwt
+
+     stoseSquareFreePart_base(p:P, ts: TS): List PWT == [[p,ts]$PWT]
+
+     stoseSquareFreePart(p:P, ts: TS): List PWT == stoseSquareFreePart_wip(p,ts)
+       
+     stoseInvertible?_sqfreg(p:P,ts:TS): List BWT ==
+       --iprint("+")$iprintpack
+       q := primitivePart initiallyReduce(p,ts)
+       zero? q => [[false,ts]$BWT]
+       normalized?(q,ts) => [[true,ts]$BWT]
+       v := mvar(q)
+       not algebraic?(v,ts) => 
+         lbwt: List BWT := []
+         toCheck: List BWT := stoseInvertible?_sqfreg(init(q),ts)@(List BWT)
+         for bwt in toCheck repeat
+           bwt.val => lbwt := cons(bwt,lbwt)
+           newq := removeZero(q,bwt.tower)
+           zero? newq => lbwt := cons(bwt,lbwt)
+           lbwt := concat(stoseInvertible?_sqfreg(newq,bwt.tower)@(List BWT), lbwt)
+         return lbwt
+       ts_v := select(ts,v)::P
+       ts_v_- := collectUnder(ts,v)
+       ts_v_+ := collectUpper(ts,v)
+       lgwt := stoseInternalLastSubResultant(ts_v,q,ts_v_-,false,false)
+       lbwt: List BWT := []
+       lts, lts_g, lts_h: Split
+       for gwt in lgwt repeat
+         g := gwt.val; ts := gwt.tower
+         (ground? g) or (mvar(g) < v) => 
+           lts := augment(ts_v,ts)$TS
+           lts := augment(members(ts_v_+),lts)$TS
+           for ts in lts repeat
+             lbwt := cons([true, ts]$BWT,lbwt)
+         g := mainPrimitivePart g
+         lts_g := augment(g,ts)$TS
+         lts_g := augment(members(ts_v_+),lts_g)$TS
+         -- USE stoseInternalAugment with parameters ??
+         for ts_g in lts_g repeat
+           lbwt := cons([false, ts_g]$BWT,lbwt)
+         h := lazyPquo(ts_v,g)
+         (ground? h) or (mvar(h) < v) => "leave"
+         h := mainPrimitivePart h
+         lts_h := augment(h,ts)$TS
+         lts_h := augment(members(ts_v_+),lts_h)$TS
+         -- USE stoseInternalAugment with parameters ??
+         for ts_h in lts_h repeat
+           lbwt := cons([true, ts_h]$BWT,lbwt)
+       sort(#1.val < #2.val,lbwt)
+
+     stoseInvertibleSet_sqfreg(p:P,ts:TS): Split ==
+       --iprint("*")$iprintpack
+       k: KeyInvSet := [p,ts]
+       e := extractIfCan(k)$HInvSet
+       e case EntryInvSet => e::EntryInvSet
+       q := primitivePart initiallyReduce(p,ts)
+       zero? q => []
+       normalized?(q,ts) => [ts]
+       v := mvar(q)
+       toSave: Split := []
+       not algebraic?(v,ts) => 
+         toCheck: List BWT := stoseInvertible?_sqfreg(init(q),ts)@(List BWT)
+         for bwt in toCheck repeat
+           bwt.val => toSave := cons(bwt.tower,toSave)
+           newq := removeZero(q,bwt.tower)
+           zero? newq => "leave"
+           toSave := concat(stoseInvertibleSet_sqfreg(newq,bwt.tower), toSave)
+         toSave := removeDuplicates toSave
+         return algebraicSort(toSave)$quasicomppack
+       ts_v := select(ts,v)::P
+       ts_v_- := collectUnder(ts,v)
+       ts_v_+ := collectUpper(ts,v)
+       lgwt := stoseInternalLastSubResultant(ts_v,q,ts_v_-,false,false)
+       lts, lts_h: Split
+       for gwt in lgwt repeat
+         g := gwt.val; ts := gwt.tower
+         (ground? g) or (mvar(g) < v) => 
+           lts := augment(ts_v,ts)$TS
+           lts := augment(members(ts_v_+),lts)$TS
+           toSave := concat(lts,toSave)
+         g := mainPrimitivePart g
+         h := lazyPquo(ts_v,g)
+         h := mainPrimitivePart h
+         (ground? h) or (mvar(h) < v) => "leave"
+         lts_h := augment(h,ts)$TS
+         lts_h := augment(members(ts_v_+),lts_h)$TS
+         toSave := concat(lts_h,toSave)
+       toSave := algebraicSort(toSave)$quasicomppack
+       insert!(k,toSave)$HInvSet
+       toSave
+       
+     stoseInvertible?_reg(p:P,ts:TS): List BWT ==
+       --iprint("-")$iprintpack
+       q := primitivePart initiallyReduce(p,ts)
+       zero? q => [[false,ts]$BWT]
+       normalized?(q,ts) => [[true,ts]$BWT]
+       v := mvar(q)
+       not algebraic?(v,ts) => 
+         lbwt: List BWT := []
+         toCheck: List BWT := stoseInvertible?_reg(init(q),ts)@(List BWT)
+         for bwt in toCheck repeat
+           bwt.val => lbwt := cons(bwt,lbwt)
+           newq := removeZero(q,bwt.tower)
+           zero? newq => lbwt := cons(bwt,lbwt)
+           lbwt := concat(stoseInvertible?_reg(newq,bwt.tower)@(List BWT), lbwt)
+         return lbwt
+       ts_v := select(ts,v)::P
+       ts_v_- := collectUnder(ts,v)
+       ts_v_+ := collectUpper(ts,v)
+       lgwt := stoseInternalLastSubResultant(ts_v,q,ts_v_-,false,false)
+       lbwt: List BWT := []
+       lts, lts_g, lts_h: Split
+       for gwt in lgwt repeat
+         g := gwt.val; ts := gwt.tower
+         (ground? g) or (mvar(g) < v) => 
+           lts := augment(ts_v,ts)$TS
+           lts := augment(members(ts_v_+),lts)$TS
+           for ts in lts repeat
+             lbwt := cons([true, ts]$BWT,lbwt)
+         g := mainPrimitivePart g
+         lts_g := augment(g,ts)$TS
+         lts_g := augment(members(ts_v_+),lts_g)$TS
+         -- USE internalAugment with parameters ??
+         for ts_g in lts_g repeat
+           lbwt := cons([false, ts_g]$BWT,lbwt)
+         h := lazyPquo(ts_v,g)
+         (ground? h) or (mvar(h) < v) => "leave"
+         h := mainPrimitivePart h
+         lts_h := augment(h,ts)$TS
+         lts_h := augment(members(ts_v_+),lts_h)$TS
+         -- USE internalAugment with parameters ??
+         for ts_h in lts_h repeat
+           inv := stoseInvertible?_reg(q,ts_h)@(List BWT)
+           lbwt := concat([bwt for bwt in inv | bwt.val],lbwt)
+       sort(#1.val < #2.val,lbwt)
+
+     stoseInvertibleSet_reg(p:P,ts:TS): Split ==
+       --iprint("/")$iprintpack
+       k: KeyInvSet := [p,ts]
+       e := extractIfCan(k)$HInvSet
+       e case EntryInvSet => e::EntryInvSet
+       q := primitivePart initiallyReduce(p,ts)
+       zero? q => []
+       normalized?(q,ts) => [ts]
+       v := mvar(q)
+       toSave: Split := []
+       not algebraic?(v,ts) =>
+         toCheck: List BWT := stoseInvertible?_reg(init(q),ts)@(List BWT)
+         for bwt in toCheck repeat
+           bwt.val => toSave := cons(bwt.tower,toSave)
+           newq := removeZero(q,bwt.tower)
+           zero? newq => "leave"
+           toSave := concat(stoseInvertibleSet_reg(newq,bwt.tower), toSave)
+         toSave := removeDuplicates toSave
+         return algebraicSort(toSave)$quasicomppack
+       ts_v := select(ts,v)::P
+       ts_v_- := collectUnder(ts,v)
+       ts_v_+ := collectUpper(ts,v)
+       lgwt := stoseInternalLastSubResultant(ts_v,q,ts_v_-,false,false)
+       lts, lts_h: Split
+       for gwt in lgwt repeat
+         g := gwt.val; ts := gwt.tower
+         (ground? g) or (mvar(g) < v) => 
+           lts := augment(ts_v,ts)$TS
+           lts := augment(members(ts_v_+),lts)$TS
+           toSave := concat(lts,toSave)
+         g := mainPrimitivePart g
+         h := lazyPquo(ts_v,g)
+         h := mainPrimitivePart h
+         (ground? h) or (mvar(h) < v) => "leave"
+         lts_h := augment(h,ts)$TS
+         lts_h := augment(members(ts_v_+),lts_h)$TS
+         for ts_h in lts_h repeat
+           inv := stoseInvertibleSet_reg(q,ts_h)
+           toSave := removeDuplicates concat(inv,toSave)
+       toSave := algebraicSort(toSave)$quasicomppack
+       insert!(k,toSave)$HInvSet
+       toSave
+
+     if TS has SquareFreeRegularTriangularSetCategory(R,E,V,P)
+     then
+
+       stoseInvertible?(p:P,ts:TS): List BWT == stoseInvertible?_sqfreg(p,ts)
+
+       stoseInvertibleSet(p:P,ts:TS): Split == stoseInvertibleSet_sqfreg(p,ts)
+
+     else
+       
+       stoseInvertible?(p:P,ts:TS): List BWT == stoseInvertible?_reg(p,ts)
+ 
+       stoseInvertibleSet(p:P,ts:TS): Split == stoseInvertibleSet_reg(p,ts)
+
+@
+<<SFRGCD.dotabb>>=
+"SFRGCD" [color="#FF4488",href="bookvol10.4.pdf#nameddest=SFRGCD"]
+"SFRTCAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=SFRTCAT"]
+"SFRGCD" -> "SFRTCAT"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{package MATSTOR StorageEfficientMatrixOperations}
 \pagehead{StorageEfficientMatrixOperations}{MATSTOR}
 \pagepic{ps/v104storageefficientmatrixoperations.ps}{MATSTOR}{1.00}
@@ -74666,6 +81388,192 @@ StorageEfficientMatrixOperations(R): Exports == Implementation where
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package STREAM1 StreamFunctions1}
+\pagehead{StreamFunctions1}{STREAM1}
+\pagepic{ps/v104streamfunctions1.ps}{STREAM1}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package STREAM1 StreamFunctions1>>=
+)abbrev package STREAM1 StreamFunctions1
+++ Authors: Burge, Watt; updated by Clifton J. Williamson
+++ Date Created: July 1986
+++ Date Last Updated: 29 January 1990
+++ Keywords: stream, infinite list, infinite sequence
+StreamFunctions1(S:Type): Exports == Implementation where
+  ++ Functions defined on streams with entries in one set.
+  ST  ==> Stream
+
+  Exports ==> with
+    concat: ST ST S -> ST S
+      ++ concat(u) returns the left-to-right concatentation of the 
+      ++ streams in u. Note: \spad{concat(u) = reduce(concat,u)}.
+      ++
+      ++X m:=[i for i in 10..]
+      ++X n:=[j for j in 1.. | prime? j]
+      ++X p:=[m,n]::Stream(Stream(PositiveInteger))
+      ++X concat(p)
+
+  Implementation ==> add
+
+    concat z == delay
+      empty? z => empty()
+      empty?(x := frst z) => concat rst z
+      concat(frst x,concat(rst x,concat rst z))
+
+@
+<<STREAM1.dotabb>>=
+"STREAM1" [color="#FF4488",href="bookvol10.4.pdf#nameddest=STREAM1"]
+"TYPE" [color="#4488FF",href="bookvol10.2.pdf#nameddest=TYPE"]
+"STREAM1" -> "TYPE"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package STREAM2 StreamFunctions2}
+\pagehead{StreamFunctions2}{STREAM2}
+\pagepic{ps/v104streamfunctions2.ps}{STREAM2}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package STREAM2 StreamFunctions2>>=
+)abbrev package STREAM2 StreamFunctions2
+++ Authors: Burge, Watt; updated by Clifton J. Williamson
+++ Date Created: July 1986
+++ Date Last Updated: 29 January 1990
+++ Keywords: stream, infinite list, infinite sequence
+StreamFunctions2(A:Type,B:Type): Exports == Implementation where
+  ++ Functions defined on streams with entries in two sets.
+  ST   ==> Stream
+
+  Exports ==> with
+    map: ((A -> B),ST A) -> ST B
+      ++ map(f,s) returns a stream whose elements are the function f applied
+      ++ to the corresponding elements of s.
+      ++ Note: \spad{map(f,[x0,x1,x2,...]) = [f(x0),f(x1),f(x2),..]}.
+      ++
+      ++X m:=[i for i in 1..]
+      ++X f(i:PositiveInteger):PositiveInteger==i**2
+      ++X map(f,m)
+
+    scan: (B,((A,B) -> B),ST A) -> ST B
+      ++ scan(b,h,[x0,x1,x2,...]) returns \spad{[y0,y1,y2,...]}, where
+      ++ \spad{y0 = h(x0,b)},
+      ++ \spad{y1 = h(x1,y0)},\spad{...}
+      ++ \spad{yn = h(xn,y(n-1))}.
+      ++
+      ++X m:=[i for i in 1..]::Stream(Integer)
+      ++X f(i:Integer,j:Integer):Integer==i+j
+      ++X scan(1,f,m)
+
+    reduce:  (B,(A,B) -> B,ST A) -> B
+      ++ reduce(b,f,u), where u is a finite stream \spad{[x0,x1,...,xn]},
+      ++ returns the value \spad{r(n)} computed as follows:
+      ++ \spad{r0 = f(x0,b),
+      ++ r1 = f(x1,r0),...,
+      ++ r(n) = f(xn,r(n-1))}.
+      ++
+      ++X m:=[i for i in 1..300]::Stream(Integer)
+      ++X f(i:Integer,j:Integer):Integer==i+j
+      ++X reduce(1,f,m)
+
+--  rreduce: (B,(A,B) -> B,ST A) -> B
+--    ++ reduce(b,h,[x0,x1,..,xn]) = h(x1,h(x2(..,h(x(n-1),h(xn,b))..)
+--  reshape: (ST B,ST A) -> ST B
+--    ++ reshape(y,x) = y
+
+  Implementation ==> add
+
+    mapp: (A -> B,ST A) -> ST B
+    mapp(f,x)== delay
+      empty? x => empty()
+      concat(f frst x, map(f,rst x))
+
+    map(f,x) ==
+      explicitlyEmpty? x => empty()
+      eq?(x,rst x) => repeating([f frst x])
+      mapp(f, x)
+
+--  reshape(y,x) == y
+
+    scan(b,h,x) == delay
+      empty? x => empty()
+      c := h(frst x,b)
+      concat(c,scan(c,h,rst x))
+
+    reduce(b,h,x) ==
+      empty? x => b
+      reduce(h(frst x,b),h,rst x)
+--  rreduce(b,h,x) ==
+--    empty? x => b
+--    h(frst x,rreduce(b,h,rst x))
+
+@
+<<STREAM2.dotabb>>=
+"STREAM2" [color="#FF4488",href="bookvol10.4.pdf#nameddest=STREAM2"]
+"TYPE" [color="#4488FF",href="bookvol10.2.pdf#nameddest=TYPE"]
+"STREAM2" -> "TYPE"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package STREAM3 StreamFunctions3}
+\pagehead{StreamFunctions3}{STREAM3}
+\pagepic{ps/v104streamfunctions3.ps}{STREAM3}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package STREAM3 StreamFunctions3>>=
+)abbrev package STREAM3 StreamFunctions3
+++ Authors: Burge, Watt; updated by Clifton J. Williamson
+++ Date Created: July 1986
+++ Date Last Updated: 29 January 1990
+++ Keywords: stream, infinite list, infinite sequence
+StreamFunctions3(A,B,C): Exports == Implementation where
+  ++ Functions defined on streams with entries in three sets.
+  A  : Type
+  B  : Type
+  C  : Type
+  ST ==> Stream
+
+  Exports ==> with
+    map: ((A,B) -> C,ST A,ST B) -> ST C
+      ++ map(f,st1,st2) returns the stream whose elements are the
+      ++ function f applied to the corresponding elements of st1 and st2.
+      ++ \spad{map(f,[x0,x1,x2,..],[y0,y1,y2,..]) = [f(x0,y0),f(x1,y1),..]}.
+      ++
+      ++S
+      ++X m:=[i for i in 1..]::Stream(Integer)
+      ++X n:=[i for i in 1..]::Stream(Integer)
+      ++X f(i:Integer,j:Integer):Integer == i+j
+      ++X map(f,m,n)
+
+  Implementation ==> add
+
+    mapp:((A,B) -> C,ST A,ST B) -> ST C
+    mapp(g,x,y) == delay
+      empty? x or empty? y => empty()
+      concat(g(frst x,frst y), map(g,rst x,rst y))
+
+    map(g,x,y) ==
+      explicitlyEmpty? x => empty()
+      eq?(x,rst x) => map(g(frst x,#1),y)$StreamFunctions2(B,C)
+      explicitlyEmpty? y => empty()
+      eq?(y,rst y) => map(g(#1,frst y),x)$StreamFunctions2(A,C)
+      mapp(g,x,y)
+
+@
+<<STREAM3.dotabb>>=
+"STREAM3" [color="#FF4488",href="bookvol10.4.pdf#nameddest=STREAM3"]
+"TYPE" [color="#4488FF",href="bookvol10.2.pdf#nameddest=TYPE"]
+"STREAM3" -> "TYPE"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{package STINPROD StreamInfiniteProduct}
 \pagehead{StreamInfiniteProduct}{STINPROD}
 \pagepic{ps/v104streaminfiniteproduct.ps}{STINPROD}{1.00}
@@ -74749,6 +81657,1197 @@ StreamInfiniteProduct(Coef): Exports == Implementation where
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package STTAYLOR StreamTaylorSeriesOperations}
+Problems raising a UTS to a negative integer power.
+
+The code in [[powern(rn,x)]] which raises an unnecessary error
+where no distinction between rational and integer powers are made.
+
+The fix is easy. Since the problem does not exist in SUPS we can
+just take the definition there.
+
+\pagehead{StreamTaylorSeriesOperations}{STTAYLOR}
+\pagepic{ps/v104streamtaylorseriesoperations.ps}{STTAYLOR}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package STTAYLOR StreamTaylorSeriesOperations>>=
+)abbrev package STTAYLOR StreamTaylorSeriesOperations
+++ Author: William Burge, Stephen Watt, Clifton J. Williamson
+++ Date Created: 1986
+++ Date Last Updated: 26 May 1994
+++ Basic Operations:
+++ Related Domains: Stream(A), ParadoxicalCombinatorsForStreams(A),
+++   StreamTranscendentalFunctions(A),
+++   StreamTranscendentalFunctionsNonCommutative(A)
+++ Also See:
+++ AMS Classifications:
+++ Keywords: stream, Taylor series
+++ Examples:
+++ References:
+++ Description:
+++   StreamTaylorSeriesOperations implements Taylor series arithmetic,
+++   where a Taylor series is represented by a stream of its coefficients.
+StreamTaylorSeriesOperations(A): Exports == Implementation where
+  A :        Ring
+  RN     ==> Fraction Integer
+  I      ==> Integer
+  NNI    ==> NonNegativeInteger
+  ST     ==> Stream
+  SP2    ==> StreamFunctions2
+  SP3    ==> StreamFunctions3
+  L      ==> List
+  LA     ==> List A
+  YS     ==> Y$ParadoxicalCombinatorsForStreams(A)
+  UN     ==> Union(ST A,"failed")
+  Exports ==> with
+    "+"          : (ST A,ST A) -> ST A
+      ++ a + b returns the power series sum of \spad{a} and \spad{b}:
+      ++ \spad{[a0,a1,..] + [b0,b1,..] = [a0 + b0,a1 + b1,..]}
+    "-"          : (ST A,ST A) -> ST A
+      ++ a - b returns the power series difference of \spad{a} and
+      ++ \spad{b}: \spad{[a0,a1,..] - [b0,b1,..] = [a0 - b0,a1 - b1,..]}
+    "-"          : ST A -> ST A
+      ++ - a returns the power series negative of \spad{a}:
+      ++ \spad{- [a0,a1,...] = [- a0,- a1,...]}
+    "*"          : (ST A,ST A) -> ST A
+      ++ a * b returns the power series (Cauchy) product of \spad{a} and b:
+      ++ \spad{[a0,a1,...] * [b0,b1,...] = [c0,c1,...]} where
+      ++ \spad{ck = sum(i + j = k,ai * bk)}.
+    "*"          : (A,ST A) -> ST A
+      ++ r * a returns the power series scalar multiplication of r by \spad{a}:
+      ++ \spad{r * [a0,a1,...] = [r * a0,r * a1,...]}
+    "*"          : (ST A,A) -> ST A
+      ++ a * r returns the power series scalar multiplication of \spad{a} by r:
+      ++ \spad{[a0,a1,...] * r = [a0 * r,a1 * r,...]}
+    "exquo"      : (ST A,ST A) -> Union(ST A,"failed")
+      ++ exquo(a,b) returns the power series quotient of \spad{a} by b,
+      ++ if the quotient exists, and "failed" otherwise
+    "/"          : (ST A,ST A) -> ST A
+      ++ a / b returns the power series quotient of \spad{a} by b.
+      ++ An error message is returned if \spad{b} is not invertible.
+      ++ This function is used in fixed point computations.
+    recip        : ST A -> UN
+      ++ recip(a) returns the power series reciprocal of \spad{a}, or
+      ++ "failed" if not possible.
+    monom        : (A,I) -> ST A
+      ++ monom(deg,coef) is a monomial of degree deg with coefficient
+      ++ coef.
+    integers     : I -> ST I
+      ++ integers(n) returns \spad{[n,n+1,n+2,...]}.
+    oddintegers  : I -> ST I
+      ++ oddintegers(n) returns \spad{[n,n+2,n+4,...]}.
+    int          : A -> ST A
+      ++ int(r) returns [r,r+1,r+2,...], where r is a ring element.
+    mapmult      : (ST A,ST A) -> ST A
+      ++ mapmult([a0,a1,..],[b0,b1,..])
+      ++ returns \spad{[a0*b0,a1*b1,..]}.
+    deriv        : ST A -> ST A
+      ++ deriv(a) returns the derivative of the power series with
+      ++ respect to the power series variable. Thus
+      ++ \spad{deriv([a0,a1,a2,...])} returns \spad{[a1,2 a2,3 a3,...]}.
+    gderiv       : (I -> A,ST A)  -> ST A
+      ++ gderiv(f,[a0,a1,a2,..]) returns
+      ++ \spad{[f(0)*a0,f(1)*a1,f(2)*a2,..]}.
+    coerce       : A -> ST A
+      ++ coerce(r) converts a ring element r to a stream with one element.
+    eval         : (ST A,A) -> ST A
+      ++ eval(a,r) returns a stream of partial sums of the power series
+      ++ \spad{a} evaluated at the power series variable equal to r.
+    compose      : (ST A,ST A) -> ST A
+      ++ compose(a,b) composes the power series \spad{a} with
+      ++ the power series b.
+    lagrange     : ST A -> ST A
+      ++ lagrange(g) produces the power series for f where f is
+      ++ implicitly defined as \spad{f(z) = z*g(f(z))}.
+    revert       : ST A -> ST A
+      ++ revert(a) computes the inverse of a power series \spad{a}
+      ++ with respect to composition.
+      ++ the series should have constant coefficient 0 and first
+      ++ order coefficient 1.
+    addiag       : ST ST A -> ST A
+      ++ addiag(x) performs diagonal addition of a stream of streams. if x =
+      ++ \spad{[[a<0,0>,a<0,1>,..],[a<1,0>,a<1,1>,..],[a<2,0>,a<2,1>,..],..]}
+      ++ and \spad{addiag(x) = [b<0,b<1>,...], then b<k> = sum(i+j=k,a<i,j>)}.
+    lambert      : ST A -> ST A
+      ++ lambert(st) computes \spad{f(x) + f(x**2) + f(x**3) + ...}
+      ++ if st is a stream representing \spad{f(x)}.
+      ++ This function is used for computing infinite products.
+      ++ If \spad{f(x)} is a power series with constant coefficient 1 then
+      ++ \spad{prod(f(x**n),n = 1..infinity) = exp(lambert(log(f(x))))}.
+    oddlambert   : ST A -> ST A
+      ++ oddlambert(st) computes \spad{f(x) + f(x**3) + f(x**5) + ...}
+      ++ if st is a stream representing \spad{f(x)}.
+      ++ This function is used for computing infinite products.
+      ++ If f(x) is a power series with constant coefficient 1 then
+      ++ \spad{prod(f(x**(2*n-1)),n=1..infinity) = exp(oddlambert(log(f(x))))}.
+    evenlambert  : ST A -> ST A
+      ++ evenlambert(st) computes \spad{f(x**2) + f(x**4) + f(x**6) + ...}
+      ++ if st is a stream representing \spad{f(x)}.
+      ++ This function is used for computing infinite products.
+      ++ If \spad{f(x)} is a power series with constant coefficient 1, then
+      ++ \spad{prod(f(x**(2*n)),n=1..infinity) = exp(evenlambert(log(f(x))))}.
+    generalLambert : (ST A,I,I) -> ST A
+      ++ generalLambert(f(x),a,d) returns
+      ++ \spad{f(x**a) + f(x**(a + d)) + f(x**(a + 2 d)) + ...}.
+      ++ \spad{f(x)} should have zero constant
+      ++ coefficient and \spad{a} and d should be positive.
+    multisect    : (I,I,ST A) -> ST A
+      ++ multisect(a,b,st)
+      ++ selects the coefficients of \spad{x**((a+b)*n+a)},
+      ++ and changes them to \spad{x**n}.
+    invmultisect : (I,I,ST A) -> ST A
+      ++ invmultisect(a,b,st) substitutes \spad{x**((a+b)*n)} for \spad{x**n}
+      ++ and multiplies by \spad{x**b}.
+    if A has Algebra RN then
+      integrate  : (A,ST A) -> ST A
+        ++ integrate(r,a) returns the integral of the power series \spad{a}
+        ++ with respect to the power series variableintegration where
+        ++ r denotes the constant of integration. Thus
+        ++ \spad{integrate(a,[a0,a1,a2,...]) = [a,a0,a1/2,a2/3,...]}.
+      lazyIntegrate  : (A,() -> ST A) -> ST A
+        ++ lazyIntegrate(r,f) is a local function
+        ++ used for fixed point computations.
+      nlde       : ST ST A -> ST A
+        ++ nlde(u) solves a
+        ++ first order non-linear differential equation described by u of the
+        ++ form \spad{[[b<0,0>,b<0,1>,...],[b<1,0>,b<1,1>,.],...]}.
+        ++ the differential equation has the form
+        ++ \spad{y' = sum(i=0 to infinity,j=0 to infinity,b<i,j>*(x**i)*(y**j))}.
+      powern : (RN,ST A) -> ST A
+        ++ powern(r,f) raises power series f to the power r.
+    if A has Field then
+      mapdiv     : (ST A,ST A) -> ST A
+        ++ mapdiv([a0,a1,..],[b0,b1,..]) returns
+        ++ \spad{[a0/b0,a1/b1,..]}.
+      lazyGintegrate : (I -> A,A,() -> ST A) -> ST A
+        ++ lazyGintegrate(f,r,g) is used for fixed point computations.
+      power      : (A,ST A) -> ST A
+        ++ power(a,f) returns the power series f raised to the power \spad{a}.
+
+  Implementation ==> add
+
+--% definitions
+
+    zro: () -> ST A
+    -- returns a zero power series
+    zro() == empty()$ST(A)
+
+--% arithmetic
+
+    x + y == delay
+      empty? y => x
+      empty? x => y
+      eq?(x,rst x) => map(frst x + #1,y)
+      eq?(y,rst y) => map(frst y + #1,x)
+      concat(frst x + frst y,rst x + rst y)
+
+    x - y == delay
+      empty? y => x
+      empty? x => -y
+      eq?(x,rst x) => map(frst x - #1,y)
+      eq?(y,rst y) => map(#1 - frst y,x)
+      concat(frst x - frst y,rst x - rst y)
+
+    -y == map(_-#1,y)
+
+    (x:ST A) * (y:ST A) == delay
+      empty? y => zro()
+      empty? x => zro()
+      concat(frst x * frst y,frst x * rst y + rst x * y)
+
+    (s:A) * (x:ST A) ==
+      zero? s => zro()
+      map(s * #1,x)
+
+    (x:ST A) * (s:A) ==
+      zero? s => zro()
+      map(#1 * s,x)
+
+    iDiv: (ST A,ST A,A) -> ST A
+    iDiv(x,y,ry0) == delay
+      empty? x => empty()
+      c0 := frst x * ry0
+      concat(c0,iDiv(rst x - c0 * rst y,y,ry0))
+
+    x exquo y ==
+      for n in 1.. repeat
+        n > 1000 => return "failed"
+        empty? y => return "failed"
+        empty? x => return empty()
+        frst y = 0 =>
+          frst x = 0 => (x := rst x; y := rst y)
+          return "failed"
+        leave "first entry in y is non-zero"
+      (ry0 := recip frst y) case "failed" => "failed"
+      empty? rst y => map(#1 * (ry0 :: A),x)
+      iDiv(x,y,ry0 :: A)
+
+    (x:ST A) / (y:ST A) == delay
+      empty? y => error "/: division by zero"
+      empty? x => empty()
+      (ry0 := recip frst y) case "failed" =>
+        error "/: second argument is not invertible"
+      empty? rst y => map(#1 * (ry0 :: A),x)
+      iDiv(x,y,ry0 :: A)
+
+    recip x ==
+      empty? x => "failed"
+      rh1 := recip frst x
+      rh1 case "failed" => "failed"
+      rh := rh1 :: A
+      delay
+        concat(rh,iDiv(- rh * rst x,x,rh))
+
+--% coefficients
+
+    rp: (I,A) -> L A
+    -- rp(z,s) is a list of length z each of whose entries is s.
+    rp(z,s) ==
+      z <= 0 => empty()
+      concat(s,rp(z-1,s))
+
+    rpSt: (I,A) -> ST A
+    -- rpSt(z,s) is a stream of length z each of whose entries is s.
+    rpSt(z,s) == delay
+      z <= 0 => empty()
+      concat(s,rpSt(z-1,s))
+
+    monom(s,z) ==
+      z < 0 => error "monom: cannot create monomial of negative degree"
+      concat(rpSt(z,0),concat(s,zro()))
+
+--% some streams of integers
+    nnintegers: NNI -> ST NNI
+    nnintegers zz == generate(#1 + 1,zz)
+    integers z == generate(#1 + 1,z)
+    oddintegers z == generate(#1 + 2,z)
+    int s == generate(#1 + 1,s)
+
+--% derivatives
+
+    mapmult(x,y) == delay
+      empty? y => zro()
+      empty? x => zro()
+      concat(frst x * frst y,mapmult(rst x,rst y))
+
+    deriv x ==
+      empty? x => zro()
+      mapmult(int 1,rest x)
+
+    gderiv(f,x) ==
+      empty? x => zro()
+      mapmult(map(f,integers 0)$SP2(I,A),x)
+
+--% coercions
+
+    coerce(s:A) ==
+      zero? s => zro()
+      concat(s,zro())
+
+--% evaluations and compositions
+
+    eval(x,at) == scan(0,#1 + #2,mapmult(x,generate(at * #1,1)))$SP2(A,A)
+
+    compose(x,y) == delay
+      empty? y => concat(frst x,zro())
+      not zero? frst y =>
+        error "compose: 2nd argument should have 0 constant coefficient"
+      empty? x => zro()
+      concat(frst x,compose(rst x,y) * rst(y))
+
+--% reversion
+
+    lagrangere:(ST A,ST A) -> ST A
+    lagrangere(x,c) == delay(concat(0,compose(x,c)))
+    lagrange x == YS(lagrangere(x,#1))
+
+    revert x ==
+      empty? x => error "revert should start 0,1,..."
+      zero? frst x =>
+        empty? rst x => error "revert: should start 0,1,..."
+--        one? frst rst x => lagrange(recip(rst x) :: (ST A))
+        (frst rst x) = 1 => lagrange(recip(rst x) :: (ST A))
+      error "revert:should start 0,1,..."
+
+--% lambert functions
+
+    addiag(ststa:ST ST A) == delay
+      empty? ststa => zro()
+      empty? frst ststa => concat(0,addiag rst ststa)
+      concat(frst(frst ststa),rst(frst ststa) + addiag(rst ststa))
+
+-- lambert operates on a series +/[a[i]x**i for i in 1..] , and produces
+-- the series +/[a[i](x**i/(1-x**i)) for i in 1..] i.e. forms the
+-- coefficients A[n] which is the sum of a[i] for all divisors i of n
+-- (including 1 and n)
+
+    rptg1:(I,A) -> ST A
+    --                               ---------
+    -- returns the repeating stream [s,0,...,0]; (there are z zeroes)
+    rptg1(z,s) == repeating concat(s,rp(z,0))
+
+    rptg2:(I,A) -> ST A
+    --                                       ---------
+    -- returns the repeating stream [0,...,0,s,0,...,0]
+    -- there are z leading zeroes and z-1 in the period
+    rptg2(z,s) == repeating concat(rp(z,0),concat(s,rp(z-1,0)))
+
+    rptg3:(I,I,I,A) -> ST A
+    rptg3(a,d,n,s) ==
+      concat(rpSt(n*(a-1),0),repeating(concat(s,rp(d*n-1,0))))
+
+    lambert x == delay
+      empty? x => zro()
+      zero? frst x =>
+        concat(0,addiag(map(rptg1,integers 0,rst x)$SP3(I,A,ST A)))
+      error "lambert:constant coefficient should be zero"
+
+    oddlambert x == delay
+      empty? x => zro()
+      zero? frst x =>
+        concat(0,addiag(map(rptg1,oddintegers 1,rst x)$SP3(I,A,ST A)))
+      error "oddlambert: constant coefficient should be zero"
+
+    evenlambert x == delay
+      empty? x => zro()
+      zero? frst x =>
+        concat(0,addiag(map(rptg2,integers 1,rst x)$SP3(I,A,ST A)))
+      error "evenlambert: constant coefficient should be zero"
+
+    generalLambert(st,a,d) == delay
+      a < 1 or d < 1 =>
+        error "generalLambert: both integer arguments must be positive"
+      empty? st => zro()
+      zero? frst st =>
+        concat(0,addiag(map(rptg3(a,d,#1,#2),_
+                 integers 1,rst st)$SP3(I,A,ST A)))
+      error "generalLambert: constant coefficient should be zero"
+
+--% misc. functions
+
+    ms: (I,I,ST A) -> ST A
+    ms(m,n,s) == delay
+      empty? s => zro()
+      zero? n => concat(frst s,ms(m,m-1,rst s))
+      ms(m,n-1,rst s)
+
+    multisect(b,a,x) == ms(a+b,0,rest(x,a :: NNI))
+
+    altn: (ST A,ST A) -> ST A
+    altn(zs,s) == delay
+      empty? s => zro()
+      concat(frst s,concat(zs,altn(zs,rst s)))
+
+    invmultisect(a,b,x) ==
+      concat(rpSt(b,0),altn(rpSt(a + b - 1,0),x))
+
+-- comps(ststa,y) forms the composition of +/b[i,j]*y**i*x**j
+-- where y is a power series in y.
+
+    cssa ==> concat$(ST ST A)
+    mapsa ==> map$SP2(ST A,ST A)
+    comps: (ST ST A,ST A) -> ST ST A
+    comps(ststa,x) == delay$(ST ST A)
+       empty? ststa => empty()$(ST ST A)
+       empty? x => cssa(frst ststa,empty()$(ST ST A))
+       cssa(frst ststa,mapsa((rst x) * #1,comps(rst ststa,x)))
+
+    if A has Algebra RN then
+      integre: (ST A,I) -> ST A
+      integre(x,n) == delay
+        empty? x => zro()
+        concat((1$I/n) * frst(x),integre(rst x,n + 1))
+
+      integ: ST A -> ST A
+      integ x == integre(x,1)
+
+      integrate(a,x) == concat(a,integ x)
+      lazyIntegrate(s,xf) == concat(s,integ(delay xf))
+
+      nldere:(ST ST A,ST A) -> ST A
+      nldere(lslsa,c) == lazyIntegrate(0,addiag(comps(lslsa,c)))
+      nlde lslsa == YS(nldere(lslsa,#1))
+
+      RATPOWERS : Boolean := A has "**": (A,RN) -> A
+
+      smult: (RN,ST A) -> ST A
+      smult(rn,x) == map(rn * #1,x)
+      powerrn:(RN,ST A,ST A) -> ST A
+      powerrn(rn,x,c) == delay
+        concat(1,integ(smult(rn + 1,c * deriv x)) - rst x * c)
+      powern(rn,x) ==
+        order : I := 0
+        for n in 0.. repeat
+          empty? x => return zro()
+          not zero? frst x => (order := n; leave x)
+          x := rst x
+          n = 1000 =>
+            error "**: series with many leading zero coefficients"
+        (ord := (order exquo denom(rn))) case "failed" =>
+          error "**: rational power does not exist"
+        co := frst x
+        (invCo := recip co) case "failed" =>
+           error "** rational power of coefficient undefined"
+-- This error message is misleading, isn't it? see sups.spad/cRationalPower
+        power :=
+--          one? co => YS(powerrn(rn,x,#1))
+          (co = 1) => YS(powerrn(rn,x,#1))
+          (denom rn) = 1 =>
+            not negative?(num := numer rn) => 
+-- It seems that this cannot happen, but I don't know why
+              (co**num::NNI) * YS(powerrn(rn,(invCo :: A) * x,#1))
+            (invCo :: A)**((-num)::NNI) * YS(powerrn(rn,(invCo :: A) * x,#1))
+
+          RATPOWERS => co**rn * YS(powerrn(rn,(invCo :: A) * x,#1))
+          error "** rational power of coefficient undefined"
+
+    if A has Field then
+      mapdiv(x,y) == delay
+        empty? y => error "stream division by zero"
+        empty? x => zro()
+        concat(frst x/frst y,mapdiv(rst x,rst y))
+
+      ginteg: (I -> A,ST A) -> ST A
+      ginteg(f,x) == mapdiv(x,map(f,integers 1)$SP2(I,A))
+
+      lazyGintegrate(fntoa,s,xf) == concat(s,ginteg(fntoa,delay xf))
+
+      finteg: ST A -> ST A
+      finteg x == mapdiv(x,int 1)
+      powerre: (A,ST A,ST A) -> ST A
+      powerre(s,x,c) == delay
+        empty? x => zro()
+        frst x^=1 => error "**:constant coefficient should be 1"
+        concat(frst x,finteg((s+1)*(c*deriv x))-rst x * c)
+      power(s,x) == YS(powerre(s,x,#1))
+
+@
+<<STTAYLOR.dotabb>>=
+"STTAYLOR" [color="#FF4488",href="bookvol10.4.pdf#nameddest=STTAYLOR"]
+"FIELD"  [color="#4488FF",href="bookvol10.2.pdf#nameddest=FIELD"]
+"STTAYLOR" -> "FIELD"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package STTF StreamTranscendentalFunctions}
+\pagehead{StreamTranscendentalFunctions}{STTF}
+\pagepic{ps/v104streamtranscendentalfunctions.ps}{STTF}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package STTF StreamTranscendentalFunctions>>=
+)abbrev package STTF StreamTranscendentalFunctions
+++ Author: William Burge, Clifton J. Williamson
+++ Date Created: 1986
+++ Date Last Updated: 6 March 1995
+++ Basic Operations:
+++ Related Domains:
+++ Also See:
+++ AMS Classifications:
+++ Keywords: Taylor series, elementary function, transcendental function
+++ Examples:
+++ References:
+++ Description:
+++   StreamTranscendentalFunctions implements transcendental functions on
+++   Taylor series, where a Taylor series is represented by a stream of
+++   its coefficients.
+StreamTranscendentalFunctions(Coef): Exports == Implementation where
+  Coef : Algebra Fraction Integer
+  L   ==> List
+  I   ==> Integer
+  RN  ==> Fraction Integer
+  SG  ==> String
+  ST  ==> Stream Coef
+  STT ==> StreamTaylorSeriesOperations Coef
+  YS  ==> Y$ParadoxicalCombinatorsForStreams(Coef)
+
+  Exports ==> with
+--% Exponentials and Logarithms
+    exp     : ST -> ST
+      ++ exp(st) computes the exponential of a power series st.
+    log     : ST -> ST
+      ++ log(st) computes the log of a power series.
+    "**"    : (ST,ST) -> ST
+      ++ st1 ** st2 computes the power of a power series st1 by another
+      ++ power series st2.
+
+--% TrigonometricFunctionCategory
+    sincos  : ST -> Record(sin:ST, cos:ST)
+      ++ sincos(st) returns a record containing the sine and cosine
+      ++ of a power series st.
+    sin     : ST -> ST
+      ++ sin(st) computes sine of a power series st.
+    cos     : ST -> ST
+      ++ cos(st) computes cosine of a power series st.
+    tan     : ST -> ST
+      ++ tan(st) computes tangent of a power series st.
+    cot     : ST -> ST
+      ++ cot(st) computes cotangent of a power series st.
+    sec     : ST -> ST
+      ++ sec(st) computes secant of a power series st.
+    csc     : ST -> ST
+      ++ csc(st) computes cosecant of a power series st.
+    asin    : ST -> ST
+      ++ asin(st) computes arcsine of a power series st.
+    acos    : ST -> ST
+      ++ acos(st) computes arccosine of a power series st.
+    atan    : ST -> ST
+      ++ atan(st) computes arctangent of a power series st.
+    acot    : ST -> ST
+      ++ acot(st) computes arccotangent of a power series st.
+    asec    : ST -> ST
+      ++ asec(st) computes arcsecant of a power series st.
+    acsc    : ST -> ST
+      ++ acsc(st) computes arccosecant of a power series st.
+
+--% HyperbloicTrigonometricFunctionCategory
+    sinhcosh: ST -> Record(sinh:ST, cosh:ST)
+      ++ sinhcosh(st) returns a record containing
+      ++ the hyperbolic sine and cosine
+      ++ of a power series st.
+    sinh    : ST -> ST
+      ++ sinh(st) computes the hyperbolic sine of a power series st.
+    cosh    : ST -> ST
+      ++ cosh(st) computes the hyperbolic cosine of a power series st.
+    tanh    : ST -> ST
+      ++ tanh(st) computes the hyperbolic tangent of a power series st.
+    coth    : ST -> ST
+      ++ coth(st) computes the hyperbolic cotangent of a power series st.
+    sech    : ST -> ST
+      ++ sech(st) computes the hyperbolic secant of a power series st.
+    csch    : ST -> ST
+      ++ csch(st) computes the hyperbolic cosecant of a power series st.
+    asinh   : ST -> ST
+      ++ asinh(st) computes the inverse hyperbolic sine of a power series st.
+    acosh   : ST -> ST
+      ++ acosh(st) computes the inverse hyperbolic cosine
+      ++ of a power series st.
+    atanh   : ST -> ST
+      ++ atanh(st) computes the inverse hyperbolic tangent
+      ++ of a power series st.
+    acoth   : ST -> ST
+      ++ acoth(st) computes the inverse hyperbolic
+      ++ cotangent of a power series st.
+    asech   : ST -> ST
+      ++ asech(st) computes the inverse hyperbolic secant of a
+      ++ power series st.
+    acsch   : ST -> ST
+      ++ acsch(st) computes the inverse hyperbolic
+      ++ cosecant of a power series st.
+
+  Implementation ==> add
+    import StreamTaylorSeriesOperations Coef
+
+    TRANSFCN : Boolean := Coef has TranscendentalFunctionCategory
+
+--% Error Reporting
+
+    TRCONST : SG := "series expansion involves transcendental constants"
+    NPOWERS : SG := "series expansion has terms of negative degree"
+    FPOWERS : SG := "series expansion has terms of fractional degree"
+    MAYFPOW : SG := "series expansion may have terms of fractional degree"
+    LOGS : SG := "series expansion has logarithmic term"
+    NPOWLOG : SG :=
+       "series expansion has terms of negative degree or logarithmic term"
+    FPOWLOG : SG :=
+       "series expansion has terms of fractional degree or logarithmic term"
+    NOTINV : SG := "leading coefficient not invertible"
+
+--% Exponentials and Logarithms
+
+    expre:(Coef,ST,ST) -> ST
+    expre(r,e,dx) == lazyIntegrate(r,e*dx)
+
+    exp z ==
+      empty? z => 1 :: ST
+      (coef := frst z) = 0 => YS expre(1,#1,deriv z)
+      TRANSFCN => YS expre(exp coef,#1,deriv z)
+      error concat("exp: ",TRCONST)
+
+    log z ==
+      empty? z => error "log: constant coefficient should not be 0"
+      (coef := frst z) = 0 => error "log: constant coefficient should not be 0"
+      coef = 1 => lazyIntegrate(0,deriv z/z)
+      TRANSFCN => lazyIntegrate(log coef,deriv z/z)
+      error concat("log: ",TRCONST)
+
+    z1:ST ** z2:ST == exp(z2 * log z1)
+
+--% Trigonometric Functions
+
+    sincosre:(Coef,Coef,L ST,ST,Coef) -> L ST
+    sincosre(rs,rc,sc,dx,sign) ==
+      [lazyIntegrate(rs,(second sc)*dx),lazyIntegrate(rc,sign*(first sc)*dx)]
+
+    -- When the compiler had difficulties with the above definition,
+    -- I did the following to help it:
+
+    -- sincosre:(Coef,Coef,L ST,ST,Coef) -> L ST
+    -- sincosre(rs,rc,sc,dx,sign) ==
+      -- st1 : ST := (second sc) * dx
+      -- st2 : ST := (first sc) * dx
+      -- st2 := sign * st2
+      -- [lazyIntegrate(rs,st1),lazyIntegrate(rc,st2)]
+
+    sincos z ==
+      empty? z => [0 :: ST,1 :: ST]
+      l :=
+        (coef := frst z) = 0 => YS(sincosre(0,1,#1,deriv z,-1),2)
+        TRANSFCN => YS(sincosre(sin coef,cos coef,#1,deriv z,-1),2)
+        error concat("sincos: ",TRCONST)
+      [first l,second l]
+
+    sin z == sincos(z).sin
+    cos z == sincos(z).cos
+
+    tanre:(Coef,ST,ST,Coef) -> ST
+    tanre(r,t,dx,sign) == lazyIntegrate(r,((1 :: ST) + sign*t*t)*dx)
+
+    -- When the compiler had difficulties with the above definition,
+    -- I did the following to help it:
+
+    -- tanre:(Coef,ST,ST,Coef) -> ST
+    -- tanre(r,t,dx,sign) ==
+      -- st1 : ST := t * t
+      -- st1 := sign * st1
+      -- st2 : ST := 1 :: ST
+      -- st1 := st2 + st1
+      -- st1 := st1 * dx
+      -- lazyIntegrate(r,st1)
+
+    tan z ==
+      empty? z => 0 :: ST
+      (coef := frst z) = 0 => YS tanre(0,#1,deriv z,1)
+      TRANSFCN => YS tanre(tan coef,#1,deriv z,1)
+      error concat("tan: ",TRCONST)
+
+    cotre:(Coef,ST,ST) -> ST
+    cotre(r,t,dx) == lazyIntegrate(r,-((1 :: ST) + t*t)*dx)
+
+    -- When the compiler had difficulties with the above definition,
+    -- I did the following to help it:
+
+    -- cotre:(Coef,ST,ST) -> ST
+    -- cotre(r,t,dx) ==
+      -- st1 : ST := t * t
+      -- st2 : ST := 1 :: ST
+      -- st1 := st2 + st1
+      -- st1 := st1 * dx
+      -- st1 := -st1
+      -- lazyIntegrate(r,st1)
+
+    cot z ==
+      empty? z => error "cot: cot(0) is undefined"
+      (coef := frst z) = 0 => error concat("cot: ",NPOWERS)
+      TRANSFCN => YS cotre(cot coef,#1,deriv z)
+      error concat("cot: ",TRCONST)
+
+    sec z ==
+      empty? z => 1 :: ST
+      frst z = 0 => recip(cos z) :: ST
+      TRANSFCN =>
+        cosz := cos z
+        first cosz = 0 => error concat("sec: ",NPOWERS)
+        recip(cosz) :: ST
+      error concat("sec: ",TRCONST)
+
+    csc z ==
+      empty? z => error "csc: csc(0) is undefined"
+      TRANSFCN =>
+        sinz := sin z
+        first sinz = 0 => error concat("csc: ",NPOWERS)
+        recip(sinz) :: ST
+      error concat("csc: ",TRCONST)
+
+    orderOrFailed : ST -> Union(I,"failed")
+    orderOrFailed x ==
+    -- returns the order of x or "failed"
+    -- if -1 is returned, the series is identically zero
+      for n in 0..1000 repeat
+        empty? x => return -1
+        not zero? frst x => return n :: I
+        x := rst x
+      "failed"
+
+    asin z ==
+      empty? z => 0 :: ST
+      (coef := frst z) = 0 =>
+        integrate(0,powern(-1/2,(1 :: ST) - z*z) * (deriv z))
+      TRANSFCN =>
+        coef = 1 or coef = -1 =>
+          x := (1 :: ST) - z*z
+          -- compute order of 'x'
+          (ord := orderOrFailed x) case "failed" =>
+            error concat("asin: ",MAYFPOW)
+          (order := ord :: I) = -1 => return asin(coef) :: ST
+          odd? order => error concat("asin: ",FPOWERS)
+          squirt := powern(1/2,x)
+          (quot := (deriv z) exquo squirt) case "failed" =>
+             error concat("asin: ",NOTINV)
+          integrate(asin coef,quot :: ST)
+        integrate(asin coef,powern(-1/2,(1 :: ST) - z*z) * (deriv z))
+      error concat("asin: ",TRCONST)
+
+    acos z ==
+      empty? z =>
+        TRANSFCN => acos(0)$Coef :: ST
+        error concat("acos: ",TRCONST)
+      TRANSFCN =>
+        coef := frst z
+        coef = 1 or coef = -1 =>
+          x := (1 :: ST) - z*z
+          -- compute order of 'x'
+          (ord := orderOrFailed x) case "failed" =>
+            error concat("acos: ",MAYFPOW)
+          (order := ord :: I) = -1 => return acos(coef) :: ST
+          odd? order => error concat("acos: ",FPOWERS)
+          squirt := powern(1/2,x)
+          (quot := (-deriv z) exquo squirt) case "failed" =>
+             error concat("acos: ",NOTINV)
+          integrate(acos coef,quot :: ST)
+        integrate(acos coef,-powern(-1/2,(1 :: ST) - z*z) * (deriv z))
+      error concat("acos: ",TRCONST)
+
+    atan z ==
+      empty? z => 0 :: ST
+      (coef := frst z) = 0 =>
+        integrate(0,(recip((1 :: ST) + z*z) :: ST) * (deriv z))
+      TRANSFCN =>
+        (y := recip((1 :: ST) + z*z)) case "failed" =>
+          error concat("atan: ",LOGS)
+        integrate(atan coef,(y :: ST) * (deriv z))
+      error concat("atan: ",TRCONST)
+
+    acot z ==
+      empty? z =>
+        TRANSFCN => acot(0)$Coef :: ST
+        error concat("acot: ",TRCONST)
+      TRANSFCN =>
+        (y := recip((1 :: ST) + z*z)) case "failed" =>
+          error concat("acot: ",LOGS)
+        integrate(acot frst z,-(y :: ST) * (deriv z))
+      error concat("acot: ",TRCONST)
+
+    asec z ==
+      empty? z => error "asec: constant coefficient should not be 0"
+      TRANSFCN =>
+        (coef := frst z) = 0 =>
+          error "asec: constant coefficient should not be 0"
+        coef = 1 or coef = -1 =>
+          x := z*z - (1 :: ST)
+          -- compute order of 'x'
+          (ord := orderOrFailed x) case "failed" =>
+            error concat("asec: ",MAYFPOW)
+          (order := ord :: I) = -1 => return asec(coef) :: ST
+          odd? order => error concat("asec: ",FPOWERS)
+          squirt := powern(1/2,x)
+          (quot := (deriv z) exquo squirt) case "failed" =>
+            error concat("asec: ",NOTINV)
+          (quot2 := (quot :: ST) exquo z) case "failed" =>
+            error concat("asec: ",NOTINV)
+          integrate(asec coef,quot2 :: ST)
+        integrate(asec coef,(powern(-1/2,z*z-(1::ST))*(deriv z)) / z)
+      error concat("asec: ",TRCONST)
+
+    acsc z ==
+      empty? z => error "acsc: constant coefficient should not be zero"
+      TRANSFCN =>
+        (coef := frst z) = 0 =>
+          error "acsc: constant coefficient should not be zero"
+        coef = 1 or coef = -1 =>
+          x := z*z - (1 :: ST)
+          -- compute order of 'x'
+          (ord := orderOrFailed x) case "failed" =>
+            error concat("acsc: ",MAYFPOW)
+          (order := ord :: I) = -1 => return acsc(coef) :: ST
+          odd? order => error concat("acsc: ",FPOWERS)
+          squirt := powern(1/2,x)
+          (quot := (-deriv z) exquo squirt) case "failed" =>
+            error concat("acsc: ",NOTINV)
+          (quot2 := (quot :: ST) exquo z) case "failed" =>
+            error concat("acsc: ",NOTINV)
+          integrate(acsc coef,quot2 :: ST)
+        integrate(acsc coef,-(powern(-1/2,z*z-(1::ST))*(deriv z)) / z)
+      error concat("acsc: ",TRCONST)
+
+--% Hyperbolic Trigonometric Functions
+
+    sinhcosh z ==
+      empty? z => [0 :: ST,1 :: ST]
+      l :=
+        (coef := frst z) = 0 => YS(sincosre(0,1,#1,deriv z,1),2)
+        TRANSFCN => YS(sincosre(sinh coef,cosh coef,#1,deriv z,1),2)
+        error concat("sinhcosh: ",TRCONST)
+      [first l,second l]
+
+    sinh z == sinhcosh(z).sinh
+    cosh z == sinhcosh(z).cosh
+
+    tanh z ==
+      empty? z => 0 :: ST
+      (coef := frst z) = 0 => YS tanre(0,#1,deriv z,-1)
+      TRANSFCN => YS tanre(tanh coef,#1,deriv z,-1)
+      error concat("tanh: ",TRCONST)
+
+    coth z ==
+      tanhz := tanh z
+      empty? tanhz => error "coth: coth(0) is undefined"
+      (frst tanhz) = 0 => error concat("coth: ",NPOWERS)
+      recip(tanhz) :: ST
+
+    sech z ==
+      coshz := cosh z
+      (empty? coshz) or (frst coshz = 0) => error concat("sech: ",NPOWERS)
+      recip(coshz) :: ST
+
+    csch z ==
+      sinhz := sinh z
+      (empty? sinhz) or (frst sinhz = 0) => error concat("csch: ",NPOWERS)
+      recip(sinhz) :: ST
+
+    asinh z ==
+      empty? z => 0 :: ST
+      (coef := frst z) = 0 => log(z + powern(1/2,(1 :: ST) + z*z))
+      TRANSFCN =>
+        x := (1 :: ST) + z*z
+        -- compute order of 'x', in case coefficient(z,0) = +- %i
+        (ord := orderOrFailed x) case "failed" =>
+          error concat("asinh: ",MAYFPOW)
+        (order := ord :: I) = -1 => return asinh(coef) :: ST
+        odd? order => error concat("asinh: ",FPOWERS)
+        -- the argument to 'log' must have a non-zero constant term
+        log(z + powern(1/2,x))
+      error concat("asinh: ",TRCONST)
+
+    acosh z ==
+      empty? z =>
+        TRANSFCN => acosh(0)$Coef :: ST
+        error concat("acosh: ",TRCONST)
+      TRANSFCN =>
+        coef := frst z
+        coef = 1 or coef = -1 =>
+          x := z*z - (1 :: ST)
+          -- compute order of 'x'
+          (ord := orderOrFailed x) case "failed" =>
+            error concat("acosh: ",MAYFPOW)
+          (order := ord :: I) = -1 => return acosh(coef) :: ST
+          odd? order => error concat("acosh: ",FPOWERS)
+          -- the argument to 'log' must have a non-zero constant term
+          log(z + powern(1/2,x))
+        log(z + powern(1/2,z*z - (1 :: ST)))
+      error concat("acosh: ",TRCONST)
+
+    atanh z ==
+      empty? z => 0 :: ST
+      (coef := frst z) = 0 =>
+        (inv(2::RN)::Coef) * log(((1 :: ST) + z)/((1 :: ST) - z))
+      TRANSFCN =>
+        coef = 1 or coef = -1 => error concat("atanh: ",LOGS)
+        (inv(2::RN)::Coef) * log(((1 :: ST) + z)/((1 :: ST) - z))
+      error concat("atanh: ",TRCONST)
+
+    acoth z ==
+      empty? z =>
+        TRANSFCN => acoth(0)$Coef :: ST
+        error concat("acoth: ",TRCONST)
+      TRANSFCN =>
+        frst z = 1 or frst z = -1 => error concat("acoth: ",LOGS)
+        (inv(2::RN)::Coef) * log((z + (1 :: ST))/(z - (1 :: ST)))
+      error concat("acoth: ",TRCONST)
+
+    asech z ==
+      empty? z => error "asech: asech(0) is undefined"
+      TRANSFCN =>
+        (coef := frst z) = 0 => error concat("asech: ",NPOWLOG)
+        coef = 1 or coef = -1 =>
+          x := (1 :: ST) - z*z
+          -- compute order of 'x'
+          (ord := orderOrFailed x) case "failed" =>
+            error concat("asech: ",MAYFPOW)
+          (order := ord :: I) = -1 => return asech(coef) :: ST
+          odd? order => error concat("asech: ",FPOWERS)
+          log(((1 :: ST) + powern(1/2,x))/z)
+        log(((1 :: ST) + powern(1/2,(1 :: ST) - z*z))/z)
+      error concat("asech: ",TRCONST)
+
+    acsch z ==
+      empty? z => error "acsch: acsch(0) is undefined"
+      TRANSFCN =>
+        frst z = 0 => error concat("acsch: ",NPOWLOG)
+        x := z*z + (1 :: ST)
+        -- compute order of 'x'
+        (ord := orderOrFailed x) case "failed" =>
+          error concat("acsc: ",MAYFPOW)
+        (order := ord :: I) = -1 => return acsch(frst z) :: ST
+        odd? order => error concat("acsch: ",FPOWERS)
+        log(((1 :: ST) + powern(1/2,x))/z)
+      error concat("acsch: ",TRCONST)
+
+@
+<<STTF.dotabb>>=
+"STTF" [color="#FF4488",href="bookvol10.4.pdf#nameddest=STTF"]
+"STRING" [color="#88FF44",href="bookvol10.3.pdf#nameddest=STRING"]
+"STTF" -> "STRING"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package STTFNC StreamTranscendentalFunctionsNonCommutative}
+\pagehead{StreamTranscendentalFunctionsNonCommutative}{STTFNC}
+\pagepic{ps/v104streamtranscendentalfunctionsnoncommutative.ps}{STTFNC}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package STTFNC StreamTranscendentalFunctionsNonCommutative>>=
+)abbrev package STTFNC StreamTranscendentalFunctionsNonCommutative
+++ Author: Clifton J. Williamson
+++ Date Created: 26 May 1994
+++ Date Last Updated: 26 May 1994
+++ Basic Operations:
+++ Related Domains:
+++ Also See:
+++ AMS Classifications:
+++ Keywords: Taylor series, transcendental function, non-commutative
+++ Examples:
+++ References:
+++ Description:
+++   StreamTranscendentalFunctionsNonCommutative implements transcendental
+++   functions on Taylor series over a non-commutative ring, where a Taylor
+++   series is represented by a stream of its coefficients.
+StreamTranscendentalFunctionsNonCommutative(Coef): _
+         Exports == Implementation where
+  Coef :   Algebra Fraction Integer
+  I    ==> Integer
+  SG   ==> String
+  ST   ==> Stream Coef
+  STTF ==> StreamTranscendentalFunctions Coef
+
+  Exports ==> with
+--% Exponentials and Logarithms
+    exp     : ST -> ST
+      ++ exp(st) computes the exponential of a power series st.
+    log     : ST -> ST
+      ++ log(st) computes the log of a power series.
+    "**"    : (ST,ST) -> ST
+      ++ st1 ** st2 computes the power of a power series st1 by another
+      ++ power series st2.
+
+--% TrigonometricFunctionCategory
+    sin     : ST -> ST
+      ++ sin(st) computes sine of a power series st.
+    cos     : ST -> ST
+      ++ cos(st) computes cosine of a power series st.
+    tan     : ST -> ST
+      ++ tan(st) computes tangent of a power series st.
+    cot     : ST -> ST
+      ++ cot(st) computes cotangent of a power series st.
+    sec     : ST -> ST
+      ++ sec(st) computes secant of a power series st.
+    csc     : ST -> ST
+      ++ csc(st) computes cosecant of a power series st.
+    asin    : ST -> ST
+      ++ asin(st) computes arcsine of a power series st.
+    acos    : ST -> ST
+      ++ acos(st) computes arccosine of a power series st.
+    atan    : ST -> ST
+      ++ atan(st) computes arctangent of a power series st.
+    acot    : ST -> ST
+      ++ acot(st) computes arccotangent of a power series st.
+    asec    : ST -> ST
+      ++ asec(st) computes arcsecant of a power series st.
+    acsc    : ST -> ST
+      ++ acsc(st) computes arccosecant of a power series st.
+
+--% HyperbloicTrigonometricFunctionCategory
+    sinh    : ST -> ST
+      ++ sinh(st) computes the hyperbolic sine of a power series st.
+    cosh    : ST -> ST
+      ++ cosh(st) computes the hyperbolic cosine of a power series st.
+    tanh    : ST -> ST
+      ++ tanh(st) computes the hyperbolic tangent of a power series st.
+    coth    : ST -> ST
+      ++ coth(st) computes the hyperbolic cotangent of a power series st.
+    sech    : ST -> ST
+      ++ sech(st) computes the hyperbolic secant of a power series st.
+    csch    : ST -> ST
+      ++ csch(st) computes the hyperbolic cosecant of a power series st.
+    asinh   : ST -> ST
+      ++ asinh(st) computes the inverse hyperbolic sine of a power series st.
+    acosh   : ST -> ST
+      ++ acosh(st) computes the inverse hyperbolic cosine
+      ++ of a power series st.
+    atanh   : ST -> ST
+      ++ atanh(st) computes the inverse hyperbolic tangent
+      ++ of a power series st.
+    acoth   : ST -> ST
+      ++ acoth(st) computes the inverse hyperbolic
+      ++ cotangent of a power series st.
+    asech   : ST -> ST
+      ++ asech(st) computes the inverse hyperbolic secant of a
+      ++ power series st.
+    acsch   : ST -> ST
+      ++ acsch(st) computes the inverse hyperbolic
+      ++ cosecant of a power series st.
+
+  Implementation ==> add
+    import StreamTaylorSeriesOperations(Coef)
+
+--% Error Reporting
+
+    ZERO    : SG := "series must have constant coefficient zero"
+    ONE     : SG := "series must have constant coefficient one"
+    NPOWERS : SG := "series expansion has terms of negative degree"
+
+--% Exponentials and Logarithms
+
+    exp z ==
+      empty? z => 1 :: ST
+      (frst z) = 0 =>
+        expx := exp(monom(1,1))$STTF
+        compose(expx,z)
+      error concat("exp: ",ZERO)
+
+    log z ==
+      empty? z => error concat("log: ",ONE)
+      (frst z) = 1 =>
+        log1PlusX := log(monom(1,0) + monom(1,1))$STTF
+        compose(log1PlusX,z - monom(1,0))
+      error concat("log: ",ONE)
+
+    (z1:ST) ** (z2:ST) == exp(log(z1) * z2)
+
+--% Trigonometric Functions
+
+    sin z ==
+      empty? z => 0 :: ST
+      (frst z) = 0 =>
+        sinx := sin(monom(1,1))$STTF
+        compose(sinx,z)
+      error concat("sin: ",ZERO)
+
+    cos z ==
+      empty? z => 1 :: ST
+      (frst z) = 0 =>
+        cosx := cos(monom(1,1))$STTF
+        compose(cosx,z)
+      error concat("cos: ",ZERO)
+
+    tan z ==
+      empty? z => 0 :: ST
+      (frst z) = 0 =>
+        tanx := tan(monom(1,1))$STTF
+        compose(tanx,z)
+      error concat("tan: ",ZERO)
+
+    cot z ==
+      empty? z => error "cot: cot(0) is undefined"
+      (frst z) = 0 => error concat("cot: ",NPOWERS)
+      error concat("cot: ",ZERO)
+
+    sec z ==
+      empty? z => 1 :: ST
+      (frst z) = 0 =>
+        secx := sec(monom(1,1))$STTF
+        compose(secx,z)
+      error concat("sec: ",ZERO)
+
+    csc z ==
+      empty? z => error "csc: csc(0) is undefined"
+      (frst z) = 0 => error concat("csc: ",NPOWERS)
+      error concat("csc: ",ZERO)
+
+    asin z ==
+      empty? z => 0 :: ST
+      (frst z) = 0 =>
+        asinx := asin(monom(1,1))$STTF
+        compose(asinx,z)
+      error concat("asin: ",ZERO)
+
+    atan z ==
+      empty? z => 0 :: ST
+      (frst z) = 0 =>
+        atanx := atan(monom(1,1))$STTF
+        compose(atanx,z)
+      error concat("atan: ",ZERO)
+
+    acos z == error "acos: acos undefined on this coefficient domain"
+    acot z == error "acot: acot undefined on this coefficient domain"
+    asec z == error "asec: asec undefined on this coefficient domain"
+    acsc z == error "acsc: acsc undefined on this coefficient domain"
+
+--% Hyperbolic Trigonometric Functions
+
+    sinh z ==
+      empty? z => 0 :: ST
+      (frst z) = 0 =>
+        sinhx := sinh(monom(1,1))$STTF
+        compose(sinhx,z)
+      error concat("sinh: ",ZERO)
+
+    cosh z ==
+      empty? z => 1 :: ST
+      (frst z) = 0 =>
+        coshx := cosh(monom(1,1))$STTF
+        compose(coshx,z)
+      error concat("cosh: ",ZERO)
+
+    tanh z ==
+      empty? z => 0 :: ST
+      (frst z) = 0 =>
+        tanhx := tanh(monom(1,1))$STTF
+        compose(tanhx,z)
+      error concat("tanh: ",ZERO)
+
+    coth z ==
+      empty? z => error "coth: coth(0) is undefined"
+      (frst z) = 0 => error concat("coth: ",NPOWERS)
+      error concat("coth: ",ZERO)
+
+    sech z ==
+      empty? z => 1 :: ST
+      (frst z) = 0 =>
+        sechx := sech(monom(1,1))$STTF
+        compose(sechx,z)
+      error concat("sech: ",ZERO)
+
+    csch z ==
+      empty? z => error "csch: csch(0) is undefined"
+      (frst z) = 0 => error concat("csch: ",NPOWERS)
+      error concat("csch: ",ZERO)
+
+    asinh z ==
+      empty? z => 0 :: ST
+      (frst z) = 0 =>
+        asinhx := asinh(monom(1,1))$STTF
+        compose(asinhx,z)
+      error concat("asinh: ",ZERO)
+
+    atanh z ==
+      empty? z => 0 :: ST
+      (frst z) = 0 =>
+        atanhx := atanh(monom(1,1))$STTF
+        compose(atanhx,z)
+      error concat("atanh: ",ZERO)
+
+    acosh z == error "acosh: acosh undefined on this coefficient domain"
+    acoth z == error "acoth: acoth undefined on this coefficient domain"
+    asech z == error "asech: asech undefined on this coefficient domain"
+    acsch z == error "acsch: acsch undefined on this coefficient domain"
+
+@
+<<STTFNC.dotabb>>=
+"STTFNC" [color="#FF4488",href="bookvol10.4.pdf#nameddest=STTFNC"]
+"STRING" [color="#88FF44",href="bookvol10.3.pdf#nameddest=STRING"]
+"STTFNC" -> "STRING"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{package SCPKG StructuralConstantsPackage}
 \pagehead{StructuralConstantsPackage}{SCPKG}
 \pagepic{ps/v104structuralconstantspackage.ps}{SCPKG}{1.00}
@@ -74901,6 +83000,387 @@ must be linear polynomials in the generators"
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package SHP SturmHabichtPackage}
+\pagehead{SturmHabichtPackage}{SHP}
+\pagepic{ps/v104sturmhabichtpackage.ps}{SHP}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package SHP SturmHabichtPackage>>=
+)abbrev package SHP SturmHabichtPackage
+++ Author: Lalo Gonzalez-Vega
+++ Date Created: 1994?
+++ Date Last Updated: 30 January 1996
+++ Basic Functions: 
+++ Related Constructors:
+++ Also See:
+++ AMS Classifications:
+++ Keywords: localization
+++ References:
+++ Description: 
+++ This package produces functions for counting
+++ etc. real roots of univariate polynomials in x over R, which must
+++ be an OrderedIntegralDomain
+SturmHabichtPackage(R,x): T == C where
+  R: OrderedIntegralDomain
+  x: Symbol
+
+  UP ==> UnivariatePolynomial
+  L ==> List
+  INT ==> Integer
+  NNI ==> NonNegativeInteger
+
+  T == with
+--     subresultantSequenceBegin:(UP(x,R),UP(x,R)) -> L UP(x,R)
+--       ++ \spad{subresultantSequenceBegin(p1,p2)} computes the  initial terms
+--       ++ of the Subresultant sequence Sres(j)(P,deg(P),Q,deg(P)-1)
+--       ++ when deg(Q)<deg(P)
+--     subresultantSequenceNext:L UP(x,R) -> L UP(x,R)
+--     subresultantSequenceInner:(UP(x,R),UP(x,R)) -> L UP(x,R)
+     subresultantSequence:(UP(x,R),UP(x,R)) -> L UP(x,R)
+       ++ subresultantSequence(p1,p2) computes the (standard) 
+       ++ subresultant sequence of p1 and p2
+--     sign:R -> R
+--     delta:NNI -> R
+
+--     polsth1:(UP(x,R),NNI,UP(x,R),NNI,R) -> L UP(x,R)
+--     polsth2:(UP(x,R),NNI,UP(x,R),NNI,R) -> L UP(x,R)
+--     polsth3:(UP(x,R),NNI,UP(x,R),NNI,R) -> L UP(x,R)
+     SturmHabichtSequence:(UP(x,R),UP(x,R)) -> L UP(x,R)
+       ++ SturmHabichtSequence(p1,p2) computes the Sturm-Habicht
+       ++ sequence of p1 and p2
+     SturmHabichtCoefficients:(UP(x,R),UP(x,R)) -> L R
+       ++ SturmHabichtCoefficients(p1,p2) computes the principal
+       ++ Sturm-Habicht coefficients of p1 and p2
+
+--     variation:L R -> INT
+--     permanence:L R -> INT
+--     qzeros:L R -> L R
+--     epsil:(NNI,R,R) -> INT
+--     numbnce:L R -> NNI
+--     numbce:L R -> NNI
+--     wfunctaux:L R -> INT
+--     wfunct:L R -> INT
+
+     SturmHabicht:(UP(x,R),UP(x,R)) -> INT 
+       ++ SturmHabicht(p1,p2) computes c_{+}-c_{-} where
+       ++ c_{+} is the number of real roots of p1 with p2>0 and c_{-}
+       ++ is the number of real roots of p1 with p2<0. If p2=1 what
+       ++ you get is the number of real roots of p1.
+     countRealRoots:(UP(x,R)) -> INT
+       ++ countRealRoots(p) says how many real roots p has
+     if R has GcdDomain then
+        SturmHabichtMultiple:(UP(x,R),UP(x,R)) -> INT
+          ++ SturmHabichtMultiple(p1,p2) computes c_{+}-c_{-} where
+          ++ c_{+} is the number of real roots of p1 with p2>0 and c_{-}
+          ++ is the number of real roots of p1 with p2<0. If p2=1 what
+          ++ you get is the number of real roots of p1.
+        countRealRootsMultiple:(UP(x,R)) -> INT
+          ++ countRealRootsMultiple(p) says how many real roots p has,
+          ++ counted with multiplicity
+
+
+  C == add
+     p1,p2: UP(x,R)
+     Ex ==> OutputForm
+     import OutputForm
+
+     subresultantSequenceBegin(p1,p2):L UP(x,R) ==
+       d1:NNI:=degree(p1)
+       d2:NNI:=degree(p2)
+       n:NNI:=(d1-1)::NNI
+       d2 = n =>
+         Pr:UP(x,R):=pseudoRemainder(p1,p2)
+         append([p1,p2]::L UP(x,R),[Pr]::L UP(x,R))
+       d2 = (n-1)::NNI =>
+         Lc1:UP(x,R):=leadingCoefficient(p1)*leadingCoefficient(p2)*p2
+         Lc2:UP(x,R):=-leadingCoefficient(p1)*pseudoRemainder(p1,p2)
+         append([p1,p2]::L UP(x,R),[Lc1,Lc2]::L UP(x,R))
+       LSubr:L UP(x,R):=[p1,p2]
+       in1:INT:=(d2+1)::INT
+       in2:INT:=(n-1)::INT
+       for i in in1..in2 repeat
+         LSubr:L UP(x,R):=append(LSubr::L UP(x,R),[0]::L UP(x,R))
+       c1:R:=(leadingCoefficient(p1)*leadingCoefficient(p2))**((n-d2)::NNI)
+       Lc1:UP(x,R):=monomial(c1,0)*p2
+       Lc2:UP(x,R):=
+         (-leadingCoefficient(p1))**((n-d2)::NNI)*pseudoRemainder(p1,p2)
+       append(LSubr::L UP(x,R),[Lc1,Lc2]::L UP(x,R))
+
+     subresultantSequenceNext(LcsI:L UP(x,R)):L UP(x,R) ==
+       p2:UP(x,R):=last LcsI
+       p1:UP(x,R):=first rest reverse LcsI
+       d1:NNI:=degree(p1)
+       d2:NNI:=degree(p2)
+       in1:NNI:=(d1-1)::NNI
+       d2 = in1 =>
+         pr1:UP(x,R):=
+           (pseudoRemainder(p1,p2) exquo (leadingCoefficient(p1))**2)::UP(x,R)
+         append(LcsI:L UP(x,R),[pr1]:L UP(x,R))
+       d2 < in1 =>
+         c1:R:=leadingCoefficient(p1)
+         pr1:UP(x,R):=
+          (leadingCoefficient(p2)**((in1-d2)::NNI)*p2 exquo
+              c1**((in1-d2)::NNI))::UP(x,R)
+         pr2:UP(x,R):=
+           (pseudoRemainder(p1,p2) exquo (-c1)**((in1-d2+2)::NNI))::UP(x,R)
+         LSub:L UP(x,R):=[pr1,pr2]
+         for k in ((d2+1)::INT)..((in1-1)::INT) repeat
+           LSub:L UP(x,R):=append([0]:L UP(x,R),LSub:L UP(x,R))
+         append(LcsI:L UP(x,R),LSub:L UP(x,R))
+
+     subresultantSequenceInner(p1,p2):L UP(x,R) ==
+       Lin:L UP(x,R):=subresultantSequenceBegin(p1:UP(x,R),p2:UP(x,R))
+       indf:NNI:= if not(Lin.last::UP(x,R) = 0) then degree(Lin.last::UP(x,R))
+                                               else 0
+       while not(indf = 0) repeat
+         Lin:L UP(x,R):=subresultantSequenceNext(Lin:L UP(x,R))
+         indf:NNI:= if not(Lin.last::UP(x,R)=0) then degree(Lin.last::UP(x,R))
+                                               else 0
+       for j in #(Lin:L UP(x,R))..degree(p1) repeat
+         Lin:L UP(x,R):=append(Lin:L UP(x,R),[0]:L UP(x,R))
+       Lin
+
+
+-- Computation of the subresultant sequence Sres(j)(P,p,Q,q) when:
+--             deg(P) = p   and   deg(Q) = q   and   p > q
+
+     subresultantSequence(p1,p2):L UP(x,R) ==
+       p:NNI:=degree(p1)
+       q:NNI:=degree(p2)
+       List1:L UP(x,R):=subresultantSequenceInner(p1,p2)
+       List2:L UP(x,R):=[p1,p2]
+       c1:R:=leadingCoefficient(p1)
+       for j in 3..#(List1) repeat
+         Pr0:UP(x,R):=List1.j
+         Pr1:UP(x,R):=(Pr0 exquo c1**((p-q-1)::NNI))::UP(x,R)
+         List2:L UP(x,R):=append(List2:L UP(x,R),[Pr1]:L UP(x,R))
+       List2
+
+
+-- Computation of the sign (+1,0,-1) of an element in an ordered integral
+-- domain
+
+--     sign(r:R):R ==
+--       r =$R 0 => 0
+--       r >$R 0 => 1
+--       -1
+
+
+-- Computation of the delta function:
+
+     delta(int1:NNI):R ==
+       (-1)**((int1*(int1+1) exquo 2)::NNI)
+
+
+-- Computation of the Sturm-Habicht sequence of two polynomials P and Q
+-- in R[x] where R is an ordered integral domaine
+
+     polsth1(p1,p:NNI,p2,q:NNI,c1:R):L UP(x,R) ==
+       sc1:R:=(sign(c1))::R
+       Pr1:UP(x,R):=pseudoRemainder(differentiate(p1)*p2,p1)
+       Pr2:UP(x,R):=(Pr1 exquo c1**(q::NNI))::UP(x,R)
+       c2:R:=leadingCoefficient(Pr2)
+       r:NNI:=degree(Pr2)
+       Pr3:UP(x,R):=monomial(sc1**((p-r-1)::NNI),0)*p1
+       Pr4:UP(x,R):=monomial(sc1**((p-r-1)::NNI),0)*Pr2
+       Listf:L UP(x,R):=[Pr3,Pr4]
+       if r < p-1 then
+         Pr5:UP(x,R):=monomial(delta((p-r-1)::NNI)*c2**((p-r-1)::NNI),0)*Pr2
+         for j in ((r+1)::INT)..((p-2)::INT) repeat
+           Listf:L UP(x,R):=append(Listf:L UP(x,R),[0]:L UP(x,R))
+         Listf:L UP(x,R):=append(Listf:L UP(x,R),[Pr5]:L UP(x,R))
+       if Pr1=0 then List1:L UP(x,R):=Listf
+                else List1:L UP(x,R):=subresultantSequence(p1,Pr2)
+       List2:L UP(x,R):=[]
+       for j in 0..((r-1)::INT) repeat
+         Pr6:UP(x,R):=monomial(delta((p-j-1)::NNI),0)*List1.((p-j+1)::NNI)
+         List2:L UP(x,R):=append([Pr6]:L UP(x,R),List2:L UP(x,R))
+       append(Listf:L UP(x,R),List2:L UP(x,R))
+
+     polsth2(p1,p:NNI,p2,q:NNI,c1:R):L UP(x,R) ==
+       sc1:R:=(sign(c1))::R
+       Pr1:UP(x,R):=monomial(sc1,0)*p1
+       Pr2:UP(x,R):=differentiate(p1)*p2
+       Pr3:UP(x,R):=monomial(sc1,0)*Pr2
+       Listf:L UP(x,R):=[Pr1,Pr3]
+       List1:L UP(x,R):=subresultantSequence(p1,Pr2)
+       List2:L UP(x,R):=[]
+       for j in 0..((p-2)::INT) repeat
+         Pr4:UP(x,R):=monomial(delta((p-j-1)::NNI),0)*List1.((p-j+1)::NNI)
+         Pr5:UP(x,R):=(Pr4 exquo c1)::UP(x,R)
+         List2:L UP(x,R):=append([Pr5]:L UP(x,R),List2:L UP(x,R))
+       append(Listf:L UP(x,R),List2:L UP(x,R))
+
+     polsth3(p1,p:NNI,p2,q:NNI,c1:R):L UP(x,R) ==
+       sc1:R:=(sign(c1))::R
+       q1:NNI:=(q-1)::NNI
+       v:NNI:=(p+q1)::NNI
+       Pr1:UP(x,R):=monomial(delta(q1::NNI)*sc1**((q+1)::NNI),0)*p1
+       Listf:L UP(x,R):=[Pr1]
+       List1:L UP(x,R):=subresultantSequence(differentiate(p1)*p2,p1)
+       List2:L UP(x,R):=[]
+       for j in 0..((p-1)::NNI) repeat
+         Pr2:UP(x,R):=monomial(delta((v-j)::NNI),0)*List1.((v-j+1)::NNI)
+         Pr3:UP(x,R):=(Pr2 exquo c1)::UP(x,R)
+         List2:L UP(x,R):=append([Pr3]:L UP(x,R),List2:L UP(x,R))
+       append(Listf:L UP(x,R),List2:L UP(x,R))
+
+     SturmHabichtSequence(p1,p2):L UP(x,R) ==
+       p:NNI:=degree(p1)
+       q:NNI:=degree(p2)
+       c1:R:=leadingCoefficient(p1)
+       c1 = 1 or q = 1 => polsth1(p1,p,p2,q,c1)
+       q = 0 => polsth2(p1,p,p2,q,c1)
+       polsth3(p1,p,p2,q,c1)
+
+
+-- Computation of the Sturm-Habicht principal coefficients of two
+-- polynomials P and Q in R[x] where R is an ordered integral domain
+
+     SturmHabichtCoefficients(p1,p2):L R ==
+       List1:L UP(x,R):=SturmHabichtSequence(p1,p2)
+--       List2:L R:=[]
+       qp:NNI:=#(List1)::NNI
+       [coefficient(p,(qp-j)::NNI) for p in List1 for j in 1..qp]
+--       for j in 1..qp repeat
+--         Ply:R:=coefficient(List1.j,(qp-j)::NNI)
+--         List2:L R:=append(List2,[Ply])
+--       List2
+
+
+-- Computation of the number of sign variations of a list of non zero
+-- elements in an ordered integral domain
+
+     variation(Lsig:L R):INT ==
+       size?(Lsig,1) => 0
+       elt1:R:=first Lsig
+       elt2:R:=Lsig.2
+       sig1:R:=(sign(elt1*elt2))::R
+       List1:L R:=rest Lsig
+       sig1 = 1 => variation List1
+       1+variation List1
+
+
+-- Computation of the number of sign permanences of a list of non zero
+-- elements in an ordered integral domain
+
+     permanence(Lsig:L R):INT ==
+       size?(Lsig,1) => 0
+       elt1:R:=first Lsig
+       elt2:R:=Lsig.2
+       sig1:R:=(sign(elt1*elt2))::R
+       List1:L R:=rest Lsig
+       sig1 = -1 => permanence List1
+       1+permanence List1
+
+
+-- Computation of the functional W which works over a list of elements
+-- in an ordered integral domain, with non zero first element
+
+     qzeros(Lsig:L R):L R ==
+       while last Lsig = 0 repeat
+         Lsig:L R:=reverse rest reverse Lsig
+       Lsig
+
+     epsil(int1:NNI,elt1:R,elt2:R):INT ==
+       int1 = 0 => 0
+       odd? int1 => 0
+       ct1:INT:=if elt1 > 0 then 1 else -1
+       ct2:INT:=if elt2 > 0 then 1 else -1
+       ct3:NNI:=(int1 exquo 2)::NNI
+       ct4:INT:=(ct1*ct2)::INT
+       ((-1)**(ct3::NNI))*ct4
+
+     numbnce(Lsig:L R):NNI ==
+       null Lsig => 0
+       eltp:R:=Lsig.1
+       eltp = 0 => 0
+       1 + numbnce(rest Lsig)
+
+     numbce(Lsig:L R):NNI ==
+       null Lsig => 0
+       eltp:R:=Lsig.1
+       not(eltp = 0) => 0
+       1 + numbce(rest Lsig)
+
+     wfunctaux(Lsig:L R):INT ==
+       null Lsig => 0
+       List2:L R:=[]
+       List1:L R:=Lsig:L R
+       cont1:NNI:=numbnce(List1:L R)
+       for j in 1..cont1 repeat
+         List2:L R:=append(List2:L R,[first List1]:L R)
+         List1:L R:=rest List1
+       ind2:INT:=0
+       cont2:NNI:=numbce(List1:L R)
+       for j in 1..cont2 repeat
+         List1:L R:=rest List1
+         ind2:INT:=epsil(cont2:NNI,last List2,first List1)
+       ind3:INT:=permanence(List2:L R)-variation(List2:L R)
+       ind4:INT:=ind2+ind3
+       ind4+wfunctaux(List1:L R)
+
+     wfunct(Lsig:L R):INT ==
+       List1:L R:=qzeros(Lsig:L R)
+       wfunctaux(List1:L R)
+
+
+-- Computation of the integer number:
+--    #[{a in Rc(R)/P(a)=0 Q(a)>0}] - #[{a in Rc(R)/P(a)=0 Q(a)<0}]
+-- where:
+--    - R is an ordered integral domain,
+--    - Rc(R) is the real clousure of R,
+--    - P and Q are polynomials in R[x],
+--    - by #[A] we note the cardinal of the set A
+
+-- In particular:
+--      - SturmHabicht(P,1) is the number of "real" roots of P,
+--      - SturmHabicht(P,Q**2) is the number of "real" roots of P making Q neq 0
+
+     SturmHabicht(p1,p2):INT ==
+--     print("+" :: Ex)
+       p2 = 0 => 0
+       degree(p1:UP(x,R)) = 0 => 0
+       List1:L UP(x,R):=SturmHabichtSequence(p1,p2)
+       qp:NNI:=#(List1)::NNI
+       wfunct [coefficient(p,(qp-j)::NNI) for p in List1 for j in 1..qp]
+
+     countRealRoots(p1):INT == SturmHabicht(p1,1)
+
+     if R has GcdDomain then
+        SturmHabichtMultiple(p1,p2):INT ==
+   --     print("+" :: Ex)
+          p2 = 0 => 0
+          degree(p1:UP(x,R)) = 0 => 0
+          SH:L UP(x,R):=SturmHabichtSequence(p1,p2)
+          qp:NNI:=#(SH)::NNI
+          ans:= wfunct [coefficient(p,(qp-j)::NNI) for p in SH for j in 1..qp]
+          SH:=reverse SH
+          while first SH = 0 repeat SH:=rest SH
+          degree first SH = 0 => ans
+          -- OK: it probably wasn't square free, so this item is probably the 
+          -- gcd of p1 and p1'
+          -- unless p1 and p2 have a factor in common (naughty!)
+          differentiate(p1) exquo first SH case UP(x,R) =>
+             -- it was the gcd of p1 and p1'
+             ans+SturmHabichtMultiple(first SH,p2)
+          sqfr:=factorList squareFree p1
+          #sqfr = 1 and sqfr.first.xpnt=1 => ans
+          reduce("+",[f.xpnt*SturmHabicht(f.fctr,p2) for f in sqfr])
+
+        countRealRootsMultiple(p1):INT == SturmHabichtMultiple(p1,1)
+
+@
+<<SHP.dotabb>>=
+"SHP" [color="#FF4488",href="bookvol10.4.pdf#nameddest=SHP"]
+"PFECAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=PFECAT"]
+"SHP" -> "PFECAT"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{package SUBRESP SubResultantPackage}
 \pagehead{SubResultantPackage}{SUBRESP}
 \pagepic{ps/v104subresultantpackage.ps}{SUBRESP}{1.00}
@@ -75376,6 +83856,749 @@ SystemODESolver(F, LO): Exports == Implementation where
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package SYSSOLP SystemSolvePackage}
+\pagehead{SystemSolvePackage}{SYSSOLP}
+\pagepic{ps/v104systemsolvepackage.ps}{SYSSOLP}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package SYSSOLP SystemSolvePackage>>=
+)abbrev package SYSSOLP SystemSolvePackage
+++ Author: P. Gianni
+++ Date Created: summer 1988
+++ Date Last Updated: summer 1990
+++ Basic Functions:
+++ Related Constructors: Fraction, Polynomial, FloatingRealPackage,
+++ FloatingComplexPackage, RadicalSolvePackage
+++ Also See: LinearSystemMatrixPackage, GroebnerSolve
+++ AMS Classifications:
+++ Keywords:
+++ References:
+++ Description:
+++ Symbolic solver for systems of rational functions with coefficients
+++ in an integral domain R.
+++ The systems are solved in the field of rational functions over R.
+++ Solutions are exact of the form variable = value when the value is
+++ a member of the coefficient domain R. Otherwise the solutions
+++ are implicitly expressed as roots of univariate polynomial equations over R.
+++ Care is taken to guarantee that the denominators of the input
+++ equations do not vanish on the solution sets.
+++ The arguments to solve can either be given as equations or
+++ as rational functions interpreted as equal
+++ to zero. The user can specify an explicit list of symbols to
+++ be solved for, treating all other symbols appearing as parameters
+++ or omit the list of symbols in which case the system tries to
+++ solve with respect to all symbols appearing in the input.
+
+NNI      ==> NonNegativeInteger
+P        ==> Polynomial
+EQ       ==> Equation
+L        ==> List
+V        ==> Vector
+M        ==> Matrix
+UP       ==> SparseUnivariatePolynomial
+SE       ==> Symbol
+IE       ==> IndexedExponents Symbol
+SUP      ==> SparseUnivariatePolynomial
+
+SystemSolvePackage(R): Cat == Cap where
+    R : IntegralDomain
+    F   ==> Fraction Polynomial R
+    PP2 ==> PolynomialFunctions2(R,F)
+    PPR ==> Polynomial Polynomial R
+
+    Cat == with
+       solve:    (L F,    L SE) -> L L EQ F
+         ++ solve(lp,lv) finds the solutions of the list lp of
+         ++ rational functions with respect to the list of symbols lv.
+
+       solve:    (L EQ F, L SE) -> L L EQ F
+         ++ solve(le,lv) finds the solutions of the
+         ++ list le of equations of rational functions
+         ++ with respect to the list of symbols lv.
+
+       solve:         L F       -> L L EQ F
+         ++ solve(lp) finds the solutions of the list lp of rational
+         ++ functions with respect to all symbols appearing in lp.
+
+       solve:        L EQ F     -> L L EQ F
+         ++ solve(le) finds the solutions of the list le of equations of
+         ++ rational functions with respect to all symbols appearing in le.
+
+       solve:    (F, SE) ->  L EQ F
+         ++ solve(p,v) solves the equation p=0, where p is a rational function
+         ++ with respect to the variable v.
+
+       solve:    (EQ F,SE) -> L EQ F
+         ++ solve(eq,v) finds the solutions of the equation
+         ++ eq with respect to the variable v.
+
+       solve:         F      -> L EQ F
+         ++ solve(p) finds the solution of a rational function p = 0
+         ++ with respect to the unique variable appearing in p.
+
+       solve:         EQ F     -> L EQ F
+         ++ solve(eq) finds the solutions of the equation eq
+         ++ with respect to the unique variable appearing in eq.
+
+       triangularSystems: (L F,    L SE) -> L L P R
+         ++ triangularSystems(lf,lv) solves the system of equations
+         ++ defined by lf with respect to the list of symbols lv;
+         ++ the system of equations is obtaining
+         ++ by equating to zero the list of rational functions lf.
+         ++ The output is a list of solutions where
+         ++ each solution is expressed as a "reduced" triangular system of
+         ++ polynomials.
+
+    Cap == add
+
+       import MPolyCatRationalFunctionFactorizer(IE,SE,R,P F)
+
+                     ---- Local Functions ----
+       linSolve: (L F,    L SE) -> Union(L EQ F, "failed")
+       makePolys :   L EQ F     ->  L F
+
+       makeR2F(r : R) : F == r :: (P R) :: F
+
+       makeP2F(p:P F):F ==
+         lv:=variables p
+         lv = [] => retract p
+         for v in lv repeat p:=pushdown(p,v)
+         retract p
+                     ---- Local Functions ----
+       makeEq(p:P F,lv:L SE): EQ F ==
+         z:=last lv
+         np:=numer makeP2F p
+         lx:=variables np
+         for x in lv repeat if member?(x,lx) then leave x
+         up:=univariate(np,x)
+         (degree up)=1 =>
+           equation(x::P(R)::F,-coefficient(up,0)/leadingCoefficient up)
+         equation(np::F,0$F)
+
+       varInF(v: SE): F == v::P(R) :: F
+
+       newInF(n: Integer):F==varInF new()$SE
+
+       testDegree(f :P R , lv :L SE) : Boolean ==
+         "or"/[degree(f,vv)>0 for vv in lv]
+                    ---- Exported Functions ----
+
+       -- solve a system of rational functions
+       triangularSystems(lf: L F,lv:L SE) : L L P R ==
+           empty? lv => empty()
+           empty? lf => empty()
+           #lf = 1 =>
+              p:= numer(first lf)
+              fp:=(factor p)$GeneralizedMultivariateFactorize(SE,IE,R,R,P R)
+              [[ff.factor] for ff in factors fp | testDegree(ff.factor,lv)]
+           dmp:=DistributedMultivariatePolynomial(lv,P R)
+           OV:=OrderedVariableList(lv)
+           DP:=DirectProduct(#lv, NonNegativeInteger)
+           push:=PushVariables(R,DP,OV,dmp)
+           lq : L dmp
+           lvv:L OV:=[variable(vv)::OV for vv in lv]
+           lq:=[pushup(df::dmp,lvv)$push for f in lf|(df:=denom f)^=1]
+           lp:=[pushup(numer(f)::dmp,lvv)$push for f in lf]
+           parRes:=groebSolve(lp,lvv)$GroebnerSolve(lv,P R,R)
+           if lq^=[] then
+             gb:=GroebnerInternalPackage(P R,DirectProduct(#lv,NNI),OV,dmp)
+             parRes:=[pr for pr in parRes|
+                       and/[(redPol(fq,pr pretend List(dmp))$gb) ^=0
+                         for fq in lq]]
+           [[retract pushdown(pf,lvv)$push for pf in pr] for pr in parRes]
+
+      -- One polynomial. Implicit variable --
+       solve(pol : F) ==
+         zero? pol =>
+            error "equation is always satisfied"
+         lv:=removeDuplicates
+             concat(variables numer pol, variables denom pol)
+         empty? lv => error "inconsistent equation"
+         #lv>1 => error "too many variables"
+         solve(pol,first lv)
+
+       -- general solver. Input in equation style. Implicit variables --
+       solve(eq : EQ F) ==
+         pol:= lhs eq - rhs eq
+         zero? pol =>
+            error "equation is always satisfied"
+         lv:=removeDuplicates
+             concat(variables numer pol, variables denom pol)
+         empty? lv => error "inconsistent equation"
+         #lv>1 => error "too many variables"
+         solve(pol,first lv)
+
+       -- general solver. Input in equation style  --
+       solve(eq:EQ F,var:SE)  == solve(lhs eq - rhs eq,var)
+
+       -- general solver. Input in polynomial style  --
+       solve(pol:F,var:SE) ==
+         if R has GcdDomain then
+           p:=primitivePart(numer pol,var)
+           fp:=(factor p)$GeneralizedMultivariateFactorize(SE,IE,R,R,P R)
+           [makeEq(map(makeR2F,ff.factor)$PP2,[var]) for ff in factors fp]
+         else empty()
+
+       -- Convert a list of Equations in a list of Polynomials
+       makePolys(l: L EQ F):L F == [lhs e - rhs e for e in l]
+
+       -- linear systems solver. Input as list of polynomials  --
+       linSolve(lp:L F,lv:L SE) ==
+           rec:Record(particular:Union(V F,"failed"),basis:L V F)
+           lr : L P R:=[numer f for f in lp]
+           rec:=linSolve(lr,lv)$LinearSystemPolynomialPackage(R,IE,SE,P R)
+           rec.particular case "failed" => "failed"
+           rhs := rec.particular :: V F
+           zeron:V F:=zero(#lv)
+           for p in rec.basis | p ^= zeron repeat
+               sym := newInF(1)
+               for i in 1..#lv repeat
+                   rhs.i := rhs.i + sym*p.i
+           eqs: L EQ F := []
+           for i in 1..#lv repeat
+             eqs := append(eqs,[(lv.i)::(P R)::F = rhs.i])
+           eqs
+
+      -- general solver. Input in polynomial style. Implicit variables --
+       solve(lr : L F) ==
+         lv :="setUnion"/[setUnion(variables numer p, variables denom p)
+               for p in lr]
+         solve(lr,lv)
+
+       -- general solver. Input in equation style. Implicit variables --
+       solve(le : L EQ F) ==
+         lr:=makePolys le
+         lv :="setUnion"/[setUnion(variables numer p, variables denom p)
+               for p in lr]
+         solve(lr,lv)
+
+       -- general solver. Input in equation style  --
+       solve(le:L EQ F,lv:L SE)  == solve(makePolys le, lv)
+
+       checkLinear(lr:L F,vl:L SE):Boolean ==
+         ld:=[denom pol for pol in lr]
+         for f in ld repeat
+           if (or/[member?(x,vl) for x in variables f]) then return false
+         and/[totalDegree(numer pol,vl) < 2 for pol in lr]
+
+       -- general solver. Input in polynomial style  --
+       solve(lr:L F,vl:L SE) ==
+           empty? vl => empty()
+           checkLinear(lr,vl) =>
+                            -- linear system --
+               soln := linSolve(lr, vl)
+               soln case "failed" => []
+               eqns: L EQ F := []
+               for i in 1..#vl repeat
+                   lhs := (vl.i::(P R))::F
+                   rhs :=  rhs soln.i
+                   eqns := append(eqns, [lhs = rhs])
+               [eqns]
+
+                         -- polynomial system --
+           if R has GcdDomain then
+             parRes:=triangularSystems(lr,vl)
+             [[makeEq(map(makeR2F,f)$PP2,vl) for f in pr]
+                                                        for pr in parRes]
+           else [[]]
+
+@
+<<SYSSOLP.dotabb>>=
+"SYSSOLP" [color="#FF4488",href="bookvol10.4.pdf#nameddest=SYSSOLP"]
+"ALIST" [color="#88FF44",href="bookvol10.3.pdf#nameddest=ALIST"]
+"SYSSOLP" -> "ALIST"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package SGCF SymmetricGroupCombinatoricFunctions}
+\pagehead{SymmetricGroupCombinatoricFunctions}{SGCF}
+\pagepic{ps/v104symmetricgroupcombinatoricfunctions.ps}{SGCF}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package SGCF SymmetricGroupCombinatoricFunctions>>=
+)abbrev package SGCF SymmetricGroupCombinatoricFunctions
+++ Authors: Johannes Grabmeier, Thorsten Werther
+++ Date Created: 03 September 1988
+++ Date Last Updated: 07 June 1990
+++ Basic Operations: nextPartition, numberOfImproperPartitions,
+++   listYoungTableaus, subSet, unrankImproperPartitions0
+++ Related Constructors: IntegerCombinatoricFunctions
+++ Also See: RepresentationTheoryPackage1, RepresentationTheoryPackage2,
+++   IrrRepSymNatPackage
+++ AMS Classifications:
+++ Keywords: improper partition, partition, subset, Coleman
+++ References:
+++   G. James/ A. Kerber: The Representation Theory of the Symmetric
+++    Group. Encycl. of Math. and its Appl., Vol. 16., Cambridge
+++    Univ. Press 1981, ISBN 0-521-30236-6.
+++   S.G. Williamson: Combinatorics for Computer Science,
+++    Computer Science Press, Rockville, Maryland, USA, ISBN 0-88175-020-4.
+++   A. Nijenhuis / H.S. Wilf: Combinatoral Algorithms, Academic Press 1978.
+++    ISBN 0-12-519260-6.
+++   H. Gollan, J. Grabmeier: Algorithms in Representation Theory and
+++    their Realization in the Computer Algebra System Scratchpad,
+++    Bayreuther Mathematische Schriften, Heft 33, 1990, 1-23.
+++ Description:
+++   SymmetricGroupCombinatoricFunctions contains combinatoric
+++   functions concerning symmetric groups and representation
+++   theory: list young tableaus, improper partitions, subsets
+++   bijection of Coleman.
+ 
+SymmetricGroupCombinatoricFunctions(): public == private where
+ 
+  NNI  ==> NonNegativeInteger
+  I    ==> Integer
+  L    ==> List
+  M    ==> Matrix
+  V    ==> Vector
+  B    ==> Boolean
+  ICF  ==> IntegerCombinatoricFunctions Integer
+ 
+  public ==> with
+ 
+--    IS THERE A WORKING DOMAIN Tableau ??
+--    coerce : M I -> Tableau(I)
+--      ++ coerce(ytab) coerces the Young-Tableau ytab to an element of
+--      ++ the domain Tableau(I).
+ 
+    coleman : (L I, L I, L I) -> M I
+      ++ coleman(alpha,beta,pi):
+      ++ there is a bijection from the set of matrices having nonnegative
+      ++ entries and row sums {\em alpha}, column sums {\em beta}
+      ++ to the set of {\em Salpha - Sbeta} double cosets of the
+      ++ symmetric group {\em Sn}. ({\em Salpha} is the Young subgroup
+      ++ corresponding to the improper partition {\em alpha}).
+      ++ For a representing element {\em pi} of such a double coset,
+      ++ coleman(alpha,beta,pi) generates the Coleman-matrix
+      ++ corresponding to {\em alpha, beta, pi}.
+      ++ Note: The permutation {\em pi} of {\em {1,2,...,n}} has to be given
+      ++ in list form.
+      ++ Note: the inverse of this map is {\em inverseColeman}
+      ++ (if {\em pi} is the lexicographical smallest permutation
+      ++ in the coset). For details see James/Kerber.
+    inverseColeman : (L I, L I, M I) -> L I
+      ++ inverseColeman(alpha,beta,C):
+      ++ there is a bijection from the set of matrices having nonnegative
+      ++ entries and row sums {\em alpha}, column sums {\em beta}
+      ++ to the set of {\em Salpha - Sbeta} double cosets of the
+      ++ symmetric group {\em Sn}. ({\em Salpha} is the Young subgroup
+      ++ corresponding to the improper partition {\em alpha}).
+      ++ For such a matrix C, inverseColeman(alpha,beta,C)
+      ++ calculates the lexicographical smallest {\em pi} in the
+      ++ corresponding double coset.
+      ++ Note: the resulting permutation {\em pi} of {\em {1,2,...,n}} 
+      ++ is given in list form.
+      ++ Notes: the inverse of this map is {\em coleman}.
+      ++ For details, see James/Kerber.
+    listYoungTableaus : (L I) -> L M I
+      ++ listYoungTableaus(lambda) where {\em lambda} is a proper partition
+      ++ generates the list of all standard tableaus of shape {\em lambda}
+      ++ by means of lattice permutations. The numbers of the lattice
+      ++ permutation are interpreted as column labels. Hence the
+      ++ contents of these lattice permutations are the conjugate of
+      ++ {\em lambda}.
+      ++ Notes: the functions {\em nextLatticePermutation} and
+      ++ {\em makeYoungTableau} are used.
+      ++ The entries are from {\em 0,...,n-1}.
+    makeYoungTableau : (L I,L I) -> M I
+      ++ makeYoungTableau(lambda,gitter) computes for a given lattice
+      ++ permutation {\em gitter} and for an improper partition {\em lambda}
+      ++ the corresponding standard tableau of shape {\em lambda}.
+      ++ Notes: see {\em listYoungTableaus}.
+      ++ The entries are from {\em 0,...,n-1}.
+    nextColeman : (L I, L I, M I) -> M I
+      ++ nextColeman(alpha,beta,C) generates the next Coleman matrix
+      ++ of column sums {\em alpha} and row sums {\em beta} according
+      ++ to the lexicographical order from bottom-to-top.
+      ++ The first Coleman matrix is achieved by {\em C=new(1,1,0)}.
+      ++ Also, {\em new(1,1,0)} indicates that C is the last Coleman matrix.
+    nextLatticePermutation : (L I, L I, B) -> L I
+      ++ nextLatticePermutation(lambda,lattP,constructNotFirst) generates
+      ++ the lattice permutation according to the proper partition
+      ++ {\em lambda} succeeding the lattice permutation {\em lattP} in
+      ++ lexicographical order as long as {\em constructNotFirst} is true.
+      ++ If {\em constructNotFirst} is false, the first lattice permutation
+      ++ is returned.
+      ++ The result {\em nil} indicates that {\em lattP} has no successor.
+    nextPartition : (V I, V I, I) -> V I
+      ++ nextPartition(gamma,part,number) generates the partition of
+      ++ {\em number} which follows {\em part} according to the right-to-left
+      ++ lexicographical order. The partition has the property that
+      ++ its components do not exceed the corresponding components of
+      ++ {\em gamma}. The first partition is achieved by {\em part=[]}.
+      ++ Also, {\em []} indicates that {\em part} is the last partition.
+    nextPartition : (L I, V I, I) -> V I
+      ++ nextPartition(gamma,part,number) generates the partition of
+      ++ {\em number} which follows {\em part} according to the right-to-left
+      ++ lexicographical order. The partition has the property that
+      ++ its components do not exceed the corresponding components of
+      ++ {\em gamma}. the first partition is achieved by {\em part=[]}.
+      ++ Also, {\em []} indicates that {\em part} is the last partition.
+    numberOfImproperPartitions: (I,I) -> I
+      ++ numberOfImproperPartitions(n,m) computes the number of partitions
+      ++ of the nonnegative integer n in m nonnegative parts with regarding
+      ++ the order (improper partitions).
+      ++ Example: {\em numberOfImproperPartitions (3,3)} is 10,
+      ++ since {\em [0,0,3], [0,1,2], [0,2,1], [0,3,0], [1,0,2], [1,1,1],
+      ++ [1,2,0], [2,0,1], [2,1,0], [3,0,0]} are the possibilities.
+      ++ Note: this operation has a recursive implementation.
+    subSet : (I,I,I) -> L I
+      ++ subSet(n,m,k) calculates the {\em k}-th {\em m}-subset of the set
+      ++ {\em 0,1,...,(n-1)} in the lexicographic order considered as
+      ++ a decreasing map from {\em 0,...,(m-1)} into {\em 0,...,(n-1)}.
+      ++ See S.G. Williamson: Theorem 1.60.
+      ++ Error: if not {\em (0 <= m <= n and 0 < = k < (n choose m))}.
+    unrankImproperPartitions0 : (I,I,I) -> L I
+      ++ unrankImproperPartitions0(n,m,k) computes the {\em k}-th improper
+      ++ partition of nonnegative n in m nonnegative parts in reverse
+      ++ lexicographical order.
+      ++ Example: {\em [0,0,3] < [0,1,2] < [0,2,1] < [0,3,0] <
+      ++ [1,0,2] < [1,1,1] < [1,2,0] < [2,0,1] < [2,1,0] < [3,0,0]}.
+      ++ Error: if k is negative or too big.
+      ++ Note: counting of subtrees is done by 
+      ++ \spadfunFrom{numberOfImproperPartitions}{SymmetricGroupCombinatoricFunctions}.
+
+    unrankImproperPartitions1: (I,I,I) -> L I
+      ++ unrankImproperPartitions1(n,m,k) computes the {\em k}-th improper
+      ++ partition of nonnegative n in at most m nonnegative parts 
+      ++ ordered as follows: first, in reverse
+      ++ lexicographically according to their non-zero parts, then
+      ++ according to their positions (i.e. lexicographical order
+      ++ using {\em subSet}: {\em [3,0,0] < [0,3,0] < [0,0,3] < [2,1,0] <
+      ++ [2,0,1] < [0,2,1] < [1,2,0] < [1,0,2] < [0,1,2] < [1,1,1]}).
+      ++ Note: counting of subtrees is done by
+      ++ {\em numberOfImproperPartitionsInternal}.
+ 
+  private == add
+ 
+    import Set I
+ 
+    -- declaration of local functions
+ 
+ 
+    numberOfImproperPartitionsInternal: (I,I,I) -> I
+      -- this is used as subtree counting function in
+      -- "unrankImproperPartitions1". For (n,m,cm) it counts
+      -- the following set of m-tuples: The  first (from left
+      -- to right) m-cm non-zero entries are equal, the remaining
+      -- positions sum up to n. Example: (3,3,2) counts
+      -- [x,3,0], [x,0,3], [0,x,3], [x,2,1], [x,1,2], x non-zero.
+ 
+ 
+    -- definition of local functions
+ 
+ 
+    numberOfImproperPartitionsInternal(n,m,cm) ==
+      n = 0 => binomial(m,cm)$ICF
+      cm = 0 and n > 0 => 0
+      s := 0
+      for i in 0..n-1 repeat
+        s := s + numberOfImproperPartitionsInternal(i,m,cm-1)
+      s
+ 
+ 
+    -- definition of exported functions
+ 
+    numberOfImproperPartitions(n,m) ==
+      if n < 0 or m < 1 then return 0
+      if m = 1 or n = 0 then return 1
+      s := 0
+      for i in 0..n repeat
+        s := s + numberOfImproperPartitions(n-i,m-1)
+      s
+ 
+ 
+    unrankImproperPartitions0(n,m,k) ==
+      l : L I  := nil$(L I)
+      k < 0 => error"counting of partitions is started at 0"
+      k >= numberOfImproperPartitions(n,m) =>
+        error"there are not so many partitions"
+      for t in 0..(m-2) repeat
+        s : I := 0
+        for y in 0..n repeat
+          sOld := s
+          s := s + numberOfImproperPartitions(n-y,m-t-1)
+          if s > k then leave
+        l := append(l,list(y)$(L I))$(L I)
+        k := k - sOld
+        n := n - y
+      l := append(l,list(n)$(L I))$(L I)
+      l
+ 
+ 
+    unrankImproperPartitions1(n,m,k) ==
+      -- we use the counting procedure of the leaves in a tree
+      -- having the following structure: First of all non-zero
+      -- labels for the sons. If addition along a path gives n,
+      -- then we go on creating the subtree for (n choose cm)
+      -- where cm is the length of the path. These subsets determine
+      -- the positions for the non-zero labels for the partition
+      -- to be formeded. The remaining positions are filled by zeros.
+      nonZeros   : L I := nil$(L I)
+      partition  : V I :=  new(m::NNI,0$I)$(V I)
+      k < 0 => nonZeros
+      k >= numberOfImproperPartitions(n,m) => nonZeros
+      cm : I := m    --cm gives the depth of the tree
+      while n ^= 0 repeat
+        s : I := 0
+        cm := cm - 1
+        for y in n..1 by -1 repeat   --determination of the next son
+          sOld := s  -- remember old s
+          -- this functions counts the number of elements in a subtree
+          s := s + numberOfImproperPartitionsInternal(n-y,m,cm)
+          if s > k then leave
+        -- y is the next son, so put it into the pathlist "nonZero"
+        nonZeros := append(nonZeros,list(y)$(L I))$(L I)
+        k := k - sOld    --updating
+        n := n - y       --updating
+      --having found all m-cm non-zero entries we change the structure
+      --of the tree and determine the non-zero positions
+      nonZeroPos : L I := reverse subSet(m,m-cm,k)
+      --building the partition
+      for i in 1..m-cm  repeat partition.(1+nonZeroPos.i) := nonZeros.i
+      entries partition
+ 
+ 
+    subSet(n,m,k) ==
+      k < 0 or n < 0 or m < 0 or m > n =>
+        error "improper argument to subSet"
+      bin : I := binomial$ICF (n,m)
+      k >= bin =>
+        error "there are not so many subsets"
+      l : L I  := []
+      n = 0 => l
+      mm : I := k
+      s  : I := m
+      for t in 0..(m-1) repeat
+         for y in (s-1)..(n+1) repeat
+            if binomial$ICF (y,s) > mm then leave
+         l := append (l,list(y-1)$(L I))
+         mm := mm - binomial$ICF (y-1,s)
+         s := s-1
+      l
+ 
+ 
+    nextLatticePermutation(lambda, lattP, constructNotFirst) ==
+ 
+      lprime  : L I  := conjugate(lambda)$PartitionsAndPermutations
+      columns : NNI := (first(lambda)$(L I))::NNI
+      rows    : NNI := (first(lprime)$(L I))::NNI
+      n       : NNI :=(+/lambda)::NNI
+ 
+      not constructNotFirst =>   -- first lattice permutation
+        lattP := nil$(L I)
+        for i in columns..1 by -1 repeat
+          for l in 1..lprime(i) repeat
+            lattP := cons(i,lattP)
+        lattP
+ 
+      help : V I := new(columns,0) -- entry help(i) stores the number
+      -- of occurences of number i on our way from right to left
+      rightPosition  : NNI := n
+      leftEntry : NNI := lattP(rightPosition)::NNI
+      ready  : B  := false
+      until (ready or (not constructNotFirst)) repeat
+        rightEntry : NNI := leftEntry
+        leftEntry := lattP(rightPosition-1)::NNI
+        help(rightEntry) := help(rightEntry) + 1
+        -- search backward decreasing neighbour elements
+        if rightEntry > leftEntry then
+          if ((lprime(leftEntry)-help(leftEntry)) >_
+            (lprime(rightEntry)-help(rightEntry)+1)) then
+            -- the elements may be swapped because the number of occurances
+            -- of leftEntry would still be greater than those of rightEntry
+            ready := true
+            j : NNI := leftEntry + 1
+            -- search among the numbers leftEntry+1..rightEntry for the
+            -- smallest one which can take the place of leftEntry.
+            -- negation of condition above:
+            while (help(j)=0) or ((lprime(leftEntry)-lprime(j))
+              < (help(leftEntry)-help(j)+2)) repeat j := j + 1
+            lattP(rightPosition-1) := j
+            help(j) := help(j)-1
+            help(leftEntry) := help(leftEntry) + 1
+            -- reconstruct the rest of the list in increasing order
+            for l in rightPosition..n repeat
+              j := 0
+              while help(1+j) = 0 repeat j := j + 1
+              lattP(l::NNI) := j+1
+              help(1+j) := help(1+j) - 1
+        -- end of "if rightEntry > leftEntry"
+        rightPosition := (rightPosition-1)::NNI
+        if rightPosition = 1 then constructNotFirst := false
+      -- end of repeat-loop
+      not constructNotFirst =>  nil$(L I)
+      lattP
+ 
+ 
+    makeYoungTableau(lambda,gitter) ==
+      lprime  : L I  := conjugate(lambda)$PartitionsAndPermutations
+      columns : NNI := (first(lambda)$(L I))::NNI
+      rows    : NNI := (first(lprime)$(L I))::NNI
+      ytab    : M I  := new(rows,columns,0)
+      help    : V I  := new(columns,1)
+      i : I := -1     -- this makes the entries ranging from 0,..,n-1
+                      -- i := 0 would make it from 1,..,n.
+      j : I := 0
+      for l in 1..maxIndex gitter repeat
+        j := gitter(l)
+        i := i + 1
+        ytab(help(j),j) := i
+        help(j) := help(j) + 1
+      ytab
+ 
+ 
+--    coerce(ytab) ==
+--      lli := listOfLists(ytab)$(M I)
+--      -- remove the filling zeros in each row. It is assumed that
+--      -- that there are no such in row 0.
+--      for i in 2..maxIndex lli repeat
+--        THIS IS DEFINIVELY WRONG, I NEED A FUNCTION WHICH DELETES THE
+--        0s, in my version there are no mapping facilities yet.
+--        deleteInPlace(not zero?,lli i)
+--      tableau(lli)$Tableau(I)
+ 
+ 
+    listYoungTableaus(lambda) ==
+      lattice   : L I
+      ytab      : M I
+      younglist : L M I := nil$(L M I)
+      lattice   := nextLatticePermutation(lambda,lattice,false)
+      until null lattice repeat
+        ytab      := makeYoungTableau(lambda,lattice)
+        younglist := append(younglist,[ytab]$(L M I))$(L M I)
+        lattice   := nextLatticePermutation(lambda,lattice,true)
+      younglist
+ 
+ 
+    nextColeman(alpha,beta,C) ==
+      nrow  : NNI := #beta
+      ncol  : NNI := #alpha
+      vnull : V I  := vector(nil()$(L I)) -- empty vector
+      vzero : V I  := new(ncol,0)
+      vrest : V I  := new(ncol,0)
+      cnull : M I  := new(1,1,0)
+      coleman := copy C
+      if coleman ^= cnull then
+        -- look for the first row of "coleman" that has a succeeding
+        -- partition, this can be atmost row nrow-1
+        i : NNI := (nrow-1)::NNI
+        vrest := row(coleman,i) + row(coleman,nrow)
+        --for k in 1..ncol repeat
+        --  vrest(k) := coleman(i,k) + coleman(nrow,k)
+        succ := nextPartition(vrest,row(coleman, i),beta(i))
+        while (succ = vnull) repeat
+          if i = 1 then return cnull -- part is last partition
+          i := (i - 1)::NNI
+          --for k in 1..ncol repeat
+          --  vrest(k) := vrest(k) + coleman(i,k)
+          vrest := vrest + row(coleman,i)
+          succ := nextPartition(vrest, row(coleman, i), beta(i))
+        j : I := i
+        coleman := setRow_!(coleman, i, succ)
+        --for k in 1..ncol repeat
+        --  vrest(k) := vrest(k) - coleman(i,k)
+        vrest := vrest - row(coleman,i)
+      else
+        vrest := vector alpha
+        -- for k in 1..ncol repeat
+        --  vrest(k) := alpha(k)
+        coleman := new(nrow,ncol,0)
+        j : I := 0
+      for i in (j+1)::NNI..nrow-1 repeat
+        succ := nextPartition(vrest,vnull,beta(i))
+        coleman := setRow_!(coleman, i, succ)
+        vrest := vrest - succ
+        --for k in 1..ncol repeat
+        --  vrest(k) := vrest(k) - succ(k)
+      setRow_!(coleman, nrow, vrest)
+ 
+ 
+    nextPartition(gamma:V I, part:V I, number:I) ==
+      nextPartition(entries gamma, part, number)
+ 
+ 
+    nextPartition(gamma:L I,part:V I,number:I) ==
+      n : NNI := #gamma
+      vnull : V I := vector(nil()$(L I)) -- empty vector
+      if part ^= vnull then
+        i : NNI := 2
+        sum := part(1)
+        while (part(i) = gamma(i)) or (sum = 0) repeat
+          sum := sum + part(i)
+          i := i + 1
+          if i = 1+n then return vnull -- part is last partition
+        sum := sum - 1
+        part(i) := part(i) + 1
+      else
+        sum := number
+        part := new(n,0)
+        i := 1+n
+      j : NNI := 1
+      while sum > gamma(j) repeat
+        part(j) := gamma(j)
+        sum := sum - gamma(j)
+        j := j + 1
+      part(j) := sum
+      for k in j+1..i-1 repeat
+        part(k) := 0
+      part
+ 
+ 
+    inverseColeman(alpha,beta,C) ==
+      pi   : L I  := nil$(L I)
+      nrow : NNI := #beta
+      ncol : NNI := #alpha
+      help : V I  := new(nrow,0)
+      sum  : I   := 1
+      for i in 1..nrow repeat
+        help(i) := sum
+        sum := sum + beta(i)
+      for j in 1..ncol repeat
+        for i in 1..nrow repeat
+          for k in 2..1+C(i,j) repeat
+            pi := append(pi,list(help(i))$(L I))
+            help(i) := help(i) + 1
+      pi
+ 
+ 
+    coleman(alpha,beta,pi) ==
+      nrow : NNI := #beta
+      ncol : NNI := #alpha
+      temp : L L I := nil$(L L I)
+      help : L I  := nil$(L I)
+      colematrix : M I := new(nrow,ncol,0)
+      betasum  : NNI := 0
+      alphasum : NNI := 0
+      for i in 1..ncol repeat
+        help := nil$(L I)
+        for j in alpha(i)..1 by-1 repeat
+          help := cons(pi(j::NNI+alphasum),help)
+        alphasum := (alphasum + alpha(i))::NNI
+        temp := append(temp,list(help)$(L L I))
+      for i in 1..nrow repeat
+        help := nil$(L I)
+        for j in beta(i)..1 by-1 repeat
+          help := cons(j::NNI+betasum, help)
+        betasum := (betasum + beta(i))::NNI
+        for j in 1..ncol repeat
+          colematrix(i,j) := #intersect(brace(help),brace(temp(j)))
+      colematrix
+
+@
+<<SGCF.dotabb>>=
+"SGCF" [color="#FF4488",href="bookvol10.4.pdf#nameddest=SGCF"]
+"FSAGG" [color="#4488FF",href="bookvol10.2.pdf#nameddest=FSAGG"]
+"SGCF" -> "FSAGG"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{package SYMFUNC SymmetricFunctions}
 \pagehead{SymmetricFunctions}{SYMFUNC}
 \pagepic{ps/v104symmetricfunctions.ps}{SYMFUNC}{1.00}
@@ -75634,6 +84857,167 @@ TangentExpansions(R:Field): Exports == Implementation where
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package UTSSOL TaylorSolve}
+
+UTSSOL is a facility to compute the first few coefficients of a Taylor
+series given only implicitely by a function f that vanishes when applied to
+the Taylor series.
+
+It uses the method of undetermined coefficients.
+
+\begin{verbatim}
+  Could I either
+  \begin{itemize}
+  \item take a function [[UTSCAT F -> UTSCAT F]] and still be able to compute
+    with undetermined coefficients, or
+  \item take a function [[F -> F]], and do likewise?
+  \end{itemize}
+
+  Let's see.
+
+  Try to compute the equation without resorting to power series. I.e., %
+  [[c: SUP SUP F]], and [[f: SUP SUP F -> SUP SUP F]]. Won't this make the
+  computation of coefficients terribly slow?
+
+  I could also try to replace transcendental kernels with variables\dots
+
+  Unfortunately, [[SUP F]] does not have [[TRANFUN]] -- well, it can't, of
+  course. However, I'd like to be able to compute %
+  [[sin(1+monomial(1,1)$UFPS SUP EXPR INT)]].
+\end{verbatim}
+
+\pagehead{TaylorSolve}{UTSSOL}
+\pagepic{ps/v104taylorsolve.ps}{UTSSOL}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package UTSSOL TaylorSolveTaylorSolve>>=
+)abb package UTSSOL TaylorSolve
+TaylorSolve(F, UTSF, UTSSUPF): Exports == Implementation where
+    F: Field
+    SUP  ==> SparseUnivariatePolynomialExpressions
+    UTSF: UnivariateTaylorSeriesCategory F
+    UTSSUPF: UnivariateTaylorSeriesCategory SUP F
+    NNI  ==> NonNegativeInteger
+
+    Exports == with
+        seriesSolve: (UTSSUPF -> UTSSUPF, List F) -> UTSF
+
+    Implementation == add
+<<implementation: UTSSOL TaylorSolve>>
+@
+
+<<implementation: UTSSOL TaylorSolve>>=
+        seriesSolve(f, l) ==
+            c1 := map(#1::(SUP F), l)$ListFunctions2(F, SUP F)::(Stream SUP F)
+            coeffs: Stream SUP F := concat(c1, generate(monomial(1$F,1$NNI)))
+--            coeffs: Stream SUP F := concat(c1, monomial(1$F,1$NNI))
+@
+
+coeffs is the stream of the already computed coefficients of the solution,
+plus one which is so far undetermined. We store in st.2 the complete stream
+and in st.1 the stream starting with the first coefficient that has
+possibly not yet been computed.
+
+\begin{verbatim}
+  The mathematics is not quite worked out. If [[coeffs]] is initialized as
+  stream with all coefficients set to the \emph{same} transcendental value,
+  and not enough initial values are given, then the missing ones are
+  implicitely assumed to be all identical. It may well happen that a solution
+  is produced, although it is not uniquely determined\dots
+\end{verbatim}
+
+<<implementation: UTSSOL TaylorSolve>>=
+            st: List Stream SUP F := [coeffs, coeffs]
+@
+
+Consider an arbitrary equation $f\big(x, y(x)\big)=0$. When setting $x=0$, we
+obtain $f\big(0, y(0)\big)=0$. It is not necessarily the case that this
+determines $y(0)$ uniquely, so we need one initial value that satisfies this
+equation.
+\begin{verbatim}
+  [[seriesSolve]] should check that the given initial values satisfy $f\big(0, y(0),
+  y'(0),...\big) = 0$.
+\end{verbatim}
+Now consider the derivatives of $f$, where we write $y$ instead of $y(x)$ for
+better readability:
+\[
+  \frac{d}{dx}f(x, y)=f_1(x, y) + f_2(x, y)y^\prime
+\]
+and
+\begin{verbatim}
+  \frac{d^2}{dx^2}f(x, y)&=f_{1,1}(x, y)\\
+                         &+f_{1,2}(x, y)y^\prime\\
+                         &+f_{2,1}(x, y)y^\prime\\
+                         &+f_{2,2}(x, y)(y^\prime)^2\\
+                         &+f_2(x, y)y^{\prime\prime}.
+\end{verbatim}
+In general, $\frac{d^2}{dx^2}f(x, y)$ depends only linearly on
+$y^{\prime\prime}$.
+
+\begin{verbatim}
+  This points to another possibility: Since we know that we only need to solve
+  linear equations, we could compute two values and then use interpolation.
+  This might be a bit slower, but more importantly: can we still check that we
+  have enough initial values? Furthermore, we then really need that $f$ is
+  analytic, i.e., operators are not necessarily allowed anymore. However, it
+  seems that composition is allowed.
+\end{verbatim}
+
+<<implementation: UTSSOL TaylorSolve>>=
+            next: () -> F := 
+                nr := st.1
+                res: F
+
+                if ground?(coeff: SUP F := nr.1)$(SUP F)
+@
+%$
+
+If the next element was already calculated, we can simply return it:
+
+<<implementation: UTSSOL TaylorSolve>>=
+                then 
+                    res := ground coeff 
+                    st.1 := rest nr
+                else
+@
+
+Otherwise, we have to find the first non-satisfied relation and solve it. It
+should be linear, or a single non-constant monomial. That is, the solution
+should be unique.
+
+<<implementation: UTSSOL TaylorSolve>>=
+                    ns := st.2
+                    eqs: Stream SUP F := coefficients f series ns
+                    while zero? first eqs repeat eqs := rest eqs
+                    eq: SUP F := first eqs
+                    if degree eq > 1 then
+                        if monomial? eq then res := 0
+                        else 
+                            output(hconcat("The equation is: ", eq::OutputForm))
+                                  $OutputPackage
+                            error "seriesSolve: equation for coefficient not linear"
+                    else res := (-coefficient(eq, 0$NNI)$(SUP F)
+                                 /coefficient(eq, 1$NNI)$(SUP F))
+
+                    nr.1 := res::SUP F
+--                    concat!(st.2, monomial(1$F,1$NNI))
+                    st.1 := rest nr
+
+                res
+
+            series generate next
+
+@
+<<UTSSOL.dotabb>>=
+"UTSSOL" [color="#FF4488",href="bookvol10.4.pdf#nameddest=UTSSOL"]
+"UTSCAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=UTSCAT"]
+"UTSSOL" -> "UTSCAT"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{package TEMUTL TemplateUtilities}
 \pagehead{TemplateUtilities}{TEMUTL}
 \pagepic{ps/v104templateutilities.ps}{TEMUTL}{1.00}
@@ -75691,6 +85075,71 @@ TemplateUtilities(): Exports == Implementation where
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package TOOLSIGN ToolsForSign}
+\pagehead{ToolsForSign}{TOOLSIGN}
+\pagepic{ps/v104toolsforsign.ps}{TOOLSIGN}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package TOOLSIGN ToolsForSign>>=
+)abbrev package TOOLSIGN ToolsForSign
+++ Tools for the sign finding utilities
+++ Author: Manuel Bronstein
+++ Date Created: 25 August 1989
+++ Date Last Updated: 26 November 1991
+++ Description: Tools for the sign finding utilities.
+ToolsForSign(R:Ring): with
+    sign     : R      -> Union(Integer, "failed")
+	++ sign(r) \undocumented
+    nonQsign : R      -> Union(Integer, "failed")
+	++ nonQsign(r) \undocumented
+    direction: String -> Integer
+	++ direction(s) \undocumented
+ == add
+ 
+    if R is AlgebraicNumber then
+      nonQsign r ==
+        sign((r pretend AlgebraicNumber)::Expression(
+                  Integer))$ElementaryFunctionSign(Integer, Expression Integer)
+    else
+      nonQsign r == "failed"
+ 
+    if R has RetractableTo Fraction Integer then
+      sign r ==
+        (u := retractIfCan(r)@Union(Fraction Integer, "failed"))
+          case Fraction(Integer) => sign(u::Fraction Integer)
+        nonQsign r
+ 
+    else
+      if R has RetractableTo Integer then
+        sign r ==
+          (u := retractIfCan(r)@Union(Integer, "failed"))
+            case "failed" => "failed"
+          sign(u::Integer)
+ 
+      else
+        sign r ==
+          zero? r => 0
+--          one? r => 1
+          r = 1 => 1
+          r = -1 => -1
+          "failed"
+ 
+    direction st ==
+      st = "right" => 1
+      st = "left" => -1
+      error "Unknown option"
+
+@
+<<TOOLSIGN.dotabb>>=
+"TOOLSIGN" [color="#FF4488",href="bookvol10.4.pdf#nameddest=TOOLSIGN"]
+"FS" [color="#4488FF",href="bookvol10.2.pdf#nameddest=FS"]
+"TOOLSIGN" -> "FS"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{package DRAW TopLevelDrawFunctions}
 \pagehead{TopLevelDrawFunctions}{DRAW}
 \pagepic{ps/v104topleveldrawfunctions.ps}{DRAW}{1.00}
@@ -76922,6 +86371,35 @@ TopLevelDrawFunctionsForPoints(): Exports == Implementation where
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package TOPSP TopLevelThreeSpace}
+\pagehead{TopLevelThreeSpace}{TOPSP}
+\pagepic{ps/v104toplevelthreespace.ps}{TOPSP}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package TOPSP TopLevelThreeSpace>>=
+)abbrev package TOPSP TopLevelThreeSpace
+++ Description:
+++ This package exports a function for making a \spadtype{ThreeSpace}
+TopLevelThreeSpace(): with
+    createThreeSpace: () -> ThreeSpace DoubleFloat
+      ++ createThreeSpace() creates a \spadtype{ThreeSpace(DoubleFloat)} object 
+      ++ capable of holding point, curve, mesh components and any combination.
+  == add
+    createThreeSpace() == create3Space()$ThreeSpace(DoubleFloat)
+
+@
+<<TOPSP.dotabb>>=
+"TOPSP" [color="#FF4488",href="bookvol10.4.pdf#nameddest=TOPSP"]
+"FIELD"  [color="#4488FF",href="bookvol10.2.pdf#nameddest=FIELD"]
+"RADCAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=RADCAT"]
+"TOPSP" -> "FIELD"
+"TOPSP" -> "RADCAT"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{package INTHERTR TranscendentalHermiteIntegration}
 \pagehead{TranscendentalHermiteIntegration}{INTHERTR}
 \pagepic{ps/v104transcendentalhermiteintegration.ps}{INTHERTR}{1.00}
@@ -79528,6 +89006,218 @@ UnivariateSkewPolynomialCategoryOps(R, C): Exports == Implementation where
 
 @
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package UNISEG2 UniversalSegmentFunctions2}
+\pagehead{UniversalSegmentFunctions2}{UNISEG2}
+\pagepic{ps/v104universalsegmentfunctions2.ps}{UNISEG2}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package UNISEG2 UniversalSegmentFunctions2>>=
+)abbrev package UNISEG2 UniversalSegmentFunctions2
+++ Author:
+++ Date Created:
+++ Date Last Updated: June 4, 1991
+++ Basic Operations:
+++ Related Domains: Segment, UniversalSegment
+++ Also See:
+++ AMS Classifications:
+++ Keywords: equation
+++ Examples:
+++ References:
+++ Description:
+++   This package provides operations for mapping functions onto segments.
+
+UniversalSegmentFunctions2(R:Type, S:Type): with
+    map: (R -> S, UniversalSegment R) -> UniversalSegment S
+        ++ map(f,seg) returns the new segment obtained by applying
+        ++ f to the endpoints of seg.
+
+    if R has OrderedRing then
+      map: (R -> S, UniversalSegment R) -> Stream S
+        ++ map(f,s) expands the segment s, applying \spad{f} to each value.
+
+
+  == add
+    map(f:R -> S, u:UniversalSegment R):UniversalSegment S ==
+      s := f lo u
+      hasHi u => segment(s, f hi u)
+      segment s
+
+    if R has OrderedRing then
+      map(f:R -> S, u:UniversalSegment R): Stream S ==
+        map(f, expand u)$StreamFunctions2(R, S)
+
+@
+<<UNISEG2.dotabb>>=
+"UNISEG2" [color="#FF4488",href="bookvol10.4.pdf#nameddest=UNISEG2"]
+"OCAMON" [color="#4488FF",href="bookvol10.2.pdf#nameddest=OCAMON"]
+"UNISEG2" -> "OCAMON"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package UDPO UserDefinedPartialOrdering}
+\pagehead{UserDefinedPartialOrdering}{UDPO}
+\pagepic{ps/v104userdefinedpartialordering.ps}{UDPO}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package UDPO UserDefinedPartialOrdering>>=
+)abbrev package UDPO UserDefinedPartialOrdering
+++ Author: Manuel Bronstein
+++ Date Created: March 1990
+++ Date Last Updated: 9 April 1991
+++ Description:
+++  Provides functions to force a partial ordering on any set.
+UserDefinedPartialOrdering(S:SetCategory): with
+  setOrder    : List S -> Void
+    ++ setOrder([a1,...,an]) defines a partial ordering on S given by:
+    ++    (1)  \spad{a1 < a2 < ... < an}.
+    ++    (2)  \spad{b < ai   for i = 1..n} and b not among the ai's.
+    ++    (3)  undefined on \spad{(b, c)} if neither is among the ai's.
+  setOrder    : (List S, List S) -> Void
+    ++ setOrder([b1,...,bm], [a1,...,an]) defines a partial
+    ++ ordering on S given by:
+    ++    (1)  \spad{b1 < b2 < ... < bm < a1 < a2 < ... < an}.
+    ++    (2)  \spad{bj < c < ai}  for c not among the ai's and bj's.
+    ++    (3)  undefined on \spad{(c,d)} if neither is among the ai's,bj's.
+  getOrder    : () -> Record(low: List S, high: List S)
+    ++ getOrder() returns \spad{[[b1,...,bm], [a1,...,an]]} such that the
+    ++ partial ordering on S was given by
+    ++ \spad{setOrder([b1,...,bm],[a1,...,an])}.
+  less?       : (S, S) -> Union(Boolean, "failed")
+    ++ less?(a, b) compares \spad{a} and b in the partial ordering induced by
+    ++ setOrder.
+  less?       : (S, S, (S, S) -> Boolean) -> Boolean
+    ++ less?(a, b, fn) compares \spad{a} and b in the partial ordering induced
+    ++ by setOrder, and returns \spad{fn(a, b)} if \spad{a} 
+    ++ and b are not comparable
+    ++ in that ordering.
+  largest     : (List S, (S, S) -> Boolean) -> S
+    ++ largest(l, fn) returns the largest element of l where the partial
+    ++ ordering induced by setOrder is completed into a total one by fn.
+  userOrdered?: () -> Boolean
+    ++ userOrdered?() tests if the partial ordering induced by 
+    ++ \spadfunFrom{setOrder}{UserDefinedPartialOrdering} is not empty.
+  if S has OrderedSet then
+    largest: List S -> S
+      ++ largest l returns the largest element of l where the partial
+      ++ ordering induced by setOrder is completed into a total one by
+      ++ the ordering on S.
+    more?  : (S, S) -> Boolean
+      ++ more?(a, b) compares \spad{a} and b in the partial ordering induced
+      ++ by setOrder, and uses the ordering on S if \spad{a} and b are not
+      ++ comparable in the partial ordering.
+ 
+ == add
+  llow :Reference List S := ref nil()
+  lhigh:Reference List S := ref nil()
+ 
+  userOrdered?() == not(empty? deref llow) or not(empty? deref lhigh)
+  getOrder()     == [deref llow, deref lhigh]
+  setOrder l     == setOrder(nil(), l)
+ 
+  setOrder(l, h) ==
+    setref(llow, removeDuplicates l)
+    setref(lhigh, removeDuplicates h)
+    void
+ 
+  less?(a, b, f) ==
+    (u := less?(a, b)) case "failed" => f(a, b)
+    u::Boolean
+ 
+  largest(x, f) ==
+    empty? x => error "largest: empty list"
+    empty? rest x => first x
+    a := largest(rest x, f)
+    less?(first x, a, f) => a
+    first x
+ 
+  less?(a, b) ==
+    for x in deref llow repeat
+      x = a => return(a ^= b)
+      x = b => return false
+    aa := bb := false$Boolean
+    for x in deref lhigh repeat
+      if x = a then
+        bb => return false
+        aa := true
+      if x = b then
+        aa => return(a ^= b)
+        bb := true
+    aa => false
+    bb => true
+    "failed"
+ 
+  if S has OrderedSet then
+    more?(a, b) == not less?(a, b, #1 <$S #2)
+    largest x   == largest(x, #1 <$S #2)
+
+@
+<<UDPO.dotabb>>=
+"UDPO" [color="#FF4488",href="bookvol10.4.pdf#nameddest=UDPO"]
+"FLAGG" [color="#4488FF",href="bookvol10.2.pdf#nameddest=FLAGG"]
+"UDPO" -> "FLAGG"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{package UDVO UserDefinedVariableOrdering}
+\pagehead{UserDefinedVariableOrdering}{UDVO}
+\pagepic{ps/v104userdefinedvariableordering.ps}{UDVO}{1.00}
+
+{\bf Exports:}\\
+\begin{tabular}{lllll}
+\end{tabular}
+
+<<package UDVO UserDefinedVariableOrdering>>=
+)abbrev package UDVO UserDefinedVariableOrdering
+++ Author: Manuel Bronstein
+++ Date Created: March 1990
+++ Date Last Updated: 9 April 1991
+++ Description:
+++  This packages provides functions to allow the user to select the ordering
+++  on the variables and operators for displaying polynomials,
+++  fractions and expressions. The ordering affects the display
+++  only and not the computations.
+UserDefinedVariableOrdering(): with
+  setVariableOrder  : List Symbol -> Void
+    ++ setVariableOrder([a1,...,an]) defines an ordering on the
+    ++ variables given by \spad{a1 > a2 > ... > an > other variables}.
+  setVariableOrder  : (List Symbol, List Symbol) -> Void
+    ++ setVariableOrder([b1,...,bm], [a1,...,an]) defines an ordering
+    ++ on the variables given by
+    ++ \spad{b1 > b2 > ... > bm >} other variables \spad{>  a1 > a2 > ... > an}.
+  getVariableOrder  : () -> Record(high:List Symbol, low:List Symbol)
+    ++ getVariableOrder() returns \spad{[[b1,...,bm], [a1,...,an]]} such that
+    ++ the ordering on the variables was given by
+    ++ \spad{setVariableOrder([b1,...,bm], [a1,...,an])}.
+  resetVariableOrder: () -> Void
+    ++ resetVariableOrder() cancels any previous use of
+    ++ setVariableOrder and returns to the default system ordering.
+ == add
+  import UserDefinedPartialOrdering(Symbol)
+ 
+  setVariableOrder l       == setOrder reverse l
+  setVariableOrder(l1, l2) == setOrder(reverse l2, reverse l1)
+  resetVariableOrder()     == setVariableOrder(nil(), nil())
+ 
+  getVariableOrder() ==
+    r := getOrder()
+    [reverse(r.high), reverse(r.low)]
+
+@
+<<UDVO.dotabb>>=
+"UDVO" [color="#FF4488",href="bookvol10.4.pdf#nameddest=UDVO"]
+"BASTYPE" [color="#4488FF",href="bookvol10.2.pdf#nameddest=BASTYPE"]
+"KOERCE" [color="#4488FF",href="bookvol10.2.pdf#nameddest=KOERCE"]
+"UDVO" -> "BASTYPE"
+"UDVO" -> "KOERCE"
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \section{package UTSODETL UTSodetools}
 \pagehead{UTSodetools}{UTSODETL}
 \pagepic{ps/v104utsodetools.ps}{UTSODETL}{1.00}
@@ -79877,13 +89567,16 @@ WildFunctionFieldIntegralBasis(K,R,UP,F): Exports == Implementation where
 <<package COORDSYS CoordinateSystems>>
 <<package CRAPACK CRApackage>>
 <<package CYCLES CycleIndicators>>
+<<package CSTTOOLS CyclicStreamTools>>
 <<package CYCLOTOM CyclotomicPolynomialPackage>>
 
 <<package DFINTTLS DefiniteIntegrationTools>>
 <<package DEGRED DegreeReductionPackage>>
+<<package DIOSP DiophantineSolutionPackage>>
 <<package DLP DiscreteLogarithmPackage>>
 <<package DISPLAY DisplayPackage>>
 <<package DDFACT DistinctDegreeFactorize>>
+<<package DFSFUN DoubleFloatSpecialFunctions>>
 <<package DBLRESP DoubleResultantPackage>>
 <<package DRAWCX DrawComplex>>
 <<package DRAWHACK DrawNumericHack>>
@@ -79914,6 +89607,7 @@ WildFunctionFieldIntegralBasis(K,R,UP,F): Exports == Implementation where
 <<package ESCONT ExpertSystemContinuityPackage>>
 <<package ESCONT1 ExpertSystemContinuityPackage1>>
 <<package EXPR2 ExpressionFunctions2>>
+<<package EXPRSOL ExpressionSolve>>
 <<package ES1 ExpressionSpaceFunctions1>>
 <<package ES2 ExpressionSpaceFunctions2>>
 <<package EXPRODE ExpressionSpaceODESolver>>
@@ -79973,6 +89667,7 @@ WildFunctionFieldIntegralBasis(K,R,UP,F): Exports == Implementation where
 <<package GENEEZ GenExEuclid>>
 <<package GENUFACT GenUFactorize>>
 <<package INTG0 GenusZeroIntegration>>
+<<package GOSPER GosperSummationMethod>>
 <<package GRDEF GraphicsDefaults>>
 <<package GRAY GrayCode>>
 <<package GBF GroebnerFactorizationPackage>>
@@ -79992,6 +89687,7 @@ WildFunctionFieldIntegralBasis(K,R,UP,F): Exports == Implementation where
 <<package HEUGCD HeuGcd>>
 
 <<package IDECOMP IdealDecompositionPackage>>
+<<package INCRMAPS IncrementingMaps>>
 <<package INFPROD0 InfiniteProductCharacteristicZero>>
 <<package INPRODFF InfiniteProductFiniteField>>
 <<package INPRODPF InfiniteProductPrimeField>>
@@ -80007,6 +89703,8 @@ WildFunctionFieldIntegralBasis(K,R,UP,F): Exports == Implementation where
 <<package INBFF InnerNormalBasisFieldFunctions>>
 <<package INEP InnerNumericEigenPackage>>
 <<package INFSP InnerNumericFloatSolvePackage>>
+<<package INPSIGN InnerPolySign>>
+<<package ISUMP InnerPolySum>>
 <<package ITRIGMNP InnerTrigonometricManipulations>>
 <<package INFORM1 InputFormFunctions1>>
 <<package INTBIT IntegerBits>>
@@ -80039,6 +89737,9 @@ WildFunctionFieldIntegralBasis(K,R,UP,F): Exports == Implementation where
 <<package LODOF LinearOrdinaryDifferentialOperatorFactorizer>>
 <<package LODOOPS LinearOrdinaryDifferentialOperatorsOps>>
 <<package LPEFRAC LinearPolynomialEquationByFractions>>
+<<package LSMP LinearSystemMatrixPackage>>
+<<package LSMP1 LinearSystemMatrixPackage1>>
+<<package LSPP LinearSystemPolynomialPackage>>
 <<package LGROBP LinGroebnerPackage>>
 <<package LF LiouvillianFunction>>
 <<package LIST2 ListFunctions2>>
@@ -80067,6 +89768,7 @@ WildFunctionFieldIntegralBasis(K,R,UP,F): Exports == Implementation where
 <<package MHROWRED ModularHermitianRowReduction>>
 <<package MRF2 MonoidRingFunctions2>>
 <<package MONOTOOL MonomialExtensionTools>>
+<<package MSYSCMD MoreSystemCommands>>
 <<package MPCPF MPolyCatPolyFactorizer>>
 <<package MPRFF MPolyCatRationalFunctionFactorizer>>
 <<package MPC2 MPolyCatFunctions2>>
@@ -80093,6 +89795,7 @@ WildFunctionFieldIntegralBasis(K,R,UP,F): Exports == Implementation where
 <<package NAGC02 NagPolynomialRootsPackage>>
 <<package NAGC05 NagRootFindingPackage>>
 <<package NAGC06 NagSeriesSummationPackage>>
+<<package NAGS NagSpecialFunctionsPackage>>
 <<package NSUP2 NewSparseUnivariatePolynomialFunctions2>>
 <<package NEWTON NewtonInterpolation>>
 <<package NCODIV NonCommutativeOperatorDivision>>
@@ -80104,6 +89807,7 @@ WildFunctionFieldIntegralBasis(K,R,UP,F): Exports == Implementation where
 <<package NPCOEF NPCoef>>
 <<package NFINTBAS NumberFieldIntegralBasis>>
 <<package NUMFMT NumberFormats>>
+<<package NTPOLFN NumberTheoreticPolynomialFunctions>>
 <<package NUMERIC Numeric>>
 <<package NUMODE NumericalOrdinaryDifferentialEquations>>
 <<package NUMQUAD NumericalQuadrature>>
@@ -80118,9 +89822,10 @@ WildFunctionFieldIntegralBasis(K,R,UP,F): Exports == Implementation where
 <<package ONECOMP2 OnePointCompletionFunctions2>>
 <<package OMPKG OpenMathPackage>>
 <<package OMSERVER OpenMathServerPackage>>
+<<package OPQUERY OperationsQuery>>
 <<package ORDCOMP2 OrderedCompletionFunctions2>>
 <<package ORDFUNS OrderingFunctions>>
-<<package OPQUERY OperationsQuery>>
+<<package ORTHPOL OrthogonalPolynomialFunctions>>
 <<package OUT OutputPackage>>
 
 <<package PADEPAC PadeApproximantPackage>>
@@ -80172,6 +89877,7 @@ WildFunctionFieldIntegralBasis(K,R,UP,F): Exports == Implementation where
 <<package PINTERPA PolynomialInterpolationAlgorithms>>
 <<package PNTHEORY PolynomialNumberTheoryFunctions>>
 <<package POLYROOT PolynomialRoots>>
+<<package SOLVEFOR PolynomialSolveByFormulas>>
 <<package PSQFR PolynomialSquareFree>>
 <<package POLY2UP PolynomialToUnivariatePolynomial>>
 <<package LIMITPS PowerSeriesLimitPackage>>
@@ -80192,6 +89898,7 @@ WildFunctionFieldIntegralBasis(K,R,UP,F): Exports == Implementation where
 <<package QFCAT2 QuotientFieldCategoryFunctions2>>
 
 <<package REP RadicalEigenPackage>>
+<<package SOLVERAD RadicalSolvePackage>>
 <<package RADUTIL RadixUtilities>>
 <<package RDIST RandomDistributions>>
 <<package RFDIST RandomFloatDistributions>>
@@ -80203,6 +89910,9 @@ WildFunctionFieldIntegralBasis(K,R,UP,F): Exports == Implementation where
 <<package RFFACT RationalFunctionFactor>>
 <<package RFFACTOR RationalFunctionFactorizer>>
 <<package INTRF RationalFunctionIntegration>>
+<<package LIMITRF RationalFunctionLimitPackage>>
+<<package SIGNRF RationalFunctionSign>>
+<<package SUMRF RationalFunctionSum>>
 <<package INTRAT RationalIntegration>>
 <<package RINTERP RationalInterpolation>>
 <<package ODERAT RationalLODE>>
@@ -80227,26 +89937,45 @@ WildFunctionFieldIntegralBasis(K,R,UP,F): Exports == Implementation where
 
 <<package SAERFFC SAERationalFunctionAlgFactor>>
 <<package FORMULA1 ScriptFormulaFormat1>>
+<<package SEGBIND2 SegmentBindingFunctions2>>
+<<package SEG2 SegmentFunctions2>>
 <<package SAEFACT SimpleAlgebraicExtensionAlgFactor>>
 <<package SIMPAN SimplifyAlgebraicNumberConvertPackage>>
+<<package SMITH SmithNormalForm>>
 <<package SCACHE SortedCache>>
+<<package SORTPAK SortPackage>>
 <<package SUP2 SparseUnivariatePolynomialFunctions2>>
 <<package SPECOUT SpecialOutputPackage>>
+<<package SFQCMPK SquareFreeQuasiComponentPackage>>
+<<package SRDCMPK SquareFreeRegularSetDecompositionPackage>>
+<<package SFRGCD SquareFreeRegularTriangularSetGcdPackage>>
 <<package MATSTOR StorageEfficientMatrixOperations>>
+<<package STREAM1 StreamFunctions1>>
+<<package STREAM2 StreamFunctions2>>
+<<package STREAM3 StreamFunctions3>>
 <<package STINPROD StreamInfiniteProduct>>
+<<package STTAYLOR StreamTaylorSeriesOperations>>
+<<package STTF StreamTranscendentalFunctions>>
+<<package STTFNC StreamTranscendentalFunctionsNonCommutative>>
 <<package SCPKG StructuralConstantsPackage>>
+<<package SHP SturmHabichtPackage>>
 <<package SUBRESP SubResultantPackage>>
 <<package SUPFRACF SupFractionFactorizer>>
 <<package ODESYS SystemODESolver>>
+<<package SYSSOLP SystemSolvePackage>>
+<<package SGCF SymmetricGroupCombinatoricFunctions>>
 <<package SYMFUNC SymmetricFunctions>>
 
 <<package TBCMPPK TabulatedComputationPackage>>
 <<package TANEXP TangentExpansions>>
+<<package UTSSOL TaylorSolve>>
 <<package TEMUTL TemplateUtilities>>
+<<package TOOLSIGN ToolsForSign>>
 <<package DRAW TopLevelDrawFunctions>>
 <<package DRAWCURV TopLevelDrawFunctionsForAlgebraicCurves>>
 <<package DRAWCFUN TopLevelDrawFunctionsForCompiledFunctions>>
 <<package DRAWPT TopLevelDrawFunctionsForPoints>>
+<<package TOPSP TopLevelThreeSpace>>
 <<package INTHERTR TranscendentalHermiteIntegration>>
 <<package INTTR TranscendentalIntegration>>
 <<package TRMANIP TranscendentalManipulations>>
@@ -80265,6 +89994,9 @@ WildFunctionFieldIntegralBasis(K,R,UP,F): Exports == Implementation where
 <<package UPSQFREE UnivariatePolynomialSquareFree>>
 <<package UPXS2 UnivariatePuiseuxSeriesFunctions2>>
 <<package OREPCTO UnivariateSkewPolynomialCategoryOps>>
+<<package UNISEG2 UniversalSegmentFunctions2>>
+<<package UDPO UserDefinedPartialOrdering>>
+<<package UDVO UserDefinedVariableOrdering>>
 <<package UTSODETL UTSodetools>>
 
 <<package WFFINTBS WildFunctionFieldIntegralBasis>>
diff --git a/books/ps/v104cyclicstreamtools.ps b/books/ps/v104cyclicstreamtools.ps
new file mode 100644
index 0000000..6c0a47a
--- /dev/null
+++ b/books/ps/v104cyclicstreamtools.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 132 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 96 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% CSTTOOLS
+gsave
+[ /Rect [ 0 72 88 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=CSTTOOLS) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 88 108 moveto
+2.84217e-14 108 lineto
+7.10543e-15 72 lineto
+88 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 88 108 moveto
+2.84217e-14 108 lineto
+7.10543e-15 72 lineto
+88 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+8 85.9 moveto 72 (CSTTOOLS) alignedtext
+grestore
+% LZSTAGG
+gsave
+[ /Rect [ 5 0 83 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=LZSTAGG) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 83 36 moveto
+5 36 lineto
+5 1.06581e-14 lineto
+83 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 83 36 moveto
+5 36 lineto
+5 1.06581e-14 lineto
+83 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+12.5 13.9 moveto 63 (LZSTAGG) alignedtext
+grestore
+% CSTTOOLS->LZSTAGG
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 44 72 moveto
+44 64 44 55 44 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 47.5001 46 moveto
+44 36 lineto
+40.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 47.5001 46 moveto
+44 36 lineto
+40.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 132 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104diophantinesolutionpackage.ps b/books/ps/v104diophantinesolutionpackage.ps
new file mode 100644
index 0000000..404c22b
--- /dev/null
+++ b/books/ps/v104diophantinesolutionpackage.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 122 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 86 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% DIOSP
+gsave
+[ /Rect [ 11 72 67 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=DIOSP) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 67 108 moveto
+11 108 lineto
+11 72 lineto
+67 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 67 108 moveto
+11 108 lineto
+11 72 lineto
+67 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+19 85.9 moveto 40 (DIOSP) alignedtext
+grestore
+% IVECTOR
+gsave
+[ /Rect [ 0 0 78 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.3.pdf#nameddest=IVECTOR) >>
+  /Subtype /Link
+/ANN pdfmark
+0.273 0.733 1.000 nodecolor
+newpath 78 36 moveto
+2.84217e-14 36 lineto
+7.10543e-15 1.06581e-14 lineto
+78 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.273 0.733 1.000 nodecolor
+newpath 78 36 moveto
+2.84217e-14 36 lineto
+7.10543e-15 1.06581e-14 lineto
+78 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+8 13.9 moveto 62 (IVECTOR) alignedtext
+grestore
+% DIOSP->IVECTOR
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 39 72 moveto
+39 64 39 55 39 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 42.5001 46 moveto
+39 36 lineto
+35.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 42.5001 46 moveto
+39 36 lineto
+35.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 122 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104doublefloatspecialfunctions.ps b/books/ps/v104doublefloatspecialfunctions.ps
new file mode 100644
index 0000000..453bcb0
--- /dev/null
+++ b/books/ps/v104doublefloatspecialfunctions.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 128 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 92 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% DFSFUN
+gsave
+[ /Rect [ 8 72 76 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=DFSFUN) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 76 108 moveto
+8 108 lineto
+8 72 lineto
+76 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 76 108 moveto
+8 108 lineto
+8 72 lineto
+76 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+15.5 85.9 moveto 53 (DFSFUN) alignedtext
+grestore
+% COMPCAT
+gsave
+[ /Rect [ 0 0 84 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=COMPCAT) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 84 36 moveto
+2.84217e-14 36 lineto
+7.10543e-15 1.06581e-14 lineto
+84 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 84 36 moveto
+2.84217e-14 36 lineto
+7.10543e-15 1.06581e-14 lineto
+84 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+8 13.9 moveto 68 (COMPCAT) alignedtext
+grestore
+% DFSFUN->COMPCAT
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 42 72 moveto
+42 64 42 55 42 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 45.5001 46 moveto
+42 36 lineto
+38.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 45.5001 46 moveto
+42 36 lineto
+38.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 128 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104expressionsolve.ps b/books/ps/v104expressionsolve.ps
new file mode 100644
index 0000000..b913738
--- /dev/null
+++ b/books/ps/v104expressionsolve.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 122 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 86 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% EXPRSOL
+gsave
+[ /Rect [ 0 72 78 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=EXPRSOL) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 78 108 moveto
+2.84217e-14 108 lineto
+7.10543e-15 72 lineto
+78 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 78 108 moveto
+2.84217e-14 108 lineto
+7.10543e-15 72 lineto
+78 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+8 85.9 moveto 62 (EXPRSOL) alignedtext
+grestore
+% UTSSOL
+gsave
+[ /Rect [ 5 0 73 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=UTSSOL) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 73 36 moveto
+5 36 lineto
+5 1.06581e-14 lineto
+73 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 73 36 moveto
+5 36 lineto
+5 1.06581e-14 lineto
+73 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+12.5 13.9 moveto 53 (UTSSOL) alignedtext
+grestore
+% EXPRSOL->UTSSOL
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 39 72 moveto
+39 64 39 55 39 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 42.5001 46 moveto
+39 36 lineto
+35.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 42.5001 46 moveto
+39 36 lineto
+35.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 122 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104gospersummationmethod.ps b/books/ps/v104gospersummationmethod.ps
new file mode 100644
index 0000000..fdfaf59
--- /dev/null
+++ b/books/ps/v104gospersummationmethod.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 114 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 78 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% GOSPER
+gsave
+[ /Rect [ 0 72 70 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=GOSPER) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 70 108 moveto
+2.13163e-14 108 lineto
+7.10543e-15 72 lineto
+70 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 70 108 moveto
+2.13163e-14 108 lineto
+7.10543e-15 72 lineto
+70 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+8 85.9 moveto 54 (GOSPER) alignedtext
+grestore
+% PFECAT
+gsave
+[ /Rect [ 2 0 68 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=PFECAT) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 68 36 moveto
+2 36 lineto
+2 1.06581e-14 lineto
+68 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 68 36 moveto
+2 36 lineto
+2 1.06581e-14 lineto
+68 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+9.5 13.9 moveto 51 (PFECAT) alignedtext
+grestore
+% GOSPER->PFECAT
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 35 72 moveto
+35 64 35 55 35 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 38.5001 46 moveto
+35 36 lineto
+31.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 38.5001 46 moveto
+35 36 lineto
+31.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 114 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104incrementingmaps.ps b/books/ps/v104incrementingmaps.ps
new file mode 100644
index 0000000..ec6a46b
--- /dev/null
+++ b/books/ps/v104incrementingmaps.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 130 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 94 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% INCRMAPS
+gsave
+[ /Rect [ 0 72 86 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=INCRMAPS) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 86 108 moveto
+2.7485e-14 108 lineto
+6.41154e-15 72 lineto
+86 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 86 108 moveto
+2.7485e-14 108 lineto
+6.41154e-15 72 lineto
+86 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+7.5 85.9 moveto 71 (INCRMAPS) alignedtext
+grestore
+% SGROUP
+gsave
+[ /Rect [ 7 0 79 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=SGROUP) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 79 36 moveto
+7 36 lineto
+7 1.06581e-14 lineto
+79 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 79 36 moveto
+7 36 lineto
+7 1.06581e-14 lineto
+79 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+15 13.9 moveto 56 (SGROUP) alignedtext
+grestore
+% INCRMAPS->SGROUP
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 43 72 moveto
+43 64 43 55 43 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 46.5001 46 moveto
+43 36 lineto
+39.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 46.5001 46 moveto
+43 36 lineto
+39.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 130 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104innerpolysign.ps b/books/ps/v104innerpolysign.ps
new file mode 100644
index 0000000..c6542a0
--- /dev/null
+++ b/books/ps/v104innerpolysign.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 114 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 78 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% INPSIGN
+gsave
+[ /Rect [ 0 72 70 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=INPSIGN) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 70 108 moveto
+2.13163e-14 108 lineto
+7.10543e-15 72 lineto
+70 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 70 108 moveto
+2.13163e-14 108 lineto
+7.10543e-15 72 lineto
+70 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+8 85.9 moveto 54 (INPSIGN) alignedtext
+grestore
+% PFECAT
+gsave
+[ /Rect [ 2 0 68 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=PFECAT) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 68 36 moveto
+2 36 lineto
+2 1.06581e-14 lineto
+68 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 68 36 moveto
+2 36 lineto
+2 1.06581e-14 lineto
+68 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+9.5 13.9 moveto 51 (PFECAT) alignedtext
+grestore
+% INPSIGN->PFECAT
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 35 72 moveto
+35 64 35 55 35 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 38.5001 46 moveto
+35 36 lineto
+31.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 38.5001 46 moveto
+35 36 lineto
+31.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 114 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104innerpolysum.ps b/books/ps/v104innerpolysum.ps
new file mode 100644
index 0000000..3f625cb
--- /dev/null
+++ b/books/ps/v104innerpolysum.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 110 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 74 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% ISUMP
+gsave
+[ /Rect [ 4 72 62 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=ISUMP) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 62 108 moveto
+4 108 lineto
+4 72 lineto
+62 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 62 108 moveto
+4 108 lineto
+4 72 lineto
+62 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+11.5 85.9 moveto 43 (ISUMP) alignedtext
+grestore
+% PFECAT
+gsave
+[ /Rect [ 0 0 66 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=PFECAT) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 66 36 moveto
+2.24404e-14 36 lineto
+8.44116e-15 1.06581e-14 lineto
+66 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 66 36 moveto
+2.24404e-14 36 lineto
+8.44116e-15 1.06581e-14 lineto
+66 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+7.5 13.9 moveto 51 (PFECAT) alignedtext
+grestore
+% ISUMP->PFECAT
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 33 72 moveto
+33 64 33 55 33 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 36.5001 46 moveto
+33 36 lineto
+29.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 36.5001 46 moveto
+33 36 lineto
+29.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 110 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104linearsystemmatrixpackage.ps b/books/ps/v104linearsystemmatrixpackage.ps
new file mode 100644
index 0000000..7fe4055
--- /dev/null
+++ b/books/ps/v104linearsystemmatrixpackage.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 116 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 80 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% LSMP
+gsave
+[ /Rect [ 9 72 63 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=LSMP) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 63 108 moveto
+9 108 lineto
+9 72 lineto
+63 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 63 108 moveto
+9 108 lineto
+9 72 lineto
+63 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+18 85.9 moveto 36 (LSMP) alignedtext
+grestore
+% MATCAT
+gsave
+[ /Rect [ 0 0 72 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=MATCAT) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 72 36 moveto
+3.00315e-14 36 lineto
+9.00668e-15 1.06581e-14 lineto
+72 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 72 36 moveto
+3.00315e-14 36 lineto
+9.00668e-15 1.06581e-14 lineto
+72 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+7.5 13.9 moveto 57 (MATCAT) alignedtext
+grestore
+% LSMP->MATCAT
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 36 72 moveto
+36 64 36 55 36 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 39.5001 46 moveto
+36 36 lineto
+32.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 39.5001 46 moveto
+36 36 lineto
+32.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 116 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104linearsystemmatrixpackage1.ps b/books/ps/v104linearsystemmatrixpackage1.ps
new file mode 100644
index 0000000..a5c6185
--- /dev/null
+++ b/books/ps/v104linearsystemmatrixpackage1.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 124 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 88 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% LSMP1
+gsave
+[ /Rect [ 11 72 69 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=LSMP1) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 69 108 moveto
+11 108 lineto
+11 72 lineto
+69 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 69 108 moveto
+11 108 lineto
+11 72 lineto
+69 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+18.5 85.9 moveto 43 (LSMP1) alignedtext
+grestore
+% VECTCAT
+gsave
+[ /Rect [ 0 0 80 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=VECTCAT) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 80 36 moveto
+3.02917e-14 36 lineto
+9.23914e-15 1.06581e-14 lineto
+80 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 80 36 moveto
+3.02917e-14 36 lineto
+9.23914e-15 1.06581e-14 lineto
+80 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+7.5 13.9 moveto 65 (VECTCAT) alignedtext
+grestore
+% LSMP1->VECTCAT
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 40 72 moveto
+40 64 40 55 40 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 43.5001 46 moveto
+40 36 lineto
+36.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 43.5001 46 moveto
+40 36 lineto
+36.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 124 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104linearsystempolynomialpackage.ps b/books/ps/v104linearsystempolynomialpackage.ps
new file mode 100644
index 0000000..4a97ea8
--- /dev/null
+++ b/books/ps/v104linearsystempolynomialpackage.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 110 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 74 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% LSPP
+gsave
+[ /Rect [ 6 72 60 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=LSPP) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 60 108 moveto
+6 108 lineto
+6 72 lineto
+60 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 60 108 moveto
+6 108 lineto
+6 72 lineto
+60 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+17.5 85.9 moveto 31 (LSPP) alignedtext
+grestore
+% PFECAT
+gsave
+[ /Rect [ 0 0 66 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=PFECAT) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 66 36 moveto
+2.24404e-14 36 lineto
+8.44116e-15 1.06581e-14 lineto
+66 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 66 36 moveto
+2.24404e-14 36 lineto
+8.44116e-15 1.06581e-14 lineto
+66 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+7.5 13.9 moveto 51 (PFECAT) alignedtext
+grestore
+% LSPP->PFECAT
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 33 72 moveto
+33 64 33 55 33 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 36.5001 46 moveto
+33 36 lineto
+29.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 36.5001 46 moveto
+33 36 lineto
+29.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 110 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104moresystemcommands.ps b/books/ps/v104moresystemcommands.ps
new file mode 100644
index 0000000..2bebe7e
--- /dev/null
+++ b/books/ps/v104moresystemcommands.ps
@@ -0,0 +1,276 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 130 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 94 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% MSYSCMD
+gsave
+[ /Rect [ 0 72 86 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=MSYSCMD) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 86 108 moveto
+2.84217e-14 108 lineto
+7.10543e-15 72 lineto
+86 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 86 108 moveto
+2.84217e-14 108 lineto
+7.10543e-15 72 lineto
+86 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+8 85.9 moveto 70 (MSYSCMD) alignedtext
+grestore
+% Package
+gsave
+0.939 0.733 1.000 nodecolor
+newpath 76 36 moveto
+10 36 lineto
+10 1.06581e-14 lineto
+76 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 76 36 moveto
+10 36 lineto
+10 1.06581e-14 lineto
+76 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+18 13.9 moveto 50 (Package) alignedtext
+grestore
+% MSYSCMD->Package
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 43 72 moveto
+43 64 43 55 43 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 46.5001 46 moveto
+43 36 lineto
+39.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 46.5001 46 moveto
+43 36 lineto
+39.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 130 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104nagspecialfunctionspackage.ps b/books/ps/v104nagspecialfunctionspackage.ps
new file mode 100644
index 0000000..c0484f9
--- /dev/null
+++ b/books/ps/v104nagspecialfunctionspackage.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 98 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 62 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% NAGS
+gsave
+[ /Rect [ 0 72 54 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=NAGS) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 54 108 moveto
+2.13163e-14 108 lineto
+3.55271e-15 72 lineto
+54 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 54 108 moveto
+2.13163e-14 108 lineto
+3.55271e-15 72 lineto
+54 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+8 85.9 moveto 38 (NAGS) alignedtext
+grestore
+% ALIST
+gsave
+[ /Rect [ 0 0 54 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.3.pdf#nameddest=ALIST) >>
+  /Subtype /Link
+/ANN pdfmark
+0.273 0.733 1.000 nodecolor
+newpath 54 36 moveto
+1.41189e-14 36 lineto
+3.65506e-15 1.06581e-14 lineto
+54 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.273 0.733 1.000 nodecolor
+newpath 54 36 moveto
+1.41189e-14 36 lineto
+3.65506e-15 1.06581e-14 lineto
+54 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+7.5 13.9 moveto 39 (ALIST) alignedtext
+grestore
+% NAGS->ALIST
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 27 72 moveto
+27 64 27 55 27 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 30.5001 46 moveto
+27 36 lineto
+23.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 30.5001 46 moveto
+27 36 lineto
+23.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 98 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104numbertheoreticpolynomialfunctions.ps b/books/ps/v104numbertheoreticpolynomialfunctions.ps
new file mode 100644
index 0000000..670aa51
--- /dev/null
+++ b/books/ps/v104numbertheoreticpolynomialfunctions.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 122 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 86 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% NTPOLFN
+gsave
+[ /Rect [ 0 72 78 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=NTPOLFN) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 78 108 moveto
+2.84217e-14 108 lineto
+7.10543e-15 72 lineto
+78 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 78 108 moveto
+2.84217e-14 108 lineto
+7.10543e-15 72 lineto
+78 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+8 85.9 moveto 62 (NTPOLFN) alignedtext
+grestore
+% PFECAT
+gsave
+[ /Rect [ 6 0 72 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=PFECAT) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 72 36 moveto
+6 36 lineto
+6 1.06581e-14 lineto
+72 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 72 36 moveto
+6 36 lineto
+6 1.06581e-14 lineto
+72 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+13.5 13.9 moveto 51 (PFECAT) alignedtext
+grestore
+% NTPOLFN->PFECAT
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 39 72 moveto
+39 64 39 55 39 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 42.5001 46 moveto
+39 36 lineto
+35.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 42.5001 46 moveto
+39 36 lineto
+35.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 122 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104orthogonalpolynomialfunctions.ps b/books/ps/v104orthogonalpolynomialfunctions.ps
new file mode 100644
index 0000000..4206e6b
--- /dev/null
+++ b/books/ps/v104orthogonalpolynomialfunctions.ps
@@ -0,0 +1,326 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 200 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 164 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% ORTHPOL
+gsave
+[ /Rect [ 30 72 110 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=ORTHPOL) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 110 108 moveto
+30 108 lineto
+30 72 lineto
+110 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 110 108 moveto
+30 108 lineto
+30 72 lineto
+110 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+38 85.9 moveto 64 (ORTHPOL) alignedtext
+grestore
+% PID
+gsave
+[ /Rect [ 0 0 54 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=PID) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 54 36 moveto
+2.13163e-14 36 lineto
+3.55271e-15 1.06581e-14 lineto
+54 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 54 36 moveto
+2.13163e-14 36 lineto
+3.55271e-15 1.06581e-14 lineto
+54 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+16 13.9 moveto 22 (PID) alignedtext
+grestore
+% ORTHPOL->PID
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 59 72 moveto
+54 64 48 54 43 45 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 45.916 43.0418 moveto
+38 36 lineto
+39.7969 46.4414 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 45.916 43.0418 moveto
+38 36 lineto
+39.7969 46.4414 lineto
+closepath stroke
+grestore
+% OAGROUP
+gsave
+[ /Rect [ 72 0 156 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=OAGROUP) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 156 36 moveto
+72 36 lineto
+72 1.06581e-14 lineto
+156 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 156 36 moveto
+72 36 lineto
+72 1.06581e-14 lineto
+156 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+80 13.9 moveto 68 (OAGROUP) alignedtext
+grestore
+% ORTHPOL->OAGROUP
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 81 72 moveto
+86 64 92 54 98 45 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 101.203 46.4414 moveto
+103 36 lineto
+95.084 43.0418 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 101.203 46.4414 moveto
+103 36 lineto
+95.084 43.0418 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 200 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104polynomialsolvebyformulas.ps b/books/ps/v104polynomialsolvebyformulas.ps
new file mode 100644
index 0000000..0193497
--- /dev/null
+++ b/books/ps/v104polynomialsolvebyformulas.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 130 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 94 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% SOLVEFOR
+gsave
+[ /Rect [ 0 72 86 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=SOLVEFOR) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 86 108 moveto
+2.7485e-14 108 lineto
+6.41154e-15 72 lineto
+86 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 86 108 moveto
+2.7485e-14 108 lineto
+6.41154e-15 72 lineto
+86 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+7.5 85.9 moveto 71 (SOLVEFOR) alignedtext
+grestore
+% PFECAT
+gsave
+[ /Rect [ 10 0 76 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=PFECAT) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 76 36 moveto
+10 36 lineto
+10 1.06581e-14 lineto
+76 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 76 36 moveto
+10 36 lineto
+10 1.06581e-14 lineto
+76 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+17.5 13.9 moveto 51 (PFECAT) alignedtext
+grestore
+% SOLVEFOR->PFECAT
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 43 72 moveto
+43 64 43 55 43 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 46.5001 46 moveto
+43 36 lineto
+39.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 46.5001 46 moveto
+43 36 lineto
+39.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 130 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104radicalsolvepackage.ps b/books/ps/v104radicalsolvepackage.ps
new file mode 100644
index 0000000..4ff8c0d
--- /dev/null
+++ b/books/ps/v104radicalsolvepackage.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 132 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 96 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% SOLVERAD
+gsave
+[ /Rect [ 0 72 88 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=SOLVERAD) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 88 108 moveto
+2.84217e-14 108 lineto
+7.10543e-15 72 lineto
+88 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 88 108 moveto
+2.84217e-14 108 lineto
+7.10543e-15 72 lineto
+88 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+8 85.9 moveto 72 (SOLVERAD) alignedtext
+grestore
+% ACFS
+gsave
+[ /Rect [ 17 0 71 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=ACFS) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 71 36 moveto
+17 36 lineto
+17 1.06581e-14 lineto
+71 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 71 36 moveto
+17 36 lineto
+17 1.06581e-14 lineto
+71 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+26.5 13.9 moveto 35 (ACFS) alignedtext
+grestore
+% SOLVERAD->ACFS
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 44 72 moveto
+44 64 44 55 44 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 47.5001 46 moveto
+44 36 lineto
+40.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 47.5001 46 moveto
+44 36 lineto
+40.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 132 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104rationalfunctionlimitpackage.ps b/books/ps/v104rationalfunctionlimitpackage.ps
new file mode 100644
index 0000000..d6e5f98
--- /dev/null
+++ b/books/ps/v104rationalfunctionlimitpackage.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 116 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 80 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% LIMITRF
+gsave
+[ /Rect [ 0 72 72 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=LIMITRF) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 72 108 moveto
+2.84217e-14 108 lineto
+7.10543e-15 72 lineto
+72 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 72 108 moveto
+2.84217e-14 108 lineto
+7.10543e-15 72 lineto
+72 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+8 85.9 moveto 56 (LIMITRF) alignedtext
+grestore
+% PFECAT
+gsave
+[ /Rect [ 3 0 69 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=PFECAT) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 69 36 moveto
+3 36 lineto
+3 1.06581e-14 lineto
+69 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 69 36 moveto
+3 36 lineto
+3 1.06581e-14 lineto
+69 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+10.5 13.9 moveto 51 (PFECAT) alignedtext
+grestore
+% LIMITRF->PFECAT
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 36 72 moveto
+36 64 36 55 36 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 39.5001 46 moveto
+36 36 lineto
+32.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 39.5001 46 moveto
+36 36 lineto
+32.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 116 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104rationalfunctionsign.ps b/books/ps/v104rationalfunctionsign.ps
new file mode 100644
index 0000000..0757f8c
--- /dev/null
+++ b/books/ps/v104rationalfunctionsign.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 110 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 74 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% SIGNRF
+gsave
+[ /Rect [ 1 72 65 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=SIGNRF) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 65 108 moveto
+1 108 lineto
+1 72 lineto
+65 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 65 108 moveto
+1 108 lineto
+1 72 lineto
+65 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+8.5 85.9 moveto 49 (SIGNRF) alignedtext
+grestore
+% PFECAT
+gsave
+[ /Rect [ 0 0 66 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=PFECAT) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 66 36 moveto
+2.24404e-14 36 lineto
+8.44116e-15 1.06581e-14 lineto
+66 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 66 36 moveto
+2.24404e-14 36 lineto
+8.44116e-15 1.06581e-14 lineto
+66 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+7.5 13.9 moveto 51 (PFECAT) alignedtext
+grestore
+% SIGNRF->PFECAT
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 33 72 moveto
+33 64 33 55 33 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 36.5001 46 moveto
+33 36 lineto
+29.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 36.5001 46 moveto
+33 36 lineto
+29.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 110 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104rationalfunctionsum.ps b/books/ps/v104rationalfunctionsum.ps
new file mode 100644
index 0000000..dc60986
--- /dev/null
+++ b/books/ps/v104rationalfunctionsum.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 110 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 74 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% SUMRF
+gsave
+[ /Rect [ 2 72 64 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=SUMRF) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 64 108 moveto
+2 108 lineto
+2 72 lineto
+64 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 64 108 moveto
+2 108 lineto
+2 72 lineto
+64 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+9.5 85.9 moveto 47 (SUMRF) alignedtext
+grestore
+% PFECAT
+gsave
+[ /Rect [ 0 0 66 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=PFECAT) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 66 36 moveto
+2.24404e-14 36 lineto
+8.44116e-15 1.06581e-14 lineto
+66 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 66 36 moveto
+2.24404e-14 36 lineto
+8.44116e-15 1.06581e-14 lineto
+66 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+7.5 13.9 moveto 51 (PFECAT) alignedtext
+grestore
+% SUMRF->PFECAT
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 33 72 moveto
+33 64 33 55 33 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 36.5001 46 moveto
+33 36 lineto
+29.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 36.5001 46 moveto
+33 36 lineto
+29.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 110 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104segmentbindingfunctions2.ps b/books/ps/v104segmentbindingfunctions2.ps
new file mode 100644
index 0000000..c8a7532
--- /dev/null
+++ b/books/ps/v104segmentbindingfunctions2.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 126 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 90 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% SEGBIND2
+gsave
+[ /Rect [ 0 72 82 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=SEGBIND2) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 82 108 moveto
+2.96881e-14 108 lineto
+8.62851e-15 72 lineto
+82 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 82 108 moveto
+2.96881e-14 108 lineto
+8.62851e-15 72 lineto
+82 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+7.5 85.9 moveto 67 (SEGBIND2) alignedtext
+grestore
+% TYPE
+gsave
+[ /Rect [ 14 0 68 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=TYPE) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 68 36 moveto
+14 36 lineto
+14 1.06581e-14 lineto
+68 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 68 36 moveto
+14 36 lineto
+14 1.06581e-14 lineto
+68 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+23.5 13.9 moveto 35 (TYPE) alignedtext
+grestore
+% SEGBIND2->TYPE
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 41 72 moveto
+41 64 41 55 41 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 44.5001 46 moveto
+41 36 lineto
+37.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 44.5001 46 moveto
+41 36 lineto
+37.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 126 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104segmentfunctions2.ps b/books/ps/v104segmentfunctions2.ps
new file mode 100644
index 0000000..c5a8ff0
--- /dev/null
+++ b/books/ps/v104segmentfunctions2.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 106 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 70 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% SEG2
+gsave
+[ /Rect [ 4 72 58 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=SEG2) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 58 108 moveto
+4 108 lineto
+4 72 lineto
+58 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 58 108 moveto
+4 108 lineto
+4 72 lineto
+58 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+14 85.9 moveto 34 (SEG2) alignedtext
+grestore
+% FLAGG
+gsave
+[ /Rect [ 0 0 62 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=FLAGG) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 62 36 moveto
+2.26989e-14 36 lineto
+5.21631e-15 1.06581e-14 lineto
+62 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 62 36 moveto
+2.26989e-14 36 lineto
+5.21631e-15 1.06581e-14 lineto
+62 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+7.5 13.9 moveto 47 (FLAGG) alignedtext
+grestore
+% SEG2->FLAGG
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 31 72 moveto
+31 64 31 55 31 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 34.5001 46 moveto
+31 36 lineto
+27.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 34.5001 46 moveto
+31 36 lineto
+27.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 106 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104smithnormalform.ps b/books/ps/v104smithnormalform.ps
new file mode 100644
index 0000000..05eedaa
--- /dev/null
+++ b/books/ps/v104smithnormalform.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 110 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 74 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% SMITH
+gsave
+[ /Rect [ 3 72 63 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=SMITH) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 63 108 moveto
+3 108 lineto
+3 72 lineto
+63 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 63 108 moveto
+3 108 lineto
+3 72 lineto
+63 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+11 85.9 moveto 44 (SMITH) alignedtext
+grestore
+% PFECAT
+gsave
+[ /Rect [ 0 0 66 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=PFECAT) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 66 36 moveto
+2.24404e-14 36 lineto
+8.44116e-15 1.06581e-14 lineto
+66 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 66 36 moveto
+2.24404e-14 36 lineto
+8.44116e-15 1.06581e-14 lineto
+66 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+7.5 13.9 moveto 51 (PFECAT) alignedtext
+grestore
+% SMITH->PFECAT
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 33 72 moveto
+33 64 33 55 33 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 36.5001 46 moveto
+33 36 lineto
+29.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 36.5001 46 moveto
+33 36 lineto
+29.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 110 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104sortpackage.ps b/books/ps/v104sortpackage.ps
new file mode 100644
index 0000000..e85c4cf
--- /dev/null
+++ b/books/ps/v104sortpackage.ps
@@ -0,0 +1,326 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 192 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 156 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% SORTPAK
+gsave
+[ /Rect [ 33 72 109 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=SORTPAK) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 109 108 moveto
+33 108 lineto
+33 72 lineto
+109 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 109 108 moveto
+33 108 lineto
+33 72 lineto
+109 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+40.5 85.9 moveto 61 (SORTPAK) alignedtext
+grestore
+% IXAGG
+gsave
+[ /Rect [ 0 0 60 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=IXAGG) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 60 36 moveto
+1.45335e-14 36 lineto
+5.55112e-16 1.06581e-14 lineto
+60 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 60 36 moveto
+1.45335e-14 36 lineto
+5.55112e-16 1.06581e-14 lineto
+60 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+7.5 13.9 moveto 45 (IXAGG) alignedtext
+grestore
+% SORTPAK->IXAGG
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 61 72 moveto
+56 64 51 54 45 45 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 47.916 43.0418 moveto
+40 36 lineto
+41.7969 46.4414 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 47.916 43.0418 moveto
+40 36 lineto
+41.7969 46.4414 lineto
+closepath stroke
+grestore
+% EVALAB
+gsave
+[ /Rect [ 78 0 148 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=EVALAB) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 148 36 moveto
+78 36 lineto
+78 1.06581e-14 lineto
+148 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 148 36 moveto
+78 36 lineto
+78 1.06581e-14 lineto
+148 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+86 13.9 moveto 54 (EVALAB) alignedtext
+grestore
+% SORTPAK->EVALAB
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 82 72 moveto
+87 64 92 54 98 45 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 101.203 46.4414 moveto
+103 36 lineto
+95.084 43.0418 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 101.203 46.4414 moveto
+103 36 lineto
+95.084 43.0418 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 192 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104squarefreequasicomponentpackage.ps b/books/ps/v104squarefreequasicomponentpackage.ps
new file mode 100644
index 0000000..8611567
--- /dev/null
+++ b/books/ps/v104squarefreequasicomponentpackage.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 124 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 88 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% SFQCMPK
+gsave
+[ /Rect [ 0 72 80 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=SFQCMPK) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 80 108 moveto
+3.02917e-14 108 lineto
+9.23914e-15 72 lineto
+80 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 80 108 moveto
+3.02917e-14 108 lineto
+9.23914e-15 72 lineto
+80 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+7.5 85.9 moveto 65 (SFQCMPK) alignedtext
+grestore
+% SFRTCAT
+gsave
+[ /Rect [ 3 0 77 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=SFRTCAT) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 77 36 moveto
+3 36 lineto
+3 1.06581e-14 lineto
+77 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 77 36 moveto
+3 36 lineto
+3 1.06581e-14 lineto
+77 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+10.5 13.9 moveto 59 (SFRTCAT) alignedtext
+grestore
+% SFQCMPK->SFRTCAT
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 40 72 moveto
+40 64 40 55 40 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 43.5001 46 moveto
+40 36 lineto
+36.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 43.5001 46 moveto
+40 36 lineto
+36.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 124 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104squarefreeregularsetdecompositionpackage.ps b/books/ps/v104squarefreeregularsetdecompositionpackage.ps
new file mode 100644
index 0000000..7480ba8
--- /dev/null
+++ b/books/ps/v104squarefreeregularsetdecompositionpackage.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 126 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 90 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% SRDCMPK
+gsave
+[ /Rect [ 0 72 82 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=SRDCMPK) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 82 108 moveto
+2.84217e-14 108 lineto
+7.10543e-15 72 lineto
+82 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 82 108 moveto
+2.84217e-14 108 lineto
+7.10543e-15 72 lineto
+82 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+8 85.9 moveto 66 (SRDCMPK) alignedtext
+grestore
+% SFRTCAT
+gsave
+[ /Rect [ 4 0 78 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=SFRTCAT) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 78 36 moveto
+4 36 lineto
+4 1.06581e-14 lineto
+78 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 78 36 moveto
+4 36 lineto
+4 1.06581e-14 lineto
+78 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+11.5 13.9 moveto 59 (SFRTCAT) alignedtext
+grestore
+% SRDCMPK->SFRTCAT
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 41 72 moveto
+41 64 41 55 41 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 44.5001 46 moveto
+41 36 lineto
+37.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 44.5001 46 moveto
+41 36 lineto
+37.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 126 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104squarefreeregulartriangularsetgcdpackage.ps b/books/ps/v104squarefreeregulartriangularsetgcdpackage.ps
new file mode 100644
index 0000000..caa80b8
--- /dev/null
+++ b/books/ps/v104squarefreeregulartriangularsetgcdpackage.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 118 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 82 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% SFRGCD
+gsave
+[ /Rect [ 2 72 72 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=SFRGCD) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 72 108 moveto
+2 108 lineto
+2 72 lineto
+72 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 72 108 moveto
+2 108 lineto
+2 72 lineto
+72 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+10 85.9 moveto 54 (SFRGCD) alignedtext
+grestore
+% SFRTCAT
+gsave
+[ /Rect [ 0 0 74 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=SFRTCAT) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 74 36 moveto
+2.00881e-14 36 lineto
+6.06806e-15 1.06581e-14 lineto
+74 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 74 36 moveto
+2.00881e-14 36 lineto
+6.06806e-15 1.06581e-14 lineto
+74 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+7.5 13.9 moveto 59 (SFRTCAT) alignedtext
+grestore
+% SFRGCD->SFRTCAT
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 37 72 moveto
+37 64 37 55 37 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 40.5001 46 moveto
+37 36 lineto
+33.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 40.5001 46 moveto
+37 36 lineto
+33.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 118 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104streamfunctions1.ps b/books/ps/v104streamfunctions1.ps
new file mode 100644
index 0000000..b01bcd6
--- /dev/null
+++ b/books/ps/v104streamfunctions1.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 124 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 88 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% STREAM1
+gsave
+[ /Rect [ 0 72 80 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=STREAM1) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 80 108 moveto
+2.13163e-14 108 lineto
+7.10543e-15 72 lineto
+80 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 80 108 moveto
+2.13163e-14 108 lineto
+7.10543e-15 72 lineto
+80 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+8 85.9 moveto 64 (STREAM1) alignedtext
+grestore
+% TYPE
+gsave
+[ /Rect [ 13 0 67 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=TYPE) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 67 36 moveto
+13 36 lineto
+13 1.06581e-14 lineto
+67 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 67 36 moveto
+13 36 lineto
+13 1.06581e-14 lineto
+67 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+22.5 13.9 moveto 35 (TYPE) alignedtext
+grestore
+% STREAM1->TYPE
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 40 72 moveto
+40 64 40 55 40 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 43.5001 46 moveto
+40 36 lineto
+36.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 43.5001 46 moveto
+40 36 lineto
+36.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 124 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104streamfunctions2.ps b/books/ps/v104streamfunctions2.ps
new file mode 100644
index 0000000..d178677
--- /dev/null
+++ b/books/ps/v104streamfunctions2.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 124 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 88 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% STREAM2
+gsave
+[ /Rect [ 0 72 80 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=STREAM2) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 80 108 moveto
+2.13163e-14 108 lineto
+7.10543e-15 72 lineto
+80 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 80 108 moveto
+2.13163e-14 108 lineto
+7.10543e-15 72 lineto
+80 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+8 85.9 moveto 64 (STREAM2) alignedtext
+grestore
+% TYPE
+gsave
+[ /Rect [ 13 0 67 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=TYPE) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 67 36 moveto
+13 36 lineto
+13 1.06581e-14 lineto
+67 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 67 36 moveto
+13 36 lineto
+13 1.06581e-14 lineto
+67 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+22.5 13.9 moveto 35 (TYPE) alignedtext
+grestore
+% STREAM2->TYPE
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 40 72 moveto
+40 64 40 55 40 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 43.5001 46 moveto
+40 36 lineto
+36.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 43.5001 46 moveto
+40 36 lineto
+36.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 124 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104streamfunctions3.ps b/books/ps/v104streamfunctions3.ps
new file mode 100644
index 0000000..884c16d
--- /dev/null
+++ b/books/ps/v104streamfunctions3.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 124 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 88 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% STREAM3
+gsave
+[ /Rect [ 0 72 80 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=STREAM3) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 80 108 moveto
+2.13163e-14 108 lineto
+7.10543e-15 72 lineto
+80 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 80 108 moveto
+2.13163e-14 108 lineto
+7.10543e-15 72 lineto
+80 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+8 85.9 moveto 64 (STREAM3) alignedtext
+grestore
+% TYPE
+gsave
+[ /Rect [ 13 0 67 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=TYPE) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 67 36 moveto
+13 36 lineto
+13 1.06581e-14 lineto
+67 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 67 36 moveto
+13 36 lineto
+13 1.06581e-14 lineto
+67 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+22.5 13.9 moveto 35 (TYPE) alignedtext
+grestore
+% STREAM3->TYPE
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 40 72 moveto
+40 64 40 55 40 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 43.5001 46 moveto
+40 36 lineto
+36.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 43.5001 46 moveto
+40 36 lineto
+36.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 124 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104streamtaylorseriesoperations.ps b/books/ps/v104streamtaylorseriesoperations.ps
new file mode 100644
index 0000000..246466a
--- /dev/null
+++ b/books/ps/v104streamtaylorseriesoperations.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 130 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 94 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% STTAYLOR
+gsave
+[ /Rect [ 0 72 86 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=STTAYLOR) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 86 108 moveto
+2.7485e-14 108 lineto
+6.41154e-15 72 lineto
+86 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 86 108 moveto
+2.7485e-14 108 lineto
+6.41154e-15 72 lineto
+86 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+7.5 85.9 moveto 71 (STTAYLOR) alignedtext
+grestore
+% FIELD
+gsave
+[ /Rect [ 16 0 70 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=FIELD) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 70 36 moveto
+16 36 lineto
+16 1.06581e-14 lineto
+70 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 70 36 moveto
+16 36 lineto
+16 1.06581e-14 lineto
+70 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+23.5 13.9 moveto 39 (FIELD) alignedtext
+grestore
+% STTAYLOR->FIELD
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 43 72 moveto
+43 64 43 55 43 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 46.5001 46 moveto
+43 36 lineto
+39.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 46.5001 46 moveto
+43 36 lineto
+39.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 130 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104streamtranscendentalfunctions.ps b/books/ps/v104streamtranscendentalfunctions.ps
new file mode 100644
index 0000000..dab8aa6
--- /dev/null
+++ b/books/ps/v104streamtranscendentalfunctions.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 110 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 74 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% STTF
+gsave
+[ /Rect [ 6 72 60 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=STTF) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 60 108 moveto
+6 108 lineto
+6 72 lineto
+60 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 60 108 moveto
+6 108 lineto
+6 72 lineto
+60 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+16.5 85.9 moveto 33 (STTF) alignedtext
+grestore
+% STRING
+gsave
+[ /Rect [ 0 0 66 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.3.pdf#nameddest=STRING) >>
+  /Subtype /Link
+/ANN pdfmark
+0.273 0.733 1.000 nodecolor
+newpath 66 36 moveto
+2.13163e-14 36 lineto
+0 1.06581e-14 lineto
+66 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.273 0.733 1.000 nodecolor
+newpath 66 36 moveto
+2.13163e-14 36 lineto
+0 1.06581e-14 lineto
+66 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+8 13.9 moveto 50 (STRING) alignedtext
+grestore
+% STTF->STRING
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 33 72 moveto
+33 64 33 55 33 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 36.5001 46 moveto
+33 36 lineto
+29.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 36.5001 46 moveto
+33 36 lineto
+29.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 110 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104streamtranscendentalfunctionsnoncommutative.ps b/books/ps/v104streamtranscendentalfunctionsnoncommutative.ps
new file mode 100644
index 0000000..12b9598
--- /dev/null
+++ b/books/ps/v104streamtranscendentalfunctionsnoncommutative.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 112 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 76 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% STTFNC
+gsave
+[ /Rect [ 0 72 68 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=STTFNC) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 68 108 moveto
+1.93977e-14 108 lineto
+5.39152e-15 72 lineto
+68 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 68 108 moveto
+1.93977e-14 108 lineto
+5.39152e-15 72 lineto
+68 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+7.5 85.9 moveto 53 (STTFNC) alignedtext
+grestore
+% STRING
+gsave
+[ /Rect [ 1 0 67 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.3.pdf#nameddest=STRING) >>
+  /Subtype /Link
+/ANN pdfmark
+0.273 0.733 1.000 nodecolor
+newpath 67 36 moveto
+1 36 lineto
+1 1.06581e-14 lineto
+67 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.273 0.733 1.000 nodecolor
+newpath 67 36 moveto
+1 36 lineto
+1 1.06581e-14 lineto
+67 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+9 13.9 moveto 50 (STRING) alignedtext
+grestore
+% STTFNC->STRING
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 34 72 moveto
+34 64 34 55 34 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 37.5001 46 moveto
+34 36 lineto
+30.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 37.5001 46 moveto
+34 36 lineto
+30.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 112 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104sturmhabichtpackage.ps b/books/ps/v104sturmhabichtpackage.ps
new file mode 100644
index 0000000..90b4d49
--- /dev/null
+++ b/books/ps/v104sturmhabichtpackage.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 110 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 74 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% SHP
+gsave
+[ /Rect [ 6 72 60 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=SHP) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 60 108 moveto
+6 108 lineto
+6 72 lineto
+60 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 60 108 moveto
+6 108 lineto
+6 72 lineto
+60 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+20.5 85.9 moveto 25 (SHP) alignedtext
+grestore
+% PFECAT
+gsave
+[ /Rect [ 0 0 66 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=PFECAT) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 66 36 moveto
+2.24404e-14 36 lineto
+8.44116e-15 1.06581e-14 lineto
+66 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 66 36 moveto
+2.24404e-14 36 lineto
+8.44116e-15 1.06581e-14 lineto
+66 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+7.5 13.9 moveto 51 (PFECAT) alignedtext
+grestore
+% SHP->PFECAT
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 33 72 moveto
+33 64 33 55 33 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 36.5001 46 moveto
+33 36 lineto
+29.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 36.5001 46 moveto
+33 36 lineto
+29.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 110 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104symmetricgroupcombinatoricfunctions.ps b/books/ps/v104symmetricgroupcombinatoricfunctions.ps
new file mode 100644
index 0000000..7e992a6
--- /dev/null
+++ b/books/ps/v104symmetricgroupcombinatoricfunctions.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 106 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 70 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% SGCF
+gsave
+[ /Rect [ 4 72 58 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=SGCF) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 58 108 moveto
+4 108 lineto
+4 72 lineto
+58 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 58 108 moveto
+4 108 lineto
+4 72 lineto
+58 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+13.5 85.9 moveto 35 (SGCF) alignedtext
+grestore
+% FSAGG
+gsave
+[ /Rect [ 0 0 62 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=FSAGG) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 62 36 moveto
+2.13163e-14 36 lineto
+3.55271e-15 1.06581e-14 lineto
+62 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 62 36 moveto
+2.13163e-14 36 lineto
+3.55271e-15 1.06581e-14 lineto
+62 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+8 13.9 moveto 46 (FSAGG) alignedtext
+grestore
+% SGCF->FSAGG
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 31 72 moveto
+31 64 31 55 31 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 34.5001 46 moveto
+31 36 lineto
+27.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 34.5001 46 moveto
+31 36 lineto
+27.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 106 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104systemsolvepackage.ps b/books/ps/v104systemsolvepackage.ps
new file mode 100644
index 0000000..d67e579
--- /dev/null
+++ b/books/ps/v104systemsolvepackage.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 118 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 82 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% SYSSOLP
+gsave
+[ /Rect [ 0 72 74 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=SYSSOLP) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 74 108 moveto
+2.00881e-14 108 lineto
+6.06806e-15 72 lineto
+74 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 74 108 moveto
+2.00881e-14 108 lineto
+6.06806e-15 72 lineto
+74 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+7.5 85.9 moveto 59 (SYSSOLP) alignedtext
+grestore
+% ALIST
+gsave
+[ /Rect [ 10 0 64 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.3.pdf#nameddest=ALIST) >>
+  /Subtype /Link
+/ANN pdfmark
+0.273 0.733 1.000 nodecolor
+newpath 64 36 moveto
+10 36 lineto
+10 1.06581e-14 lineto
+64 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.273 0.733 1.000 nodecolor
+newpath 64 36 moveto
+10 36 lineto
+10 1.06581e-14 lineto
+64 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+17.5 13.9 moveto 39 (ALIST) alignedtext
+grestore
+% SYSSOLP->ALIST
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 37 72 moveto
+37 64 37 55 37 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 40.5001 46 moveto
+37 36 lineto
+33.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 40.5001 46 moveto
+37 36 lineto
+33.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 118 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104taylorsolve.ps b/books/ps/v104taylorsolve.ps
new file mode 100644
index 0000000..2048cfb
--- /dev/null
+++ b/books/ps/v104taylorsolve.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 114 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 78 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% UTSSOL
+gsave
+[ /Rect [ 1 72 69 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=UTSSOL) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 69 108 moveto
+1 108 lineto
+1 72 lineto
+69 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 69 108 moveto
+1 108 lineto
+1 72 lineto
+69 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+8.5 85.9 moveto 53 (UTSSOL) alignedtext
+grestore
+% UTSCAT
+gsave
+[ /Rect [ 0 0 70 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=UTSCAT) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 70 36 moveto
+2.13163e-14 36 lineto
+7.10543e-15 1.06581e-14 lineto
+70 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 70 36 moveto
+2.13163e-14 36 lineto
+7.10543e-15 1.06581e-14 lineto
+70 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+8 13.9 moveto 54 (UTSCAT) alignedtext
+grestore
+% UTSSOL->UTSCAT
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 35 72 moveto
+35 64 35 55 35 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 38.5001 46 moveto
+35 36 lineto
+31.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 38.5001 46 moveto
+35 36 lineto
+31.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 114 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104toolsforsign.ps b/books/ps/v104toolsforsign.ps
new file mode 100644
index 0000000..44749d3
--- /dev/null
+++ b/books/ps/v104toolsforsign.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 130 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 94 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% TOOLSIGN
+gsave
+[ /Rect [ 0 72 86 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=TOOLSIGN) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 86 108 moveto
+2.7485e-14 108 lineto
+6.41154e-15 72 lineto
+86 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 86 108 moveto
+2.7485e-14 108 lineto
+6.41154e-15 72 lineto
+86 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+7.5 85.9 moveto 71 (TOOLSIGN) alignedtext
+grestore
+% FS
+gsave
+[ /Rect [ 16 0 70 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=FS) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 70 36 moveto
+16 36 lineto
+16 1.06581e-14 lineto
+70 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 70 36 moveto
+16 36 lineto
+16 1.06581e-14 lineto
+70 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+35.5 13.9 moveto 15 (FS) alignedtext
+grestore
+% TOOLSIGN->FS
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 43 72 moveto
+43 64 43 55 43 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 46.5001 46 moveto
+43 36 lineto
+39.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 46.5001 46 moveto
+43 36 lineto
+39.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 130 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104toplevelthreespace.ps b/books/ps/v104toplevelthreespace.ps
new file mode 100644
index 0000000..7989340
--- /dev/null
+++ b/books/ps/v104toplevelthreespace.ps
@@ -0,0 +1,326 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 188 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 152 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% TOPSP
+gsave
+[ /Rect [ 38 72 96 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=TOPSP) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 96 108 moveto
+38 108 lineto
+38 72 lineto
+96 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 96 108 moveto
+38 108 lineto
+38 72 lineto
+96 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+46 85.9 moveto 42 (TOPSP) alignedtext
+grestore
+% FIELD
+gsave
+[ /Rect [ 0 0 54 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=FIELD) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 54 36 moveto
+1.41189e-14 36 lineto
+3.65506e-15 1.06581e-14 lineto
+54 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 54 36 moveto
+1.41189e-14 36 lineto
+3.65506e-15 1.06581e-14 lineto
+54 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+7.5 13.9 moveto 39 (FIELD) alignedtext
+grestore
+% TOPSP->FIELD
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 57 72 moveto
+53 64 47 54 42 45 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 44.916 43.0418 moveto
+37 36 lineto
+38.7969 46.4414 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 44.916 43.0418 moveto
+37 36 lineto
+38.7969 46.4414 lineto
+closepath stroke
+grestore
+% RADCAT
+gsave
+[ /Rect [ 72 0 144 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=RADCAT) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 144 36 moveto
+72 36 lineto
+72 1.06581e-14 lineto
+144 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 144 36 moveto
+72 36 lineto
+72 1.06581e-14 lineto
+144 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+80 13.9 moveto 56 (RADCAT) alignedtext
+grestore
+% TOPSP->RADCAT
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 77 72 moveto
+82 64 87 54 93 45 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 96.2031 46.4414 moveto
+98 36 lineto
+90.084 43.0418 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 96.2031 46.4414 moveto
+98 36 lineto
+90.084 43.0418 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 188 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104universalsegmentfunctions2.ps b/books/ps/v104universalsegmentfunctions2.ps
new file mode 100644
index 0000000..7009c0d
--- /dev/null
+++ b/books/ps/v104universalsegmentfunctions2.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 122 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 86 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% UNISEG2
+gsave
+[ /Rect [ 2 72 76 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=UNISEG2) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 76 108 moveto
+2 108 lineto
+2 72 lineto
+76 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 76 108 moveto
+2 108 lineto
+2 72 lineto
+76 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+9.5 85.9 moveto 59 (UNISEG2) alignedtext
+grestore
+% OCAMON
+gsave
+[ /Rect [ 0 0 78 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=OCAMON) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 78 36 moveto
+2.634e-14 36 lineto
+5.29438e-15 1.06581e-14 lineto
+78 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 78 36 moveto
+2.634e-14 36 lineto
+5.29438e-15 1.06581e-14 lineto
+78 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+7.5 13.9 moveto 63 (OCAMON) alignedtext
+grestore
+% UNISEG2->OCAMON
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 39 72 moveto
+39 64 39 55 39 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 42.5001 46 moveto
+39 36 lineto
+35.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 42.5001 46 moveto
+39 36 lineto
+35.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 122 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104userdefinedpartialordering.ps b/books/ps/v104userdefinedpartialordering.ps
new file mode 100644
index 0000000..aca72f5
--- /dev/null
+++ b/books/ps/v104userdefinedpartialordering.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 106 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 70 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% UDPO
+gsave
+[ /Rect [ 4 72 58 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=UDPO) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 58 108 moveto
+4 108 lineto
+4 72 lineto
+58 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 58 108 moveto
+4 108 lineto
+4 72 lineto
+58 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+12 85.9 moveto 38 (UDPO) alignedtext
+grestore
+% FLAGG
+gsave
+[ /Rect [ 0 0 62 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=FLAGG) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 62 36 moveto
+2.26989e-14 36 lineto
+5.21631e-15 1.06581e-14 lineto
+62 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 62 36 moveto
+2.26989e-14 36 lineto
+5.21631e-15 1.06581e-14 lineto
+62 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+7.5 13.9 moveto 47 (FLAGG) alignedtext
+grestore
+% UDPO->FLAGG
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 31 72 moveto
+31 64 31 55 31 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 34.5001 46 moveto
+31 36 lineto
+27.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 34.5001 46 moveto
+31 36 lineto
+27.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 106 152
+end
+restore
+%%EOF
diff --git a/books/ps/v104userdefinedvariableordering.ps b/books/ps/v104userdefinedvariableordering.ps
new file mode 100644
index 0000000..aca72f5
--- /dev/null
+++ b/books/ps/v104userdefinedvariableordering.ps
@@ -0,0 +1,281 @@
+%!PS-Adobe-2.0
+%%Creator: Graphviz version 2.16.1 (Mon Jul  7 18:20:33 UTC 2008)
+%%For: (root) root
+%%Title: pic
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 106 152
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 70 116 boxprim clip newpath
+1 1 set_scale 0 rotate 40 40 translate
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath fill
+1 setlinewidth
+0.167 0.600 1.000 graphcolor
+newpath -4 -4 moveto
+-4 716 lineto
+536 716 lineto
+536 -4 lineto
+closepath stroke
+% UDPO
+gsave
+[ /Rect [ 4 72 58 108 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=UDPO) >>
+  /Subtype /Link
+/ANN pdfmark
+0.939 0.733 1.000 nodecolor
+newpath 58 108 moveto
+4 108 lineto
+4 72 lineto
+58 72 lineto
+closepath fill
+1 setlinewidth
+filled
+0.939 0.733 1.000 nodecolor
+newpath 58 108 moveto
+4 108 lineto
+4 72 lineto
+58 72 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+12 85.9 moveto 38 (UDPO) alignedtext
+grestore
+% FLAGG
+gsave
+[ /Rect [ 0 0 62 36 ]
+  /Border [ 0 0 0 ]
+  /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=FLAGG) >>
+  /Subtype /Link
+/ANN pdfmark
+0.606 0.733 1.000 nodecolor
+newpath 62 36 moveto
+2.26989e-14 36 lineto
+5.21631e-15 1.06581e-14 lineto
+62 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0.606 0.733 1.000 nodecolor
+newpath 62 36 moveto
+2.26989e-14 36 lineto
+5.21631e-15 1.06581e-14 lineto
+62 0 lineto
+closepath stroke
+0.000 0.000 0.000 nodecolor
+14.00 /Times-Roman set_font
+7.5 13.9 moveto 47 (FLAGG) alignedtext
+grestore
+% UDPO->FLAGG
+gsave
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 31 72 moveto
+31 64 31 55 31 46 curveto
+stroke
+0.000 0.000 0.000 edgecolor
+newpath 34.5001 46 moveto
+31 36 lineto
+27.5001 46 lineto
+closepath fill
+1 setlinewidth
+solid
+0.000 0.000 0.000 edgecolor
+newpath 34.5001 46 moveto
+31 36 lineto
+27.5001 46 lineto
+closepath stroke
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 106 152
+end
+restore
+%%EOF
diff --git a/changelog b/changelog
index 6738779..a94069c 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,70 @@
+20090209 tpd src/axiom-website/patches.html 20090209.01.tpd.patch
+20090209 tpd books/bookvol10.4 add packages
+20090209 tpd src/algebra/Makefile remove spad files
+20090209 tpd src/algebra/system.spad removed
+20090209 tpd books/ps/v104moresystemcommands.ps added
+20090209 tpd src/algebra/syssolp.spad removed
+20090209 tpd books/ps/v104systemsolvepackage.ps added
+20090209 tpd src/algebra/sum.spad removed
+20090209 tpd books/ps/v104rationalfunctionsum.ps added
+20090209 tpd books/ps/v104gospersummationmethod.ps added
+20090209 tpd books/ps/v104innerpolysum.ps added
+20090209 tpd src/algebra/sturm.spad removed
+20090209 tpd books/ps/v104sturmhabichtpackage.ps added
+20090209 tpd src/algebra/sttf.spad removed
+20090209 tpd books/ps/v104streamtranscendentalfunctionsnoncommutative.ps
+20090209 tpd books/ps/v104streamtranscendentalfunctions.ps added
+20090209 tpd src/algebra/sttaylor.spad removed
+20090209 tpd books/ps/v104streamtaylorseriesoperations.ps added
+20090209 tpd src/algebra/stream.spad removed
+20090209 tpd books/ps/v104streamfunctions3.ps added
+20090209 tpd books/ps/v104streamfunctions2.ps added
+20090209 tpd books/ps/v104streamfunctions1.ps added
+20090209 tpd books/ps/v104cyclicstreamtools.ps added
+20090209 tpd src/algebra/s.spad removed
+20090209 tpd books/ps/v104nagspecialfunctionspackage.ps added
+20090209 tpd src/algebra/ssolve.spad removed
+20090209 tpd books/ps/v104expressionsolve.ps added
+20090209 tpd books/ps/v104taylorsolve.ps added
+20090209 tpd src/algebra/sregset.spad removed
+20090209 tpd books/ps/v104squarefreeregularsetdecompositionpackage.ps added
+20090209 tpd books/ps/v104squarefreeregulartriangularsetgcdpackage.ps added
+20090209 tpd books/ps/v104squarefreequasicomponentpackage.ps added
+20090209 tpd src/algebra/special.spad removed
+20090209 tpd books/ps/v104numbertheoreticpolynomialfunctions.ps added
+20090209 tpd books/ps/v104orthogonalpolynomialfunctions.ps added
+20090209 tpd books/ps/v104doublefloatspecialfunctions.ps added
+20090209 tpd src/algebra/space.spad removed
+20090209 tpd books/ps/v104toplevelthreespace.ps added
+20090209 tpd src/algebra/sortpak.spad removed
+20090209 tpd books/ps/v104sortpackage.ps added
+20090209 tpd src/algebra/solverad.spad removed
+20090209 tpd books/ps/v104radicalsolvepackage.ps added
+20090209 tpd src/algebra/solvelin.spad removed
+20090209 tpd books/ps/v104linearsystempolynomialpackage.ps added
+20090209 tpd books/ps/v104linearsystemmatrixpackage1.ps added
+20090209 tpd books/ps/v104linearsystemmatrixpackage.ps added
+20090209 tpd src/algebra/solvefor.spad removed
+20090209 tpd books/ps/v104polynomialsolvebyformulas.ps added
+20090209 tpd src/algebra/solvedio.spad removed
+20090209 tpd books/ps/v104diophantinesolutionpackage.ps added
+20090209 tpd src/algebra/smith.spad removed
+20090209 tpd books/ps/v104smithnormalform.ps added
+20090209 tpd src/algebra/sign.spad removed
+20090209 tpd books/ps/v104rationalfunctionlimitpackage.ps added
+20090209 tpd books/ps/v104rationalfunctionsign.ps added
+20090209 tpd books/ps/v104innerpolysign.ps added
+20090209 tpd books/ps/v104toolsforsign.ps added
+20090209 tpd src/algebra/sgcf.spad removed
+20090209 tpd books/ps/v104symmetricgroupcombinatoricfunctions.ps added
+20090209 tpd src/algebra/setorder.spad removed
+20090209 tpd books/ps/v104userdefinedvariableordering.ps added
+20090209 tpd books/ps/v104userdefinedpartialordering.ps added
+20090209 tpd src/algebra/seg.spad removed
+20090209 tpd books/ps/v104incrementingmaps.ps added
+20090209 tpd books/ps/v104universalsegmentfunctions2.ps added
+20090209 tpd books/ps/v104segmentbindingfunctions2.ps added
+20090209 tpd books/ps/v104segmentfunctions2.ps added
 20090208 tpd src/axiom-website/patches.html 20090208.02.tpd.patch
 20090208 tpd books/bookvol10.4 add packages
 20090208 tpd src/algebra/Makefile remove spad files
diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet
index 70c2e7e..338558f 100644
--- a/src/algebra/Makefile.pamphlet
+++ b/src/algebra/Makefile.pamphlet
@@ -15772,16 +15772,6 @@ We need to figure out which mlift.spad to keep.
 
 SPADFILES= \
  ${OUTSRC}/quat.spad \
- ${OUTSRC}/seg.spad ${OUTSRC}/setorder.spad \
- ${OUTSRC}/sgcf.spad \
- ${OUTSRC}/sign.spad ${OUTSRC}/smith.spad \
- ${OUTSRC}/solvedio.spad ${OUTSRC}/solvefor.spad ${OUTSRC}/solvelin.spad \
- ${OUTSRC}/solverad.spad ${OUTSRC}/sortpak.spad ${OUTSRC}/space.spad \
- ${OUTSRC}/special.spad ${OUTSRC}/sregset.spad ${OUTSRC}/s.spad \
- ${OUTSRC}/stream.spad ${OUTSRC}/sttaylor.spad \
- ${OUTSRC}/sttf.spad ${OUTSRC}/sturm.spad  \
- ${OUTSRC}/sum.spad  \
- ${OUTSRC}/syssolp.spad ${OUTSRC}/system.spad \
  ${OUTSRC}/tableau.spad ${OUTSRC}/taylor.spad \
  ${OUTSRC}/tex.spad ${OUTSRC}/tools.spad ${OUTSRC}/transsolve.spad \
  ${OUTSRC}/triset.spad \
@@ -15829,16 +15819,6 @@ DOCFILES= \
  ${DOC}/noptip.as.dvi ${DOC}/nqip.as.dvi \
  ${DOC}/nrc.as.dvi  ${DOC}/nsfip.as.dvi \
  ${DOC}/quat.spad.dvi \
- ${DOC}/seg.spad.dvi ${DOC}/setorder.spad.dvi \
- ${DOC}/sgcf.spad.dvi \
- ${DOC}/sign.spad.dvi ${DOC}/smith.spad.dvi \
- ${DOC}/solvedio.spad.dvi ${DOC}/solvefor.spad.dvi ${DOC}/solvelin.spad.dvi \
- ${DOC}/solverad.spad.dvi ${DOC}/sortpak.spad.dvi ${DOC}/space.spad.dvi \
- ${DOC}/special.spad.dvi ${DOC}/sregset.spad.dvi ${DOC}/s.spad.dvi \
- ${DOC}/stream.spad.dvi ${DOC}/sttaylor.spad.dvi \
- ${DOC}/sttf.spad.dvi ${DOC}/sturm.spad.dvi  \
- ${DOC}/sum.spad.dvi  \
- ${DOC}/syssolp.spad.dvi ${DOC}/system.spad.dvi \
  ${DOC}/tableau.spad.dvi ${DOC}/taylor.spad.dvi \
  ${DOC}/tex.spad.dvi ${DOC}/tools.spad.dvi ${DOC}/transsolve.spad.dvi \
  ${DOC}/triset.spad.dvi \
diff --git a/src/algebra/s.spad.pamphlet b/src/algebra/s.spad.pamphlet
deleted file mode 100644
index 785bb5f..0000000
--- a/src/algebra/s.spad.pamphlet
+++ /dev/null
@@ -1,833 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/algebra s.spad}
-\author{Godfrey Nolan, Mike Dewar}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package NAGS NagSpecialFunctionsPackage}
-<<package NAGS NagSpecialFunctionsPackage>>=
-)abbrev package NAGS NagSpecialFunctionsPackage
-++ Author: Godfrey Nolan and Mike Dewar
-++ Date Created: Jan 1994
-++ Date Last Updated: Thu May 12 17:45:44 1994
-++ Description:
-++ This package uses the NAG Library to compute some commonly
-++ occurring physical and mathematical functions.
-++ See \downlink{Manual Page}{manpageXXs}.
-NagSpecialFunctionsPackage(): Exports == Implementation where
-  S ==> Symbol
-  FOP ==> FortranOutputStackPackage
-
-  Exports ==> with
-    s01eaf : (Complex DoubleFloat,Integer) -> Result 
-     ++ s01eaf(z,ifail)
-     ++ S01EAF evaluates the exponential function exp(z) , for complex z.
-     ++ See \downlink{Manual Page}{manpageXXs01eaf}.
-    s13aaf : (DoubleFloat,Integer) -> Result 
-     ++ s13aaf(x,ifail)
-     ++ returns the value of the exponential integral 
-     ++  E (x), via the routine name.
-     ++   1
-     ++ See \downlink{Manual Page}{manpageXXs13aaf}.
-    s13acf : (DoubleFloat,Integer) -> Result 
-     ++ s13acf(x,ifail)
-     ++ returns the value of the cosine integral
-     ++ See \downlink{Manual Page}{manpageXXs13acf}.
-    s13adf : (DoubleFloat,Integer) -> Result 
-     ++ s13adf(x,ifail)
-     ++ returns the value of the sine integral
-     ++ See \downlink{Manual Page}{manpageXXs13adf}.
-    s14aaf : (DoubleFloat,Integer) -> Result 
-     ++ s14aaf(x,ifail) returns the value of the Gamma function (Gamma)(x), via 
-     ++ the routine name.
-     ++ See \downlink{Manual Page}{manpageXXs14aaf}.
-    s14abf : (DoubleFloat,Integer) -> Result 
-     ++ s14abf(x,ifail) returns a value for the log, ln(Gamma(x)), via 
-     ++ the routine name.
-     ++ See \downlink{Manual Page}{manpageXXs14abf}.
-    s14baf : (DoubleFloat,DoubleFloat,DoubleFloat,Integer) -> Result 
-     ++ s14baf(a,x,tol,ifail)
-     ++ computes values for the incomplete gamma functions P(a,x) 
-     ++ and Q(a,x).
-     ++ See \downlink{Manual Page}{manpageXXs14baf}.
-    s15adf : (DoubleFloat,Integer) -> Result 
-     ++ s15adf(x,ifail)
-     ++ returns the value of the complementary error function, 
-     ++ erfc(x), via the routine name.
-     ++ See \downlink{Manual Page}{manpageXXs15adf}.
-    s15aef : (DoubleFloat,Integer) -> Result 
-     ++ s15aef(x,ifail)
-     ++ returns the value of the error function erf(x), via the 
-     ++ routine name.
-     ++ See \downlink{Manual Page}{manpageXXs15aef}.
-    s17acf : (DoubleFloat,Integer) -> Result 
-     ++ s17acf(x,ifail)
-     ++ returns the value of the Bessel Function 
-     ++  Y (x), via the routine name.
-     ++   0
-     ++ See \downlink{Manual Page}{manpageXXs17acf}.
-    s17adf : (DoubleFloat,Integer) -> Result 
-     ++ s17adf(x,ifail)
-     ++ returns the value of the Bessel Function
-     ++  Y (x), via the routine name.
-     ++   1
-     ++ See \downlink{Manual Page}{manpageXXs17adf}.
-    s17aef : (DoubleFloat,Integer) -> Result 
-     ++ s17aef(x,ifail)
-     ++ returns the value of the Bessel Function 
-     ++  J (x), via the routine name.
-     ++   0
-     ++ See \downlink{Manual Page}{manpageXXs17aef}.
-    s17aff : (DoubleFloat,Integer) -> Result 
-     ++ s17aff(x,ifail)
-     ++ returns the value of the Bessel Function 
-     ++  J (x), via the routine name.
-     ++   1
-     ++ See \downlink{Manual Page}{manpageXXs17aff}.
-    s17agf : (DoubleFloat,Integer) -> Result 
-     ++ s17agf(x,ifail)
-     ++ returns a value for the Airy function, Ai(x), via the 
-     ++ routine name.
-     ++ See \downlink{Manual Page}{manpageXXs17agf}.
-    s17ahf : (DoubleFloat,Integer) -> Result 
-     ++ s17ahf(x,ifail)
-     ++ returns a value of the Airy function, Bi(x), via the 
-     ++ routine name.
-     ++ See \downlink{Manual Page}{manpageXXs17ahf}.
-    s17ajf : (DoubleFloat,Integer) -> Result 
-     ++ s17ajf(x,ifail)
-     ++ returns a value of the derivative of the Airy function 
-     ++ Ai(x), via the routine name.
-     ++ See \downlink{Manual Page}{manpageXXs17ajf}.
-    s17akf : (DoubleFloat,Integer) -> Result 
-     ++ s17akf(x,ifail)
-     ++ returns a value for the derivative of the Airy function 
-     ++ Bi(x), via the routine name.
-     ++ See \downlink{Manual Page}{manpageXXs17akf}.
-    s17dcf : (DoubleFloat,Complex DoubleFloat,Integer,String,_
-	Integer) -> Result 
-     ++ s17dcf(fnu,z,n,scale,ifail)
-     ++ returns a sequence of values for the Bessel functions 
-     ++  Y      (z) for complex z, non-negative (nu) and n=0,1,...,N-1, 
-     ++   (nu)+n                                                       
-     ++ with an option for exponential scaling.
-     ++ See \downlink{Manual Page}{manpageXXs17dcf}.
-    s17def : (DoubleFloat,Complex DoubleFloat,Integer,String,_
-	Integer) -> Result 
-     ++ s17def(fnu,z,n,scale,ifail)
-     ++ returns a sequence of values for the Bessel functions 
-     ++  J      (z) for complex z, non-negative (nu) and n=0,1,...,N-1, 
-     ++   (nu)+n                                                       
-     ++ with an option for exponential scaling.
-     ++ See \downlink{Manual Page}{manpageXXs17def}.
-    s17dgf : (String,Complex DoubleFloat,String,Integer) -> Result 
-     ++ s17dgf(deriv,z,scale,ifail)
-     ++ returns the value of the Airy function Ai(z) or its 
-     ++ derivative Ai'(z) for complex z, with an option for exponential 
-     ++ scaling.
-     ++ See \downlink{Manual Page}{manpageXXs17dgf}.
-    s17dhf : (String,Complex DoubleFloat,String,Integer) -> Result 
-     ++ s17dhf(deriv,z,scale,ifail)
-     ++ returns the value of the Airy function Bi(z) or its 
-     ++ derivative Bi'(z) for complex z, with an option for exponential 
-     ++ scaling.
-     ++ See \downlink{Manual Page}{manpageXXs17dhf}.
-    s17dlf : (Integer,DoubleFloat,Complex DoubleFloat,Integer,_
-	String,Integer) -> Result 
-     ++ s17dlf(m,fnu,z,n,scale,ifail)
-     ++ returns a sequence of values for the Hankel functions 
-     ++   (1)           (2)                                           
-     ++  H      (z) or H      (z) for complex z, non-negative (nu) and 
-     ++   (nu)+n        (nu)+n                                        
-     ++ n=0,1,...,N-1, with an option for exponential scaling.
-     ++ See \downlink{Manual Page}{manpageXXs17dlf}.
-    s18acf : (DoubleFloat,Integer) -> Result 
-     ++ s18acf(x,ifail)
-     ++ returns the value of the modified Bessel Function 
-     ++  K (x), via the routine name.
-     ++   0    
-     ++ See \downlink{Manual Page}{manpageXXs18acf}.
-    s18adf : (DoubleFloat,Integer) -> Result 
-     ++ s18adf(x,ifail)
-     ++ returns the value of the modified Bessel Function 
-     ++  K (x), via the routine name.
-     ++   1    
-     ++ See \downlink{Manual Page}{manpageXXs18adf}.
-    s18aef : (DoubleFloat,Integer) -> Result 
-     ++ s18aef(x,ifail)
-     ++ returns the value of the modified Bessel Function 
-     ++  I (x), via the routine name.
-     ++   0    
-     ++ See \downlink{Manual Page}{manpageXXs18aef}.
-    s18aff : (DoubleFloat,Integer) -> Result 
-     ++ s18aff(x,ifail)
-     ++ returns a value for the modified Bessel Function 
-     ++  I (x), via the routine name.
-     ++   1    
-     ++ See \downlink{Manual Page}{manpageXXs18aff}.
-    s18dcf : (DoubleFloat,Complex DoubleFloat,Integer,String,_
-	Integer) -> Result 
-     ++ s18dcf(fnu,z,n,scale,ifail)
-     ++ returns a sequence of values for the modified Bessel functions
-     ++  K      (z) for complex z, non-negative (nu) and 
-     ++   (nu)+n                                        
-     ++ n=0,1,...,N-1, with an option for exponential scaling.
-     ++ See \downlink{Manual Page}{manpageXXs18dcf}.
-    s18def : (DoubleFloat,Complex DoubleFloat,Integer,String,_
-	Integer) -> Result 
-     ++ s18def(fnu,z,n,scale,ifail)
-     ++ returns a sequence of values for the modified Bessel functions
-     ++  I      (z) for complex z, non-negative (nu) and 
-     ++   (nu)+n                                        
-     ++ n=0,1,...,N-1, with an option for exponential scaling.
-     ++ See \downlink{Manual Page}{manpageXXs18def}.
-    s19aaf : (DoubleFloat,Integer) -> Result 
-     ++ s19aaf(x,ifail)
-     ++ returns a value for the Kelvin function ber(x) via the 
-     ++ routine name.
-     ++ See \downlink{Manual Page}{manpageXXs19aaf}.
-    s19abf : (DoubleFloat,Integer) -> Result 
-     ++ s19abf(x,ifail)
-     ++ returns a value for the Kelvin function bei(x) via the 
-     ++ routine name.
-     ++ See \downlink{Manual Page}{manpageXXs19abf}.
-    s19acf : (DoubleFloat,Integer) -> Result 
-     ++ s19acf(x,ifail)
-     ++ returns a value for the Kelvin function ker(x), via the 
-     ++ routine name.
-     ++ See \downlink{Manual Page}{manpageXXs19acf}.
-    s19adf : (DoubleFloat,Integer) -> Result 
-     ++ s19adf(x,ifail)
-     ++ returns a value for the Kelvin function kei(x) via the 
-     ++ routine name.
-     ++ See \downlink{Manual Page}{manpageXXs19adf}.
-    s20acf : (DoubleFloat,Integer) -> Result 
-     ++ s20acf(x,ifail)
-     ++ returns a value for the Fresnel Integral S(x), via the 
-     ++ routine name.
-     ++ See \downlink{Manual Page}{manpageXXs20acf}.
-    s20adf : (DoubleFloat,Integer) -> Result 
-     ++ s20adf(x,ifail)
-     ++ returns a value for the Fresnel Integral C(x), via the 
-     ++ routine name.
-     ++ See \downlink{Manual Page}{manpageXXs20adf}.
-    s21baf : (DoubleFloat,DoubleFloat,Integer) -> Result 
-     ++ s21baf(x,y,ifail)
-     ++ returns a value of an elementary integral, which occurs as
-     ++ a degenerate case of an elliptic integral of the first kind, via 
-     ++ the routine name.
-     ++ See \downlink{Manual Page}{manpageXXs21baf}.
-    s21bbf : (DoubleFloat,DoubleFloat,DoubleFloat,Integer) -> Result 
-     ++ s21bbf(x,y,z,ifail)
-     ++ returns a value of the symmetrised elliptic integral of 
-     ++ the first kind, via the routine name.
-     ++ See \downlink{Manual Page}{manpageXXs21bbf}.
-    s21bcf : (DoubleFloat,DoubleFloat,DoubleFloat,Integer) -> Result 
-     ++ s21bcf(x,y,z,ifail)
-     ++ returns a value of the symmetrised elliptic integral of 
-     ++ the second kind, via the routine name.
-     ++ See \downlink{Manual Page}{manpageXXs21bcf}.
-    s21bdf : (DoubleFloat,DoubleFloat,DoubleFloat,DoubleFloat,_
-	Integer) -> Result 
-     ++ s21bdf(x,y,z,r,ifail)
-     ++ returns a value of the symmetrised elliptic integral of 
-     ++ the third kind, via the routine name.
-     ++ See \downlink{Manual Page}{manpageXXs21bdf}.
-  Implementation ==> add
-
-    import Lisp
-    import DoubleFloat
-    import Any
-    import Record
-    import Integer
-    import Matrix DoubleFloat
-    import Boolean
-    import NAGLinkSupportPackage
-    import AnyFunctions1(Complex DoubleFloat)
-    import AnyFunctions1(Integer)
-    import AnyFunctions1(DoubleFloat)
-    import AnyFunctions1(String)
-
-
-    s01eaf(zArg:Complex DoubleFloat,ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s01eaf",_
-	["z"::S,"ifail"::S]$Lisp,_
-	[]$Lisp,_
-	[["integer"::S,"ifail"::S]$Lisp_
-	,["double complex"::S,"s01eafResult"::S,"z"::S]$Lisp_
-	]$Lisp,_
-	["s01eafResult"::S,"ifail"::S]$Lisp,_
-	[([zArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-    s13aaf(xArg:DoubleFloat,ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s13aaf",_
-	["x"::S,"ifail"::S]$Lisp,_
-	[]$Lisp,_
-	[["double"::S,"s13aafResult"::S,"x"::S]$Lisp_
-	,["integer"::S,"ifail"::S]$Lisp_
-	]$Lisp,_
-	["s13aafResult"::S,"ifail"::S]$Lisp,_
-	[([xArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-    s13acf(xArg:DoubleFloat,ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s13acf",_
-	["x"::S,"ifail"::S]$Lisp,_
-	[]$Lisp,_
-	[["double"::S,"s13acfResult"::S,"x"::S]$Lisp_
-	,["integer"::S,"ifail"::S]$Lisp_
-	]$Lisp,_
-	["s13acfResult"::S,"ifail"::S]$Lisp,_
-	[([xArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-    s13adf(xArg:DoubleFloat,ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s13adf",_
-	["x"::S,"ifail"::S]$Lisp,_
-	[]$Lisp,_
-	[["double"::S,"s13adfResult"::S,"x"::S]$Lisp_
-	,["integer"::S,"ifail"::S]$Lisp_
-	]$Lisp,_
-	["s13adfResult"::S,"ifail"::S]$Lisp,_
-	[([xArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-    s14aaf(xArg:DoubleFloat,ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s14aaf",_
-	["x"::S,"ifail"::S]$Lisp,_
-	[]$Lisp,_
-	[["double"::S,"s14aafResult"::S,"x"::S]$Lisp_
-	,["integer"::S,"ifail"::S]$Lisp_
-	]$Lisp,_
-	["s14aafResult"::S,"ifail"::S]$Lisp,_
-	[([xArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-    s14abf(xArg:DoubleFloat,ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s14abf",_
-	["x"::S,"ifail"::S]$Lisp,_
-	[]$Lisp,_
-	[["double"::S,"s14abfResult"::S,"x"::S]$Lisp_
-	,["integer"::S,"ifail"::S]$Lisp_
-	]$Lisp,_
-	["s14abfResult"::S,"ifail"::S]$Lisp,_
-	[([xArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-    s14baf(aArg:DoubleFloat,xArg:DoubleFloat,tolArg:DoubleFloat,_
-	ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s14baf",_
-	["a"::S,"x"::S,"tol"::S,"p"::S,"q"::S_
-	,"ifail"::S]$Lisp,_
-	["p"::S,"q"::S]$Lisp,_
-	[["double"::S,"a"::S,"x"::S,"tol"::S,"p"::S_
-	,"q"::S]$Lisp_
-	,["integer"::S,"ifail"::S]$Lisp_
-	]$Lisp,_
-	["p"::S,"q"::S,"ifail"::S]$Lisp,_
-	[([aArg::Any,xArg::Any,tolArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-    s15adf(xArg:DoubleFloat,ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s15adf",_
-	["x"::S,"ifail"::S]$Lisp,_
-	[]$Lisp,_
-	[["double"::S,"s15adfResult"::S,"x"::S]$Lisp_
-	,["integer"::S,"ifail"::S]$Lisp_
-	]$Lisp,_
-	["s15adfResult"::S,"ifail"::S]$Lisp,_
-	[([xArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-    s15aef(xArg:DoubleFloat,ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s15aef",_
-	["x"::S,"ifail"::S]$Lisp,_
-	[]$Lisp,_
-	[["double"::S,"s15aefResult"::S,"x"::S]$Lisp_
-	,["integer"::S,"ifail"::S]$Lisp_
-	]$Lisp,_
-	["s15aefResult"::S,"ifail"::S]$Lisp,_
-	[([xArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-    s17acf(xArg:DoubleFloat,ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s17acf",_
-	["x"::S,"ifail"::S]$Lisp,_
-	[]$Lisp,_
-	[["double"::S,"s17acfResult"::S,"x"::S]$Lisp_
-	,["integer"::S,"ifail"::S]$Lisp_
-	]$Lisp,_
-	["s17acfResult"::S,"ifail"::S]$Lisp,_
-	[([xArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-    s17adf(xArg:DoubleFloat,ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s17adf",_
-	["x"::S,"ifail"::S]$Lisp,_
-	[]$Lisp,_
-	[["double"::S,"s17adfResult"::S,"x"::S]$Lisp_
-	,["integer"::S,"ifail"::S]$Lisp_
-	]$Lisp,_
-	["s17adfResult"::S,"ifail"::S]$Lisp,_
-	[([xArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-    s17aef(xArg:DoubleFloat,ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s17aef",_
-	["x"::S,"ifail"::S]$Lisp,_
-	[]$Lisp,_
-	[["double"::S,"s17aefResult"::S,"x"::S]$Lisp_
-	,["integer"::S,"ifail"::S]$Lisp_
-	]$Lisp,_
-	["s17aefResult"::S,"ifail"::S]$Lisp,_
-	[([xArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-    s17aff(xArg:DoubleFloat,ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s17aff",_
-	["x"::S,"ifail"::S]$Lisp,_
-	[]$Lisp,_
-	[["double"::S,"s17affResult"::S,"x"::S]$Lisp_
-	,["integer"::S,"ifail"::S]$Lisp_
-	]$Lisp,_
-	["s17affResult"::S,"ifail"::S]$Lisp,_
-	[([xArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-    s17agf(xArg:DoubleFloat,ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s17agf",_
-	["x"::S,"ifail"::S]$Lisp,_
-	[]$Lisp,_
-	[["double"::S,"s17agfResult"::S,"x"::S]$Lisp_
-	,["integer"::S,"ifail"::S]$Lisp_
-	]$Lisp,_
-	["s17agfResult"::S,"ifail"::S]$Lisp,_
-	[([xArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-    s17ahf(xArg:DoubleFloat,ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s17ahf",_
-	["x"::S,"ifail"::S]$Lisp,_
-	[]$Lisp,_
-	[["double"::S,"s17ahfResult"::S,"x"::S]$Lisp_
-	,["integer"::S,"ifail"::S]$Lisp_
-	]$Lisp,_
-	["s17ahfResult"::S,"ifail"::S]$Lisp,_
-	[([xArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-    s17ajf(xArg:DoubleFloat,ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s17ajf",_
-	["x"::S,"ifail"::S]$Lisp,_
-	[]$Lisp,_
-	[["double"::S,"s17ajfResult"::S,"x"::S]$Lisp_
-	,["integer"::S,"ifail"::S]$Lisp_
-	]$Lisp,_
-	["s17ajfResult"::S,"ifail"::S]$Lisp,_
-	[([xArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-    s17akf(xArg:DoubleFloat,ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s17akf",_
-	["x"::S,"ifail"::S]$Lisp,_
-	[]$Lisp,_
-	[["double"::S,"s17akfResult"::S,"x"::S]$Lisp_
-	,["integer"::S,"ifail"::S]$Lisp_
-	]$Lisp,_
-	["s17akfResult"::S,"ifail"::S]$Lisp,_
-	[([xArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-
-    s17dcf(fnuArg:DoubleFloat,zArg:Complex DoubleFloat,nArg:Integer,_
-	scaleArg:String,ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s17dcf",_
-	["fnu"::S,"z"::S,"n"::S,"scale"::S,"nz"::S_
-	,"ifail"::S,"cy"::S,"cwrk"::S]$Lisp,_
-	["cy"::S,"nz"::S,"cwrk"::S]$Lisp,_
-	[["double"::S,"fnu"::S]$Lisp_
-	,["integer"::S,"n"::S,"nz"::S,"ifail"::S]$Lisp_
-	,["character"::S,"scale"::S]$Lisp_
-	,["double complex"::S,"z"::S,["cy"::S,"n"::S]$Lisp,["cwrk"::S,"n"::S]$Lisp]$Lisp_
-	]$Lisp,_
-	["cy"::S,"nz"::S,"ifail"::S]$Lisp,_
-	[([fnuArg::Any,zArg::Any,nArg::Any,scaleArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-    s17def(fnuArg:DoubleFloat,zArg:Complex DoubleFloat,nArg:Integer,_
-	scaleArg:String,ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s17def",_
-	["fnu"::S,"z"::S,"n"::S,"scale"::S,"nz"::S_
-	,"ifail"::S,"cy"::S]$Lisp,_
-	["cy"::S,"nz"::S]$Lisp,_
-	[["double"::S,"fnu"::S]$Lisp_
-	,["integer"::S,"n"::S,"nz"::S,"ifail"::S]$Lisp_
-	,["character"::S,"scale"::S]$Lisp_
-	,["double complex"::S,"z"::S,["cy"::S,"n"::S]$Lisp]$Lisp_
-	]$Lisp,_
-	["cy"::S,"nz"::S,"ifail"::S]$Lisp,_
-	[([fnuArg::Any,zArg::Any,nArg::Any,scaleArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-    s17dgf(derivArg:String,zArg:Complex DoubleFloat,scaleArg:String,_
-	ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s17dgf",_
-	["deriv"::S,"z"::S,"scale"::S,"ai"::S,"nz"::S_
-	,"ifail"::S]$Lisp,_
-	["ai"::S,"nz"::S]$Lisp,_
-	[["integer"::S,"nz"::S,"ifail"::S]$Lisp_
-	,["character"::S,"deriv"::S,"scale"::S]$Lisp_
-	,["double complex"::S,"z"::S,"ai"::S]$Lisp_
-	]$Lisp,_
-	["ai"::S,"nz"::S,"ifail"::S]$Lisp,_
-	[([derivArg::Any,zArg::Any,scaleArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-    s17dhf(derivArg:String,zArg:Complex DoubleFloat,scaleArg:String,_
-	ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s17dhf",_
-	["deriv"::S,"z"::S,"scale"::S,"bi"::S,"ifail"::S_
-	]$Lisp,_
-	["bi"::S]$Lisp,_
-	[["integer"::S,"ifail"::S]$Lisp_
-	,["character"::S,"deriv"::S,"scale"::S]$Lisp_
-	,["double complex"::S,"z"::S,"bi"::S]$Lisp_
-	]$Lisp,_
-	["bi"::S,"ifail"::S]$Lisp,_
-	[([derivArg::Any,zArg::Any,scaleArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-    s17dlf(mArg:Integer,fnuArg:DoubleFloat,zArg:Complex DoubleFloat,_
-	nArg:Integer,scaleArg:String,ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s17dlf",_
-	["m"::S,"fnu"::S,"z"::S,"n"::S,"scale"::S_
-	,"nz"::S,"ifail"::S,"cy"::S]$Lisp,_
-	["cy"::S,"nz"::S]$Lisp,_
-	[["double"::S,"fnu"::S]$Lisp_
-	,["integer"::S,"m"::S,"n"::S,"nz"::S,"ifail"::S_
-	]$Lisp_
-	,["character"::S,"scale"::S]$Lisp_
-	,["double complex"::S,"z"::S,["cy"::S,"n"::S]$Lisp]$Lisp_
-	]$Lisp,_
-	["cy"::S,"nz"::S,"ifail"::S]$Lisp,_
-	[([mArg::Any,fnuArg::Any,zArg::Any,nArg::Any,scaleArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-    s18acf(xArg:DoubleFloat,ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s18acf",_
-	["x"::S,"ifail"::S]$Lisp,_
-	[]$Lisp,_
-	[["double"::S,"s18acfResult"::S,"x"::S]$Lisp_
-	,["integer"::S,"ifail"::S]$Lisp_
-	]$Lisp,_
-	["s18acfResult"::S,"ifail"::S]$Lisp,_
-	[([xArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-    s18adf(xArg:DoubleFloat,ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s18adf",_
-	["x"::S,"ifail"::S]$Lisp,_
-	[]$Lisp,_
-	[["double"::S,"s18adfResult"::S,"x"::S]$Lisp_
-	,["integer"::S,"ifail"::S]$Lisp_
-	]$Lisp,_
-	["s18adfResult"::S,"ifail"::S]$Lisp,_
-	[([xArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-    s18aef(xArg:DoubleFloat,ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s18aef",_
-	["x"::S,"ifail"::S]$Lisp,_
-	[]$Lisp,_
-	[["double"::S,"s18aefResult"::S,"x"::S]$Lisp_
-	,["integer"::S,"ifail"::S]$Lisp_
-	]$Lisp,_
-	["s18aefResult"::S,"ifail"::S]$Lisp,_
-	[([xArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-    s18aff(xArg:DoubleFloat,ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s18aff",_
-	["x"::S,"ifail"::S]$Lisp,_
-	[]$Lisp,_
-	[["double"::S,"s18affResult"::S,"x"::S]$Lisp_
-	,["integer"::S,"ifail"::S]$Lisp_
-	]$Lisp,_
-	["s18affResult"::S,"ifail"::S]$Lisp,_
-	[([xArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-    s18dcf(fnuArg:DoubleFloat,zArg:Complex DoubleFloat,nArg:Integer,_
-	scaleArg:String,ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s18dcf",_
-	["fnu"::S,"z"::S,"n"::S,"scale"::S,"nz"::S_
-	,"ifail"::S,"cy"::S]$Lisp,_
-	["cy"::S,"nz"::S]$Lisp,_
-	[["double"::S,"fnu"::S]$Lisp_
-	,["integer"::S,"n"::S,"nz"::S,"ifail"::S]$Lisp_
-	,["character"::S,"scale"::S]$Lisp_
-	,["double complex"::S,"z"::S,["cy"::S,"n"::S]$Lisp]$Lisp_
-	]$Lisp,_
-	["cy"::S,"nz"::S,"ifail"::S]$Lisp,_
-	[([fnuArg::Any,zArg::Any,nArg::Any,scaleArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-    s18def(fnuArg:DoubleFloat,zArg:Complex DoubleFloat,nArg:Integer,_
-	scaleArg:String,ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s18def",_
-	["fnu"::S,"z"::S,"n"::S,"scale"::S,"nz"::S_
-	,"ifail"::S,"cy"::S]$Lisp,_
-	["cy"::S,"nz"::S]$Lisp,_
-	[["double"::S,"fnu"::S]$Lisp_
-	,["integer"::S,"n"::S,"nz"::S,"ifail"::S]$Lisp_
-	,["character"::S,"scale"::S]$Lisp_
-	,["double complex"::S,"z"::S,["cy"::S,"n"::S]$Lisp]$Lisp_
-	]$Lisp,_
-	["cy"::S,"nz"::S,"ifail"::S]$Lisp,_
-	[([fnuArg::Any,zArg::Any,nArg::Any,scaleArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-    s19aaf(xArg:DoubleFloat,ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s19aaf",_
-	["x"::S,"ifail"::S]$Lisp,_
-	[]$Lisp,_
-	[["double"::S,"s19aafResult"::S,"x"::S]$Lisp_
-	,["integer"::S,"ifail"::S]$Lisp_
-	]$Lisp,_
-	["s19aafResult"::S,"ifail"::S]$Lisp,_
-	[([xArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-    s19abf(xArg:DoubleFloat,ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s19abf",_
-	["x"::S,"ifail"::S]$Lisp,_
-	[]$Lisp,_
-	[["double"::S,"s19abfResult"::S,"x"::S]$Lisp_
-	,["integer"::S,"ifail"::S]$Lisp_
-	]$Lisp,_
-	["s19abfResult"::S,"ifail"::S]$Lisp,_
-	[([xArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-    s19acf(xArg:DoubleFloat,ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s19acf",_
-	["x"::S,"ifail"::S]$Lisp,_
-	[]$Lisp,_
-	[["double"::S,"s19acfResult"::S,"x"::S]$Lisp_
-	,["integer"::S,"ifail"::S]$Lisp_
-	]$Lisp,_
-	["s19acfResult"::S,"ifail"::S]$Lisp,_
-	[([xArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-    s19adf(xArg:DoubleFloat,ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s19adf",_
-	["x"::S,"ifail"::S]$Lisp,_
-	[]$Lisp,_
-	[["double"::S,"s19adfResult"::S,"x"::S]$Lisp_
-	,["integer"::S,"ifail"::S]$Lisp_
-	]$Lisp,_
-	["s19adfResult"::S,"ifail"::S]$Lisp,_
-	[([xArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-    s20acf(xArg:DoubleFloat,ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s20acf",_
-	["x"::S,"ifail"::S]$Lisp,_
-	[]$Lisp,_
-	[["double"::S,"s20acfResult"::S,"x"::S]$Lisp_
-	,["integer"::S,"ifail"::S]$Lisp_
-	]$Lisp,_
-	["s20acfResult"::S,"ifail"::S]$Lisp,_
-	[([xArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-    s20adf(xArg:DoubleFloat,ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s20adf",_
-	["x"::S,"ifail"::S]$Lisp,_
-	[]$Lisp,_
-	[["double"::S,"s20adfResult"::S,"x"::S]$Lisp_
-	,["integer"::S,"ifail"::S]$Lisp_
-	]$Lisp,_
-	["s20adfResult"::S,"ifail"::S]$Lisp,_
-	[([xArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-    s21baf(xArg:DoubleFloat,yArg:DoubleFloat,ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s21baf",_
-	["x"::S,"y"::S,"ifail"::S]$Lisp,_
-	[]$Lisp,_
-	[["double"::S,"s21bafResult"::S,"x"::S,"y"::S_
-	]$Lisp_
-	,["integer"::S,"ifail"::S]$Lisp_
-	]$Lisp,_
-	["s21bafResult"::S,"ifail"::S]$Lisp,_
-	[([xArg::Any,yArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-    s21bbf(xArg:DoubleFloat,yArg:DoubleFloat,zArg:DoubleFloat,_
-	ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s21bbf",_
-	["x"::S,"y"::S,"z"::S,"ifail"::S]$Lisp,_
-	[]$Lisp,_
-	[["double"::S,"s21bbfResult"::S,"x"::S,"y"::S_
-	,"z"::S]$Lisp_
-	,["integer"::S,"ifail"::S]$Lisp_
-	]$Lisp,_
-	["s21bbfResult"::S,"ifail"::S]$Lisp,_
-	[([xArg::Any,yArg::Any,zArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-    s21bcf(xArg:DoubleFloat,yArg:DoubleFloat,zArg:DoubleFloat,_
-	ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s21bcf",_
-	["x"::S,"y"::S,"z"::S,"ifail"::S]$Lisp,_
-	[]$Lisp,_
-	[["double"::S,"s21bcfResult"::S,"x"::S,"y"::S_
-	,"z"::S]$Lisp_
-	,["integer"::S,"ifail"::S]$Lisp_
-	]$Lisp,_
-	["s21bcfResult"::S,"ifail"::S]$Lisp,_
-	[([xArg::Any,yArg::Any,zArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-    s21bdf(xArg:DoubleFloat,yArg:DoubleFloat,zArg:DoubleFloat,_
-	rArg:DoubleFloat,ifailArg:Integer): Result == 
-	[(invokeNagman(NIL$Lisp,_
-	"s21bdf",_
-	["x"::S,"y"::S,"z"::S,"r"::S,"ifail"::S_
-	]$Lisp,_
-	[]$Lisp,_
-	[["double"::S,"s21bdfResult"::S,"x"::S,"y"::S_
-	,"z"::S,"r"::S]$Lisp_
-	,["integer"::S,"ifail"::S]$Lisp_
-	]$Lisp,_
-	["s21bdfResult"::S,"ifail"::S]$Lisp,_
-	[([xArg::Any,yArg::Any,zArg::Any,rArg::Any,ifailArg::Any ])_
-	@List Any]$Lisp)$Lisp)_
-	pretend List (Record(key:Symbol,entry:Any))]$Result
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
---    - Redistributions of source code must retain the above copyright
---      notice, this list of conditions and the following disclaimer.
---
---    - Redistributions in binary form must reproduce the above copyright
---      notice, this list of conditions and the following disclaimer in
---      the documentation and/or other materials provided with the
---      distribution.
---
---    - Neither the name of The Numerical ALgorithms Group Ltd. nor the
---      names of its contributors may be used to endorse or promote products
---      derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package NAGS NagSpecialFunctionsPackage>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/seg.spad.pamphlet b/src/algebra/seg.spad.pamphlet
deleted file mode 100644
index ddbbd7a..0000000
--- a/src/algebra/seg.spad.pamphlet
+++ /dev/null
@@ -1,198 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/algebra seg.spad}
-\author{Stephen M. Watt, Robert Sutor}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package SEG2 SegmentFunctions2}
-<<package SEG2 SegmentFunctions2>>=
-)abbrev package SEG2 SegmentFunctions2
-++ Author:
-++ Date Created:
-++ Date Last Updated: June 4, 1991
-++ Basic Operations:
-++ Related Domains: Segment, UniversalSegment
-++ Also See:
-++ AMS Classifications:
-++ Keywords: equation
-++ Examples:
-++ References:
-++ Description:
-++   This package provides operations for mapping functions onto segments.
-
-SegmentFunctions2(R:Type, S:Type): public == private where
-  public ==> with
-    map: (R -> S, Segment R) -> Segment S
-        ++ map(f,l..h) returns a new segment \spad{f(l)..f(h)}.
-
-    if R has OrderedRing then
-      map: (R -> S, Segment R) -> List S
-        ++ map(f,s) expands the segment s, applying \spad{f} to each
-        ++ value.  For example, if \spad{s = l..h by k}, then the list
-        ++ \spad{[f(l), f(l+k),..., f(lN)]} is computed, where
-        ++ \spad{lN <= h < lN+k}.
-
-
-  private ==> add
-    map(f : R->S, r : Segment R): Segment S ==
-      SEGMENT(f lo r,f hi r)$Segment(S)
-
-    if R has OrderedRing then
-     map(f : R->S, r : Segment R): List S ==
-       lr := nil()$List(S)
-       l := lo r
-       h := hi r
-       inc := (incr r)::R
-       if inc > 0 then
-         while l <= h repeat
-           lr := concat(f(l), lr)
-           l := l + inc
-       else
-         while l >= h repeat
-           lr := concat(f(l), lr)
-           l := l + inc
-       reverse_! lr
-
-@
-\section{package SEGBIND2 SegmentBindingFunctions2}
-<<package SEGBIND2 SegmentBindingFunctions2>>=
-)abbrev package SEGBIND2 SegmentBindingFunctions2
-++ Author:
-++ Date Created:
-++ Date Last Updated: June 4, 1991
-++ Basic Operations:
-++ Related Domains: SegmentBinding, Segment, Equation
-++ Also See:
-++ AMS Classifications:
-++ Keywords: equation
-++ Examples:
-++ References:
-++ Description:
-++   This package provides operations for mapping functions onto
-++   \spadtype{SegmentBinding}s.
-SegmentBindingFunctions2(R:Type, S:Type): with
-  map: (R -> S, SegmentBinding R) -> SegmentBinding S
-      ++ map(f,v=a..b) returns the value given by \spad{v=f(a)..f(b)}.
- == add
-  map(f, b) ==
-    equation(variable b, map(f, segment b)$SegmentFunctions2(R, S))
-
-@
-\section{package UNISEG2 UniversalSegmentFunctions2}
-<<package UNISEG2 UniversalSegmentFunctions2>>=
-)abbrev package UNISEG2 UniversalSegmentFunctions2
-++ Author:
-++ Date Created:
-++ Date Last Updated: June 4, 1991
-++ Basic Operations:
-++ Related Domains: Segment, UniversalSegment
-++ Also See:
-++ AMS Classifications:
-++ Keywords: equation
-++ Examples:
-++ References:
-++ Description:
-++   This package provides operations for mapping functions onto segments.
-
-UniversalSegmentFunctions2(R:Type, S:Type): with
-    map: (R -> S, UniversalSegment R) -> UniversalSegment S
-        ++ map(f,seg) returns the new segment obtained by applying
-        ++ f to the endpoints of seg.
-
-    if R has OrderedRing then
-      map: (R -> S, UniversalSegment R) -> Stream S
-        ++ map(f,s) expands the segment s, applying \spad{f} to each value.
-
-
-  == add
-    map(f:R -> S, u:UniversalSegment R):UniversalSegment S ==
-      s := f lo u
-      hasHi u => segment(s, f hi u)
-      segment s
-
-    if R has OrderedRing then
-      map(f:R -> S, u:UniversalSegment R): Stream S ==
-        map(f, expand u)$StreamFunctions2(R, S)
-
-@
-\section{package INCRMAPS IncrementingMaps}
-<<package INCRMAPS IncrementingMaps>>=
-)abbrev package INCRMAPS IncrementingMaps
-++ Author:
-++ Date Created:
-++ Date Last Updated: June 4, 1991
-++ Basic Operations:
-++ Related Domains: UniversalSegment
-++ Also See:
-++ AMS Classifications:
-++ Keywords: equation
-++ Examples:
-++ References:
-++ Description:
-++   This package provides operations to create incrementing functions.
-
-IncrementingMaps(R:Join(Monoid, AbelianSemiGroup)): with
-    increment: () -> (R -> R)
-        ++ increment() produces a function which adds \spad{1} to whatever
-        ++ argument it is given.  For example, if {f := increment()} then
-        ++ \spad{f x} is \spad{x+1}.
-    incrementBy: R -> (R -> R)
-        ++ incrementBy(n) produces a function which adds \spad{n} to whatever
-        ++ argument it is given.  For example, if {f := increment(n)} then
-        ++ \spad{f x} is \spad{x+n}.
-  == add
-    increment() == 1 + #1
-    incrementBy n == n + #1
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
---    - Redistributions of source code must retain the above copyright
---      notice, this list of conditions and the following disclaimer.
---
---    - Redistributions in binary form must reproduce the above copyright
---      notice, this list of conditions and the following disclaimer in
---      the documentation and/or other materials provided with the
---      distribution.
---
---    - Neither the name of The Numerical ALgorithms Group Ltd. nor the
---      names of its contributors may be used to endorse or promote products
---      derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package SEG2 SegmentFunctions2>>
-<<package SEGBIND2 SegmentBindingFunctions2>>
-<<package UNISEG2 UniversalSegmentFunctions2>>
-<<package INCRMAPS IncrementingMaps>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/setorder.spad.pamphlet b/src/algebra/setorder.spad.pamphlet
deleted file mode 100644
index 198d8d8..0000000
--- a/src/algebra/setorder.spad.pamphlet
+++ /dev/null
@@ -1,186 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/algebra setorder.spad}
-\author{Manuel Bronstein}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package UDPO UserDefinedPartialOrdering}
-<<package UDPO UserDefinedPartialOrdering>>=
-)abbrev package UDPO UserDefinedPartialOrdering
-++ Author: Manuel Bronstein
-++ Date Created: March 1990
-++ Date Last Updated: 9 April 1991
-++ Description:
-++  Provides functions to force a partial ordering on any set.
-UserDefinedPartialOrdering(S:SetCategory): with
-  setOrder    : List S -> Void
-    ++ setOrder([a1,...,an]) defines a partial ordering on S given by:
-    ++    (1)  \spad{a1 < a2 < ... < an}.
-    ++    (2)  \spad{b < ai   for i = 1..n} and b not among the ai's.
-    ++    (3)  undefined on \spad{(b, c)} if neither is among the ai's.
-  setOrder    : (List S, List S) -> Void
-    ++ setOrder([b1,...,bm], [a1,...,an]) defines a partial
-    ++ ordering on S given by:
-    ++    (1)  \spad{b1 < b2 < ... < bm < a1 < a2 < ... < an}.
-    ++    (2)  \spad{bj < c < ai}  for c not among the ai's and bj's.
-    ++    (3)  undefined on \spad{(c,d)} if neither is among the ai's,bj's.
-  getOrder    : () -> Record(low: List S, high: List S)
-    ++ getOrder() returns \spad{[[b1,...,bm], [a1,...,an]]} such that the
-    ++ partial ordering on S was given by
-    ++ \spad{setOrder([b1,...,bm],[a1,...,an])}.
-  less?       : (S, S) -> Union(Boolean, "failed")
-    ++ less?(a, b) compares \spad{a} and b in the partial ordering induced by
-    ++ setOrder.
-  less?       : (S, S, (S, S) -> Boolean) -> Boolean
-    ++ less?(a, b, fn) compares \spad{a} and b in the partial ordering induced
-    ++ by setOrder, and returns \spad{fn(a, b)} if \spad{a} 
-    ++ and b are not comparable
-    ++ in that ordering.
-  largest     : (List S, (S, S) -> Boolean) -> S
-    ++ largest(l, fn) returns the largest element of l where the partial
-    ++ ordering induced by setOrder is completed into a total one by fn.
-  userOrdered?: () -> Boolean
-    ++ userOrdered?() tests if the partial ordering induced by 
-    ++ \spadfunFrom{setOrder}{UserDefinedPartialOrdering} is not empty.
-  if S has OrderedSet then
-    largest: List S -> S
-      ++ largest l returns the largest element of l where the partial
-      ++ ordering induced by setOrder is completed into a total one by
-      ++ the ordering on S.
-    more?  : (S, S) -> Boolean
-      ++ more?(a, b) compares \spad{a} and b in the partial ordering induced
-      ++ by setOrder, and uses the ordering on S if \spad{a} and b are not
-      ++ comparable in the partial ordering.
- 
- == add
-  llow :Reference List S := ref nil()
-  lhigh:Reference List S := ref nil()
- 
-  userOrdered?() == not(empty? deref llow) or not(empty? deref lhigh)
-  getOrder()     == [deref llow, deref lhigh]
-  setOrder l     == setOrder(nil(), l)
- 
-  setOrder(l, h) ==
-    setref(llow, removeDuplicates l)
-    setref(lhigh, removeDuplicates h)
-    void
- 
-  less?(a, b, f) ==
-    (u := less?(a, b)) case "failed" => f(a, b)
-    u::Boolean
- 
-  largest(x, f) ==
-    empty? x => error "largest: empty list"
-    empty? rest x => first x
-    a := largest(rest x, f)
-    less?(first x, a, f) => a
-    first x
- 
-  less?(a, b) ==
-    for x in deref llow repeat
-      x = a => return(a ^= b)
-      x = b => return false
-    aa := bb := false$Boolean
-    for x in deref lhigh repeat
-      if x = a then
-        bb => return false
-        aa := true
-      if x = b then
-        aa => return(a ^= b)
-        bb := true
-    aa => false
-    bb => true
-    "failed"
- 
-  if S has OrderedSet then
-    more?(a, b) == not less?(a, b, #1 <$S #2)
-    largest x   == largest(x, #1 <$S #2)
-
-@
-\section{package UDVO UserDefinedVariableOrdering}
-<<package UDVO UserDefinedVariableOrdering>>=
-)abbrev package UDVO UserDefinedVariableOrdering
-++ Author: Manuel Bronstein
-++ Date Created: March 1990
-++ Date Last Updated: 9 April 1991
-++ Description:
-++  This packages provides functions to allow the user to select the ordering
-++  on the variables and operators for displaying polynomials,
-++  fractions and expressions. The ordering affects the display
-++  only and not the computations.
-UserDefinedVariableOrdering(): with
-  setVariableOrder  : List Symbol -> Void
-    ++ setVariableOrder([a1,...,an]) defines an ordering on the
-    ++ variables given by \spad{a1 > a2 > ... > an > other variables}.
-  setVariableOrder  : (List Symbol, List Symbol) -> Void
-    ++ setVariableOrder([b1,...,bm], [a1,...,an]) defines an ordering
-    ++ on the variables given by
-    ++ \spad{b1 > b2 > ... > bm >} other variables \spad{>  a1 > a2 > ... > an}.
-  getVariableOrder  : () -> Record(high:List Symbol, low:List Symbol)
-    ++ getVariableOrder() returns \spad{[[b1,...,bm], [a1,...,an]]} such that
-    ++ the ordering on the variables was given by
-    ++ \spad{setVariableOrder([b1,...,bm], [a1,...,an])}.
-  resetVariableOrder: () -> Void
-    ++ resetVariableOrder() cancels any previous use of
-    ++ setVariableOrder and returns to the default system ordering.
- == add
-  import UserDefinedPartialOrdering(Symbol)
- 
-  setVariableOrder l       == setOrder reverse l
-  setVariableOrder(l1, l2) == setOrder(reverse l2, reverse l1)
-  resetVariableOrder()     == setVariableOrder(nil(), nil())
- 
-  getVariableOrder() ==
-    r := getOrder()
-    [reverse(r.high), reverse(r.low)]
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
---    - Redistributions of source code must retain the above copyright
---      notice, this list of conditions and the following disclaimer.
---
---    - Redistributions in binary form must reproduce the above copyright
---      notice, this list of conditions and the following disclaimer in
---      the documentation and/or other materials provided with the
---      distribution.
---
---    - Neither the name of The Numerical ALgorithms Group Ltd. nor the
---      names of its contributors may be used to endorse or promote products
---      derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
- 
-<<package UDPO UserDefinedPartialOrdering>>
-<<package UDVO UserDefinedVariableOrdering>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/sgcf.spad.pamphlet b/src/algebra/sgcf.spad.pamphlet
deleted file mode 100644
index b274076..0000000
--- a/src/algebra/sgcf.spad.pamphlet
+++ /dev/null
@@ -1,526 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/algebra sgcf.spad}
-\author{Johannes Grabmeier, Thorsten Werther}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package SGCF SymmetricGroupCombinatoricFunctions}
-<<package SGCF SymmetricGroupCombinatoricFunctions>>=
-)abbrev package SGCF SymmetricGroupCombinatoricFunctions
-++ Authors: Johannes Grabmeier, Thorsten Werther
-++ Date Created: 03 September 1988
-++ Date Last Updated: 07 June 1990
-++ Basic Operations: nextPartition, numberOfImproperPartitions,
-++   listYoungTableaus, subSet, unrankImproperPartitions0
-++ Related Constructors: IntegerCombinatoricFunctions
-++ Also See: RepresentationTheoryPackage1, RepresentationTheoryPackage2,
-++   IrrRepSymNatPackage
-++ AMS Classifications:
-++ Keywords: improper partition, partition, subset, Coleman
-++ References:
-++   G. James/ A. Kerber: The Representation Theory of the Symmetric
-++    Group. Encycl. of Math. and its Appl., Vol. 16., Cambridge
-++    Univ. Press 1981, ISBN 0-521-30236-6.
-++   S.G. Williamson: Combinatorics for Computer Science,
-++    Computer Science Press, Rockville, Maryland, USA, ISBN 0-88175-020-4.
-++   A. Nijenhuis / H.S. Wilf: Combinatoral Algorithms, Academic Press 1978.
-++    ISBN 0-12-519260-6.
-++   H. Gollan, J. Grabmeier: Algorithms in Representation Theory and
-++    their Realization in the Computer Algebra System Scratchpad,
-++    Bayreuther Mathematische Schriften, Heft 33, 1990, 1-23.
-++ Description:
-++   SymmetricGroupCombinatoricFunctions contains combinatoric
-++   functions concerning symmetric groups and representation
-++   theory: list young tableaus, improper partitions, subsets
-++   bijection of Coleman.
- 
-SymmetricGroupCombinatoricFunctions(): public == private where
- 
-  NNI  ==> NonNegativeInteger
-  I    ==> Integer
-  L    ==> List
-  M    ==> Matrix
-  V    ==> Vector
-  B    ==> Boolean
-  ICF  ==> IntegerCombinatoricFunctions Integer
- 
-  public ==> with
- 
---    IS THERE A WORKING DOMAIN Tableau ??
---    coerce : M I -> Tableau(I)
---      ++ coerce(ytab) coerces the Young-Tableau ytab to an element of
---      ++ the domain Tableau(I).
- 
-    coleman : (L I, L I, L I) -> M I
-      ++ coleman(alpha,beta,pi):
-      ++ there is a bijection from the set of matrices having nonnegative
-      ++ entries and row sums {\em alpha}, column sums {\em beta}
-      ++ to the set of {\em Salpha - Sbeta} double cosets of the
-      ++ symmetric group {\em Sn}. ({\em Salpha} is the Young subgroup
-      ++ corresponding to the improper partition {\em alpha}).
-      ++ For a representing element {\em pi} of such a double coset,
-      ++ coleman(alpha,beta,pi) generates the Coleman-matrix
-      ++ corresponding to {\em alpha, beta, pi}.
-      ++ Note: The permutation {\em pi} of {\em {1,2,...,n}} has to be given
-      ++ in list form.
-      ++ Note: the inverse of this map is {\em inverseColeman}
-      ++ (if {\em pi} is the lexicographical smallest permutation
-      ++ in the coset). For details see James/Kerber.
-    inverseColeman : (L I, L I, M I) -> L I
-      ++ inverseColeman(alpha,beta,C):
-      ++ there is a bijection from the set of matrices having nonnegative
-      ++ entries and row sums {\em alpha}, column sums {\em beta}
-      ++ to the set of {\em Salpha - Sbeta} double cosets of the
-      ++ symmetric group {\em Sn}. ({\em Salpha} is the Young subgroup
-      ++ corresponding to the improper partition {\em alpha}).
-      ++ For such a matrix C, inverseColeman(alpha,beta,C)
-      ++ calculates the lexicographical smallest {\em pi} in the
-      ++ corresponding double coset.
-      ++ Note: the resulting permutation {\em pi} of {\em {1,2,...,n}} 
-      ++ is given in list form.
-      ++ Notes: the inverse of this map is {\em coleman}.
-      ++ For details, see James/Kerber.
-    listYoungTableaus : (L I) -> L M I
-      ++ listYoungTableaus(lambda) where {\em lambda} is a proper partition
-      ++ generates the list of all standard tableaus of shape {\em lambda}
-      ++ by means of lattice permutations. The numbers of the lattice
-      ++ permutation are interpreted as column labels. Hence the
-      ++ contents of these lattice permutations are the conjugate of
-      ++ {\em lambda}.
-      ++ Notes: the functions {\em nextLatticePermutation} and
-      ++ {\em makeYoungTableau} are used.
-      ++ The entries are from {\em 0,...,n-1}.
-    makeYoungTableau : (L I,L I) -> M I
-      ++ makeYoungTableau(lambda,gitter) computes for a given lattice
-      ++ permutation {\em gitter} and for an improper partition {\em lambda}
-      ++ the corresponding standard tableau of shape {\em lambda}.
-      ++ Notes: see {\em listYoungTableaus}.
-      ++ The entries are from {\em 0,...,n-1}.
-    nextColeman : (L I, L I, M I) -> M I
-      ++ nextColeman(alpha,beta,C) generates the next Coleman matrix
-      ++ of column sums {\em alpha} and row sums {\em beta} according
-      ++ to the lexicographical order from bottom-to-top.
-      ++ The first Coleman matrix is achieved by {\em C=new(1,1,0)}.
-      ++ Also, {\em new(1,1,0)} indicates that C is the last Coleman matrix.
-    nextLatticePermutation : (L I, L I, B) -> L I
-      ++ nextLatticePermutation(lambda,lattP,constructNotFirst) generates
-      ++ the lattice permutation according to the proper partition
-      ++ {\em lambda} succeeding the lattice permutation {\em lattP} in
-      ++ lexicographical order as long as {\em constructNotFirst} is true.
-      ++ If {\em constructNotFirst} is false, the first lattice permutation
-      ++ is returned.
-      ++ The result {\em nil} indicates that {\em lattP} has no successor.
-    nextPartition : (V I, V I, I) -> V I
-      ++ nextPartition(gamma,part,number) generates the partition of
-      ++ {\em number} which follows {\em part} according to the right-to-left
-      ++ lexicographical order. The partition has the property that
-      ++ its components do not exceed the corresponding components of
-      ++ {\em gamma}. The first partition is achieved by {\em part=[]}.
-      ++ Also, {\em []} indicates that {\em part} is the last partition.
-    nextPartition : (L I, V I, I) -> V I
-      ++ nextPartition(gamma,part,number) generates the partition of
-      ++ {\em number} which follows {\em part} according to the right-to-left
-      ++ lexicographical order. The partition has the property that
-      ++ its components do not exceed the corresponding components of
-      ++ {\em gamma}. the first partition is achieved by {\em part=[]}.
-      ++ Also, {\em []} indicates that {\em part} is the last partition.
-    numberOfImproperPartitions: (I,I) -> I
-      ++ numberOfImproperPartitions(n,m) computes the number of partitions
-      ++ of the nonnegative integer n in m nonnegative parts with regarding
-      ++ the order (improper partitions).
-      ++ Example: {\em numberOfImproperPartitions (3,3)} is 10,
-      ++ since {\em [0,0,3], [0,1,2], [0,2,1], [0,3,0], [1,0,2], [1,1,1],
-      ++ [1,2,0], [2,0,1], [2,1,0], [3,0,0]} are the possibilities.
-      ++ Note: this operation has a recursive implementation.
-    subSet : (I,I,I) -> L I
-      ++ subSet(n,m,k) calculates the {\em k}-th {\em m}-subset of the set
-      ++ {\em 0,1,...,(n-1)} in the lexicographic order considered as
-      ++ a decreasing map from {\em 0,...,(m-1)} into {\em 0,...,(n-1)}.
-      ++ See S.G. Williamson: Theorem 1.60.
-      ++ Error: if not {\em (0 <= m <= n and 0 < = k < (n choose m))}.
-    unrankImproperPartitions0 : (I,I,I) -> L I
-      ++ unrankImproperPartitions0(n,m,k) computes the {\em k}-th improper
-      ++ partition of nonnegative n in m nonnegative parts in reverse
-      ++ lexicographical order.
-      ++ Example: {\em [0,0,3] < [0,1,2] < [0,2,1] < [0,3,0] <
-      ++ [1,0,2] < [1,1,1] < [1,2,0] < [2,0,1] < [2,1,0] < [3,0,0]}.
-      ++ Error: if k is negative or too big.
-      ++ Note: counting of subtrees is done by 
-      ++ \spadfunFrom{numberOfImproperPartitions}{SymmetricGroupCombinatoricFunctions}.
-
-    unrankImproperPartitions1: (I,I,I) -> L I
-      ++ unrankImproperPartitions1(n,m,k) computes the {\em k}-th improper
-      ++ partition of nonnegative n in at most m nonnegative parts 
-      ++ ordered as follows: first, in reverse
-      ++ lexicographically according to their non-zero parts, then
-      ++ according to their positions (i.e. lexicographical order
-      ++ using {\em subSet}: {\em [3,0,0] < [0,3,0] < [0,0,3] < [2,1,0] <
-      ++ [2,0,1] < [0,2,1] < [1,2,0] < [1,0,2] < [0,1,2] < [1,1,1]}).
-      ++ Note: counting of subtrees is done by
-      ++ {\em numberOfImproperPartitionsInternal}.
- 
-  private == add
- 
-    import Set I
- 
-    -- declaration of local functions
- 
- 
-    numberOfImproperPartitionsInternal: (I,I,I) -> I
-      -- this is used as subtree counting function in
-      -- "unrankImproperPartitions1". For (n,m,cm) it counts
-      -- the following set of m-tuples: The  first (from left
-      -- to right) m-cm non-zero entries are equal, the remaining
-      -- positions sum up to n. Example: (3,3,2) counts
-      -- [x,3,0], [x,0,3], [0,x,3], [x,2,1], [x,1,2], x non-zero.
- 
- 
-    -- definition of local functions
- 
- 
-    numberOfImproperPartitionsInternal(n,m,cm) ==
-      n = 0 => binomial(m,cm)$ICF
-      cm = 0 and n > 0 => 0
-      s := 0
-      for i in 0..n-1 repeat
-        s := s + numberOfImproperPartitionsInternal(i,m,cm-1)
-      s
- 
- 
-    -- definition of exported functions
- 
-    numberOfImproperPartitions(n,m) ==
-      if n < 0 or m < 1 then return 0
-      if m = 1 or n = 0 then return 1
-      s := 0
-      for i in 0..n repeat
-        s := s + numberOfImproperPartitions(n-i,m-1)
-      s
- 
- 
-    unrankImproperPartitions0(n,m,k) ==
-      l : L I  := nil$(L I)
-      k < 0 => error"counting of partitions is started at 0"
-      k >= numberOfImproperPartitions(n,m) =>
-        error"there are not so many partitions"
-      for t in 0..(m-2) repeat
-        s : I := 0
-        for y in 0..n repeat
-          sOld := s
-          s := s + numberOfImproperPartitions(n-y,m-t-1)
-          if s > k then leave
-        l := append(l,list(y)$(L I))$(L I)
-        k := k - sOld
-        n := n - y
-      l := append(l,list(n)$(L I))$(L I)
-      l
- 
- 
-    unrankImproperPartitions1(n,m,k) ==
-      -- we use the counting procedure of the leaves in a tree
-      -- having the following structure: First of all non-zero
-      -- labels for the sons. If addition along a path gives n,
-      -- then we go on creating the subtree for (n choose cm)
-      -- where cm is the length of the path. These subsets determine
-      -- the positions for the non-zero labels for the partition
-      -- to be formeded. The remaining positions are filled by zeros.
-      nonZeros   : L I := nil$(L I)
-      partition  : V I :=  new(m::NNI,0$I)$(V I)
-      k < 0 => nonZeros
-      k >= numberOfImproperPartitions(n,m) => nonZeros
-      cm : I := m    --cm gives the depth of the tree
-      while n ^= 0 repeat
-        s : I := 0
-        cm := cm - 1
-        for y in n..1 by -1 repeat   --determination of the next son
-          sOld := s  -- remember old s
-          -- this functions counts the number of elements in a subtree
-          s := s + numberOfImproperPartitionsInternal(n-y,m,cm)
-          if s > k then leave
-        -- y is the next son, so put it into the pathlist "nonZero"
-        nonZeros := append(nonZeros,list(y)$(L I))$(L I)
-        k := k - sOld    --updating
-        n := n - y       --updating
-      --having found all m-cm non-zero entries we change the structure
-      --of the tree and determine the non-zero positions
-      nonZeroPos : L I := reverse subSet(m,m-cm,k)
-      --building the partition
-      for i in 1..m-cm  repeat partition.(1+nonZeroPos.i) := nonZeros.i
-      entries partition
- 
- 
-    subSet(n,m,k) ==
-      k < 0 or n < 0 or m < 0 or m > n =>
-        error "improper argument to subSet"
-      bin : I := binomial$ICF (n,m)
-      k >= bin =>
-        error "there are not so many subsets"
-      l : L I  := []
-      n = 0 => l
-      mm : I := k
-      s  : I := m
-      for t in 0..(m-1) repeat
-         for y in (s-1)..(n+1) repeat
-            if binomial$ICF (y,s) > mm then leave
-         l := append (l,list(y-1)$(L I))
-         mm := mm - binomial$ICF (y-1,s)
-         s := s-1
-      l
- 
- 
-    nextLatticePermutation(lambda, lattP, constructNotFirst) ==
- 
-      lprime  : L I  := conjugate(lambda)$PartitionsAndPermutations
-      columns : NNI := (first(lambda)$(L I))::NNI
-      rows    : NNI := (first(lprime)$(L I))::NNI
-      n       : NNI :=(+/lambda)::NNI
- 
-      not constructNotFirst =>   -- first lattice permutation
-        lattP := nil$(L I)
-        for i in columns..1 by -1 repeat
-          for l in 1..lprime(i) repeat
-            lattP := cons(i,lattP)
-        lattP
- 
-      help : V I := new(columns,0) -- entry help(i) stores the number
-      -- of occurences of number i on our way from right to left
-      rightPosition  : NNI := n
-      leftEntry : NNI := lattP(rightPosition)::NNI
-      ready  : B  := false
-      until (ready or (not constructNotFirst)) repeat
-        rightEntry : NNI := leftEntry
-        leftEntry := lattP(rightPosition-1)::NNI
-        help(rightEntry) := help(rightEntry) + 1
-        -- search backward decreasing neighbour elements
-        if rightEntry > leftEntry then
-          if ((lprime(leftEntry)-help(leftEntry)) >_
-            (lprime(rightEntry)-help(rightEntry)+1)) then
-            -- the elements may be swapped because the number of occurances
-            -- of leftEntry would still be greater than those of rightEntry
-            ready := true
-            j : NNI := leftEntry + 1
-            -- search among the numbers leftEntry+1..rightEntry for the
-            -- smallest one which can take the place of leftEntry.
-            -- negation of condition above:
-            while (help(j)=0) or ((lprime(leftEntry)-lprime(j))
-              < (help(leftEntry)-help(j)+2)) repeat j := j + 1
-            lattP(rightPosition-1) := j
-            help(j) := help(j)-1
-            help(leftEntry) := help(leftEntry) + 1
-            -- reconstruct the rest of the list in increasing order
-            for l in rightPosition..n repeat
-              j := 0
-              while help(1+j) = 0 repeat j := j + 1
-              lattP(l::NNI) := j+1
-              help(1+j) := help(1+j) - 1
-        -- end of "if rightEntry > leftEntry"
-        rightPosition := (rightPosition-1)::NNI
-        if rightPosition = 1 then constructNotFirst := false
-      -- end of repeat-loop
-      not constructNotFirst =>  nil$(L I)
-      lattP
- 
- 
-    makeYoungTableau(lambda,gitter) ==
-      lprime  : L I  := conjugate(lambda)$PartitionsAndPermutations
-      columns : NNI := (first(lambda)$(L I))::NNI
-      rows    : NNI := (first(lprime)$(L I))::NNI
-      ytab    : M I  := new(rows,columns,0)
-      help    : V I  := new(columns,1)
-      i : I := -1     -- this makes the entries ranging from 0,..,n-1
-                      -- i := 0 would make it from 1,..,n.
-      j : I := 0
-      for l in 1..maxIndex gitter repeat
-        j := gitter(l)
-        i := i + 1
-        ytab(help(j),j) := i
-        help(j) := help(j) + 1
-      ytab
- 
- 
---    coerce(ytab) ==
---      lli := listOfLists(ytab)$(M I)
---      -- remove the filling zeros in each row. It is assumed that
---      -- that there are no such in row 0.
---      for i in 2..maxIndex lli repeat
---        THIS IS DEFINIVELY WRONG, I NEED A FUNCTION WHICH DELETES THE
---        0s, in my version there are no mapping facilities yet.
---        deleteInPlace(not zero?,lli i)
---      tableau(lli)$Tableau(I)
- 
- 
-    listYoungTableaus(lambda) ==
-      lattice   : L I
-      ytab      : M I
-      younglist : L M I := nil$(L M I)
-      lattice   := nextLatticePermutation(lambda,lattice,false)
-      until null lattice repeat
-        ytab      := makeYoungTableau(lambda,lattice)
-        younglist := append(younglist,[ytab]$(L M I))$(L M I)
-        lattice   := nextLatticePermutation(lambda,lattice,true)
-      younglist
- 
- 
-    nextColeman(alpha,beta,C) ==
-      nrow  : NNI := #beta
-      ncol  : NNI := #alpha
-      vnull : V I  := vector(nil()$(L I)) -- empty vector
-      vzero : V I  := new(ncol,0)
-      vrest : V I  := new(ncol,0)
-      cnull : M I  := new(1,1,0)
-      coleman := copy C
-      if coleman ^= cnull then
-        -- look for the first row of "coleman" that has a succeeding
-        -- partition, this can be atmost row nrow-1
-        i : NNI := (nrow-1)::NNI
-        vrest := row(coleman,i) + row(coleman,nrow)
-        --for k in 1..ncol repeat
-        --  vrest(k) := coleman(i,k) + coleman(nrow,k)
-        succ := nextPartition(vrest,row(coleman, i),beta(i))
-        while (succ = vnull) repeat
-          if i = 1 then return cnull -- part is last partition
-          i := (i - 1)::NNI
-          --for k in 1..ncol repeat
-          --  vrest(k) := vrest(k) + coleman(i,k)
-          vrest := vrest + row(coleman,i)
-          succ := nextPartition(vrest, row(coleman, i), beta(i))
-        j : I := i
-        coleman := setRow_!(coleman, i, succ)
-        --for k in 1..ncol repeat
-        --  vrest(k) := vrest(k) - coleman(i,k)
-        vrest := vrest - row(coleman,i)
-      else
-        vrest := vector alpha
-        -- for k in 1..ncol repeat
-        --  vrest(k) := alpha(k)
-        coleman := new(nrow,ncol,0)
-        j : I := 0
-      for i in (j+1)::NNI..nrow-1 repeat
-        succ := nextPartition(vrest,vnull,beta(i))
-        coleman := setRow_!(coleman, i, succ)
-        vrest := vrest - succ
-        --for k in 1..ncol repeat
-        --  vrest(k) := vrest(k) - succ(k)
-      setRow_!(coleman, nrow, vrest)
- 
- 
-    nextPartition(gamma:V I, part:V I, number:I) ==
-      nextPartition(entries gamma, part, number)
- 
- 
-    nextPartition(gamma:L I,part:V I,number:I) ==
-      n : NNI := #gamma
-      vnull : V I := vector(nil()$(L I)) -- empty vector
-      if part ^= vnull then
-        i : NNI := 2
-        sum := part(1)
-        while (part(i) = gamma(i)) or (sum = 0) repeat
-          sum := sum + part(i)
-          i := i + 1
-          if i = 1+n then return vnull -- part is last partition
-        sum := sum - 1
-        part(i) := part(i) + 1
-      else
-        sum := number
-        part := new(n,0)
-        i := 1+n
-      j : NNI := 1
-      while sum > gamma(j) repeat
-        part(j) := gamma(j)
-        sum := sum - gamma(j)
-        j := j + 1
-      part(j) := sum
-      for k in j+1..i-1 repeat
-        part(k) := 0
-      part
- 
- 
-    inverseColeman(alpha,beta,C) ==
-      pi   : L I  := nil$(L I)
-      nrow : NNI := #beta
-      ncol : NNI := #alpha
-      help : V I  := new(nrow,0)
-      sum  : I   := 1
-      for i in 1..nrow repeat
-        help(i) := sum
-        sum := sum + beta(i)
-      for j in 1..ncol repeat
-        for i in 1..nrow repeat
-          for k in 2..1+C(i,j) repeat
-            pi := append(pi,list(help(i))$(L I))
-            help(i) := help(i) + 1
-      pi
- 
- 
-    coleman(alpha,beta,pi) ==
-      nrow : NNI := #beta
-      ncol : NNI := #alpha
-      temp : L L I := nil$(L L I)
-      help : L I  := nil$(L I)
-      colematrix : M I := new(nrow,ncol,0)
-      betasum  : NNI := 0
-      alphasum : NNI := 0
-      for i in 1..ncol repeat
-        help := nil$(L I)
-        for j in alpha(i)..1 by-1 repeat
-          help := cons(pi(j::NNI+alphasum),help)
-        alphasum := (alphasum + alpha(i))::NNI
-        temp := append(temp,list(help)$(L L I))
-      for i in 1..nrow repeat
-        help := nil$(L I)
-        for j in beta(i)..1 by-1 repeat
-          help := cons(j::NNI+betasum, help)
-        betasum := (betasum + beta(i))::NNI
-        for j in 1..ncol repeat
-          colematrix(i,j) := #intersect(brace(help),brace(temp(j)))
-      colematrix
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
---    - Redistributions of source code must retain the above copyright
---      notice, this list of conditions and the following disclaimer.
---
---    - Redistributions in binary form must reproduce the above copyright
---      notice, this list of conditions and the following disclaimer in
---      the documentation and/or other materials provided with the
---      distribution.
---
---    - Neither the name of The Numerical ALgorithms Group Ltd. nor the
---      names of its contributors may be used to endorse or promote products
---      derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package SGCF SymmetricGroupCombinatoricFunctions>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/sign.spad.pamphlet b/src/algebra/sign.spad.pamphlet
deleted file mode 100644
index a9c3a5c..0000000
--- a/src/algebra/sign.spad.pamphlet
+++ /dev/null
@@ -1,392 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/algebra sign.spad}
-\author{Manuel Bronstein}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package TOOLSIGN ToolsForSign}
-<<package TOOLSIGN ToolsForSign>>=
-)abbrev package TOOLSIGN ToolsForSign
-++ Tools for the sign finding utilities
-++ Author: Manuel Bronstein
-++ Date Created: 25 August 1989
-++ Date Last Updated: 26 November 1991
-++ Description: Tools for the sign finding utilities.
-ToolsForSign(R:Ring): with
-    sign     : R      -> Union(Integer, "failed")
-	++ sign(r) \undocumented
-    nonQsign : R      -> Union(Integer, "failed")
-	++ nonQsign(r) \undocumented
-    direction: String -> Integer
-	++ direction(s) \undocumented
- == add
- 
-    if R is AlgebraicNumber then
-      nonQsign r ==
-        sign((r pretend AlgebraicNumber)::Expression(
-                  Integer))$ElementaryFunctionSign(Integer, Expression Integer)
-    else
-      nonQsign r == "failed"
- 
-    if R has RetractableTo Fraction Integer then
-      sign r ==
-        (u := retractIfCan(r)@Union(Fraction Integer, "failed"))
-          case Fraction(Integer) => sign(u::Fraction Integer)
-        nonQsign r
- 
-    else
-      if R has RetractableTo Integer then
-        sign r ==
-          (u := retractIfCan(r)@Union(Integer, "failed"))
-            case "failed" => "failed"
-          sign(u::Integer)
- 
-      else
-        sign r ==
-          zero? r => 0
---          one? r => 1
-          r = 1 => 1
-          r = -1 => -1
-          "failed"
- 
-    direction st ==
-      st = "right" => 1
-      st = "left" => -1
-      error "Unknown option"
-
-@
-\section{package INPSIGN InnerPolySign}
-<<package INPSIGN InnerPolySign>>=
-)abbrev package INPSIGN InnerPolySign
---%% InnerPolySign
-++ Author: Manuel Bronstein
-++ Date Created: 23 Aug 1989
-++ Date Last Updated: 19 Feb 1990
-++ Description:
-++ Find the sign of a polynomial around a point or infinity.
-InnerPolySign(R, UP): Exports == Implementation where
-  R : Ring
-  UP: UnivariatePolynomialCategory R
- 
-  U ==> Union(Integer, "failed")
- 
-  Exports ==> with
-    signAround: (UP,    Integer, R -> U) -> U
-	++ signAround(u,i,f) \undocumented
-    signAround: (UP, R, Integer, R -> U) -> U
-	++ signAround(u,r,i,f) \undocumented
-    signAround: (UP, R,          R -> U) -> U
-	++ signAround(u,r,f) \undocumented
- 
-  Implementation ==> add
-    signAround(p:UP, x:R, rsign:R -> U) ==
-      (ur := signAround(p, x,  1, rsign)) case "failed" => "failed"
-      (ul := signAround(p, x, -1, rsign)) case "failed" => "failed"
-      (ur::Integer) = (ul::Integer) => ur
-      "failed"
- 
-    signAround(p, x, dir, rsign) ==
-      zero? p => 0
-      zero?(r := p x) =>
-        (u := signAround(differentiate p, x, dir, rsign)) case "failed"
-          => "failed"
-        dir * u::Integer
-      rsign r
- 
-    signAround(p:UP, dir:Integer, rsign:R -> U) ==
-      zero? p => 0
-      (u := rsign leadingCoefficient p) case "failed" => "failed"
-      (dir > 0) or (even? degree p) => u::Integer
-      - (u::Integer)
-
-@
-\section{package SIGNRF RationalFunctionSign}
-<<package SIGNRF RationalFunctionSign>>=
-)abbrev package SIGNRF RationalFunctionSign
---%% RationalFunctionSign
-++ Author: Manuel Bronstein
-++ Date Created: 23 August 1989
-++ Date Last Updated: 26 November 1991
-++ Description:
-++ Find the sign of a rational function around a point or infinity.
-RationalFunctionSign(R:GcdDomain): Exports == Implementation where
-  SE  ==> Symbol
-  P   ==> Polynomial R
-  RF  ==> Fraction P
-  ORF ==> OrderedCompletion RF
-  UP  ==> SparseUnivariatePolynomial RF
-  U   ==> Union(Integer, "failed")
-  SGN ==> ToolsForSign(R)
- 
-  Exports ==> with
-    sign: RF -> U
-      ++ sign f returns the sign of f if it is constant everywhere.
-    sign: (RF, SE, ORF) -> U
-      ++ sign(f, x, a) returns the sign of f as x approaches \spad{a},
-      ++ from both sides if \spad{a} is finite.
-    sign: (RF, SE, RF, String) -> U
-      ++ sign(f, x, a, s) returns the sign of f as x nears \spad{a} from
-      ++ the left (below) if s is the string \spad{"left"},
-      ++ or from the right (above) if s is the string \spad{"right"}.
- 
-  Implementation ==> add
-    import SGN
-    import InnerPolySign(RF, UP)
-    import PolynomialCategoryQuotientFunctions(IndexedExponents SE,
-                                                      SE, R, P, RF)
- 
-    psign     : P -> U
-    sqfrSign  : P -> U
-    termSign  : P -> U
-    listSign  : (List P, Integer) -> U
-    finiteSign: (Fraction UP, RF) -> U
- 
-    sign f ==
-      (un := psign numer f) case "failed" => "failed"
-      (ud := psign denom f) case "failed" => "failed"
-      (un::Integer) * (ud::Integer)
- 
-    finiteSign(g, a) ==
-      (ud := signAround(denom g, a, sign$%)) case "failed" => "failed"
-      (un := signAround(numer g, a, sign$%)) case "failed" => "failed"
-      (un::Integer) * (ud::Integer)
- 
-    sign(f, x, a) ==
-      g := univariate(f, x)
-      zero?(n := whatInfinity a) => finiteSign(g, retract a)
-      (ud := signAround(denom g, n, sign$%)) case "failed" => "failed"
-      (un := signAround(numer g, n, sign$%)) case "failed" => "failed"
-      (un::Integer) * (ud::Integer)
- 
-    sign(f, x, a, st) ==
-      (ud := signAround(denom(g := univariate(f, x)), a,
-                    d := direction st, sign$%)) case "failed" => "failed"
-      (un := signAround(numer g, a, d, sign$%)) case "failed" => "failed"
-      (un::Integer) * (ud::Integer)
- 
-    psign p ==
-      (r := retractIfCan(p)@Union(R, "failed")) case R => sign(r::R)$SGN
-      (u := sign(retract(unit(s := squareFree p))@R)$SGN) case "failed" =>
-        "failed"
-      ans := u::Integer
-      for term in factors s | odd?(term.exponent) repeat
-        (u := sqfrSign(term.factor)) case "failed" => return "failed"
-        ans := ans * (u::Integer)
-      ans
- 
-    sqfrSign p ==
-      (u := termSign first(l := monomials p)) case "failed" => "failed"
-      listSign(rest l, u::Integer)
- 
-    listSign(l, s) ==
-      for term in l repeat
-        (u := termSign term) case "failed" => return "failed"
-        u::Integer ^= s => return "failed"
-      s
- 
-    termSign term ==
-      for var in variables term repeat
-        odd? degree(term, var) => return "failed"
-      sign(leadingCoefficient term)$SGN
-
-@
-\section{package LIMITRF RationalFunctionLimitPackage}
-<<package LIMITRF RationalFunctionLimitPackage>>=
-)abbrev package LIMITRF RationalFunctionLimitPackage
-++ Computation of limits for rational functions
-++ Author: Manuel Bronstein
-++ Date Created: 4 October 1989
-++ Date Last Updated: 26 November 1991
-++ Description: Computation of limits for rational functions.
-++ Keywords: limit, rational function.
-RationalFunctionLimitPackage(R:GcdDomain):Exports==Implementation where
-  Z       ==> Integer
-  P       ==> Polynomial R
-  RF      ==> Fraction P
-  EQ      ==> Equation
-  ORF     ==> OrderedCompletion RF
-  OPF     ==> OnePointCompletion RF
-  UP      ==> SparseUnivariatePolynomial RF
-  SE      ==> Symbol
-  QF      ==> Fraction SparseUnivariatePolynomial RF
-  Result  ==> Union(ORF, "failed")
-  TwoSide ==> Record(leftHandLimit:Result, rightHandLimit:Result)
-  U       ==> Union(ORF, TwoSide, "failed")
-  RFSGN   ==> RationalFunctionSign(R)
- 
-  Exports ==> with
--- The following are the one we really want, but the interpreter cannot
--- handle them...
---  limit: (RF,EQ ORF) -> U
---  ++ limit(f(x),x,a) computes the real two-sided limit lim(x -> a,f(x))
- 
---  complexLimit: (RF,EQ OPF) -> OPF
---  ++ complexLimit(f(x),x,a) computes the complex limit lim(x -> a,f(x))
- 
--- ... so we replace them by the following 4:
-    limit: (RF,EQ OrderedCompletion P) -> U
-      ++ limit(f(x),x = a) computes the real two-sided limit
-      ++ of f as its argument x approaches \spad{a}.
-    limit: (RF,EQ RF) -> U
-      ++ limit(f(x),x = a) computes the real two-sided limit
-      ++ of f as its argument x approaches \spad{a}.
-    complexLimit: (RF,EQ OnePointCompletion P) -> OPF
-      ++ \spad{complexLimit(f(x),x = a)} computes the complex limit
-      ++ of \spad{f} as its argument x approaches \spad{a}.
-    complexLimit: (RF,EQ RF) -> OPF
-      ++ complexLimit(f(x),x = a) computes the complex limit
-      ++ of f as its argument x approaches \spad{a}.
-    limit: (RF,EQ RF,String) -> Result
-      ++ limit(f(x),x,a,"left") computes the real limit
-      ++ of f as its argument x approaches \spad{a} from the left;
-      ++ limit(f(x),x,a,"right") computes the corresponding limit as x
-      ++ approaches \spad{a} from the right.
- 
-  Implementation ==> add
-    import ToolsForSign R
-    import InnerPolySign(RF, UP)
-    import RFSGN
-    import PolynomialCategoryQuotientFunctions(IndexedExponents SE,
-                                                      SE, R, P, RF)
- 
-    finiteComplexLimit: (QF, RF) -> OPF
-    finiteLimit       : (QF, RF) -> U
-    fLimit            : (Z, UP, RF, Z) -> Result
- 
--- These 2 should be exported, see comment above
-    locallimit       : (RF, SE, ORF) -> U
-    locallimitcomplex: (RF, SE, OPF) -> OPF
- 
-    limit(f:RF,eq:EQ RF) ==
-      (xx := retractIfCan(lhs eq)@Union(SE,"failed")) case "failed" =>
-        error "limit: left hand side must be a variable"
-      x := xx :: SE; a := rhs eq
-      locallimit(f,x,a::ORF)
- 
-    complexLimit(f:RF,eq:EQ RF) ==
-      (xx := retractIfCan(lhs eq)@Union(SE,"failed")) case "failed" =>
-        error "limit: left hand side must be a variable"
-      x := xx :: SE; a := rhs eq
-      locallimitcomplex(f,x,a::OPF)
- 
-    limit(f:RF,eq:EQ OrderedCompletion P) ==
-      (p := retractIfCan(lhs eq)@Union(P,"failed")) case "failed" =>
-        error "limit: left hand side must be a variable"
-      (xx := retractIfCan(p)@Union(SE,"failed")) case "failed" =>
-        error "limit: left hand side must be a variable"
-      x := xx :: SE
-      a := map(#1::RF,rhs eq)$OrderedCompletionFunctions2(P,RF)
-      locallimit(f,x,a)
- 
-    complexLimit(f:RF,eq:EQ OnePointCompletion P) ==
-      (p := retractIfCan(lhs eq)@Union(P,"failed")) case "failed" =>
-        error "limit: left hand side must be a variable"
-      (xx := retractIfCan(p)@Union(SE,"failed")) case "failed" =>
-        error "limit: left hand side must be a variable"
-      x := xx :: SE
-      a := map(#1::RF,rhs eq)$OnePointCompletionFunctions2(P,RF)
-      locallimitcomplex(f,x,a)
- 
-    fLimit(n, d, a, dir) ==
-      (s := signAround(d, a, dir, sign$RFSGN)) case "failed" => "failed"
-      n * (s::Z) * plusInfinity()
- 
-    finiteComplexLimit(f, a) ==
-      zero?(n := (numer f) a) => 0
-      zero?(d := (denom f) a) => infinity()
-      (n / d)::OPF
- 
-    finiteLimit(f, a) ==
-      zero?(n := (numer f) a) => 0
-      zero?(d := (denom f) a) =>
-        (s := sign(n)$RFSGN) case "failed" => "failed"
-        rhsl := fLimit(s::Z, denom f, a, 1)
-        lhsl := fLimit(s::Z, denom f, a, -1)
-        rhsl case "failed" =>
-          lhsl case "failed" => "failed"
-          [lhsl, rhsl]
-        lhsl case "failed" => [lhsl, rhsl]
-        rhsl::ORF = lhsl::ORF => lhsl::ORF
-        [lhsl, rhsl]
-      (n / d)::ORF
- 
-    locallimit(f,x,a) ==
-      g := univariate(f, x)
-      zero?(n := whatInfinity a) => finiteLimit(g, retract a)
-      (dn := degree numer g) > (dd := degree denom g) =>
-        (sn := signAround(numer g, n, sign$RFSGN)) case "failed" => "failed"
-        (sd := signAround(denom g, n, sign$RFSGN)) case "failed" => "failed"
-        (sn::Z) * (sd::Z) * plusInfinity()
-      dn < dd => 0
-      ((leadingCoefficient numer g) / (leadingCoefficient denom g))::ORF
- 
-    limit(f,eq,st) ==
-      (xx := retractIfCan(lhs eq)@Union(SE,"failed")) case "failed" =>
-        error "limit: left hand side must be a variable"
-      x := xx :: SE; a := rhs eq
-      zero?(n := (numer(g := univariate(f, x))) a) => 0
-      zero?(d := (denom g) a) =>
-        (s := sign(n)$RFSGN) case "failed" => "failed"
-        fLimit(s::Z, denom g, a, direction st)
-      (n / d)::ORF
- 
-    locallimitcomplex(f,x,a) ==
-      g := univariate(f, x)
-      (r := retractIfCan(a)@Union(RF, "failed")) case RF =>
-        finiteComplexLimit(g, r::RF)
-      (dn := degree numer g) > (dd := degree denom g) => infinity()
-      dn < dd => 0
-      ((leadingCoefficient numer g) / (leadingCoefficient denom g))::OPF
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
---    - Redistributions of source code must retain the above copyright
---      notice, this list of conditions and the following disclaimer.
---
---    - Redistributions in binary form must reproduce the above copyright
---      notice, this list of conditions and the following disclaimer in
---      the documentation and/or other materials provided with the
---      distribution.
---
---    - Neither the name of The Numerical ALgorithms Group Ltd. nor the
---      names of its contributors may be used to endorse or promote products
---      derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
- 
-<<package TOOLSIGN ToolsForSign>>
-<<package INPSIGN InnerPolySign>>
-<<package SIGNRF RationalFunctionSign>>
-<<package LIMITRF RationalFunctionLimitPackage>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/smith.spad.pamphlet b/src/algebra/smith.spad.pamphlet
deleted file mode 100644
index 8c89d9e..0000000
--- a/src/algebra/smith.spad.pamphlet
+++ /dev/null
@@ -1,284 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/algebra smith.spad}
-\author{Patrizia Gianni}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package SMITH SmithNormalForm}
-<<package SMITH SmithNormalForm>>=
-)abbrev package SMITH SmithNormalForm
-++ Author: Patrizia Gianni
-++ Date Created: October 1992
-++ Date Last Updated: 
-++ Basic Operations:
-++ Related Domains: Matrix(R)
-++ Also See:
-++ AMS Classifications:
-++ Keywords: matrix, canonical forms, linear algebra
-++ Examples:
-++ References:
-++ Description:
-++   \spadtype{SmithNormalForm} is a package
-++   which provides some standard canonical forms for matrices.
-
-SmithNormalForm(R,Row,Col,M) : Exports == Implementation where
-
-  R   : EuclideanDomain
-  Row : FiniteLinearAggregate R
-  Col : FiniteLinearAggregate R
-  M   : MatrixCategory(R,Row,Col)
-
-  I            ==> Integer
-  NNI          ==> NonNegativeInteger
-  HermiteForm  ==>   Record(Hermite:M,eqMat:M)
-  SmithForm    ==>   Record(Smith : M, leftEqMat : M, rightEqMat : M) 
-  PartialV     ==> Union(Col, "failed")
-  Both         ==> Record(particular: PartialV, basis: List Col)
-
-  Exports ==  with
-    hermite : M -> M
-      ++ \spad{hermite(m)} returns the Hermite normal form of the
-      ++ matrix m.
-    completeHermite : M -> HermiteForm
-      ++ \spad{completeHermite} returns a record  that contains
-      ++ the Hermite normal form H of the matrix and the equivalence matrix
-      ++ U such that U*m = H
-    smith : M -> M
-      ++ \spad{smith(m)} returns the Smith Normal form of the matrix m.
-    completeSmith : M ->  SmithForm
-      ++ \spad{completeSmith} returns a record  that contains
-      ++ the Smith normal form H of the matrix and the left and right
-      ++ equivalence matrices U and V such that U*m*v = H
-    diophantineSystem : (M,Col) -> Both
-      ++ \spad{diophantineSystem(A,B)} returns a particular integer solution and 
-      ++ an integer  basis  of the equation \spad{AX = B}.
-
-  Implementation == add
-    MATCAT1 ==> MatrixCategoryFunctions2(R,Row,Col,M,QF,Row2,Col2,M2)
-    MATCAT2 ==> MatrixCategoryFunctions2(QF,Row2,Col2,M2,R,Row,Col,M)
-    QF      ==> Fraction R
-    Row2    ==> Vector QF
-    Col2    ==> Vector QF
-    M2      ==> Matrix QF
-
-                 ------  Local Functions -----
-    elRow1       :   (M,I,I)         ->  M
-    elRow2       :  (M,R,I,I)        ->  M
-    elColumn2    :  (M,R,I,I)        ->  M
-    isDiagonal?  :      M            ->  Boolean
-    ijDivide     : (SmithForm ,I,I)  ->  SmithForm 
-    lastStep     :   SmithForm       ->  SmithForm
-    test1        :  (M,Col,NNI)      ->  Union(NNI, "failed")
-    test2        : (M, Col,NNI,NNI)  ->  Union( Col, "failed")
-
-     -- inconsistent system : case  0 = c -- 
-    test1(sm:M,b:Col,m1 : NNI) : Union(NNI , "failed") ==
-      km:=m1
-      while zero? sm(km,km) repeat
-        if not zero?(b(km)) then return "failed"
-        km:= (km - 1) :: NNI
-      km
-
-    if Col has shallowlyMutable then
-
-      test2(sm : M ,b : Col, n1:NNI,dk:NNI) : Union( Col, "failed") ==
-        -- test divisibility --
-        sol:Col := new(n1,0)
-        for k in 1..dk repeat
-          if (c:=(b(k) exquo sm(k,k))) case "failed" then return "failed"
-          sol(k):= c::R
-        sol
-
-     -- test if the matrix is diagonal or pseudo-diagonal --   
-    isDiagonal?(m : M) : Boolean ==
-      m1:= nrows m
-      n1:= ncols m
-      for i in 1..m1 repeat
-        for j in 1..n1 | (j ^= i) repeat
-          if  not zero?(m(i,j)) then return false
-      true
- 
-       -- elementary operation of first kind: exchange two rows --
-    elRow1(m:M,i:I,j:I) : M ==
-      vec:=row(m,i)
-      setRow!(m,i,row(m,j))
-      setRow!(m,j,vec)
-      m
-
-             -- elementary operation of second kind: add to row i--
-                         -- a*row j  (i^=j) --
-    elRow2(m : M,a:R,i:I,j:I) : M ==
-      vec:= map(a*#1,row(m,j))
-      vec:=map("+",row(m,i),vec)
-      setRow!(m,i,vec)
-      m
-             -- elementary operation of second kind: add to column i --
-                           -- a*column j (i^=j) --
-    elColumn2(m : M,a:R,i:I,j:I) : M ==
-      vec:= map(a*#1,column(m,j))
-      vec:=map("+",column(m,i),vec)
-      setColumn!(m,i,vec)
-      m
-
-       -- modify SmithForm in such a way that the term m(i,i) --
-           -- divides the term m(j,j). m is diagonal --
-    ijDivide(sf : SmithForm , i : I,j : I) : SmithForm ==
-      m:=sf.Smith
-      mii:=m(i,i)
-      mjj:=m(j,j)
-      extGcd:=extendedEuclidean(mii,mjj)
-      d := extGcd.generator
-      mii:=(mii exquo d)::R
-      mjj := (mjj exquo d) :: R
-      -- add to row j extGcd.coef1*row i --
-      lMat:=elRow2(sf.leftEqMat,extGcd.coef1,j,i)
-      -- switch rows i and j --
-      lMat:=elRow1(lMat,i,j)
-      -- add to row j -mii*row i --
-      lMat := elRow2(lMat,-mii,j,i)
---      lMat := ijModify(mii,mjj,extGcd.coef1,extGcd.coef2,sf.leftEqMat,i,j)
-      m(j,j):= m(i,i) * mjj
-      m(i,i):= d
-      -- add to column i extGcd.coef2 * column j --
-      rMat := elColumn2(sf.rightEqMat,extGcd.coef2,i,j)
-      -- add to column j -mjj*column i --
-      rMat:=elColumn2(rMat,-mjj,j,i)
-      -- multiply by -1 column j --
-      setColumn!(rMat,j,map(-1 * #1,column(rMat,j)))
-      [m,lMat,rMat]
-               
-
-     -- given a diagonal matrix compute its Smith form --
-    lastStep(sf : SmithForm) : SmithForm ==
-      m:=sf.Smith
-      m1:=min(nrows m,ncols m)
-      for i in 1..m1 while (mii:=m(i,i)) ^=0 repeat
-        for j in i+1..m1 repeat
-          if (m(j,j) exquo mii) case "failed" then return
-             lastStep(ijDivide(sf,i,j))
-      sf
-
-    -- given m and t row-equivalent matrices, with t in upper triangular --
-          -- form  compute the matrix u such that u*m=t --
-    findEqMat(m :  M,t : M) : Record(Hermite : M, eqMat : M) ==
-      m1:=nrows m
-      n1:=ncols m
-      "and"/[zero? t(m1,j) for j in 1..n1] => -- there are 0 rows
-         if "and"/[zero? t(1,j) for j in 1..n1] 
-         then return [m,scalarMatrix(m1,1)]  -- m is the zero matrix
-         mm:=horizConcat(m,scalarMatrix(m1,1))
-         mmh:=rowEchelon mm
-         [subMatrix(mmh,1,m1,1,n1), subMatrix(mmh,1,m1,n1+1,n1+m1)]
-      u:M:=zero(m1,m1)
-      j:=1
-      while t(1,j)=0 repeat j:=j+1  -- there are 0 columns
-      t1:=copy t
-      mm:=copy m
-      if j>1 then 
-        t1:=subMatrix(t,1,m1,j,n1)
-        mm:=subMatrix(m,1,m1,j,n1)
-      t11:=t1(1,1)
-      for i in 1..m1 repeat
-        u(i,1) := (mm(i,1) exquo t11) :: R
-        for j in 2..m1 repeat
-          j0:=j
-          while zero?(tjj:=t1(j,j0)) repeat j0:=j0+1
-          u(i,j) :=((mm(i,j0) - ("+"/[u(i,k) * t1(k,j0) for k in 1..(j-1)])) exquo
-                    tjj) :: R
-      u1:M2:= map(#1 :: QF,u)$MATCAT1
-      [t,map(retract$QF,(inverse u1)::M2)$MATCAT2]
-
-                --- Hermite normal form of m ---
-    hermite(m:M) : M == rowEchelon m
-
-     -- Hermite normal form and equivalence matrix --
-    completeHermite(m : M) : Record(Hermite : M, eqMat : M) ==
-      findEqMat(m,rowEchelon m)
- 
-    smith(m : M) : M == completeSmith(m).Smith
-
-    completeSmith(m : M) : Record(Smith : M, leftEqMat : M, rightEqMat : M) ==
-      cm1:=completeHermite m
-      leftm:=cm1.eqMat
-      m1:=cm1.Hermite
-      isDiagonal? m1 => lastStep([m1,leftm,scalarMatrix(ncols m,1)])
-      nr:=nrows m
-      cm1:=completeHermite transpose m1
-      rightm:= transpose cm1.eqMat
-      m1:=cm1.Hermite
-      isDiagonal? m1 => 
-        cm2:=lastStep([m1,leftm,rightm])
-        nrows(m:=cm2.Smith) = nr => cm2
-        [transpose m,cm2.leftEqMat, cm2.rightEqMat]
-      cm2:=completeSmith m1
-      cm2:=lastStep([cm2.Smith,transpose(cm2.rightEqMat)*leftm,
-                rightm*transpose(cm2.leftEqMat)])
-      nrows(m:=cm2.Smith) = nr => cm2
-      [transpose m, cm2.leftEqMat, cm2.rightEqMat]
-
-    -- Find the solution in R of the linear system mX = b --
-    diophantineSystem(m : M, b : Col) : Both  ==
-      sf:=completeSmith m
-      sm:=sf.Smith
-      m1:=nrows sm
-      lm:=sf.leftEqMat
-      b1:Col:= lm* b
-      (t1:=test1(sm,b1,m1)) case "failed" => ["failed",empty()]
-      dk:=t1 :: NNI
-      n1:=ncols sm
-      (t2:=test2(sm,b1,n1,dk)) case "failed" => ["failed",empty()]
-      rm := sf.rightEqMat
-      sol:=rm*(t2 :: Col)  -- particular solution
-      dk = n1  => [sol,list new(n1,0)]
-      lsol:List Col := [column(rm,i) for i in (dk+1)..n1]
-      [sol,lsol]
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
---    - Redistributions of source code must retain the above copyright
---      notice, this list of conditions and the following disclaimer.
---
---    - Redistributions in binary form must reproduce the above copyright
---      notice, this list of conditions and the following disclaimer in
---      the documentation and/or other materials provided with the
---      distribution.
---
---    - Neither the name of The Numerical ALgorithms Group Ltd. nor the
---      names of its contributors may be used to endorse or promote products
---      derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package SMITH SmithNormalForm>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/solvedio.spad.pamphlet b/src/algebra/solvedio.spad.pamphlet
deleted file mode 100644
index dcf0d2d..0000000
--- a/src/algebra/solvedio.spad.pamphlet
+++ /dev/null
@@ -1,232 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/algebra solvedio.spad}
-\author{Albrecht Fortenbacher}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package DIOSP DiophantineSolutionPackage}
-<<package DIOSP DiophantineSolutionPackage>>=
-)abbrev package DIOSP DiophantineSolutionPackage
-++ Author: A. Fortenbacher
-++ Date Created: 29 March 1991
-++ Date Last Updated: 29 March 1991
-++ Basic Operations: dioSolve
-++ Related Constructors: Equation, Vector
-++ Also See:
-++ AMS Classifications:
-++ Keywords: Diophantine equation, nonnegative solutions,
-++   basis, depth-first-search
-++ Reference:
-++   M. Clausen, A. Fortenbacher: Efficient Solution of
-++   Linear Diophantine Equations. in JSC (1989) 8, 201-216
-++ Description:
-++   any solution of a homogeneous linear Diophantine equation
-++   can be represented as a sum of minimal solutions, which
-++   form a "basis" (a minimal solution cannot be represented
-++   as a nontrivial sum of solutions)
-++   in the case of an inhomogeneous linear Diophantine equation,
-++   each solution is the sum of a inhomogeneous solution and
-++   any number of homogeneous solutions
-++   therefore, it suffices to compute two sets:
-++      1. all minimal inhomogeneous solutions
-++      2. all minimal homogeneous solutions
-++   the algorithm implemented is a completion procedure, which
-++   enumerates all solutions in a recursive depth-first-search
-++   it can be seen as finding monotone paths in a graph
-++   for more details see Reference
- 
-DiophantineSolutionPackage(): Cat == Capsule where
- 
-  B ==> Boolean
-  I ==> Integer
-  NI ==> NonNegativeInteger
- 
-  LI ==> List(I)
-  VI ==> Vector(I)
-  VNI ==> Vector(NI)
- 
-  POLI ==> Polynomial(I)
-  EPOLI ==> Equation(POLI)
-  LPOLI ==> List(POLI)
- 
-  S ==> Symbol
-  LS ==> List(S)
- 
-  ListSol ==> List(VNI)
-  Solutions ==> Record(varOrder: LS, inhom: Union(ListSol,"failed"),
-                       hom: ListSol)
- 
-  Node ==> Record(vert: VI, free: B)
-  Graph ==> Record(vn: Vector(Node), dim : NI, zeroNode: I)
- 
-  Cat ==> with
- 
-    dioSolve: EPOLI -> Solutions
-      ++ dioSolve(u) computes a basis of all minimal solutions for 
-      ++ linear homogeneous Diophantine equation u,
-      ++ then all minimal solutions of inhomogeneous equation
- 
-  Capsule ==> add
- 
-    import I
-    import POLI
- 
-    -- local function specifications
- 
-    initializeGraph: (LPOLI, I) -> Graph
-    createNode: (I, VI, NI, I) -> Node
-    findSolutions: (VNI, I, I, I, Graph, B) -> ListSol
-    verifyMinimality: (VNI, Graph, B) -> B
-    verifySolution: (VNI, I, I, I, Graph) -> B
- 
-    -- exported functions
- 
-    dioSolve(eq) ==
-      p := lhs(eq) - rhs(eq)
-      n := totalDegree(p)
-      n = 0 or n > 1 =>
-        error "a linear Diophantine equation is expected"
-      mon := empty()$LPOLI
-      c : I := 0
-      for x in monomials(p) repeat
-        ground?(x) =>
-          c := ground(x) :: I
-        mon := cons(x, mon)$LPOLI
-      graph := initializeGraph(mon, c)
-      sol := zero(graph.dim)$VNI
-      hs := findSolutions(sol, graph.zeroNode, 1, 1, graph, true)
-      ihs : ListSol :=
-        c = 0 => [sol]
-        findSolutions(sol, graph.zeroNode + c, 1, 1, graph, false)
-      vars := [first(variables(x))$LS for x in mon]
-      [vars, if empty?(ihs)$ListSol then "failed" else ihs, hs]
- 
-    -- local functions
- 
-    initializeGraph(mon, c) ==
-      coeffs := vector([first(coefficients(x))$LI for x in mon])$VI
-      k := #coeffs
-      m := min(c, reduce(min, coeffs)$VI)
-      n := max(c, reduce(max, coeffs)$VI)
-      [[createNode(i, coeffs, k, 1 - m) for i in m..n], k, 1 - m]
- 
-    createNode(ind, coeffs, k, zeroNode) ==
-      -- create vertices from node ind to other nodes
-      v := zero(k)$VI
-      for i in 1..k repeat
-        ind > 0 =>
-          coeffs.i < 0 =>
-            v.i := zeroNode + ind + coeffs.i
-        coeffs.i > 0 =>
-          v.i := zeroNode + ind + coeffs.i
-      [v, true]
- 
-    findSolutions(sol, ind, m, n, graph, flag) ==
-      -- return all solutions (paths) from node ind to node zeroNode
-      sols := empty()$ListSol
-      node := graph.vn.ind
-      node.free =>
-        node.free := false
-        v := node.vert
-        k := if ind < graph.zeroNode then m else n
-        for i in k..graph.dim repeat
-          x := sol.i
-          v.i > 0 =>  -- vertex exists to other node
-            sol.i := x + 1
-            v.i = graph.zeroNode =>  -- solution found
-              verifyMinimality(sol, graph, flag) =>
-                sols := cons(copy(sol)$VNI, sols)$ListSol
-                sol.i := x
-              sol.i := x
-            s :=
-              ind < graph.zeroNode =>
-                findSolutions(sol, v.i, i, n, graph, flag)
-              findSolutions(sol, v.i, m, i, graph, flag)
-            sols := append(s, sols)$ListSol
-            sol.i := x
-        node.free := true
-        sols
-      sols
- 
-    verifyMinimality(sol, graph, flag) ==
-      -- test whether sol contains a minimal homogeneous solution
-      flag =>  -- sol is a homogeneous solution
-        i := 1
-        while sol.i = 0 repeat
-          i := i + 1
-        x := sol.i
-        sol.i := (x - 1) :: NI
-        flag := verifySolution(sol, graph.zeroNode, 1, 1, graph)
-        sol.i := x
-        flag
-      verifySolution(sol, graph.zeroNode, 1, 1, graph)
- 
-    verifySolution(sol, ind, m, n, graph) ==
-      -- test whether sol contains a path from ind to zeroNode
-      flag := true
-      node := graph.vn.ind
-      v := node.vert
-      k := if ind < graph.zeroNode then m else n
-      for i in k..graph.dim while flag repeat
-        x := sol.i
-        x > 0 and v.i > 0 =>  -- vertex exists to other node
-          sol.i := (x - 1) :: NI
-          v.i = graph.zeroNode =>  -- solution found
-            flag := false
-            sol.i := x
-          flag :=
-            ind < graph.zeroNode =>
-              verifySolution(sol, v.i, i, n, graph)
-            verifySolution(sol, v.i, m, i, graph)
-          sol.i := x
-      flag
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
---    - Redistributions of source code must retain the above copyright
---      notice, this list of conditions and the following disclaimer.
---
---    - Redistributions in binary form must reproduce the above copyright
---      notice, this list of conditions and the following disclaimer in
---      the documentation and/or other materials provided with the
---      distribution.
---
---    - Neither the name of The Numerical ALgorithms Group Ltd. nor the
---      names of its contributors may be used to endorse or promote products
---      derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
- 
-<<package DIOSP DiophantineSolutionPackage>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/solvefor.spad.pamphlet b/src/algebra/solvefor.spad.pamphlet
deleted file mode 100644
index 7095d4e..0000000
--- a/src/algebra/solvefor.spad.pamphlet
+++ /dev/null
@@ -1,327 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/algebra solvefor.spad}
-\author{Stephen M. Watt, Barry Trager}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package SOLVEFOR PolynomialSolveByFormulas}
-<<package SOLVEFOR PolynomialSolveByFormulas>>=
-)abbrev package SOLVEFOR PolynomialSolveByFormulas
---  Current fields with "**": (%, RationalNumber) -> % are
---     ComplexFloat, RadicalExtension(K) and RationalRadical
---  SMW June 86, BMT Sept 93
-++ Description:
-++ This package factors the formulas out of the general solve code,
-++ allowing their recursive use over different domains.
-++ Care is taken to introduce few radicals so that radical extension
-++ domains can more easily simplify the results.
-
-PolynomialSolveByFormulas(UP, F): PSFcat == PSFdef where
-
-    UP: UnivariatePolynomialCategory F
-    F:  Field with "**": (%, Fraction Integer) -> %
-
-    L  ==> List
-
-    PSFcat == with
-        solve:      UP -> L F
-		++ solve(u) \undocumented
-        particularSolution:  UP -> F
-		++ particularSolution(u) \undocumented
-        mapSolve:   (UP, F -> F) -> Record(solns: L F,
-                                           maps: L Record(arg:F,res:F))
-		++ mapSolve(u,f) \undocumented
-
-        linear:     UP -> L F
-		++ linear(u) \undocumented
-        quadratic:  UP -> L F
-		++ quadratic(u) \undocumented
-        cubic:      UP -> L F
-		++ cubic(u) \undocumented
-        quartic:    UP -> L F
-		++ quartic(u) \undocumented
-
-        -- Arguments give coefs from high to low degree.
-        linear:     (F, F)          -> L F
-		++ linear(f,g) \undocumented
-        quadratic:  (F, F, F)       -> L F
-		++ quadratic(f,g,h) \undocumented
-        cubic:      (F, F, F, F)    -> L F
-		++ cubic(f,g,h,i) \undocumented
-        quartic:    (F, F, F, F, F) -> L F
-		++ quartic(f,g,h,i,j) \undocumented
-
-        aLinear:    (F, F)          -> F
-		++ aLinear(f,g) \undocumented
-        aQuadratic: (F, F, F)       -> F
-		++ aQuadratic(f,g,h) \undocumented
-        aCubic:     (F, F, F, F)    -> F
-		++ aCubic(f,g,h,j) \undocumented
-        aQuartic:   (F, F, F, F, F) -> F
-		++ aQuartic(f,g,h,i,k) \undocumented
-
-    PSFdef == add
-
-        -----------------------------------------------------------------
-        -- Stuff for mapSolve
-        -----------------------------------------------------------------
-        id ==> (IDENTITY$Lisp)
-
-        maplist: List Record(arg: F, res: F) := []
-        mapSolving?: Boolean := false
-        -- map: F -> F := id #1    replaced with line below
-        map: Boolean := false
-
-        mapSolve(p, fn) ==
-            -- map := fn #1   replaced with line below
-            locmap: F -> F := fn #1; map := id locmap
-            mapSolving? := true;  maplist := []
-            slist := solve p
-            mapSolving? := false;
-            -- map := id #1   replaced with line below
-            locmap := id #1; map := id locmap
-            [slist, maplist]
-
-        part(s: F): F ==
-            not mapSolving? => s
-            -- t := map s     replaced with line below
-            t: F := SPADCALL(s, map)$Lisp
-            t = s => s
-            maplist := cons([t, s], maplist)
-            t
-
-        -----------------------------------------------------------------
-        -- Entry points and error handling
-        -----------------------------------------------------------------
-        cc ==> coefficient
-
-        -- local intsolve
-        intsolve(u:UP):L(F) ==
-            u := (factors squareFree u).1.factor
-            n := degree u
-            n=1 => linear    (cc(u,1), cc(u,0))
-            n=2 => quadratic (cc(u,2), cc(u,1), cc(u,0))
-            n=3 => cubic     (cc(u,3), cc(u,2), cc(u,1), cc(u,0))
-            n=4 => quartic   (cc(u,4), cc(u,3), cc(u,2), cc(u,1), cc(u,0))
-            error "All sqfr factors of polynomial must be of degree < 5"
-
-        solve u ==
-            ls := nil$L(F)
-            for f in factors squareFree u repeat
-               lsf := intsolve f.factor
-               for i in 1..(f.exponent) repeat ls := [:lsf,:ls]
-            ls
-
-        particularSolution u ==
-            u := (factors squareFree u).1.factor
-            n := degree u
-            n=1 => aLinear    (cc(u,1), cc(u,0))
-            n=2 => aQuadratic (cc(u,2), cc(u,1), cc(u,0))
-            n=3 => aCubic     (cc(u,3), cc(u,2), cc(u,1), cc(u,0))
-            n=4 => aQuartic   (cc(u,4), cc(u,3), cc(u,2), cc(u,1), cc(u,0))
-            error "All sqfr factors of polynomial must be of degree < 5"
-
-        needDegree(n: Integer, u: UP): Boolean ==
-            degree u = n => true
-            error concat("Polynomial must be of degree ", n::String)
-
-        needLcoef(cn: F): Boolean ==
-            cn ^= 0 => true
-            error "Leading coefficient must not be 0."
-
-        needChar0(): Boolean ==
-            characteristic()$F = 0 => true
-            error "Formula defined only for fields of characteristic 0."
-
-        linear u ==
-            needDegree(1, u)
-            linear (coefficient(u,1), coefficient(u,0))
-
-        quadratic u ==
-            needDegree(2, u)
-            quadratic (coefficient(u,2), coefficient(u,1),
-                       coefficient(u,0))
-
-        cubic u ==
-            needDegree(3, u)
-            cubic (coefficient(u,3), coefficient(u,2),
-                   coefficient(u,1), coefficient(u,0))
-
-        quartic u ==
-            needDegree(4, u)
-            quartic (coefficient(u,4),coefficient(u,3),
-                     coefficient(u,2),coefficient(u,1),coefficient(u,0))
-
-        -----------------------------------------------------------------
-        -- The formulas
-        -----------------------------------------------------------------
-
-        -- local function for testing equality of radicals.
-        --  This function is necessary to detect at least some of the
-        --  situations like sqrt(9)-3 = 0 --> false.
-        equ(x:F,y:F):Boolean ==
-            ( (recip(x-y)) case "failed" ) => true
-            false
-
-        linear(c1, c0) ==
-            needLcoef c1
-            [- c0/c1 ]
-
-        aLinear(c1, c0) ==
-            first linear(c1,c0)
-
-        quadratic(c2, c1, c0) ==
-            needLcoef c2; needChar0()
-            (c0 = 0) => [0$F,:linear(c2, c1)]
-            (c1 = 0) => [(-c0/c2)**(1/2),-(-c0/c2)**(1/2)]
-            D := part(c1**2 - 4*c2*c0)**(1/2)
-            [(-c1+D)/(2*c2), (-c1-D)/(2*c2)]
-
-        aQuadratic(c2, c1, c0) ==
-            needLcoef c2; needChar0()
-            (c0 = 0) => 0$F
-            (c1 = 0) => (-c0/c2)**(1/2)
-            D := part(c1**2 - 4*c2*c0)**(1/2)
-            (-c1+D)/(2*c2)
-
-        w3: F := (-1 + (-3::F)**(1/2)) / 2::F
-
-        cubic(c3, c2, c1, c0) ==
-            needLcoef c3; needChar0()
-
-            -- case one root = 0, not necessary but keeps result small
-            (c0 = 0) => [0$F,:quadratic(c3, c2, c1)]
-            a1 := c2/c3;  a2 := c1/c3;  a3 := c0/c3
-
-            -- case x**3-a3 = 0, not necessary but keeps result small
-            (a1 = 0 and a2 = 0) =>
-                [ u*(-a3)**(1/3) for u in [1, w3, w3**2 ] ]
-
-            -- case x**3 + a1*x**2 + a1**2*x/3 + a3 = 0, the general for-
-            --   mula is not valid in this case, but solution is easy.
-            P := part(-a1/3::F)
-            equ(a1**2,3*a2) =>
-              S := part((- a3 + (a1**3)/27::F)**(1/3))
-              [ P + S*u for u in [1,w3,w3**2] ]
-
-            -- general case
-            Q := part((3*a2 - a1**2)/9::F)
-            R := part((9*a1*a2 - 27*a3 - 2*a1**3)/54::F)
-            D := part(Q**3 + R**2)**(1/2)
-            S := part(R + D)**(1/3)
-            -- S = 0 is done in the previous case
-            [ P + S*u - Q/(S*u) for u in [1, w3, w3**2] ]
-
-        aCubic(c3, c2, c1, c0) ==
-            needLcoef c3; needChar0()
-            (c0 = 0) => 0$F
-            a1 := c2/c3;  a2 := c1/c3;  a3 := c0/c3
-            (a1 = 0 and a2 = 0) => (-a3)**(1/3)
-            P := part(-a1/3::F)
-            equ(a1**2,3*a2) =>
-              S := part((- a3 + (a1**3)/27::F)**(1/3))
-              P + S
-            Q := part((3*a2 - a1**2)/9::F)
-            R := part((9*a1*a2 - 27*a3 - 2*a1**3)/54::F)
-            D := part(Q**3 + R**2)**(1/2)
-            S := part(R + D)**(1/3)
-            P + S - Q/S
-
-        quartic(c4, c3, c2, c1, c0) ==
-            needLcoef c4; needChar0()
-
-            -- case one root = 0, not necessary but keeps result small
-            (c0 = 0) => [0$F,:cubic(c4, c3, c2, c1)]
-            -- Make monic:
-            a1 := c3/c4; a2 := c2/c4; a3 := c1/c4; a4 := c0/c4
-
-            -- case x**4 + a4 = 0 <=> (x**2-sqrt(-a4))*(x**2+sqrt(-a4))
-            -- not necessary but keeps result small.
-            (a1 = 0 and a2 = 0 and a3 = 0) =>
-                append( quadratic(1, 0, (-a4)**(1/2)),_
-                        quadratic(1 ,0, -((-a4)**(1/2))) )
-
-            -- Translate w = x+a1/4 to eliminate a1:  w**4+p*w**2+q*w+r
-            p := part(a2-3*a1*a1/8::F)
-            q := part(a3-a1*a2/2::F + a1**3/8::F)
-            r := part(a4-a1*a3/4::F + a1**2*a2/16::F - 3*a1**4/256::F)
-            -- t0 := the cubic resolvent of x**3-p*x**2-4*r*x+4*p*r-q**2
-            -- The roots of the translated polynomial are those of
-            -- two quadratics. (What about rt=0 ?)
-            -- rt=0 can be avoided by picking a root ^= p of the cubic
-            -- polynomial above. This is always possible provided that
-            -- the input is squarefree. In this case the two other roots
-            -- are +(-) 2*r**(1/2).
-            if equ(q,0)            -- this means p is a root
-              then t0 := part(2*(r**(1/2)))
-              else t0 := aCubic(1, -p, -4*r, 4*p*r - q**2)
-            rt    := part(t0 - p)**(1/2)
-            slist := append( quadratic( 1,  rt, (-q/rt + t0)/2::F ),
-                             quadratic( 1, -rt, ( q/rt + t0)/2::F ))
-            -- Translate back:
-            [s - a1/4::F for s in slist]
-
-        aQuartic(c4, c3, c2, c1, c0) ==
-            needLcoef c4; needChar0()
-            (c0 = 0) => 0$F
-            a1 := c3/c4; a2 := c2/c4; a3 := c1/c4; a4 := c0/c4
-            (a1 = 0 and a2 = 0 and a3 = 0) => (-a4)**(1/4)
-            p  := part(a2-3*a1*a1/8::F)
-            q  := part(a3-a1*a2/2::F + a1**2*a1/8::F)
-            r  := part(a4-a1*a3/4::F + a1**2*a2/16::F - 3*a1**4/256::F)
-            if equ(q,0)
-              then t0 := part(2*(r**(1/2)))
-              else t0 := aCubic(1, -p, -4*r, 4*p*r - q**2)
-            rt := part(t0 - p)**(1/2)
-            s  := aQuadratic( 1,  rt, (-q/rt + t0)/2::F )
-            s - a1/4::F
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
---    - Redistributions of source code must retain the above copyright
---      notice, this list of conditions and the following disclaimer.
---
---    - Redistributions in binary form must reproduce the above copyright
---      notice, this list of conditions and the following disclaimer in
---      the documentation and/or other materials provided with the
---      distribution.
---
---    - Neither the name of The Numerical ALgorithms Group Ltd. nor the
---      names of its contributors may be used to endorse or promote products
---      derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package SOLVEFOR PolynomialSolveByFormulas>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/solvelin.spad.pamphlet b/src/algebra/solvelin.spad.pamphlet
deleted file mode 100644
index 9c35d20..0000000
--- a/src/algebra/solvelin.spad.pamphlet
+++ /dev/null
@@ -1,282 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/algebra solvelin.spad}
-\author{Patrizia Gianni, Stephen M. Watt, Robert Sutor}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package LSMP LinearSystemMatrixPackage}
-<<package LSMP LinearSystemMatrixPackage>>=
-)abbrev package LSMP LinearSystemMatrixPackage
-++ Author: P.Gianni, S.Watt
-++ Date Created: Summer 1985
-++ Date Last Updated:Summer 1990
-++ Basic Functions: solve, particularSolution, hasSolution?, rank
-++ Related Constructors: LinearSystemMatrixPackage1
-++ Also See:
-++ AMS Classifications:
-++ Keywords:
-++ References:
-++ Description:
-++ This package solves linear system in the matrix form \spad{AX = B}.
-
-LinearSystemMatrixPackage(F, Row, Col, M): Cat == Capsule where
-    F: Field
-    Row: FiniteLinearAggregate F with shallowlyMutable
-    Col: FiniteLinearAggregate F with shallowlyMutable
-    M  : MatrixCategory(F, Row, Col)
-
-    N        ==> NonNegativeInteger
-    PartialV ==> Union(Col, "failed")
-    Both     ==> Record(particular: PartialV, basis: List Col)
-
-    Cat ==> with
-        solve       : (M, Col) -> Both
-          ++  solve(A,B) finds a particular solution of the system \spad{AX = B}
-          ++  and a basis of the associated homogeneous system \spad{AX = 0}.
-        solve       : (M, List Col) -> List Both
-          ++  solve(A,LB) finds a particular soln of the systems \spad{AX = B}
-          ++  and a basis of the associated homogeneous systems \spad{AX = 0}
-          ++  where B varies in the list of column vectors LB.
-
-        particularSolution: (M, Col) -> PartialV
-          ++ particularSolution(A,B) finds a particular solution of the linear
-          ++ system \spad{AX = B}.
-        hasSolution?: (M, Col) -> Boolean
-          ++ hasSolution?(A,B) tests if the linear system \spad{AX = B}
-          ++ has a solution.
-        rank        : (M, Col) -> N
-          ++ rank(A,B) computes the rank of the complete matrix \spad{(A|B)}
-          ++ of the linear system \spad{AX = B}.
-
-    Capsule ==> add
-      systemMatrix      : (M, Col) -> M
-      aSolution         :  M -> PartialV
-
-      -- rank theorem
-      hasSolution?(A, b) == rank A = rank systemMatrix(A, b)
-      systemMatrix(m, v) == horizConcat(m, -(v::M))
-      rank(A, b)         == rank systemMatrix(A, b)
-      particularSolution(A, b) == aSolution rowEchelon systemMatrix(A,b)
-
-      -- m should be in row-echelon form.
-      -- last column of m is -(right-hand-side of system)
-      aSolution m ==
-         nvar := (ncols m - 1)::N
-         rk := maxRowIndex m
-         while (rk >= minRowIndex m) and every?(zero?, row(m, rk))
-           repeat rk := dec rk
-         rk < minRowIndex m => new(nvar, 0)
-         ck := minColIndex m
-         while (ck < maxColIndex m) and zero? qelt(m, rk, ck) repeat
-           ck := inc ck
-         ck = maxColIndex m => "failed"
-         sol := new(nvar, 0)$Col
-         -- find leading elements of diagonal
-         v := new(nvar, minRowIndex m - 1)$PrimitiveArray(Integer)
-         for i in minRowIndex m .. rk repeat
-           for j in 0.. while zero? qelt(m, i, j+minColIndex m) repeat 0
-           v.j := i
-         for j in 0..nvar-1 repeat
-           if v.j >= minRowIndex m then
-             qsetelt_!(sol, j+minIndex sol, - qelt(m, v.j, maxColIndex m))
-         sol
-
-      solve(A:M, b:Col) ==
-          -- Special case for homogeneous systems.
-          every?(zero?, b) => [new(ncols A, 0), nullSpace A]
-          -- General case.
-          m   := rowEchelon systemMatrix(A, b)
-          [aSolution m,
-           nullSpace subMatrix(m, minRowIndex m, maxRowIndex m,
-                                      minColIndex m, maxColIndex m - 1)]
-
-      solve(A:M, l:List Col) ==
-          null l => [[new(ncols A, 0), nullSpace A]]
-          nl := (sol0 := solve(A, first l)).basis
-          cons(sol0,
-                 [[aSolution rowEchelon systemMatrix(A, b), nl]
-                                                       for b in rest l])
-
-@
-\section{package LSMP1 LinearSystemMatrixPackage1}
-<<package LSMP1 LinearSystemMatrixPackage1>>=
-)abbrev package LSMP1 LinearSystemMatrixPackage1
-++ Author: R. Sutor
-++ Date Created: June, 1994
-++ Date Last Updated:
-++ Basic Functions: solve, particularSolution, hasSolution?, rank
-++ Related Constructors: LinearSystemMatrixPackage
-++ Also See:
-++ AMS Classifications:
-++ Keywords: solve
-++ References:
-++ Description:
-++ This package solves linear system in the matrix form \spad{AX = B}.
-++ It is essentially a particular instantiation of the package
-++ \spadtype{LinearSystemMatrixPackage} for Matrix and Vector. This
-++ package's existence makes it easier to use \spadfun{solve} in the
-++ AXIOM interpreter.
-
-LinearSystemMatrixPackage1(F): Cat == Capsule where
-    F: Field
-    Row      ==> Vector F
-    Col      ==> Vector F
-    M        ==> Matrix(F)
-    LL       ==> List List F
-
-    N        ==> NonNegativeInteger
-    PartialV ==> Union(Col, "failed")
-    Both     ==> Record(particular: PartialV, basis: List Col)
-    LSMP     ==> LinearSystemMatrixPackage(F, Row, Col, M)
-
-    Cat ==> with
-        solve       : (M, Col) -> Both
-          ++  solve(A,B) finds a particular solution of the system \spad{AX = B}
-          ++  and a basis of the associated homogeneous system \spad{AX = 0}.
-        solve       : (LL, Col) -> Both
-          ++  solve(A,B) finds a particular solution of the system \spad{AX = B}
-          ++  and a basis of the associated homogeneous system \spad{AX = 0}.
-        solve       : (M, List Col) -> List Both
-          ++  solve(A,LB) finds a particular soln of the systems \spad{AX = B}
-          ++  and a basis of the associated homogeneous systems \spad{AX = 0}
-          ++  where B varies in the list of column vectors LB.
-        solve       : (LL, List Col) -> List Both
-          ++  solve(A,LB) finds a particular soln of the systems \spad{AX = B}
-          ++  and a basis of the associated homogeneous systems \spad{AX = 0}
-          ++  where B varies in the list of column vectors LB.
-
-        particularSolution: (M, Col) -> PartialV
-          ++ particularSolution(A,B) finds a particular solution of the linear
-          ++ system \spad{AX = B}.
-        hasSolution?: (M, Col) -> Boolean
-          ++ hasSolution?(A,B) tests if the linear system \spad{AX = B}
-          ++ has a solution.
-        rank        : (M, Col) -> N
-          ++ rank(A,B) computes the rank of the complete matrix \spad{(A|B)}
-          ++ of the linear system \spad{AX = B}.
-
-    Capsule ==> add
-        solve(m : M, c: Col): Both == solve(m,c)$LSMP
-        solve(ll : LL, c: Col): Both == solve(matrix(ll)$M,c)$LSMP
-        solve(m : M, l : List Col): List Both == solve(m, l)$LSMP
-        solve(ll : LL, l : List Col): List Both == solve(matrix(ll)$M, l)$LSMP
-        particularSolution (m : M, c : Col): PartialV == particularSolution(m, c)$LSMP
-        hasSolution?(m :M, c : Col): Boolean == hasSolution?(m, c)$LSMP
-        rank(m : M, c : Col): N == rank(m, c)$LSMP
-
-@
-\section{package LSPP LinearSystemPolynomialPackage}
-<<package LSPP LinearSystemPolynomialPackage>>=
-)abbrev package LSPP LinearSystemPolynomialPackage
-++ Author:  P.Gianni
-++ Date Created: Summer 1985
-++ Date Last Updated: Summer 1993
-++ Basic Functions:
-++ Related Constructors:
-++ Also See:
-++ AMS Classifications:
-++ Keywords:
-++ References: SystemSolvePackage
-++ Description:
-++ this package finds the solutions of linear systems presented as a
-++ list of polynomials.
-
-LinearSystemPolynomialPackage(R, E, OV, P): Cat == Capsule where
-    R          :   IntegralDomain
-    OV         :   OrderedSet
-    E          :   OrderedAbelianMonoidSup
-    P          :   PolynomialCategory(R,E,OV)
-
-    F        ==> Fraction P
-    NNI      ==> NonNegativeInteger
-    V        ==> Vector
-    M        ==> Matrix
-    Soln     ==> Record(particular: Union(V F, "failed"), basis: List V F)
-
-    Cat == with
-        linSolve:  (List P, List OV) -> Soln
-          ++ linSolve(lp,lvar) finds the solutions of the linear system
-          ++ of polynomials lp = 0 with respect to the list of symbols lvar.
-
-    Capsule == add
-
-                        ---- Local Functions ----
-
-        poly2vect:    (P,     List OV)    -> Record(coefvec: V F, reductum: F)
-        intoMatrix:   (List P,   List OV) -> Record(mat: M F, vec: V F)
-
-
-        poly2vect(p : P, vs : List OV) : Record(coefvec: V F, reductum: F) ==
-            coefs := new(#vs, 0)$(V F)
-            for v in vs for i in 1.. while p ^= 0 repeat
-              u := univariate(p, v)
-              degree u = 0 => "next v"
-              coefs.i := (c := leadingCoefficient u)::F
-              p := p - monomial(c,v, 1)
-            [coefs, p :: F]
-
-        intoMatrix(ps : List P, vs : List OV ) : Record(mat: M F, vec: V F) ==
-            m := zero(#ps, #vs)$M(F)
-            v := new(#ps, 0)$V(F)
-            for p in ps for i in 1.. repeat
-                totalDegree(p,vs) > 1 => error "The system is not linear"
-                r   := poly2vect(p,vs)
-                m:=setRow_!(m,i,r.coefvec)
-                v.i := - r.reductum
-            [m, v]
-
-        linSolve(ps, vs) ==
-            r := intoMatrix(ps, vs)
-            solve(r.mat, r.vec)$LinearSystemMatrixPackage(F,V F,V F,M F)
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
---    - Redistributions of source code must retain the above copyright
---      notice, this list of conditions and the following disclaimer.
---
---    - Redistributions in binary form must reproduce the above copyright
---      notice, this list of conditions and the following disclaimer in
---      the documentation and/or other materials provided with the
---      distribution.
---
---    - Neither the name of The Numerical ALgorithms Group Ltd. nor the
---      names of its contributors may be used to endorse or promote products
---      derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package LSMP LinearSystemMatrixPackage>>
-<<package LSMP1 LinearSystemMatrixPackage1>>
-<<package LSPP LinearSystemPolynomialPackage>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/solverad.spad.pamphlet b/src/algebra/solverad.spad.pamphlet
deleted file mode 100644
index 59e9272..0000000
--- a/src/algebra/solverad.spad.pamphlet
+++ /dev/null
@@ -1,328 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/algebra solverad.spad}
-\author{Patrizia Gianni}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package SOLVERAD RadicalSolvePackage}
-<<package SOLVERAD RadicalSolvePackage>>=
-)abbrev package SOLVERAD RadicalSolvePackage
-++ Author: P.Gianni
-++ Date Created: Summer 1990
-++ Date Last Updated: October 1991
-++ Basic Functions:
-++ Related Constructors: SystemSolvePackage, FloatingRealPackage,
-++ FloatingComplexPackage
-++ Also See:
-++ AMS Classifications:
-++ Keywords:
-++ References:
-++ Description:
-++ This package tries to find solutions
-++ expressed in terms of radicals for systems of equations
-++ of rational functions with coefficients in an integral domain R.
-RadicalSolvePackage(R): Cat == Capsule where
-    R   :  Join(EuclideanDomain, OrderedSet, CharacteristicZero)
-    PI ==> PositiveInteger
-    NNI==> NonNegativeInteger
-    Z  ==> Integer
-    B  ==> Boolean
-    ST ==> String
-    PR ==> Polynomial R
-    UP ==> SparseUnivariatePolynomial PR
-    LA ==> LocalAlgebra(PR, Z, Z)
-    RF ==> Fraction PR
-    RE ==> Expression R
-    EQ ==> Equation
-    SY ==> Symbol
-    SU ==> SuchThat(List RE, List Equation RE)
-    SUP==> SparseUnivariatePolynomial
-    L  ==> List
-    P  ==> Polynomial
-
-    SOLVEFOR ==> PolynomialSolveByFormulas(SUP RE, RE)
-    UPF2     ==> SparseUnivariatePolynomialFunctions2(PR,RE)
-
-    Cat ==> with
-
-        radicalSolve :     (RF,SY)      -> L EQ RE
-          ++ radicalSolve(rf,x) finds the solutions expressed in terms of
-          ++ radicals of the equation rf = 0 with respect to the symbol x,
-          ++ where rf is a rational function.
-        radicalSolve :       RF         -> L EQ RE
-          ++ radicalSolve(rf) finds the solutions expressed in terms of
-          ++ radicals of the equation rf = 0, where rf is a
-          ++ univariate rational function.
-        radicalSolve :    (EQ RF,SY)    -> L EQ RE
-          ++ radicalSolve(eq,x) finds the solutions expressed in terms of
-          ++ radicals of the equation of rational functions eq
-          ++ with respect to the symbol x.
-        radicalSolve :      EQ RF       -> L EQ RE
-          ++ radicalSolve(eq) finds the solutions expressed in terms of
-          ++ radicals of the equation of rational functions eq
-          ++ with respect to the unique symbol x appearing in eq.
-        radicalSolve :    (L RF,L SY)   -> L L EQ RE
-          ++ radicalSolve(lrf,lvar) finds the solutions expressed in terms of
-          ++ radicals of the system of equations lrf = 0 with
-          ++ respect to the list of symbols lvar,
-          ++ where lrf is a list of rational functions.
-        radicalSolve :       L RF       -> L L EQ RE
-          ++ radicalSolve(lrf) finds the solutions expressed in terms of
-          ++ radicals of the system of equations lrf = 0, where lrf is a
-          ++ system of univariate rational functions.
-        radicalSolve :   (L EQ RF,L SY) -> L L EQ RE
-          ++ radicalSolve(leq,lvar) finds the solutions expressed in terms of
-          ++ radicals of the system of equations of rational functions leq
-          ++ with respect to the list of symbols lvar.
-        radicalSolve :     L EQ RF      -> L L EQ RE
-          ++ radicalSolve(leq) finds the solutions expressed in terms of
-          ++ radicals of the system of equations of rational functions leq
-          ++ with respect to the unique symbol x appearing in leq.
-        radicalRoots :      (RF,SY)     -> L RE
-          ++ radicalRoots(rf,x) finds the roots expressed in terms of radicals
-          ++ of the rational function rf with respect to the symbol x.
-        radicalRoots :    (L RF,L SY)   -> L L RE
-          ++ radicalRoots(lrf,lvar) finds the roots expressed in terms of
-          ++ radicals of the list of rational functions lrf
-          ++ with respect to the list of symbols lvar.
-        contractSolve:    (EQ RF,SY)  -> SU
-          ++ contractSolve(eq,x) finds the solutions expressed in terms of
-          ++ radicals of the equation of rational functions eq
-          ++ with respect to the symbol x.  The result contains new
-          ++ symbols for common subexpressions in order to reduce the
-          ++ size of the output.
-        contractSolve:    (RF,SY)     -> SU
-          ++ contractSolve(rf,x) finds the solutions expressed in terms of
-          ++ radicals of the equation rf = 0 with respect to the symbol x,
-          ++ where rf is a rational function. The result contains  new
-          ++ symbols for common subexpressions in order to reduce the
-          ++ size of the output.
-    Capsule ==> add
-        import DegreeReductionPackage(PR, R)
-        import SOLVEFOR
-
-        SideEquations: List EQ RE := []
-        ContractSoln:  B := false
-
-        ---- Local Function Declarations ----
-        solveInner:(PR, SY, B) -> SU
-        linear:    UP -> List RE
-        quadratic: UP -> List RE
-        cubic:     UP -> List RE
-        quartic:   UP -> List RE
-        rad:       PI -> RE
-        wrap:      RE -> RE
-        New:       RE -> RE
-        makeEq : (List RE,L SY) -> L EQ RE
-        select :    L L RE      -> L L RE
-        isGeneric? :  (L PR,L SY)  ->  Boolean
-        findGenZeros :  (L PR,L SY) -> L L RE
-        findZeros   :   (L PR,L SY) -> L L RE
-
-
-        New s ==
-            s = 0 => 0
-            S := new()$Symbol ::PR::RF::RE
-            SideEquations := append([S = s], SideEquations)
-            S
-
-        linear u    == [(-coefficient(u,0))::RE /(coefficient(u,1))::RE]
-        quadratic u == quadratic(map(coerce,u)$UPF2)$SOLVEFOR
-        cubic u     == cubic(map(coerce,u)$UPF2)$SOLVEFOR
-        quartic u   == quartic(map(coerce,u)$UPF2)$SOLVEFOR
-        rad n       == n::Z::RE
-        wrap s      == (ContractSoln => New s; s)
-
-
-        ---- Exported Functions ----
-
-
-       -- find the zeros of components in "generic" position --
-        findGenZeros(rlp:L PR,rlv:L SY) : L L RE ==
-         pp:=rlp.first
-         v:=first rlv
-         rlv:=rest rlv
-         res:L L RE:=[]
-         res:=append([reverse cons(r,[eval(
-           (-coefficient(univariate(p,vv),0)::RE)/(leadingCoefficient univariate(p,vv))::RE,
-              kernel(v)@Kernel(RE),r) for vv in rlv for p in rlp.rest])
-                for r in radicalRoots(pp::RF,v)],res)
-         res
-
-
-        findZeros(rlp:L PR,rlv:L SY) : L L RE ==
-         parRes:=[radicalRoots(p::RF,v) for p in rlp for v in rlv]
-         parRes:=select parRes
-         res:L L RE :=[]
-         res1:L RE
-         for par in parRes repeat
-           res1:=[par.first]
-           lv1:L Kernel(RE):=[kernel rlv.first]
-           rlv1:=rlv.rest
-           p1:=par.rest
-           while p1^=[] repeat
-             res1:=cons(eval(p1.first,lv1,res1),res1)
-             p1:=p1.rest
-             lv1:=cons(kernel rlv1.first,lv1)
-             rlv1:=rlv1.rest
-           res:=cons(res1,res)
-         res
-
-        radicalSolve(pol:RF,v:SY) ==
-          [equation(v::RE,r) for r in radicalRoots(pol,v)]
-
-        radicalSolve(p:RF) ==
-          zero? p =>
-             error "equation is always satisfied"
-          lv:=removeDuplicates
-             concat(variables numer p, variables denom p)
-          empty? lv => error "inconsistent equation"
-          #lv>1 => error "too many variables"
-          radicalSolve(p,lv.first)
-
-        radicalSolve(eq: EQ RF) ==
-          radicalSolve(lhs eq -rhs eq)
-
-        radicalSolve(eq: EQ RF,v:SY) ==
-           radicalSolve(lhs eq - rhs eq,v)
-
-        radicalRoots(lp: L RF,lv: L SY) ==
-          parRes:=triangularSystems(lp,lv)$SystemSolvePackage(R)
-          parRes= list [] => []
-           -- select the components in "generic" form
-          rlv:=reverse lv
-          rpRes:=[reverse res for res in parRes]
-          listGen:= [res for res in rpRes|isGeneric?(res,rlv)]
-          result:L L RE:=[]
-          if listGen^=[] then
-            result:="append"/[findGenZeros(res,rlv) for res in listGen]
-            for res in listGen repeat
-                rpRes:=delete(rpRes,position(res,rpRes))
-           --  non-generic components
-          rpRes = [] => result
-          append("append"/[findZeros(res,rlv) for res in rpRes],
-                         result)
-
-        radicalSolve(lp:L RF,lv:L SY) ==
-          [makeEq(lres,lv) for lres in radicalRoots(lp,lv)]
-
-        radicalSolve(lp: L RF) ==
-          lv:="setUnion"/[setUnion(variables numer p,variables denom p)
-                          for p in lp]
-          [makeEq(lres,lv) for lres in radicalRoots(lp,lv)]
-
-        radicalSolve(le:L EQ RF,lv:L SY) ==
-          lp:=[rhs p -lhs p for p in le]
-          [makeEq(lres,lv) for lres in radicalRoots(lp,lv)]
-
-        radicalSolve(le: L EQ RF) ==
-          lp:=[rhs p -lhs p for p in le]
-          lv:="setUnion"/[setUnion(variables numer p,variables denom p)
-                          for p in lp]
-          [makeEq(lres,lv) for lres in radicalRoots(lp,lv)]
-
-        contractSolve(eq:EQ RF, v:SY)==
-           solveInner(numer(lhs eq - rhs eq), v, true)
-
-        contractSolve(pq:RF, v:SY) == solveInner(numer pq, v, true)
-
-        radicalRoots(pq:RF, v:SY) == lhs solveInner(numer pq, v, false)
-
-
-       -- test if the ideal is radical in generic position --
-        isGeneric?(rlp:L PR,rlv:L SY) : Boolean ==
-          "and"/[degree(f,x)=1 for f in rest rlp  for x in rest rlv]
-
-        ---- select  the univariate factors
-        select(lp:L L RE) : L L RE ==
-          lp=[] => list []
-          [:[cons(f,lsel) for lsel in select lp.rest] for f in lp.first]
-
-        ---- Local Functions ----
-       -- construct the equation
-        makeEq(nres:L RE,lv:L SY) : L EQ RE ==
-          [equation(x :: RE,r) for x in lv for r in nres]
-
-        solveInner(pq:PR,v:SY,contractFlag:B) ==
-            SideEquations := []
-            ContractSoln  := contractFlag
-
-            factors:= factors
-               (factor pq)$MultivariateFactorize(SY,IndexedExponents SY,R,PR)
-
-            constants:  List PR     := []
-            unsolved:   List PR     := []
-            solutions:  List RE     := []
-
-            for f in factors repeat
-                ff:=f.factor
-                ^ member?(v, variables (ff)) =>
-                    constants := cons(ff, constants)
-                u := univariate(ff, v)
-                t := reduce u
-                u := t.pol
-                n := degree u
-                l: List RE :=
-                    n = 1 => linear u
-                    n = 2 => quadratic u
-                    n = 3 => cubic u
-                    n = 4 => quartic u
-                    unsolved := cons(ff, unsolved)
-                    []
-                for s in l repeat
-                    if t.deg > 1 then s := wrap s
-                    T0 := expand(s, t.deg)
-                    for i in 1..f.exponent repeat
-                        solutions := append(T0, solutions)
-                    re := SideEquations
-            [solutions, SideEquations]$SU
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
---    - Redistributions of source code must retain the above copyright
---      notice, this list of conditions and the following disclaimer.
---
---    - Redistributions in binary form must reproduce the above copyright
---      notice, this list of conditions and the following disclaimer in
---      the documentation and/or other materials provided with the
---      distribution.
---
---    - Neither the name of The Numerical ALgorithms Group Ltd. nor the
---      names of its contributors may be used to endorse or promote products
---      derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package SOLVERAD RadicalSolvePackage>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/sortpak.spad.pamphlet b/src/algebra/sortpak.spad.pamphlet
deleted file mode 100644
index 2d10ddf..0000000
--- a/src/algebra/sortpak.spad.pamphlet
+++ /dev/null
@@ -1,107 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/algebra sortpak.spad}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package SORTPAK SortPackage}
-<<package SORTPAK SortPackage>>=
-)abbrev package SORTPAK SortPackage
-++ Description:
-++ This package exports sorting algorithnms
-SortPackage(S,A) : Exports == Implementation where
-  S: Type
-  A: IndexedAggregate(Integer,S)
-    with (finiteAggregate; shallowlyMutable)
-
-  Exports == with
-    bubbleSort_!: (A,(S,S) -> Boolean) -> A
-	++ bubbleSort!(a,f) \undocumented
-    insertionSort_!: (A, (S,S) -> Boolean) -> A
-	++ insertionSort!(a,f) \undocumented
-    if S has OrderedSet then
-      bubbleSort_!: A -> A
-	++ bubbleSort!(a) \undocumented
-      insertionSort_!: A -> A
-	++ insertionSort! \undocumented
-
-  Implementation == add
-    bubbleSort_!(m,f) ==
-      n := #m
-      for i in 1..(n-1) repeat
-        for j in n..(i+1) by -1 repeat
-          if f(m.j,m.(j-1)) then swap_!(m,j,j-1)
-      m
-    insertionSort_!(m,f) ==
-      for i in 2..#m repeat
-        j := i
-        while j > 1 and f(m.j,m.(j-1)) repeat
-          swap_!(m,j,j-1)
-          j := (j - 1) pretend PositiveInteger
-      m
-    if S has OrderedSet then
-      bubbleSort_!(m) == bubbleSort_!(m,_<$S)
-      insertionSort_!(m) == insertionSort_!(m,_<$S)
-    if A has UnaryRecursiveAggregate(S) then
-      bubbleSort_!(m,fn) ==
-        empty? m => m
-        l := m
-        while not empty? (r := l.rest) repeat
-           r := bubbleSort_!(r,fn)
-           x := l.first
-           if fn(r.first,x) then
-             l.first := r.first
-             r.first := x
-           l.rest := r
-           l := l.rest
-        m
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
---    - Redistributions of source code must retain the above copyright
---      notice, this list of conditions and the following disclaimer.
---
---    - Redistributions in binary form must reproduce the above copyright
---      notice, this list of conditions and the following disclaimer in
---      the documentation and/or other materials provided with the
---      distribution.
---
---    - Neither the name of The Numerical ALgorithms Group Ltd. nor the
---      names of its contributors may be used to endorse or promote products
---      derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package SORTPAK SortPackage>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/space.spad.pamphlet b/src/algebra/space.spad.pamphlet
deleted file mode 100644
index f5bc0a1..0000000
--- a/src/algebra/space.spad.pamphlet
+++ /dev/null
@@ -1,67 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/algebra space.spad}
-\author{The Axiom Team}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package TOPSP TopLevelThreeSpace}
-<<package TOPSP TopLevelThreeSpace>>=
-)abbrev package TOPSP TopLevelThreeSpace
-++ Description:
-++ This package exports a function for making a \spadtype{ThreeSpace}
-TopLevelThreeSpace(): with
-    createThreeSpace: () -> ThreeSpace DoubleFloat
-      ++ createThreeSpace() creates a \spadtype{ThreeSpace(DoubleFloat)} object 
-      ++ capable of holding point, curve, mesh components and any combination.
-  == add
-    createThreeSpace() == create3Space()$ThreeSpace(DoubleFloat)
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
---    - Redistributions of source code must retain the above copyright
---      notice, this list of conditions and the following disclaimer.
---
---    - Redistributions in binary form must reproduce the above copyright
---      notice, this list of conditions and the following disclaimer in
---      the documentation and/or other materials provided with the
---      distribution.
---
---    - Neither the name of The Numerical ALgorithms Group Ltd. nor the
---      names of its contributors may be used to endorse or promote products
---      derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package TOPSP TopLevelThreeSpace>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/special.spad.pamphlet b/src/algebra/special.spad.pamphlet
deleted file mode 100644
index aab10e4..0000000
--- a/src/algebra/special.spad.pamphlet
+++ /dev/null
@@ -1,2392 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/algebra special.spad}
-\author{Bruce W. Char, Timothy Daly, Stephen M. Watt}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package DFSFUN DoubleFloatSpecialFunctions}
-<<package DFSFUN DoubleFloatSpecialFunctions>>=
-)abbrev package DFSFUN DoubleFloatSpecialFunctions
-++ Author: Bruce W. Char, Timothy Daly, Stephen M. Watt
-++ Date Created:  1990
-++ Date Last Updated: Jan 19, 2008
-++ Basic Operations:
-++ Related Domains:
-++ Also See:
-++ AMS Classifications:
-++ Keywords:
-++ Examples:
-++ References:
-++ Description:
-++   This package provides special functions for double precision
-++   real and complex floating point.
-
-DoubleFloatSpecialFunctions(): Exports == Impl where
-    NNI ==> NonNegativeInteger
-    PI  ==> Integer
-    R   ==> DoubleFloat
-    C   ==> Complex DoubleFloat
-    OPR ==> OnePointCompletion R
-
-    Exports ==> with
-        Gamma: R -> R
-         ++ Gamma(x) is the Euler gamma function, \spad{Gamma(x)}, defined by
-         ++   \spad{Gamma(x) = integrate(t^(x-1)*exp(-t), t=0..%infinity)}.
-        Gamma: C -> C
-         ++ Gamma(x) is the Euler gamma function, \spad{Gamma(x)}, defined by
-         ++   \spad{Gamma(x) = integrate(t^(x-1)*exp(-t), t=0..%infinity)}.
-
-        E1: R -> OPR
-	 ++ E1(x) is the Exponential Integral function
-         ++ The current implementation is a piecewise approximation
-         ++ involving one poly from -4..4 and a second poly for x > 4
-
-        En: (PI,R) -> OPR
-         ++ En(n,x) is the nth Exponential Integral Function
-
-        Ei: (OPR) -> OPR
-         ++ Ei is the Exponential Integral function
-         ++ This is computed using a 6 part piecewise approximation.
-         ++ DoubleFloat can only preserve about 16 digits but the
-         ++ Chebyshev approximation used can give 30 digits.
-
-        Ei1: (OPR) -> OPR
-         ++ Ei1 is the first approximation of Ei where the result is
-         ++ x*%e^-x*Ei(x) from -infinity to -10 (preserves digits)
-
-        Ei2: (OPR) -> OPR
-         ++ Ei2 is the first approximation of Ei where the result is
-         ++ x*%e^-x*Ei(x) from -10 to -4 (preserves digits)
-
-        Ei3: (OPR) -> OPR
-         ++ Ei3 is the first approximation of Ei where the result is
-         ++ (Ei(x)-log |x| - gamma)/x from -4 to 4 (preserves digits)
-
-        Ei4: (OPR) -> OPR
-         ++ Ei4 is the first approximation of Ei where the result is
-         ++ x*%e^-x*Ei(x) from 4 to 12 (preserves digits)
-
-        Ei5: (OPR) -> OPR
-         ++ Ei5 is the first approximation of Ei where the result is
-         ++ x*%e^-x*Ei(x) from 12 to 32 (preserves digits)
-
-        Ei6: (OPR) -> OPR
-         ++ Ei6 is the first approximation of Ei where the result is
-         ++ x*%e^-x*Ei(x) from 32 to infinity (preserves digits)
-
-        Beta: (R, R) -> R
-         ++ Beta(x, y) is the Euler beta function, \spad{B(x,y)}, defined by
-         ++   \spad{Beta(x,y) = integrate(t^(x-1)*(1-t)^(y-1), t=0..1)}.
-         ++ This is related to \spad{Gamma(x)} by
-         ++   \spad{Beta(x,y) = Gamma(x)*Gamma(y) / Gamma(x + y)}.
-        Beta: (C, C) -> C
-         ++ Beta(x, y) is the Euler beta function, \spad{B(x,y)}, defined by
-         ++   \spad{Beta(x,y) = integrate(t^(x-1)*(1-t)^(y-1), t=0..1)}.
-         ++ This is related to \spad{Gamma(x)} by
-         ++   \spad{Beta(x,y) = Gamma(x)*Gamma(y) / Gamma(x + y)}.
-
-        logGamma: R -> R
-         ++ logGamma(x) is the natural log of \spad{Gamma(x)}.
-         ++ This can often be computed even if \spad{Gamma(x)} cannot.
-        logGamma: C -> C
-         ++ logGamma(x) is the natural log of \spad{Gamma(x)}.
-         ++ This can often be computed even if \spad{Gamma(x)} cannot.
-
-        digamma: R -> R
-         ++ digamma(x) is the function, \spad{psi(x)}, defined by
-         ++   \spad{psi(x) = Gamma'(x)/Gamma(x)}.
-        digamma: C -> C
-         ++ digamma(x) is the function, \spad{psi(x)}, defined by
-         ++   \spad{psi(x) = Gamma'(x)/Gamma(x)}.
-
-        polygamma: (NNI, R) -> R
-         ++ polygamma(n, x) is the n-th derivative of \spad{digamma(x)}.
-        polygamma: (NNI, C) -> C
-         ++ polygamma(n, x) is the n-th derivative of \spad{digamma(x)}.
-
-        besselJ: (R,R) -> R
-         ++ besselJ(v,x) is the Bessel function of the first kind,
-         ++ \spad{J(v,x)}.
-         ++ This function satisfies the differential equation:
-         ++   \spad{x^2 w''(x) + x w'(x) + (x^2-v^2)w(x) = 0}.
-        besselJ: (C,C) -> C
-         ++ besselJ(v,x) is the Bessel function of the first kind,
-         ++ \spad{J(v,x)}.
-         ++ This function satisfies the differential equation:
-         ++   \spad{x^2 w''(x) + x w'(x) + (x^2-v^2)w(x) = 0}.
-
-        besselY: (R, R) -> R
-         ++ besselY(v,x) is the Bessel function of the second kind,
-         ++ \spad{Y(v,x)}.
-         ++ This function satisfies the differential equation:
-         ++   \spad{x^2 w''(x) + x w'(x) + (x^2-v^2)w(x) = 0}.
-         ++ Note: The default implementation uses the relation
-         ++   \spad{Y(v,x) = (J(v,x) cos(v*%pi) - J(-v,x))/sin(v*%pi)}
-         ++ so is not valid for integer values of v.
-        besselY: (C, C) -> C
-         ++ besselY(v,x) is the Bessel function of the second kind,
-         ++ \spad{Y(v,x)}.
-         ++ This function satisfies the differential equation:
-         ++   \spad{x^2 w''(x) + x w'(x) + (x^2-v^2)w(x) = 0}.
-         ++ Note: The default implementation uses the relation
-         ++   \spad{Y(v,x) = (J(v,x) cos(v*%pi) - J(-v,x))/sin(v*%pi)}
-         ++ so is not valid for integer values of v.
-
-        besselI: (R,R) -> R
-         ++ besselI(v,x) is the modified Bessel function of the first kind,
-         ++ \spad{I(v,x)}.
-         ++ This function satisfies the differential equation:
-         ++   \spad{x^2 w''(x) + x w'(x) - (x^2+v^2)w(x) = 0}.
-        besselI: (C,C) -> C
-         ++ besselI(v,x) is the modified Bessel function of the first kind,
-         ++ \spad{I(v,x)}.
-         ++ This function satisfies the differential equation:
-         ++   \spad{x^2 w''(x) + x w'(x) - (x^2+v^2)w(x) = 0}.
-
-        besselK: (R, R) -> R
-         ++ besselK(v,x) is the modified Bessel function of the second kind,
-         ++ \spad{K(v,x)}.
-         ++ This function satisfies the differential equation:
-         ++   \spad{x^2 w''(x) + x w'(x) - (x^2+v^2)w(x) = 0}.
-         ++ Note: The default implementation uses the relation
-         ++   \spad{K(v,x) = %pi/2*(I(-v,x) - I(v,x))/sin(v*%pi)}.
-         ++ so is not valid for integer values of v.
-        besselK: (C, C) -> C
-         ++ besselK(v,x) is the modified Bessel function of the second kind,
-         ++ \spad{K(v,x)}.
-         ++ This function satisfies the differential equation:
-         ++   \spad{x^2 w''(x) + x w'(x) - (x^2+v^2)w(x) = 0}.
-         ++ Note: The default implementation uses the relation
-         ++   \spad{K(v,x) = %pi/2*(I(-v,x) - I(v,x))/sin(v*%pi)}
-         ++ so is not valid for integer values of v.
-
-        airyAi:   C -> C
-         ++ airyAi(x) is the Airy function \spad{Ai(x)}.
-         ++ This function satisfies the differential equation:
-         ++   \spad{Ai''(x) - x * Ai(x) = 0}.
-        airyAi:   R -> R
-         ++ airyAi(x) is the Airy function \spad{Ai(x)}.
-         ++ This function satisfies the differential equation:
-         ++   \spad{Ai''(x) - x * Ai(x) = 0}.
-
-        airyBi:   R -> R
-         ++ airyBi(x) is the Airy function \spad{Bi(x)}.
-         ++ This function satisfies the differential equation:
-         ++   \spad{Bi''(x) - x * Bi(x) = 0}.
-        airyBi:   C -> C
-         ++ airyBi(x) is the Airy function \spad{Bi(x)}.
-         ++ This function satisfies the differential equation:
-         ++   \spad{Bi''(x) - x * Bi(x) = 0}.
-
-        hypergeometric0F1: (R, R) -> R
-         ++ hypergeometric0F1(c,z) is the hypergeometric function
-         ++ \spad{0F1(; c; z)}.
-        hypergeometric0F1: (C, C) -> C
-         ++ hypergeometric0F1(c,z) is the hypergeometric function
-         ++ \spad{0F1(; c; z)}.
-
-
-    Impl ==> add
-        a, v, w, z: C
-        n, x, y: R
-
-        -- These are hooks to Bruce's boot code.
-        Gamma z         == CGAMMA(z)$Lisp
-        Gamma x         == RGAMMA(x)$Lisp
-
-@
-\section{The Exponential Integral}
-\subsection{The E1 function}
-(Quoted from Segletes\cite{2}):
-
-A number of useful integrals exist for which no exact solutions have
-been found. In other cases, an exact solution, if found, may be
-impractical to utilize over the complete domain of the function
-because of precision limitations associated with what usually ends up
-as a series solution to the challenging integral. For many of these
-integrals, tabulated values may be published in various mathematical
-handbooks and articles. In some handbooks, fits (usually piecewise)
-also are offered. In some cases, an application may be forced to
-resort to numerical integration in order to acquire the integrated
-function. In this context, compact ({\sl i.e.} not piecewise)
-analytical fits to some of these problematic integrals, accurate to
-within a small fraction of the numerically integrated value, serve as
-a useful tool to applications requiring the results of the
-integration, especially when the integration is required numerous
-times throughout the course of the application. Furthermore, the
-ability and methodology to develop intelligent fits, in contract to
-the more traditional ``brute force'' fits, provide the means to
-minimize parameters and maximize accuracy when tackling some of these
-difficult functions. The exponential integral will be used as an
-opportunity to both demonstrate a methodology for intelligent fitting
-as well as for providing an accurate, compact, analytical fit to the
-exponential integral.
-
-The exponential integral is a useful class of functions that arise in
-a variety of applications [...]. The real branch of the family of
-exponential integrals may be defined as
-\begin{equation}
-E_n(x)=x^{n-1}\int_x^\infty{\frac{e^{-t}}{t^n}\ dt}
-\end{equation}
-where $n$, a positive integer, denotes the specific member of the
-exponential integral family. The argument of the exponential integral,
-rather than expressing a lower limit of integration as in (1),
-may be thought of as describing the exponential decay
-constant, as given in this equivalent (and perhaps more popular)
-definition of the integral:
-\begin{equation}
-E_n(x)=\int_1^\infty{\frac{e^{-xt}}{t^n}\ dt}
-\end{equation}
-
-Integration by parts permits any member of the exponential integral
-family to be converted to an adjacent member of the family, by way of 
-\begin{equation}
-\int_x^\infty{\frac{e^{-t}}{t^{n+1}}\ dt}=\frac{1}{n}
-\left(
-\frac{e^{-x}}{x^n}-\int_x^\infty{\frac{e^{-t}}{t^n}\ dt}
-\right)
-\end{equation}
-expressable in terms of $E_n$ as
-\begin{equation}
-E_{n+1}(x)=\frac{1}{n}\left[e^{-x}-xE_n(x)\right]\ (n=1,2,3)
-\end{equation}
-
-Through recursive employment of this equation, all members of the
-exponential integral family may be analytically related. However, this
-technique only allows for the transformation of one integral into
-another. There remains the problem of evaluating $E_1(x)$. There is an
-exact solution to the integral of $(e^{-t}/t)$, appearing in a number
-of mathematical references \cite{4,5} which is obtainable by
-expanding the exponential into a power series and integrating term by
-term. That exact solution, which is convergent, may be used to specify
-$E_1(x)$ as 
-\begin{equation}
-E_1(x)=-\gamma-ln(x)
-+\frac{x}{1!}
--\frac{x^2}{2\cdot 2!}
-+\frac{x^3}{3\cdot 3!}
--\ldots
-\end{equation}
-
-Euler's constant, $\gamma$, equal to $0.57721\ldots$, arises when the
-power series expansion for $(e^{-t}/t)$ is integrated and evaluated at
-its upper limit, as $x\rightarrow\infty$\cite{6}.
-
-Employing eqn (5), however, to evaluate $E_1(x)$ is problematic for
-finite $x$ significantly larger than unity. One may well ask of the
-need to evaluate the exponential integral for large $x$, since the
-function to be integrated drops off so rapidly that the integral is
-surely a very flat function. Such reasoning is true when comparing the
-integrand at large $x$ to that at small $x$. However, the definition
-of eqn (1) has as its upper limit not a small value of $x$, but rather
-that of $\infty$. Therefore, the actual values for $E_n(x)$ are
-extremely small numbers for large values of $x$. Thus, it is not
-sufficient merely to select enough terms of eqn (5) to evaluate the
-integral to within a value of, for example $\pm 0.0001$ because the
-actual integral value for large $x$ would be smaller than this
-arbitrary tolerance. To draw an analogy, it would be like saying that
-it is good enough to approximate $e^{-x}$ as 0.0 for $x>10$, since its
-actual value is within 0.0001 of zero. For some applications, such an
-approximation may be warranted. In general, though, such an
-approximation is mathematically unacceptable. Worse yet, as seen from
-eqns (1) and (2), the need to evaluate the exponential integral for
-large arguments can arise in real-world problems from either a large
-integraion limit or a large value of an exponential decay
-constant. Thus, the need to evaluate exponential integrals for large
-values of the argument is established. It is here that the practical
-problems with the evaluation of eqn (5) become manifest.
-
-First, the number of terms, $N$, required to achieve convergence rises
-rapidly with increasing $x$, making the summation an inefficient tool,
-even when expressed as a recursion relation (for three digits of
-accuracy, $N$ is observed to vary roughly as $9+1.6x$, for $1<x<7$).
-More important, however, is the fact that, for calculations of finite
-precision, the accuracy of the complete summation will be governed by
-the individual term of greatest magnitude. The source of the problem
-is that as $x$ is increased, the total summation decreases in
-magnitude more rapidly than a decaying exponential, while at the same
-time, the largest individual term in the series is observed to grow
-rapidly with increasing $x$ (
-$\tilde{}10^1$ for $x=7$, 
-$\tilde{}10^2$ for $x=10$, 
-$\tilde{}10^3$ for $x=13$, {\sl etc.}). The magnitude of this largest
-individual term consumes the available precision and, as a result,
-leaves little or none left for the ever-diminishing net sum that
-constitutes the desired integral.
-
-Literally, the use of eqn (5), even with (32-bit) double precision,
-does not permit the exponential integral to be evaluated to three
-places for $x>14$ in any case, and with the situation worsening for
-lesser precision. For these reasons, the use of eqn (5) to evaluate
-the exponential integral numerically for large $x$ is wholly
-unsuitable.
-
-\begin{equation}
-E_1(x)=e^{-x}\cdot
-\frac{1}{\displaystyle x+
-\frac{1}{\displaystyle 1+
-\frac{1}{\displaystyle x+
-\frac{2}{\displaystyle 1+
-\frac{2}{\displaystyle x+\ldots}}}}}
-\end{equation}
-
-But as $x$ becomes smaller, the number of terms required for
-convergence rises quickly. Similar arguments apply for the use of an
-asymptotic expansion for $E_1$, which also converges for large $x$. As
-such, the more typical approach employed by handbooks is that of a
-fit. While some steps are taken to make the fits intelligent ({\sl
-e.g.}, transformation of variables), the fits are all piecewise over
-the domain of the integral.
-
-Cody and Thatcher \cite{7} performed what is perhaps the definitive
-work, with the use of Chebyshev\cite{18,19} approximations to the exponential 
-integral $E_1$. Like others, they fit the integral over a piecewise
-series of subdomains (three in their case) and provide the fitting
-parameters necessary to evaluate the function to various required
-precisions, down to relative errors of $10^-20$. One of the problems
-with piecewise fitting over two or more subdomains is that functional
-value and derivatives of the spliced fits will not, in general, match
-at the domain transition point, unless special accomodations are
-made. This sort of discontinuity in functional value and/or slope,
-curvature, {\sl etc.}, may cause difficulties for some numerical
-algorithms operating upon the fitted function. Numerical
-splicing/smoothing algorithms aimed at eliminating discontinuities in
-the value and/or derivatives of a piecewise fit are not, in general,
-computationally insignificant. Problems associated with piecewise
-splicing of fits may also be obviated by obtaining an accurate enough
-fit, such that the error is on the order of magnitude of the limiting
-machine precision. This alternative, however, requires the use of
-additional fitting parameters to acquire the improved precision. Thus,
-regardless of approach, the desire to eliminate discontinuities in the
-function and its derivatives, between piecewise splices, requires
-extra computational effort. One final benefit to be had by avoiding
-the use of piecewise fits is the concomitant avoidance of conditional
-({\sl i.e.}, IF...THEN) programming statements in the coding of the
-routine. The use of conditional statements can preclude maximum
-computing efficiency on certain parallel computing architectures.
-
-Segletes constructs an analytic, non-piecewise fit to the Exponential
-Integral but the precision is on the order of 4 decimal places and is
-not sufficient to compare against the Abramowitz and Stegun Handbook.
-
-Instead we have chosen to use a two piece fitting function based on
-the Chebyshev polynomial for computing $E_1$. This agrees with the
-handbook values to almost the last published digit. See the {\tt e1.input}
-pamphlet for regression testing against the handbook tables.
-
-\subsection{E1:R$\rightarrow$OPR}
-The special function E1 below was originally derived from a function
-written by T.Haavie as the {\tt expint.c} function in the Numlibc library
-by Lars Erik Lund. Haavie approximates the E1 function by two 
-Chebyshev polynomials. For the range $-4 < x < 4$ the Chebyshev
-coefficients are:
-\begin{verbatim}
- 7.8737715392882774, -8.0314874286705335,  3.8797325768522250,
--1.6042971072992259,  0.5630905453891458, -0.1704423017433357,
- 0.0452099390015415, -0.0106538986439085,  0.0022562638123478,
--0.0004335700473221,  0.0000762166811878, -0.0000123417443064,
- 0.0000018519745698, -0.0000002588698662,  0.0000000338604319,
--0.0000000041611418,  0.0000000004821606, -0.0000000000528465,
- 0.0000000000054945, -0.0000000000005433,  0.0000000000000512,
--0.0000000000000046,  0.0000000000000004 
-\end{verbatim}
-and for the range $x > 4$ the Chebyshev coefficients are:
-\begin{verbatim}
- 0.2155283776715125,  0.1028106215227030, -0.0045526707131788,
- 0.0003571613122851, -0.0000379341616932,  0.0000049143944914,
--0.0000007355024922,  0.0000001230603606, -0.0000000225236907,
- 0.0000000044412375, -0.0000000009328509,  0.0000000002069297,
--0.0000000000481502,  0.0000000000116891, -0.0000000000029474,
- 0.0000000000007691, -0.0000000000002070,  0.0000000000000573,
--0.0000000000000163,  0.0000000000000047, -0.0000000000000014,
- 0.0000000000000004, -0.0000000000000001
-\end{verbatim}
-
-I've rewritten the polynomial to use precomputed coefficients
-that take into account the scaling used by Haavie. I've also
-rewritten the polynomial using Horner's method so the large
-powers of $x$ are only computed once.
-
-The result can be either a double float or, or if the argument
-is zero, infinity. Thus we need to extend the result to be a
-one-point completion to include infinity.
-
-<<package DFSFUN DoubleFloatSpecialFunctions>>=
-        E1(x:R):OPR ==
-         x = 0.0::R => infinity()
-         x > 4.0::R =>
-          t1:R:=0.14999948967737774608E-15::R
-          t2:R:=0.9999999999993112::R
-          ta:R:=(t1*x+t2)
-          t3:R:=0.99999999953685760001::R
-          tb:R:=(ta*x-t3)
-          t4:R:=1.9999998808293376::R
-          tc:R:=(tb*x+t4)
-          t5:R:=5.999983407661056::R
-          td:R:=(tc*x-t5)
-          t6:R:=23.9985380938481664::R
-          te:R:=(td*x+t6)
-          t7:R:=119.9108830382784512::R
-          tf:R:=(te*x-t7)
-          t8:R:=716.01351020920176641::R
-          tg:R:=(tf*x+t8)
-          t9:R:=4903.3466623370985473::R
-          th:R:=(tg*x-t9)
-          t10:R:=36601.25841454446674::R
-          ti:R:=(th*x+t10)
-          t11:R:=279913.28608482691646::R
-          tj:R:=(ti*x-t11)
-          t12:R:=2060518.7020296525186::R
-          tk:R:=(tj*x+t12)
-          t13:R:=13859772.093039815059::R
-          tl:R:=(tk*x-t13)
-          t14:R:=81945572.630072918857::R
-          tm:R:=(tl*x+t14)
-          t15:R:=413965714.82128317479::R
-          tn:R:=(tm*x-t15)
-          t16:R:=1747209536.2595547568::R
-          to:R:=(tn*x+t16)
-          t17:R:=6036182333.96179427::R
-          tp:R:=(to*x-t17)
-          t18:R:=16693683576.106267572::R
-          tq:R:=(tp*x+t18)
-          t19:R:=35938625644.58286097::R
-          tr:R:=(tq*x-t19)
-          t20:R:=57888657293.609258888::R
-          ts:R:=(tr*x+t20)
-          t21:R:=65523779423.11290127::R
-          tt:R:=(ts*x-t21)
-          t22:R:=46422751473.201760309::R
-          tu:R:=(tt*x+t22)
-          t23:R:=15474250491.067253436::R
-          tv:R:=(tu*x-t23)
-          tw:R:=(-1.0::R*x)
-          tx:R:=exp(tw)
-          ty:R:=tv*tx
-          tz:R:=x**22
-          taz:R:=ty/tz
-          taz::OPR
-         x > -4.0::R => 
-          a1:R:=0.476837158203125E-22::R
-          a2:R:=0.10967254638671875E-20::R
-          aa:R:=(-a1*x+a2)
-          a3:R:=0.20217895507812500001E-19::R
-          ab:R:=(aa*x-a3)
-          a4:R:=0.42600631713867187501E-18::R
-          ac:R:=(ab*x+a4)
-          a5:R:=0.868625640869140625E-17::R
-          ad:R:=(ac*x-a5)
-          a6:R:=0.16553192138671875E-15::R
-          ae:R:=(ad*x+a6)
-          a7:R:=0.29870208740234375E-14::R
-          af:R:=(ae*x-a7)
-          a8:R:=0.5097890777587890625E-13::R
-          ag:R:=(af*x+a8)
-          a9:R:=0.81934069213867187499E-12::R
-          ah:R:=(ag*x-a9)
-          a10:R:=0.1235313123779296875E-10::R
-          ai:R:=(ah*x+a10)
-          a11:R:=0.1739729620849609375E-9::R
-          aj:R:=(ai*x-a11)
-          a12:R:=0.22774642697021484375E-8::R
-          ak:R:=(aj*x+a12)
-          a13:R:=0.275573192853515625E-7::R
-          al:R:=(ak*x-a13)
-          a14:R:=0.30619243635087890625E-6::R
-          am:R:=(al*x+a14)
-          a15:R:=0.000003100198412519140625::R
-          an:R:=(am*x-a15)
-          a16:R:=0.00002834467120045546875::R
-          ao:R:=(an*x+a16)
-          a17:R:=0.00023148148148176953125::R
-          ap:R:=(ao*x-a17)
-          a18:R:=0.0016666666666686609375::R
-          aq:R:=(ap*x+a18)
-          a19:R:=0.01041666666666646875::R
-          ar:R:=(aq*x-a19)
-          a20:R:=0.055555555555554168751::R
-          as:R:=(ar*x+a20)
-          a21:R:=0.2500000000000000375::R
-          at:R:=(as*x-a21)
-          a22:R:=1.000000000000000325::R
-          au:R:=(at*x+a22)
-          a23:R:=0.5772156649015328::R
-          av:R:=au*x-a23
-          aw:R:=- 1.0::R*log(abs(x)) + av
-          aw::OPR
-         error "E1: no approximation available"
-@
-\subsection{En:(PI,R)$\rightarrow$OPR}
-The $E_n$ function is computed using the recurrence relation:
-$$E_{n+1}(z)=\frac{1}{n}\left(e^{-z}-zE_n(z)\right)\ \ \ (n=1,2,3,\ldots)$$
-
-The base case of the recursion depends on E1 above.
-
-The formula is 5.1.14 in Abramowitz and Stegun, 1965, p229\cite{4}.
-<<package DFSFUN DoubleFloatSpecialFunctions>>=
-        En(n:PI,x:R):OPR == 
-          n=1 => E1(x) 
-          v:R:=retract(En((n-1)::PI,x))
-          w:R:=1/(n-1)*(exp(-x)-x*v)
-          w::OPR
-
-@
-\section{The Ei Function}
-This function is based on Kin L. Lee's work\cite{8}. See also \cite{21}.
-\subsection{Abstract}
-The exponential integral Ei(x) is evaluated via Chebyshev series
-expansion of its associated functions to achieve high relative
-accuracy throughout the entire real line. The Chebyshev coefficients
-for these functions are given to 30 significant digits. Clenshaw's\cite{20}
-method is modified to furnish an efficient procedure for the accurate
-solution of linear systems having near-triangular coefficient
-matrices.
-\subsection{Introduction}
-The evaulation of the exponential integral
-\begin{equation}
-Ei(x)=\int_{-\infty}^{X}{\frac{e^u}{u}}\ du=-E_1(-x), x \ne 0
-\end{equation}
-is usually based on the value of its associated functions, for
-example, $xe^{-x}Ei(x)$. High accuracy tabulations of integral (1) by
-means of Taylor series techniques are given by Harris \cite{9} and
-Miller and Hurst \cite{10}. The evaluation of $Ei(x)$ for
-$-4 \le x \le \infty$ by means of Chebyshev series is provided by
-Clenshaw \cite{11} to have the absolute accuracy of 20 decimal
-places. The evaluation of the same integral (1) by rational
-approximation of its associated functions is furnished by Cody and
-Thacher \cite{12,13} for $-\infty < x < \infty$, and has the relative
-accuracy of 17 significant figures.
-
-The approximation of Cody and Thacher from the point of view of
-efficient function evaluation are preferable to those of
-Clenshaw. However, the accuracy of the latter's procedure, unlike
-those of the former, is not limited by the accuracy or the
-availability of a master function, which is a means of explicitly
-evaluating the function in question.
-
-In this paper $Ei(x)$ (or equivalently $-E_1(-x)$) for the entire real
-line is evaluted via Chebyshev series expansion of its associated
-functions that are accurate to 30 significant figures by a
-modification of Clenshaw's procedure. To verify the accuracy of the
-several Chebyshev series, values of the associated functions were
-checked against those computed by Taylor series and those of Murnaghan
-and Wrench \cite{14} (see Remarks on Convergence and Accuracy).
-
-Although for most purposes fewer than 30 figures of accuracy are
-required, such high accuracy is desirable for the following
-reasons. In order to further reduce the number of arithmetical
-operations in the evaluation of a function, the Chebyshev series in
-question can either be converted into a rational function or
-rearranged into an ordinary polynomial. Since several figures may be
-lost in either of these procedures, it is necessary to provide the
-Chebyshev series with a sufficient number of figures to achieve the
-desired accuracy. Furthermore, general function approximation
-routines, such as those used for minimax rational function
-approximations, require the explicit evaluation of the function to be
-approximated. To take account of the errors commited by these
-routines, the function values must have an accuracy higher than the
-approximation to be determined. Consequently, high-precision results
-are useful as a master function for finding approximations for (or
-involving) $Ei(x)$ (e.g. \cite{12,13}) where prescribed accuracy is
-less than 30 figures.
-
-\subsection{Discussion}
-
-It is proposed here to provide for the evaluation of $Ei(x)$ by
-obtaining Chebyshev coefficients for the associated functions given by
-table 1.
-
-\noindent
-{\bf Table 1}: Associated Functions of $Ei(x)$ and their ranges of Chebyshev
-Series Expansions
-
-\begin{tabular}{clc}
-& Associated function & Range of expansion\\
-Ei1 & $xe^{-x}Ei(x)$ & $-\infty < x \le -10$\\
-Ei2 & $xe^{-x}Ei(x)$ & $-10 \le x \le -4$\\
-Ei3 & $\frac{Ei(x)-log\vert x\vert - \gamma}{x}$ & $-4 \le x \le d42$\\
-Ei4 & $xe^{-x}Ei(x)$ & $4 \le x \le 12$\\
-Ei5 & $xe^{-x}Ei(x)$ & $12 \le x \le 32$\\
-Ei6 & $xe^{-x}Ei(x)$ & $32 \le x < \infty$\\
-\end{tabular}\\
-\hbox{\hskip 2cm}($\gamma$ = 0.5772156649... is Euler's constant.)
-
-<<package DFSFUN DoubleFloatSpecialFunctions>>=
-
-        Ei(y:OPR):OPR ==
-          infinite? y => 1
-          x:R:=retract(y)
-          x < -10.0::R => 
-            ei:R:=retract(Ei1(y))
-            (ei/(x*exp(-x)))::OPR
-          x <  -4.0::R =>
-            ei:R:=retract(Ei2(y))
-            (ei/(x*exp(-x)))::OPR
-          x <   4.0::R => 
-            ei3:R:=retract(Ei3(y))
-            gamma:R:=0.577215664901532860606512090082::R
-            (ei3*x+log(abs(x))+gamma)::OPR
-          x <  12.0::R => 
-            ei:R:=retract(Ei4(y))
-            (ei/(x*exp(-x)))::OPR
-          x <  32.0::R => 
-            ei:R:=retract(Ei5(y))
-            (ei/(x*exp(-x)))::OPR
-          ei:R:=retract(Ei6(y))
-          (ei/(x*exp(-x)))::OPR
-
-@
-Note that the functions $[Ei(x)-log\vert x\vert - \gamma]/x$ and
-$xe^{-x}Ei(x)$ have the limiting values of unity at the origin and at
-infinity, respectively, and that the range of the associated function
-values is close to unity (see table 4). This makes for the evaluation
-of the associated functions over the indicated ranges in table 1 (and
-thus $Ei(x)$ over the entire real line) with high relative accuracy by
-means of the Chebyshev series. The reason for this will become
-apparent later.
-
-Some remarks about the choice of the intervals of expansion for the
-serveral Chebyshev series are in order here. The partition of the real
-line indicated by table 1 is chosen to allow for the approximation of
-the associated functions with a maximum error of $0.5\times 10^{-30}$
-by polynomials of degress $< 50$. The real line has also been
-partitioned with the objective of providing the interval about zero
-with the lowest degree of polynomial approximation of the six
-intervals. This should compensate for the computation of 
-$log\vert x\vert$ required in the evaluation of $Ei(x)$ over that
-interval. The ranges $-\infty < x \le -4$ and $4 \le x < \infty$ are
-partitioned into 2 and 3 intervals, respectively, to provide
-approximations to $xe^{-x}Ei(x)$ by polynomials of about the same
-degree. 
-
-\subsection{Expansions in Chebyshev Series}
-
-Let $\phi(t)$ be a differentiable function defined on [-1,1]. To
-facilitate discussion, denote its Chebyshev series and that of its
-derivative by 
-\begin{equation}
-\phi(t)=\sum_{k=0}^{\infty}\ ^{'}{A_k^{(0)}T_k(t)}\quad
-\phi^{'}(t)=\sum_{k=0}^{\infty}\ ^{'}{A_k^{(1)}T_k(t)}
-\end{equation}
-where $T_k(t)$ are Chebyshev polynomials defined by
-\begin{equation}
-T_k(t)=cos(k\ \arccos\ t),\quad -1 \le t \le 1
-\end{equation}
-(A prime over a summation sign indicates that the first term is to be
-halved.) 
-
-If $\phi(t)$ and $\phi^{'}(t)$ are continuous, the Chebyshev
-coefficients $A_k^{(0)}$ and $A_k^{(1)}$ can be obtained analytically
-(if possible) or by numerical quadrature. However, since each function
-in table 1 satisfies a linear differential equation with polynomial
-coefficients, the Chebyshev coefficients can be more readily evaluated
-by the method of Clenshaw \cite{16}.
-
-There are several variations of Clenshaw's procedure (see,
-e.g. \cite{17}), but for high-precision computation, where multiple
-precision arithmetic is employed, we find his original procedure
-easiest to implement. However, straightforward application of it may
-result in a loss of accuracy if the trial solutions selected are not
-sufficiently independent. How the difficulty is overcome will be
-pointed out subsequently.
-
-\subsection{The function $xe^{-x}Ei(x)$ on the Finite Interval}
-
-We consider first the Chebyshev series expansion of
-\begin{equation}
-f(x)=xe^{-x}Ei(x),\quad (a \le x \le b)
-\end{equation}
-with $x\ne 0$. One can easily verify that after the change of
-variables
-\begin{equation}
-x=[(b-a)T + a + b]/2,\quad(-1 \le t \le 1)
-\end{equation}
-the function
-\begin{equation}
-\phi(t)=f\left[\frac{(b-a)t + a + b}{2}\right]=f(x)
-\end{equation}
-satisfies the differential equation
-\begin{equation}
-2(pt+q)\phi^{'}(t)+p(pt+q-2)\phi(t)=p(pt+q)
-\end{equation}
-with\footnote{The value of $Ei(a)$ may be evaluated by means of the
-Taylor series. In this report $Ei(a)$ is computed by first finding the
-Chebyshev series approximation to $[Ei(x)-log\vert x\vert-\gamma]/x$
-to get $Ei(a)$. The quantities $e^a$ and $\log\vert a\vert$ for
-integral values of $a$ may be found in existing tables}
-\begin{equation}
-\phi(-1)=ae^{-a}Ei(a)
-\end{equation}
-where $p=b-a$ and $q=b+a$. Replacing $\phi(t)$ and $\phi^{'}(t)$ in
-equations 7 by their Chebyshev series, we obtain
-\begin{equation}
-\sum_{k=0}^{\infty}\ ^{'}{(-1)^kA_k^{(0)}}=\phi(-1)
-\end{equation}
-\begin{equation}
-2\sum_{k=0}^{\infty}\ {'}{A_k^{(1)}(pt+q)T_k(t)}+
-p\sum_{k=0}^{\infty}\ {'}{A_k^{(0)}(pt+q-2)T_k(t)}=
-p(pt+q)
-\end{equation}
-It can be demonstrated that if $B_k$ are the Chebyshev coefficients of
-a function $\Psi(t)$, then $C_k$, the Chebyshev coefficients of
-$t^r\Psi(t)$ for positive integers r, are given by \cite{16}
-\begin{equation}
-C_k=2^{-r}\sum_{i=0}^r\binom{r}{i}B_{\vert k-r+2i\vert}
-\end{equation}
-Consequently, the left member of equation 15 can be rearranged into a
-single series involving $T_k(t)$. The comparison of the coefficients
-of $T_k(t)$ that yields the infinite system of equations
-\begin{equation}
-\left.
-\begin{array}{c}
-\displaystyle\sum_{k=0}^{\infty}\ ^{'}{(-1)^kA_k^{(0)}} = \phi(-1)\\
-\\
-2pA_{\vert k-1\vert}^{(1)}+
-4qA_k^{(1)}+
-2pA_{k+1}^{(1)}+
-p^2A_{\vert k-1\vert}^{(0)}+
-2p(q-2)A_k^{(0)}+
-p^2A_{k+1}^{(0)}\\
-\\
-=\left\{
-\begin{array}{rcl}
-4pq & , & k=0\\
-2p^2 & , & k=1\\
-0 & , & k=2,3,\ldots
-\end{array}
-\right.
-\end{array}
-\right\}
-\end{equation}
-The relation \cite{16}
-\begin{equation}
-2kA_k^{(0)}=A_{k-1}^{(1)}-A_{k+1}^{(1)}
-\end{equation}
-can be used to reduce equation 18 to a system of equations involving
-only $A_k^{(0)}$. Thus, replacing $k$ of equations 18 by $k+2$ and
-subtracting the resulting equation from equations 18, we have, by
-means of equation 19, the system of equations
-\begin{equation}
-\left.
-\begin{array}{c}
-\displaystyle\sum_{k=0}^{\infty}\ ^{'}{(-1)^kA_k^{(0)}} = \phi(-1)\\
-\\
-2p(q-2)A_0+(8q+p^2)A_1+2p(6-q)A_2-p^2A_3=4pq\\
-\\
-p^2A_{k-1}+2p(2k+q-2)A_k+8q(k+1)A_{k+1}+2p(2k-q+6)A_{k+2}-p^2A_{k+3}\\
-\\
-=\left\{
-\begin{array}{rcl}
-2p^2 & , & k=1\\
-0 & , & k=2,3,\ldots
-\end{array}
-\right.
-\end{array}
-\right\}
-\end{equation}
-The superscript of $A_k^{(0)}$ is dropped for simplicity. In order to
-solve the infinite system 20, Clenshaw \cite{11} essentially
-considered the required solution as the limiting solution of the
-sequence of truncated systems consisting of the first $M+1$ equations
-of the same system, that is, the solution of the system
-\begin{equation}
-\sum_{k=0}^M\ ^{'}{(-1)^kA_k}=\phi(-1)
-\end{equation}
-\begin{equation}
-2p(q-2)A_0+(8q+p^2)A_1+2p(q-6)A_2-p^2A_3=4pq
-\end{equation}
-\begin{equation}
-\left.
-\begin{array}{c}
-p^2A_{k-1}+2p(2k+q-2)A_k+8q(k+1)A_{k+1}+2p(2k-q+6)A_{k+2}-p^2A_{k+3}\\
-\\
-=\left\{
-\begin{array}{rcl}
-2p^2 & , & k=1\\
-0 & , & k=2,3,\ldots,M-3
-\end{array}
-\right.\\
-\\
-p^2A_{M-3}+2p(2M+q-6)A_{M-2}+8q(M-1)A_{M-1}+2p(2M+4-q)A_M=0\\
-\\
-p^2A_{M-2}+2p(2M+q-4)A_{M-1}+8qMA_M=0
-\end{array}
-\right\}
-\end{equation}
-where $A_k$ is assumed to vanish for $K \ge M+1$. To solve system
-(21,22,23) consider first the subsystem 23 consisting of $M-2$
-equations in $M$ unknowns. Here use is made of the fact that the
-subsystem 23 is satisfied by
-\begin{equation}
-A_k=c_1\alpha_k+c_2\beta_k+\gamma_k\quad(k=0,1,2,\ldots)
-\end{equation}
-for arbitrary constants $c_1$ and $c_2$, where $\gamma_k$ is a
-particular solution of 23 and where $\alpha_k$ and $\beta_k$ are two
-independent solutions of the homogeneous equations (23 with $2p^2$
-deleted) of the same subsystem. Hence, if $\alpha_k$, $\beta_k$, and
-$\gamma_k$ are available, the solution of system (21,22,23) reduces to
-the determinant of $c_1$ and $c_2$ from equations 21 and 22.
-
-To solve equations (21,22,23), we note that
-\begin{equation}
-\gamma_0=2,\quad \gamma_k=0,\quad {\textrm for\ }k=1(1)M
-\end{equation}
-is obviously a particular solution of equation 23. The two independent
-solutions $\gamma_k$ and $\beta_k$ of the homogeneous equations of the
-same subsystem can be generated in turn by backward recurrence if we
-set
-\begin{equation}
-\left.
-\begin{array}{l}
-\hbox{\hskip 4cm}\alpha_{M-1}=0,\quad\alpha_M=1\\
-\textrm{and}\\
-\hbox{\hskip 4cm}\beta_{M-1}=1,\quad\beta_M=0\\
-\end{array}
-\right\}
-\end{equation}
-or choose any $\alpha{M-1}$, $\alpha_M$, and $\beta_{M-1}$, $\beta_M$
-for which $\alpha_{M-1}\beta_M-\alpha_M\beta_{M-1}\ne 0$. The
-arbitrary constants $c_1$ and $c_2$ are determined, and consequently
-the solution of equations (21,22,23) if equation 24 is substituted
-into equation 21 and 22 and the resulting equations
-\begin{equation}
-c_1R(\alpha)+c_2R(\beta)=\phi(-1)-1
-\end{equation}
-\begin{equation}
-c_1S(\alpha)+c_2S(\beta)=8p
-\end{equation}
-are solved as two equations in two unknowns. The terms $R(\alpha)$ and
-$S(\alpha)$ are equal, respectively, to the left members of equations
-21 and 22 corresponding to solution $\alpha_k$. (The identical
-designation holds for $R(\beta)$ and $S(\beta)$.)
-
-The quantities $\alpha_k$ and $\beta_k$ are known as trial solutions
-in reference \cite{12}. Clenshaw has pointed out that if $\alpha_k$
-and $\beta_k$ are not sufficiently independent, loss of significance
-will occur in the formation of the linear combination 24, with
-consequent loss of accuracy. Clenshaw suggested the Gauss-Seidel
-iteration procedure to improve the accuracy of the solution. However,
-this requires the application of an additional computing procedure and
-may prove to be extremely slow. A simpler procedure which does not
-alter the basic computing scheme given above is proposed here. The
-loss of accuracy can effectively be regained if we first generate a
-third trial solution $\delta_k$ (k=0,1,$\ldots$,M), where
-$\delta_{M-1}$ and $\delta_M$ are equal to 
-$c_1\alpha_{M-1}+c_2\beta_{M-1}$ and 
-$c_1\alpha_M+c_2\beta_M$, respectively, and where $\delta_k$
-(k=M-2,M-3,$\ldots$,0) is determined using backward recurrence as
-before by means of equation 23. Then either $\alpha_k$ or $\beta_k$ is
-replaced by $\delta_k$ and a new set of $c_1$ and $c_2$ is determined
-by equations 27 and 28. Such a procedure can be repeated until the
-required accuracy is reached. However, only one application of it was
-necessary in the computation of the coefficients of this report.
-
-As an example, consider the case for $4 \le x \le 12$ with $M=15$. The
-right member of equation 27 and of equation 28 assume, respectively,
-the values of $0.43820800$ and $64$. The trial solutions $\alpha_k$
-and $\beta_k$ generated with $\alpha_{14}=8$, $\alpha_{15}=9$ and
-$\beta_{14}=7$, $\beta_{15}=8$ are certainly independent, since 
-$\alpha_{14}\beta_{15}-\alpha_{15}\beta_{14}=1\ne 0$. A check of table
-2 shows that equations 27 and 28 have, respectively, the residuals of 
-$-0.137\times 10^-4$ and $-0.976\times 10^{-3}$. The same table also
-shows that $c_1\alpha_k$ is opposite in sign but nearly equal in
-magnitude to $c_2\beta_k$. Cancellations in the formation of the
-linear combination 24 causes a loss of significance of 2 to 6 figures
-in the computed $A_k$. In the second iteration, where a new set of
-$\beta_k$ is generated replacing $\beta_{14}$ and $\beta_{15}$,
-respectively, by $c_1\alpha_{14}+c_2\beta_{14}$ and 
-$c_1\alpha_{15}+c_2\beta_{15}$ of the first iteration, the new 
-$c_1\alpha_k$ and $c_2\beta_k$ differed from 2 to 5 orders of
-magnitude. Consequently, no cancellation of significant figures in the
-computation of $A_k$ occurred. Notice that equations 27 and 28 are now
-satisfied exactly. Further note that the new $c_1$ and $c_2$ are near
-zero and unity, respectively, for the reason that if equations 21, 22,
-and 23 are satisfied by equation 24 exactly in the first iteration,
-the new $c_1$ and $c_2$ should have the precise values zero and 1,
-respectively. The results of the third iteration show that the $A_k$
-of the second iteration are already accurate to eight decimal places,
-since the $A_k$ in the two iterations differ in less that 
-$0.5\times 10^{-8}$. Notice that for the third iteration, equations
-27 and 28 are also satisfied exactly and that $c_1=1$ and $c_2=0$
-(relative to 8 places of accuracy).
-
-\noindent
-{\bf Table 2}: Computation of Chebyshev Coefficients for $xe^{-x}Ei(x)$
-
-\hrule
-First iteration: $\alpha_{14}=8$, $\alpha_{15}=9$; $\beta_{14}=7$, 
-$\beta_{15}=8$
-\hrule
-\begin{tabular}{|r|r|r|r|}
-k & $c_1\alpha_k\hbox{\hskip 1cm}$ & $c_2\beta_k\hbox{\hskip 1cm}$ & 
-$A_k\hbox{\hskip 1cm}$\\
-&&&\\
- 0 &  0.71690285E 03 & -0.71644773E 03 &  0.24551200E 01\\
- 1 & -0.33302683E 03 &  0.33286440E 03 & -0.16243000E 00\\
- 2 &  0.13469341E 03 & -0.13464845E 03 &  0.44960000E-01\\
- 3 & -0.43211869E 02 &  0.43205127E 02 & -0.67420000E-02\\
- 4 &  0.99929173E 01 & -0.99942238E 01 & -0.13065000E-02\\
- 5 & -0.11670764E 01 &  0.11684574E 01 &  0.13810000E-02\\
- 6 & -0.25552137E 00 &  0.25493635E 00 & -0.58502000E-02\\
- 7 &  0.20617247E 00 & -0.20599754E 00 &  0.17493000E-03\\
- 8 & -0.75797238E-01 &  0.75756767E-01 & -0.40471000E-04\\
- 9 &  0.20550680E-01 & -0.20543463E-01 &  0.72170000E-05\\
-10 & -0.45192333E-02 &  0.45183721E-02 & -0.86120000E-06\\
-11 &  0.82656562E-03 & -0.82656589E-03 & -0.27000000E-09\\
-12 & -0.12333571E-03 &  0.12337366E-03 &  0.37950000E-07\\
-13 &  0.13300910E-04 & -0.13315328E-04 & -0.14418000E-07\\
-14 & -0.29699001E-06 &  0.30091136E-06 &  0.39213500E-08\\
-15 & -0.33941716E-06 &  0.33852528E-06 & -0.89188000E-09\\
-\end{tabular}\\
-\hbox{\hskip 3.0cm}$c_1=0.37613920E-07$\\
-\hbox{\hskip 3.0cm}$c_2=-0.42427144E-07$\\
-\hbox{\hskip 1.0cm}$c_1R(\alpha)+c_2R(\beta)-0.43820800E\ 00=-0.13700000E-04$\\
-\hbox{\hskip 1.0cm}$c_1S(\alpha)+c_2S(\beta)-0.64000000E\ 00=-0.97600000E-03$
-
-\hrule
-Second iteration: $\alpha_{14}=8$, $\alpha_{15}=9$; \\
-$\beta_{14}=0.39213500E-08$, $\beta_{15}=-0.89188000E-09$
-\hrule
-\begin{tabular}{|r|r|r|r|}
-k & $c_1\alpha_k\hbox{\hskip 1cm}$ & $c_2\beta_k\hbox{\hskip 1cm}$ & 
-$A_k\hbox{\hskip 1cm}$\\
-&&&\\
- 0 &  0.36701576E-05 &  0.45512986E 00 &  0.24551335E 01\\
- 1 & -0.17051695E-05 & -0.16243666E 00 & -0.16243837E 00\\
- 2 &  0.68976566E-06 &  0.44956834E-01 &  0.44957523E-01\\
- 3 & -0.22132756E-06 & -0.67413538E-02 & -0.67415751E-02\\
- 4 &  0.51197561E-07 & -0.13067496E-02 & -0.13066984E-02\\
- 5 & -0.59856744E-08 &  0.13810895E-02 &  0.13810835E-02\\
- 6 & -0.13059663E-08 & -0.58502164E-03 & -0.58502294E-03\\
- 7 &  0.10552667E-08 &  0.17492889E-03 &  0.17492994E-03\\
- 8 & -0.38808033E-09 & -0.40472426E-04 & -0.40472814E-04\\
- 9 &  0.10523831E-09 &  0.72169965E-05 &  0.72171017E-05\\
-10 & -0.23146333E-10 & -0.86125438E-06 & -0.86127752E-06\\
-11 &  0.42342615E-11 & -0.25542252E-09 & -0.25118825E-09\\
-12 & -0.63200810E-12 &  0.37946968E-07 &  0.37946336E-07\\
-13 &  0.68210630E-13 & -0.14417584E-07 & -0.14417516E-07\\
-14 & -0.15414832E-14 &  0.39212981E-08 &  0.39212965E-08\\
-15 & -0.17341686E-14 & -0.89186818E-09 & -0.89186991E-09\\
-\end{tabular}\\
-\hbox{\hskip 3.0cm}$c_1=-0.19268540E-15$\\
-\hbox{\hskip 3.0cm}$c_2=0.99998675E\ 00$\\
-\hbox{\hskip 1.0cm}$c_1R(\alpha)+c_2R(\beta)-0.43820800E\ 00=0.0$\\
-\hbox{\hskip 1.0cm}$c_1S(\alpha)+c_2S(\beta)-0.64000000E\ 00=0.0$
-
-\noindent
-{\bf Table 2}: Computation of Chebyshev Coefficients for
-$xe^{-x}Ei(x)$ - Concluded\\
-\hbox{\hskip 0.5cm}$[4 \le x \le 12 with M=15; \gamma_0=2, \gamma_k=0
-\textrm{for\ }k=1(1)15]$
-
-\hrule
-Third iteration: $\alpha_{14}=8$, $\alpha_{15}=9$;\\ 
-\hbox{\hskip 0.5cm}$\beta_{14}=0.39212965E-08$, $\beta_{15}=-0.89186991E-09$
-\hrule
-\begin{tabular}{|r|r|r|r|}
-k & $c_1\alpha_k\hbox{\hskip 1cm}$ & $c_2\beta_k\hbox{\hskip 1cm}$ & 
-$A_k\hbox{\hskip 1cm}$\\
-&&&\\
- 0 & -0.23083059E-07 &  0.45513355E 00 &  0.24551335E 01\\
- 1 &  0.10724479E-07 & -0.16243838E 00 & -0.16243837E 00\\
- 2 & -0.43382065E-08 &  0.44957526E-01 &  0.44957522E-01\\
- 3 &  0.13920157E-08 & -0.67415759E-02 & -0.67415745E-02\\
- 4 & -0.32200152E-09 & -0.13066983E-02 & -0.13066986E-02\\
- 5 &  0.37646251E-10 &  0.13810835E-02 &  0.13810836E-02\\
- 6 &  0.82137336E-11 & -0.58502297E-03 & -0.58502296E-03\\
- 7 & -0.66369857E-11 &  0.17492995E-03 &  0.17492994E-03\\
- 8 &  0.24407892E-11 & -0.40472817E-04 & -0.40472814E-04\\
- 9 & -0.66188494E-12 &  0.72171023E-05 &  0.72171017E-05\\
-10 &  0.14557636E-12 & -0.86127766E-06 & -0.86127751E-06\\
-11 & -0.26630930E-13 & -0.25116620E-09 & -0.25119283E-09\\
-12 &  0.39749465E-14 &  0.37946334E-07 &  0.37946337E-07\\
-13 & -0.42900337E-15 & -0.14417516E-07 & -0.14417516E-07\\
-14 &  0.96949915E-17 &  0.39212966E-08 &  0.39212966E-08\\
-15 &  0.10906865E-16 & -0.89186992E-09 & -0.89186990E-09\\
-\end{tabular}\\
-\hbox{\hskip 3.0cm}$c_1=0.12118739E-17$\\
-\hbox{\hskip 3.0cm}$c_2=0.10000000E\ 01$\\
-\hbox{\hskip 1.0cm}$c_1R(\alpha)+c_2R(\beta)-0.43820800E\ 00=0.0$\\
-\hbox{\hskip 1.0cm}$c_1S(\alpha)+c_2S(\beta)-0.64000000E\ 00=0.0$\\
-\hrule
-
-It is worth noting that the coefficient matrix of system (21,22,23)
-yields an upper triangular matrix of order $M-1$ after the deletion of
-the first two rows and the last two columns. Consequently, the
-procedure of this section is applicable to any linear system having
-this property. As a matter of fact, the same procedure can be
-generalized to solve linear systems having coefficient matrices of
-order N, the deletion of whose first $r$ ($r < N$) rows and last $r$
-columns yields upper triangular matrices of order $N-r$.
-
-\subsection{The Function $(1/x)[Ei(x)-log\vert x\vert-\gamma]$}
-
-Let
-\begin{equation}
-f(x)=(1/x)[Ei(x)-log\vert x\vert-\gamma],\quad g(x)=e^x,\quad
-\vert x\vert \le b
-\end{equation}
-These functions, with the change of variable $x=bt$, simultaneously
-satisfy the differential equations
-\begin{equation}
-bt^2\phi^{'}(t)+bt\phi(t)-\psi(t)=-1
-\end{equation}
-\begin{equation}
-\psi^{'}(t)-b\psi(t)=0,\quad -1 \le t \le 1
-\end{equation}
-Conversely,\footnote{The general solution of the differential
-equations has the form
-$$
-\phi(t)=(c_1/t)+[Ei(bt)-log\vert bt\vert-\gamma]/bt
-$$
-$$
-\psi(t)=c_2e^{bt}
-$$
-where the first and second terms of $\phi(t)$ are, respectively, the
-complementary solution and a particular integral of equation 30. The
-requirement that $\phi(t)$ is bounded makes the constant $c_1=0$. The
-fact that $\psi(0)=1$ is implicit in equation 30.} any solution of
-equations 30 and 31 is equal to the functions given by equations 29
-for the change of variable $x=bt$. Therefore, boundary conditions need
-not be imposed for the solution of the differential equations.
-
-A procedure similar to that of the previous section gives the coupled
-infinite recurrence relations
-\begin{equation}
-bA_1+bA_3-B_0+B_2=-2
-\end{equation}
-\begin{equation}
-\left.
-\begin{array}{c}
-kbA_{k-1}+2(k+1)bA_{k+1}+(k+2)bA_{k+3}-2B_k+2B_{k+2}=0\\
-\\
-bB_{k-1}-2kB_k-bB_{k+1}=0,\quad k=1,2,\ldots
-\end{array}
-\right\}
-\end{equation}
-where $A_k$ and $B_k$ are the Chebyshev coefficients of $\phi(t)$ and
-$\psi(t)$, respectively.
-
-Consider first the subsystem 33. If $A_k=\alpha_k$ and $B_k=\beta_k$
-are a simultaneous solution of the system, which is homogeneous, then
-\begin{equation}
-\left.
-\begin{array}{l}
-\hbox{\hskip 4cm}A_k=c\alpha_k\\
-\textrm{and}\\
-\hbox{\hskip 4cm}B_k=c\beta_k\\
-\end{array}
-\right\}
-\end{equation}
-are also a solution for an arbitrary constant $c$. Thus based on
-considerations analogous to the solution of equations 21, 22, and 23,
-one can initiate an approximate solution of equations 32 and 33 by
-setting 
-\begin{equation}
-\left.
-\begin{array}{l}
-\alpha_M=0,\quad\alpha_k=0\quad\textrm{for }k \ge M+1\\
-\\
-\beta_M=1,\quad\beta_k=0\quad\textrm{for }k \ge M+1
-\end{array}
-\right\}
-\end{equation}
-and then determining $\alpha_k$ and $\beta_k$ ($k=M-1, M-2, \ldots,
-0$) by backward recurrence by means of equation 33. The arbitrary
-constant $c$ is determined by substituting 34 into 32.
-
-\subsection{The Function $xe^{-x}Ei(x)$ on the Infinite Interval}
-Let
-\begin{equation}
-f(x)=xe^{-x}Ei(x),\quad -\infty < x \le b < 0,\quad or 0 < b \le x < \infty
-\end{equation}
-By making the change of variables,
-\begin{equation}
-x=2b/(t+1)
-\end{equation}
-we can easily demonstrate that
-\begin{equation}
-f(x)=f[2b/(t+1)]=\phi(t)
-\end{equation}
-satisfies the differential equation
-\begin{equation}
-(t+1)^2\phi^{'}(t)+(t+1-2b)\phi(t)=-2b
-\end{equation}
-with
-\begin{equation}
-\phi(1)=be^{-b}Ei(b)
-\end{equation}
-An infinite system of equations involving the Chebyshev coefficients
-$A_k$ of $\phi(t)$ is deducible from equations 39 and 40 by the same
-procedure as applied to equations 13 and 14 to obtain the infinite
-system 20; it is given as follows.
-\begin{equation}
-\sum_{k=0}^\infty\ ^{'}A_k=\phi(1)=be^{-b}Ei(b)
-\end{equation}
-\begin{equation}
-(1-2b)A_0+3A_1+(3+2b)A_2+A_3=-4b
-\end{equation}
-\begin{equation}
-\begin{array}{l}
-kA_{k-1}+2[(2k+1)-2b]A_k+6(k+1)A_{k+1}+2(2k+3+2b)A_{k+2}\\
-\hbox{\hskip 4.0cm}+(k+2)A_{k+3}=0,\quad k=1,2,\ldots
-\end{array}
-\end{equation}
-As in the case of equations 21, 22 and 23, the solution of 41, 42 and
-43 can be assumed to be
-\begin{equation}
-A_k=c_1\alpha_k+c_2\beta_k
-\end{equation}
-with $A_k$ vanishing for a $k \ge M$. Thus, we can set, say
-\begin{equation}
-\left.
-\begin{array}{ccc}
-\alpha_{M-1}=0 & , & \alpha_M=1\\
-\beta_{M-1}=1  & , & \beta_M=0
-\end{array}
-\right\}
-\end{equation}
-and determine the trial solutions $\alpha_k$ and $\beta_k$ 
-(k=M-1,M-2,$\ldots$,0) by means of equation 43 by backward
-recurrence. The required solution of equations 41,42,adn 43 is then
-determined by substituting equation 44 in equations 41 and 42 and
-solving the resulting equations for $c_1$ and $c_2$.
-
-Loss of accuracy in the computation of $A_k$ can also occur here, as
-in the solution of equations 21, 22 and 23, if the trial solutions are
-not sufficiently independent. The process used to improve the accuracy
-of $A_k$ of the system 21, 22 and 23 can also be applied here.
-
-For efficiency in computation, it is worth noting that for $b < 0$
-($-\infty < x \le b < 0$) the boundary condition 40 is not required
-for the solution of equation 39 and 40. This follows from the fact
-that any solution\footnote{The general solution of the differential
-equation 39. Since equation 39 has no bounded complementary solution
-for $-\infty < x \le b < 0$, every solution of it is equal to the
-particular integral $xe^{-x}Ei(x)$. On the other hand, a solution of
-equation 39 for $0 < x \le b < \infty$ would, in general, involve the
-complementary function. Hence, boundary condition 40 is required to
-guarantee that the solution of equation 39 is equal to
-$xe^{-x}Ei(x)$.} of the differential equation 39 is equal to 
-$xe^{-x}Ei(x)$ ($x=2b/(t+1)$). Hence the $A_k$ of $xe^{-x}Ei(x)$ for 
-$-\infty < x \le b < 0$ can be obtained without the use of equation
-39 and can be assumed to have the form
-\begin{equation}
-A_k = c\alpha_k,\quad(k=0,1,\ldots,M)
-\end{equation}
-The M+1 values of $\alpha_k$ can be generated by setting $\alpha_M=1$
-and computing $\alpha_k$ (k=0,1,$\ldots$,M-1) by means of equation
-43 by backward recurrence. The substitution of equation 46 into 42
-then enables one to determine $c$ from the resulting equation.
-
-\subsection{Remarks on Convergence and Accuracy}
-
-The Chebyshev coefficients of table 3 were computed on the IBM 7094
-with 50-digit normalized floating-point arithmetic. In order to assure
-that the sequence of approximate solutions (see Discusion) converged
-to the limiting solution of the differential equation in question, a
-trial M was incremented by 4 until the approximate Chebyshev
-coefficients showed no change greter than or equal to 
-$0.5\times 10^{-35}$. Hence the maximum error is bounded by
-\begin{equation}
-0.5(M+1)\times 10^{-35}+\sum_{M+1}^\infty{\vert A_k\vert}
-\end{equation}
-where the first term is the maximum error of the M+1 approximate
-Chebyshev coefficients, and the sum is the maximum error of the
-truncated Chebyshev series of M+1 terms. If the Chebyshev series is
-rapidly convergent, the maximum error of the approximate Chebyshev
-series should be of the order of $10^{-30}$. The coefficients of table
-3 have been rounded to 30 digits, and higher terms for $k > N$ giving
-the maximum residual
-\begin{equation}
-\sum_{k=N+1}^M{\vert A_k\vert} < 0.5\times 10^{-30}
-\end{equation}
-have been dropped. This should allow for evaluation of the relevant
-function that is accurate to 30 decimal places. Since the range of
-values of each function is bounded between 2/5 and 5, the evaluated
-function should be good to 30 significant digits. Taylor series
-evaluation also checks with that of the function values of table 4
-(computed with 30-digit floating-point arithmetic using the
-coefficients of table 3) for at least 28-1/2 significant
-digits. Evaluation of Ei(x) using the coefficients of table 3 also
-checked with Murnaghan and Wrench \cite{14} for 28-1/2 significant
-figures. 
-
-{\vbox{\vskip 1cm}}
-
-{\bf Table 3: Chebyshev Coefficients}
-(a)
-$$
-xe^{-x}Ei(x)=\sum_{k-0}^{40}\ {'}{A_kT_k(t)},\ \ t=(-20/x)-1,\ \ 
-(-\infty < x \le -10)
-$$
-\begin{tabular}{|r|r|}
-k & $A_k$\hbox{\hskip 3cm}\\
-&\\
- 0 &  0.1912173225 8605534539 1519326510E 01\\
- 1 & -0.4208355052 8684843755 0974986680E-01\\
- 2 &  0.1722819627 2843267833 7118157835E-02\\
- 3 & -0.9915782173 4445636455 9842322973E-04\\
- 4 &  0.7176093168 0227750526 5590665592E-05\\
- 5 & -0.6152733145 0951269682 7956791331E-06\\
- 6 &  0.6024857106 5627583129 3999701610E-07\\
- 7 & -0.6573848845 2883048229 5894189637E-08\\
- 8 &  0.7853167541 8323998199 4810079871E-09\\
- 9 & -0.1013730288 0038789855 4202774257E-09\\
-10 &  0.1399770413 2267686027 7823488623E-10\\
-11 & -0.2051008376 7838189961 8962318711E-11\\
-12 &  0.3168388726 0024778181 4907985818E-12\\
-13 & -0.5132760082 8391806541 5984751899E-13\\
-14 &  0.8680933040 7665493418 7433687383E-14\\
-15 & -0.1527015040 9030849719 8572355351E-14\\
-16 &  0.2784686251 6493573965 0105251453E-15\\
-17 & -0.5249890437 4217669680 8472933696E-16\\
-18 &  0.1020717991 2485612924 7455787226E-16\\
-\end{tabular}
-\begin{tabular}{|r|r|}
-19 & -0.2042264679 8997184130 8462421876E-17\\
-20 &  0.4197064172 7264847440 8827228562E-18\\
-21 & -0.8844508176 1728105081 6483737536E-19\\
-22 &  0.1908272629 5947174199 5060168262E-19\\
-23 & -0.4209746222 9351995033 6450865676E-20\\
-24 &  0.9483904058 1983732764 1500214512E-21\\
-25 & -0.2179467860 1366743199 4032574014E-21\\
-26 &  0.5103936869 0714509499 3452562741E-22\\
-27 & -0.1216883113 3344150908 9746779693E-22\\
-28 &  0.2951289166 4478751929 4773757144E-23\\
-29 & -0.7275353763 7728468971 4438950920E-24\\
-30 &  0.1821639048 6230739612 1667115976E-24\\
-31 & -0.4629629963 1633171661 2753482064E-25\\
-32 &  0.1193539790 9715779152 3052371292E-25\\
-33 & -0.3119493285 2201424493 1062147473E-26\\
-34 &  0.8261419734 5334664228 4170028518E-27\\
-35 & -0.2215803373 6609829830 2591177697E-27\\
-36 &  0.6016031671 6542638904 5303124429E-28\\
-37 & -0.1652725098 3821265964 9744302314E-28\\
-38 &  0.4592230358 7730270279 5636377166E-29\\
-39 & -0.1290062767 2132638473 7453212670E-29\\
-40 &  0.3662718481 0320025908 1177078922E-30\\
-\end{tabular}
-
-<<package DFSFUN DoubleFloatSpecialFunctions>>=
-
-        Ei1(y:OPR):OPR ==
-          infinite? y => 1
-          x:R:=retract(y)
-          t:R:=acos((-20.0::R/x)-1.0::R)::R
-          t01:=    0.191217322586055345391519326510E1::R*cos(0.0::R)/2.0::R
-          t02:=t01-0.420835505286848437550974986680E-01::R*cos(t::R)::R
-          t03:=t02+0.172281962728432678337118157835E-02::R*cos( 2.0::R*t)
-          t04:=t03-0.991578217344456364559842322973E-04::R*cos( 3.0::R*t)
-          t05:=t04+0.717609316802277505265590665592E-05::R*cos( 4.0::R*t)
-          t06:=t05-0.615273314509512696827956791331E-06::R*cos( 5.0::R*t)
-          t07:=t06+0.602485710656275831293999701610E-07::R*cos( 6.0::R*t)
-          t08:=t07-0.657384884528830482295894189637E-08::R*cos( 7.0::R*t)
-          t09:=t08+0.785316754183239981994810079871E-09::R*cos( 8.0::R*t)
-          t10:=t09-0.101373028800387898554202774257E-09::R*cos( 9.0::R*t)
-          t11:=t10+0.139977041322676860277823488623E-10::R*cos(10.0::R*t)
-          t12:=t11-0.205100837678381899618962318711E-11::R*cos(11.0::R*t)
-          t13:=t12+0.316838872600247781814907985818E-12::R*cos(12.0::R*t)
-          t14:=t13-0.513276008283918065415984751899E-13::R*cos(13.0::R*t)
-          t15:=t14+0.868093304076654934187433687383E-14::R*cos(14.0::R*t)
-          t16:=t15-0.152701504090308497198572355351E-14::R*cos(15.0::R*t)
-          t17:=t16+0.278468625164935739650105251453E-15::R*cos(16.0::R*t)
-          t18:=t17-0.524989043742176696808472933696E-16::R*cos(17.0::R*t)
-          t19:=t18+0.102071799124856129247455787226E-16::R*cos(18.0::R*t)
-          t20:=t19-0.204226467989971841308462421876E-17::R*cos(19.0::R*t)
-          t21:=t20+0.419706417272648474408827228562E-18::R*cos(20.0::R*t)
-          t22:=t21-0.884450817617281050816483737536E-19::R*cos(21.0::R*t)
-          t23:=t22+0.190827262959471741995060168262E-19::R*cos(22.0::R*t)
-          t24:=t23-0.420974622293519950336450865676E-20::R*cos(23.0::R*t)
-          t25:=t24+0.948390405819837327641500214512E-21::R*cos(24.0::R*t)
-          t26:=t25-0.217946786013667431994032574014E-21::R*cos(25.0::R*t)
-          t27:=t26+0.510393686907145094993452562741E-22::R*cos(26.0::R*t)
-          t28:=t27-0.121688311333441509089746779693E-22::R*cos(27.0::R*t)
-          t29:=t28+0.295128916644787519294773757144E-23::R*cos(28.0::R*t)
-          t30:=t29-0.727535376377284689714438950920E-24::R*cos(29.0::R*t)
-          t31:=t30+0.182163904862307396121667115976E-24::R*cos(30.0::R*t)
-          t32:=t31-0.462962996316331716612753482064E-25::R*cos(31.0::R*t)
-          t33:=t32+0.119353979097157791523052371292E-25::R*cos(32.0::R*t)
-          t34:=t33-0.311949328522014244931062147473E-26::R*cos(33.0::R*t)
-          t35:=t34+0.826141973453346642284170028518E-27::R*cos(34.0::R*t)
-          t36:=t35-0.221580337366098298302591177697E-27::R*cos(35.0::R*t)
-          t37:=t36+0.601603167165426389045303124429E-28::R*cos(36.0::R*t)
-          t38:=t37-0.165272509838212659649744302314E-28::R*cos(37.0::R*t)
-          t39:=t38+0.459223035877302702795636377166E-29::R*cos(38.0::R*t)
-          t40:=t39-0.129006276721326384737453212670E-29::R*cos(39.0::R*t)
-          t41:=t40+0.366271848103200259081177078922E-30::R*cos(40.0::R*t)
-          t41::OPR
-
-@
-
-{\vbox{\vskip 1cm}}
-
-{\bf Table 3: Chebyshev Coefficients - Continued}
-(b)
-$$
-xe^{-x}Ei(x)=\sum_{k-0}^{40}\ {'}{A_kT_k(t)},\ \ t=(x+7)/3,\ \ 
-(-10 \le x \le -4)
-$$
-\begin{tabular}{|r|r|}
-k & $A_k$\hbox{\hskip 3cm}\\
-&\\
- 0 &  0.1757556496 0612937384 8762834691E 011\\
- 1 & -0.4358541517 7361661170 5001867964E-01\\
- 2 & -0.7979507139 5584254013 3217027492E-02\\
- 3 & -0.1484372327 3037121385 0970210001E-02\\
- 4 & -0.2800301984 3775145748 6203954948E-03\\
- 5 & -0.5348648512 8657932303 9177361553E-04\\
- 6 & -0.1032867243 5735548661 0233266460E-04\\
- 7 & -0.2014083313 0055368773 2226198639E-05\\
- 8 & -0.3961758434 2738664582 2338443500E-06\\
- 9 & -0.7853872767 0966316306 7607656069E-07\\
-10 & -0.1567925981 0074698262 4616270279E-07\\
-11 & -0.3150055939 3763998825 0007372851E-08\\
-12 & -0.6365096822 5242037304 0380263972E-09\\
-13 & -0.1292888113 2805631835 6593121259E-09\\
-14 & -0.2638690999 6592557613 2149942808E-10\\
-15 & -0.5408958287 0450687349 1922207896E-11\\
-16 & -0.1113222784 6010898999 7676692708E-11\\
-17 & -0.2299624726 0744624618 4338864145E-12\\
-18 & -0.4766682389 4951902622 3913482091E-13\\
-19 & -0.9911756747 3352709450 6246643371E-14\\
-20 & -0.2067103580 4957072400 0900805021E-14\\
-\end{tabular}
-\begin{tabular}{|r|r|}
-21 & -0.4322776783 3833850564 5764394579E-15\\
-22 & -0.9063014799 6650172551 4905603356E-16\\
-23 & -0.1904669979 5816613974 4015963342E-16\\
-24 & -0.4011792326 3502786634 6744227520E-17\\
-25 & -0.8467772130 0168322313 4166334685E-18\\
-26 & -0.1790842733 6586966555 5826492204E-18\\
-27 & -0.3794490638 1714782440 1106175166E-19\\
-28 & -0.8053999236 7982798526 0999654058E-20\\
-29 & -0.1712339011 2362012974 3228671244E-20\\
-30 & -0.3646274058 7749686208 6576562816E-21\\
-31 & -0.7775969638 8939479435 3098157647E-22\\
-32 & -0.1660628498 4484020566 2531950966E-22\\
-33 & -0.3551178625 7882509300 5927145352E-23\\
-34 & -0.7603722685 9413580929 5734653294E-24\\
-35 & -0.1630074137 2584900288 9638374755E-24\\
-36 & -0.3498575202 7286322350 7538497255E-25\\
-37 & -0.7517179627 8900988246 0645145143E-26\\
-38 & -0.1616877440 0527227629 8777317918E-26\\
-39 & -0.3481270085 7247569174 8202271565E-27\\
-40 & -0.7502707775 5024654701 0642233720E-28\\
-41 & -0.1618454364 4959102680 7612330206E-28\\
-42 & -0.3494366771 7051616674 9482836452E-29\\
-43 & -0.7551036906 1261678585 6037026797E-30\\
-\end{tabular}
-
-<<package DFSFUN DoubleFloatSpecialFunctions>>=
-
-        Ei2(y:OPR):OPR ==
-          x:R:=retract(y)
-          t:R:=acos((x+7.0::R)/3.0::R)::R
-          t01:=    0.175755649606129373848762834691E1::R*cos(0.0::R)/2.0::R
-          t02:=t01-0.435854151773616611705001867964E-01::R*cos(t)
-          t03:=t02-0.797950713955842540133217027492E-02::R*cos( 2.0::R*t)
-          t04:=t03-0.148437232730371213850970210001E-02::R*cos( 3.0::R*t)
-          t05:=t04-0.280030198437751457486203954948E-03::R*cos( 4.0::R*t)
-          t06:=t05-0.534864851286579323039177361553E-04::R*cos( 5.0::R*t)
-          t07:=t06-0.103286724357355486610233266460E-04::R*cos( 6.0::R*t)
-          t08:=t07-0.201408331300553687732226198639E-05::R*cos( 7.0::R*t)
-          t09:=t08-0.396175843427386645822338443500E-06::R*cos( 8.0::R*t)
-          t10:=t09-0.785387276709663163067607656069E-07::R*cos( 9.0::R*t)
-          t11:=t10-0.156792598100746982624616270279E-07::R*cos(10.0::R*t)
-          t12:=t11-0.315005593937639988250007372851E-08::R*cos(11.0::R*t)
-          t13:=t12-0.636509682252420373040380263972E-09::R*cos(12.0::R*t)
-          t14:=t13-0.129288811328056318356593121259E-09::R*cos(13.0::R*t)
-          t15:=t14-0.263869099965925576132149942808E-10::R*cos(14.0::R*t)
-          t16:=t15-0.540895828704506873491922207896E-11::R*cos(15.0::R*t)
-          t17:=t16-0.111322278460108989997676692708E-11::R*cos(16.0::R*t)
-          t18:=t17-0.229962472607446246184338864145E-12::R*cos(17.0::R*t)
-          t19:=t18-0.476668238949519026223913482091E-13::R*cos(18.0::R*t)
-          t20:=t19-0.991175674733527094506246643371E-14::R*cos(19.0::R*t)
-          t21:=t20-0.206710358049570724000900805021E-14::R*cos(20.0::R*t)
-          t22:=t21-0.432277678338338505645764394579E-15::R*cos(21.0::R*t)
-          t23:=t22-0.906301479966501725514905603356E-16::R*cos(22.0::R*t)
-          t24:=t23-0.190466997958166139744015963342E-16::R*cos(23.0::R*t)
-          t25:=t24-0.401179232635027866346744227520E-17::R*cos(24.0::R*t)
-          t26:=t25-0.846777213001683223134166334685E-18::R*cos(25.0::R*t)
-          t27:=t26-0.179084273365869665555826492204E-18::R*cos(26.0::R*t)
-          t28:=t27-0.379449063817147824401106175166E-19::R*cos(27.0::R*t)
-          t29:=t28-0.805399923679827985260999654058E-20::R*cos(28.0::R*t)
-          t30:=t29-0.171233901123620129743228671244E-20::R*cos(29.0::R*t)
-          t31:=t30-0.364627405877496862086576562816E-21::R*cos(30.0::R*t)
-          t32:=t31-0.777596963889394794353098157647E-22::R*cos(31.0::R*t)
-          t33:=t32-0.166062849844840205662531950966E-22::R*cos(32.0::R*t)
-          t34:=t33-0.355117862578825093005927145352E-23::R*cos(33.0::R*t)
-          t35:=t34-0.760372268594135809295734653294E-24::R*cos(34.0::R*t)
-          t36:=t35-0.163007413725849002889638374755E-24::R*cos(35.0::R*t)
-          t37:=t36-0.349857520272863223507538497255E-25::R*cos(36.0::R*t)
-          t38:=t37-0.751717962789009882460645145143E-26::R*cos(37.0::R*t)
-          t39:=t38-0.161687744005272276298777317918E-26::R*cos(38.0::R*t)
-          t40:=t39-0.348127008572475691748202271565E-27::R*cos(39.0::R*t)
-          t41:=t40-0.750270777550246547010642233720E-28::R*cos(40.0::R*t)
-          t42:=t41-0.161845436449591026807612330206E-28::R*cos(41.0::R*t)
-          t43:=t42-0.349436677170516166749482836452E-29::R*cos(42.0::R*t)
-          t44:=t43-0.755103690612616785856037026797E-30::R*cos(43.0::R*t)
-          t44::OPR
-
-@
-{\vbox{\vskip 1cm}}
-
-{\bf Table 3: Chebyshev Coefficients - Continued}
-(c)
-$$
-[Ei-log\vert x\vert-\gamma]/x=
-\sum_{k-0}^{33}\ {'}{A_kT_k(t)},\ \ t=x/4,\ \ 
-(-4 \le x \le 4)
-$$
-\begin{tabular}{|r|r|}
-k & $A_k$\hbox{\hskip 3cm}\\
-&\\
- 0 & 0.3293700103 7673912939 3905231421E 01\\
- 1 & 0.1679835052 3713029156 5505796064E 01\\
- 2 & 0.7220436105 6787543524 0299679644E 00\\
- 3 & 0.2600312360 5480956171 3740181192E 00\\
- 4 & 0.8010494308 1737502239 4742889237E-01\\
- 5 & 0.2151403663 9763337548 0552483005E-01\\
- 6 & 0.5116207789 9303312062 1968910894E-02\\
- 7 & 0.1090932861 0073913560 5066199014E-02\\
- 8 & 0.2107415320 2393891631 8348675226E-03\\
- 9 & 0.3719904516 6518885709 5940815956E-04\\
-10 & 0.6043491637 1238787570 4767032866E-05\\
-11 & 0.9092954273 9626095264 9596541772E-06\\
-12 & 0.1273805160 6592647886 5567184969E-06\\
-13 & 0.1669185748 4109890739 0896143814E-07\\
-14 & 0.2054417026 4010479254 7612484551E-08\\
-15 & 0.2383584444 4668176591 4052321417E-09\\
-\end{tabular}
-\begin{tabular}{|r|r|}
-16 & 0.2615386378 8854429666 9068664148E-10\\
-17 & 0.2721858622 8541670644 6550268995E-11\\
-18 & 0.2693750031 9835792992 5326427442E-12\\
-19 & 0.2541220946 7072635546 7884089307E-13\\
-20 & 0.2290130406 8650370941 8510620516E-14\\
-21 & 0.1975465739 0746229940 1057650412E-15\\
-22 & 0.1634024551 9289317406 8635419984E-16\\
-23 & 0.1298235437 0796376099 1961293204E-17\\
-24 & 0.9922587925 0737105964 4632581302E-19\\
-25 & 0.7306252806 7221032944 7230880087E-20\\
-26 & 0.5189676834 6043451272 0780080019E-21\\
-27 & 0.3560409454 0997068112 8043162227E-22\\
-28 & 0.2361979432 5793864237 0187203948E-23\\
-29 & 0.1516837767 7214529754 9624516819E-24\\
-30 & 0.9439089722 2448744292 5310405245E-26\\
-31 & 0.5697227559 5036921198 9581737831E-27\\
-32 & 0.3338333627 7954330315 6597939562E-28\\
-33 & 0.1900626012 8161914852 6680482237E-29\\
-\end{tabular}
-
-\noindent
-($\gamma$=0.5772156649\ 0153286060\ 6512090082\ E\ 00)
-
-<<package DFSFUN DoubleFloatSpecialFunctions>>=
-
-        Ei3(y:OPR):OPR ==
-          x:R:=retract(y)
-          x = 0.0::R => 1
-          t:R:=acos(x/4.0::R)::R
-          t01:=    0.329370010376739129393905231421E1::R*cos(0.0::R)/2.0::R
-          t02:=t01+0.167983505237130291565505796064E1::R*cos(t)
-          t03:=t02+0.722043610567875435240299679644E0::R*cos( 2.0::R*t)
-          t04:=t03+0.260031236054809561713740181192E0::R*cos( 3.0::R*t)
-          t05:=t04+0.801049430817375022394742889237E-01::R*cos( 4.0::R*t)
-          t06:=t05+0.215140366397633375480552483005E-01::R*cos( 5.0::R*t)
-          t07:=t06+0.511620778993033120621968910894E-02::R*cos( 6.0::R*t)
-          t08:=t07+0.109093286100739135605066199014E-02::R*cos( 7.0::R*t)
-          t09:=t08+0.210741532023938916318348675226E-03::R*cos( 8.0::R*t)
-          t10:=t09+0.371990451665188857095940815956E-04::R*cos( 9.0::R*t)
-          t11:=t10+0.604349163712387875704767032866E-05::R*cos(10.0::R*t)
-          t12:=t11+0.909295427396260952649596541772E-06::R*cos(11.0::R*t)
-          t13:=t12+0.127380516065926478865567184969E-06::R*cos(12.0::R*t)
-          t14:=t13+0.166918574841098907390896143814E-07::R*cos(13.0::R*t)
-          t15:=t14+0.205441702640104792547612484551E-08::R*cos(14.0::R*t)
-          t16:=t15+0.238358444446681765914052321417E-09::R*cos(15.0::R*t)
-          t17:=t16+0.261538637888544296669068664148E-10::R*cos(16.0::R*t)
-          t18:=t17+0.272185862285416706446550268995E-11::R*cos(17.0::R*t)
-          t19:=t18+0.269375003198357929925326427442E-12::R*cos(18.0::R*t)
-          t20:=t19+0.254122094670726355467884089307E-13::R*cos(19.0::R*t)
-          t21:=t20+0.229013040686503709418510620516E-14::R*cos(20.0::R*t)
-          t22:=t21+0.197546573907462299401057650412E-15::R*cos(21.0::R*t)
-          t23:=t22+0.163402455192893174068635419984E-16::R*cos(22.0::R*t)
-          t24:=t23+0.129823543707963760991961293204E-17::R*cos(23.0::R*t)
-          t25:=t24+0.992258792507371059644632581302E-19::R*cos(24.0::R*t)
-          t26:=t25+0.730625280672210329447230880087E-20::R*cos(25.0::R*t)
-          t27:=t26+0.518967683460434512720780080019E-21::R*cos(26.0::R*t)
-          t28:=t27+0.356040945409970681128043162227E-22::R*cos(27.0::R*t)
-          t29:=t28+0.236197943257938642370187203948E-23::R*cos(28.0::R*t)
-          t30:=t29+0.151683776772145297549624516819E-24::R*cos(29.0::R*t)
-          t31:=t30+0.943908972224487442925310405245E-26::R*cos(30.0::R*t)
-          t32:=t31+0.569722755950369211989581737831E-27::R*cos(31.0::R*t)
-          t33:=t32+0.333833362779543303156597939562E-28::R*cos(32.0::R*t)
-          t34:=t33+0.190062601281619148526680482237E-29::R*cos(33.0::R*t)
-          t34::OPR
-
-@
-{\vbox{\vskip 1cm}}
-
-{\bf Table 3: Chebyshev Coefficients - Continued}
-(d) 
-$$
-xe^{-x}Ei(x)=\sum_{k-0}^{49}\ {'}{A_kT_k(t)},\ \ t=(x-8)/4,\ \ 
-(4 \le x \le 12)
-$$
-\begin{tabular}{|r|r|}
-k & $A_k$\hbox{\hskip 3cm}\\
-&\\
- 0 &  0.2455133538 7812952867 3420457043E 01\\
- 1 & -0.1624383791 3037652439 6002276856E 00\\
- 2 &  0.4495753080 9357264148 0785417193E-01\\
- 3 & -0.6741578679 9892299884 8718835050E-02\\
- 4 & -0.1306697142 8032942805 1599341387E-02\\
- 5 &  0.1381083146 0007257602 0202089820E-02\\
- 6 & -0.5850228790 1596579868 7368242394E-03\\
- 7 &  0.1749299341 0789197003 8740976432E-03\\
- 8 & -0.4047281499 0529303552 2869333800E-04\\
- 9 &  0.7217102412 1709975003 5752600049E-05\\
-10 & -0.8612776970 1986775241 4815450193E-06\\
-11 & -0.2514475296 5322559777 9084739054E-09 \\
-12 &  0.3794747138 2014951081 4074505574E-07\\
-13 & -0.1442117969 5211980616 0265640172E-07\\
-14 &  0.3935049295 9761013108 7190848042E-08\\
-15 & -0.9284689401 0633175304 7289210353E-09\\
-16 &  0.2031789568 0065461336 6090995698E-09\\
-17 & -0.4292498504 9923683142 7918026902E-10\\
-18 &  0.8992647177 7812393526 8001544182E-11\\
-19 & -0.1900869118 4121097524 2396635722E-11\\
-20 &  0.4092198912 2237383452 6121178338E-12\\
-21 & -0.8999253437 2931901982 5435824585E-13\\
-22 &  0.2019654670 8242638335 4948543451E-13\\
-23 & -0.4612930261 3830820719 4950531726E-14\\
-\end{tabular}
-\begin{tabular}{|r|r|}
-24 &  0.1069023072 9386369566 8857256409E-14\\
-25 & -0.2507030070 5700729569 2572254042E-15\\
-26 &  0.5937322503 7915516070 6073763509E-16\\
-27 & -0.1417734582 4376625234 4732005648E-16\\
-28 &  0.3409203754 3608089342 6806402093E-17\\
-29 & -0.8248290269 5054937928 8702529656E-18\\
-30 &  0.2006369712 6214423139 8824095937E-18\\
-31 & -0.4903851667 9674222440 3498152027E-19\\
-32 &  0.1203734482 3483321716 6664609324E-19\\
-33 & -0.2966282447 1413682538 1453572575E-20\\
-34 &  0.7335512384 2880759924 2142328436E-21\\
-35 & -0.1819924142 9085112734 4263485604E-21\\
-36 &  0.4528629374 2957606021 7359526404E-22\\
-37 & -0.1129980043 7506096133 8906717853E-22\\
-38 &  0.2826681251 2901165692 3764408445E-23\\
-39 & -0.7087717977 1690496166 6732640699E-24\\
-40 &  0.1781104524 0187095153 4401530034E-24\\
-41 & -0.4485004076 6189635731 2006142358E-25\\
-42 &  0.1131540292 5754766224 5053090840E-25\\
-43 & -0.2859957899 7793216379 0414326136E-26\\
-44 &  0.7240775806 9226736175 8172726753E-27\\
-45 & -0.1836132234 1257789805 0666710105E-27\\
-46 &  0.4663128735 2273048658 2600122073E-28\\
-47 & -0.1185959588 9190288794 6724005478E-28\\
-48 &  0.3020290590 5567131073 1137614875E-29\\
-49 & -0.7701650548 1663660609 8827057102E-30\\
-\end{tabular}
-
-<<package DFSFUN DoubleFloatSpecialFunctions>>=
-
-        Ei4(y:OPR):OPR ==
-          x:R:=retract(y)
-          t:R:=acos((x-8.0::R)/4.0::R)::R
-          t01:=    0.245513353878129528673420457043E1::R*cos(0.0::R)/2.0::R
-          t02:=t01-0.162438379130376524396002276856E0::R*cos(t)
-          t03:=t02+0.449575308093572641480785417193E-01::R*cos( 2.0::R*t)
-          t04:=t03-0.674157867998922998848718835050E-02::R*cos( 3.0::R*t)
-          t05:=t04-0.130669714280329428051599341387E-02::R*cos( 4.0::R*t)
-          t06:=t05+0.138108314600072576020202089820E-02::R*cos( 5.0::R*t)
-          t07:=t06-0.585022879015965798687368242394E-03::R*cos( 6.0::R*t)
-          t08:=t07+0.174929934107891970038740976432E-03::R*cos( 7.0::R*t)
-          t09:=t08-0.404728149905293035522869333800E-04::R*cos( 8.0::R*t)
-          t10:=t09+0.721710241217099750035752600049E-05::R*cos( 9.0::R*t)
-          t11:=t10-0.861277697019867752414815450193E-06::R*cos(10.0::R*t)
-          t12:=t11-0.251447529653225597779084739054E-09::R*cos(11.0::R*t)
-          t13:=t12+0.379474713820149510814074505574E-07::R*cos(12.0::R*t)
-          t14:=t13-0.144211796952119806160265640172E-07::R*cos(13.0::R*t)
-          t15:=t14+0.393504929597610131087190848042E-08::R*cos(14.0::R*t)
-          t16:=t15-0.928468940106331753047289210353E-09::R*cos(15.0::R*t)
-          t17:=t16+0.203178956800654613366090995698E-09::R*cos(16.0::R*t)
-          t18:=t17-0.429249850499236831427918026902E-10::R*cos(17.0::R*t)
-          t19:=t18+0.899264717778123935268001544182E-11::R*cos(18.0::R*t)
-          t20:=t19-0.190086911841210975242396635722E-11::R*cos(19.0::R*t)
-          t21:=t20+0.409219891222373834526121178338E-12::R*cos(20.0::R*t)
-          t22:=t21-0.899925343729319019825435824585E-13::R*cos(21.0::R*t)
-          t23:=t22+0.201965467082426383354948543451E-13::R*cos(22.0::R*t)
-          t24:=t23-0.461293026138308207194950531726E-14::R*cos(23.0::R*t)
-          t25:=t24+0.106902307293863695668857256409E-14::R*cos(24.0::R*t)
-          t26:=t25-0.250703007057007295692572254042E-15::R*cos(25.0::R*t)
-          t27:=t26+0.593732250379155160706073763509E-16::R*cos(26.0::R*t)
-          t28:=t27-0.141773458243766252344732005648E-16::R*cos(27.0::R*t)
-          t29:=t28+0.340920375436080893426806402093E-17::R*cos(28.0::R*t)
-          t30:=t29-0.824829026950549379288702529656E-18::R*cos(29.0::R*t)
-          t31:=t30+0.200636971262144231398824095937E-18::R*cos(30.0::R*t)
-          t32:=t31-0.490385166796742224403498152027E-19::R*cos(31.0::R*t)
-          t33:=t32+0.120373448234833217166664609324E-19::R*cos(32.0::R*t)
-          t34:=t33-0.296628244714136825381453572575E-20::R*cos(33.0::R*t)
-          t35:=t34+0.733551238428807599242142328436E-21::R*cos(34.0::R*t)
-          t36:=t35-0.181992414290851127344263485604E-21::R*cos(35.0::R*t)
-          t37:=t36+0.452862937429576060217359526404E-22::R*cos(36.0::R*t)
-          t38:=t37-0.112998004375060961338906717853E-22::R*cos(37.0::R*t)
-          t39:=t38+0.282668125129011656923764408445E-23::R*cos(38.0::R*t)
-          t40:=t39-0.708771797716904961666732640699E-24::R*cos(39.0::R*t)
-          t41:=t40+0.178110452401870951534401530034E-24::R*cos(40.0::R*t)
-          t42:=t41-0.448500407661896357312006142358E-25::R*cos(41.0::R*t)
-          t43:=t42+0.113154029257547662245053090840E-25::R*cos(42.0::R*t)
-          t44:=t43-0.285995789977932163790414326136E-26::R*cos(43.0::R*t)
-          t45:=t44+0.724077580692267361758172726753E-27::R*cos(44.0::R*t)
-          t46:=t45-0.183613223412577898050666710105E-27::R*cos(45.0::R*t)
-          t47:=t46+0.466312873522730486582600122073E-28::R*cos(46.0::R*t)
-          t48:=t47-0.118595958891902887946724005478E-28::R*cos(47.0::R*t)
-          t49:=t48+0.302029059055671310731137614875E-29::R*cos(48.0::R*t)
-          t50:=t49-0.770165054816636606098827057102E-30::R*cos(49.0::R*t)
-          t50::OPR
-
-@
-
-{\vbox{\vskip 1cm}}
-
-{\bf Table 3: Chebyshev Coefficients - Continued}
-(e)
-$$ xe^{-x}Ei(x)=\sum_{k-0}^{47}\ {'}{A_kT_k(t)},\ \ t=(x-22)/10,\ \ 
-(12 \le x \le 32)
-$$
-\begin{tabular}{|r|r|}
-k & $A_k$\hbox{\hskip 3cm}\\
-&\\
- 0 &  0.2117028640 4369866832 9789991614E 01\\
- 1 & -0.3204237273 7548579499 0618303177E-01\\
- 2 &  0.8891732077 3531683589 0182400335E-02\\
- 3 & -0.2507952805 1892993708 8352442063E-02\\
- 4 &  0.7202789465 9598754887 5760902487E-03\\
- 5 & -0.2103490058 5011305342 3531441256E-03\\
- 6 &  0.6205732318 2769321658 8857730842E-04\\
- 7 & -0.1826566749 8167026544 9155689733E-04\\
- 8 &  0.5270651575 2893637580 7788296811E-05\\
- 9 & -0.1459666547 6199457532 3066719367E-05\\
-10 &  0.3781719973 5896367198 0484193981E-06\\
-11 & -0.8842581282 8407192007 7971589012E-07\\
-12 &  0.1741749198 5383936137 7350309156E-07\\
-13 & -0.2313517747 0436906350 6474480152E-08\\
-14 & -0.1228609819 1808623883 2104835230E-09\\
-15 &  0.2349966236 3228637047 8311381926E-09\\
-16 & -0.1100719401 0272628769 0738963049E-09\\
-17 &  0.3848275157 8612071114 9705563369E-10\\
-18 & -0.1148440967 4900158965 8439301603E-10\\
-19 &  0.3056876293 0885208263 0893626200E-11\\
-20 & -0.7388278729 2847356645 4163131431E-12\\
-21 &  0.1630933094 1659411056 4148013749E-12\\
-22 & -0.3276989373 3127124965 7111774748E-13\\
-\end{tabular}
-\begin{tabular}{|r|r|}
-23 &  0.5898114347 0713196171 1164283918E-14\\
-24 & -0.9099707635 9564920464 3554720718E-15\\
-25 &  0.1040752382 6695538658 5405697541E-15\\
-26 & -0.1809815426 0592279322 7163355935E-17\\
-27 & -0.3777098842 5639477336 9593494417E-17\\
-28 &  0.1580332901 0284795713 6759888420E-17\\
-29 & -0.4684291758 8088273064 8433752957E-18\\
-30 &  0.1199516852 5919809370 7533478542E-18\\
-31 & -0.2823594749 8418651767 9349931117E-19\\
-32 &  0.6293738065 6446352262 7520190349E-20\\
-33 & -0.1352410249 5047975630 5343973177E-20\\
-34 &  0.2837106053 8552914159 0980426210E-21\\
-35 & -0.5867007420 2463832353 1936371015E-22\\
-36 &  0.1205247636 0954731111 2449686917E-22\\
-37 & -0.2474446616 9988486972 8416011246E-23\\
-38 &  0.5099962585 8378500814 2986465688E-24\\
-39 & -0.1058382578 7754224088 7093294733E-24\\
-40 &  0.2215276245 0704827856 6429387155E-25\\
-41 & -0.4679278754 7569625867 1852546231E-26\\
-42 &  0.9972872990 6020770482 4269828079E-27\\
-43 & -0.2143267945 2167880459 1907805844E-27\\
-44 &  0.4640656908 8381811433 8414829515E-28\\
-45 & -0.1011447349 2115139094 8461800780E-28\\
-46 &  0.2217211522 7100771109 3046878345E-29\\
-47 & -0.4884890469 2437855322 4914645512E-30\\
-\end{tabular}
-
-<<package DFSFUN DoubleFloatSpecialFunctions>>=
-
-        Ei5(y:OPR):OPR ==
-          x:R:=retract(y)
-          t:R:=acos((x-22.0::R)/10.0::R)::R
-          t01:=    0.211702864043698668329789991614E1::R*cos(0.0::R)::R/2.0::R
-          t02:=t01-0.320423727375485794990618303177E-01::R*cos(t)
-          t03:=t02+0.889173207735316835890182400335E-02::R*cos( 2.0::R*t)
-          t04:=t03-0.250795280518929937088352442063E-02::R*cos( 3.0::R*t)
-          t05:=t04+0.720278946595987548875760902487E-03::R*cos( 4.0::R*t)
-          t06:=t05-0.210349005850113053423531441256E-03::R*cos( 5.0::R*t)
-          t07:=t06+0.620573231827693216588857730842E-04::R*cos( 6.0::R*t)
-          t08:=t07-0.182656674981670265449155689733E-04::R*cos( 7.0::R*t)
-          t09:=t08+0.527065157528936375807788296811E-05::R*cos( 8.0::R*t)
-          t10:=t09-0.145966654761994575323066719367E-05::R*cos( 9.0::R*t)
-          t11:=t10+0.378171997358963671980484193981E-06::R*cos(10.0::R*t)
-          t12:=t11-0.884258128284071920077971589012E-07::R*cos(11.0::R*t)
-          t13:=t12+0.174174919853839361377350309156E-07::R*cos(12.0::R*t)
-          t14:=t13-0.231351774704369063506474480152E-08::R*cos(13.0::R*t)
-          t15:=t14-0.122860981918086238832104835230E-09::R*cos(14.0::R*t)
-          t16:=t15+0.234996623632286370478311381926E-09::R*cos(15.0::R*t)
-          t17:=t16-0.110071940102726287690738963049E-09::R*cos(16.0::R*t)
-          t18:=t17+0.384827515786120711149705563369E-10::R*cos(17.0::R*t)
-          t19:=t18-0.114844096749001589658439301603E-10::R*cos(18.0::R*t)
-          t20:=t19+0.305687629308852082630893626200E-11::R*cos(19.0::R*t)
-          t21:=t20-0.738827872928473566454163131431E-12::R*cos(20.0::R*t)
-          t22:=t21+0.163093309416594110564148013749E-12::R*cos(21.0::R*t)
-          t23:=t22-0.327698937331271249657111774748E-13::R*cos(22.0::R*t)
-          t24:=t23+0.589811434707131961711164283918E-14::R*cos(23.0::R*t)
-          t25:=t24-0.909970763595649204643554720718E-15::R*cos(24.0::R*t)
-          t26:=t25+0.104075238266955386585405697541E-15::R*cos(25.0::R*t)
-          t27:=t26-0.180981542605922793227163355935E-17::R*cos(26.0::R*t)
-          t28:=t27-0.377709884256394773369593494417E-17::R*cos(27.0::R*t)
-          t29:=t28+0.158033290102847957136759888420E-17::R*cos(28.0::R*t)
-          t30:=t29-0.468429175880882730648433752957E-18::R*cos(29.0::R*t)
-          t31:=t30+0.119951685259198093707533478542E-18::R*cos(30.0::R*t)
-          t32:=t31-0.282359474984186517679349931117E-19::R*cos(31.0::R*t)
-          t33:=t32+0.629373806564463522627520190349E-20::R*cos(32.0::R*t)
-          t34:=t33-0.135241024950479756305343973177E-20::R*cos(33.0::R*t)
-          t35:=t34+0.283710605385529141590980426210E-21::R*cos(34.0::R*t)
-          t36:=t35-0.586700742024638323531936371015E-22::R*cos(35.0::R*t)
-          t37:=t36+0.120524763609547311112449686917E-22::R*cos(36.0::R*t)
-          t38:=t37-0.247444661699884869728416011246E-23::R*cos(37.0::R*t)
-          t39:=t38+0.509996258583785008142986465688E-24::R*cos(38.0::R*t)
-          t40:=t39-0.105838257877542240887093294733E-24::R*cos(39.0::R*t)
-          t41:=t40+0.221527624507048278566429387155E-25::R*cos(40.0::R*t)
-          t42:=t41-0.467927875475696258671852546231E-26::R*cos(41.0::R*t)
-          t43:=t42+0.997287299060207704824269828079E-27::R*cos(42.0::R*t)
-          t44:=t42-0.214326794521678804591907805844E-27::R*cos(43.0::R*t)
-          t45:=t42+0.464065690883818114338414829515E-28::R*cos(44.0::R*t)
-          t46:=t42-0.101144734921151390948461800780E-28::R*cos(45.0::R*t)
-          t47:=t42+0.221721152271007711093046878345E-29::R*cos(46.0::R*t)
-          t48:=t42-0.488489046924378553224914645512E-30::R*cos(47.0::R*t)
-          t48::OPR
-
-@
-{\vbox{\vskip 1cm}}
-
-{\bf Table 3: Chebyshev Coefficients - Continued}
-(f)
-$$ xe^{-x}Ei(x)=\sum_{k-0}^{46}\ {'}{A_kT_k(t)},\ \ t=(64/x)-1,\ \ 
-(32 \le x < \infty)
-$$
-\begin{tabular}{|r|r|}
-k & $A_k$\hbox{\hskip 3cm}\\
-&\\
- 0 &  0.2032843945 7961669908 7873844202E 01\\
- 1 &  0.1669920452 0313628514 7618434339E-01\\
- 2 &  0.2845284724 3613468074 2489985325E-03\\
- 3 &  0.7563944358 5162064894 8786693854E-05\\
- 4 &  0.2798971289 4508591575 0484318090E-06\\
- 5 &  0.1357901828 5345310695 2556392593E-07\\
- 6 &  0.8343596202 0404692558 5610289412E-09\\
- 7 &  0.6370971727 6402484382 7524337306E-10\\
- 8 &  0.6007247608 8118612357 6083084850E-11\\
- 9 &  0.7022876174 6797735907 5059216588E-12\\
-10 &  0.1018302673 7036876930 9667322152E-12\\
-11 &  0.1761812903 4308800404 0656741554E-13\\
-12 &  0.3250828614 2353606942 4072007647E-14\\
-13 &  0.5071770025 5058186788 1479300685E-15\\
-14 &  0.1665177387 0432942985 3520036957E-16\\
-15 & -0.3166753890 7975144007 2410018963E-16\\
-16 & -0.1588403763 6641415154 8423134074E-16\\
-17 & -0.4175513256 1380188308 9626455063E-17\\
-18 & -0.2892347749 7071418820 2868862358E-18\\
-19 &  0.2800625903 3966080728 9978777339E-18\\
-20 &  0.1322938639 5392708914 0532005364E-18\\
-21 &  0.1804447444 1773019958 5334811191E-19\\
-22 & -0.7905384086 5226165620 2021080364E-20\\
-23 & -0.4435711366 3695734471 8167314045E-20\\
-\end{tabular}
-\begin{tabular}{|r|r|}
-24 & -0.4264103994 9781026176 0579779746E-21\\
-25 &  0.3920101766 9371439072 5625388636E-21\\
-26 &  0.1527378051 3439636447 2804486402E-21\\
-27 & -0.1024849527 0494906078 6953149788E-22\\
-28 & -0.2134907874 7710893794 8904287231E-22\\
-29 & -0.3239139475 1602368761 4279789345E-23\\
-30 &  0.2142183762 2964597029 6249355934E-23\\
-31 &  0.8234609419 6189955316 9207838151E-24\\
-32 & -0.1524652829 6206721081 1495038147E-24\\
-33 & -0.1378208282 4882440129 0438126477E-24\\
-34 &  0.2131311201 4287370679 1513005998E-26\\
-35 &  0.2012649651 8713266585 9213006507E-25\\
-36 &  0.1995535662 0563740232 0607178286E-26\\
-37 & -0.2798995812 2017971142 6020884464E-26\\
-38 & -0.5534511830 5070025094 9784942560E-27\\
-39 &  0.3884995422 6845525312 9749000696E-27\\
-40 &  0.1121304407 2330701254 0043264712E-27\\
-41 & -0.5566568286 7445948805 7823816866E-28\\
-42 & -0.2045482612 4651357628 8865878722E-28\\
-43 &  0.8453814064 4893808943 7361193598E-29\\
-44 &  0.3565755151 2015152659 0791715785E-29\\
-45 & -0.1383652423 4779775181 0195772006E-29\\
-46 & -0.6062142653 2093450576 7865286306E-30\\
-\end{tabular}
-
-<<package DFSFUN DoubleFloatSpecialFunctions>>=
-
-        Ei6(y:OPR):OPR ==
-          infinite? y => 1
-          x:R:=retract(y)
-          m:R:=64.0::R/x-1.0::R
-          t:R:=acos(m::R)::R
-          t01:=    0.203284394579616699087873844202E1::R*cos(0.0::R)::R/2.0::R
-          t02:=t01+0.166992045203136285147618434339E-01::R*cos(t)
-          t03:=t02+0.284528472436134680742489985325E-03::R*cos( 2.0::R*t)
-          t04:=t03+0.756394435851620648948786693854E-05::R*cos( 3.0::R*t)
-          t05:=t04+0.279897128945085915750484318090E-06::R*cos( 4.0::R*t)
-          t06:=t05+0.135790182853453106952556392593E-07::R*cos( 5.0::R*t)
-          t07:=t06+0.834359620204046925585610289412E-09::R*cos( 6.0::R*t)
-          t08:=t07+0.637097172764024843827524337306E-10::R*cos( 7.0::R*t)
-          t09:=t08+0.600724760881186123576083084850E-11::R*cos( 8.0::R*t)
-          t10:=t09+0.702287617467977359075059216588E-12::R*cos( 9.0::R*t)
-          t11:=t10+0.101830267370368769309667322152E-12::R*cos(10.0::R*t)
-          t12:=t11+0.176181290343088004040656741554E-13::R*cos(11.0::R*t)
-          t13:=t12+0.325082861423536069424072007647E-14::R*cos(12.0::R*t)
-          t14:=t13+0.507177002550581867881479300685E-15::R*cos(13.0::R*t)
-          t15:=t14+0.166517738704329429853520036957E-16::R*cos(14.0::R*t)
-          t16:=t15-0.316675389079751440072410018963E-16::R*cos(15.0::R*t)
-          t17:=t16-0.158840376366414151548423134074E-16::R*cos(16.0::R*t)
-          t18:=t17-0.417551325613801883089626455063E-17::R*cos(17.0::R*t)
-          t19:=t18-0.289234774970714188202868862358E-18::R*cos(18.0::R*t)
-          t20:=t19+0.280062590339660807289978777339E-18::R*cos(19.0::R*t)
-          t21:=t20+0.132293863953927089140532005364E-18::R*cos(20.0::R*t)
-          t22:=t21+0.180444744417730199585334811191E-19::R*cos(21.0::R*t)
-          t23:=t22-0.790538408652261656202021080364E-20::R*cos(22.0::R*t)
-          t24:=t23-0.443571136636957344718167314045E-20::R*cos(23.0::R*t)
-          t25:=t24-0.426410399497810261760579779746E-21::R*cos(24.0::R*t)
-          t26:=t25+0.392010176693714390725625388636E-21::R*cos(25.0::R*t)
-          t27:=t26+0.152737805134396364472804486402E-21::R*cos(26.0::R*t)
-          t28:=t27-0.102484952704949060786953149788E-22::R*cos(27.0::R*t)
-          t29:=t28-0.213490787477108937948904287231E-22::R*cos(28.0::R*t)
-          t30:=t29-0.323913947516023687614279789345E-23::R*cos(29.0::R*t)
-          t31:=t30+0.214218376229645970296249355934E-23::R*cos(30.0::R*t)
-          t32:=t31+0.823460941961899553169207838151E-24::R*cos(31.0::R*t)
-          t33:=t32-0.152465282962067210811495038147E-24::R*cos(32.0::R*t)
-          t34:=t33-0.137820828248824401290438126477E-24::R*cos(33.0::R*t)
-          t35:=t34+0.213131120142873706791513005998E-26::R*cos(34.0::R*t)
-          t36:=t35+0.201264965187132665859213006507E-25::R*cos(35.0::R*t)
-          t37:=t36+0.199553566205637402320607178286E-26::R*cos(36.0::R*t)
-          t38:=t37-0.279899581220179711426020884464E-26::R*cos(37.0::R*t)
-          t39:=t38-0.553451183050700250949784942560E-27::R*cos(38.0::R*t)
-          t40:=t39+0.388499542268455253129749000696E-27::R*cos(39.0::R*t)
-          t41:=t40+0.112130440723307012540043264712E-27::R*cos(40.0::R*t)
-          t42:=t41-0.556656828674459488057823816866E-28::R*cos(41.0::R*t)
-          t43:=t42-0.204548261246513576288865878722E-28::R*cos(42.0::R*t)
-          t44:=t43+0.845381406448938089437361193598E-29::R*cos(43.0::R*t)
-          t45:=t44+0.356575515120151526590791715785E-29::R*cos(44.0::R*t)
-          t46:=t45-0.138365242347797751810195772006E-29::R*cos(45.0::R*t)
-          t47:=t46-0.606214265320934505767865286306E-30::R*cos(46.0::R*t)
-          t47::OPR
-
-@
-
-{\vbox{\vskip 1cm}}
-
-{\bf Table 4: Function Values of the Associated Functions}
-
-{\vbox{\vskip 1cm}}
-
-\begin{tabular}{|r|c|r|}
-x\hbox{\hskip 0.5cm} & $t=-(20/x)-1$ & $xe^{-x}Ei(x)$\hbox{\hskip 3cm}\\
-&&\\
-$-\infty$ & -1.000 & 0.1000000000 0000000000 0000000000 E 01\\
--160      & -0.875 & 0.9938266956 7406127387 8797850088 E 00\\
--80       & -0.750 & 0.9878013330 9428877356 4522608410 E 00\\
--53 1/3   & -0.625 & 0.9819162901 4319443961 7735426105 E 00\\
--40       & -0.500 & 0.9761646031 8514305080 8000604060 E 00\\
--32       & -0.375 & 0.9705398840 7466392046 2584664361 E 00\\
--26 2/3   & -0.250 & 0.9650362511 2337703576 3536593528 E 00\\
--22 6/7   & -0.125 & 0.9596482710 7936727616 5478970820 E 00\\
--20       & -0.000 & 0.9543709099 1921683397 5195829433 E 00\\
--17 7/9   &  0.125 & 0.9491994907 7974574460 6445346803 E 00\\
--16       &  0.250 & 0.9441296577 3690297898 4149471583 E 00\\
--14 6/11  &  0.375 & 0.9391573444 1928424124 0422409988 E 00\\
--13 1/3   &  0.500 & 0.9342787466 5341046480 9375801650 E 00\\
--12 4/13  &  0.625 & 0.9294902984 9721403772 5319679042 E 00\\
--11 3/7   &  0.750 & 0.9247886511 4084169605 5993585492 E 00\\
--10 2/3   &  0.875 & 0.9201706542 4944567620 2148012149 E 00\\
--10       &  1.000 & 0.9156333393 9788081876 0698157666 E 00
-\end{tabular}
-
-{\vbox{\vskip 1cm}}
-
-\begin{tabular}{|r|c|r|}
-x\hbox{\hskip 0.5cm} & $t=-(x+7)/3$ & $xe^{-x}Ei(x)$\hbox{\hskip 3cm}\\
-&&\\
--10.000 & -1.000 & 0.9156333393 9788081876 0698157661 E 01\\
- -9.625 & -0.875 & 0.9128444614 6799341885 6575662217 E 00\\
- -9.250 & -0.750 & 0.9098627515 2542413937 8954274597 E 00\\
- -8.875 & -0.625 & 0.9066672706 5475388033 4995756418 E 00\\
- -8.500 & -0.500 & 0.9032339019 7320784414 4682926135 E 00\\
- -8.125 & -0.375 & 0.8995347176 8847383630 1415777697 E 00\\
- -7.750 & -0.250 & 0.8955371870 8753915717 9475513219 E 00\\
- -7.375 & -0.125 & 0.8912031763 2125431626 7087476258 E 00\\
- -7.000 & -0.000 & 0.8864876725 3642935289 3993846569 E 00\\
- -6.625 &  0.125 & 0.8813371384 6821020039 4305706270 E 00\\
- -6.250 &  0.250 & 0.8756873647 8846593227 6462155532 E 00\\
- -5.875 &  0.375 & 0.8694606294 5411341030 2047153364 E 00\\
- -5.500 &  0.500 & 0.8625618846 9070142209 0918986586 E 00\\
- -5.125 &  0.625 & 0.8548735538 9019954239 2425567234 E 00\\
- -4.750 &  0.750 & 0.8462482991 0358736117 1665798810 E 00\\
- -4.375 &  0.875 & 0.8364987545 5629874174 2152267582 E 00\\
- -4.000 &  1.000 & 0.8253825996 0422333240 8183035504 E 00
-\end{tabular}
-
-{\vbox{\vskip 1cm}}
-
-\begin{tabular}{|r|c|r|}
-x\hbox{\hskip 0.5cm} & $t=x/4$ &
-$[Ei(x)-log\vert x\vert - \gamma]/x$\hbox{\hskip 2cm}\\
-&&\\
- -4.0 & -1.000 & 0.4918223446 0781809647 9962798267 E 00\\
- -3.5 & -0.875 & 0.5248425066 4412835691 8258753311 E 00\\
- -3.0 & -0.750 & 0.5629587782 2127986313 8086024270 E 00\\
- -2.5 & -0.625 & 0.6073685258 5838306451 4266925640 E 00\\
- -2.0 & -0.500 & 0.6596316780 8476964479 5492023380 E 00\\
- -1.5 & -0.375 & 0.7218002369 4421992965 7623030310 E 00\\
- -1.0 & -0.250 & 0.7965995992 9705313428 3675865540 E 00\\
- -0.5 & -0.125 & 0.8876841582 3549672587 2151815870 E 00\\
-  0.0 & -0.000 & 0.1000000000 0000000000 0000000000 E 01\\
-  0.5 &  0.125 & 0.1140302841 0431720574 6248768807 E 01\\
-  1.0 &  0.250 & 0.1317902151 4544038948 6000884424 E 01\\
-  1.5 &  0.375 & 0.1545736450 7467337302 4859074039 E 01\\
-  2.0 &  0.500 & 0.1841935755 2702059966 7788045934 E 01\\
-  2.5 &  0.625 & 0.2232103799 1211651144 5340506423 E 01\\
-  3.0 &  0.750 & 0.2752668205 6852580020 0219289740 E 01\\
-  3.5 &  0.875 & 0.3455821531 9301241243 7300898811 E 01\\
-  4.0 &  1.000 & 0.4416841111 0086991358 0118598668 E 01
-\end{tabular}
-
-{\vbox{\vskip 1cm}}
-
-\begin{tabular}{|r|c|r|}
-x\hbox{\hskip 0.5cm} & $t=(x-8)/4$ &$xe^{-x}Ei(x)$\hbox{\hskip 3cm}\\
-&&\\
- 4.0 & -1.000 & 0.1438208031 4544827847 0968670330 E 01\\
- 4.5 & -0.875 & 0.1396419029 6297460710 0674523183 E 01\\
- 5.0 & -0.750 & 0.1353831277 4552859779 0189174047 E 01\\
- 5.5 & -0.625 & 0.1314143565 7421192454 1219816991 E 01\\
- 6.0 & -0.500 & 0.1278883860 4895616189 2314099578 E 01\\
- 6.5 & -0.375 & 0.1248391155 0017014864 0741941387 E 01\\
- 7.0 & -0.250 & 0.1222408052 3605310590 3656846622 E 01\\
- 7.5 & -0.125 & 0.1200421499 5996307864 3879158950 E 01\\
- 8.0 & -0.000 & 0.1181847986 9872079731 7739362644 E 01\\
- 8.5 &  0.125 & 0.1166126525 8117484943 9918142965 E 01\\
- 9.0 &  0.250 & 0.1152759208 7089248132 2396814952 E 01\\
- 9.5 &  0.375 & 0.1141323475 9526242015 5338560641 E 01\\
-10.0 &  0.500 & 0.1131470204 7341077803 4051681355 E 01\\
-10.5 &  0.625 & 0.1122915570 0177606064 2888630755 E 01\\
-11.0 &  0.750 & 0.1115430938 9980384416 4779434229 E 01\\
-11.5 &  0.875 & 0.1108832926 3050773058 6855234934 E 01\\
-12.0 &  1.000 & 0.1102974544 9067590726 7241234953 E 01\\
-\end{tabular}
-
-{\vbox{\vskip 1cm}}
-
-\begin{tabular}{|r|c|r|}
-x\hbox{\hskip 0.5cm} & $t=(x-22)/10$ &$xe^{-x}Ei(x)$\hbox{\hskip 3cm}\\
-&&\\
-12.00 & -1.000 & 0.1102974544 9067590726 7241234952 E 01\\
-13.25 & -0.875 & 0.1090844898 2154756926 6468614954 E 01\\
-14.50 & -0.750 & 0.1081351395 7351912850 6346643795 E 01\\
-15.75 & -0.625 & 0.1073701384 1997572371 2157900374 E 01\\
-17.00 & -0.500 & 0.1067393691 9585378312 9572196197 E 01\\
-18.25 & -0.375 & 0.1062096608 6221502426 8372647556 E 01\\
-19.50 & -0.250 & 0.1057581342 1587250319 5393949410 E 01\\
-20.75 & -0.125 & 0.1053684451 2894094408 2102194964 E 01\\
-22.00 & -0.000 & 0.1050285719 6851897941 1780664532 E 01\\
-23.25 &  0.125 & 0.1047294551 7053248581 1492365591 E 01\\
-24.50 &  0.250 & 0.1044641267 9046436368 9761075289 E 01\\
-25.75 &  0.375 & 0.1042271337 2023202388 5710928048 E 01\\
-27.00 &  0.500 & 0.1040141438 3230104381 3713899754 E 01\\
-28.25 &  0.625 & 0.1038216700 3601458768 0056548394 E 01\\
-29.50 &  0.750 & 0.1036468726 2924118457 5154685419 E 01\\
-30.75 &  0.875 & 0.1034874149 8964796947 2990938990 E 01\\
-32.00 &  1.000 & 0.1033413564 2162410494 3493552567 E 01\\
-\end{tabular}
-
-{\vbox{\vskip 1cm}}
-
-\begin{tabular}{|r|c|r|}
-x\hbox{\hskip 0.5cm} & $t=(64/x)-1$ &$xe^{-x}Ei(x)$\hbox{\hskip 3cm}\\
-&&\\
-$\infty$ & -1.000 & 0.100000000 0000000000 00000000001 E 01\\
-512      & -0.875 & 0.100196079 9450711925 31337468473 E 01\\
-256      & -0.750 & 0.100393713 0905698627 88009078297 E 01\\
-170 2/3  & -0.625 & 0.100592927 5692929112 94663030932 E 01\\
-128      & -0.500 & 0.100793752 4408140182 81776821694 E 01\\
-102 2/5  & -0.375 & 0.100996217 7406449755 74367545570 E 01\\
-85 1/3   & -0.250 & 0.101200354 5332988482 01864466702 E 01\\
-73 1/7   & -0.125 & 0.101406194 9696971331 45942329335 E 01\\
-64       & -0.000 & 0.101613772 3494325321 70357100831 E 01\\
-56 8/9   &  0.125 & 0.101823121 1884832696 82337017143 E 01\\
-51 1/5   &  0.250 & 0.102034277 2930783774 87217829808 E 01\\
-46 6/11  &  0.375 & 0.102247277 8405420595 91275364791 E 01\\
-42 2/3   &  0.500 & 0.102462161 4681078391 01187804247 E 01\\
-39 5/13  &  0.625 & 0.102678968 3709028524 50984510823 E 01\\
-36 4/7   &  0.750 & 0.102897740 4105808008 63378435059 E 01\\
-34 2/15  &  0.875 & 0.103118521 2364659263 55875784663 E 01\\
-32       &  1.000 & 0.103341356 4216241049 43493552567 E 01\\
-\end{tabular}
-
-<<package DFSFUN DoubleFloatSpecialFunctions>>=
-
-        polygamma(k,z)  == CPSI(k, z)$Lisp
-        polygamma(k,x)  == RPSI(k, x)$Lisp
-
-        logGamma z      == CLNGAMMA(z)$Lisp
-        logGamma x      == RLNGAMMA(x)$Lisp
-
-        besselJ(v,z)    == CBESSELJ(v,z)$Lisp
-        besselJ(n,x)    == RBESSELJ(n,x)$Lisp
-
-        besselI(v,z)    == CBESSELI(v,z)$Lisp
-        besselI(n,x)    == RBESSELI(n,x)$Lisp
-
-        hypergeometric0F1(a,z) == CHYPER0F1(a, z)$Lisp
-        hypergeometric0F1(n,x) == retract hypergeometric0F1(n::C, x::C)
-
-
-        -- All others are defined in terms of these.
-        digamma x == polygamma(0, x)
-        digamma z == polygamma(0, z)
-
-        Beta(x,y) == Gamma(x)*Gamma(y)/Gamma(x+y)
-        Beta(w,z) == Gamma(w)*Gamma(z)/Gamma(w+z)
-
-        fuzz := (10::R)**(-7)
-
-        import IntegerRetractions(R)
-        import IntegerRetractions(C)
-
-        besselY(n,x) ==
-            if integer? n then n := n + fuzz
-            vp := n * pi()$R
-            (cos(vp) * besselJ(n,x) - besselJ(-n,x) )/sin(vp)
-        besselY(v,z) ==
-            if integer? v then v := v + fuzz::C
-            vp := v * pi()$C
-            (cos(vp) * besselJ(v,z) - besselJ(-v,z) )/sin(vp)
-
-        besselK(n,x) ==
-            if integer? n then n := n + fuzz
-            p    := pi()$R
-            vp   := n*p
-            ahalf:= 1/(2::R)
-            p * ahalf * ( besselI(-n,x) - besselI(n,x) )/sin(vp)
-        besselK(v,z) ==
-            if integer? v then v := v + fuzz::C
-            p    := pi()$C
-            vp   := v*p
-            ahalf:= 1/(2::C)
-            p * ahalf * ( besselI(-v,z) - besselI(v,z) )/sin(vp)
-
-        airyAi x ==
-            ahalf  := recip(2::R)::R
-            athird := recip(3::R)::R
-            eta := 2 * athird * (-x) ** (3*ahalf)
-            (-x)**ahalf * athird * (besselJ(-athird,eta) + besselJ(athird,eta))
-        airyAi z ==
-            ahalf  := recip(2::C)::C
-            athird := recip(3::C)::C
-            eta := 2 * athird * (-z) ** (3*ahalf)
-            (-z)**ahalf * athird * (besselJ(-athird,eta) + besselJ(athird,eta))
-
-        airyBi x ==
-            ahalf  := recip(2::R)::R
-            athird := recip(3::R)::R
-            eta := 2 * athird * (-x) ** (3*ahalf)
-            (-x*athird)**ahalf * ( besselJ(-athird,eta) - besselJ(athird,eta) )
-
-        airyBi z ==
-            ahalf  := recip(2::C)::C
-            athird := recip(3::C)::C
-            eta := 2 * athird * (-z) ** (3*ahalf)
-            (-z*athird)**ahalf * ( besselJ(-athird,eta) - besselJ(athird,eta) )
-
-@
-\section{package ORTHPOL OrthogonalPolynomialFunctions}
-<<package ORTHPOL OrthogonalPolynomialFunctions>>=
-)abbrev package ORTHPOL OrthogonalPolynomialFunctions
-++ Author: Stephen M. Watt
-++ Date Created:  1990
-++ Date Last Updated: June 25, 1991
-++ Basic Operations:
-++ Related Domains:
-++ Also See:
-++ AMS Classifications:
-++ Keywords:
-++ Examples:
-++ References:
-++ Description:
-++   This package provides orthogonal polynomials as functions on a ring.
-
-OrthogonalPolynomialFunctions(R: CommutativeRing): Exports == Impl where
-    NNI ==> NonNegativeInteger
-    RN  ==> Fraction Integer
-
-    Exports ==> with
-
-        chebyshevT: (NNI, R) -> R
-           ++ chebyshevT(n,x) is the n-th Chebyshev polynomial of the first
-           ++ kind, \spad{T[n](x)}.  These are defined by
-           ++ \spad{(1-t*x)/(1-2*t*x+t**2) = sum(T[n](x) *t**n, n = 0..)}.
-
-        chebyshevU: (NNI, R) -> R
-           ++ chebyshevU(n,x) is the n-th Chebyshev polynomial of the second
-           ++ kind, \spad{U[n](x)}. These are defined by
-           ++ \spad{1/(1-2*t*x+t**2) = sum(T[n](x) *t**n, n = 0..)}.
-
-        hermiteH:   (NNI, R) -> R
-           ++ hermiteH(n,x) is the n-th Hermite polynomial, \spad{H[n](x)}.
-           ++ These are defined by
-           ++ \spad{exp(2*t*x-t**2) = sum(H[n](x)*t**n/n!, n = 0..)}.
-
-        laguerreL:  (NNI, R) -> R
-           ++ laguerreL(n,x) is the n-th Laguerre polynomial, \spad{L[n](x)}.
-           ++ These are defined by
-           ++ \spad{exp(-t*x/(1-t))/(1-t) = sum(L[n](x)*t**n/n!, n = 0..)}.
-
-        laguerreL:  (NNI, NNI, R) -> R
-           ++ laguerreL(m,n,x) is the associated Laguerre polynomial,
-           ++ \spad{L<m>[n](x)}.  This is the m-th derivative of \spad{L[n](x)}.
-
-        if R has Algebra RN then
-            legendreP:  (NNI, R) -> R
-                ++ legendreP(n,x) is the n-th Legendre polynomial,
-                ++ \spad{P[n](x)}.  These are defined by
-                ++ \spad{1/sqrt(1-2*x*t+t**2) = sum(P[n](x)*t**n, n = 0..)}.
-
-    Impl ==> add
-        p0, p1: R
-        cx:     Integer
-
-        import IntegerCombinatoricFunctions()
-
-        laguerreL(n, x) ==
-            n = 0 => 1
-            (p1, p0) := (-x + 1, 1)
-            for i in 1..n-1 repeat
-                (p1, p0) := ((2*i::R + 1 - x)*p1 - i**2*p0, p1)
-            p1
-        laguerreL(m, n, x) ==
-            ni := n::Integer
-            mi := m::Integer
-            cx := (-1)**m * binomial(ni,ni-mi) * factorial(ni)
-            p0 := 1
-            p1 := cx::R
-            for j in 1..ni-mi repeat
-                cx := -cx*(ni-mi-j+1)
-                cx := (cx exquo ((mi+j)*j))::Integer
-                p0 := p0 * x
-                p1 := p1 + cx*p0
-            p1
-        chebyshevT(n, x) ==
-            n = 0 => 1
-            (p1, p0) := (x, 1)
-            for i in 1..n-1 repeat
-                (p1, p0) := (2*x*p1 - p0, p1)
-            p1
-        chebyshevU(n, x) ==
-            n = 0 => 1
-            (p1, p0) := (2*x, 1)
-            for i in 1..n-1 repeat
-                (p1, p0) := (2*x*p1 - p0, p1)
-            p1
-        hermiteH(n, x) ==
-            n = 0 => 1
-            (p1, p0) := (2*x, 1)
-            for i in 1..n-1 repeat
-                (p1, p0) := (2*x*p1 - 2*i*p0, p1)
-            p1
-        if R has Algebra RN then
-            legendreP(n, x) ==
-                n = 0 => 1
-                p0 := 1
-                p1 := x
-                for i in 1..n-1 repeat
-                    c: RN := 1/(i+1)
-                    (p1, p0) := (c*((2*i+1)*x*p1 - i*p0), p1)
-                p1
-
-@
-\section{package NTPOLFN NumberTheoreticPolynomialFunctions}
-<<package NTPOLFN NumberTheoreticPolynomialFunctions>>=
-)abbrev package NTPOLFN NumberTheoreticPolynomialFunctions
-++ Author: Stephen M. Watt
-++ Date Created:  1990
-++ Date Last Updated: June 25, 1991
-++ Basic Operations:
-++ Related Domains:
-++ Also See:
-++ AMS Classifications:
-++ Keywords:
-++ Examples:
-++ References:
-++ Description:
-++   This package provides polynomials as functions on a ring.
-
-NumberTheoreticPolynomialFunctions(R: CommutativeRing): Exports == Impl where
-    NNI ==> NonNegativeInteger
-    RN  ==> Fraction Integer
-
-    Exports ==> with
-
-        cyclotomic: (NNI, R) -> R
-         ++ cyclotomic(n,r) \undocumented
-
-        if R has Algebra RN then
-            bernoulliB: (NNI, R) -> R
-             ++ bernoulliB(n,r) \undocumented
-            eulerE:     (NNI, R) -> R
-             ++ eulerE(n,r) \undocumented
-
-    Impl ==> add
-
-        import PolynomialNumberTheoryFunctions()
-
-        I   ==> Integer
-        SUP ==> SparseUnivariatePolynomial
-
-        -- This is the wrong way to evaluate the polynomial.
-        cyclotomic(k, x) ==
-            p: SUP(I) := cyclotomic(k)
-            r: R      := 0
-            while p ^= 0 repeat
-                d := degree p
-                c := leadingCoefficient p
-                p := reductum p
-                r := c*x**d + r
-            r
-
-        if R has Algebra RN then
-            eulerE(k, x) ==
-                p: SUP(RN) := euler(k)
-                r: R       := 0
-                while p ^= 0 repeat
-                    d := degree p
-                    c := leadingCoefficient p
-                    p := reductum p
-                    r := c*x**d + r
-                r
-            bernoulliB(k, x) ==
-                p: SUP(RN) := bernoulli(k)
-                r: R       := 0
-                while p ^= 0 repeat
-                    d := degree p
-                    c := leadingCoefficient p
-                    p := reductum p
-                    r := c*x**d + r
-                r
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
---    - Redistributions of source code must retain the above copyright
---      notice, this list of conditions and the following disclaimer.
---
---    - Redistributions in binary form must reproduce the above copyright
---      notice, this list of conditions and the following disclaimer in
---      the documentation and/or other materials provided with the
---      distribution.
---
---    - Neither the name of The Numerical ALgorithms Group Ltd. nor the
---      names of its contributors may be used to endorse or promote products
---      derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package DFSFUN DoubleFloatSpecialFunctions>>
-<<package ORTHPOL OrthogonalPolynomialFunctions>>
-<<package NTPOLFN NumberTheoreticPolynomialFunctions>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} Segletes, Steven, B., ``A Compact Analytical Fit to the 
-Exponential Integral $E_1(x)$'', Army Research Laboratory, ARL-TR-1758,
-September 1998
-\bibitem{2} Lund, Lars Erik, ``Numlibc'',\\
-{\bf http://www.math.ntnu.no/num/nnm/Program/Numlibc}
-\bibitem{3} Haavie, T. ``expint.c'',\\
-{\bf http://www.math.ntnu.no/num/nnm/Program/Numlibc}, June, 1988
-\bibitem{4} Abramowitz and Stegun,``Handbook of Mathematical Functions'',
-Dover Publications, Inc. New York 1965. pp238-243
-\bibitem{5} Beyer, W.H. (ed.) CRC Standard Mathematical Tables. 26th
-Edition, Boca Raton: CRC Press, 1981.
-\bibitem{6} Pearson, C.E. (ed.) ``Handbook of Applied Mathematics; 
-Selected Results and Methods''. New York: van Nostrand Reinhold, 1983.
-\bibitem{7} Cody, W.J., and H.C. Thatcher, Jr. ``Rational Chebyshev
-Approximations for the Exponential Integral $E_1(x)$.''
-Mathematics of Computation, 11, pp. 641-649, 1968
-\bibitem{8} Lee, K.L.,``High-precision Chebyshev series approximation
-to the exponential integral'', NASA-TN-D-5953, A-3571, No Copyright
-Doc. ID=19700026648, Accession ID=70N35964, Aug 1970
-\bibitem{9} Harris, Frank E.: Tables of the Exponential Integral
-Ei(x). Math. Tables and Other Aids to Computation, vol. 11, 1957,
-pp.9-16 
-\bibitem{10} Miller, James; and Hurst, R.P.: Simplified Calculation of
-the Exponential Integral. Math. Tables and Other Aids to Computation,
-vol. 12, 1958, pp 187-193.
-\bibitem{11} Clenshaw, C.W.: Chebyshev Series for Mathematical
-Functions. Mathematical Tables, vol. 5, National Physical Laboratory,
-Her Majesty's Stationery Office, London, 1962, p. 29.
-\bibitem{12} Cody, W.J.; and Thacher, H.C., Jr.: Rational
-Approximations for the Exponential Integral $E_1(x)$. Math. Comp.,
-vol.22, July 1968, pp. 641-649.
-\bibitem{13} Cody, W.J.; and Thacher, H.C., Jr.: Rational
-Approximations for the Exponential Integral $Ei(x)$. Math. Comp.,
-vol.22, April 1969, pp. 289-303.
-\bibitem{14} Murnaghan, F.D.; and Wrench, J.W., Jr.: The Converging
-Factor for the Exponential Integral. Rep. 1535, David Taylor Model
-Basin Applied Mathematics Lab., Jan. 1963.
-\bibitem{16} Clenshaw, C.W.: The Numerical Solution of Linear
-Differential Equation in Chebyshev Series. Proc. Cambridge Phil. Soc.,
-vol. 53, 1957, pp 134-149
-\bibitem{17} Fox, L.; and Parker, I.B.: Chebyshev Polynomials in
-Numerical Analysis. Oxford Univ. Press, London, 1968.
-\bibitem{18} Jeffrey, Alan ``Handbook of Mathematical Formulas and
-Integrals'' Elsevier Academic Press 2004 3rd Edition ISBN
-0-12-382256-4 pp167-171
-\bibitem{19} Press, William, et.al., ``Numerical Recipes in C''
-Press Syndicate Univ. of Cambridge, 1995 ISBN 0-521-43108-5 
-pp190-194
-\bibitem{20} Press, William, et.al., ``Numerical Recipes in C''
-Press Syndicate Univ. of Cambridge, 1995 ISBN 0-521-43108-5 
-p196
-\bibitem{21} Press, William, et.al., ``Numerical Recipes in C''
-Press Syndicate Univ. of Cambridge, 1995 ISBN 0-521-43108-5 
-p222-225
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/sregset.spad.pamphlet b/src/algebra/sregset.spad.pamphlet
deleted file mode 100644
index 9bfe286..0000000
--- a/src/algebra/sregset.spad.pamphlet
+++ /dev/null
@@ -1,1171 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/algebra sregset.spad}
-\author{Marc Moreno Maza}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package SFQCMPK SquareFreeQuasiComponentPackage}
-<<package SFQCMPK SquareFreeQuasiComponentPackage>>=
-)abbrev package SFQCMPK SquareFreeQuasiComponentPackage
-++ Author: Marc Moreno Maza
-++ Date Created: 09/23/1998
-++ Date Last Updated: 12/16/1998
-++ Basic Functions:
-++ Related Constructors:
-++ Also See: 
-++ AMS Classifications:
-++ Keywords:
-++ Description: 
-++   A internal package for removing redundant quasi-components and redundant
-++   branches when decomposing a variety by means of quasi-components
-++   of regular triangular sets. \newline
-++ References :
-++  [1] D. LAZARD "A new method for solving algebraic systems of 
-++      positive dimension" Discr. App. Math. 33:147-160,1991
-++      Tech. Report (PoSSo project)
-++  [2] M. MORENO MAZA "Calculs de pgcd au-dessus des tours
-++      d'extensions simples et resolution des systemes d'equations
-++      algebriques" These, Universite P.etM. Curie, Paris, 1997.
-++  [3] M. MORENO MAZA "A new algorithm for computing triangular
-++      decomposition of algebraic varieties" NAG Tech. Rep. 4/98.
-++ Version: 1. 
-
-SquareFreeQuasiComponentPackage(R,E,V,P,TS): Exports == Implementation where
-
-  R : GcdDomain
-  E : OrderedAbelianMonoidSup
-  V : OrderedSet
-  P : RecursivePolynomialCategory(R,E,V)
-  TS : RegularTriangularSetCategory(R,E,V,P)
-  N ==> NonNegativeInteger
-  Z ==> Integer
-  B ==> Boolean
-  S ==> String
-  LP ==> List P
-  PtoP ==> P -> P
-  PS ==> GeneralPolynomialSet(R,E,V,P)
-  PWT ==> Record(val : P, tower : TS)
-  BWT ==> Record(val : Boolean, tower : TS)
-  LpWT ==> Record(val : (List P), tower : TS)
-  Branch ==> Record(eq: List P, tower: TS, ineq: List P)
-  UBF ==> Union(Branch,"failed")
-  Split ==> List TS
-  Key ==>  Record(left:TS, right:TS)
-  Entry ==> Boolean
-  H ==> TabulatedComputationPackage(Key, Entry)
-  polsetpack ==> PolynomialSetUtilitiesPackage(R,E,V,P)
-  SQUAREFREE ==> SquareFreeRegularTriangularSetCategory(R,E,V,P)
-
-  Exports ==  with
-     startTable!: (S,S,S) -> Void
-         ++ \axiom{startTableGcd!(s1,s2,s3)} 
-         ++ is an internal subroutine, exported only for developement.
-     stopTable!: () -> Void
-         ++ \axiom{stopTableGcd!()} 
-         ++ is an internal subroutine, exported only for developement.
-     supDimElseRittWu?: (TS,TS) -> Boolean
-         ++ \axiom{supDimElseRittWu(ts,us)} returns true iff \axiom{ts}
-         ++ has less elements than \axiom{us} otherwise if \axiom{ts}
-         ++ has higher rank than \axiom{us} w.r.t. Riit and Wu ordering.
-     algebraicSort: Split -> Split
-         ++ \axiom{algebraicSort(lts)} sorts \axiom{lts} w.r.t 
-         ++ \axiomOpFrom{supDimElseRittWu}{QuasiComponentPackage}.
-     moreAlgebraic?: (TS,TS) -> Boolean
-         ++ \axiom{moreAlgebraic?(ts,us)} returns false iff \axiom{ts}
-         ++ and \axiom{us} are both empty, or \axiom{ts}
-         ++ has less elements than \axiom{us}, or some variable is
-         ++ algebraic w.r.t. \axiom{us} and is not w.r.t. \axiom{ts}.
-     subTriSet?: (TS,TS) -> Boolean
-         ++ \axiom{subTriSet?(ts,us)} returns true iff \axiom{ts} is
-         ++ a sub-set of \axiom{us}.
-     subPolSet?: (LP, LP) -> Boolean
-         ++ \axiom{subPolSet?(lp1,lp2)} returns true iff \axiom{lp1} is
-         ++ a sub-set of \axiom{lp2}.
-     internalSubPolSet?: (LP, LP) -> Boolean
-         ++ \axiom{internalSubPolSet?(lp1,lp2)} returns true iff \axiom{lp1} is
-         ++ a sub-set of \axiom{lp2} assuming that these lists are sorted
-         ++ increasingly w.r.t. \axiomOpFrom{infRittWu?}{RecursivePolynomialCategory}.
-     internalInfRittWu?: (LP, LP) -> Boolean
-         ++ \axiom{internalInfRittWu?(lp1,lp2)}
-         ++ is an internal subroutine, exported only for developement.
-     infRittWu?: (LP, LP) -> Boolean
-         ++ \axiom{infRittWu?(lp1,lp2)}
-         ++ is an internal subroutine, exported only for developement.
-     internalSubQuasiComponent?: (TS,TS) -> Union(Boolean,"failed")
-         ++ \axiom{internalSubQuasiComponent?(ts,us)} returns a boolean \spad{b} value
-         ++ if the fact the regular zero set of \axiom{us} contains that of
-         ++ \axiom{ts} can be decided (and in that case \axiom{b} gives this 
-         ++ inclusion) otherwise returns \axiom{"failed"}.
-     subQuasiComponent?: (TS,TS) -> Boolean
-         ++ \axiom{subQuasiComponent?(ts,us)} returns true iff 
-         ++ \axiomOpFrom{internalSubQuasiComponent?(ts,us)}{QuasiComponentPackage}
-         ++ returs true.
-     subQuasiComponent?: (TS,Split) -> Boolean
-         ++ \axiom{subQuasiComponent?(ts,lus)} returns true iff
-         ++ \axiom{subQuasiComponent?(ts,us)} holds for one \spad{us} in \spad{lus}.
-     removeSuperfluousQuasiComponents: Split -> Split
-         ++ \axiom{removeSuperfluousQuasiComponents(lts)} removes from \axiom{lts}
-         ++ any \spad{ts} such that \axiom{subQuasiComponent?(ts,us)} holds for 
-         ++ another \spad{us} in \axiom{lts}.
-     subCase?: (LpWT,LpWT) -> Boolean
-         ++ \axiom{subCase?(lpwt1,lpwt2)}
-         ++ is an internal subroutine, exported only for developement.
-     removeSuperfluousCases: List LpWT -> List LpWT
-         ++ \axiom{removeSuperfluousCases(llpwt)}
-         ++ is an internal subroutine, exported only for developement.
-     prepareDecompose: (LP, List(TS),B,B) -> List Branch
-         ++ \axiom{prepareDecompose(lp,lts,b1,b2)}
-         ++ is an internal subroutine, exported only for developement.
-     branchIfCan: (LP,TS,LP,B,B,B,B,B) -> Union(Branch,"failed")
-         ++ \axiom{branchIfCan(leq,ts,lineq,b1,b2,b3,b4,b5)}
-         ++ is an internal subroutine, exported only for developement.
-
-  Implementation == add
-
-     squareFreeFactors(lp: LP): LP == 
-       lsflp: LP := []
-       for p in lp repeat 
-         lsfp := squareFreeFactors(p)$polsetpack
-         lsflp := concat(lsfp,lsflp)
-       sort(infRittWu?,removeDuplicates lsflp)
-
-     startTable!(ok: S, ko: S, domainName: S): Void == 
-       initTable!()$H
-       if (not empty? ok) and (not empty? ko) then printInfo!(ok,ko)$H
-       if (not empty? domainName) then startStats!(domainName)$H
-       void()
-
-     stopTable!(): Void ==   
-       if makingStats?()$H then printStats!()$H
-       clearTable!()$H
-
-     supDimElseRittWu? (ts:TS,us:TS): Boolean ==
-       #ts < #us => true
-       #ts > #us => false
-       lp1 :LP := members(ts)
-       lp2 :LP := members(us)
-       while (not empty? lp1) and (not infRittWu?(first(lp2),first(lp1))) repeat
-         lp1 := rest lp1
-         lp2 := rest lp2
-       not empty? lp1
-
-     algebraicSort (lts:Split): Split ==
-       lts := removeDuplicates lts
-       sort(supDimElseRittWu?,lts)
-
-     moreAlgebraic?(ts:TS,us:TS): Boolean  ==
-       empty? ts => empty? us 
-       empty? us => true
-       #ts < #us => false
-       for p in (members us) repeat 
-          not algebraic?(mvar(p),ts) => return false
-       true
-
-     subTriSet?(ts:TS,us:TS): Boolean  ==
-       empty? ts => true
-       empty? us => false
-       mvar(ts) > mvar(us) => false
-       mvar(ts) < mvar(us) => subTriSet?(ts,rest(us)::TS)
-       first(ts)::P = first(us)::P => subTriSet?(rest(ts)::TS,rest(us)::TS)
-       false
-
-     internalSubPolSet?(lp1: LP, lp2: LP): Boolean  ==
-       empty? lp1 => true
-       empty? lp2 => false
-       associates?(first lp1, first lp2) => 
-         internalSubPolSet?(rest lp1, rest lp2)
-       infRittWu?(first lp1, first lp2) => false
-       internalSubPolSet?(lp1, rest lp2)
-
-     subPolSet?(lp1: LP, lp2: LP): Boolean  ==
-       lp1 := sort(infRittWu?, lp1)
-       lp2 := sort(infRittWu?, lp2)
-       internalSubPolSet?(lp1,lp2)
-
-     infRittWu?(lp1: LP, lp2: LP): Boolean ==
-       lp1 := sort(infRittWu?, lp1)
-       lp2 := sort(infRittWu?, lp2)
-       internalInfRittWu?(lp1,lp2)
-
-     internalInfRittWu?(lp1: LP, lp2: LP): Boolean ==
-       empty? lp1 => not empty? lp2
-       empty? lp2 => false
-       infRittWu?(first lp1, first lp2)$P => true
-       infRittWu?(first lp2, first lp1)$P => false
-       infRittWu?(rest lp1, rest lp2)$$
-
-     subCase? (lpwt1:LpWT,lpwt2:LpWT): Boolean == 
-       -- ASSUME lpwt.{1,2}.val is sorted w.r.t. infRittWu?
-       not internalSubPolSet?(lpwt2.val, lpwt1.val) => false
-       subQuasiComponent?(lpwt1.tower,lpwt2.tower)
-
-     if TS has SquareFreeRegularTriangularSetCategory(R,E,V,P)
-     then
-
-       internalSubQuasiComponent?(ts:TS,us:TS): Union(Boolean,"failed") ==
-         subTriSet?(us,ts) => true
-         not moreAlgebraic?(ts,us) => false::Union(Boolean,"failed")
-         for p in (members us) repeat 
-           mdeg(p) < mdeg(select(ts,mvar(p))::P) => 
-             return("failed"::Union(Boolean,"failed"))
-         for p in (members us) repeat 
-           not zero? initiallyReduce(p,ts) =>
-             return("failed"::Union(Boolean,"failed"))
-         lsfp := squareFreeFactors(initials us)
-         for p in lsfp repeat 
-           b: B := invertible?(p,ts)$TS
-           not b => 
-             return(false::Union(Boolean,"failed"))
-         true::Union(Boolean,"failed")
-
-     else
-
-       internalSubQuasiComponent?(ts:TS,us:TS): Union(Boolean,"failed") ==
-         subTriSet?(us,ts) => true
-         not moreAlgebraic?(ts,us) => false::Union(Boolean,"failed")
-         for p in (members us) repeat 
-           mdeg(p) < mdeg(select(ts,mvar(p))::P) => 
-             return("failed"::Union(Boolean,"failed"))
-         for p in (members us) repeat 
-           not zero? reduceByQuasiMonic(p,ts) =>
-             return("failed"::Union(Boolean,"failed"))
-         true::Union(Boolean,"failed")
-
-     subQuasiComponent?(ts:TS,us:TS): Boolean ==
-       k: Key := [ts, us]
-       e := extractIfCan(k)$H
-       e case Entry => e::Entry
-       ubf: Union(Boolean,"failed") := internalSubQuasiComponent?(ts,us)
-       b: Boolean := (ubf case Boolean) and (ubf::Boolean)
-       insert!(k,b)$H
-       b
-
-     subQuasiComponent?(ts:TS,lus:Split): Boolean ==
-       for us in lus repeat
-          subQuasiComponent?(ts,us)@B => return true
-       false
-
-     removeSuperfluousCases (cases:List LpWT) ==
-       #cases < 2 => cases
-       toSee := sort(supDimElseRittWu?(#1.tower,#2.tower),cases)
-       lpwt1,lpwt2 : LpWT
-       toSave,headmaxcases,maxcases,copymaxcases : List LpWT
-       while not empty? toSee repeat
-         lpwt1 := first toSee
-         toSee := rest toSee
-         toSave := []
-         for lpwt2 in toSee repeat
-            if subCase?(lpwt1,lpwt2) 
-              then
-                lpwt1 := lpwt2
-              else
-                if not subCase?(lpwt2,lpwt1) 
-                  then
-                    toSave := cons(lpwt2,toSave)
-         if empty? maxcases
-           then
-             headmaxcases := [lpwt1]
-             maxcases := headmaxcases
-           else
-             copymaxcases := maxcases
-             while (not empty? copymaxcases) and _
-               (not subCase?(lpwt1,first(copymaxcases))) repeat
-                 copymaxcases := rest copymaxcases
-             if empty? copymaxcases
-               then
-                 setrest!(headmaxcases,[lpwt1])
-                 headmaxcases := rest headmaxcases
-         toSee := reverse toSave
-       maxcases
-
-     removeSuperfluousQuasiComponents(lts: Split): Split ==
-       lts := removeDuplicates lts
-       #lts < 2 => lts
-       toSee := algebraicSort lts
-       toSave,headmaxlts,maxlts,copymaxlts : Split
-       while not empty? toSee repeat
-         ts := first toSee
-         toSee := rest toSee
-         toSave := []
-         for us in toSee repeat
-            if subQuasiComponent?(ts,us)@B
-              then
-                ts := us
-              else
-                if not subQuasiComponent?(us,ts)@B 
-                  then
-                    toSave := cons(us,toSave)
-         if empty? maxlts
-           then
-             headmaxlts := [ts]
-             maxlts := headmaxlts
-           else
-             copymaxlts := maxlts
-             while (not empty? copymaxlts) and _
-               (not subQuasiComponent?(ts,first(copymaxlts))@B) repeat
-                 copymaxlts := rest copymaxlts
-             if empty? copymaxlts
-               then
-                 setrest!(headmaxlts,[ts])
-                 headmaxlts := rest headmaxlts
-         toSee := reverse toSave
-       algebraicSort maxlts
-
-     removeAssociates (lp:LP):LP ==
-       removeDuplicates [primitivePart(p) for p in lp]
-
-     branchIfCan(leq: LP,ts: TS,lineq: LP, b1:B,b2:B,b3:B,b4:B,b5:B):UBF ==
-        -- ASSUME pols in leq are squarefree and mainly primitive
-        -- if b1 then CLEAN UP leq
-        -- if b2 then CLEAN UP lineq
-        -- if b3 then SEARCH for ZERO in lineq with leq
-        -- if b4 then SEARCH for ZERO in lineq with ts
-        -- if b5 then SEARCH for ONE in leq with lineq
-        if b1 
-          then 
-            leq := removeAssociates(leq)
-            leq := remove(zero?,leq)
-            any?(ground?,leq) => 
-              return("failed"::Union(Branch,"failed"))
-        if b2
-          then
-            any?(zero?,lineq) =>
-              return("failed"::Union(Branch,"failed"))
-            lineq := removeRedundantFactors(lineq)$polsetpack
-        if b3
-          then
-            ps: PS := construct(leq)$PS
-            for q in lineq repeat
-              zero? remainder(q,ps).polnum =>
-                return("failed"::Union(Branch,"failed"))
-        (empty? leq) or (empty? lineq) => ([leq, ts, lineq]$Branch)::UBF
-        if b4
-          then
-            for q in lineq repeat
-              zero? initiallyReduce(q,ts) => 
-                return("failed"::Union(Branch,"failed"))
-        if b5
-          then
-            newleq: LP := []
-            for p in leq repeat
-              for q in lineq repeat
-                if mvar(p) = mvar(q)
-                  then
-                    g := gcd(p,q)
-                    newp := (p exquo g)::P
-                    ground? newp => 
-                      return("failed"::Union(Branch,"failed"))
-                    newleq := cons(newp,newleq)
-                  else
-                    newleq := cons(p,newleq)
-            leq := newleq
-        leq := sort(infRittWu?, removeDuplicates leq)
-        ([leq, ts, lineq]$Branch)::UBF
-
-     prepareDecompose(lp: LP, lts: List(TS), b1: B, b2: B): List Branch ==
-       -- if b1 then REMOVE REDUNDANT COMPONENTS in lts
-       -- if b2 then SPLIT the input system with squareFree
-       lp := sort(infRittWu?, remove(zero?,removeAssociates(lp)))
-       any?(ground?,lp) => []
-       empty? lts => []
-       if b1 then lts := removeSuperfluousQuasiComponents lts
-       not b2 =>
-         [[lp,ts,squareFreeFactors(initials ts)]$Branch for ts in lts]
-       toSee: List Branch 
-       lq: LP := []         
-       toSee := [[lq,ts,squareFreeFactors(initials ts)]$Branch for ts in lts]
-       empty? lp => toSee
-       for p in lp repeat
-         lsfp := squareFreeFactors(p)$polsetpack
-         branches: List Branch := []
-         lq := []
-         for f in lsfp repeat
-           for branch in toSee repeat
-             leq : LP := branch.eq
-             ts := branch.tower
-             lineq : LP := branch.ineq
-             ubf1: UBF := branchIfCan(leq,ts,lq,false,false,true,true,true)@UBF
-             ubf1 case "failed" => "leave"
-             ubf2: UBF := branchIfCan([f],ts,lineq,false,false,true,true,true)@UBF
-             ubf2 case "failed" => "leave"
-             leq := sort(infRittWu?,removeDuplicates concat(ubf1.eq,ubf2.eq))
-             lineq := sort(infRittWu?,removeDuplicates concat(ubf1.ineq,ubf2.ineq))
-             newBranch := branchIfCan(leq,ts,lineq,false,false,false,false,false)
-             branches:= cons(newBranch::Branch,branches)
-           lq := cons(f,lq)
-         toSee := branches
-       sort(supDimElseRittWu?(#1.tower,#2.tower),toSee)
-
-@
-\section{package SFRGCD SquareFreeRegularTriangularSetGcdPackage}
-<<package SFRGCD SquareFreeRegularTriangularSetGcdPackage>>=
-)abbrev package SFRGCD SquareFreeRegularTriangularSetGcdPackage
-++ Author: Marc Moreno Maza
-++ Date Created: 09/23/1998
-++ Date Last Updated: 10/01/1998
-++ Basic Functions:
-++ Related Constructors:
-++ Also See: 
-++ AMS Classifications:
-++ Keywords:
-++ Description: 
-++ A internal package for computing gcds and resultants of univariate polynomials
-++ with coefficients in a tower of simple extensions of a field.
-++ There is no need to use directly this package since its main operations are
-++ available from \spad{TS}. \newline
-++ References :
-++  [1] M. MORENO MAZA and R. RIOBOO "Computations of gcd over
-++      algebraic towers of simple extensions" In proceedings of AAECC11
-++      Paris, 1995.
-++  [2] M. MORENO MAZA "Calculs de pgcd au-dessus des tours
-++      d'extensions simples et resolution des systemes d'equations
-++      algebriques" These, Universite P.etM. Curie, Paris, 1997.
-++  [3] M. MORENO MAZA "A new algorithm for computing triangular
-++      decomposition of algebraic varieties" NAG Tech. Rep. 4/98.
-++ Version: 1. 
-
-SquareFreeRegularTriangularSetGcdPackage(R,E,V,P,TS): Exports == Implementation where
-
-  R : GcdDomain
-  E : OrderedAbelianMonoidSup
-  V : OrderedSet
-  P : RecursivePolynomialCategory(R,E,V)
-  TS : RegularTriangularSetCategory(R,E,V,P)
-  N ==> NonNegativeInteger
-  Z ==> Integer
-  B ==> Boolean
-  S ==> String
-  LP ==> List P
-  PtoP ==> P -> P
-  PS ==> GeneralPolynomialSet(R,E,V,P)
-  PWT ==> Record(val : P, tower : TS)
-  BWT ==> Record(val : Boolean, tower : TS)
-  LpWT ==> Record(val : (List P), tower : TS)
-  Branch ==> Record(eq: List P, tower: TS, ineq: List P)
-  UBF ==> Union(Branch,"failed")
-  Split ==> List TS
-  KeyGcd ==> Record(arg1: P, arg2: P, arg3: TS, arg4: B)
-  EntryGcd ==> List PWT
-  HGcd ==> TabulatedComputationPackage(KeyGcd, EntryGcd)
-  KeyInvSet ==> Record(arg1: P, arg3: TS)
-  EntryInvSet ==> List TS
-  HInvSet ==> TabulatedComputationPackage(KeyInvSet, EntryInvSet)
-  iprintpack ==> InternalPrintPackage()
-  polsetpack ==> PolynomialSetUtilitiesPackage(R,E,V,P)
-  quasicomppack ==> SquareFreeQuasiComponentPackage(R,E,V,P,TS)
-
-  SQUAREFREE ==> SquareFreeRegularTriangularSetCategory(R,E,V,P)
-
-  Exports ==  with
-     startTableGcd!: (S,S,S) -> Void
-     stopTableGcd!: () -> Void
-     startTableInvSet!: (S,S,S) -> Void
-     stopTableInvSet!: () -> Void
-     stosePrepareSubResAlgo: (P,P,TS) -> List LpWT 
-     stoseInternalLastSubResultant: (P,P,TS,B,B) -> List PWT 
-     stoseInternalLastSubResultant: (List LpWT,V,B) -> List PWT 
-     stoseIntegralLastSubResultant: (P,P,TS) -> List PWT 
-     stoseLastSubResultant: (P,P,TS) -> List PWT 
-     stoseInvertible?: (P,TS) -> B
-     stoseInvertible?_sqfreg: (P,TS) -> List BWT
-     stoseInvertibleSet_sqfreg: (P,TS) -> Split
-     stoseInvertible?_reg: (P,TS) -> List BWT
-     stoseInvertibleSet_reg: (P,TS) -> Split
-     stoseInvertible?: (P,TS) -> List BWT
-     stoseInvertibleSet: (P,TS) -> Split
-     stoseSquareFreePart: (P,TS) -> List PWT 
-
-  Implementation == add
-
-     startTableGcd!(ok: S, ko: S, domainName: S): Void == 
-       initTable!()$HGcd
-       printInfo!(ok,ko)$HGcd
-       startStats!(domainName)$HGcd
-       void()
-
-     stopTableGcd!(): Void ==   
-       if makingStats?()$HGcd then printStats!()$HGcd
-       clearTable!()$HGcd
-
-     startTableInvSet!(ok: S, ko: S, domainName: S): Void == 
-       initTable!()$HInvSet
-       printInfo!(ok,ko)$HInvSet
-       startStats!(domainName)$HInvSet
-       void()
-
-     stopTableInvSet!(): Void ==   
-       if makingStats?()$HInvSet then printStats!()$HInvSet
-       clearTable!()$HInvSet
-
-     stoseInvertible?(p:P,ts:TS): Boolean == 
-       q := primitivePart initiallyReduce(p,ts)
-       zero? q => false
-       normalized?(q,ts) => true
-       v := mvar(q)
-       not algebraic?(v,ts) => 
-         toCheck: List BWT := stoseInvertible?(p,ts)@(List BWT)
-         for bwt in toCheck repeat
-           bwt.val = false => return false
-         return true
-       ts_v := select(ts,v)::P
-       ts_v_- := collectUnder(ts,v)
-       lgwt := stoseInternalLastSubResultant(ts_v,q,ts_v_-,false,true)
-       for gwt in lgwt repeat
-         g := gwt.val; 
-         (not ground? g) and (mvar(g) = v) => 
-           return false
-       true
-
-     stosePrepareSubResAlgo(p1:P,p2:P,ts:TS): List LpWT ==
-       -- ASSUME mvar(p1) = mvar(p2) > mvar(ts) and mdeg(p1) >= mdeg(p2)
-       -- ASSUME init(p1) invertible modulo ts !!!
-       toSee: List LpWT := [[[p1,p2],ts]$LpWT]
-       toSave: List LpWT := []
-       v := mvar(p1)
-       while (not empty? toSee) repeat
-         lpwt := first toSee; toSee := rest toSee
-         p1 := lpwt.val.1; p2 := lpwt.val.2
-         ts := lpwt.tower
-         lbwt := stoseInvertible?(leadingCoefficient(p2,v),ts)@(List BWT)
-         for bwt in lbwt repeat
-           (bwt.val = true) and (degree(p2,v) > 0) =>
-             p3 := prem(p1, -p2)
-             s: P := init(p2)**(mdeg(p1) - mdeg(p2))::N
-             toSave := cons([[p2,p3,s],bwt.tower]$LpWT,toSave)
-           -- p2 := initiallyReduce(p2,bwt.tower)
-           newp2 := primitivePart initiallyReduce(p2,bwt.tower)
-           (bwt.val = true) =>
-             -- toSave := cons([[p2,0,1],bwt.tower]$LpWT,toSave)
-             toSave := cons([[p2,0,1],bwt.tower]$LpWT,toSave)
-           -- zero? p2 => 
-           zero? newp2 => 
-             toSave := cons([[p1,0,1],bwt.tower]$LpWT,toSave)
-           -- toSee := cons([[p1,p2],bwt.tower]$LpWT,toSee)
-           toSee := cons([[p1,newp2],bwt.tower]$LpWT,toSee)
-       toSave
-
-     stoseIntegralLastSubResultant(p1:P,p2:P,ts:TS): List PWT ==
-       -- ASSUME mvar(p1) = mvar(p2) > mvar(ts) and mdeg(p1) >= mdeg(p2)
-       -- ASSUME p1 and p2 have no algebraic coefficients
-       lsr := lastSubResultant(p1, p2)
-       ground?(lsr) => [[lsr,ts]$PWT]
-       mvar(lsr) < mvar(p1) => [[lsr,ts]$PWT]
-       gi1i2 := gcd(init(p1),init(p2))
-       ex: Union(P,"failed") := (gi1i2 * lsr) exquo$P init(lsr)
-       ex case "failed" => [[lsr,ts]$PWT]
-       [[ex::P,ts]$PWT]
-            
-     stoseInternalLastSubResultant(p1:P,p2:P,ts:TS,b1:B,b2:B): List PWT ==
-       -- ASSUME mvar(p1) = mvar(p2) > mvar(ts) and mdeg(p1) >= mdeg(p2)
-       -- if b1 ASSUME init(p2) invertible w.r.t. ts
-       -- if b2 BREAK with the first non-trivial gcd 
-       k: KeyGcd := [p1,p2,ts,b2]
-       e := extractIfCan(k)$HGcd
-       e case EntryGcd => e::EntryGcd
-       toSave: List PWT 
-       empty? ts => 
-         toSave := stoseIntegralLastSubResultant(p1,p2,ts)
-         insert!(k,toSave)$HGcd
-         return toSave
-       toSee: List LpWT 
-       if b1
-         then
-           p3 := prem(p1, -p2)
-           s: P := init(p2)**(mdeg(p1) - mdeg(p2))::N
-           toSee := [[[p2,p3,s],ts]$LpWT]
-         else
-           toSee := stosePrepareSubResAlgo(p1,p2,ts)
-       toSave := stoseInternalLastSubResultant(toSee,mvar(p1),b2)
-       insert!(k,toSave)$HGcd
-       toSave
-
-     stoseInternalLastSubResultant(llpwt: List LpWT,v:V,b2:B): List PWT ==
-       toReturn: List PWT := []; toSee: List LpWT; 
-       while (not empty? llpwt) repeat
-         toSee := llpwt; llpwt := []
-         -- CONSIDER FIRST the vanishing current last subresultant
-         for lpwt in toSee repeat 
-           p1 := lpwt.val.1; p2 := lpwt.val.2; s := lpwt.val.3; ts := lpwt.tower
-           lbwt := stoseInvertible?(leadingCoefficient(p2,v),ts)@(List BWT)
-           for bwt in lbwt repeat
-             bwt.val = false => 
-               toReturn := cons([p1,bwt.tower]$PWT, toReturn)
-               b2 and positive?(degree(p1,v)) => return toReturn
-             llpwt := cons([[p1,p2,s],bwt.tower]$LpWT, llpwt)
-         empty? llpwt => "leave"
-         -- CONSIDER NOW the branches where the computations continue
-         toSee := llpwt; llpwt := []
-         lpwt := first toSee; toSee := rest toSee
-         p1 := lpwt.val.1; p2 := lpwt.val.2; s := lpwt.val.3
-         delta: N := (mdeg(p1) - degree(p2,v))::N
-         p3: P := LazardQuotient2(p2, leadingCoefficient(p2,v), s, delta)
-         zero?(degree(p3,v)) =>
-           toReturn := cons([p3,lpwt.tower]$PWT, toReturn)
-           for lpwt in toSee repeat 
-             toReturn := cons([p3,lpwt.tower]$PWT, toReturn)
-         (p1, p2) := (p3, next_subResultant2(p1, p2, p3, s))
-         s := leadingCoefficient(p1,v)
-         llpwt := cons([[p1,p2,s],lpwt.tower]$LpWT, llpwt)
-         for lpwt in toSee repeat 
-           llpwt := cons([[p1,p2,s],lpwt.tower]$LpWT, llpwt)
-       toReturn
-
-     stoseLastSubResultant(p1:P,p2:P,ts:TS): List PWT ==
-       ground? p1 => 
-         error"in stoseLastSubResultantElseSplit$SFRGCD  : bad #1"
-       ground? p2 => 
-         error"in stoseLastSubResultantElseSplit$SFRGCD : bad #2"
-       not (mvar(p2) = mvar(p1)) => 
-         error"in stoseLastSubResultantElseSplit$SFRGCD : bad #2"
-       algebraic?(mvar(p1),ts) =>
-         error"in stoseLastSubResultantElseSplit$SFRGCD : bad #1"
-       not initiallyReduced?(p1,ts) => 
-         error"in stoseLastSubResultantElseSplit$SFRGCD : bad #1"
-       not initiallyReduced?(p2,ts) => 
-         error"in stoseLastSubResultantElseSplit$SFRGCD : bad #2"
-       purelyTranscendental?(p1,ts) and purelyTranscendental?(p2,ts) =>
-         stoseIntegralLastSubResultant(p1,p2,ts)
-       if mdeg(p1) < mdeg(p2) then 
-          (p1, p2) := (p2, p1)
-          if odd?(mdeg(p1)) and odd?(mdeg(p2)) then p2 := - p2
-       stoseInternalLastSubResultant(p1,p2,ts,false,false)
-
-     stoseSquareFreePart_wip(p:P, ts: TS): List PWT ==
-     -- ASSUME p is not constant and mvar(p) > mvar(ts)
-     -- ASSUME init(p) is invertible w.r.t. ts
-     -- ASSUME p is mainly primitive
---       one? mdeg(p) => [[p,ts]$PWT]
-       mdeg(p) = 1 => [[p,ts]$PWT]
-       v := mvar(p)$P
-       q: P := mainPrimitivePart D(p,v)
-       lgwt: List PWT := stoseInternalLastSubResultant(p,q,ts,true,false)
-       lpwt : List PWT := []
-       sfp : P
-       for gwt in lgwt repeat
-         g := gwt.val; us := gwt.tower
-         (ground? g) or (mvar(g) < v) =>
-           lpwt := cons([p,us],lpwt)
-         g := mainPrimitivePart g
-         sfp := lazyPquo(p,g)
-         sfp := mainPrimitivePart stronglyReduce(sfp,us)
-         lpwt := cons([sfp,us],lpwt)
-       lpwt
-
-     stoseSquareFreePart_base(p:P, ts: TS): List PWT == [[p,ts]$PWT]
-
-     stoseSquareFreePart(p:P, ts: TS): List PWT == stoseSquareFreePart_wip(p,ts)
-       
-     stoseInvertible?_sqfreg(p:P,ts:TS): List BWT ==
-       --iprint("+")$iprintpack
-       q := primitivePart initiallyReduce(p,ts)
-       zero? q => [[false,ts]$BWT]
-       normalized?(q,ts) => [[true,ts]$BWT]
-       v := mvar(q)
-       not algebraic?(v,ts) => 
-         lbwt: List BWT := []
-         toCheck: List BWT := stoseInvertible?_sqfreg(init(q),ts)@(List BWT)
-         for bwt in toCheck repeat
-           bwt.val => lbwt := cons(bwt,lbwt)
-           newq := removeZero(q,bwt.tower)
-           zero? newq => lbwt := cons(bwt,lbwt)
-           lbwt := concat(stoseInvertible?_sqfreg(newq,bwt.tower)@(List BWT), lbwt)
-         return lbwt
-       ts_v := select(ts,v)::P
-       ts_v_- := collectUnder(ts,v)
-       ts_v_+ := collectUpper(ts,v)
-       lgwt := stoseInternalLastSubResultant(ts_v,q,ts_v_-,false,false)
-       lbwt: List BWT := []
-       lts, lts_g, lts_h: Split
-       for gwt in lgwt repeat
-         g := gwt.val; ts := gwt.tower
-         (ground? g) or (mvar(g) < v) => 
-           lts := augment(ts_v,ts)$TS
-           lts := augment(members(ts_v_+),lts)$TS
-           for ts in lts repeat
-             lbwt := cons([true, ts]$BWT,lbwt)
-         g := mainPrimitivePart g
-         lts_g := augment(g,ts)$TS
-         lts_g := augment(members(ts_v_+),lts_g)$TS
-         -- USE stoseInternalAugment with parameters ??
-         for ts_g in lts_g repeat
-           lbwt := cons([false, ts_g]$BWT,lbwt)
-         h := lazyPquo(ts_v,g)
-         (ground? h) or (mvar(h) < v) => "leave"
-         h := mainPrimitivePart h
-         lts_h := augment(h,ts)$TS
-         lts_h := augment(members(ts_v_+),lts_h)$TS
-         -- USE stoseInternalAugment with parameters ??
-         for ts_h in lts_h repeat
-           lbwt := cons([true, ts_h]$BWT,lbwt)
-       sort(#1.val < #2.val,lbwt)
-
-     stoseInvertibleSet_sqfreg(p:P,ts:TS): Split ==
-       --iprint("*")$iprintpack
-       k: KeyInvSet := [p,ts]
-       e := extractIfCan(k)$HInvSet
-       e case EntryInvSet => e::EntryInvSet
-       q := primitivePart initiallyReduce(p,ts)
-       zero? q => []
-       normalized?(q,ts) => [ts]
-       v := mvar(q)
-       toSave: Split := []
-       not algebraic?(v,ts) => 
-         toCheck: List BWT := stoseInvertible?_sqfreg(init(q),ts)@(List BWT)
-         for bwt in toCheck repeat
-           bwt.val => toSave := cons(bwt.tower,toSave)
-           newq := removeZero(q,bwt.tower)
-           zero? newq => "leave"
-           toSave := concat(stoseInvertibleSet_sqfreg(newq,bwt.tower), toSave)
-         toSave := removeDuplicates toSave
-         return algebraicSort(toSave)$quasicomppack
-       ts_v := select(ts,v)::P
-       ts_v_- := collectUnder(ts,v)
-       ts_v_+ := collectUpper(ts,v)
-       lgwt := stoseInternalLastSubResultant(ts_v,q,ts_v_-,false,false)
-       lts, lts_h: Split
-       for gwt in lgwt repeat
-         g := gwt.val; ts := gwt.tower
-         (ground? g) or (mvar(g) < v) => 
-           lts := augment(ts_v,ts)$TS
-           lts := augment(members(ts_v_+),lts)$TS
-           toSave := concat(lts,toSave)
-         g := mainPrimitivePart g
-         h := lazyPquo(ts_v,g)
-         h := mainPrimitivePart h
-         (ground? h) or (mvar(h) < v) => "leave"
-         lts_h := augment(h,ts)$TS
-         lts_h := augment(members(ts_v_+),lts_h)$TS
-         toSave := concat(lts_h,toSave)
-       toSave := algebraicSort(toSave)$quasicomppack
-       insert!(k,toSave)$HInvSet
-       toSave
-       
-     stoseInvertible?_reg(p:P,ts:TS): List BWT ==
-       --iprint("-")$iprintpack
-       q := primitivePart initiallyReduce(p,ts)
-       zero? q => [[false,ts]$BWT]
-       normalized?(q,ts) => [[true,ts]$BWT]
-       v := mvar(q)
-       not algebraic?(v,ts) => 
-         lbwt: List BWT := []
-         toCheck: List BWT := stoseInvertible?_reg(init(q),ts)@(List BWT)
-         for bwt in toCheck repeat
-           bwt.val => lbwt := cons(bwt,lbwt)
-           newq := removeZero(q,bwt.tower)
-           zero? newq => lbwt := cons(bwt,lbwt)
-           lbwt := concat(stoseInvertible?_reg(newq,bwt.tower)@(List BWT), lbwt)
-         return lbwt
-       ts_v := select(ts,v)::P
-       ts_v_- := collectUnder(ts,v)
-       ts_v_+ := collectUpper(ts,v)
-       lgwt := stoseInternalLastSubResultant(ts_v,q,ts_v_-,false,false)
-       lbwt: List BWT := []
-       lts, lts_g, lts_h: Split
-       for gwt in lgwt repeat
-         g := gwt.val; ts := gwt.tower
-         (ground? g) or (mvar(g) < v) => 
-           lts := augment(ts_v,ts)$TS
-           lts := augment(members(ts_v_+),lts)$TS
-           for ts in lts repeat
-             lbwt := cons([true, ts]$BWT,lbwt)
-         g := mainPrimitivePart g
-         lts_g := augment(g,ts)$TS
-         lts_g := augment(members(ts_v_+),lts_g)$TS
-         -- USE internalAugment with parameters ??
-         for ts_g in lts_g repeat
-           lbwt := cons([false, ts_g]$BWT,lbwt)
-         h := lazyPquo(ts_v,g)
-         (ground? h) or (mvar(h) < v) => "leave"
-         h := mainPrimitivePart h
-         lts_h := augment(h,ts)$TS
-         lts_h := augment(members(ts_v_+),lts_h)$TS
-         -- USE internalAugment with parameters ??
-         for ts_h in lts_h repeat
-           inv := stoseInvertible?_reg(q,ts_h)@(List BWT)
-           lbwt := concat([bwt for bwt in inv | bwt.val],lbwt)
-       sort(#1.val < #2.val,lbwt)
-
-     stoseInvertibleSet_reg(p:P,ts:TS): Split ==
-       --iprint("/")$iprintpack
-       k: KeyInvSet := [p,ts]
-       e := extractIfCan(k)$HInvSet
-       e case EntryInvSet => e::EntryInvSet
-       q := primitivePart initiallyReduce(p,ts)
-       zero? q => []
-       normalized?(q,ts) => [ts]
-       v := mvar(q)
-       toSave: Split := []
-       not algebraic?(v,ts) =>
-         toCheck: List BWT := stoseInvertible?_reg(init(q),ts)@(List BWT)
-         for bwt in toCheck repeat
-           bwt.val => toSave := cons(bwt.tower,toSave)
-           newq := removeZero(q,bwt.tower)
-           zero? newq => "leave"
-           toSave := concat(stoseInvertibleSet_reg(newq,bwt.tower), toSave)
-         toSave := removeDuplicates toSave
-         return algebraicSort(toSave)$quasicomppack
-       ts_v := select(ts,v)::P
-       ts_v_- := collectUnder(ts,v)
-       ts_v_+ := collectUpper(ts,v)
-       lgwt := stoseInternalLastSubResultant(ts_v,q,ts_v_-,false,false)
-       lts, lts_h: Split
-       for gwt in lgwt repeat
-         g := gwt.val; ts := gwt.tower
-         (ground? g) or (mvar(g) < v) => 
-           lts := augment(ts_v,ts)$TS
-           lts := augment(members(ts_v_+),lts)$TS
-           toSave := concat(lts,toSave)
-         g := mainPrimitivePart g
-         h := lazyPquo(ts_v,g)
-         h := mainPrimitivePart h
-         (ground? h) or (mvar(h) < v) => "leave"
-         lts_h := augment(h,ts)$TS
-         lts_h := augment(members(ts_v_+),lts_h)$TS
-         for ts_h in lts_h repeat
-           inv := stoseInvertibleSet_reg(q,ts_h)
-           toSave := removeDuplicates concat(inv,toSave)
-       toSave := algebraicSort(toSave)$quasicomppack
-       insert!(k,toSave)$HInvSet
-       toSave
-
-     if TS has SquareFreeRegularTriangularSetCategory(R,E,V,P)
-     then
-
-       stoseInvertible?(p:P,ts:TS): List BWT == stoseInvertible?_sqfreg(p,ts)
-
-       stoseInvertibleSet(p:P,ts:TS): Split == stoseInvertibleSet_sqfreg(p,ts)
-
-     else
-       
-       stoseInvertible?(p:P,ts:TS): List BWT == stoseInvertible?_reg(p,ts)
- 
-       stoseInvertibleSet(p:P,ts:TS): Split == stoseInvertibleSet_reg(p,ts)
-
-@
-\section{package SRDCMPK SquareFreeRegularSetDecompositionPackage}
-<<package SRDCMPK SquareFreeRegularSetDecompositionPackage>>=
-)abbrev package SRDCMPK SquareFreeRegularSetDecompositionPackage
-++ Author: Marc Moreno Maza
-++ Date Created: 09/23/1998
-++ Date Last Updated: 12/16/1998
-++ Basic Functions:
-++ Related Constructors:
-++ Also See: 
-++ AMS Classifications:
-++ Keywords:
-++ Description: 
-++ A package providing a new algorithm for solving polynomial systems
-++ by means of regular chains. Two ways of solving are provided:
-++ in the sense of Zariski closure (like in Kalkbrener's algorithm)
-++ or in the sense of the regular zeros (like in Wu, Wang or Lazard-
-++ Moreno methods). This algorithm is valid for nay type
-++ of regular set. It does not care about the way a polynomial is
-++ added in an regular set, or how two quasi-components are compared
-++ (by an inclusion-test), or how the invertibility test is made in
-++ the tower of simple extensions associated with a regular set.
-++ These operations are realized respectively by the domain \spad{TS}
-++ and the packages \spad{QCMPPK(R,E,V,P,TS)} and \spad{RSETGCD(R,E,V,P,TS)}.
-++ The same way it does not care about the way univariate polynomial
-++ gcds (with coefficients in the tower of simple extensions associated 
-++ with a regular set) are computed. The only requirement is that these
-++ gcds need to have invertible initials (normalized or not).
-++ WARNING. There is no need for a user to call diectly any operation
-++ of this package since they can be accessed by the domain \axiomType{TS}.
-++ Thus, the operations of this package are not documented.\newline
-++ References :
-++  [1] M. MORENO MAZA "A new algorithm for computing triangular
-++      decomposition of algebraic varieties" NAG Tech. Rep. 4/98.
-++ Version: 2. Does not use any unproved criteria.
-
-SquareFreeRegularSetDecompositionPackage(R,E,V,P,TS): Exports == Implementation where
-
-  R : GcdDomain
-  E : OrderedAbelianMonoidSup
-  V : OrderedSet
-  P : RecursivePolynomialCategory(R,E,V)
-  TS : SquareFreeRegularTriangularSetCategory(R,E,V,P)
-  N ==> NonNegativeInteger
-  Z ==> Integer
-  B ==> Boolean
-  LP ==> List P
-  PS ==> GeneralPolynomialSet(R,E,V,P)
-  PWT ==> Record(val : P, tower : TS)
-  BWT ==> Record(val : Boolean, tower : TS)
-  LpWT ==> Record(val : (List P), tower : TS)
-  Wip ==> Record(done: Split, todo: List LpWT)
-  Branch ==> Record(eq: List P, tower: TS, ineq: List P)
-  UBF ==> Union(Branch,"failed")
-  Split ==> List TS
-  iprintpack ==> InternalPrintPackage()
-  polsetpack ==> PolynomialSetUtilitiesPackage(R,E,V,P)
-  quasicomppack ==> SquareFreeQuasiComponentPackage(R,E,V,P,TS)
-  regsetgcdpack ==> SquareFreeRegularTriangularSetGcdPackage(R,E,V,P,TS)
-
-  Exports ==  with
-
-     KrullNumber: (LP, Split) -> N
-     numberOfVariables: (LP, Split) -> N
-     algebraicDecompose: (P,TS) -> Record(done: Split, todo: List LpWT) 
-     transcendentalDecompose: (P,TS,N) -> Record(done: Split, todo: List LpWT) 
-     transcendentalDecompose: (P,TS) -> Record(done: Split, todo: List LpWT) 
-     internalDecompose: (P,TS,N,B) -> Record(done: Split, todo: List LpWT)
-     internalDecompose: (P,TS,N) -> Record(done: Split, todo: List LpWT)
-     internalDecompose: (P,TS) -> Record(done: Split, todo: List LpWT)
-     decompose: (LP, Split, B, B) -> Split
-     decompose: (LP, Split, B, B, B, B, B) -> Split
-     upDateBranches: (LP,Split,List LpWT,Wip,N) -> List LpWT
-     convert: Record(val: List P,tower: TS) -> String
-     printInfo: (List Record(val: List P,tower: TS), N) -> Void
-
-  Implementation == add
-
-     KrullNumber(lp: LP, lts: Split): N ==
-       ln: List N := [#(ts) for ts in lts]
-       n := #lp + reduce(max,ln)
-
-     numberOfVariables(lp: LP, lts: Split): N ==
-       lv: List V := variables([lp]$PS)
-       for ts in lts repeat lv := concat(variables(ts), lv)
-       # removeDuplicates(lv)
-
-     algebraicDecompose(p: P, ts: TS): Record(done: Split, todo: List LpWT) ==
-       ground? p =>
-         error " in algebraicDecompose$REGSET: should never happen !"
-       v := mvar(p); n := #ts
-       ts_v_- := collectUnder(ts,v)
-       ts_v_+ := collectUpper(ts,v)
-       ts_v := select(ts,v)::P
-       lgwt: List PWT
-       if mdeg(p) < mdeg(ts_v)
-         then 
-           lgwt := stoseInternalLastSubResultant(ts_v,p,ts_v_-,true,false)$regsetgcdpack
-         else
-           lgwt := stoseInternalLastSubResultant(p,ts_v,ts_v_-,true,false)$regsetgcdpack
-       lts: Split := []
-       llpwt: List LpWT := []
-       for gwt in lgwt repeat
-         g := gwt.val; us := gwt.tower
-         zero? g => 
-           error " in algebraicDecompose$REGSET: should never happen !!"
-         ground? g => "leave"
-         h := leadingCoefficient(g,v)
-         lus := augment(members(ts_v_+),augment(ts_v,us)$TS)$TS
-         lsfp := squareFreeFactors(h)$polsetpack
-         for f in lsfp repeat
-           ground? f => "leave"
-           for vs in lus repeat
-             llpwt := cons([[f,p],vs]$LpWT, llpwt)
-         n < #us => 
-           error " in algebraicDecompose$REGSET: should never happen !!!"
-         mvar(g) = v => 
-           lts := concat(augment(members(ts_v_+),augment(g,us)$TS)$TS,lts)         
-       [lts,llpwt]
-
-     transcendentalDecompose(p: P, ts: TS,bound: N): Record(done: Split, todo: List LpWT) ==
-       lts: Split
-       if #ts < bound 
-         then
-           lts := augment(p,ts)$TS
-         else
-           lts := []
-       llpwt: List LpWT := []
-       [lts,llpwt]
-
-     transcendentalDecompose(p: P, ts: TS): Record(done: Split, todo: List LpWT) ==
-       lts: Split:= augment(p,ts)$TS
-       llpwt: List LpWT := []
-       [lts,llpwt]
-
-     internalDecompose(p: P, ts: TS,bound: N,clos?:B): Record(done: Split, todo: List LpWT) ==
-       clos? => internalDecompose(p,ts,bound)
-       internalDecompose(p,ts)
-
-     internalDecompose(p: P, ts: TS,bound: N): Record(done: Split, todo: List LpWT) ==
-       -- ASSUME p not constant
-       llpwt: List LpWT := []
-       lts: Split := []
-       -- EITHER mvar(p) is null
-       if (not zero? tail(p)) and (not ground? (lmp := leastMonomial(p)))
-         then
-           llpwt := cons([[mvar(p)::P],ts]$LpWT,llpwt)
-           p := (p exquo lmp)::P
-       ip := squareFreePart init(p); tp := tail p
-       p := mainPrimitivePart p
-       -- OR init(p) is null or not
-       lbwt: List BWT := stoseInvertible?_sqfreg(ip,ts)$regsetgcdpack
-       for bwt in lbwt repeat
-         bwt.val =>
-           if algebraic?(mvar(p),bwt.tower) 
-             then 
-               rsl := algebraicDecompose(p,bwt.tower)
-             else
-               rsl := transcendentalDecompose(p,bwt.tower,bound)
-           lts := concat(rsl.done,lts)
-           llpwt :=  concat(rsl.todo,llpwt)
-           (not ground? ip) =>
-             zero? tp => llpwt := cons([[ip],bwt.tower]$LpWT, llpwt)
-             (not ground? tp) => llpwt := cons([[ip,tp],bwt.tower]$LpWT, llpwt)
-         riv := removeZero(ip,bwt.tower)
-         (zero? riv) =>
-           zero? tp => lts := cons(bwt.tower,lts)
-           (not ground? tp) => llpwt := cons([[tp],bwt.tower]$LpWT, llpwt)
-         llpwt := cons([[riv * mainMonomial(p) + tp],bwt.tower]$LpWT, llpwt)
-       [lts,llpwt]
-
-     internalDecompose(p: P, ts: TS): Record(done: Split, todo: List LpWT) ==
-       -- ASSUME p not constant
-       llpwt: List LpWT := []
-       lts: Split := []
-       -- EITHER mvar(p) is null
-       if (not zero? tail(p)) and (not ground? (lmp := leastMonomial(p)))
-         then
-           llpwt := cons([[mvar(p)::P],ts]$LpWT,llpwt)
-           p := (p exquo lmp)::P
-       ip := squareFreePart init(p); tp := tail p
-       p := mainPrimitivePart p
-       -- OR init(p) is null or not
-       lbwt: List BWT := stoseInvertible?_sqfreg(ip,ts)$regsetgcdpack
-       for bwt in lbwt repeat
-         bwt.val =>
-           if algebraic?(mvar(p),bwt.tower) 
-             then 
-               rsl := algebraicDecompose(p,bwt.tower)
-             else
-               rsl := transcendentalDecompose(p,bwt.tower)
-           lts := concat(rsl.done,lts)
-           llpwt :=  concat(rsl.todo,llpwt)
-           (not ground? ip) => 
-             zero? tp => llpwt := cons([[ip],bwt.tower]$LpWT, llpwt)
-             (not ground? tp) => llpwt := cons([[ip,tp],bwt.tower]$LpWT, llpwt)
-         riv := removeZero(ip,bwt.tower)
-         (zero? riv) =>
-           zero? tp => lts := cons(bwt.tower,lts)
-           (not ground? tp) => llpwt := cons([[tp],bwt.tower]$LpWT, llpwt)
-         llpwt := cons([[riv * mainMonomial(p) + tp],bwt.tower]$LpWT, llpwt)
-       [lts,llpwt]
-
-     decompose(lp: LP, lts: Split, clos?: B, info?: B): Split ==
-       decompose(lp,lts,false,false,clos?,true,info?)
-
-     convert(lpwt: LpWT): String ==
-       ls: List String := ["<", string((#(lpwt.val))::Z), ",", string((#(lpwt.tower))::Z), ">" ]
-       concat ls
-
-     printInfo(toSee: List LpWT, n: N): Void ==
-       lpwt := first toSee
-       s: String := concat ["[", string((#toSee)::Z), " ", convert(lpwt)@String]
-       m: N := #(lpwt.val)
-       toSee := rest toSee
-       for lpwt in toSee repeat
-         m := m + #(lpwt.val)
-         s := concat [s, ",", convert(lpwt)@String]
-       s := concat [s, " -> |", string(m::Z), "|; {", string(n::Z),"}]"]
-       iprint(s)$iprintpack
-       void()
-
-     decompose(lp: LP, lts: Split, cleanW?: B, sqfr?: B, clos?: B, rem?: B, info?: B): Split ==
-       -- if cleanW? then REMOVE REDUNDANT COMPONENTS in lts
-       -- if sqfr? then SPLIT the system with SQUARE-FREE FACTORIZATION
-       -- if clos? then SOLVE in the closure sense 
-       -- if rem? then REDUCE the current p by using remainder
-       -- if info? then PRINT info
-       empty? lp => lts
-       branches: List Branch := prepareDecompose(lp,lts,cleanW?,sqfr?)$quasicomppack
-       empty? branches => []
-       toSee: List LpWT := [[br.eq,br.tower]$LpWT for br in branches]
-       toSave: Split := []
-       if clos? then bound := KrullNumber(lp,lts) else bound := numberOfVariables(lp,lts)
-       while (not empty? toSee) repeat
-         if info? then printInfo(toSee,#toSave)
-         lpwt := first toSee; toSee := rest toSee
-         lp := lpwt.val; ts := lpwt.tower
-         empty? lp => 
-           toSave := cons(ts, toSave)
-         p := first lp;  lp := rest lp
-         if rem? and (not ground? p) and (not empty? ts)  
-            then 
-              p := remainder(p,ts).polnum
-         p := removeZero(p,ts)
-         zero? p => toSee := cons([lp,ts]$LpWT, toSee)
-         ground? p => "leave"
-         rsl := internalDecompose(p,ts,bound,clos?)
-         toSee := upDateBranches(lp,toSave,toSee,rsl,bound)
-       removeSuperfluousQuasiComponents(toSave)$quasicomppack
-
-     upDateBranches(leq:LP,lts:Split,current:List LpWT,wip: Wip,n:N): List LpWT ==
-       newBranches: List LpWT := wip.todo
-       newComponents: Split := wip.done
-       branches1, branches2:  List LpWT 
-       branches1 := []; branches2  := []
-       for branch in newBranches repeat
-         us := branch.tower
-         #us > n => "leave"
-         newleq := sort(infRittWu?,concat(leq,branch.val))
-         --foo := rewriteSetWithReduction(newleq,us,initiallyReduce,initiallyReduced?)
-         --any?(ground?,foo)  => "leave"
-         branches1 := cons([newleq,us]$LpWT, branches1)
-       for us in newComponents repeat
-         #us > n => "leave"
-         subQuasiComponent?(us,lts)$quasicomppack => "leave"
-         --newleq := leq
-         --foo := rewriteSetWithReduction(newleq,us,initiallyReduce,initiallyReduced?)
-         --any?(ground?,foo)  => "leave"
-         branches2 := cons([leq,us]$LpWT, branches2)
-       empty? branches1 => 
-         empty? branches2 => current
-         concat(branches2, current)
-       branches := concat [branches2, branches1, current]
-       -- branches := concat(branches,current)
-       removeSuperfluousCases(branches)$quasicomppack
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
---    - Redistributions of source code must retain the above copyright
---      notice, this list of conditions and the following disclaimer.
---
---    - Redistributions in binary form must reproduce the above copyright
---      notice, this list of conditions and the following disclaimer in
---      the documentation and/or other materials provided with the
---      distribution.
---
---    - Neither the name of The Numerical ALgorithms Group Ltd. nor the
---      names of its contributors may be used to endorse or promote products
---      derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package SFQCMPK SquareFreeQuasiComponentPackage>>
-<<package SFRGCD SquareFreeRegularTriangularSetGcdPackage>>
-<<package SRDCMPK SquareFreeRegularSetDecompositionPackage>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/ssolve.spad.pamphlet b/src/algebra/ssolve.spad.pamphlet
deleted file mode 100644
index f761c4b..0000000
--- a/src/algebra/ssolve.spad.pamphlet
+++ /dev/null
@@ -1,304 +0,0 @@
-\documentclass{article}
-\usepackage{axiom,amsthm,amsmath}
-\newtheorem{ToDo}{ToDo}[section]
-
-\begin{document}
-\title{solve.spad}
-\author{Martin Rubey}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\tableofcontents
-\section{package UTSSOL TaylorSolve}
-
-[[UTSSOL]] is a facility to compute the first few coefficients of a Taylor
-series given only implicitely by a function [[f]] that vanishes when applied to
-the Taylor series.
-
-It uses the method of undetermined coefficients.
-
-\begin{ToDo}
-  Could I either
-  \begin{itemize}
-  \item take a function [[UTSCAT F -> UTSCAT F]] and still be able to compute
-    with undetermined coefficients, or
-  \item take a function [[F -> F]], and do likewise?
-  \end{itemize}
-
-  Let's see.
-
-  Try to compute the equation without resorting to power series. I.e., %
-  [[c: SUP SUP F]], and [[f: SUP SUP F -> SUP SUP F]]. Won't this make the
-  computation of coefficients terribly slow?
-
-  I could also try to replace transcendental kernels with variables\dots
-
-  Unfortunately, [[SUP F]] does not have [[TRANFUN]] -- well, it can't, of
-  course. However, I'd like to be able to compute %
-  [[sin(1+monomial(1,1)$UFPS SUP EXPR INT)]].
-\end{ToDo}
-
-<<package UTSSOL TaylorSolve>>=
-)abb package UTSSOL TaylorSolve
-TaylorSolve(F, UTSF, UTSSUPF): Exports == Implementation where
-    F: Field
-    SUP  ==> SparseUnivariatePolynomialExpressions
-    UTSF: UnivariateTaylorSeriesCategory F
-    UTSSUPF: UnivariateTaylorSeriesCategory SUP F
-    NNI  ==> NonNegativeInteger
-
-    Exports == with
-        seriesSolve: (UTSSUPF -> UTSSUPF, List F) -> UTSF
-
-    Implementation == add
-<<implementation: UTSSOL TaylorSolve>>
-@
-
-<<implementation: UTSSOL TaylorSolve>>=
-        seriesSolve(f, l) ==
-            c1 := map(#1::(SUP F), l)$ListFunctions2(F, SUP F)::(Stream SUP F)
-            coeffs: Stream SUP F := concat(c1, generate(monomial(1$F,1$NNI)))
---            coeffs: Stream SUP F := concat(c1, monomial(1$F,1$NNI))
-@
-
-[[coeffs]] is the stream of the already computed coefficients of the solution,
-plus one which is so far undetermined. We store in [[st.2]] the complete stream
-and in [[st.1]] the stream starting with the first coefficient that has
-possibly not yet been computed.
-
-\begin{ToDo}
-  The mathematics is not quite worked out. If [[coeffs]] is initialized as
-  stream with all coefficients set to the \emph{same} transcendental value,
-  and not enough initial values are given, then the missing ones are
-  implicitely assumed to be all identical. It may well happen that a solution
-  is produced, although it is not uniquely determined\dots
-\end{ToDo}
-
-<<implementation: UTSSOL TaylorSolve>>=
-            st: List Stream SUP F := [coeffs, coeffs]
-@
-
-Consider an arbitrary equation $f\big(x, y(x)\big)=0$. When setting $x=0$, we
-obtain $f\big(0, y(0)\big)=0$. It is not necessarily the case that this
-determines $y(0)$ uniquely, so we need one initial value that satisfies this
-equation.
-\begin{ToDo}
-  [[seriesSolve]] should check that the given initial values satisfy $f\big(0, y(0),
-  y'(0),...\big) = 0$.
-\end{ToDo}
-Now consider the derivatives of $f$, where we write $y$ instead of $y(x)$ for
-better readability:
-\begin{equation*}
-  \frac{d}{dx}f(x, y)=f_1(x, y) + f_2(x, y)y^\prime
-\end{equation*}
-and
-\begin{align*}
-  \frac{d^2}{dx^2}f(x, y)&=f_{1,1}(x, y)\\
-                         &+f_{1,2}(x, y)y^\prime\\
-                         &+f_{2,1}(x, y)y^\prime\\
-                         &+f_{2,2}(x, y)(y^\prime)^2\\
-                         &+f_2(x, y)y^{\prime\prime}.
-\end{align*}
-In general, $\frac{d^2}{dx^2}f(x, y)$ depends only linearly on
-$y^{\prime\prime}$.
-
-\begin{ToDo}
-  This points to another possibility: Since we know that we only need to solve
-  linear equations, we could compute two values and then use interpolation.
-  This might be a bit slower, but more importantly: can we still check that we
-  have enough initial values? Furthermore, we then really need that $f$ is
-  analytic, i.e., operators are not necessarily allowed anymore. However, it
-  seems that composition is allowed.
-\end{ToDo}
-
-<<implementation: UTSSOL TaylorSolve>>=
-            next: () -> F := 
-                nr := st.1
-                res: F
-
-                if ground?(coeff: SUP F := nr.1)$(SUP F)
-@
-%$
-
-If the next element was already calculated, we can simply return it:
-
-<<implementation: UTSSOL TaylorSolve>>=
-                then 
-                    res := ground coeff 
-                    st.1 := rest nr
-                else
-@
-
-Otherwise, we have to find the first non-satisfied relation and solve it. It
-should be linear, or a single non-constant monomial. That is, the solution
-should be unique.
-
-<<implementation: UTSSOL TaylorSolve>>=
-                    ns := st.2
-                    eqs: Stream SUP F := coefficients f series ns
-                    while zero? first eqs repeat eqs := rest eqs
-                    eq: SUP F := first eqs
-                    if degree eq > 1 then
-                        if monomial? eq then res := 0
-                        else 
-                            output(hconcat("The equation is: ", eq::OutputForm))
-                                  $OutputPackage
-                            error "seriesSolve: equation for coefficient not linear"
-                    else res := (-coefficient(eq, 0$NNI)$(SUP F)
-                                 /coefficient(eq, 1$NNI)$(SUP F))
-
-                    nr.1 := res::SUP F
---                    concat!(st.2, monomial(1$F,1$NNI))
-                    st.1 := rest nr
-
-                res
-
-            series generate next
-
-@
-%$
-
-
-\section{package EXPRSOL ExpressionSolve}
-
-\begin{ToDo}
-  I'd really like to be able to specify a function that works for all domains
-  in a category. For example, [[x +-> y(x)^2 + sin x + x]] should \lq work\rq\
-  for [[EXPR INT]] as well as for [[UTS INT]], both being domains having
-  [[TranscendentalFunctionCategory]].
-\end{ToDo}
-
-<<package EXPRSOL ExpressionSolve>>=
-)abb package EXPRSOL ExpressionSolve
-ExpressionSolve(R, F, UTSF, UTSSUPF): Exports == Implementation where
-    R: Join(OrderedSet, IntegralDomain, ConvertibleTo InputForm)
-    F: FunctionSpace R
-    UTSF: UnivariateTaylorSeriesCategory F
-    SUP  ==> SparseUnivariatePolynomialExpressions
-    UTSSUPF: UnivariateTaylorSeriesCategory SUP F
-    OP   ==> BasicOperator
-    SY   ==> Symbol
-    NNI  ==> NonNegativeInteger
-    MKF ==> MakeBinaryCompiledFunction(F, UTSSUPF, UTSSUPF, UTSSUPF)
-
-    Exports == with
-
-        seriesSolve: (F, OP, SY, List F) -> UTSF
-        replaceDiffs: (F, OP, Symbol) -> F
-
-    Implementation == add
-<<implementation: EXPRSOL ExpressionSolve>>
-@
-
-The general method is to transform the given expression into a form which can
-then be compiled. There is currently no other way in Axiom to transform an
-expression into a function.
-
-We need to replace the differentiation operator by the corresponding function
-in the power series category, and make composition explicit. Furthermore, we
-need to replace the variable by the corresponding variable in the power series.
-It turns out that the compiler doesn't find the right definition of
-[[monomial(1,1)]]. Thus we introduce it as a second argument. In fact, maybe
-that's even cleaner. Also, we need to tell the compiler that kernels that are
-independent of the main variable should be coerced to elements of the
-coefficient ring, since it will complain otherwise.
-\begin{ToDo}
-  I cannot find an example for this behaviour right now. However, if I do use
-  the coerce, the following fails:
-  \begin{verbatim}
-     seriesSolve(h x -1-x*h x *h(q*x), h, x, [1])
-  \end{verbatim}
-\end{ToDo}
-
-<<implementation: EXPRSOL ExpressionSolve>>=
-        opelt := operator("elt"::Symbol)$OP
-        opdiff := operator("D"::Symbol)$OP
-        opcoerce := operator("coerce"::Symbol)$OP
-
---        replaceDiffs: (F, OP, Symbol) -> F
-        replaceDiffs (expr, op, sy) ==
-            lk := kernels expr
-            for k in lk repeat
---                if freeOf?(coerce k, sy) then
---                    expr := subst(expr, [k], [opcoerce [coerce k]])
-
-                if is?(k, op) then
-                    arg := first argument k
-                    if arg = sy::F 
-                    then expr := subst(expr, [k], [(name op)::F])
-                    else expr := subst(expr, [k], [opelt [(name op)::F, 
-                                                          replaceDiffs(arg, op,
-                                                          sy)]])
---                    => "iterate"
-
-                if is?(k, %diff) then
-                    args := argument k
-                    differentiand := replaceDiffs(subst(args.1, args.2 = args.3), op, sy)
-                    expr := subst(expr, [k], [opdiff differentiand])
---                    => "iterate"
-            expr
-
-
-        seriesSolve(expr, op, sy, l) ==
-            ex := replaceDiffs(expr, op, sy) 
-            f := compiledFunction(ex, name op, sy)$MKF
-            seriesSolve(f(#1, monomial(1,1)$UTSSUPF), l)$TaylorSolve(F, UTSF, UTSSUPF)
-@            
-%$
-
-\section{Bugs}
-
-<<inp: seriesSolve>>=
-seriesSolve(sin f x / cos x, f, x, [1])$EXPRSOL(INT, EXPR INT, UFPS EXPR INT, UFPS SUPEXPR EXPR INT)
-@
-returns 
-\begin{verbatim}
-(((0 . 1) 0 . 1) NonNullStream #<compiled-function |STREAM;generate;M$;62!0|> . UNPRINTABLE)
-\end{verbatim}
-
-but
-<<inp: seriesSolve>>=
-U ==> UFPS SUPEXPR EXPR INT
-seriesSolve(s +-> sin s *((cos monomial(1,1)$U)**-1)$U, f, x, [0])$EXPRSOL(INT, EXPR INT, UFPS EXPR INT, UFPS SUPEXPR EXPR INT)
-@
-
-works. This is probably due to missing [[/]] in [[UFPS]].
-
-\section{License}
-<<license>>=
---Copyright (c) 2006-2007, Martin Rubey <Martin.Rubey@univie.ac.at>
---
---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.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-
-
-<<*>>=
-<<license>>
-
-<<package UTSSOL TaylorSolve>>
-<<package EXPRSOL ExpressionSolve>>
-
-@
-\end{document}
diff --git a/src/algebra/stream.spad.pamphlet b/src/algebra/stream.spad.pamphlet
deleted file mode 100644
index 8209bf6..0000000
--- a/src/algebra/stream.spad.pamphlet
+++ /dev/null
@@ -1,269 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/algebra stream.spad}
-\author{Clifton J. Williamson, William Burge, Stephen M. Watt}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package CSTTOOLS CyclicStreamTools}
-<<package CSTTOOLS CyclicStreamTools>>=
-)abbrev package CSTTOOLS CyclicStreamTools
-++ Functions for dealing with cyclic streams
-++ Author: Clifton J. Williamson
-++ Date Created: 5 December 1989
-++ Date Last Updated: 5 December 1989
-++ Keywords: stream, cyclic
-++ Description:
-++ This package provides tools for working with cyclic streams.
-CyclicStreamTools(S,ST): Exports == Implementation where
-  S  : Type
-  ST : LazyStreamAggregate S
-
-  Exports ==> with
-
-    cycleElt: ST -> Union(ST,"failed")
-      ++ cycleElt(s) returns a pointer to a node in the cycle if the stream 
-      ++ s is cyclic and returns "failed" if s is not cyclic
-      ++
-      ++X p:=repeating([1,2,3])
-      ++X q:=cons(4,p)
-      ++X cycleElt q
-      ++X r:=[1,2,3]::Stream(Integer)
-      ++X cycleElt r
-
-    computeCycleLength: ST -> NonNegativeInteger
-      ++ computeCycleLength(s) returns the length of the cycle of a
-      ++ cyclic stream t, where s is a pointer to a node in the
-      ++ cyclic part of t.
-      ++
-      ++X p:=repeating([1,2,3])
-      ++X q:=cons(4,p)
-      ++X computeCycleLength(cycleElt(q))
-
-    computeCycleEntry: (ST,ST) -> ST
-      ++ computeCycleEntry(x,cycElt), where cycElt is a pointer to a
-      ++ node in the cyclic part of the cyclic stream x, returns a
-      ++ pointer to the first node in the cycle
-      ++
-      ++X p:=repeating([1,2,3])
-      ++X q:=cons(4,p)
-      ++X computeCycleEntry(q,cycleElt(q))
-
-  Implementation ==> add
-
-    cycleElt x ==
-      y := x
-      for i in 0.. repeat
-        (explicitlyEmpty? y) or (lazy? y) => return "failed"
-        y := rst y
-        if odd? i then x := rst x
-        eq?(x,y) => return y
-
-    computeCycleLength cycElt ==
-      i : NonNegativeInteger
-      y := cycElt
-      for i in 1.. repeat
-        y := rst y
-        eq?(y,cycElt) => return i
-
-    computeCycleEntry(x,cycElt) ==
-      y := rest(x, computeCycleLength cycElt)
-      repeat
-        eq?(x,y) => return x
-        x := rst x ; y := rst y
-
-@
-\section{package STREAM1 StreamFunctions1}
-<<package STREAM1 StreamFunctions1>>=
-)abbrev package STREAM1 StreamFunctions1
-++ Authors: Burge, Watt; updated by Clifton J. Williamson
-++ Date Created: July 1986
-++ Date Last Updated: 29 January 1990
-++ Keywords: stream, infinite list, infinite sequence
-StreamFunctions1(S:Type): Exports == Implementation where
-  ++ Functions defined on streams with entries in one set.
-  ST  ==> Stream
-
-  Exports ==> with
-    concat: ST ST S -> ST S
-      ++ concat(u) returns the left-to-right concatentation of the 
-      ++ streams in u. Note: \spad{concat(u) = reduce(concat,u)}.
-      ++
-      ++X m:=[i for i in 10..]
-      ++X n:=[j for j in 1.. | prime? j]
-      ++X p:=[m,n]::Stream(Stream(PositiveInteger))
-      ++X concat(p)
-
-  Implementation ==> add
-
-    concat z == delay
-      empty? z => empty()
-      empty?(x := frst z) => concat rst z
-      concat(frst x,concat(rst x,concat rst z))
-
-@
-\section{package STREAM2 StreamFunctions2}
-<<package STREAM2 StreamFunctions2>>=
-)abbrev package STREAM2 StreamFunctions2
-++ Authors: Burge, Watt; updated by Clifton J. Williamson
-++ Date Created: July 1986
-++ Date Last Updated: 29 January 1990
-++ Keywords: stream, infinite list, infinite sequence
-StreamFunctions2(A:Type,B:Type): Exports == Implementation where
-  ++ Functions defined on streams with entries in two sets.
-  ST   ==> Stream
-
-  Exports ==> with
-    map: ((A -> B),ST A) -> ST B
-      ++ map(f,s) returns a stream whose elements are the function f applied
-      ++ to the corresponding elements of s.
-      ++ Note: \spad{map(f,[x0,x1,x2,...]) = [f(x0),f(x1),f(x2),..]}.
-      ++
-      ++X m:=[i for i in 1..]
-      ++X f(i:PositiveInteger):PositiveInteger==i**2
-      ++X map(f,m)
-
-    scan: (B,((A,B) -> B),ST A) -> ST B
-      ++ scan(b,h,[x0,x1,x2,...]) returns \spad{[y0,y1,y2,...]}, where
-      ++ \spad{y0 = h(x0,b)},
-      ++ \spad{y1 = h(x1,y0)},\spad{...}
-      ++ \spad{yn = h(xn,y(n-1))}.
-      ++
-      ++X m:=[i for i in 1..]::Stream(Integer)
-      ++X f(i:Integer,j:Integer):Integer==i+j
-      ++X scan(1,f,m)
-
-    reduce:  (B,(A,B) -> B,ST A) -> B
-      ++ reduce(b,f,u), where u is a finite stream \spad{[x0,x1,...,xn]},
-      ++ returns the value \spad{r(n)} computed as follows:
-      ++ \spad{r0 = f(x0,b),
-      ++ r1 = f(x1,r0),...,
-      ++ r(n) = f(xn,r(n-1))}.
-      ++
-      ++X m:=[i for i in 1..300]::Stream(Integer)
-      ++X f(i:Integer,j:Integer):Integer==i+j
-      ++X reduce(1,f,m)
-
---  rreduce: (B,(A,B) -> B,ST A) -> B
---    ++ reduce(b,h,[x0,x1,..,xn]) = h(x1,h(x2(..,h(x(n-1),h(xn,b))..)
---  reshape: (ST B,ST A) -> ST B
---    ++ reshape(y,x) = y
-
-  Implementation ==> add
-
-    mapp: (A -> B,ST A) -> ST B
-    mapp(f,x)== delay
-      empty? x => empty()
-      concat(f frst x, map(f,rst x))
-
-    map(f,x) ==
-      explicitlyEmpty? x => empty()
-      eq?(x,rst x) => repeating([f frst x])
-      mapp(f, x)
-
---  reshape(y,x) == y
-
-    scan(b,h,x) == delay
-      empty? x => empty()
-      c := h(frst x,b)
-      concat(c,scan(c,h,rst x))
-
-    reduce(b,h,x) ==
-      empty? x => b
-      reduce(h(frst x,b),h,rst x)
---  rreduce(b,h,x) ==
---    empty? x => b
---    h(frst x,rreduce(b,h,rst x))
-
-@
-\section{package STREAM3 StreamFunctions3}
-<<package STREAM3 StreamFunctions3>>=
-)abbrev package STREAM3 StreamFunctions3
-++ Authors: Burge, Watt; updated by Clifton J. Williamson
-++ Date Created: July 1986
-++ Date Last Updated: 29 January 1990
-++ Keywords: stream, infinite list, infinite sequence
-StreamFunctions3(A,B,C): Exports == Implementation where
-  ++ Functions defined on streams with entries in three sets.
-  A  : Type
-  B  : Type
-  C  : Type
-  ST ==> Stream
-
-  Exports ==> with
-    map: ((A,B) -> C,ST A,ST B) -> ST C
-      ++ map(f,st1,st2) returns the stream whose elements are the
-      ++ function f applied to the corresponding elements of st1 and st2.
-      ++ \spad{map(f,[x0,x1,x2,..],[y0,y1,y2,..]) = [f(x0,y0),f(x1,y1),..]}.
-      ++
-      ++S
-      ++X m:=[i for i in 1..]::Stream(Integer)
-      ++X n:=[i for i in 1..]::Stream(Integer)
-      ++X f(i:Integer,j:Integer):Integer == i+j
-      ++X map(f,m,n)
-
-  Implementation ==> add
-
-    mapp:((A,B) -> C,ST A,ST B) -> ST C
-    mapp(g,x,y) == delay
-      empty? x or empty? y => empty()
-      concat(g(frst x,frst y), map(g,rst x,rst y))
-
-    map(g,x,y) ==
-      explicitlyEmpty? x => empty()
-      eq?(x,rst x) => map(g(frst x,#1),y)$StreamFunctions2(B,C)
-      explicitlyEmpty? y => empty()
-      eq?(y,rst y) => map(g(#1,frst y),x)$StreamFunctions2(A,C)
-      mapp(g,x,y)
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
---    - Redistributions of source code must retain the above copyright
---      notice, this list of conditions and the following disclaimer.
---
---    - Redistributions in binary form must reproduce the above copyright
---      notice, this list of conditions and the following disclaimer in
---      the documentation and/or other materials provided with the
---      distribution.
---
---    - Neither the name of The Numerical ALgorithms Group Ltd. nor the
---      names of its contributors may be used to endorse or promote products
---      derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package CSTTOOLS CyclicStreamTools>>
-<<package STREAM1 StreamFunctions1>>
-<<package STREAM2 StreamFunctions2>>
-<<package STREAM3 StreamFunctions3>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/sttaylor.spad.pamphlet b/src/algebra/sttaylor.spad.pamphlet
deleted file mode 100644
index 27a16ec..0000000
--- a/src/algebra/sttaylor.spad.pamphlet
+++ /dev/null
@@ -1,515 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/algebra sttaylor.spad}
-\author{William Burge, Stephen Watt, Clifton J. Williamson}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package STTAYLOR StreamTaylorSeriesOperations}
-Problems raising a UTS to a negative integer power.
-
-The code in [[powern(rn,x)]] which raises an unnecessary error
-where no distinction between rational and integer powers are made.
-
-The fix is easy. Since the problem does not exist in SUPS we can
-just take the definition there.
-
-<<package STTAYLOR StreamTaylorSeriesOperations>>=
-)abbrev package STTAYLOR StreamTaylorSeriesOperations
-++ Author: William Burge, Stephen Watt, Clifton J. Williamson
-++ Date Created: 1986
-++ Date Last Updated: 26 May 1994
-++ Basic Operations:
-++ Related Domains: Stream(A), ParadoxicalCombinatorsForStreams(A),
-++   StreamTranscendentalFunctions(A),
-++   StreamTranscendentalFunctionsNonCommutative(A)
-++ Also See:
-++ AMS Classifications:
-++ Keywords: stream, Taylor series
-++ Examples:
-++ References:
-++ Description:
-++   StreamTaylorSeriesOperations implements Taylor series arithmetic,
-++   where a Taylor series is represented by a stream of its coefficients.
-StreamTaylorSeriesOperations(A): Exports == Implementation where
-  A :        Ring
-  RN     ==> Fraction Integer
-  I      ==> Integer
-  NNI    ==> NonNegativeInteger
-  ST     ==> Stream
-  SP2    ==> StreamFunctions2
-  SP3    ==> StreamFunctions3
-  L      ==> List
-  LA     ==> List A
-  YS     ==> Y$ParadoxicalCombinatorsForStreams(A)
-  UN     ==> Union(ST A,"failed")
-  Exports ==> with
-    "+"          : (ST A,ST A) -> ST A
-      ++ a + b returns the power series sum of \spad{a} and \spad{b}:
-      ++ \spad{[a0,a1,..] + [b0,b1,..] = [a0 + b0,a1 + b1,..]}
-    "-"          : (ST A,ST A) -> ST A
-      ++ a - b returns the power series difference of \spad{a} and
-      ++ \spad{b}: \spad{[a0,a1,..] - [b0,b1,..] = [a0 - b0,a1 - b1,..]}
-    "-"          : ST A -> ST A
-      ++ - a returns the power series negative of \spad{a}:
-      ++ \spad{- [a0,a1,...] = [- a0,- a1,...]}
-    "*"          : (ST A,ST A) -> ST A
-      ++ a * b returns the power series (Cauchy) product of \spad{a} and b:
-      ++ \spad{[a0,a1,...] * [b0,b1,...] = [c0,c1,...]} where
-      ++ \spad{ck = sum(i + j = k,ai * bk)}.
-    "*"          : (A,ST A) -> ST A
-      ++ r * a returns the power series scalar multiplication of r by \spad{a}:
-      ++ \spad{r * [a0,a1,...] = [r * a0,r * a1,...]}
-    "*"          : (ST A,A) -> ST A
-      ++ a * r returns the power series scalar multiplication of \spad{a} by r:
-      ++ \spad{[a0,a1,...] * r = [a0 * r,a1 * r,...]}
-    "exquo"      : (ST A,ST A) -> Union(ST A,"failed")
-      ++ exquo(a,b) returns the power series quotient of \spad{a} by b,
-      ++ if the quotient exists, and "failed" otherwise
-    "/"          : (ST A,ST A) -> ST A
-      ++ a / b returns the power series quotient of \spad{a} by b.
-      ++ An error message is returned if \spad{b} is not invertible.
-      ++ This function is used in fixed point computations.
-    recip        : ST A -> UN
-      ++ recip(a) returns the power series reciprocal of \spad{a}, or
-      ++ "failed" if not possible.
-    monom        : (A,I) -> ST A
-      ++ monom(deg,coef) is a monomial of degree deg with coefficient
-      ++ coef.
-    integers     : I -> ST I
-      ++ integers(n) returns \spad{[n,n+1,n+2,...]}.
-    oddintegers  : I -> ST I
-      ++ oddintegers(n) returns \spad{[n,n+2,n+4,...]}.
-    int          : A -> ST A
-      ++ int(r) returns [r,r+1,r+2,...], where r is a ring element.
-    mapmult      : (ST A,ST A) -> ST A
-      ++ mapmult([a0,a1,..],[b0,b1,..])
-      ++ returns \spad{[a0*b0,a1*b1,..]}.
-    deriv        : ST A -> ST A
-      ++ deriv(a) returns the derivative of the power series with
-      ++ respect to the power series variable. Thus
-      ++ \spad{deriv([a0,a1,a2,...])} returns \spad{[a1,2 a2,3 a3,...]}.
-    gderiv       : (I -> A,ST A)  -> ST A
-      ++ gderiv(f,[a0,a1,a2,..]) returns
-      ++ \spad{[f(0)*a0,f(1)*a1,f(2)*a2,..]}.
-    coerce       : A -> ST A
-      ++ coerce(r) converts a ring element r to a stream with one element.
-    eval         : (ST A,A) -> ST A
-      ++ eval(a,r) returns a stream of partial sums of the power series
-      ++ \spad{a} evaluated at the power series variable equal to r.
-    compose      : (ST A,ST A) -> ST A
-      ++ compose(a,b) composes the power series \spad{a} with
-      ++ the power series b.
-    lagrange     : ST A -> ST A
-      ++ lagrange(g) produces the power series for f where f is
-      ++ implicitly defined as \spad{f(z) = z*g(f(z))}.
-    revert       : ST A -> ST A
-      ++ revert(a) computes the inverse of a power series \spad{a}
-      ++ with respect to composition.
-      ++ the series should have constant coefficient 0 and first
-      ++ order coefficient 1.
-    addiag       : ST ST A -> ST A
-      ++ addiag(x) performs diagonal addition of a stream of streams. if x =
-      ++ \spad{[[a<0,0>,a<0,1>,..],[a<1,0>,a<1,1>,..],[a<2,0>,a<2,1>,..],..]}
-      ++ and \spad{addiag(x) = [b<0,b<1>,...], then b<k> = sum(i+j=k,a<i,j>)}.
-    lambert      : ST A -> ST A
-      ++ lambert(st) computes \spad{f(x) + f(x**2) + f(x**3) + ...}
-      ++ if st is a stream representing \spad{f(x)}.
-      ++ This function is used for computing infinite products.
-      ++ If \spad{f(x)} is a power series with constant coefficient 1 then
-      ++ \spad{prod(f(x**n),n = 1..infinity) = exp(lambert(log(f(x))))}.
-    oddlambert   : ST A -> ST A
-      ++ oddlambert(st) computes \spad{f(x) + f(x**3) + f(x**5) + ...}
-      ++ if st is a stream representing \spad{f(x)}.
-      ++ This function is used for computing infinite products.
-      ++ If f(x) is a power series with constant coefficient 1 then
-      ++ \spad{prod(f(x**(2*n-1)),n=1..infinity) = exp(oddlambert(log(f(x))))}.
-    evenlambert  : ST A -> ST A
-      ++ evenlambert(st) computes \spad{f(x**2) + f(x**4) + f(x**6) + ...}
-      ++ if st is a stream representing \spad{f(x)}.
-      ++ This function is used for computing infinite products.
-      ++ If \spad{f(x)} is a power series with constant coefficient 1, then
-      ++ \spad{prod(f(x**(2*n)),n=1..infinity) = exp(evenlambert(log(f(x))))}.
-    generalLambert : (ST A,I,I) -> ST A
-      ++ generalLambert(f(x),a,d) returns
-      ++ \spad{f(x**a) + f(x**(a + d)) + f(x**(a + 2 d)) + ...}.
-      ++ \spad{f(x)} should have zero constant
-      ++ coefficient and \spad{a} and d should be positive.
-    multisect    : (I,I,ST A) -> ST A
-      ++ multisect(a,b,st)
-      ++ selects the coefficients of \spad{x**((a+b)*n+a)},
-      ++ and changes them to \spad{x**n}.
-    invmultisect : (I,I,ST A) -> ST A
-      ++ invmultisect(a,b,st) substitutes \spad{x**((a+b)*n)} for \spad{x**n}
-      ++ and multiplies by \spad{x**b}.
-    if A has Algebra RN then
-      integrate  : (A,ST A) -> ST A
-        ++ integrate(r,a) returns the integral of the power series \spad{a}
-        ++ with respect to the power series variableintegration where
-        ++ r denotes the constant of integration. Thus
-        ++ \spad{integrate(a,[a0,a1,a2,...]) = [a,a0,a1/2,a2/3,...]}.
-      lazyIntegrate  : (A,() -> ST A) -> ST A
-        ++ lazyIntegrate(r,f) is a local function
-        ++ used for fixed point computations.
-      nlde       : ST ST A -> ST A
-        ++ nlde(u) solves a
-        ++ first order non-linear differential equation described by u of the
-        ++ form \spad{[[b<0,0>,b<0,1>,...],[b<1,0>,b<1,1>,.],...]}.
-        ++ the differential equation has the form
-        ++ \spad{y' = sum(i=0 to infinity,j=0 to infinity,b<i,j>*(x**i)*(y**j))}.
-      powern : (RN,ST A) -> ST A
-        ++ powern(r,f) raises power series f to the power r.
-    if A has Field then
-      mapdiv     : (ST A,ST A) -> ST A
-        ++ mapdiv([a0,a1,..],[b0,b1,..]) returns
-        ++ \spad{[a0/b0,a1/b1,..]}.
-      lazyGintegrate : (I -> A,A,() -> ST A) -> ST A
-        ++ lazyGintegrate(f,r,g) is used for fixed point computations.
-      power      : (A,ST A) -> ST A
-        ++ power(a,f) returns the power series f raised to the power \spad{a}.
-
-  Implementation ==> add
-
---% definitions
-
-    zro: () -> ST A
-    -- returns a zero power series
-    zro() == empty()$ST(A)
-
---% arithmetic
-
-    x + y == delay
-      empty? y => x
-      empty? x => y
-      eq?(x,rst x) => map(frst x + #1,y)
-      eq?(y,rst y) => map(frst y + #1,x)
-      concat(frst x + frst y,rst x + rst y)
-
-    x - y == delay
-      empty? y => x
-      empty? x => -y
-      eq?(x,rst x) => map(frst x - #1,y)
-      eq?(y,rst y) => map(#1 - frst y,x)
-      concat(frst x - frst y,rst x - rst y)
-
-    -y == map(_-#1,y)
-
-    (x:ST A) * (y:ST A) == delay
-      empty? y => zro()
-      empty? x => zro()
-      concat(frst x * frst y,frst x * rst y + rst x * y)
-
-    (s:A) * (x:ST A) ==
-      zero? s => zro()
-      map(s * #1,x)
-
-    (x:ST A) * (s:A) ==
-      zero? s => zro()
-      map(#1 * s,x)
-
-    iDiv: (ST A,ST A,A) -> ST A
-    iDiv(x,y,ry0) == delay
-      empty? x => empty()
-      c0 := frst x * ry0
-      concat(c0,iDiv(rst x - c0 * rst y,y,ry0))
-
-    x exquo y ==
-      for n in 1.. repeat
-        n > 1000 => return "failed"
-        empty? y => return "failed"
-        empty? x => return empty()
-        frst y = 0 =>
-          frst x = 0 => (x := rst x; y := rst y)
-          return "failed"
-        leave "first entry in y is non-zero"
-      (ry0 := recip frst y) case "failed" => "failed"
-      empty? rst y => map(#1 * (ry0 :: A),x)
-      iDiv(x,y,ry0 :: A)
-
-    (x:ST A) / (y:ST A) == delay
-      empty? y => error "/: division by zero"
-      empty? x => empty()
-      (ry0 := recip frst y) case "failed" =>
-        error "/: second argument is not invertible"
-      empty? rst y => map(#1 * (ry0 :: A),x)
-      iDiv(x,y,ry0 :: A)
-
-    recip x ==
-      empty? x => "failed"
-      rh1 := recip frst x
-      rh1 case "failed" => "failed"
-      rh := rh1 :: A
-      delay
-        concat(rh,iDiv(- rh * rst x,x,rh))
-
---% coefficients
-
-    rp: (I,A) -> L A
-    -- rp(z,s) is a list of length z each of whose entries is s.
-    rp(z,s) ==
-      z <= 0 => empty()
-      concat(s,rp(z-1,s))
-
-    rpSt: (I,A) -> ST A
-    -- rpSt(z,s) is a stream of length z each of whose entries is s.
-    rpSt(z,s) == delay
-      z <= 0 => empty()
-      concat(s,rpSt(z-1,s))
-
-    monom(s,z) ==
-      z < 0 => error "monom: cannot create monomial of negative degree"
-      concat(rpSt(z,0),concat(s,zro()))
-
---% some streams of integers
-    nnintegers: NNI -> ST NNI
-    nnintegers zz == generate(#1 + 1,zz)
-    integers z == generate(#1 + 1,z)
-    oddintegers z == generate(#1 + 2,z)
-    int s == generate(#1 + 1,s)
-
---% derivatives
-
-    mapmult(x,y) == delay
-      empty? y => zro()
-      empty? x => zro()
-      concat(frst x * frst y,mapmult(rst x,rst y))
-
-    deriv x ==
-      empty? x => zro()
-      mapmult(int 1,rest x)
-
-    gderiv(f,x) ==
-      empty? x => zro()
-      mapmult(map(f,integers 0)$SP2(I,A),x)
-
---% coercions
-
-    coerce(s:A) ==
-      zero? s => zro()
-      concat(s,zro())
-
---% evaluations and compositions
-
-    eval(x,at) == scan(0,#1 + #2,mapmult(x,generate(at * #1,1)))$SP2(A,A)
-
-    compose(x,y) == delay
-      empty? y => concat(frst x,zro())
-      not zero? frst y =>
-        error "compose: 2nd argument should have 0 constant coefficient"
-      empty? x => zro()
-      concat(frst x,compose(rst x,y) * rst(y))
-
---% reversion
-
-    lagrangere:(ST A,ST A) -> ST A
-    lagrangere(x,c) == delay(concat(0,compose(x,c)))
-    lagrange x == YS(lagrangere(x,#1))
-
-    revert x ==
-      empty? x => error "revert should start 0,1,..."
-      zero? frst x =>
-        empty? rst x => error "revert: should start 0,1,..."
---        one? frst rst x => lagrange(recip(rst x) :: (ST A))
-        (frst rst x) = 1 => lagrange(recip(rst x) :: (ST A))
-      error "revert:should start 0,1,..."
-
---% lambert functions
-
-    addiag(ststa:ST ST A) == delay
-      empty? ststa => zro()
-      empty? frst ststa => concat(0,addiag rst ststa)
-      concat(frst(frst ststa),rst(frst ststa) + addiag(rst ststa))
-
--- lambert operates on a series +/[a[i]x**i for i in 1..] , and produces
--- the series +/[a[i](x**i/(1-x**i)) for i in 1..] i.e. forms the
--- coefficients A[n] which is the sum of a[i] for all divisors i of n
--- (including 1 and n)
-
-    rptg1:(I,A) -> ST A
-    --                               ---------
-    -- returns the repeating stream [s,0,...,0]; (there are z zeroes)
-    rptg1(z,s) == repeating concat(s,rp(z,0))
-
-    rptg2:(I,A) -> ST A
-    --                                       ---------
-    -- returns the repeating stream [0,...,0,s,0,...,0]
-    -- there are z leading zeroes and z-1 in the period
-    rptg2(z,s) == repeating concat(rp(z,0),concat(s,rp(z-1,0)))
-
-    rptg3:(I,I,I,A) -> ST A
-    rptg3(a,d,n,s) ==
-      concat(rpSt(n*(a-1),0),repeating(concat(s,rp(d*n-1,0))))
-
-    lambert x == delay
-      empty? x => zro()
-      zero? frst x =>
-        concat(0,addiag(map(rptg1,integers 0,rst x)$SP3(I,A,ST A)))
-      error "lambert:constant coefficient should be zero"
-
-    oddlambert x == delay
-      empty? x => zro()
-      zero? frst x =>
-        concat(0,addiag(map(rptg1,oddintegers 1,rst x)$SP3(I,A,ST A)))
-      error "oddlambert: constant coefficient should be zero"
-
-    evenlambert x == delay
-      empty? x => zro()
-      zero? frst x =>
-        concat(0,addiag(map(rptg2,integers 1,rst x)$SP3(I,A,ST A)))
-      error "evenlambert: constant coefficient should be zero"
-
-    generalLambert(st,a,d) == delay
-      a < 1 or d < 1 =>
-        error "generalLambert: both integer arguments must be positive"
-      empty? st => zro()
-      zero? frst st =>
-        concat(0,addiag(map(rptg3(a,d,#1,#2),_
-                 integers 1,rst st)$SP3(I,A,ST A)))
-      error "generalLambert: constant coefficient should be zero"
-
---% misc. functions
-
-    ms: (I,I,ST A) -> ST A
-    ms(m,n,s) == delay
-      empty? s => zro()
-      zero? n => concat(frst s,ms(m,m-1,rst s))
-      ms(m,n-1,rst s)
-
-    multisect(b,a,x) == ms(a+b,0,rest(x,a :: NNI))
-
-    altn: (ST A,ST A) -> ST A
-    altn(zs,s) == delay
-      empty? s => zro()
-      concat(frst s,concat(zs,altn(zs,rst s)))
-
-    invmultisect(a,b,x) ==
-      concat(rpSt(b,0),altn(rpSt(a + b - 1,0),x))
-
--- comps(ststa,y) forms the composition of +/b[i,j]*y**i*x**j
--- where y is a power series in y.
-
-    cssa ==> concat$(ST ST A)
-    mapsa ==> map$SP2(ST A,ST A)
-    comps: (ST ST A,ST A) -> ST ST A
-    comps(ststa,x) == delay$(ST ST A)
-       empty? ststa => empty()$(ST ST A)
-       empty? x => cssa(frst ststa,empty()$(ST ST A))
-       cssa(frst ststa,mapsa((rst x) * #1,comps(rst ststa,x)))
-
-    if A has Algebra RN then
-      integre: (ST A,I) -> ST A
-      integre(x,n) == delay
-        empty? x => zro()
-        concat((1$I/n) * frst(x),integre(rst x,n + 1))
-
-      integ: ST A -> ST A
-      integ x == integre(x,1)
-
-      integrate(a,x) == concat(a,integ x)
-      lazyIntegrate(s,xf) == concat(s,integ(delay xf))
-
-      nldere:(ST ST A,ST A) -> ST A
-      nldere(lslsa,c) == lazyIntegrate(0,addiag(comps(lslsa,c)))
-      nlde lslsa == YS(nldere(lslsa,#1))
-
-      RATPOWERS : Boolean := A has "**": (A,RN) -> A
-
-      smult: (RN,ST A) -> ST A
-      smult(rn,x) == map(rn * #1,x)
-      powerrn:(RN,ST A,ST A) -> ST A
-      powerrn(rn,x,c) == delay
-        concat(1,integ(smult(rn + 1,c * deriv x)) - rst x * c)
-      powern(rn,x) ==
-        order : I := 0
-        for n in 0.. repeat
-          empty? x => return zro()
-          not zero? frst x => (order := n; leave x)
-          x := rst x
-          n = 1000 =>
-            error "**: series with many leading zero coefficients"
-        (ord := (order exquo denom(rn))) case "failed" =>
-          error "**: rational power does not exist"
-        co := frst x
-        (invCo := recip co) case "failed" =>
-           error "** rational power of coefficient undefined"
--- This error message is misleading, isn't it? see sups.spad/cRationalPower
-        power :=
---          one? co => YS(powerrn(rn,x,#1))
-          (co = 1) => YS(powerrn(rn,x,#1))
-          (denom rn) = 1 =>
-            not negative?(num := numer rn) => 
--- It seems that this cannot happen, but I don't know why
-              (co**num::NNI) * YS(powerrn(rn,(invCo :: A) * x,#1))
-            (invCo :: A)**((-num)::NNI) * YS(powerrn(rn,(invCo :: A) * x,#1))
-
-          RATPOWERS => co**rn * YS(powerrn(rn,(invCo :: A) * x,#1))
-          error "** rational power of coefficient undefined"
-
-    if A has Field then
-      mapdiv(x,y) == delay
-        empty? y => error "stream division by zero"
-        empty? x => zro()
-        concat(frst x/frst y,mapdiv(rst x,rst y))
-
-      ginteg: (I -> A,ST A) -> ST A
-      ginteg(f,x) == mapdiv(x,map(f,integers 1)$SP2(I,A))
-
-      lazyGintegrate(fntoa,s,xf) == concat(s,ginteg(fntoa,delay xf))
-
-      finteg: ST A -> ST A
-      finteg x == mapdiv(x,int 1)
-      powerre: (A,ST A,ST A) -> ST A
-      powerre(s,x,c) == delay
-        empty? x => zro()
-        frst x^=1 => error "**:constant coefficient should be 1"
-        concat(frst x,finteg((s+1)*(c*deriv x))-rst x * c)
-      power(s,x) == YS(powerre(s,x,#1))
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
---    - Redistributions of source code must retain the above copyright
---      notice, this list of conditions and the following disclaimer.
---
---    - Redistributions in binary form must reproduce the above copyright
---      notice, this list of conditions and the following disclaimer in
---      the documentation and/or other materials provided with the
---      distribution.
---
---    - Neither the name of The Numerical ALgorithms Group Ltd. nor the
---      names of its contributors may be used to endorse or promote products
---      derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package STTAYLOR StreamTaylorSeriesOperations>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/sttf.spad.pamphlet b/src/algebra/sttf.spad.pamphlet
deleted file mode 100644
index 1cbc703..0000000
--- a/src/algebra/sttf.spad.pamphlet
+++ /dev/null
@@ -1,743 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/algebra sttf.spad}
-\author{William Burge, Clifton J. Williamson}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package STTF StreamTranscendentalFunctions}
-<<package STTF StreamTranscendentalFunctions>>=
-)abbrev package STTF StreamTranscendentalFunctions
-++ Author: William Burge, Clifton J. Williamson
-++ Date Created: 1986
-++ Date Last Updated: 6 March 1995
-++ Basic Operations:
-++ Related Domains:
-++ Also See:
-++ AMS Classifications:
-++ Keywords: Taylor series, elementary function, transcendental function
-++ Examples:
-++ References:
-++ Description:
-++   StreamTranscendentalFunctions implements transcendental functions on
-++   Taylor series, where a Taylor series is represented by a stream of
-++   its coefficients.
-StreamTranscendentalFunctions(Coef): Exports == Implementation where
-  Coef : Algebra Fraction Integer
-  L   ==> List
-  I   ==> Integer
-  RN  ==> Fraction Integer
-  SG  ==> String
-  ST  ==> Stream Coef
-  STT ==> StreamTaylorSeriesOperations Coef
-  YS  ==> Y$ParadoxicalCombinatorsForStreams(Coef)
-
-  Exports ==> with
---% Exponentials and Logarithms
-    exp     : ST -> ST
-      ++ exp(st) computes the exponential of a power series st.
-    log     : ST -> ST
-      ++ log(st) computes the log of a power series.
-    "**"    : (ST,ST) -> ST
-      ++ st1 ** st2 computes the power of a power series st1 by another
-      ++ power series st2.
-
---% TrigonometricFunctionCategory
-    sincos  : ST -> Record(sin:ST, cos:ST)
-      ++ sincos(st) returns a record containing the sine and cosine
-      ++ of a power series st.
-    sin     : ST -> ST
-      ++ sin(st) computes sine of a power series st.
-    cos     : ST -> ST
-      ++ cos(st) computes cosine of a power series st.
-    tan     : ST -> ST
-      ++ tan(st) computes tangent of a power series st.
-    cot     : ST -> ST
-      ++ cot(st) computes cotangent of a power series st.
-    sec     : ST -> ST
-      ++ sec(st) computes secant of a power series st.
-    csc     : ST -> ST
-      ++ csc(st) computes cosecant of a power series st.
-    asin    : ST -> ST
-      ++ asin(st) computes arcsine of a power series st.
-    acos    : ST -> ST
-      ++ acos(st) computes arccosine of a power series st.
-    atan    : ST -> ST
-      ++ atan(st) computes arctangent of a power series st.
-    acot    : ST -> ST
-      ++ acot(st) computes arccotangent of a power series st.
-    asec    : ST -> ST
-      ++ asec(st) computes arcsecant of a power series st.
-    acsc    : ST -> ST
-      ++ acsc(st) computes arccosecant of a power series st.
-
---% HyperbloicTrigonometricFunctionCategory
-    sinhcosh: ST -> Record(sinh:ST, cosh:ST)
-      ++ sinhcosh(st) returns a record containing
-      ++ the hyperbolic sine and cosine
-      ++ of a power series st.
-    sinh    : ST -> ST
-      ++ sinh(st) computes the hyperbolic sine of a power series st.
-    cosh    : ST -> ST
-      ++ cosh(st) computes the hyperbolic cosine of a power series st.
-    tanh    : ST -> ST
-      ++ tanh(st) computes the hyperbolic tangent of a power series st.
-    coth    : ST -> ST
-      ++ coth(st) computes the hyperbolic cotangent of a power series st.
-    sech    : ST -> ST
-      ++ sech(st) computes the hyperbolic secant of a power series st.
-    csch    : ST -> ST
-      ++ csch(st) computes the hyperbolic cosecant of a power series st.
-    asinh   : ST -> ST
-      ++ asinh(st) computes the inverse hyperbolic sine of a power series st.
-    acosh   : ST -> ST
-      ++ acosh(st) computes the inverse hyperbolic cosine
-      ++ of a power series st.
-    atanh   : ST -> ST
-      ++ atanh(st) computes the inverse hyperbolic tangent
-      ++ of a power series st.
-    acoth   : ST -> ST
-      ++ acoth(st) computes the inverse hyperbolic
-      ++ cotangent of a power series st.
-    asech   : ST -> ST
-      ++ asech(st) computes the inverse hyperbolic secant of a
-      ++ power series st.
-    acsch   : ST -> ST
-      ++ acsch(st) computes the inverse hyperbolic
-      ++ cosecant of a power series st.
-
-  Implementation ==> add
-    import StreamTaylorSeriesOperations Coef
-
-    TRANSFCN : Boolean := Coef has TranscendentalFunctionCategory
-
---% Error Reporting
-
-    TRCONST : SG := "series expansion involves transcendental constants"
-    NPOWERS : SG := "series expansion has terms of negative degree"
-    FPOWERS : SG := "series expansion has terms of fractional degree"
-    MAYFPOW : SG := "series expansion may have terms of fractional degree"
-    LOGS : SG := "series expansion has logarithmic term"
-    NPOWLOG : SG :=
-       "series expansion has terms of negative degree or logarithmic term"
-    FPOWLOG : SG :=
-       "series expansion has terms of fractional degree or logarithmic term"
-    NOTINV : SG := "leading coefficient not invertible"
-
---% Exponentials and Logarithms
-
-    expre:(Coef,ST,ST) -> ST
-    expre(r,e,dx) == lazyIntegrate(r,e*dx)
-
-    exp z ==
-      empty? z => 1 :: ST
-      (coef := frst z) = 0 => YS expre(1,#1,deriv z)
-      TRANSFCN => YS expre(exp coef,#1,deriv z)
-      error concat("exp: ",TRCONST)
-
-    log z ==
-      empty? z => error "log: constant coefficient should not be 0"
-      (coef := frst z) = 0 => error "log: constant coefficient should not be 0"
-      coef = 1 => lazyIntegrate(0,deriv z/z)
-      TRANSFCN => lazyIntegrate(log coef,deriv z/z)
-      error concat("log: ",TRCONST)
-
-    z1:ST ** z2:ST == exp(z2 * log z1)
-
---% Trigonometric Functions
-
-    sincosre:(Coef,Coef,L ST,ST,Coef) -> L ST
-    sincosre(rs,rc,sc,dx,sign) ==
-      [lazyIntegrate(rs,(second sc)*dx),lazyIntegrate(rc,sign*(first sc)*dx)]
-
-    -- When the compiler had difficulties with the above definition,
-    -- I did the following to help it:
-
-    -- sincosre:(Coef,Coef,L ST,ST,Coef) -> L ST
-    -- sincosre(rs,rc,sc,dx,sign) ==
-      -- st1 : ST := (second sc) * dx
-      -- st2 : ST := (first sc) * dx
-      -- st2 := sign * st2
-      -- [lazyIntegrate(rs,st1),lazyIntegrate(rc,st2)]
-
-    sincos z ==
-      empty? z => [0 :: ST,1 :: ST]
-      l :=
-        (coef := frst z) = 0 => YS(sincosre(0,1,#1,deriv z,-1),2)
-        TRANSFCN => YS(sincosre(sin coef,cos coef,#1,deriv z,-1),2)
-        error concat("sincos: ",TRCONST)
-      [first l,second l]
-
-    sin z == sincos(z).sin
-    cos z == sincos(z).cos
-
-    tanre:(Coef,ST,ST,Coef) -> ST
-    tanre(r,t,dx,sign) == lazyIntegrate(r,((1 :: ST) + sign*t*t)*dx)
-
-    -- When the compiler had difficulties with the above definition,
-    -- I did the following to help it:
-
-    -- tanre:(Coef,ST,ST,Coef) -> ST
-    -- tanre(r,t,dx,sign) ==
-      -- st1 : ST := t * t
-      -- st1 := sign * st1
-      -- st2 : ST := 1 :: ST
-      -- st1 := st2 + st1
-      -- st1 := st1 * dx
-      -- lazyIntegrate(r,st1)
-
-    tan z ==
-      empty? z => 0 :: ST
-      (coef := frst z) = 0 => YS tanre(0,#1,deriv z,1)
-      TRANSFCN => YS tanre(tan coef,#1,deriv z,1)
-      error concat("tan: ",TRCONST)
-
-    cotre:(Coef,ST,ST) -> ST
-    cotre(r,t,dx) == lazyIntegrate(r,-((1 :: ST) + t*t)*dx)
-
-    -- When the compiler had difficulties with the above definition,
-    -- I did the following to help it:
-
-    -- cotre:(Coef,ST,ST) -> ST
-    -- cotre(r,t,dx) ==
-      -- st1 : ST := t * t
-      -- st2 : ST := 1 :: ST
-      -- st1 := st2 + st1
-      -- st1 := st1 * dx
-      -- st1 := -st1
-      -- lazyIntegrate(r,st1)
-
-    cot z ==
-      empty? z => error "cot: cot(0) is undefined"
-      (coef := frst z) = 0 => error concat("cot: ",NPOWERS)
-      TRANSFCN => YS cotre(cot coef,#1,deriv z)
-      error concat("cot: ",TRCONST)
-
-    sec z ==
-      empty? z => 1 :: ST
-      frst z = 0 => recip(cos z) :: ST
-      TRANSFCN =>
-        cosz := cos z
-        first cosz = 0 => error concat("sec: ",NPOWERS)
-        recip(cosz) :: ST
-      error concat("sec: ",TRCONST)
-
-    csc z ==
-      empty? z => error "csc: csc(0) is undefined"
-      TRANSFCN =>
-        sinz := sin z
-        first sinz = 0 => error concat("csc: ",NPOWERS)
-        recip(sinz) :: ST
-      error concat("csc: ",TRCONST)
-
-    orderOrFailed : ST -> Union(I,"failed")
-    orderOrFailed x ==
-    -- returns the order of x or "failed"
-    -- if -1 is returned, the series is identically zero
-      for n in 0..1000 repeat
-        empty? x => return -1
-        not zero? frst x => return n :: I
-        x := rst x
-      "failed"
-
-    asin z ==
-      empty? z => 0 :: ST
-      (coef := frst z) = 0 =>
-        integrate(0,powern(-1/2,(1 :: ST) - z*z) * (deriv z))
-      TRANSFCN =>
-        coef = 1 or coef = -1 =>
-          x := (1 :: ST) - z*z
-          -- compute order of 'x'
-          (ord := orderOrFailed x) case "failed" =>
-            error concat("asin: ",MAYFPOW)
-          (order := ord :: I) = -1 => return asin(coef) :: ST
-          odd? order => error concat("asin: ",FPOWERS)
-          squirt := powern(1/2,x)
-          (quot := (deriv z) exquo squirt) case "failed" =>
-             error concat("asin: ",NOTINV)
-          integrate(asin coef,quot :: ST)
-        integrate(asin coef,powern(-1/2,(1 :: ST) - z*z) * (deriv z))
-      error concat("asin: ",TRCONST)
-
-    acos z ==
-      empty? z =>
-        TRANSFCN => acos(0)$Coef :: ST
-        error concat("acos: ",TRCONST)
-      TRANSFCN =>
-        coef := frst z
-        coef = 1 or coef = -1 =>
-          x := (1 :: ST) - z*z
-          -- compute order of 'x'
-          (ord := orderOrFailed x) case "failed" =>
-            error concat("acos: ",MAYFPOW)
-          (order := ord :: I) = -1 => return acos(coef) :: ST
-          odd? order => error concat("acos: ",FPOWERS)
-          squirt := powern(1/2,x)
-          (quot := (-deriv z) exquo squirt) case "failed" =>
-             error concat("acos: ",NOTINV)
-          integrate(acos coef,quot :: ST)
-        integrate(acos coef,-powern(-1/2,(1 :: ST) - z*z) * (deriv z))
-      error concat("acos: ",TRCONST)
-
-    atan z ==
-      empty? z => 0 :: ST
-      (coef := frst z) = 0 =>
-        integrate(0,(recip((1 :: ST) + z*z) :: ST) * (deriv z))
-      TRANSFCN =>
-        (y := recip((1 :: ST) + z*z)) case "failed" =>
-          error concat("atan: ",LOGS)
-        integrate(atan coef,(y :: ST) * (deriv z))
-      error concat("atan: ",TRCONST)
-
-    acot z ==
-      empty? z =>
-        TRANSFCN => acot(0)$Coef :: ST
-        error concat("acot: ",TRCONST)
-      TRANSFCN =>
-        (y := recip((1 :: ST) + z*z)) case "failed" =>
-          error concat("acot: ",LOGS)
-        integrate(acot frst z,-(y :: ST) * (deriv z))
-      error concat("acot: ",TRCONST)
-
-    asec z ==
-      empty? z => error "asec: constant coefficient should not be 0"
-      TRANSFCN =>
-        (coef := frst z) = 0 =>
-          error "asec: constant coefficient should not be 0"
-        coef = 1 or coef = -1 =>
-          x := z*z - (1 :: ST)
-          -- compute order of 'x'
-          (ord := orderOrFailed x) case "failed" =>
-            error concat("asec: ",MAYFPOW)
-          (order := ord :: I) = -1 => return asec(coef) :: ST
-          odd? order => error concat("asec: ",FPOWERS)
-          squirt := powern(1/2,x)
-          (quot := (deriv z) exquo squirt) case "failed" =>
-            error concat("asec: ",NOTINV)
-          (quot2 := (quot :: ST) exquo z) case "failed" =>
-            error concat("asec: ",NOTINV)
-          integrate(asec coef,quot2 :: ST)
-        integrate(asec coef,(powern(-1/2,z*z-(1::ST))*(deriv z)) / z)
-      error concat("asec: ",TRCONST)
-
-    acsc z ==
-      empty? z => error "acsc: constant coefficient should not be zero"
-      TRANSFCN =>
-        (coef := frst z) = 0 =>
-          error "acsc: constant coefficient should not be zero"
-        coef = 1 or coef = -1 =>
-          x := z*z - (1 :: ST)
-          -- compute order of 'x'
-          (ord := orderOrFailed x) case "failed" =>
-            error concat("acsc: ",MAYFPOW)
-          (order := ord :: I) = -1 => return acsc(coef) :: ST
-          odd? order => error concat("acsc: ",FPOWERS)
-          squirt := powern(1/2,x)
-          (quot := (-deriv z) exquo squirt) case "failed" =>
-            error concat("acsc: ",NOTINV)
-          (quot2 := (quot :: ST) exquo z) case "failed" =>
-            error concat("acsc: ",NOTINV)
-          integrate(acsc coef,quot2 :: ST)
-        integrate(acsc coef,-(powern(-1/2,z*z-(1::ST))*(deriv z)) / z)
-      error concat("acsc: ",TRCONST)
-
---% Hyperbolic Trigonometric Functions
-
-    sinhcosh z ==
-      empty? z => [0 :: ST,1 :: ST]
-      l :=
-        (coef := frst z) = 0 => YS(sincosre(0,1,#1,deriv z,1),2)
-        TRANSFCN => YS(sincosre(sinh coef,cosh coef,#1,deriv z,1),2)
-        error concat("sinhcosh: ",TRCONST)
-      [first l,second l]
-
-    sinh z == sinhcosh(z).sinh
-    cosh z == sinhcosh(z).cosh
-
-    tanh z ==
-      empty? z => 0 :: ST
-      (coef := frst z) = 0 => YS tanre(0,#1,deriv z,-1)
-      TRANSFCN => YS tanre(tanh coef,#1,deriv z,-1)
-      error concat("tanh: ",TRCONST)
-
-    coth z ==
-      tanhz := tanh z
-      empty? tanhz => error "coth: coth(0) is undefined"
-      (frst tanhz) = 0 => error concat("coth: ",NPOWERS)
-      recip(tanhz) :: ST
-
-    sech z ==
-      coshz := cosh z
-      (empty? coshz) or (frst coshz = 0) => error concat("sech: ",NPOWERS)
-      recip(coshz) :: ST
-
-    csch z ==
-      sinhz := sinh z
-      (empty? sinhz) or (frst sinhz = 0) => error concat("csch: ",NPOWERS)
-      recip(sinhz) :: ST
-
-    asinh z ==
-      empty? z => 0 :: ST
-      (coef := frst z) = 0 => log(z + powern(1/2,(1 :: ST) + z*z))
-      TRANSFCN =>
-        x := (1 :: ST) + z*z
-        -- compute order of 'x', in case coefficient(z,0) = +- %i
-        (ord := orderOrFailed x) case "failed" =>
-          error concat("asinh: ",MAYFPOW)
-        (order := ord :: I) = -1 => return asinh(coef) :: ST
-        odd? order => error concat("asinh: ",FPOWERS)
-        -- the argument to 'log' must have a non-zero constant term
-        log(z + powern(1/2,x))
-      error concat("asinh: ",TRCONST)
-
-    acosh z ==
-      empty? z =>
-        TRANSFCN => acosh(0)$Coef :: ST
-        error concat("acosh: ",TRCONST)
-      TRANSFCN =>
-        coef := frst z
-        coef = 1 or coef = -1 =>
-          x := z*z - (1 :: ST)
-          -- compute order of 'x'
-          (ord := orderOrFailed x) case "failed" =>
-            error concat("acosh: ",MAYFPOW)
-          (order := ord :: I) = -1 => return acosh(coef) :: ST
-          odd? order => error concat("acosh: ",FPOWERS)
-          -- the argument to 'log' must have a non-zero constant term
-          log(z + powern(1/2,x))
-        log(z + powern(1/2,z*z - (1 :: ST)))
-      error concat("acosh: ",TRCONST)
-
-    atanh z ==
-      empty? z => 0 :: ST
-      (coef := frst z) = 0 =>
-        (inv(2::RN)::Coef) * log(((1 :: ST) + z)/((1 :: ST) - z))
-      TRANSFCN =>
-        coef = 1 or coef = -1 => error concat("atanh: ",LOGS)
-        (inv(2::RN)::Coef) * log(((1 :: ST) + z)/((1 :: ST) - z))
-      error concat("atanh: ",TRCONST)
-
-    acoth z ==
-      empty? z =>
-        TRANSFCN => acoth(0)$Coef :: ST
-        error concat("acoth: ",TRCONST)
-      TRANSFCN =>
-        frst z = 1 or frst z = -1 => error concat("acoth: ",LOGS)
-        (inv(2::RN)::Coef) * log((z + (1 :: ST))/(z - (1 :: ST)))
-      error concat("acoth: ",TRCONST)
-
-    asech z ==
-      empty? z => error "asech: asech(0) is undefined"
-      TRANSFCN =>
-        (coef := frst z) = 0 => error concat("asech: ",NPOWLOG)
-        coef = 1 or coef = -1 =>
-          x := (1 :: ST) - z*z
-          -- compute order of 'x'
-          (ord := orderOrFailed x) case "failed" =>
-            error concat("asech: ",MAYFPOW)
-          (order := ord :: I) = -1 => return asech(coef) :: ST
-          odd? order => error concat("asech: ",FPOWERS)
-          log(((1 :: ST) + powern(1/2,x))/z)
-        log(((1 :: ST) + powern(1/2,(1 :: ST) - z*z))/z)
-      error concat("asech: ",TRCONST)
-
-    acsch z ==
-      empty? z => error "acsch: acsch(0) is undefined"
-      TRANSFCN =>
-        frst z = 0 => error concat("acsch: ",NPOWLOG)
-        x := z*z + (1 :: ST)
-        -- compute order of 'x'
-        (ord := orderOrFailed x) case "failed" =>
-          error concat("acsc: ",MAYFPOW)
-        (order := ord :: I) = -1 => return acsch(frst z) :: ST
-        odd? order => error concat("acsch: ",FPOWERS)
-        log(((1 :: ST) + powern(1/2,x))/z)
-      error concat("acsch: ",TRCONST)
-
-@
-\section{package STTFNC StreamTranscendentalFunctionsNonCommutative}
-<<package STTFNC StreamTranscendentalFunctionsNonCommutative>>=
-)abbrev package STTFNC StreamTranscendentalFunctionsNonCommutative
-++ Author: Clifton J. Williamson
-++ Date Created: 26 May 1994
-++ Date Last Updated: 26 May 1994
-++ Basic Operations:
-++ Related Domains:
-++ Also See:
-++ AMS Classifications:
-++ Keywords: Taylor series, transcendental function, non-commutative
-++ Examples:
-++ References:
-++ Description:
-++   StreamTranscendentalFunctionsNonCommutative implements transcendental
-++   functions on Taylor series over a non-commutative ring, where a Taylor
-++   series is represented by a stream of its coefficients.
-StreamTranscendentalFunctionsNonCommutative(Coef): _
-         Exports == Implementation where
-  Coef :   Algebra Fraction Integer
-  I    ==> Integer
-  SG   ==> String
-  ST   ==> Stream Coef
-  STTF ==> StreamTranscendentalFunctions Coef
-
-  Exports ==> with
---% Exponentials and Logarithms
-    exp     : ST -> ST
-      ++ exp(st) computes the exponential of a power series st.
-    log     : ST -> ST
-      ++ log(st) computes the log of a power series.
-    "**"    : (ST,ST) -> ST
-      ++ st1 ** st2 computes the power of a power series st1 by another
-      ++ power series st2.
-
---% TrigonometricFunctionCategory
-    sin     : ST -> ST
-      ++ sin(st) computes sine of a power series st.
-    cos     : ST -> ST
-      ++ cos(st) computes cosine of a power series st.
-    tan     : ST -> ST
-      ++ tan(st) computes tangent of a power series st.
-    cot     : ST -> ST
-      ++ cot(st) computes cotangent of a power series st.
-    sec     : ST -> ST
-      ++ sec(st) computes secant of a power series st.
-    csc     : ST -> ST
-      ++ csc(st) computes cosecant of a power series st.
-    asin    : ST -> ST
-      ++ asin(st) computes arcsine of a power series st.
-    acos    : ST -> ST
-      ++ acos(st) computes arccosine of a power series st.
-    atan    : ST -> ST
-      ++ atan(st) computes arctangent of a power series st.
-    acot    : ST -> ST
-      ++ acot(st) computes arccotangent of a power series st.
-    asec    : ST -> ST
-      ++ asec(st) computes arcsecant of a power series st.
-    acsc    : ST -> ST
-      ++ acsc(st) computes arccosecant of a power series st.
-
---% HyperbloicTrigonometricFunctionCategory
-    sinh    : ST -> ST
-      ++ sinh(st) computes the hyperbolic sine of a power series st.
-    cosh    : ST -> ST
-      ++ cosh(st) computes the hyperbolic cosine of a power series st.
-    tanh    : ST -> ST
-      ++ tanh(st) computes the hyperbolic tangent of a power series st.
-    coth    : ST -> ST
-      ++ coth(st) computes the hyperbolic cotangent of a power series st.
-    sech    : ST -> ST
-      ++ sech(st) computes the hyperbolic secant of a power series st.
-    csch    : ST -> ST
-      ++ csch(st) computes the hyperbolic cosecant of a power series st.
-    asinh   : ST -> ST
-      ++ asinh(st) computes the inverse hyperbolic sine of a power series st.
-    acosh   : ST -> ST
-      ++ acosh(st) computes the inverse hyperbolic cosine
-      ++ of a power series st.
-    atanh   : ST -> ST
-      ++ atanh(st) computes the inverse hyperbolic tangent
-      ++ of a power series st.
-    acoth   : ST -> ST
-      ++ acoth(st) computes the inverse hyperbolic
-      ++ cotangent of a power series st.
-    asech   : ST -> ST
-      ++ asech(st) computes the inverse hyperbolic secant of a
-      ++ power series st.
-    acsch   : ST -> ST
-      ++ acsch(st) computes the inverse hyperbolic
-      ++ cosecant of a power series st.
-
-  Implementation ==> add
-    import StreamTaylorSeriesOperations(Coef)
-
---% Error Reporting
-
-    ZERO    : SG := "series must have constant coefficient zero"
-    ONE     : SG := "series must have constant coefficient one"
-    NPOWERS : SG := "series expansion has terms of negative degree"
-
---% Exponentials and Logarithms
-
-    exp z ==
-      empty? z => 1 :: ST
-      (frst z) = 0 =>
-        expx := exp(monom(1,1))$STTF
-        compose(expx,z)
-      error concat("exp: ",ZERO)
-
-    log z ==
-      empty? z => error concat("log: ",ONE)
-      (frst z) = 1 =>
-        log1PlusX := log(monom(1,0) + monom(1,1))$STTF
-        compose(log1PlusX,z - monom(1,0))
-      error concat("log: ",ONE)
-
-    (z1:ST) ** (z2:ST) == exp(log(z1) * z2)
-
---% Trigonometric Functions
-
-    sin z ==
-      empty? z => 0 :: ST
-      (frst z) = 0 =>
-        sinx := sin(monom(1,1))$STTF
-        compose(sinx,z)
-      error concat("sin: ",ZERO)
-
-    cos z ==
-      empty? z => 1 :: ST
-      (frst z) = 0 =>
-        cosx := cos(monom(1,1))$STTF
-        compose(cosx,z)
-      error concat("cos: ",ZERO)
-
-    tan z ==
-      empty? z => 0 :: ST
-      (frst z) = 0 =>
-        tanx := tan(monom(1,1))$STTF
-        compose(tanx,z)
-      error concat("tan: ",ZERO)
-
-    cot z ==
-      empty? z => error "cot: cot(0) is undefined"
-      (frst z) = 0 => error concat("cot: ",NPOWERS)
-      error concat("cot: ",ZERO)
-
-    sec z ==
-      empty? z => 1 :: ST
-      (frst z) = 0 =>
-        secx := sec(monom(1,1))$STTF
-        compose(secx,z)
-      error concat("sec: ",ZERO)
-
-    csc z ==
-      empty? z => error "csc: csc(0) is undefined"
-      (frst z) = 0 => error concat("csc: ",NPOWERS)
-      error concat("csc: ",ZERO)
-
-    asin z ==
-      empty? z => 0 :: ST
-      (frst z) = 0 =>
-        asinx := asin(monom(1,1))$STTF
-        compose(asinx,z)
-      error concat("asin: ",ZERO)
-
-    atan z ==
-      empty? z => 0 :: ST
-      (frst z) = 0 =>
-        atanx := atan(monom(1,1))$STTF
-        compose(atanx,z)
-      error concat("atan: ",ZERO)
-
-    acos z == error "acos: acos undefined on this coefficient domain"
-    acot z == error "acot: acot undefined on this coefficient domain"
-    asec z == error "asec: asec undefined on this coefficient domain"
-    acsc z == error "acsc: acsc undefined on this coefficient domain"
-
---% Hyperbolic Trigonometric Functions
-
-    sinh z ==
-      empty? z => 0 :: ST
-      (frst z) = 0 =>
-        sinhx := sinh(monom(1,1))$STTF
-        compose(sinhx,z)
-      error concat("sinh: ",ZERO)
-
-    cosh z ==
-      empty? z => 1 :: ST
-      (frst z) = 0 =>
-        coshx := cosh(monom(1,1))$STTF
-        compose(coshx,z)
-      error concat("cosh: ",ZERO)
-
-    tanh z ==
-      empty? z => 0 :: ST
-      (frst z) = 0 =>
-        tanhx := tanh(monom(1,1))$STTF
-        compose(tanhx,z)
-      error concat("tanh: ",ZERO)
-
-    coth z ==
-      empty? z => error "coth: coth(0) is undefined"
-      (frst z) = 0 => error concat("coth: ",NPOWERS)
-      error concat("coth: ",ZERO)
-
-    sech z ==
-      empty? z => 1 :: ST
-      (frst z) = 0 =>
-        sechx := sech(monom(1,1))$STTF
-        compose(sechx,z)
-      error concat("sech: ",ZERO)
-
-    csch z ==
-      empty? z => error "csch: csch(0) is undefined"
-      (frst z) = 0 => error concat("csch: ",NPOWERS)
-      error concat("csch: ",ZERO)
-
-    asinh z ==
-      empty? z => 0 :: ST
-      (frst z) = 0 =>
-        asinhx := asinh(monom(1,1))$STTF
-        compose(asinhx,z)
-      error concat("asinh: ",ZERO)
-
-    atanh z ==
-      empty? z => 0 :: ST
-      (frst z) = 0 =>
-        atanhx := atanh(monom(1,1))$STTF
-        compose(atanhx,z)
-      error concat("atanh: ",ZERO)
-
-    acosh z == error "acosh: acosh undefined on this coefficient domain"
-    acoth z == error "acoth: acoth undefined on this coefficient domain"
-    asech z == error "asech: asech undefined on this coefficient domain"
-    acsch z == error "acsch: acsch undefined on this coefficient domain"
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
---    - Redistributions of source code must retain the above copyright
---      notice, this list of conditions and the following disclaimer.
---
---    - Redistributions in binary form must reproduce the above copyright
---      notice, this list of conditions and the following disclaimer in
---      the documentation and/or other materials provided with the
---      distribution.
---
---    - Neither the name of The Numerical ALgorithms Group Ltd. nor the
---      names of its contributors may be used to endorse or promote products
---      derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package STTF StreamTranscendentalFunctions>>
-<<package STTFNC StreamTranscendentalFunctionsNonCommutative>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/sturm.spad.pamphlet b/src/algebra/sturm.spad.pamphlet
deleted file mode 100644
index 462c1c0..0000000
--- a/src/algebra/sturm.spad.pamphlet
+++ /dev/null
@@ -1,421 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/algebra sturm.spad}
-\author{Lalo Gonzalez-Vega}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package SHP SturmHabichtPackage}
-<<package SHP SturmHabichtPackage>>=
-)abbrev package SHP SturmHabichtPackage
-++ Author: Lalo Gonzalez-Vega
-++ Date Created: 1994?
-++ Date Last Updated: 30 January 1996
-++ Basic Functions: 
-++ Related Constructors:
-++ Also See:
-++ AMS Classifications:
-++ Keywords: localization
-++ References:
-++ Description: 
-++ This package produces functions for counting
-++ etc. real roots of univariate polynomials in x over R, which must
-++ be an OrderedIntegralDomain
-SturmHabichtPackage(R,x): T == C where
-  R: OrderedIntegralDomain
-  x: Symbol
-
-  UP ==> UnivariatePolynomial
-  L ==> List
-  INT ==> Integer
-  NNI ==> NonNegativeInteger
-
-  T == with
---     subresultantSequenceBegin:(UP(x,R),UP(x,R)) -> L UP(x,R)
---       ++ \spad{subresultantSequenceBegin(p1,p2)} computes the  initial terms
---       ++ of the Subresultant sequence Sres(j)(P,deg(P),Q,deg(P)-1)
---       ++ when deg(Q)<deg(P)
---     subresultantSequenceNext:L UP(x,R) -> L UP(x,R)
---     subresultantSequenceInner:(UP(x,R),UP(x,R)) -> L UP(x,R)
-     subresultantSequence:(UP(x,R),UP(x,R)) -> L UP(x,R)
-       ++ subresultantSequence(p1,p2) computes the (standard) 
-       ++ subresultant sequence of p1 and p2
---     sign:R -> R
---     delta:NNI -> R
-
---     polsth1:(UP(x,R),NNI,UP(x,R),NNI,R) -> L UP(x,R)
---     polsth2:(UP(x,R),NNI,UP(x,R),NNI,R) -> L UP(x,R)
---     polsth3:(UP(x,R),NNI,UP(x,R),NNI,R) -> L UP(x,R)
-     SturmHabichtSequence:(UP(x,R),UP(x,R)) -> L UP(x,R)
-       ++ SturmHabichtSequence(p1,p2) computes the Sturm-Habicht
-       ++ sequence of p1 and p2
-     SturmHabichtCoefficients:(UP(x,R),UP(x,R)) -> L R
-       ++ SturmHabichtCoefficients(p1,p2) computes the principal
-       ++ Sturm-Habicht coefficients of p1 and p2
-
---     variation:L R -> INT
---     permanence:L R -> INT
---     qzeros:L R -> L R
---     epsil:(NNI,R,R) -> INT
---     numbnce:L R -> NNI
---     numbce:L R -> NNI
---     wfunctaux:L R -> INT
---     wfunct:L R -> INT
-
-     SturmHabicht:(UP(x,R),UP(x,R)) -> INT 
-       ++ SturmHabicht(p1,p2) computes c_{+}-c_{-} where
-       ++ c_{+} is the number of real roots of p1 with p2>0 and c_{-}
-       ++ is the number of real roots of p1 with p2<0. If p2=1 what
-       ++ you get is the number of real roots of p1.
-     countRealRoots:(UP(x,R)) -> INT
-       ++ countRealRoots(p) says how many real roots p has
-     if R has GcdDomain then
-        SturmHabichtMultiple:(UP(x,R),UP(x,R)) -> INT
-          ++ SturmHabichtMultiple(p1,p2) computes c_{+}-c_{-} where
-          ++ c_{+} is the number of real roots of p1 with p2>0 and c_{-}
-          ++ is the number of real roots of p1 with p2<0. If p2=1 what
-          ++ you get is the number of real roots of p1.
-        countRealRootsMultiple:(UP(x,R)) -> INT
-          ++ countRealRootsMultiple(p) says how many real roots p has,
-          ++ counted with multiplicity
-
-
-  C == add
-     p1,p2: UP(x,R)
-     Ex ==> OutputForm
-     import OutputForm
-
-     subresultantSequenceBegin(p1,p2):L UP(x,R) ==
-       d1:NNI:=degree(p1)
-       d2:NNI:=degree(p2)
-       n:NNI:=(d1-1)::NNI
-       d2 = n =>
-         Pr:UP(x,R):=pseudoRemainder(p1,p2)
-         append([p1,p2]::L UP(x,R),[Pr]::L UP(x,R))
-       d2 = (n-1)::NNI =>
-         Lc1:UP(x,R):=leadingCoefficient(p1)*leadingCoefficient(p2)*p2
-         Lc2:UP(x,R):=-leadingCoefficient(p1)*pseudoRemainder(p1,p2)
-         append([p1,p2]::L UP(x,R),[Lc1,Lc2]::L UP(x,R))
-       LSubr:L UP(x,R):=[p1,p2]
-       in1:INT:=(d2+1)::INT
-       in2:INT:=(n-1)::INT
-       for i in in1..in2 repeat
-         LSubr:L UP(x,R):=append(LSubr::L UP(x,R),[0]::L UP(x,R))
-       c1:R:=(leadingCoefficient(p1)*leadingCoefficient(p2))**((n-d2)::NNI)
-       Lc1:UP(x,R):=monomial(c1,0)*p2
-       Lc2:UP(x,R):=
-         (-leadingCoefficient(p1))**((n-d2)::NNI)*pseudoRemainder(p1,p2)
-       append(LSubr::L UP(x,R),[Lc1,Lc2]::L UP(x,R))
-
-     subresultantSequenceNext(LcsI:L UP(x,R)):L UP(x,R) ==
-       p2:UP(x,R):=last LcsI
-       p1:UP(x,R):=first rest reverse LcsI
-       d1:NNI:=degree(p1)
-       d2:NNI:=degree(p2)
-       in1:NNI:=(d1-1)::NNI
-       d2 = in1 =>
-         pr1:UP(x,R):=
-           (pseudoRemainder(p1,p2) exquo (leadingCoefficient(p1))**2)::UP(x,R)
-         append(LcsI:L UP(x,R),[pr1]:L UP(x,R))
-       d2 < in1 =>
-         c1:R:=leadingCoefficient(p1)
-         pr1:UP(x,R):=
-          (leadingCoefficient(p2)**((in1-d2)::NNI)*p2 exquo
-              c1**((in1-d2)::NNI))::UP(x,R)
-         pr2:UP(x,R):=
-           (pseudoRemainder(p1,p2) exquo (-c1)**((in1-d2+2)::NNI))::UP(x,R)
-         LSub:L UP(x,R):=[pr1,pr2]
-         for k in ((d2+1)::INT)..((in1-1)::INT) repeat
-           LSub:L UP(x,R):=append([0]:L UP(x,R),LSub:L UP(x,R))
-         append(LcsI:L UP(x,R),LSub:L UP(x,R))
-
-     subresultantSequenceInner(p1,p2):L UP(x,R) ==
-       Lin:L UP(x,R):=subresultantSequenceBegin(p1:UP(x,R),p2:UP(x,R))
-       indf:NNI:= if not(Lin.last::UP(x,R) = 0) then degree(Lin.last::UP(x,R))
-                                               else 0
-       while not(indf = 0) repeat
-         Lin:L UP(x,R):=subresultantSequenceNext(Lin:L UP(x,R))
-         indf:NNI:= if not(Lin.last::UP(x,R)=0) then degree(Lin.last::UP(x,R))
-                                               else 0
-       for j in #(Lin:L UP(x,R))..degree(p1) repeat
-         Lin:L UP(x,R):=append(Lin:L UP(x,R),[0]:L UP(x,R))
-       Lin
-
-
--- Computation of the subresultant sequence Sres(j)(P,p,Q,q) when:
---             deg(P) = p   and   deg(Q) = q   and   p > q
-
-     subresultantSequence(p1,p2):L UP(x,R) ==
-       p:NNI:=degree(p1)
-       q:NNI:=degree(p2)
-       List1:L UP(x,R):=subresultantSequenceInner(p1,p2)
-       List2:L UP(x,R):=[p1,p2]
-       c1:R:=leadingCoefficient(p1)
-       for j in 3..#(List1) repeat
-         Pr0:UP(x,R):=List1.j
-         Pr1:UP(x,R):=(Pr0 exquo c1**((p-q-1)::NNI))::UP(x,R)
-         List2:L UP(x,R):=append(List2:L UP(x,R),[Pr1]:L UP(x,R))
-       List2
-
-
--- Computation of the sign (+1,0,-1) of an element in an ordered integral
--- domain
-
---     sign(r:R):R ==
---       r =$R 0 => 0
---       r >$R 0 => 1
---       -1
-
-
--- Computation of the delta function:
-
-     delta(int1:NNI):R ==
-       (-1)**((int1*(int1+1) exquo 2)::NNI)
-
-
--- Computation of the Sturm-Habicht sequence of two polynomials P and Q
--- in R[x] where R is an ordered integral domaine
-
-     polsth1(p1,p:NNI,p2,q:NNI,c1:R):L UP(x,R) ==
-       sc1:R:=(sign(c1))::R
-       Pr1:UP(x,R):=pseudoRemainder(differentiate(p1)*p2,p1)
-       Pr2:UP(x,R):=(Pr1 exquo c1**(q::NNI))::UP(x,R)
-       c2:R:=leadingCoefficient(Pr2)
-       r:NNI:=degree(Pr2)
-       Pr3:UP(x,R):=monomial(sc1**((p-r-1)::NNI),0)*p1
-       Pr4:UP(x,R):=monomial(sc1**((p-r-1)::NNI),0)*Pr2
-       Listf:L UP(x,R):=[Pr3,Pr4]
-       if r < p-1 then
-         Pr5:UP(x,R):=monomial(delta((p-r-1)::NNI)*c2**((p-r-1)::NNI),0)*Pr2
-         for j in ((r+1)::INT)..((p-2)::INT) repeat
-           Listf:L UP(x,R):=append(Listf:L UP(x,R),[0]:L UP(x,R))
-         Listf:L UP(x,R):=append(Listf:L UP(x,R),[Pr5]:L UP(x,R))
-       if Pr1=0 then List1:L UP(x,R):=Listf
-                else List1:L UP(x,R):=subresultantSequence(p1,Pr2)
-       List2:L UP(x,R):=[]
-       for j in 0..((r-1)::INT) repeat
-         Pr6:UP(x,R):=monomial(delta((p-j-1)::NNI),0)*List1.((p-j+1)::NNI)
-         List2:L UP(x,R):=append([Pr6]:L UP(x,R),List2:L UP(x,R))
-       append(Listf:L UP(x,R),List2:L UP(x,R))
-
-     polsth2(p1,p:NNI,p2,q:NNI,c1:R):L UP(x,R) ==
-       sc1:R:=(sign(c1))::R
-       Pr1:UP(x,R):=monomial(sc1,0)*p1
-       Pr2:UP(x,R):=differentiate(p1)*p2
-       Pr3:UP(x,R):=monomial(sc1,0)*Pr2
-       Listf:L UP(x,R):=[Pr1,Pr3]
-       List1:L UP(x,R):=subresultantSequence(p1,Pr2)
-       List2:L UP(x,R):=[]
-       for j in 0..((p-2)::INT) repeat
-         Pr4:UP(x,R):=monomial(delta((p-j-1)::NNI),0)*List1.((p-j+1)::NNI)
-         Pr5:UP(x,R):=(Pr4 exquo c1)::UP(x,R)
-         List2:L UP(x,R):=append([Pr5]:L UP(x,R),List2:L UP(x,R))
-       append(Listf:L UP(x,R),List2:L UP(x,R))
-
-     polsth3(p1,p:NNI,p2,q:NNI,c1:R):L UP(x,R) ==
-       sc1:R:=(sign(c1))::R
-       q1:NNI:=(q-1)::NNI
-       v:NNI:=(p+q1)::NNI
-       Pr1:UP(x,R):=monomial(delta(q1::NNI)*sc1**((q+1)::NNI),0)*p1
-       Listf:L UP(x,R):=[Pr1]
-       List1:L UP(x,R):=subresultantSequence(differentiate(p1)*p2,p1)
-       List2:L UP(x,R):=[]
-       for j in 0..((p-1)::NNI) repeat
-         Pr2:UP(x,R):=monomial(delta((v-j)::NNI),0)*List1.((v-j+1)::NNI)
-         Pr3:UP(x,R):=(Pr2 exquo c1)::UP(x,R)
-         List2:L UP(x,R):=append([Pr3]:L UP(x,R),List2:L UP(x,R))
-       append(Listf:L UP(x,R),List2:L UP(x,R))
-
-     SturmHabichtSequence(p1,p2):L UP(x,R) ==
-       p:NNI:=degree(p1)
-       q:NNI:=degree(p2)
-       c1:R:=leadingCoefficient(p1)
-       c1 = 1 or q = 1 => polsth1(p1,p,p2,q,c1)
-       q = 0 => polsth2(p1,p,p2,q,c1)
-       polsth3(p1,p,p2,q,c1)
-
-
--- Computation of the Sturm-Habicht principal coefficients of two
--- polynomials P and Q in R[x] where R is an ordered integral domain
-
-     SturmHabichtCoefficients(p1,p2):L R ==
-       List1:L UP(x,R):=SturmHabichtSequence(p1,p2)
---       List2:L R:=[]
-       qp:NNI:=#(List1)::NNI
-       [coefficient(p,(qp-j)::NNI) for p in List1 for j in 1..qp]
---       for j in 1..qp repeat
---         Ply:R:=coefficient(List1.j,(qp-j)::NNI)
---         List2:L R:=append(List2,[Ply])
---       List2
-
-
--- Computation of the number of sign variations of a list of non zero
--- elements in an ordered integral domain
-
-     variation(Lsig:L R):INT ==
-       size?(Lsig,1) => 0
-       elt1:R:=first Lsig
-       elt2:R:=Lsig.2
-       sig1:R:=(sign(elt1*elt2))::R
-       List1:L R:=rest Lsig
-       sig1 = 1 => variation List1
-       1+variation List1
-
-
--- Computation of the number of sign permanences of a list of non zero
--- elements in an ordered integral domain
-
-     permanence(Lsig:L R):INT ==
-       size?(Lsig,1) => 0
-       elt1:R:=first Lsig
-       elt2:R:=Lsig.2
-       sig1:R:=(sign(elt1*elt2))::R
-       List1:L R:=rest Lsig
-       sig1 = -1 => permanence List1
-       1+permanence List1
-
-
--- Computation of the functional W which works over a list of elements
--- in an ordered integral domain, with non zero first element
-
-     qzeros(Lsig:L R):L R ==
-       while last Lsig = 0 repeat
-         Lsig:L R:=reverse rest reverse Lsig
-       Lsig
-
-     epsil(int1:NNI,elt1:R,elt2:R):INT ==
-       int1 = 0 => 0
-       odd? int1 => 0
-       ct1:INT:=if elt1 > 0 then 1 else -1
-       ct2:INT:=if elt2 > 0 then 1 else -1
-       ct3:NNI:=(int1 exquo 2)::NNI
-       ct4:INT:=(ct1*ct2)::INT
-       ((-1)**(ct3::NNI))*ct4
-
-     numbnce(Lsig:L R):NNI ==
-       null Lsig => 0
-       eltp:R:=Lsig.1
-       eltp = 0 => 0
-       1 + numbnce(rest Lsig)
-
-     numbce(Lsig:L R):NNI ==
-       null Lsig => 0
-       eltp:R:=Lsig.1
-       not(eltp = 0) => 0
-       1 + numbce(rest Lsig)
-
-     wfunctaux(Lsig:L R):INT ==
-       null Lsig => 0
-       List2:L R:=[]
-       List1:L R:=Lsig:L R
-       cont1:NNI:=numbnce(List1:L R)
-       for j in 1..cont1 repeat
-         List2:L R:=append(List2:L R,[first List1]:L R)
-         List1:L R:=rest List1
-       ind2:INT:=0
-       cont2:NNI:=numbce(List1:L R)
-       for j in 1..cont2 repeat
-         List1:L R:=rest List1
-         ind2:INT:=epsil(cont2:NNI,last List2,first List1)
-       ind3:INT:=permanence(List2:L R)-variation(List2:L R)
-       ind4:INT:=ind2+ind3
-       ind4+wfunctaux(List1:L R)
-
-     wfunct(Lsig:L R):INT ==
-       List1:L R:=qzeros(Lsig:L R)
-       wfunctaux(List1:L R)
-
-
--- Computation of the integer number:
---    #[{a in Rc(R)/P(a)=0 Q(a)>0}] - #[{a in Rc(R)/P(a)=0 Q(a)<0}]
--- where:
---    - R is an ordered integral domain,
---    - Rc(R) is the real clousure of R,
---    - P and Q are polynomials in R[x],
---    - by #[A] we note the cardinal of the set A
-
--- In particular:
---      - SturmHabicht(P,1) is the number of "real" roots of P,
---      - SturmHabicht(P,Q**2) is the number of "real" roots of P making Q neq 0
-
-     SturmHabicht(p1,p2):INT ==
---     print("+" :: Ex)
-       p2 = 0 => 0
-       degree(p1:UP(x,R)) = 0 => 0
-       List1:L UP(x,R):=SturmHabichtSequence(p1,p2)
-       qp:NNI:=#(List1)::NNI
-       wfunct [coefficient(p,(qp-j)::NNI) for p in List1 for j in 1..qp]
-
-     countRealRoots(p1):INT == SturmHabicht(p1,1)
-
-     if R has GcdDomain then
-        SturmHabichtMultiple(p1,p2):INT ==
-   --     print("+" :: Ex)
-          p2 = 0 => 0
-          degree(p1:UP(x,R)) = 0 => 0
-          SH:L UP(x,R):=SturmHabichtSequence(p1,p2)
-          qp:NNI:=#(SH)::NNI
-          ans:= wfunct [coefficient(p,(qp-j)::NNI) for p in SH for j in 1..qp]
-          SH:=reverse SH
-          while first SH = 0 repeat SH:=rest SH
-          degree first SH = 0 => ans
-          -- OK: it probably wasn't square free, so this item is probably the 
-          -- gcd of p1 and p1'
-          -- unless p1 and p2 have a factor in common (naughty!)
-          differentiate(p1) exquo first SH case UP(x,R) =>
-             -- it was the gcd of p1 and p1'
-             ans+SturmHabichtMultiple(first SH,p2)
-          sqfr:=factorList squareFree p1
-          #sqfr = 1 and sqfr.first.xpnt=1 => ans
-          reduce("+",[f.xpnt*SturmHabicht(f.fctr,p2) for f in sqfr])
-
-        countRealRootsMultiple(p1):INT == SturmHabichtMultiple(p1,1)
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
---    - Redistributions of source code must retain the above copyright
---      notice, this list of conditions and the following disclaimer.
---
---    - Redistributions in binary form must reproduce the above copyright
---      notice, this list of conditions and the following disclaimer in
---      the documentation and/or other materials provided with the
---      distribution.
---
---    - Neither the name of The Numerical ALgorithms Group Ltd. nor the
---      names of its contributors may be used to endorse or promote products
---      derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package SHP SturmHabichtPackage>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/sum.spad.pamphlet b/src/algebra/sum.spad.pamphlet
deleted file mode 100644
index e6b315b..0000000
--- a/src/algebra/sum.spad.pamphlet
+++ /dev/null
@@ -1,390 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/algebra sum.spad}
-\author{Stephen M. Watt, Manuel Bronstein}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package ISUMP InnerPolySum}
-<<package ISUMP InnerPolySum>>=
-)abbrev package ISUMP InnerPolySum
-++ Summation of polynomials
-++ Author: SMW
-++ Date Created: ???
-++ Date Last Updated: 19 April 1991
-++ Description: tools for the summation packages.
-InnerPolySum(E, V, R, P): Exports == Impl where
-    E: OrderedAbelianMonoidSup
-    V: OrderedSet
-    R: IntegralDomain
-    P: PolynomialCategory(R, E, V)
-
-    Z   ==> Integer
-    Q   ==> Fraction Z
-    SUP ==> SparseUnivariatePolynomial
-
-    Exports ==> with
-        sum: (P, V, Segment P) -> Record(num:P, den:Z)
-            ++ sum(p(n), n = a..b) returns \spad{p(a) + p(a+1) + ... + p(b)}.
-        sum: (P, V) -> Record(num:P, den: Z)
-            ++ sum(p(n), n) returns \spad{P(n)},
-            ++ the indefinite sum of \spad{p(n)} with respect to
-            ++ upward difference on n, i.e. \spad{P(n+1) - P(n) = a(n)};
-
-    Impl ==> add
-        import PolynomialNumberTheoryFunctions()
-        import UnivariatePolynomialCommonDenominator(Z, Q, SUP Q)
-
-        pmul: (P, SUP Q) -> Record(num:SUP P, den:Z)
-
-        pmul(c, p) ==
-            pn := (rec := splitDenominator p).num
-            [map(numer(#1) * c,
-                pn)$SparseUnivariatePolynomialFunctions2(Q, P), rec.den]
-
-        sum(p, v, s) ==
-          indef := sum(p, v)
-          [eval(indef.num, v, 1 + hi s) - eval(indef.num, v, lo s),
-           indef.den]
-
-        sum(p, v) ==
-            up := univariate(p, v)
-            lp := nil()$List(SUP P)
-            ld := nil()$List(Z)
-            while up ^= 0 repeat
-                ud  := degree up; uc := leadingCoefficient up
-                up  := reductum up
-                rec := pmul(uc, 1 / (ud+1) * bernoulli(ud+1))
-                lp  := concat(rec.num, lp)
-                ld  := concat(rec.den, ld)
-            d := lcm ld
-            vp := +/[(d exquo di)::Z * pi for di in ld for pi in lp]
-            [multivariate(vp, v), d]
-
-@
-\section{package GOSPER GosperSummationMethod}
-<<package GOSPER GosperSummationMethod>>=
-)abbrev package GOSPER GosperSummationMethod
-++ Gosper's summation algorithm
-++ Author: SMW
-++ Date Created: ???
-++ Date Last Updated: 19 August 1991
-++ Description: Gosper's summation algorithm.
-GosperSummationMethod(E, V, R, P, Q): Exports == Impl where
-    E: OrderedAbelianMonoidSup
-    V: OrderedSet
-    R: IntegralDomain
-    P: PolynomialCategory(R, E, V)
-    Q: Join(RetractableTo Fraction Integer, Field with
-              (coerce: P -> %; numer : % -> P; denom : % -> P))
-
-    I   ==> Integer
-    RN  ==> Fraction I
-    PQ  ==> SparseMultivariatePolynomial(RN, V)
-    RQ  ==> Fraction PQ
-
-    Exports ==> with
-        GospersMethod: (Q, V, () -> V) -> Union(Q, "failed")
-            ++ GospersMethod(b, n, new) returns a rational function
-            ++ \spad{rf(n)} such that \spad{a(n) * rf(n)} is the indefinite
-            ++ sum of \spad{a(n)}
-            ++ with respect to upward difference on \spad{n}, i.e.
-            ++ \spad{a(n+1) * rf(n+1) - a(n) * rf(n) = a(n)},
-            ++ where \spad{b(n) = a(n)/a(n-1)} is a rational function.
-            ++ Returns "failed" if no such rational function \spad{rf(n)}
-            ++ exists.
-            ++ Note: \spad{new} is a nullary function returning a new
-            ++ V every time.
-            ++ The condition on \spad{a(n)} is that \spad{a(n)/a(n-1)}
-            ++ is a rational function of \spad{n}.
-            --++  \spad{sum(a(n), n) = rf(n) * a(n)}.
-
-    Impl ==> add
-      import PolynomialCategoryQuotientFunctions(E, V, R, P, Q)
-      import LinearSystemMatrixPackage(RQ,Vector RQ,Vector RQ,Matrix RQ)
-
-      InnerGospersMethod: (RQ, V, () -> V) -> Union(RQ, "failed")
-      GosperPQR:   (PQ, PQ, V, () -> V)       -> List PQ
-      GosperDegBd: (PQ, PQ, PQ, V, () -> V)    -> I
-      GosperF:     (I, PQ, PQ, PQ, V, () -> V) -> Union(RQ, "failed")
-      linearAndNNIntRoot: (PQ, V) -> Union(I, "failed")
-      deg0:    (PQ, V) -> I       -- degree with deg 0 = -1.
-      pCoef:   (PQ, PQ) -> PQ  -- pCoef(p, a*b**2)
-      RF2QIfCan: Q -> Union(RQ, "failed")
-      UP2QIfCan: P -> Union(PQ,"failed")
-      RFQ2R    : RQ -> Q
-      PQ2R     : PQ -> Q
-      rat?     : R  -> Boolean
-
-      deg0(p, v) == (zero? p => -1; degree(p, v))
-      rat? x     == retractIfCan(x::P::Q)@Union(RN, "failed") case RN
-      RFQ2R f    == PQ2R(numer f) / PQ2R(denom f)
-
-      PQ2R p ==
-        map(#1::P::Q, #1::Q, p)$PolynomialCategoryLifting(
-                                       IndexedExponents V, V, RN, PQ, Q)
-
-      GospersMethod(aquo, n, newV) ==
-        ((q := RF2QIfCan aquo) case "failed") or
-          ((u := InnerGospersMethod(q::RQ, n, newV)) case "failed") =>
-             "failed"
-        RFQ2R(u::RQ)
-
-      RF2QIfCan f ==
-        (n := UP2QIfCan numer f) case "failed" => "failed"
-        (d := UP2QIfCan denom f) case "failed" => "failed"
-        n::PQ / d::PQ
-
-      UP2QIfCan p ==
-        every?(rat?, coefficients p) =>
-          map(#1::PQ, (retractIfCan(#1::P::Q)@Union(RN, "failed"))::RN::PQ,
-              p)$PolynomialCategoryLifting(E, V, R, P, PQ)
-        "failed"
-
-      InnerGospersMethod(aquo, n, newV) ==
-            -- 1. Define coprime polys an,anm1 such that
-            --      an/anm1=a(n)/a(n-1)
-            an   := numer aquo
-            anm1 := denom aquo
-
-            -- 2. Define p,q,r such that
-            --      a(n)/a(n-1) = (p(n)/p(n-1)) * (q(n)/r(n))
-            --    and
-            --      gcd(q(n), r(n+j)) = 1, for all j: NNI.
-            pqr:= GosperPQR(an, anm1, n, newV)
-            pn := first pqr; qn := second pqr; rn := third pqr
-
-            -- 3. If the sum is a rational fn, there is a poly f with
-            --      sum(a(n), n) = q(n+1)/p(n) * a(n) * f(n).
-
-            -- 4. Bound the degree of f(n).
-            (k := GosperDegBd(pn, qn, rn, n, newV)) < 0 => "failed"
-
-            -- 5. Find a polynomial f of degree at most k, satisfying
-            --      p(n) = q(n+1)*f(n) - r(n)*f(n-1)
-            (ufn := GosperF(k, pn, qn, rn, n, newV)) case "failed" =>
-              "failed"
-            fn  := ufn::RQ
-
-            -- 6. The sum is q(n-1)/p(n)*f(n) * a(n). We leave out a(n).
-            --qnm1 := eval(qn,n,n::PQ - 1)
-            --qnm1/pn * fn
-            qn1 := eval(qn,n,n::PQ + 1)
-            qn1/pn * fn
-
-      GosperF(k, pn, qn, rn, n, newV) ==
-            mv := newV(); mp := mv::PQ; np := n::PQ
-            fn:       PQ := +/[mp**(i+1) * np**i for i in 0..k]
-            fnminus1: PQ := eval(fn, n, np-1)
-            qnplus1        := eval(qn, n, np+1)
-            zro  := qnplus1 * fn - rn * fnminus1 - pn
-            zron := univariate(zro, n)
-            dz  := degree zron
-            mat: Matrix RQ := zero(dz+1, (k+1)::NonNegativeInteger)
-            vec: Vector RQ := new(dz+1, 0)
-            while zron ^= 0 repeat
-                cz := leadingCoefficient zron
-                dz := degree zron
-                zron := reductum zron
-                mz := univariate(cz, mv)
-                while mz ^= 0 repeat
-                    cmz := leadingCoefficient(mz)::RQ
-                    dmz := degree mz
-                    mz := reductum mz
-                    dmz = 0 => vec(dz + minIndex vec) := -cmz
-                    qsetelt_!(mat, dz + minRowIndex mat,
-                                 dmz + minColIndex(mat) - 1, cmz)
-            (soln := particularSolution(mat, vec)) case "failed" => "failed"
-            vec := soln::Vector RQ
-            (+/[np**i * vec(i + minIndex vec) for i in 0..k])@RQ
-
-      GosperPQR(an, anm1, n, newV) ==
-            np := n::PQ   -- polynomial version of n
-            -- Initial guess.
-            pn: PQ := 1
-            qn: PQ := an
-            rn: PQ := anm1
-            -- Find all j: NNI giving common factors to q(n) and r(n+j).
-            j     := newV()
-            rnj   := eval(rn, n, np + j::PQ)
-            res   := resultant(qn, rnj, n)
-            fres  := factor(res)$MRationalFactorize(IndexedExponents V,
-                                                    V, I, PQ)
-            js    := [rt::I for fe in factors fres
-                       | (rt := linearAndNNIntRoot(fe.factor,j)) case I]
-            -- For each such j, change variables to remove the gcd.
-            for rt in js repeat
-                rtp:= rt::PQ  -- polynomial version of rt
-                gn := gcd(qn, eval(rn,n,np+rtp))
-                qn := (qn exquo gn)::PQ
-                rn := (rn exquo eval(gn, n, np-rtp))::PQ
-                pn := pn * */[eval(gn, n, np-i::PQ) for i in 0..rt-1]
-            [pn, qn, rn]
-
-        -- Find a degree bound for the polynomial f(n) which satisfies
-        --   p(n) = q(n+1)*f(n) - r(n)*f(n-1).
-      GosperDegBd(pn, qn, rn, n, newV) ==
-            np := n::PQ
-            qnplus1  := eval(qn, n, np+1)
-            lplus  := deg0(qnplus1 + rn,  n)
-            lminus := deg0(qnplus1 - rn, n)
-            degp   := deg0(pn, n)
-            k := degp - max(lplus-1, lminus)
-            lplus <= lminus => k
-            -- Find L(k), such that
-            --   p(n) = L(k)*c[k]*n**(k + lplus - 1) + ...
-            -- To do this, write f(n) and f(n-1) symbolically.
-            --   f(n)  = c[k]*n**k + c[k-1]*n**(k-1) +O(n**(k-2))
-            --   f(n-1)=c[k]*n**k + (c[k-1]-k*c[k])*n**(k-1)+O(n**(k-2))
-            kk := newV()::PQ
-            ck := newV()::PQ
-            ckm1 := newV()::PQ
-            nkm1:= newV()::PQ
-            nk := np*nkm1
-            headfn   := ck*nk +         ckm1*nkm1
-            headfnm1 := ck*nk + (ckm1-kk*ck)*nkm1
-            -- Then p(n) = q(n+1)*f(n) - r(n)*f(n-1) gives L(k).
-            pk   := qnplus1 * headfn - rn * headfnm1
-            lcpk := pCoef(pk, ck*np*nkm1)
-            -- The degree bd is now given by k, and the root of L.
-            k0 := linearAndNNIntRoot(lcpk, mainVariable(kk)::V)
-            k0 case "failed" => k
-            max(k0::I, k)
-
-      pCoef(p, nom) ==
-            not monomial? nom =>
-              error "pCoef requires a monomial 2nd arg"
-            vlist := variables nom
-            for v in vlist while p ^= 0 repeat
-                unom:= univariate(nom,v)
-                pow:=degree unom
-                nom:=leadingCoefficient unom
-                up  := univariate(p, v)
-                p   := coefficient(up, pow)
-            p
-
-      linearAndNNIntRoot(mp, v) ==
-            p := univariate(mp, v)
-            degree p ^= 1 => "failed"
-            (p1 := retractIfCan(coefficient(p, 1))@Union(RN,"failed"))
-             case "failed" or
-              (p0 := retractIfCan(coefficient(p, 0))@Union(RN,"failed"))
-               case "failed" => "failed"
-            rt := -(p0::RN)/(p1::RN)
-            rt < 0 or denom rt ^= 1 => "failed"
-            numer rt
-
-@
-\section{package SUMRF RationalFunctionSum}
-<<package SUMRF RationalFunctionSum>>=
-)abbrev package SUMRF RationalFunctionSum
-++ Summation of rational functions
-++ Author: Manuel Bronstein
-++ Date Created: ???
-++ Date Last Updated: 19 April 1991
-++ Description: Computes sums of rational functions;
-RationalFunctionSum(R): Exports == Impl where
-    R: Join(IntegralDomain, OrderedSet, RetractableTo Integer)
-
-    P   ==> Polynomial R
-    RF  ==> Fraction P
-    FE  ==> Expression R
-    SE  ==> Symbol
-
-    Exports ==> with
-        sum: (P, SE) -> RF
-            ++ sum(a(n), n) returns \spad{A} which
-            ++ is the indefinite sum of \spad{a} with respect to
-            ++ upward difference on \spad{n}, i.e. \spad{A(n+1) - A(n) = a(n)}.
-        sum: (RF, SE) -> Union(RF, FE)
-            ++ sum(a(n), n) returns \spad{A} which
-            ++ is the indefinite sum of \spad{a} with respect to
-            ++ upward difference on \spad{n}, i.e. \spad{A(n+1) - A(n) = a(n)}.
-        sum: (P, SegmentBinding P) -> RF
-            ++ sum(f(n), n = a..b) returns \spad{f(a) + f(a+1) + ... f(b)}.
-        sum: (RF, SegmentBinding RF) -> Union(RF, FE)
-            ++ sum(f(n), n = a..b) returns \spad{f(a) + f(a+1) + ... f(b)}.
-
-    Impl ==> add
-      import RationalFunction R
-      import GosperSummationMethod(IndexedExponents SE, SE, R, P, RF)
-
-      innersum    : (RF, SE) -> Union(RF, "failed")
-      innerpolysum: (P, SE) -> RF
-
-      sum(f:RF, s:SegmentBinding RF) ==
-        (indef := innersum(f, v := variable s)) case "failed" =>
-          summation(f::FE,map(#1::FE,s)$SegmentBindingFunctions2(RF,FE))
-        eval(indef::RF, v, 1 + hi segment s)
-          - eval(indef::RF, v,lo segment s)
-
-      sum(an:RF, n:SE) ==
-        (u := innersum(an, n)) case "failed" => summation(an::FE, n)
-        u::RF
-
-      sum(p:P, s:SegmentBinding P) ==
-        f := sum(p, v := variable s)
-        eval(f, v, (1 + hi segment s)::RF) - eval(f,v,lo(segment s)::RF)
-
-      innersum(an, n) ==
-        (r := retractIfCan(an)@Union(P, "failed")) case "failed" =>
-           an1 := eval(an, n, -1 + n::RF)
-           (u := GospersMethod(an/an1, n, new$SE)) case "failed" =>
-             "failed"
-           an1 * eval(u::RF, n, -1 + n::RF)
-        sum(r::P, n)
-
-      sum(p:P, n:SE) ==
-        rec := sum(p, n)$InnerPolySum(IndexedExponents SE, SE, R, P)
-        rec.num / (rec.den :: P)
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
---    - Redistributions of source code must retain the above copyright
---      notice, this list of conditions and the following disclaimer.
---
---    - Redistributions in binary form must reproduce the above copyright
---      notice, this list of conditions and the following disclaimer in
---      the documentation and/or other materials provided with the
---      distribution.
---
---    - Neither the name of The Numerical ALgorithms Group Ltd. nor the
---      names of its contributors may be used to endorse or promote products
---      derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package ISUMP InnerPolySum>>
-<<package GOSPER GosperSummationMethod>>
-<<package SUMRF RationalFunctionSum>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/syssolp.spad.pamphlet b/src/algebra/syssolp.spad.pamphlet
deleted file mode 100644
index 2a7f125..0000000
--- a/src/algebra/syssolp.spad.pamphlet
+++ /dev/null
@@ -1,297 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/algebra syssolp.spad}
-\author{Patrizia Gianni}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package SYSSOLP SystemSolvePackage}
-<<package SYSSOLP SystemSolvePackage>>=
-)abbrev package SYSSOLP SystemSolvePackage
-++ Author: P. Gianni
-++ Date Created: summer 1988
-++ Date Last Updated: summer 1990
-++ Basic Functions:
-++ Related Constructors: Fraction, Polynomial, FloatingRealPackage,
-++ FloatingComplexPackage, RadicalSolvePackage
-++ Also See: LinearSystemMatrixPackage, GroebnerSolve
-++ AMS Classifications:
-++ Keywords:
-++ References:
-++ Description:
-++ Symbolic solver for systems of rational functions with coefficients
-++ in an integral domain R.
-++ The systems are solved in the field of rational functions over R.
-++ Solutions are exact of the form variable = value when the value is
-++ a member of the coefficient domain R. Otherwise the solutions
-++ are implicitly expressed as roots of univariate polynomial equations over R.
-++ Care is taken to guarantee that the denominators of the input
-++ equations do not vanish on the solution sets.
-++ The arguments to solve can either be given as equations or
-++ as rational functions interpreted as equal
-++ to zero. The user can specify an explicit list of symbols to
-++ be solved for, treating all other symbols appearing as parameters
-++ or omit the list of symbols in which case the system tries to
-++ solve with respect to all symbols appearing in the input.
-
-NNI      ==> NonNegativeInteger
-P        ==> Polynomial
-EQ       ==> Equation
-L        ==> List
-V        ==> Vector
-M        ==> Matrix
-UP       ==> SparseUnivariatePolynomial
-SE       ==> Symbol
-IE       ==> IndexedExponents Symbol
-SUP      ==> SparseUnivariatePolynomial
-
-SystemSolvePackage(R): Cat == Cap where
-    R : IntegralDomain
-    F   ==> Fraction Polynomial R
-    PP2 ==> PolynomialFunctions2(R,F)
-    PPR ==> Polynomial Polynomial R
-
-    Cat == with
-       solve:    (L F,    L SE) -> L L EQ F
-         ++ solve(lp,lv) finds the solutions of the list lp of
-         ++ rational functions with respect to the list of symbols lv.
-
-       solve:    (L EQ F, L SE) -> L L EQ F
-         ++ solve(le,lv) finds the solutions of the
-         ++ list le of equations of rational functions
-         ++ with respect to the list of symbols lv.
-
-       solve:         L F       -> L L EQ F
-         ++ solve(lp) finds the solutions of the list lp of rational
-         ++ functions with respect to all symbols appearing in lp.
-
-       solve:        L EQ F     -> L L EQ F
-         ++ solve(le) finds the solutions of the list le of equations of
-         ++ rational functions with respect to all symbols appearing in le.
-
-       solve:    (F, SE) ->  L EQ F
-         ++ solve(p,v) solves the equation p=0, where p is a rational function
-         ++ with respect to the variable v.
-
-       solve:    (EQ F,SE) -> L EQ F
-         ++ solve(eq,v) finds the solutions of the equation
-         ++ eq with respect to the variable v.
-
-       solve:         F      -> L EQ F
-         ++ solve(p) finds the solution of a rational function p = 0
-         ++ with respect to the unique variable appearing in p.
-
-       solve:         EQ F     -> L EQ F
-         ++ solve(eq) finds the solutions of the equation eq
-         ++ with respect to the unique variable appearing in eq.
-
-       triangularSystems: (L F,    L SE) -> L L P R
-         ++ triangularSystems(lf,lv) solves the system of equations
-         ++ defined by lf with respect to the list of symbols lv;
-         ++ the system of equations is obtaining
-         ++ by equating to zero the list of rational functions lf.
-         ++ The output is a list of solutions where
-         ++ each solution is expressed as a "reduced" triangular system of
-         ++ polynomials.
-
-    Cap == add
-
-       import MPolyCatRationalFunctionFactorizer(IE,SE,R,P F)
-
-                     ---- Local Functions ----
-       linSolve: (L F,    L SE) -> Union(L EQ F, "failed")
-       makePolys :   L EQ F     ->  L F
-
-       makeR2F(r : R) : F == r :: (P R) :: F
-
-       makeP2F(p:P F):F ==
-         lv:=variables p
-         lv = [] => retract p
-         for v in lv repeat p:=pushdown(p,v)
-         retract p
-                     ---- Local Functions ----
-       makeEq(p:P F,lv:L SE): EQ F ==
-         z:=last lv
-         np:=numer makeP2F p
-         lx:=variables np
-         for x in lv repeat if member?(x,lx) then leave x
-         up:=univariate(np,x)
-         (degree up)=1 =>
-           equation(x::P(R)::F,-coefficient(up,0)/leadingCoefficient up)
-         equation(np::F,0$F)
-
-       varInF(v: SE): F == v::P(R) :: F
-
-       newInF(n: Integer):F==varInF new()$SE
-
-       testDegree(f :P R , lv :L SE) : Boolean ==
-         "or"/[degree(f,vv)>0 for vv in lv]
-                    ---- Exported Functions ----
-
-       -- solve a system of rational functions
-       triangularSystems(lf: L F,lv:L SE) : L L P R ==
-           empty? lv => empty()
-           empty? lf => empty()
-           #lf = 1 =>
-              p:= numer(first lf)
-              fp:=(factor p)$GeneralizedMultivariateFactorize(SE,IE,R,R,P R)
-              [[ff.factor] for ff in factors fp | testDegree(ff.factor,lv)]
-           dmp:=DistributedMultivariatePolynomial(lv,P R)
-           OV:=OrderedVariableList(lv)
-           DP:=DirectProduct(#lv, NonNegativeInteger)
-           push:=PushVariables(R,DP,OV,dmp)
-           lq : L dmp
-           lvv:L OV:=[variable(vv)::OV for vv in lv]
-           lq:=[pushup(df::dmp,lvv)$push for f in lf|(df:=denom f)^=1]
-           lp:=[pushup(numer(f)::dmp,lvv)$push for f in lf]
-           parRes:=groebSolve(lp,lvv)$GroebnerSolve(lv,P R,R)
-           if lq^=[] then
-             gb:=GroebnerInternalPackage(P R,DirectProduct(#lv,NNI),OV,dmp)
-             parRes:=[pr for pr in parRes|
-                       and/[(redPol(fq,pr pretend List(dmp))$gb) ^=0
-                         for fq in lq]]
-           [[retract pushdown(pf,lvv)$push for pf in pr] for pr in parRes]
-
-      -- One polynomial. Implicit variable --
-       solve(pol : F) ==
-         zero? pol =>
-            error "equation is always satisfied"
-         lv:=removeDuplicates
-             concat(variables numer pol, variables denom pol)
-         empty? lv => error "inconsistent equation"
-         #lv>1 => error "too many variables"
-         solve(pol,first lv)
-
-       -- general solver. Input in equation style. Implicit variables --
-       solve(eq : EQ F) ==
-         pol:= lhs eq - rhs eq
-         zero? pol =>
-            error "equation is always satisfied"
-         lv:=removeDuplicates
-             concat(variables numer pol, variables denom pol)
-         empty? lv => error "inconsistent equation"
-         #lv>1 => error "too many variables"
-         solve(pol,first lv)
-
-       -- general solver. Input in equation style  --
-       solve(eq:EQ F,var:SE)  == solve(lhs eq - rhs eq,var)
-
-       -- general solver. Input in polynomial style  --
-       solve(pol:F,var:SE) ==
-         if R has GcdDomain then
-           p:=primitivePart(numer pol,var)
-           fp:=(factor p)$GeneralizedMultivariateFactorize(SE,IE,R,R,P R)
-           [makeEq(map(makeR2F,ff.factor)$PP2,[var]) for ff in factors fp]
-         else empty()
-
-       -- Convert a list of Equations in a list of Polynomials
-       makePolys(l: L EQ F):L F == [lhs e - rhs e for e in l]
-
-       -- linear systems solver. Input as list of polynomials  --
-       linSolve(lp:L F,lv:L SE) ==
-           rec:Record(particular:Union(V F,"failed"),basis:L V F)
-           lr : L P R:=[numer f for f in lp]
-           rec:=linSolve(lr,lv)$LinearSystemPolynomialPackage(R,IE,SE,P R)
-           rec.particular case "failed" => "failed"
-           rhs := rec.particular :: V F
-           zeron:V F:=zero(#lv)
-           for p in rec.basis | p ^= zeron repeat
-               sym := newInF(1)
-               for i in 1..#lv repeat
-                   rhs.i := rhs.i + sym*p.i
-           eqs: L EQ F := []
-           for i in 1..#lv repeat
-             eqs := append(eqs,[(lv.i)::(P R)::F = rhs.i])
-           eqs
-
-      -- general solver. Input in polynomial style. Implicit variables --
-       solve(lr : L F) ==
-         lv :="setUnion"/[setUnion(variables numer p, variables denom p)
-               for p in lr]
-         solve(lr,lv)
-
-       -- general solver. Input in equation style. Implicit variables --
-       solve(le : L EQ F) ==
-         lr:=makePolys le
-         lv :="setUnion"/[setUnion(variables numer p, variables denom p)
-               for p in lr]
-         solve(lr,lv)
-
-       -- general solver. Input in equation style  --
-       solve(le:L EQ F,lv:L SE)  == solve(makePolys le, lv)
-
-       checkLinear(lr:L F,vl:L SE):Boolean ==
-         ld:=[denom pol for pol in lr]
-         for f in ld repeat
-           if (or/[member?(x,vl) for x in variables f]) then return false
-         and/[totalDegree(numer pol,vl) < 2 for pol in lr]
-
-       -- general solver. Input in polynomial style  --
-       solve(lr:L F,vl:L SE) ==
-           empty? vl => empty()
-           checkLinear(lr,vl) =>
-                            -- linear system --
-               soln := linSolve(lr, vl)
-               soln case "failed" => []
-               eqns: L EQ F := []
-               for i in 1..#vl repeat
-                   lhs := (vl.i::(P R))::F
-                   rhs :=  rhs soln.i
-                   eqns := append(eqns, [lhs = rhs])
-               [eqns]
-
-                         -- polynomial system --
-           if R has GcdDomain then
-             parRes:=triangularSystems(lr,vl)
-             [[makeEq(map(makeR2F,f)$PP2,vl) for f in pr]
-                                                        for pr in parRes]
-           else [[]]
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
---    - Redistributions of source code must retain the above copyright
---      notice, this list of conditions and the following disclaimer.
---
---    - Redistributions in binary form must reproduce the above copyright
---      notice, this list of conditions and the following disclaimer in
---      the documentation and/or other materials provided with the
---      distribution.
---
---    - Neither the name of The Numerical ALgorithms Group Ltd. nor the
---      names of its contributors may be used to endorse or promote products
---      derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
-
-<<package SYSSOLP SystemSolvePackage>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/algebra/system.spad.pamphlet b/src/algebra/system.spad.pamphlet
deleted file mode 100644
index 56050d6..0000000
--- a/src/algebra/system.spad.pamphlet
+++ /dev/null
@@ -1,86 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/algebra system.spad}
-\author{Timothy Daly}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{package MSYSCMD MoreSystemCommands}
-<<package MSYSCMD MoreSystemCommands>>=
-)abbrev package MSYSCMD MoreSystemCommands
-++ Author:
-++ Date Created:
-++ Change History:
-++ Basic Operations: systemCommand
-++ Related Constructors:
-++ Also See:
-++ AMS Classification:
-++ Keywords: command
-++ Description:
-++   \spadtype{MoreSystemCommands} implements an interface with the
-++   system command facility. These are the commands that are issued
-++   from source files or the system interpreter and they start with
-++   a close parenthesis, e.g., \spadsyscom{what} commands.
- 
-MoreSystemCommands: public == private where
- 
-  public == with
- 
-    systemCommand: String -> Void
-      ++ systemCommand(cmd) takes the string \spadvar{cmd} and passes
-      ++ it to the runtime environment for execution as a system
-      ++ command. Although various things may be printed, no usable
-      ++ value is returned.
- 
-  private == add
- 
-    systemCommand cmd == doSystemCommand(cmd)$Lisp
-
-@
-\section{License}
-<<license>>=
---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
---All rights reserved.
---
---Redistribution and use in source and binary forms, with or without
---modification, are permitted provided that the following conditions are
---met:
---
---    - Redistributions of source code must retain the above copyright
---      notice, this list of conditions and the following disclaimer.
---
---    - Redistributions in binary form must reproduce the above copyright
---      notice, this list of conditions and the following disclaimer in
---      the documentation and/or other materials provided with the
---      distribution.
---
---    - Neither the name of The Numerical ALgorithms Group Ltd. nor the
---      names of its contributors may be used to endorse or promote products
---      derived from this software without specific prior written permission.
---
---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-@
-<<*>>=
-<<license>>
- 
-<<package MSYSCMD MoreSystemCommands>>
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html
index 5f4f1d3..5d65de8 100644
--- a/src/axiom-website/patches.html
+++ b/src/axiom-website/patches.html
@@ -933,5 +933,7 @@ bookvol10.4 add packages<br/>
 bookvol10.4 add packages<br/>
 <a href="patches/20090208.02.tpd.patch">20090208.02.tpd.patch</a>
 bookvol10.4 add packages<br/>
+<a href="patches/20090209.01.tpd.patch">20090209.01.tpd.patch</a>
+bookvol10.4 add packages<br/>
  </body>
 </html>
