diff --git a/books/bookvol10.3.pamphlet b/books/bookvol10.3.pamphlet
index 2299641..4c6f3bf 100644
--- a/books/bookvol10.3.pamphlet
+++ b/books/bookvol10.3.pamphlet
@@ -8217,33 +8217,33 @@ Automorphism(R:Ring): Join(Group, Eltable(R, R)) with
 )set message test on
 )set message auto off
 )clear all
---S 1
+--S 1 of 7
 lm := [3,5,7,11]
 --E 1
 
---S 3
+--S 2 of 7
 t := balancedBinaryTree(#lm, 0)
---E 3
+--E 2
 
---S 4
+--S 3 of 7
 setleaves!(t,lm)
---E 4
+--E 3
 
---S 5
+--S 4 of 7
 mapUp!(t,_*)
---E 5
+--E 4
 
---S 6
+--S 5 of 7
 t
---E 6
+--E 5
 
---S 7
+--S 6 of 7
 mapDown!(t,12,_rem)
---E 7
+--E 6
 
---S 8
+--S 7 of 7
 leaves %
---E 8
+--E 7
 
 )spool
 )lisp (bye)
@@ -9409,7 +9409,7 @@ BasicOperator(): Exports == Implementation where
 )set message test on
 )set message auto off
 )clear all
---S 1
+--S 1 of 7
 r := binary(22/7)
 --R 
 --R
@@ -9418,7 +9418,7 @@ r := binary(22/7)
 --R                                                        Type: BinaryExpansion
 --E 1
 
---S 2
+--S 2 of 7
 r + binary(6/7)
 --R 
 --R
@@ -9426,7 +9426,7 @@ r + binary(6/7)
 --R                                                        Type: BinaryExpansion
 --E 2
 
---S 3
+--S 3 of 7
 [binary(1/i) for i in 102..106]
 --R 
 --R
@@ -9440,7 +9440,7 @@ r + binary(6/7)
 --R                                                   Type: List BinaryExpansion
 --E 3
 
---S 4
+--S 4 of 7
 binary(1/1007)
 --R 
 --R
@@ -9457,7 +9457,7 @@ binary(1/1007)
 --R                                                        Type: BinaryExpansion
 --E 4
 
---S 5
+--S 5 of 7
 p := binary(1/4)*x**2 + binary(2/3)*x + binary(4/9)
 --R 
 --R
@@ -9466,7 +9466,7 @@ p := binary(1/4)*x**2 + binary(2/3)*x + binary(4/9)
 --R                                             Type: Polynomial BinaryExpansion
 --E 5
 
---S 6
+--S 6 of 7
 q := D(p, x)
 --R 
 --R
@@ -9475,7 +9475,7 @@ q := D(p, x)
 --R                                             Type: Polynomial BinaryExpansion
 --E 6
 
---S 7
+--S 7 of 7
 g := gcd(p, q)
 --R 
 --R
@@ -12793,7 +12793,7 @@ CartesianTensor(minix, dim, R): Exports == Implementation where
 )set message test on
 )set message auto off
 )clear all
---S 1
+--S 1 of 13
 chars := [char "a", char "A", char "X", char "8", char "+"]
 --R 
 --R
@@ -12801,7 +12801,7 @@ chars := [char "a", char "A", char "X", char "8", char "+"]
 --R                                                         Type: List Character
 --E 1
 
---S 2
+--S 2 of 13
 space()
 --R 
 --R
@@ -12809,7 +12809,7 @@ space()
 --R                                                              Type: Character
 --E 2
 
---S 3
+--S 3 of 13
 quote()
 --R 
 --R
@@ -12817,7 +12817,7 @@ quote()
 --R                                                              Type: Character
 --E 3
 
---S 4
+--S 4 of 13
 escape()
 --R 
 --R
@@ -12825,7 +12825,7 @@ escape()
 --R                                                              Type: Character
 --E 4
 
---S 5
+--S 5 of 13
 [ord c for c in chars]
 --R 
 --R
@@ -12833,7 +12833,7 @@ escape()
 --R                                                           Type: List Integer
 --E 5
 
---S 6
+--S 6 of 13
 [upperCase c for c in chars]
 --R 
 --R
@@ -12841,7 +12841,7 @@ escape()
 --R                                                         Type: List Character
 --E 6
 
---S 7
+--S 7 of 13
 [lowerCase c for c in chars]
 --R 
 --R
@@ -12849,7 +12849,7 @@ escape()
 --R                                                         Type: List Character
 --E 7
 
---S 8
+--S 8 of 13
 [alphabetic? c for c in chars]
 --R 
 --R
@@ -12857,7 +12857,7 @@ escape()
 --R                                                           Type: List Boolean
 --E 8
 
---S 9
+--S 9 of 13
 [upperCase? c for c in chars]
 --R 
 --R
@@ -12865,7 +12865,7 @@ escape()
 --R                                                           Type: List Boolean
 --E 9
 
---S 10
+--S 10 of 13
 [lowerCase? c for c in chars]
 --R 
 --R
@@ -12873,7 +12873,7 @@ escape()
 --R                                                           Type: List Boolean
 --E 10
 
---S 11
+--S 11 of 13
 [digit? c for c in chars]
 --R 
 --R
@@ -12881,7 +12881,7 @@ escape()
 --R                                                           Type: List Boolean
 --E 11
 
---S 12
+--S 12 of 13
 [hexDigit? c for c in chars]
 --R 
 --R
@@ -12889,7 +12889,7 @@ escape()
 --R                                                           Type: List Boolean
 --E 12
 
---S 13
+--S 13 of 13
 [alphanumeric? c for c in chars]
 --R 
 --R
@@ -24234,7 +24234,7 @@ d03fafAnnaType():PartialDifferentialEquationsSolverCategory == Result add
 )set message test on
 )set message auto off
 )clear all
---S 1
+--S 1 of 12
 eq1 := 3*x + 4*y = 5 
 --R 
 --R
@@ -24242,7 +24242,7 @@ eq1 := 3*x + 4*y = 5
 --R                                            Type: Equation Polynomial Integer
 --E 1
 
---S 2
+--S 2 of 12
 eq2 := 2*x + 2*y = 3 
 --R 
 --R
@@ -24250,7 +24250,7 @@ eq2 := 2*x + 2*y = 3
 --R                                            Type: Equation Polynomial Integer
 --E 2
 
---S 3
+--S 3 of 12
 lhs eq1
 --R 
 --R
@@ -24258,7 +24258,7 @@ lhs eq1
 --R                                                     Type: Polynomial Integer
 --E 3
 
---S 4
+--S 4 of 12
 rhs eq1
 --R 
 --R
@@ -24266,7 +24266,7 @@ rhs eq1
 --R                                                     Type: Polynomial Integer
 --E 4
 
---S 5
+--S 5 of 12
 eq1 + eq2 
 --R 
 --R
@@ -24274,7 +24274,7 @@ eq1 + eq2
 --R                                            Type: Equation Polynomial Integer
 --E 5
 
---S 6
+--S 6 of 12
 eq1 * eq2 
 --R 
 --R
@@ -24283,7 +24283,7 @@ eq1 * eq2
 --R                                            Type: Equation Polynomial Integer
 --E 6
 
---S 7
+--S 7 of 12
 2*eq2 - eq1
 --R 
 --R
@@ -24291,7 +24291,7 @@ eq1 * eq2
 --R                                            Type: Equation Polynomial Integer
 --E 7
 
---S 8
+--S 8 of 12
 eq1**2
 --R 
 --R
@@ -24300,7 +24300,7 @@ eq1**2
 --R                                            Type: Equation Polynomial Integer
 --E 8
 
---S 9
+--S 9 of 12
 if x+1 = y then "equal" else "unequal"
 --R 
 --R
@@ -24308,7 +24308,7 @@ if x+1 = y then "equal" else "unequal"
 --R                                                                 Type: String
 --E 9
 
---S 10
+--S 10 of 12
 eqpol := x+1 = y 
 --R 
 --R
@@ -24316,7 +24316,7 @@ eqpol := x+1 = y
 --R                                            Type: Equation Polynomial Integer
 --E 10
 
---S 11
+--S 11 of 12
 if eqpol then "equal" else "unequal"
 --R 
 --R
@@ -24324,7 +24324,7 @@ if eqpol then "equal" else "unequal"
 --R                                                                 Type: String
 --E 11
 
---S 12
+--S 12 of 12
 eqpol::Boolean
 --R 
 --R
@@ -25448,7 +25448,7 @@ ExponentialExpansion(R,FE,var,cen): Exports == Implementation where
 )set message test on
 )set message auto off
 )clear all
---S 1
+--S 1 of 23
 sin(x) + 3*cos(x)**2
 --R 
 --R
@@ -25457,7 +25457,7 @@ sin(x) + 3*cos(x)**2
 --R                                                     Type: Expression Integer
 --E 1
 
---S 2
+--S 2 of 23
 tan(x) - 3.45*x
 --R 
 --R
@@ -25465,7 +25465,7 @@ tan(x) - 3.45*x
 --R                                                       Type: Expression Float
 --E 2
 
---S 3
+--S 3 of 23
 (tan sqrt 7 - sin sqrt 11)**2 / (4 - cos(x - y))
 --R 
 --R
@@ -25476,7 +25476,7 @@ tan(x) - 3.45*x
 --R                                                     Type: Expression Integer
 --E 3
 
---S 4
+--S 4 of 23
 log(exp  x)@Expression(Integer)
 --R 
 --R
@@ -25484,7 +25484,7 @@ log(exp  x)@Expression(Integer)
 --R                                                     Type: Expression Integer
 --E 4
 
---S 5
+--S 5 of 23
 log(exp  x)@Expression(Complex Integer)
 --R 
 --R
@@ -25493,7 +25493,7 @@ log(exp  x)@Expression(Complex Integer)
 --R                                             Type: Expression Complex Integer
 --E 5
 
---S 6
+--S 6 of 23
 sqrt 3 + sqrt(2 + sqrt(-5))
 --R 
 --R
@@ -25503,7 +25503,7 @@ sqrt 3 + sqrt(2 + sqrt(-5))
 --R                                                        Type: AlgebraicNumber
 --E 6
 
---S 7
+--S 7 of 23
 % :: Expression Integer
 --R 
 --R
@@ -25513,7 +25513,7 @@ sqrt 3 + sqrt(2 + sqrt(-5))
 --R                                                     Type: Expression Integer
 --E 7
 
---S 8
+--S 8 of 23
 height mainKernel sin(x + 4)
 --R 
 --R
@@ -25521,7 +25521,7 @@ height mainKernel sin(x + 4)
 --R                                                        Type: PositiveInteger
 --E 8
 
---S 9
+--S 9 of 23
 e := (sin(x) - 4)**2 / ( 1 - 2*y*sqrt(- y) ) 
 --R 
 --R
@@ -25533,7 +25533,7 @@ e := (sin(x) - 4)**2 / ( 1 - 2*y*sqrt(- y) )
 --R                                                     Type: Expression Integer
 --E 9
 
---S 10
+--S 10 of 23
 numer e 
 --R 
 --R
@@ -25542,7 +25542,7 @@ numer e
 --R        Type: SparseMultivariatePolynomial(Integer,Kernel Expression Integer)
 --E 10
 
---S 11
+--S 11 of 23
 denom e
 --R 
 --R
@@ -25551,7 +25551,7 @@ denom e
 --R        Type: SparseMultivariatePolynomial(Integer,Kernel Expression Integer)
 --E 11
 
---S 12
+--S 12 of 23
 D(e, x) 
 --R 
 --R
@@ -25563,7 +25563,7 @@ D(e, x)
 --R                                                     Type: Expression Integer
 --E 12
 
---S 13
+--S 13 of 23
 D(e, [x, y], [1, 2])
 --R 
 --R
@@ -25585,7 +25585,7 @@ D(e, [x, y], [1, 2])
 --R                                                     Type: Expression Integer
 --E 13
 
---S 14
+--S 14 of 23
 complexNumeric(cos(2 - 3*%i))
 --R 
 --R
@@ -25593,7 +25593,7 @@ complexNumeric(cos(2 - 3*%i))
 --R                                                          Type: Complex Float
 --E 14
 
---S 15
+--S 15 of 23
 numeric(tan 3.8)
 --R 
 --R
@@ -25601,7 +25601,7 @@ numeric(tan 3.8)
 --R                                                                  Type: Float
 --E 15
 
---S 16
+--S 16 of 23
 e2 := cos(x**2 - y + 3) 
 --R 
 --R
@@ -25610,7 +25610,7 @@ e2 := cos(x**2 - y + 3)
 --R                                                     Type: Expression Integer
 --E 16
 
---S 17
+--S 17 of 23
 e3 := asin(e2) - %pi/2
 --R 
 --R
@@ -25619,7 +25619,7 @@ e3 := asin(e2) - %pi/2
 --R                                                     Type: Expression Integer
 --E 17
 
---S 18
+--S 18 of 23
 e3 :: Polynomial Integer
 --R 
 --R
@@ -25628,7 +25628,7 @@ e3 :: Polynomial Integer
 --R                                                     Type: Polynomial Integer
 --E 18
 
---S 19
+--S 19 of 23
 e3 :: DMP([x, y], Integer) 
 --R 
 --R
@@ -25637,7 +25637,7 @@ e3 :: DMP([x, y], Integer)
 --R                       Type: DistributedMultivariatePolynomial([x,y],Integer)
 --E 19
 
---S 20
+--S 20 of 23
 sin %pi
 --R 
 --R
@@ -25645,7 +25645,7 @@ sin %pi
 --R                                                     Type: Expression Integer
 --E 20
 
---S 21
+--S 21 of 23
 cos(%pi / 4)
 --R 
 --R
@@ -25656,7 +25656,7 @@ cos(%pi / 4)
 --R                                                     Type: Expression Integer
 --E 21
 
---S 22
+--S 22 of 23
 tan(x)**6 + 3*tan(x)**4 + 3*tan(x)**2 + 1 
 --R 
 --R
@@ -25665,7 +25665,7 @@ tan(x)**6 + 3*tan(x)**4 + 3*tan(x)**2 + 1
 --R                                                     Type: Expression Integer
 --E 22
 
---S 23
+--S 23 of 23
 simplify % 
 --R 
 --R
@@ -51583,13 +51583,105 @@ LaurentPolynomial(R, UP): Exports == Implementation where
 )set message test on
 )set message auto off
 )clear all
+ 
+--S 1 of 7
 stuff := library "Neat.stuff"
+--R 
+--R 
+--RDaly Bug
+--R   >> Error detected within library code:
+--R   File is not readable
+--R   "Neat.stuff"
+--R
+--R   Continuing to read the file...
+--R
+--E 1
+
+--S 2 of 7
 stuff.int := 32**2
+--R 
+--R 
+--RDaly Bug
+--R   The form on the left hand side of an assignment must be a single 
+--R      variable, a Tuple of variables or a reference to an entry in an 
+--R      object supporting the setelt operation.
+--E 2
+
+--S 3 of 7
 stuff."poly" := x**2 + 1
+--R 
+--R 
+--RDaly Bug
+--R   The form on the left hand side of an assignment must be a single 
+--R      variable, a Tuple of variables or a reference to an entry in an 
+--R      object supporting the setelt operation.
+--E 3
+
+--S 4 of 7
 stuff.str := "Hello"
+--R 
+--R 
+--RDaly Bug
+--R   The form on the left hand side of an assignment must be a single 
+--R      variable, a Tuple of variables or a reference to an entry in an 
+--R      object supporting the setelt operation.
+--E 4
+
+--S 5 of 7
 keys stuff
+--R 
+--R   There are 3 exposed and 0 unexposed library operations named keys 
+--R      having 1 argument(s) but none was determined to be applicable. 
+--R      Use HyperDoc Browse, or issue
+--R                              )display op keys
+--R      to learn more about the available operations. Perhaps 
+--R      package-calling the operation or using coercions on the arguments
+--R      will allow you to apply the operation.
+--R 
+--RDaly Bug
+--R   Cannot find a definition or applicable library operation named keys 
+--R      with argument type(s) 
+--R                               Variable stuff
+--R      
+--R      Perhaps you should use "@" to indicate the required return type, 
+--R      or "$" to specify which version of the function you need.
+--E 5
+
+--S 6 of 7
 stuff.poly
+--R 
+--R   There are no library operations named stuff 
+--R      Use HyperDoc Browse or issue
+--R                               )what op stuff
+--R      to learn if there is any operation containing " stuff " in its 
+--R      name.
+--R 
+--RDaly Bug
+--R   Cannot find a definition or applicable library operation named stuff
+--R      with argument type(s) 
+--R                                Variable poly
+--R      
+--R      Perhaps you should use "@" to indicate the required return type, 
+--R      or "$" to specify which version of the function you need.
+--E 6
+
+--S 7 of 7
 stuff("poly")
+--R 
+--R   There are no library operations named stuff 
+--R      Use HyperDoc Browse or issue
+--R                               )what op stuff
+--R      to learn if there is any operation containing " stuff " in its 
+--R      name.
+--R 
+--RDaly Bug
+--R   Cannot find a definition or applicable library operation named stuff
+--R      with argument type(s) 
+--R                                   String
+--R      
+--R      Perhaps you should use "@" to indicate the required return type, 
+--R      or "$" to specify which version of the function you need.
+--E 7
 )system rm -rf Neat.stuff
 )spool
 )lisp (bye)
@@ -57438,7 +57530,7 @@ MachineInteger(): Exports == Implementation where
 )set message test on
 )set message auto off
 )clear all
---S 1
+--S 1 of 22
 x:Symbol :='x
 --R 
 --R
@@ -57446,7 +57538,7 @@ x:Symbol :='x
 --R                                                                 Type: Symbol
 --E 1
 
---S 2
+--S 2 of 22
 y:Symbol :='y
 --R 
 --R
@@ -57454,7 +57546,7 @@ y:Symbol :='y
 --R                                                                 Type: Symbol
 --E 2
 
---S 3
+--S 3 of 22
 z:Symbol :='z
 --R 
 --R
@@ -57462,7 +57554,7 @@ z:Symbol :='z
 --R                                                                 Type: Symbol
 --E 3
 
---S 4
+--S 4 of 22
 word := OrderedFreeMonoid(Symbol)
 --R 
 --R
@@ -57470,7 +57562,7 @@ word := OrderedFreeMonoid(Symbol)
 --R                                                                 Type: Domain
 --E 4
 
---S 5
+--S 5 of 22
 tree := Magma(Symbol)
 --R 
 --R
@@ -57478,7 +57570,7 @@ tree := Magma(Symbol)
 --R                                                                 Type: Domain
 --E 5
 
---S 6
+--S 6 of 22
 a:tree := x*x 
 --R 
 --R
@@ -57486,7 +57578,7 @@ a:tree := x*x
 --R                                                           Type: Magma Symbol
 --E 6
 
---S 7
+--S 7 of 22
 b:tree := y*y
 --R 
 --R
@@ -57494,7 +57586,7 @@ b:tree := y*y
 --R                                                           Type: Magma Symbol
 --E 7
 
---S 8
+--S 8 of 22
 c:tree := a*b
 --R 
 --R
@@ -57502,7 +57594,7 @@ c:tree := a*b
 --R                                                           Type: Magma Symbol
 --E 8
 
---S 9
+--S 9 of 22
 left c
 --R 
 --R
@@ -57510,7 +57602,7 @@ left c
 --R                                                           Type: Magma Symbol
 --E 9
 
---S 10
+--S 10 of 22
 right c
 --R 
 --R
@@ -57518,7 +57610,7 @@ right c
 --R                                                           Type: Magma Symbol
 --E 10
 
---S 11
+--S 11 of 22
 length c
 --R 
 --R
@@ -57526,7 +57618,7 @@ length c
 --R                                                        Type: PositiveInteger
 --E 11
 
---S 12
+--S 12 of 22
 c::word
 --R 
 --R
@@ -57535,7 +57627,7 @@ c::word
 --R                                               Type: OrderedFreeMonoid Symbol
 --E 12
 
---S 13
+--S 13 of 22
 a < b
 --R 
 --R
@@ -57543,7 +57635,7 @@ a < b
 --R                                                                Type: Boolean
 --E 13
 
---S 14
+--S 14 of 22
 a < c
 --R 
 --R
@@ -57551,7 +57643,7 @@ a < c
 --R                                                                Type: Boolean
 --E 14
 
---S 15
+--S 15 of 22
 b < c
 --R 
 --R
@@ -57559,7 +57651,7 @@ b < c
 --R                                                                Type: Boolean
 --E 15
 
---S 16
+--S 16 of 22
 first c
 --R 
 --R
@@ -57567,7 +57659,7 @@ first c
 --R                                                                 Type: Symbol
 --E 16
 
---S 17
+--S 17 of 22
 rest c
 --R 
 --R
@@ -57575,7 +57667,7 @@ rest c
 --R                                                           Type: Magma Symbol
 --E 17
 
---S 18
+--S 18 of 22
 rest rest c
 --R 
 --R
@@ -57583,7 +57675,7 @@ rest rest c
 --R                                                           Type: Magma Symbol
 --E 18
 
---S 19
+--S 19 of 22
 ax:tree := a*x
 --R 
 --R
@@ -57591,7 +57683,7 @@ ax:tree := a*x
 --R                                                           Type: Magma Symbol
 --E 19
 
---S 20
+--S 20 of 22
 xa:tree := x*a
 --R 
 --R
@@ -57599,7 +57691,7 @@ xa:tree := x*a
 --R                                                           Type: Magma Symbol
 --E 20
 
---S 21
+--S 21 of 22
 xa < ax
 --R 
 --R
@@ -57607,7 +57699,7 @@ xa < ax
 --R                                                                Type: Boolean
 --E 21
 
---S 22
+--S 22 of 22
 lexico(xa,ax)
 --R 
 --R
@@ -62925,7 +63017,7 @@ NonNegativeInteger: Join(OrderedAbelianMonoidSup,Monoid) with
 )set message auto off
 )clear all
 
---S 1
+--S 1 of 8
 x:=monomial(1,1)$UFPS PF 1783
 --R 
 --R
@@ -62933,7 +63025,7 @@ x:=monomial(1,1)$UFPS PF 1783
 --R                            Type: UnivariateFormalPowerSeries PrimeField 1783
 --E 1
 
---S 2
+--S 2 of 8
 s:=retract(sin x)$NOTTING PF 1783
 --R 
 --R
@@ -62942,7 +63034,7 @@ s:=retract(sin x)$NOTTING PF 1783
 --R                                        Type: NottinghamGroup PrimeField 1783
 --E 2
 
---S 3
+--S 3 of 8
 s^2
 --R 
 --R
@@ -62951,7 +63043,7 @@ s^2
 --R                                        Type: NottinghamGroup PrimeField 1783
 --E 3
 
---S 4
+--S 4 of 8
 s^-1
 --R 
 --R
@@ -62960,7 +63052,7 @@ s^-1
 --R                                        Type: NottinghamGroup PrimeField 1783
 --E 4
 
---S 5
+--S 5 of 8
 s^-1*s
 --R 
 --R
@@ -62969,7 +63061,7 @@ s^-1*s
 --R                                        Type: NottinghamGroup PrimeField 1783
 --E 5
 
---S 6
+--S 6 of 8
 s*s^-1
 --R 
 --R
@@ -62978,14 +63070,14 @@ s*s^-1
 --R                                        Type: NottinghamGroup PrimeField 1783
 --E 6
 
---S 7
+--S 7 of 8
 sample()$NOTTING(PF(1783))
 --R
 --R   (7)  x
 --R                                        Type: NottinghamGroup PrimeField 1783
 --E 7
 
---S 8
+--S 8 of 8
 )show NottinghamGroup
 --R 
 --R NottinghamGroup F: FiniteFieldCategory  is a domain constructor
@@ -65931,7 +66023,7 @@ OrderedFreeMonoid(S: OrderedSet): OFMcategory == OFMdefinition where
 )set message test on
 )set message auto off
 )clear all
---S 1
+--S 1 of 5
 ls:List Symbol:=['x,'a,'z]
 --R 
 --R
@@ -65939,7 +66031,7 @@ ls:List Symbol:=['x,'a,'z]
 --R                                                            Type: List Symbol
 --E 1
 
---S 2
+--S 2 of 5
 Z:=OVAR ls
 --R 
 --R
@@ -65947,7 +66039,7 @@ Z:=OVAR ls
 --R                                                                 Type: Domain
 --E 2
 
---S 3
+--S 3 of 5
 size()$Z
 --R 
 --R
@@ -65955,7 +66047,7 @@ size()$Z
 --R                                                     Type: NonNegativeInteger
 --E 3
 
---S 4
+--S 4 of 5
 lv:=[index(i::PI)$Z for i in 1..size()$Z]
 --R 
 --I   Compiling function G1408 with type Integer -> Boolean 
@@ -65965,7 +66057,7 @@ lv:=[index(i::PI)$Z for i in 1..size()$Z]
 --R                                       Type: List OrderedVariableList [x,a,z]
 --E 4
 
---S 5
+--S 5 of 5
 sorted?(>,lv)
 --R 
 --R
@@ -108074,7 +108166,7 @@ Vector(R:Type): Exports == Implementation where
 )set message test on
 )set message auto off
 )clear all
---S 1
+--S 1 of 5
 r := (a; b; if c then d else e; f) 
 --R 
 --R 
@@ -108083,7 +108175,7 @@ r := (a; b; if c then d else e; f)
 --R      have written one that does not.
 --E 1
 
---S 2
+--S 2 of 5
 a : Integer
 --R 
 --R                                                                   Type: Void
@@ -108091,7 +108183,7 @@ a : Integer
 
 )set message void on
 
---S 3
+--S 3 of 5
 b : Fraction Integer
 --R 
 --R
@@ -108101,13 +108193,13 @@ b : Fraction Integer
 
 )set message void off
  
---S 4
+--S 4 of 5
 3::Void
 --R 
 --R                                                                   Type: Void
 --E 4
 
---S 5
+--S 5 of 5
 % :: PositiveInteger
 --R 
 --R 
diff --git a/books/bookvol10.4.pamphlet b/books/bookvol10.4.pamphlet
index 0760a9d..2e1056b 100644
--- a/books/bookvol10.4.pamphlet
+++ b/books/bookvol10.4.pamphlet
@@ -43693,7 +43693,7 @@ factor t6
 )set message auto off
 )clear all
 
---S 1 of 36
+--S 1 of 8
 M := SQMATRIX(2,INT)
 --R 
 --R
@@ -43701,7 +43701,7 @@ M := SQMATRIX(2,INT)
 --R                                                                 Type: Domain
 --E 1
 
---S 2 of 36
+--S 2 of 8
 m1: M := squareMatrix matrix [ [1, 2], [0, -1] ]
 --R 
 --R
@@ -43711,7 +43711,7 @@ m1: M := squareMatrix matrix [ [1, 2], [0, -1] ]
 --R                                                Type: SquareMatrix(2,Integer)
 --E 2
 
---S 3 of 36
+--S 3 of 8
 m2: M := squareMatrix matrix [ [2, 3], [1, -2] ]
 --R 
 --R
@@ -43721,7 +43721,7 @@ m2: M := squareMatrix matrix [ [2, 3], [1, -2] ]
 --R                                                Type: SquareMatrix(2,Integer)
 --E 3
 
---S 4 of 36
+--S 4 of 8
 m3: M := squareMatrix matrix [ [3, 4], [2, -3] ]
 --R 
 --R
@@ -43731,7 +43731,7 @@ m3: M := squareMatrix matrix [ [3, 4], [2, -3] ]
 --R                                                Type: SquareMatrix(2,Integer)
 --E 4
 
---S 5 of 36
+--S 5 of 8
 linearlyDependentOverZ? vector [m1, m2, m3]
 --R 
 --R
@@ -43739,7 +43739,7 @@ linearlyDependentOverZ? vector [m1, m2, m3]
 --R                                                                Type: Boolean
 --E 5
 
---S 6 of 36
+--S 6 of 8
 c := linearDependenceOverZ vector [m1, m2, m3]
 --R 
 --R
@@ -43747,7 +43747,7 @@ c := linearDependenceOverZ vector [m1, m2, m3]
 --R                                              Type: Union(Vector Integer,...)
 --E 6
 
---S 7 of 36
+--S 7 of 8
 c.1 * m1 + c.2 * m2 + c.3 * m3
 --R 
 --R
@@ -43757,7 +43757,7 @@ c.1 * m1 + c.2 * m2 + c.3 * m3
 --R                                                Type: SquareMatrix(2,Integer)
 --E 7
 
---S 8 of 36
+--S 8 of 8
 solveLinearlyOverQ(vector [m1, m3], m2)
 --R 
 --R
@@ -54949,7 +54949,7 @@ MappingPackage1(A:SetCategory): MPcat == MPdef where
 )set message test on
 )set message auto off
 )clear all
---S 1
+--S 1 of 26
 power(q: FRAC INT, n: INT): FRAC INT == q**n
 --R 
 --R   Function declaration power : (Fraction Integer,Integer) -> Fraction 
@@ -54957,7 +54957,7 @@ power(q: FRAC INT, n: INT): FRAC INT == q**n
 --R                                                                   Type: Void
 --E 1
 
---S 2
+--S 2 of 26
 power(2,3)
 --R 
 --R   Compiling function power with type (Fraction Integer,Integer) -> 
@@ -54967,7 +54967,7 @@ power(2,3)
 --R                                                       Type: Fraction Integer
 --E 2
 
---S 3
+--S 3 of 26
 rewop := twist power
 --R 
 --R
@@ -54975,7 +54975,7 @@ rewop := twist power
 --R                       Type: ((Integer,Fraction Integer) -> Fraction Integer)
 --E 3
 
---S 4
+--S 4 of 26
 rewop(3, 2)
 --R 
 --R
@@ -54983,13 +54983,13 @@ rewop(3, 2)
 --R                                                       Type: Fraction Integer
 --E 4
 
---S 5
+--S 5 of 26
 square: FRAC INT -> FRAC INT
 --R 
 --R                                                                   Type: Void
 --E 5
 
---S 6
+--S 6 of 26
 square:= curryRight(power, 2)
 --R 
 --R
@@ -54997,7 +54997,7 @@ square:= curryRight(power, 2)
 --R                                 Type: (Fraction Integer -> Fraction Integer)
 --E 6
 
---S 7
+--S 7 of 26
 square 4
 --R 
 --R
@@ -55005,7 +55005,7 @@ square 4
 --R                                                       Type: Fraction Integer
 --E 7
 
---S 8
+--S 8 of 26
 squirrel:= constantRight(square)$MAPPKG3(FRAC INT,FRAC INT,FRAC INT)
 --R 
 --R
@@ -55013,7 +55013,7 @@ squirrel:= constantRight(square)$MAPPKG3(FRAC INT,FRAC INT,FRAC INT)
 --R              Type: ((Fraction Integer,Fraction Integer) -> Fraction Integer)
 --E 8
 
---S 9
+--S 9 of 26
 squirrel(1/2, 1/3)
 --R 
 --R
@@ -55023,7 +55023,7 @@ squirrel(1/2, 1/3)
 --R                                                       Type: Fraction Integer
 --E 9
 
---S 10
+--S 10 of 26
 sixteen := curry(square, 4/1)
 --R 
 --R
@@ -55031,7 +55031,7 @@ sixteen := curry(square, 4/1)
 --R                                               Type: (() -> Fraction Integer)
 --E 10
 
---S 11
+--S 11 of 26
 sixteen()
 --R 
 --R
@@ -55039,7 +55039,7 @@ sixteen()
 --R                                                       Type: Fraction Integer
 --E 11
 
---S 12
+--S 12 of 26
 square2:=square*square
 --R 
 --R
@@ -55047,7 +55047,7 @@ square2:=square*square
 --R                                 Type: (Fraction Integer -> Fraction Integer)
 --E 12
 
---S 13
+--S 13 of 26
 square2 3
 --R 
 --R
@@ -55055,7 +55055,7 @@ square2 3
 --R                                                       Type: Fraction Integer
 --E 13
 
---S 14
+--S 14 of 26
 sc(x: FRAC INT): FRAC INT == x + 1
 --R 
 --R   Function declaration sc : Fraction Integer -> Fraction Integer has 
@@ -55063,7 +55063,7 @@ sc(x: FRAC INT): FRAC INT == x + 1
 --R                                                                   Type: Void
 --E 14
 
---S 15
+--S 15 of 26
 incfns := [sc**i for i in 0..10]
 --R 
 --R   Compiling function sc with type Fraction Integer -> Fraction Integer
@@ -55079,7 +55079,7 @@ incfns := [sc**i for i in 0..10]
 --R                            Type: List (Fraction Integer -> Fraction Integer)
 --E 15
 
---S 16
+--S 16 of 26
 [f 4 for f in incfns]
 --R 
 --R
@@ -55087,7 +55087,7 @@ incfns := [sc**i for i in 0..10]
 --R                                                  Type: List Fraction Integer
 --E 16
 
---S 17
+--S 17 of 26
 times(n:NNI, i:INT):INT == n*i
 --R 
 --R   Function declaration times : (NonNegativeInteger,Integer) -> Integer
@@ -55095,7 +55095,7 @@ times(n:NNI, i:INT):INT == n*i
 --R                                                                   Type: Void
 --E 17
 
---S 18
+--S 18 of 26
 r := recur(times)
 --R 
 --R   Compiling function times with type (NonNegativeInteger,Integer) -> 
@@ -55105,7 +55105,7 @@ r := recur(times)
 --R                              Type: ((NonNegativeInteger,Integer) -> Integer)
 --E 18
 
---S 19
+--S 19 of 26
 fact := curryRight(r, 1)
 --R 
 --R
@@ -55113,7 +55113,7 @@ fact := curryRight(r, 1)
 --R                                        Type: (NonNegativeInteger -> Integer)
 --E 19
 
---S 20
+--S 20 of 26
 fact 4
 --R 
 --R
@@ -55121,7 +55121,7 @@ fact 4
 --R                                                        Type: PositiveInteger
 --E 20
 
---S 21
+--S 21 of 26
 mto2ton(m, n) ==
   raiser := square^n
   raiser m
@@ -55129,7 +55129,7 @@ mto2ton(m, n) ==
 --R                                                                   Type: Void
 --E 21
 
---S 22
+--S 22 of 26
 mto2ton(3, 3)
 --R 
 --R   Compiling function mto2ton with type (PositiveInteger,
@@ -55139,7 +55139,7 @@ mto2ton(3, 3)
 --R                                                       Type: Fraction Integer
 --E 22
 
---S 23
+--S 23 of 26
 shiftfib(r: List INT) : INT ==
   t := r.1
   r.1 := r.2
@@ -55151,7 +55151,7 @@ shiftfib(r: List INT) : INT ==
 --R                                                                   Type: Void
 --E 23
 
---S 24
+--S 24 of 26
 fibinit: List INT := [0, 1]
 --R 
 --R
@@ -55159,7 +55159,7 @@ fibinit: List INT := [0, 1]
 --R                                                           Type: List Integer
 --E 24
 
---S 25
+--S 25 of 26
 fibs := curry(shiftfib, fibinit)
 --R 
 --R   Compiling function shiftfib with type List Integer -> Integer 
@@ -55168,7 +55168,7 @@ fibs := curry(shiftfib, fibinit)
 --R                                                        Type: (() -> Integer)
 --E 25
 
---S 26
+--S 26 of 26
 [fibs() for i in 0..30]
 --R 
 --R
@@ -55426,7 +55426,7 @@ MappingPackage2(A:SetCategory, C:SetCategory): MPcat == MPdef where
 )set message test on
 )set message auto off
 )clear all
---S 1
+--S 1 of 26
 power(q: FRAC INT, n: INT): FRAC INT == q**n
 --R 
 --R   Function declaration power : (Fraction Integer,Integer) -> Fraction 
@@ -55434,7 +55434,7 @@ power(q: FRAC INT, n: INT): FRAC INT == q**n
 --R                                                                   Type: Void
 --E 1
 
---S 2
+--S 2 of 26
 power(2,3)
 --R 
 --R   Compiling function power with type (Fraction Integer,Integer) -> 
@@ -55444,7 +55444,7 @@ power(2,3)
 --R                                                       Type: Fraction Integer
 --E 2
 
---S 3
+--S 3 of 26
 rewop := twist power
 --R 
 --R
@@ -55452,7 +55452,7 @@ rewop := twist power
 --R                       Type: ((Integer,Fraction Integer) -> Fraction Integer)
 --E 3
 
---S 4
+--S 4 of 26
 rewop(3, 2)
 --R 
 --R
@@ -55460,13 +55460,13 @@ rewop(3, 2)
 --R                                                       Type: Fraction Integer
 --E 4
 
---S 5
+--S 5 of 26
 square: FRAC INT -> FRAC INT
 --R 
 --R                                                                   Type: Void
 --E 5
 
---S 6
+--S 6 of 26
 square:= curryRight(power, 2)
 --R 
 --R
@@ -55474,7 +55474,7 @@ square:= curryRight(power, 2)
 --R                                 Type: (Fraction Integer -> Fraction Integer)
 --E 6
 
---S 7
+--S 7 of 26
 square 4
 --R 
 --R
@@ -55482,7 +55482,7 @@ square 4
 --R                                                       Type: Fraction Integer
 --E 7
 
---S 8
+--S 8 of 26
 squirrel:= constantRight(square)$MAPPKG3(FRAC INT,FRAC INT,FRAC INT)
 --R 
 --R
@@ -55490,7 +55490,7 @@ squirrel:= constantRight(square)$MAPPKG3(FRAC INT,FRAC INT,FRAC INT)
 --R              Type: ((Fraction Integer,Fraction Integer) -> Fraction Integer)
 --E 8
 
---S 9
+--S 9 of 26
 squirrel(1/2, 1/3)
 --R 
 --R
@@ -55500,7 +55500,7 @@ squirrel(1/2, 1/3)
 --R                                                       Type: Fraction Integer
 --E 9
 
---S 10
+--S 10 of 26
 sixteen := curry(square, 4/1)
 --R 
 --R
@@ -55508,7 +55508,7 @@ sixteen := curry(square, 4/1)
 --R                                               Type: (() -> Fraction Integer)
 --E 10
 
---S 11
+--S 11 of 26
 sixteen()
 --R 
 --R
@@ -55516,7 +55516,7 @@ sixteen()
 --R                                                       Type: Fraction Integer
 --E 11
 
---S 12
+--S 12 of 26
 square2:=square*square
 --R 
 --R
@@ -55524,7 +55524,7 @@ square2:=square*square
 --R                                 Type: (Fraction Integer -> Fraction Integer)
 --E 12
 
---S 13
+--S 13 of 26
 square2 3
 --R 
 --R
@@ -55532,7 +55532,7 @@ square2 3
 --R                                                       Type: Fraction Integer
 --E 13
 
---S 14
+--S 14 of 26
 sc(x: FRAC INT): FRAC INT == x + 1
 --R 
 --R   Function declaration sc : Fraction Integer -> Fraction Integer has 
@@ -55540,7 +55540,7 @@ sc(x: FRAC INT): FRAC INT == x + 1
 --R                                                                   Type: Void
 --E 14
 
---S 15
+--S 15 of 26
 incfns := [sc**i for i in 0..10]
 --R 
 --R   Compiling function sc with type Fraction Integer -> Fraction Integer
@@ -55556,7 +55556,7 @@ incfns := [sc**i for i in 0..10]
 --R                            Type: List (Fraction Integer -> Fraction Integer)
 --E 15
 
---S 16
+--S 16 of 26
 [f 4 for f in incfns]
 --R 
 --R
@@ -55564,7 +55564,7 @@ incfns := [sc**i for i in 0..10]
 --R                                                  Type: List Fraction Integer
 --E 16
 
---S 17
+--S 17 of 26
 times(n:NNI, i:INT):INT == n*i
 --R 
 --R   Function declaration times : (NonNegativeInteger,Integer) -> Integer
@@ -55572,7 +55572,7 @@ times(n:NNI, i:INT):INT == n*i
 --R                                                                   Type: Void
 --E 17
 
---S 18
+--S 18 of 26
 r := recur(times)
 --R 
 --R   Compiling function times with type (NonNegativeInteger,Integer) -> 
@@ -55582,7 +55582,7 @@ r := recur(times)
 --R                              Type: ((NonNegativeInteger,Integer) -> Integer)
 --E 18
 
---S 19
+--S 19 of 26
 fact := curryRight(r, 1)
 --R 
 --R
@@ -55590,7 +55590,7 @@ fact := curryRight(r, 1)
 --R                                        Type: (NonNegativeInteger -> Integer)
 --E 19
 
---S 20
+--S 20 of 26
 fact 4
 --R 
 --R
@@ -55598,7 +55598,7 @@ fact 4
 --R                                                        Type: PositiveInteger
 --E 20
 
---S 21
+--S 21 of 26
 mto2ton(m, n) ==
   raiser := square^n
   raiser m
@@ -55606,7 +55606,7 @@ mto2ton(m, n) ==
 --R                                                                   Type: Void
 --E 21
 
---S 22
+--S 22 of 26
 mto2ton(3, 3)
 --R 
 --R   Compiling function mto2ton with type (PositiveInteger,
@@ -55616,7 +55616,7 @@ mto2ton(3, 3)
 --R                                                       Type: Fraction Integer
 --E 22
 
---S 23
+--S 23 of 26
 shiftfib(r: List INT) : INT ==
   t := r.1
   r.1 := r.2
@@ -55628,7 +55628,7 @@ shiftfib(r: List INT) : INT ==
 --R                                                                   Type: Void
 --E 23
 
---S 24
+--S 24 of 26
 fibinit: List INT := [0, 1]
 --R 
 --R
@@ -55636,7 +55636,7 @@ fibinit: List INT := [0, 1]
 --R                                                           Type: List Integer
 --E 24
 
---S 25
+--S 25 of 26
 fibs := curry(shiftfib, fibinit)
 --R 
 --R   Compiling function shiftfib with type List Integer -> Integer 
@@ -55645,7 +55645,7 @@ fibs := curry(shiftfib, fibinit)
 --R                                                        Type: (() -> Integer)
 --E 25
 
---S 26
+--S 26 of 26
 [fibs() for i in 0..30]
 --R 
 --R
diff --git a/changelog b/changelog
index 8457c12..2278c93 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,12 @@
+20090410 tpd src/axiom-website/patches.html 20090410.01.tpd.patch
+20090410 tpd src/input/mappkg1.input removed, moved to algebra books
+20090410 tpd src/input/parabola.input fix regress format
+20090410 tpd src/input/gstbl.input fix regress format
+20090410 tpd src/input/fixed.input fix regress format
+20090410 tpd src/input/ffx72.input fix regress format
+20090410 tpd src/input/Makefile fix regress format
+20090410 tpd books/bookvol10.4 fix regress format
+20090410 tpd books/bookvol10.3 fix regress format
 20090409 tpd src/axiom-website/patches.html 20090409.01.tpd.patch
 20090409 tpd src/algebra/Makefile move egrep to grep -E
 20090408 tpd src/axiom-website/patches.html 20090408.01.tpd.patch
diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html
index 5b9c3c7..96c30db 100644
--- a/src/axiom-website/patches.html
+++ b/src/axiom-website/patches.html
@@ -1058,5 +1058,7 @@ src/doc remove unused files<br/>
 bookvol5 collect help files<br/>
 <a href="patches/20090409.01.tpd.patch">20090409.01.tpd.patch</a>
 src/algebra/Makefile egrep -> grep -E<br/>
+<a href="patches/20090410.01.tpd.patch">20090410.01.tpd.patch</a>
+fix regress format<br/>
  </body>
 </html>
diff --git a/src/input/Makefile.pamphlet b/src/input/Makefile.pamphlet
index 28ebb4b..8cfea16 100644
--- a/src/input/Makefile.pamphlet
+++ b/src/input/Makefile.pamphlet
@@ -335,7 +335,7 @@ REGRES= algaggr.regress algbrbf.regress  algfacob.regress alist.regress  \
     lodo2.regress     lodo3.regress    lodof.regress    lodo.regress \
     log.regress \
     lpoly.regress     lupfact.regress  lword.regress    macbug.regress \
-    macros.regress    magma.regress    mapleok.regress  mappkg1.regress \
+    macros.regress    magma.regress    mapleok.regress   \
     matbug.regress    mathml.regress   \
     matrix1.regress  matrix22.regress matrix.regress \
     mfinfact.regress  mkfunc.regress   mpoly.regress    mset2.regress \
@@ -617,7 +617,7 @@ FILES= ${OUT}/algaggr.input  ${OUT}/algbrbf.input    ${OUT}/algfacob.input \
        ${OUT}/lpoly.input    ${OUT}/lump.input \
        ${OUT}/lupfact.input  ${OUT}/lword.input      ${OUT}/macbug.input \
        ${OUT}/macros.input   ${OUT}/marcbench.input  ${OUT}/magma.input \
-       ${OUT}/mapleok.input  ${OUT}/mappkg1.input    ${OUT}/matbug.input \
+       ${OUT}/mapleok.input  ${OUT}/matbug.input \
        ${OUT}/mathml.input \
        ${OUT}/matrix22.input ${OUT}/matrix.input     ${OUT}/matrix1.input \
        ${OUT}/mfinfact.input ${OUT}/mkfunc.input     ${OUT}/mountain.input \
@@ -928,7 +928,7 @@ DOCFILES= \
   ${DOC}/lump.input.dvi        ${DOC}/lupfact.input.dvi    \
   ${DOC}/lword.input.dvi       ${DOC}/macbug.input.dvi     \
   ${DOC}/macros.input.dvi      ${DOC}/magma.input.dvi      \
-  ${DOC}/mapleok.input.dvi     ${DOC}/mappkg1.input.dvi    \
+  ${DOC}/mapleok.input.dvi     \
   ${DOC}/marcbench.input.dvi   ${DOC}/matbug.input.dvi     \
   ${DOC}/mathml.input.dvi      \
   ${DOC}/matops.as.dvi         ${DOC}/matrix1.input.dvi    \
diff --git a/src/input/ffx72.input.pamphlet b/src/input/ffx72.input.pamphlet
index cdf9c40..563181b 100644
--- a/src/input/ffx72.input.pamphlet
+++ b/src/input/ffx72.input.pamphlet
@@ -121,7 +121,7 @@ trace e
 The order of an element is the minimum positive integer to which
 it can be raised to yield 1.
 <<*>>=
---S 10  of 13
+--S 10 of 13
 order e
 --R 
 --R
@@ -132,7 +132,7 @@ order e
 @ 
 We can display all the nonzero elements in the field
 <<*>>=
---S 11  of 13
+--S 11 of 13
 allElts := [index(i :: PI)$gf72 for i in 1..48]
 --R 
 --R
@@ -149,7 +149,7 @@ allElts := [index(i :: PI)$gf72 for i in 1..48]
 @ 
 We can sum over them
 <<*>>=
---S 12  of 13
+--S 12 of 13
 reduce(+,allElts)
 --R 
 --R
diff --git a/src/input/fixed.input.pamphlet b/src/input/fixed.input.pamphlet
index 4a5a5c3..35c6a1c 100644
--- a/src/input/fixed.input.pamphlet
+++ b/src/input/fixed.input.pamphlet
@@ -28,7 +28,7 @@ does not exist.
 <<*>>=
 )clear all
 
---S 1
+--S 1 of 267
 t1:=series(x/(x+log(x)))
 --R
 --R   (1)
@@ -48,7 +48,7 @@ t1:=series(x/(x+log(x)))
 Here integrate is treating log(x) as a constant, which is incorrect.
 <<*>>=
 
---S 2
+--S 2 of 267
 integrate(t1)
 --R 
 --R 
@@ -65,7 +65,7 @@ bmt/10/19/92 integrate problem -- serious, wrong answer
 <<*>>=
 )clear all
 
---S 3
+--S 3 of 267
 t1:=2*sin(t)*sqrt(1+cos(t))
 --R
 --R                +----------+
@@ -77,7 +77,7 @@ t1:=2*sin(t)*sqrt(1+cos(t))
 Correct answer is \[\frac{2\sin(t)}{\sqrt{1+\cos(t)}}\]
 <<*>>=
 
---S 4
+--S 4 of 267
 integrate(t1,t)
 --R
 --R                        +----------+
@@ -92,7 +92,7 @@ bmt/10/20/92 multiple complex in type tower
 <<*>>=
 )clear all
 
---S 5
+--S 5 of 267
 n:Complex ?
 --R                                                                   Type: Void
 --E
@@ -101,7 +101,7 @@ n:Complex ?
 An invalid type. can't have 2 complex constructors in a tower
 <<*>>=
 
---S 6
+--S 6 of 267
 n:=x/y+%i
 --R
 --R        x
@@ -120,7 +120,7 @@ as a constant
 <<*>>=
 )clear all
 
---S 7
+--S 7 of 267
 f:=(a-b-c-d)**2::EXPR INT
 --R
 --R         2                      2                 2           2
@@ -128,7 +128,7 @@ f:=(a-b-c-d)**2::EXPR INT
 --R                                                     Type: Expression Integer
 --E
 
---S 8
+--S 8 of 267
 t1:=f::DMP(['a,'b],EXPR INT)
 --R
 --R         2                          2                 2           2
@@ -136,7 +136,7 @@ t1:=f::DMP(['a,'b],EXPR INT)
 --R            Type: DistributedMultivariatePolynomial([a,b],Expression Integer)
 --E
 
---S 9
+--S 9 of 267
 degree t1
 --R
 --R   (3)  [2,0]
@@ -157,7 +157,7 @@ The answer should be should be \[\frac{2*\sin(t)}{\sqrt{1+\cos(t)}}\]
 <<*>>=
 )clear all
 
---S 10
+--S 10 of 267
 integrate(sqrt(1+cos(x)),x)
 --R
 --R                +----------+
@@ -174,7 +174,7 @@ gives: Cannot convert kernel to gaussian function
 <<*>>=
 )clear all
 
---S 11
+--S 11 of 267
 integrate(exp(x**2),x)
 --R
 --R           x     2
@@ -200,7 +200,7 @@ Do you agree, thus max/ empty list would return 0.
 <<*>>=
 )clear all
 
---S 12
+--S 12 of 267
 f:=log(1-(b*x/(a+c*x**2)))/x
 --R
 --R               2
@@ -213,7 +213,7 @@ f:=log(1-(b*x/(a+c*x**2)))/x
 --R                                                     Type: Expression Integer
 --E
 
---S 13
+--S 13 of 267
 integrate(f,x)
 --R
 --R                   2
@@ -226,7 +226,7 @@ integrate(f,x)
 --R                                          Type: Union(Expression Integer,...)
 --E
 
---S 14
+--S 14 of 267
 g:=expand f
 --R
 --R                 2               2
@@ -236,7 +236,7 @@ g:=expand f
 --R                                                     Type: Expression Integer
 --E
 
---S 15
+--S 15 of 267
 integrate(g,x)
 --R
 --R           x         2               2
@@ -252,7 +252,7 @@ Says cannot find an appropriate *
 <<*>>=
 )clear all
 
---S 16
+--S 16 of 267
 %i/m*sqrt(m) 
 --R
 --R           +-+
@@ -267,12 +267,12 @@ tpd/09/22/92 this generates extra brackets
 <<*>>=
 )clear all
 
---S 17
+--S 17 of 267
 foo n == matrix[[i for i in 1..n] for j in 1..n]
 --R                                                                   Type: Void
 --E
 
---S 18
+--S 18 of 267
 foo
 --R
 --R   (2)  foo n == [[i for i in 1..n] for j in 1..n]
@@ -305,7 +305,7 @@ comment: this works in version 2
 <<*>>=
 )clear all
 
---S 19
+--S 19 of 267
 msq := Matrix SquareMatrix(2,POLY INT)
 --R 
 --R
@@ -313,7 +313,7 @@ msq := Matrix SquareMatrix(2,POLY INT)
 --R                                                                 Type: Domain
 --E
 
---S 20
+--S 20 of 267
 m : msq := zero(2,2)
 --R
 --R        ++0  0+  +0  0++
@@ -326,7 +326,7 @@ m : msq := zero(2,2)
 --R                              Type: Matrix SquareMatrix(2,Polynomial Integer)
 --E
 
---S 21
+--S 21 of 267
 m(1,1) := matrix([[1,2],[a,b]])
 --R
 --R        +1  2+
@@ -335,7 +335,7 @@ m(1,1) := matrix([[1,2],[a,b]])
 --R                                     Type: SquareMatrix(2,Polynomial Integer)
 --E
 
---S 22
+--S 22 of 267
 m(1,2) := matrix([[a,b],[2,b]])
 --R
 --R        +a  b+
@@ -344,7 +344,7 @@ m(1,2) := matrix([[a,b],[2,b]])
 --R                                     Type: SquareMatrix(2,Polynomial Integer)
 --E
 
---S 23
+--S 23 of 267
 m(2,2) := matrix([[1,2],[2,b]])
 --R
 --R        +1  2+
@@ -353,7 +353,7 @@ m(2,2) := matrix([[1,2],[2,b]])
 --R                                     Type: SquareMatrix(2,Polynomial Integer)
 --E
 
---S 24
+--S 24 of 267
 m
 --R
 --R        ++1  2+  +a  b++
@@ -366,7 +366,7 @@ m
 --R                              Type: Matrix SquareMatrix(2,Polynomial Integer)
 --E
 
---S 25
+--S 25 of 267
 m*m
 --R
 --R        +                    +              2           ++
@@ -382,7 +382,7 @@ m*m
 --R                              Type: Matrix SquareMatrix(2,Polynomial Integer)
 --E
 
---S 26
+--S 26 of 267
 m**2
 --R
 --R        +                    +              2           ++
@@ -398,7 +398,7 @@ m**2
 --R                              Type: Matrix SquareMatrix(2,Polynomial Integer)
 --E
 
---S 27
+--S 27 of 267
 m**3
 --R
 --R        +matrix1  matrix2+
@@ -432,7 +432,7 @@ m**3
 --R                              Type: Matrix SquareMatrix(2,Polynomial Integer)
 --E
 
---S 28
+--S 28 of 267
 (m*m)*m
 --R
 --R         +matrix1  matrix2+
@@ -466,7 +466,7 @@ m**3
 --R                              Type: Matrix SquareMatrix(2,Polynomial Integer)
 --E
 
---S 29
+--S 29 of 267
 mm:=m*m
 --R
 --R         +                    +              2           ++
@@ -482,7 +482,7 @@ mm:=m*m
 --R                              Type: Matrix SquareMatrix(2,Polynomial Integer)
 --E
 
---S 30
+--S 30 of 267
 mm*m
 --R
 --R         +matrix1  matrix2+
@@ -525,7 +525,7 @@ is 0 and we have an IntegralDomain.\\
 Johannes
 <<*>>=
 )clear all
---S 31
+--S 31 of 267
 eq1 := (-6*x**3+13*x**2+4)=(-x**4+12*x)
 --R
 --R            3      2         4
@@ -533,7 +533,7 @@ eq1 := (-6*x**3+13*x**2+4)=(-x**4+12*x)
 --R                                            Type: Equation Polynomial Integer
 --E
 
---S 32
+--S 32 of 267
 eq2 := x**4+13*x**2-12*x = 6*x**3-4
 --R
 --R         4      2          3
@@ -541,7 +541,7 @@ eq2 := x**4+13*x**2-12*x = 6*x**3-4
 --R                                            Type: Equation Polynomial Integer
 --E
 
---S 33
+--S 33 of 267
 eq := eq1*y**2+eq2
 --R
 --R             3      2      2    4      2            4        2     3
@@ -549,7 +549,7 @@ eq := eq1*y**2+eq2
 --R                                            Type: Equation Polynomial Integer
 --E
 
---S 34
+--S 34 of 267
 t1:=swap eq
 --R
 --R            4        2     3           3      2      2    4      2
@@ -557,7 +557,7 @@ t1:=swap eq
 --R                                            Type: Equation Polynomial Integer
 --E
 
---S 35
+--S 35 of 267
 t2:=t1 + 4
 --R
 --R            4        2     3       3      2      2    4      2
@@ -565,7 +565,7 @@ t2:=t1 + 4
 --R                                            Type: Equation Polynomial Integer
 --E
 
---S 36
+--S 36 of 267
 t3:=t2-6*x**3
 --R
 --R            4        2       3      2      2    4     3      2
@@ -573,7 +573,7 @@ t3:=t2-6*x**3
 --R                                            Type: Equation Polynomial Integer
 --E
 
---S 37
+--S 37 of 267
 t4:=leftZero t3
 --R
 --R             4     3      2            2    4     3      2
@@ -581,7 +581,7 @@ t4:=leftZero t3
 --R                                            Type: Equation Polynomial Integer
 --E
 
---S 38
+--S 38 of 267
 t5:=swap t4
 --R
 --R          4     3      2            2    4     3      2
@@ -589,7 +589,7 @@ t5:=swap t4
 --R                                            Type: Equation Polynomial Integer
 --E
 
---S 39
+--S 39 of 267
 t6:=factor lhs t5
 --R
 --R               2       2  2
@@ -597,7 +597,7 @@ t6:=factor lhs t5
 --R                                            Type: Factored Polynomial Integer
 --E
 
---S 40
+--S 40 of 267
 t7:=factorAndSplit eq
 --R
 --R                             2
@@ -605,7 +605,7 @@ t7:=factorAndSplit eq
 --R                                       Type: List Equation Polynomial Integer
 --E
 
---S 41
+--S 41 of 267
 t8:=inv (eq :: EQ FRAC POLY INT)
 --R
 --R                             1                                1
@@ -615,7 +615,7 @@ t8:=inv (eq :: EQ FRAC POLY INT)
 --R                                   Type: Equation Fraction Polynomial Integer
 --E
 
---S 42
+--S 42 of 267
 - t8
 --R
 --R                           1                              1
@@ -650,12 +650,12 @@ properly declared despite the error message. --Tim
 <<*>>=
 )clear all
 
---S 43
+--S 43 of 267
 (p1,p2):UP(x,INT)
 --R                                                                   Type: Void
 --E
 
---S 44
+--S 44 of 267
 p1:=3*x**4+11*x**2-4
 --R
 --R          4      2
@@ -663,7 +663,7 @@ p1:=3*x**4+11*x**2-4
 --R                                        Type: UnivariatePolynomial(x,Integer)
 --E
 
---S 45
+--S 45 of 267
 p2:=9*x**4+9*x**2-4
 --R
 --R          4     2
@@ -671,12 +671,12 @@ p2:=9*x**4+9*x**2-4
 --R                                        Type: UnivariatePolynomial(x,Integer)
 --E
 
---S 46
+--S 46 of 267
 myNextPrime: (INT,NNI) -> INT
 --R                                                                   Type: Void
 --E
 
---S 47
+--S 47 of 267
 myNextPrime(x,n)==nextPrime(x)$PRIMES(INT)
 --R                                                                   Type: Void
 --E
@@ -684,7 +684,7 @@ myNextPrime(x,n)==nextPrime(x)$PRIMES(INT)
 @
 Runs forever due to algebra bug in handling leading coefficients
 <<*>>=
---S 48
+--S 48 of 267
 modularGcd([p1,p2])$InnerModularGcd(INT,UP(x,INT),67108859,myNextPrime)
 --R   Compiling function myNextPrime with type (Integer,NonNegativeInteger
 --R      ) -> Integer 
@@ -699,7 +699,7 @@ dewar/10/02/92 actually, this was never wrong
 <<*>>=
 )clear all
 
---S 49
+--S 49 of 267
 numeric(%e ** %pi)
 --R
 --R   (1)  23.1406926327 79269006
@@ -711,14 +711,14 @@ themos/10/07/92
 <<*>>=
 )clear all
 
---S 50
+--S 50 of 267
 y:=operator 'y
 --R
 --R   (1)  y
 --R                                                          Type: BasicOperator
 --E
 
---S 51
+--S 51 of 267
 deqx:=differentiate(y(x),x,2)+differentiate(y(x),x)+y(x)
 --R
 --R         ,,       ,
@@ -727,7 +727,7 @@ deqx:=differentiate(y(x),x,2)+differentiate(y(x),x)+y(x)
 --R                                                     Type: Expression Integer
 --E
 
---S 52
+--S 52 of 267
 solve(deqx,y,x)
 --R
 --R                                             x     x
@@ -738,7 +738,7 @@ solve(deqx,y,x)
 --RType: Union(Record(particular: Expression Integer,basis: List Expression Integer),...)
 --E
 
---S 53
+--S 53 of 267
 solve(deqx,y,x=0,[1])
 --R
 --R                      x
@@ -749,7 +749,7 @@ solve(deqx,y,x=0,[1])
 --R                                          Type: Union(Expression Integer,...)
 --E
 
---S 54
+--S 54 of 267
 deqt:=differentiate(y(t),t,2)+differentiate(y(t),t)+y(t)
 --R
 --R         ,,       ,
@@ -758,7 +758,7 @@ deqt:=differentiate(y(t),t,2)+differentiate(y(t),t)+y(t)
 --R                                                     Type: Expression Integer
 --E
 
---S 55
+--S 55 of 267
 solve(deqt,y,t)
 --R
 --R                                             t     t
@@ -769,7 +769,7 @@ solve(deqt,y,t)
 --RType: Union(Record(particular: Expression Integer,basis: List Expression Integer),...)
 --E
 
---S 56
+--S 56 of 267
 solve(deqt,y,t=0,[1]) -- bug
 --R
 --R                      t
@@ -780,7 +780,7 @@ solve(deqt,y,t=0,[1]) -- bug
 --R                                          Type: Union(Expression Integer,...)
 --E
 
---S 57
+--S 57 of 267
 deqz:=differentiate(y(z),z,2)+differentiate(y(z),z)+y(z)
 --R
 --R         ,,       ,
@@ -789,7 +789,7 @@ deqz:=differentiate(y(z),z,2)+differentiate(y(z),z)+y(z)
 --R                                                     Type: Expression Integer
 --E
 
---S 58
+--S 58 of 267
 solve(deqz,y,z)
 --R
 --R                                             z     z
@@ -800,7 +800,7 @@ solve(deqz,y,z)
 --RType: Union(Record(particular: Expression Integer,basis: List Expression Integer),...)
 --E
 
---S 59
+--S 59 of 267
 solve(deqz,y,z=0,[1]) --bug
 --R
 --R                       z
@@ -816,14 +816,14 @@ themos/10/07/92 equation
 <<*>>=
 )clear all
 
---S 60
+--S 60 of 267
 y:=operator 'y
 --R
 --R   (1)  y
 --R                                                          Type: BasicOperator
 --E
 
---S 61
+--S 61 of 267
 deq:=D(y(x),x)+x**2=(y x)/x-(y x)**2
 --R
 --R                            2
@@ -838,7 +838,7 @@ bmt/10/08/92 laplace
 <<*>>=
 )clear all
 
---S 62
+--S 62 of 267
 laplace(exp(-x**3)*x**7,x,s) 
 --R
 --R                       3
@@ -856,14 +856,14 @@ Simon's computer algebra test suite:
 <<*>>=
 )clear all
 
---S 63
+--S 63 of 267
 y:=operator 'y
 --R
 --R   (1)  y
 --R                                                          Type: BasicOperator
 --E
 
---S 64
+--S 64 of 267
 x**2 * D(y x, x) + 2*x*(y x) - (y x)**3 = 0
 --R
 --R         2 ,          3
@@ -872,7 +872,7 @@ x**2 * D(y x, x) + 2*x*(y x) - (y x)**3 = 0
 --R                                            Type: Equation Expression Integer
 --E
 
---S 65
+--S 65 of 267
 solve(%,y,x)
 --R
 --R             5         2
@@ -888,7 +888,7 @@ sit/10/08/92 factor bug
 <<*>>=
 )clear all
 
---S 66
+--S 66 of 267
 p:POLY FRAC INT := 3*(x+1)
 --R
 --R   (1)  3x + 3
@@ -899,7 +899,7 @@ p:POLY FRAC INT := 3*(x+1)
 Is wrong (missing factor of 3).
 <<*>>=
 
---S 67
+--S 67 of 267
 factor(p)**2 
 --R
 --R                2
@@ -923,56 +923,56 @@ not very useful:
 <<*>>=
 )clear all
 
---S 68
+--S 68 of 267
 fout:TextFile:=open("/tmp/foo","output")
 --R
 --R   (1)  "/tmp/foo"
 --R                                                               Type: TextFile
 --E
 
---S 69
+--S 69 of 267
 write!(fout,"foo")
 --R
 --R   (2)  "foo"
 --R                                                                 Type: String
 --E
 
---S 70
+--S 70 of 267
 close!(fout)
 --R
 --R   (3)  "/tmp/foo"
 --R                                                               Type: TextFile
 --E
 
---S 71
+--S 71 of 267
 fin:TextFile:=open("/tmp/foo","input")
 --R
 --R   (4)  "/tmp/foo"
 --R                                                               Type: TextFile
 --E
 
---S 72
+--S 72 of 267
 readLineIfCan!(fin)
 --R
 --R   (5)  "foo"
 --R                                                      Type: Union(String,...)
 --E
 
---S 73
+--S 73 of 267
 readLineIfCan!(fin)
 --R
 --R   (6)  "failed"
 --R                                                    Type: Union("failed",...)
 --E
 
---S 74
+--S 74 of 267
 close!(fin)
 --R
 --R   (7)  "/tmp/foo"
 --R                                                               Type: TextFile
 --E
 
---S 75
+--S 75 of 267
 )lis (system "rm /tmp/foo")
 --R 
 --RValue = 0
@@ -983,7 +983,7 @@ bmt/10/08/92 factoring over SAEs
 <<*>>=
 )clear all
 
---S 76
+--S 76 of 267
 a | a**2+1
 --R   Your statement has resulted in the following assignments and 
 --R      declaration:
@@ -995,7 +995,7 @@ a | a**2+1
 --RType: SimpleAlgebraicExtension(Fraction Integer,UnivariatePolynomial(a,Fraction Integer),a*a+1)
 --E
 
---S 77
+--S 77 of 267
 t1:=(x+a)*(x+a+1)
 --R
 --R         2
@@ -1003,7 +1003,7 @@ t1:=(x+a)*(x+a+1)
 --RType: Polynomial SimpleAlgebraicExtension(Fraction Integer,UnivariatePolynomial(a,Fraction Integer),a*a+1)
 --E
 
---S 78
+--S 78 of 267
 factor t1
 --R
 --R   (3)  (x + a + 1)(x + a)
@@ -1026,13 +1026,13 @@ Do this in a virgin system
 
 )set expose add constructor SquareMatrix
 
---S 79
+--S 79 of 267
 S2:= SquareMatrix(2,FRAC POLY INT);
 --R
 --R                                                                 Type: Domain
 --E
 
---S 80
+--S 80 of 267
 V2: S2 := matrix([[v,-v],[-v,v]])
 --R
 --R        + v   - v+
@@ -1041,7 +1041,7 @@ V2: S2 := matrix([[v,-v],[-v,v]])
 --R                            Type: SquareMatrix(2,Fraction Polynomial Integer)
 --E
 
---S 81
+--S 81 of 267
 I2: S2 := 1
 --R
 --R        +1  0+
@@ -1050,14 +1050,14 @@ I2: S2 := 1
 --R                            Type: SquareMatrix(2,Fraction Polynomial Integer)
 --E
 
---S 82
+--S 82 of 267
 m:=5
 --R
 --R   (4)  5
 --R                                                        Type: PositiveInteger
 --E
 
---S 83
+--S 83 of 267
 l: List(S2) := append(cons(V2+h*I2,_
             [(V2+2*h*I2) for i in 2 .. (m-1)]),_
              [V2+h*I2])
@@ -1076,7 +1076,7 @@ l: List(S2) := append(cons(V2+h*I2,_
 @
 Does this give an error of deleteAssoc not defined ??
 <<*>>=
---S 84
+--S 84 of 267
 A: SquareMatrix(m, S2) := diagonalMatrix(l)
 --R
 --R        +matrix1  matrix2  matrix2  matrix2  matrix2+
@@ -1120,7 +1120,7 @@ Has an extra factor of 2.
 <<*>>=
 )clear all
 
---S 85
+--S 85 of 267
 squareFree((2*x*y+1)*(x*y+1)**2)
 --R
 --R                 2
@@ -1133,7 +1133,7 @@ bmt/10/19/92 division by zero error
 <<*>>=
 )clear all
 
---S 86
+--S 86 of 267
 limit(atan(1/sin(x)),x=0)
 --R
 --R                          %pi                 %pi
@@ -1149,7 +1149,7 @@ The left and right hand limits don't agree
 <<*>>=
 )clear all
 
---S 87
+--S 87 of 267
 limit(atan(-sin(x)/(cos(x)+e)),x=acos(-e))
 --R
 --R                          %pi                 %pi
@@ -1158,7 +1158,7 @@ limit(atan(-sin(x)/(cos(x)+e)),x=acos(-e))
 --RType: Union(Record(leftHandLimit: Union(OrderedCompletion Expression Integer,"failed"),rightHandLimit: Union(OrderedCompletion Expression Integer,"failed")),...)
 --E
 
---S 88
+--S 88 of 267
 limit(atan(1/(cos(x)+e)),x=acos(-e))
 --R
 --R                        %pi                   %pi
@@ -1172,19 +1172,19 @@ grabmeier/10/19/92 unable to compute the determinant of an 8x8
 <<*>>=
 )clear all
 
---S 89
+--S 89 of 267
 D := MATRIX FRAC(POLY INT)
 --R
 --R   (1)  Matrix Fraction Polynomial Integer
 --R                                                                 Type: Domain
 --E
 
---S 90
+--S 90 of 267
 d : (INT, Boolean) -> POLY INT
 --R                                                                   Type: Void
 --E
 
---S 91
+--S 91 of 267
 d(i,ss)  ==
   ex := i rem 4
   if ex < 0 then ex := ex+4
@@ -1203,7 +1203,7 @@ d(i,ss)  ==
 
 -- 1,d,dd,ddd,s,sd,sdd,sddd
 
---S 92
+--S 92 of 267
 mTV4 : D := new(8,8,0)
 --R
 --R        +0  0  0  0  0  0  0  0+
@@ -1224,7 +1224,7 @@ mTV4 : D := new(8,8,0)
 --R                                     Type: Matrix Fraction Polynomial Integer
 --E
 
---S 93
+--S 93 of 267
 for i in 1..8 repeat
   for j in 1..8 repeat
     mTV4(i,j) :=
@@ -1239,7 +1239,7 @@ for i in 1..8 repeat
 --R                                                                   Type: Void
 --E
 
---S 94
+--S 94 of 267
 mTV4
 --R
 --R        + 1     d     dd   ddd    s     sd   sdd   sddd+
@@ -1260,7 +1260,7 @@ mTV4
 --R                                     Type: Matrix Fraction Polynomial Integer
 --E
 
---S 95
+--S 95 of 267
 gdd4 := determinant mTV4
 --R
 --R   (7)
@@ -2097,7 +2097,7 @@ sutor/09/28/92 operator bug?
 <<*>>=
 )clear all
 
---S 96
+--S 96 of 267
 L n ==
   n = 0 => 1
   n = 1 => x
@@ -2106,14 +2106,14 @@ L n ==
 --R                                                                   Type: Void
 --E
 
---S 97
+--S 97 of 267
 dx:=operator("D")::OP(POLY FRAC INT)
 --R
 --R   (2)  D
 --R                                   Type: Operator Polynomial Fraction Integer
 --E
 
---S 98
+--S 98 of 267
 evaluate(dx,p+-> differentiate(p,'x))
 --R 
 --R   There are 4 exposed and 1 unexposed library operations named 
@@ -2134,12 +2134,12 @@ evaluate(dx,p+-> differentiate(p,'x))
 --R      or "$" to specify which version of the function you need.
 --E
 
---S 99
+--S 99 of 267
 E n == (1-x**2)*dx**2-2*x*dx+n*(n+1)
 --R                                                                   Type: Void
 --E
 
---S 100
+--S 100 of 267
 L 15
 --R   Compiling function L with type Integer -> Polynomial Fraction 
 --R      Integer 
@@ -2160,7 +2160,7 @@ L 15
 Used to fail on this line
 <<*>>=
 
---S 101
+--S 101 of 267
 E 15
 --R   Compiling function E with type PositiveInteger -> Operator 
 --R      Polynomial Fraction Integer 
@@ -2175,7 +2175,7 @@ bmt/10/12/92 EFSTRUC recursion problem
 <<*>>=
 )clear all
 
---S 102
+--S 102 of 267
 bug:=(1+x**(1/4))**(1/3)/(x**(1/2))
 --R
 --R         +--------+
@@ -2192,7 +2192,7 @@ Gives a value stack overflow
 
 Seems to go into infinite recursion in rischNormalize
 <<*>>=
---S 103
+--S 103 of 267
 integrate(bug,x)
 --R
 --R                              +--------+
@@ -2210,7 +2210,7 @@ Improper character in Roman numeral: G
 <<*>>=
 )clear all
 
---S 104
+--S 104 of 267
 g::ROMAN
 --R 
 --R 
@@ -2230,7 +2230,7 @@ factor is quick but sqrt runs forever
 <<*>>=
 )clear all
 
---S 105
+--S 105 of 267
 factor 1068303355883998767544567663620885466990173600
 --R
 --R         5 7 2 4  2  2  2
@@ -2238,7 +2238,7 @@ factor 1068303355883998767544567663620885466990173600
 --R                                                       Type: Factored Integer
 --E
 
---S 106
+--S 106 of 267
 sqrt 1068303355883998767544567663620885466990173600
 --R
 --R                  +-----------------------------+
@@ -2263,7 +2263,7 @@ themos/11/05/92 fortran output bug
 --     &**6*y*y+x**8)
 -- T7 is referenced before it is defined
 
---S 107
+--S 107 of 267
 a1:=sin(x)/(x**2+y**2)
 --R
 --R         sin(x)
@@ -2273,7 +2273,7 @@ a1:=sin(x)/(x**2+y**2)
 --R                                                     Type: Expression Integer
 --E
 
---S 108
+--S 108 of 267
 a2:=D(a1,[x,y])
 --R
 --R                           3     2
@@ -2284,7 +2284,7 @@ a2:=D(a1,[x,y])
 --R                                                     Type: Expression Integer
 --E
 
---S 109
+--S 109 of 267
 a2+D(a2,x)
 --R
 --R   (3)
@@ -2315,28 +2315,28 @@ working in POLY INT is o.k.
 <<*>>=
 )clear all
 
---S 110
+--S 110 of 267
 R := FRAC INT
 --R
 --R   (1)  Fraction Integer
 --R                                                                 Type: Domain
 --E
 
---S 111
+--S 111 of 267
 lpx : List POLY R := [x1+x2+x3, x1*x2+x1*x3+x2*x3,x1*x2*x3]
 --R
 --R   (2)  [x3 + x2 + x1,(x2 + x1)x3 + x1 x2,x1 x2 x3]
 --R                                       Type: List Polynomial Fraction Integer
 --E
 
---S 112
+--S 112 of 267
 lip := [lpx.1-e3, lpx.2-e2, lpx.3-e1]--R
 --R
 --R   (3)  [x3 + x2 + x1 - e3,(x2 + x1)x3 + x1 x2 - e2,x1 x2 x3 - e1]
 --R                                       Type: List Polynomial Fraction Integer
 --E
 
---S 113
+--S 113 of 267
 gbp := groebner lip
 --R
 --R   (4)
@@ -2347,7 +2347,7 @@ gbp := groebner lip
 --R                                       Type: List Polynomial Fraction Integer
 --E
 
---S 114
+--S 114 of 267
 normalForm(x1**2+x2**2+x3**2,gbp)
 --R
 --R          2
@@ -2355,21 +2355,21 @@ normalForm(x1**2+x2**2+x3**2,gbp)
 --R                                            Type: Polynomial Fraction Integer
 --E
 
---S 115
+--S 115 of 267
 dmp := DMP([x1,x2,x3,e1,e2,e3],INT)
 --R
 --R   (6)  DistributedMultivariatePolynomial([x1,x2,x3,e1,e2,e3],Integer)
 --R                                                                 Type: Domain
 --E
 
---S 116
+--S 116 of 267
 li : List dmp := [lpx.1-e1, lpx.2-e2, lpx.3-e3]
 --R
 --R   (7)  [x1 + x2 + x3 - e1,x1 x2 + x1 x3 + x2 x3 - e2,x1 x2 x3 - e3]
 --R    Type: List DistributedMultivariatePolynomial([x1,x2,x3,e1,e2,e3],Integer)
 --E
 
---S 117
+--S 117 of 267
 gb := groebner li
 --R
 --R   (8)
@@ -2380,7 +2380,7 @@ gb := groebner li
 --R    Type: List DistributedMultivariatePolynomial([x1,x2,x3,e1,e2,e3],Integer)
 --E
 
---S 118
+--S 118 of 267
 p:dmp:=(x1**2+x2**2+x3**2)
 --R
 --R          2     2     2
@@ -2388,7 +2388,7 @@ p:dmp:=(x1**2+x2**2+x3**2)
 --R         Type: DistributedMultivariatePolynomial([x1,x2,x3,e1,e2,e3],Integer)
 --E
 
---S 119
+--S 119 of 267
 normalForm(p,gb)
 --R
 --R           2
@@ -2396,7 +2396,7 @@ normalForm(p,gb)
 --RType: DistributedMultivariatePolynomial([x1,x2,x3,e1,e2,e3],Fraction Integer)
 --E
 
---S 120
+--S 120 of 267
 normalForm(x1**2+x2**2+x3**2,gb)
 --R
 --R            2                      2              2
@@ -2421,7 +2421,7 @@ For another example, perhaps due to the same essential difficulty try
 <<*>>=
 )clear all
 
---S 121
+--S 121 of 267
 integrate(normalize(sqrt(1+cos(x)),x),x)
 --R
 --R                +--------+
@@ -2451,7 +2451,7 @@ used to give error:
 <<*>>=
 )clear all
 
---S 122
+--S 122 of 267
 integrate(((-x-1)*log((x**2+x))**2+2*log(x))/(x+1),x)
 --R
 --R           x                 2      2
@@ -2475,21 +2475,21 @@ will become obsolete, so the suggested fix is to use tagged unions instead:
 <<*>>=
 )clear all
 
---S 123
+--S 123 of 267
 t1:=i::POLY INT
 --R
 --R   (1)  i
 --R                                                     Type: Polynomial Integer
 --E
 
---S 124
+--S 124 of 267
 t2:=t1::Union(s:Symbol, p:POLY INT)
 --R
 --R   (2)  i
 --R                                       Type: Union(p: Polynomial Integer,...)
 --E
 
---S 125
+--S 125 of 267
 list t2
 --R
 --R   (3)  [i]
@@ -2510,21 +2510,21 @@ bronstein/03/08/93 wrong particular solution
 <<*>>=
 )clear all
 
---S 126
+--S 126 of 267
 I:=operator 'I
 --R
 --R   (1)  I
 --R                                                          Type: BasicOperator
 --E
 
---S 127
+--S 127 of 267
 J:=operator 'J
 --R
 --R   (2)  J
 --R                                                          Type: BasicOperator
 --E
 
---S 128
+--S 128 of 267
 eq := mu * D(I x,x) = - (K + S) * I(x) + S*J(x)
 --R
 --R           ,
@@ -2533,7 +2533,7 @@ eq := mu * D(I x,x) = - (K + S) * I(x) + S*J(x)
 --R                                            Type: Equation Expression Integer
 --E
 
---S 129
+--S 129 of 267
 solve(eq,I,x)
 --R
 --R   (4)
@@ -2568,7 +2568,7 @@ no escape characters.
 <<*>>=
 )clear all
 
---S 130
+--S 130 of 267
 ofile: File String := open("/tmp/test","output")
 --R
 --R   (1)  "/tmp/test"
@@ -2579,14 +2579,14 @@ ofile: File String := open("/tmp/test","output")
 This writes ``\verb|\\\\test|'' but should write ``\verb|\\test|''
 <<*>>=
 
---S 131
+--S 131 of 267
 write!(ofile,"\\test"::String)
 --R
 --R   (2)  "\\test"
 --R                                                                 Type: String
 --E
 
---S 132
+--S 132 of 267
 close! ofile
 --R
 --R   (3)  "/tmp/test"
@@ -2603,7 +2603,7 @@ retract back from the algebraic extension.
 <<*>>=
 )clear all
 
---S 133
+--S 133 of 267
 pol:DMP([x,y,z],PF(2)):=x**2*y**2+x**2*y*z+x**2*z**2+x*y*z**2+y**3*z+y*z**3
 --R
 --R         2 2    2       2 2        2    3       3
@@ -2611,7 +2611,7 @@ pol:DMP([x,y,z],PF(2)):=x**2*y**2+x**2*y*z+x**2*z**2+x*y*z**2+y**3*z+y*z**3
 --R                Type: DistributedMultivariatePolynomial([x,y,z],PrimeField 2)
 --E
 
---S 134
+--S 134 of 267
 factor pol
 --R
 --R         2 2    2       2 2        2    3       3
@@ -2629,14 +2629,14 @@ SAEFACT.
 <<*>>=
 )clear all
 
---S 135
+--S 135 of 267
 up := UP('w,FRAC INT)
 --R
 --R   (1)  UnivariatePolynomial(w,Fraction Integer)
 --R                                                                 Type: Domain
 --E
 
---S 136
+--S 136 of 267
 p : up := w**4 + w**3 + w**2 + w + 1
 --R
 --R         4    3    2
@@ -2644,7 +2644,7 @@ p : up := w**4 + w**3 + w**2 + w + 1
 --R                               Type: UnivariatePolynomial(w,Fraction Integer)
 --E
 
---S 137
+--S 137 of 267
 sae := SAE(FRAC INT,up,p)
 --R
 --R   (3)
@@ -2653,7 +2653,7 @@ sae := SAE(FRAC INT,up,p)
 --R                                                                 Type: Domain
 --E
 
---S 138
+--S 138 of 267
 q : UP('x,sae) := x**5 - 1
 --R
 --R         5
@@ -2664,7 +2664,7 @@ q : UP('x,sae) := x**5 - 1
 @
 Used to report: x**5-1 
 <<*>>=
---S 139
+--S 139 of 267
 factor q 
 --R
 --R                            2       3       3    2
@@ -2672,7 +2672,7 @@ factor q
 --RType: Factored UnivariatePolynomial(x,SimpleAlgebraicExtension(Fraction Integer,UnivariatePolynomial(w,Fraction Integer),w**4+w**3+w*w+w+1))
 --E
 
---S 140
+--S 140 of 267
 saefact := SAEFACT(up,sae,UP('x,sae))
 --R
 --R   (6)
@@ -2683,7 +2683,7 @@ saefact := SAEFACT(up,sae,UP('x,sae))
 --R                                                                 Type: Domain
 --E
 
---S 141
+--S 141 of 267
 factor(q)$saefact
 --R
 --R                            2       3       3    2
@@ -2706,7 +2706,7 @@ Results in 10 and not A
 <<*>>=
 )clear all
 
---S 142
+--S 142 of 267
 10::RadixExpansion(16)
 --R
 --R   (1)  A
@@ -2720,14 +2720,14 @@ Used to return x, now returns 1
 <<*>>=
 )clear all
 
---S 143
+--S 143 of 267
 r:=rule 'x == 1
 --R
 --R   (1)  x == 1
 --R                        Type: RewriteRule(Integer,Integer,Expression Integer)
 --E
 
---S 144
+--S 144 of 267
 r x
 --R
 --R   (2)  1
@@ -2740,7 +2740,7 @@ ADK@scri.fsu.edu (tony kennedy)
 <<*>>=
 )clear all
 
---S 145
+--S 145 of 267
 t1:=factor(-12)
 --R
 --R           2
@@ -2748,7 +2748,7 @@ t1:=factor(-12)
 --R                                                       Type: Factored Integer
 --E
 
---S 146
+--S 146 of 267
 t1**2
 --R
 --R         4 2
@@ -2763,7 +2763,7 @@ Error: cannot retract nonconstant polynomial
 <<*>>=
 )clear all
 
---S 147
+--S 147 of 267
 complexNumeric(log(sqrt(-3)))
 --R
 --R   (1)  0.5493061443 340548457 + 1.5707963267 948966192 %i
@@ -2839,7 +2839,7 @@ As a side-effect, this fixes the problem with numeric
 <<*>>=
 )clear all
 
---S 148
+--S 148 of 267
 sqrt(-1::EXPR FLOAT)
 --R
 --R         +-----+
@@ -2847,7 +2847,7 @@ sqrt(-1::EXPR FLOAT)
 --R                                                       Type: Expression Float
 --E
 
---S 149
+--S 149 of 267
 sqrt(2::EXPR FLOAT)
 --R 
 --R
@@ -2855,14 +2855,14 @@ sqrt(2::EXPR FLOAT)
 --R                                                       Type: Expression Float
 --E
 
---S 150
+--S 150 of 267
 nthRoot(-2::EXPR FLOAT, 3)
 --R
 --R   (3)  - 1.2599210498 948731648
 --R                                                       Type: Expression Float
 --E
 
---S 151
+--S 151 of 267
 nthRoot(-2::EXPR FLOAT, 4)
 --R
 --R        4+-----+
@@ -2877,7 +2877,7 @@ Here is an updated efstruc.spad where ker2trigs now knows about abs.
 <<*>>=
 )clear all
 
---S 152
+--S 152 of 267
 real abs(4 + %i * 5)
 --R
 --R         +--+
@@ -2897,7 +2897,7 @@ denominator is one of  \{1,2,3,4,6\}.
 <<*>>=
 )clear all
 
---S 153
+--S 153 of 267
 exp(5/3*%i*%pi)
 --R
 --R             +-+
@@ -2913,14 +2913,14 @@ luczak@nag.com (Richard Luczak)
 <<*>>=
 )clear all
 
---S 154
+--S 154 of 267
 exp(log(-1))
 --R
 --R   (1)  - 1
 --R                                                     Type: Expression Integer
 --E
 
---S 155
+--S 155 of 267
 sum((-1)**k * (k+m),k=0..n)
 --R
 --R                          n
@@ -2937,7 +2937,7 @@ Simplifies (abs now checks quotients instead of just retraction to R).
 <<*>>=
 )clear all
 
---S 156
+--S 156 of 267
 abs((1/2)::EXPR(INT))
 --R
 --R        1
@@ -2951,7 +2951,7 @@ bronstei@inf.ethz.ch/10/4/93 (Manuel Bronstein)
 <<*>>=
 )clear all
 
---S 157
+--S 157 of 267
 integrate(1/(x**2 + %i*a),x)
 --R
 --R         +--+         +--+         +--+           +--+
@@ -2968,7 +2968,7 @@ bmt@spadserv.watson.ibm.com/9/28/93 (Barry Trager)
 <<*>>=
 )clear all
 
---S 158
+--S 158 of 267
 limit(1/2**n,n=%plusInfinity)
 --R
 --R   (1)  0
@@ -2987,7 +2987,7 @@ As a result, integrals involving sqrt(-2) etc... are now treated correctly
 <<*>>=
 )clear all
 
---S 159
+--S 159 of 267
 x := sqrt(-3) + sqrt 2 + sqrt(- exp a) + log(-a**2-1)
 --R
 --R         +-----+
@@ -2996,14 +2996,14 @@ x := sqrt(-3) + sqrt 2 + sqrt(- exp a) + log(-a**2-1)
 --R                                                     Type: Expression Integer
 --E
 
---S 160
+--S 160 of 267
 real? x
 --R
 --R   (2)  false
 --R                                                                Type: Boolean
 --E
 
---S 161
+--S 161 of 267
 real x
 --R
 --R             2         +-+
@@ -3011,7 +3011,7 @@ real x
 --R                                                     Type: Expression Integer
 --E
 
---S 162
+--S 162 of 267
 imag x
 --R
 --R         +---+
@@ -3039,7 +3039,7 @@ Here is a console showing what exactly happens:
 <<*>>=
 )clear all
 
---S 163
+--S 163 of 267
 haha := rule x*x == z
 --R
 --R         2
@@ -3047,28 +3047,28 @@ haha := rule x*x == z
 --R                        Type: RewriteRule(Integer,Integer,Expression Integer)
 --E
 
---S 164
+--S 164 of 267
 haha 4
 --R
 --R   (2)  z
 --R                                                     Type: Expression Integer
 --E
 
---S 165
+--S 165 of 267
 haha 3
 --R
 --R   (3)  3
 --R                                                     Type: Expression Integer
 --E
 
---S 166
+--S 166 of 267
 haha(4*z)
 --R
 --R   (4)  z
 --R                                                     Type: Expression Integer
 --E
 
---S 167
+--S 167 of 267
 haha(3*z)
 --R
 --R   (5)  3z
@@ -3079,7 +3079,7 @@ haha(3*z)
 To see the whole rewrite chain:
 <<*>>=
 
---S 168
+--S 168 of 267
 t1:=a*a + b*b + c**2 + d*d
 --R
 --R         2    2    2    2
@@ -3087,14 +3087,14 @@ t1:=a*a + b*b + c**2 + d*d
 --R                                                     Type: Polynomial Integer
 --E
 
---S 169
+--S 169 of 267
 t2:=applyRules([haha], t1, 1)$APPRULE(INT,INT,EXPR INT)
 --R
 --R   (7)  4z
 --R                                                     Type: Expression Integer
 --E
 
---S 170
+--S 170 of 267
 t3:=applyRules([haha], t2, 1)$APPRULE(INT,INT,EXPR INT)
 --R
 --R         2
@@ -3102,7 +3102,7 @@ t3:=applyRules([haha], t2, 1)$APPRULE(INT,INT,EXPR INT)
 --R                                                     Type: Expression Integer
 --E
 
---S 171
+--S 171 of 267
 t4:=applyRules([haha], t3, 1)$APPRULE(INT,INT,EXPR INT)
 --R
 --R   (9)  z
@@ -3120,22 +3120,22 @@ There's an odd discontinuity about the behaviour of the following function:
 <<*>>=
 )clear all
 
---S 172
+--S 172 of 267
 harm(1) == 1
 --R                                                                   Type: Void
 --E
 
---S 173
+--S 173 of 267
 harm(n) == harm(n-1) + 1/n
 --R                                                                   Type: Void
 --E
 
---S 174
+--S 174 of 267
 harm : Integer -> Fraction Integer
 --R                                                                   Type: Void
 --E
 
---S 175
+--S 175 of 267
 harm(1023)
 --R   Compiling function harm with type Integer -> Fraction Integer 
 --R   Compiling function harm as a recurrence relation.
@@ -3159,7 +3159,7 @@ harm(1023)
 --R                                                       Type: Fraction Integer
 --E
 
---S 176
+--S 176 of 267
 harm(1024)
 --R
 --R   (5)
@@ -3193,7 +3193,7 @@ The technical problem is that ``generalized'' power series may have
 <<*>>=
 )clear all
 
---S 177
+--S 177 of 267
 t1:=series(x**x,x=0)
 --R
 --R   (1)
@@ -3214,7 +3214,7 @@ In this case, as currently implemented, 'differentiate' returns incorrect
 answers:
 <<*>>=
 
---S 178
+--S 178 of 267
 differentiate t1
  
    >> Error detected within library code:
@@ -3255,7 +3255,7 @@ It certainly works for Laurent series:
 <<*>>=
 )clear all
 
---S 179
+--S 179 of 267
 t1:=laurent(cos(a+x)/x,x=0)
 --R
 --R   (1)
@@ -3269,7 +3269,7 @@ t1:=laurent(cos(a+x)/x,x=0)
 --R                        Type: UnivariateLaurentSeries(Expression Integer,x,0)
 --E
 
---S 180
+--S 180 of 267
 approximate(t1,3)
 --R
 --R           3                  4      2
@@ -3283,7 +3283,7 @@ approximate(t1,3)
 But, unfortunately, I never implemented it for Puiseux series:
 <<*>>=
 
---S 181
+--S 181 of 267
 t2:=puiseux(cos(a+x)/x,x=0)
 --R
 --R   (3)
@@ -3297,7 +3297,7 @@ t2:=puiseux(cos(a+x)/x,x=0)
 --R                        Type: UnivariatePuiseuxSeries(Expression Integer,x,0)
 --E
 
---S 182
+--S 182 of 267
 approximate(t2,3)
 --R
 --R           3                  4      2
@@ -3307,7 +3307,7 @@ approximate(t2,3)
 --R                                                     Type: Expression Integer
 --E
 
---S 183
+--S 183 of 267
 t3:=series(cos(x**(2/3) + a),x=0)
 --R
 --R   (5)
@@ -3319,7 +3319,7 @@ t3:=series(cos(x**(2/3) + a),x=0)
 --R                        Type: UnivariatePuiseuxSeries(Expression Integer,x,0)
 --E
 
---S 184
+--S 184 of 267
 approximate(t3,2)
 --R
 --R                 3+-+2            3+-+    2
@@ -3329,7 +3329,7 @@ approximate(t3,2)
 --R                                                     Type: Expression Integer
 --E
 
---S 185
+--S 185 of 267
 approximate(t1,7)
 --R
 --R   (7)
@@ -3356,7 +3356,7 @@ root is odd, or the argument is positive. Here's the new behaviour:
 <<*>>=
 )clear all
 
---S 186
+--S 186 of 267
 sqrt(-1::EXPR FLOAT)
 --R
 --R         +-----+
@@ -3364,21 +3364,21 @@ sqrt(-1::EXPR FLOAT)
 --R                                                       Type: Expression Float
 --E
 
---S 187
+--S 187 of 267
 sqrt(2::EXPR FLOAT)
 --R
 --R   (2)  1.4142135623 730950488
 --R                                                       Type: Expression Float
 --E
 
---S 188
+--S 188 of 267
 nthRoot(-2::EXPR FLOAT, 3)
 --R
 --R   (3)  - 1.2599210498 948731648
 --R                                                       Type: Expression Float
 --E
 
---S 189
+--S 189 of 267
 nthRoot(-2::EXPR FLOAT, 4)
 --R
 --R        4+-----+
@@ -3437,7 +3437,7 @@ is still fairly ugly.
 <<*>>=
 )clear all
 
---S 190
+--S 190 of 267
 integrate(1/(x*(log(x)**2+a**2-1)),x)
 --R
 --R   (1)
@@ -3462,7 +3462,7 @@ this now returns  2**(1/4) ** 2 + 2**(1/4)
 <<*>>=
 )clear all
 
---S 191
+--S 191 of 267
 normalize(2**(1/2) + 2**(1/4)) 
 --R
 --R        4+-+2   4+-+
@@ -3480,14 +3480,14 @@ Isn't this a bug?
 <<*>>=
 )clear all
 
---S 912
+--S 912 of 267
 integrate(%e**x,x=0..1)
 --R
 --R   (1)  %e - 1
 --R                    Type: Union(f1: OrderedCompletion Expression Integer,...)
 --E
 
---S 913
+--S 913 of 267
 integrate(log(x),x=1..2)
 --R
 --R   (2)  log(4) - 1
@@ -3502,7 +3502,7 @@ This will return 2**(5/6).
 <<*>>=
 )clear all
 
---S 194
+--S 194 of 267
 simplify(2**(1/3)*2**(1/2)) -- 
 --R
 --R        6+-+5
@@ -3515,7 +3515,7 @@ bronstei@inf.ethz.ch/8/4/93 (manuel bronstein)
 <<*>>=
 )clear all
 
---S 195
+--S 195 of 267
 integrate(1/sqrt(1+cos(x)), x)
 --R
 --R                  +-+       +----------+         2
@@ -3535,7 +3535,7 @@ This used to be division by 0 error
 <<*>>=
 )clear all
 
---S 196
+--S 196 of 267
 normalize atan(cos(x)/sin(x))
 --R
 --R        - 2x + %pi
@@ -3550,7 +3550,7 @@ bronstei@inf.ethz.ch/8/4/93 (manuel bronstein)
 <<*>>=
 )clear all
 
---S 197
+--S 197 of 267
 a := 2**(1/6)
 --R
 --R        6+-+
@@ -3558,7 +3558,7 @@ a := 2**(1/6)
 --R                                                        Type: AlgebraicNumber
 --E
 
---S 198
+--S 198 of 267
 [a**n for n in 2..13]
 --R
 --R         6+-+2 6+-+3 6+-+4 6+-+5    6+-+  6+-+2  6+-+3  6+-+4  6+-+5    6+-+
@@ -3572,7 +3572,7 @@ bronstei@inf.ethz.ch/8/4/93 (manuel bronstein)
 <<*>>=
 )clear all
 
---S 199
+--S 199 of 267
 int:=sqrt(a*(1-u**2)/(1+u**2))/u
 --R
 --R         +----------+
@@ -3586,7 +3586,7 @@ int:=sqrt(a*(1-u**2)/(1+u**2))/u
 --R                                                     Type: Expression Integer
 --E
 
---S 200
+--S 200 of 267
 integrate(eval(int,a=1),u) 
 --R
 --R                     +--------+                       +--------+
@@ -3606,7 +3606,7 @@ integrate(eval(int,a=1),u)
 @
 Runs forever?
 <<*>>=
---S 201
+--S 201 of 267
 integrate(eval(int,a=sqrt(-1)),u)
 --R
 --R   (3)
@@ -3653,7 +3653,7 @@ integrate(eval(int,a=sqrt(-1)),u)
 @
 Dies after a long time with an elt index error
 <<*>>=
---S 202
+--S 202 of 267
 integrate(eval(int,a=1)*(-1)**(1/4),u)
 --R
 --R   (4)
@@ -3696,7 +3696,7 @@ bronstei@inf.ethz.ch/8/4/93 (manuel bronstein)
 <<*>>=
 )clear all
 
---S 203
+--S 203 of 267
 t1:=sqrt((1-x**2)*(1-k**2*x**2))
 --R
 --R         +-----------------------+
@@ -3705,7 +3705,7 @@ t1:=sqrt((1-x**2)*(1-k**2*x**2))
 --R                                                     Type: Expression Integer
 --E
 
---S 204
+--S 204 of 267
 integrate(x/t1,x)
 --R
 --R                 +-----------------------+
@@ -3721,7 +3721,7 @@ bronstei@inf.ethz.ch/7/26/93 (manuel bronstein)
 <<*>>=
 )clear all
 
---S 205
+--S 205 of 267
 t1:=last zerosOf((2+y)**8-3,y)
 --R
 --R           +-------------+
@@ -3733,7 +3733,7 @@ t1:=last zerosOf((2+y)**8-3,y)
 --R                                                     Type: Expression Integer
 --E
 
---S 206
+--S 206 of 267
 k:=first kernels t1
 --R
 --R         +-------------+
@@ -3743,7 +3743,7 @@ k:=first kernels t1
 --R                                              Type: Kernel Expression Integer
 --E
 
---S 207
+--S 207 of 267
 eval(t1,k,t1)
 --R
 --R         +-------------+
@@ -3760,7 +3760,7 @@ nagttt@vax.ox.ac.uk/7/15/93 themos tsikas
 <<*>>=
 )clear all
 
---S 208
+--S 208 of 267
 f := (x - y) / (x + y)
 --R
 --R        - y + x
@@ -3769,7 +3769,7 @@ f := (x - y) / (x + y)
 --R                                            Type: Fraction Polynomial Integer
 --E
 
---S 209
+--S 209 of 267
 eval(f,x=1/x)
 --R
 --R        - x y + 1
@@ -3787,14 +3787,14 @@ I claim that these two should give the same result (they do in Reduce):
 <<*>>=
 )clear all
 
---S 210
+--S 210 of 267
 digits 200
 --R
 --R   (1)  20
 --R                                                        Type: PositiveInteger
 --E
 
---S 211
+--S 211 of 267
 a:=4*sin(2*%pi/9)*sin(5*%pi/9)/sqrt(3)
 --R
 --R             2%pi     5%pi
@@ -3806,7 +3806,7 @@ a:=4*sin(2*%pi/9)*sin(5*%pi/9)/sqrt(3)
 --R                                                     Type: Expression Integer
 --E
 
---S 212
+--S 212 of 267
 b:=1/(2*sin(%pi/9))
 --R
 --R            1
@@ -3817,7 +3817,7 @@ b:=1/(2*sin(%pi/9))
 --R                                                     Type: Expression Integer
 --E
 
---S 213
+--S 213 of 267
 a::EXPR FLOAT
 --R
 --R   (4)
@@ -3827,7 +3827,7 @@ a::EXPR FLOAT
 --R                                                       Type: Expression Float
 --E
 
---S 214
+--S 214 of 267
 b::EXPR FLOAT
 --R
 --R   (5)
@@ -3837,7 +3837,7 @@ b::EXPR FLOAT
 --R                                                       Type: Expression Float
 --E
 
---S 215
+--S 215 of 267
 digits 20
 --R
 --R   (6)  200
@@ -3848,7 +3848,7 @@ bmt@spadserv.watson.ibm.com/9/15/93 (Barry Trager)
 <<*>>=
 )clear all
 
---S 216
+--S 216 of 267
 limit(tanh(x),x=%plusInfinity)
 --R
 --R   (1)  1
@@ -3860,21 +3860,21 @@ bronstei@inf.ethz.ch/6/14/93 (manuel bronstein)
 <<*>>=
 )clear all
 
---S 217
+--S 217 of 267
 a := x::EXPR INT
 --R
 --R   (1)  x
 --R                                                     Type: Expression Integer
 --E
 
---S 218
+--S 218 of 267
 b := x::EXPR COMPLEX INT
 --R
 --R   (2)  x
 --R                                             Type: Expression Complex Integer
 --E
 
---S 219
+--S 219 of 267
 zeroOf(a**4+1,x)
 --R
 --R         +---+
@@ -3885,7 +3885,7 @@ zeroOf(a**4+1,x)
 --R                                                     Type: Expression Integer
 --E
 
---S 220
+--S 220 of 267
 zeroOf(b**4+1,x)
 --R
 --R        1 + %i
@@ -3902,7 +3902,7 @@ Now returns 0  (was crashing before)
 <<*>>=
 )clear all
 
---S 221
+--S 221 of 267
 normalize(0**a)
 --R
 --R   (1)  0
@@ -3916,14 +3916,14 @@ New export ``complexForm(f)'' which returns the rectangular complex form of f:
 <<*>>=
 )clear all
 
---S 222
+--S 222 of 267
 t1:=log(a+%i * b)
 --R
 --R   (1)  log(%i b + a)
 --R                                             Type: Expression Complex Integer
 --E
 
---S 223
+--S 223 of 267
 complexForm t1
 --R
 --R             2    2
@@ -3933,14 +3933,14 @@ complexForm t1
 --R                                             Type: Complex Expression Integer
 --E
 
---S 224
+--S 224 of 267
 t2:=complexIntegrate(1/(x-%i),x)
 --R
 --R   (3)  log(x - %i)
 --R                                             Type: Expression Complex Integer
 --E
 
---S 225
+--S 225 of 267
 complexForm t2
 --R
 --R             2
@@ -3957,28 +3957,28 @@ normalForm est faux pour les polynomes a coef dans un anneau:
 <<*>>=
 )clear all
 
---S 226
+--S 226 of 267
 D:=DMP([a,b],INT)
 --R
 --R   (1)  DistributedMultivariatePolynomial([a,b],Integer)
 --R                                                                 Type: Domain
 --E
 
---S 227
+--S 227 of 267
 l:List D:=[2*a-1,b-a]
 --R
 --R   (2)  [2a - 1,- a + b]
 --R                  Type: List DistributedMultivariatePolynomial([a,b],Integer)
 --E
 
---S 228
+--S 228 of 267
 g:=groebner l
 --R
 --R   (3)  [2a - 1,2b - 1]
 --R                  Type: List DistributedMultivariatePolynomial([a,b],Integer)
 --E
 
---S 229
+--S 229 of 267
 p:D:=a
 --R
 --R   (4)  a
@@ -3988,7 +3988,7 @@ p:D:=a
 @
 Was 1, au lieu de 1/2 !!
 <<*>>=
---S 230
+--S 230 of 267
 normalForm(p,g)
 --R
 --R        1
@@ -4002,7 +4002,7 @@ nagttt@vax.ox.ac.uk/6/9/93 themos tsikas
 <<*>>=
 )clear all
 
---S 231
+--S 231 of 267
 squareFreePart(50)
 --R
 --R   (1)  10
@@ -4015,21 +4015,21 @@ mcd@maths.bath.ac.uk/6/4/92 mike dewar
 <<*>>=
 )clear all
 
---S 232
+--S 232 of 267
 f:=complexIntegrate(1/((x-%i)*(x-2*%i)),x)
 --R
 --R   (1)  %i log(x - %i) - %i log(x - 2%i)
 --R                                             Type: Expression Complex Integer
 --E
 
---S 233
+--S 233 of 267
 g:=subst(f,x=1)
 --R
 --R   (2)  %i log(1 - %i) - %i log(1 - 2%i)
 --R                                             Type: Expression Complex Integer
 --E
 
---S 234
+--S 234 of 267
 imag g
 --R
 --R        - log(5) + log(2)
@@ -4043,7 +4043,7 @@ daly - not wrong but the order is obscure...
 <<*>>=
 )clear all
 
---S 235
+--S 235 of 267
 primes(1,10)
 --R
 --R   (1)  [2,7,5,3]
@@ -4055,7 +4055,7 @@ nagttt@vax.ox.ac.uk/1/11/93 themos tsikas
 <<*>>=
 )clear all
 
---S 236
+--S 236 of 267
 m:=matrix[[1,a,0],[b,0,a],[0,b,c]]
 --R
 --R        +1  a  0+
@@ -4071,7 +4071,7 @@ This ends in error:
 Internal system problem in function appInfix : fewer than 2 arguments to
 an infix function
 <<*>>=
---S 237
+--S 237 of 267
 ll:=radicalEigenvectors m
 --R
 --R   (2)
@@ -4897,7 +4897,7 @@ ll:=radicalEigenvectors m
 but this works
 <<*>>=
 
---S 238
+--S 238 of 267
 ll 1
 --R
 --R   (3)
@@ -5158,7 +5158,7 @@ ll 1
 --RType: Record(radval: Expression Integer,radmult: Integer,radvect: List Matrix Expression Integer)
 --E
 
---S 239
+--S 239 of 267
 ll 2
 --R
 --R   (4)
@@ -5438,7 +5438,7 @@ ll 2
 --RType: Record(radval: Expression Integer,radmult: Integer,radvect: List Matrix Expression Integer)
 --E
 
---S 240
+--S 240 of 267
 ll 3
 --R
 --R   (5)
@@ -5749,7 +5749,7 @@ It was gotten from Axiom by issuing the commands
 <<*>>=
 )clear all
 
---S 241
+--S 241 of 267
 qrimes : Stream Integer := generate(nextPrime,2**512-5000)
 --R
 --R   (1)
@@ -5807,28 +5807,28 @@ qrimes : Stream Integer := generate(nextPrime,2**512-5000)
 --R                                                         Type: Stream Integer
 --E
 
---S 242
+--S 242 of 267
 rrimes := [ 2**512-p for p in qrimes while p < 2**512 ]
 --R
 --R   (2)  [5000,4893,4653,4475,4005,3893,3669,3459,3143,2967,...]
 --R                                                         Type: Stream Integer
 --E
 
---S 243
+--S 243 of 267
 srimes := complete rrimes
 --R
 --R   (3)  [5000,4893,4653,4475,4005,3893,3669,3459,3143,2967,...]
 --R                                                         Type: Stream Integer
 --E
 
---S 244
+--S 244 of 267
 [srimes.i for i in [1..18]]
 --R
 --R   (4)  [[5000,4893,4653,4475,4005,3893,3669,3459,3143,2967,...]]
 --R                                                    Type: List Stream Integer
 --E
 
---S 245
+--S 245 of 267
 [srimes.i for i in [10..18]]
 --R
 --R   (5)  [[2967,2807,2529,1827,1695,975,875,629,569]]
@@ -5850,7 +5850,7 @@ I suspect that this is an example of the same thing - but it looks worse:
 <<*>>=
 )clear all
 
---S 246
+--S 246 of 267
 X := log(0.7*%i*x)
 --R
 --R   (1)  log(0.7 %i x)
@@ -5872,7 +5872,7 @@ bmt@posso.dm.unipi.it12/15/93 (barry trager)
 <<*>>=
 )clear all
 
---S 247
+--S 247 of 267
 log2() --> Float
 --R 
 --R
@@ -5880,7 +5880,7 @@ log2() --> Float
 --R                                                                  Type: Float
 --E
 
---S 248
+--S 248 of 267
 exp1() --> DoubleFLoat ???
 --R 
 --R
@@ -5920,35 +5920,35 @@ A little session :
 <<*>>=
 )clear all
 
---S 249
+--S 249 of 267
 L : List(String) := ["There is", "it seems", "a real bug", "here"]
 --R
 --R   (1)  ["There is","it seems","a real bug","here"]
 --R                                                            Type: List String
 --E
 
---S 250
+--S 250 of 267
 L1 := delete!(L, 1)
 --R
 --R   (2)  ["it seems","a real bug","here"]
 --R                                                            Type: List String
 --E
 
---S 251
+--S 251 of 267
 L
 --R
 --R   (3)  ["There is","it seems","a real bug","here"]
 --R                                                            Type: List String
 --E
 
---S 252
+--S 252 of 267
 L2 := delete!(L, 2)
 --R
 --R   (4)  ["There is","a real bug","here"]
 --R                                                            Type: List String
 --E
 
---S 253
+--S 253 of 267
 L
 --R
 --R   (5)  ["There is","a real bug","here"]
@@ -5980,35 +5980,35 @@ quitte@knuth.univ-poitiers.fr/1/13/94 Claude Quitte
 <<*>>=
 )clear all
 
---S 254
+--S 254 of 267
 K := Fraction(Integer)   
 --R
 --R   (1)  Fraction Integer
 --R                                                                 Type: Domain
 --E
 
---S 255
+--S 255 of 267
 PolK := UP('X, K) 
 --R
 --R   (2)  UnivariatePolynomial(X,Fraction Integer)
 --R                                                                 Type: Domain
 --E
 
---S 256
+--S 256 of 267
 X : PolK := monomial(1, 1) 
 --R
 --R   (3)  X
 --R                               Type: UnivariatePolynomial(X,Fraction Integer)
 --E
 
---S 257
+--S 257 of 267
 n : PositiveInteger := 15 
 --R
 --R   (4)  15
 --R                                                        Type: PositiveInteger
 --E
 
---S 258
+--S 258 of 267
 E := SimpleAlgebraicExtension(K, PolK, X**n + X**(n-3) -1) 
 --R
 --R   (5)
@@ -6017,14 +6017,14 @@ E := SimpleAlgebraicExtension(K, PolK, X**n + X**(n-3) -1)
 --R                                                                 Type: Domain
 --E
 
---S 259
+--S 259 of 267
 y : E := X::E
 --R
 --R   (6)  X
 --RType: SimpleAlgebraicExtension(Fraction Integer,UnivariatePolynomial(X,Fraction Integer),X**15+X**12-1)
 --E
 
---S 260
+--S 260 of 267
 minimalPolynomial(y)$E
 --R
 --R         15    12
@@ -6049,7 +6049,7 @@ I'm trying to define the following rule
 <<*>>=
 )clear all
 
---S 261
+--S 261 of 267
 tr := rule cos(x)**(n | integer? n and even? n)==(1-sin(x)**2)**(n/2)
 --R
 --R                                  n
@@ -6170,7 +6170,7 @@ barry@num-alg-grp.co.uk/02/24/94 Barry Trager
 <<*>>=
 )clear all
 
---S 262
+--S 262 of 267
 sqrt(2)*2.0 -- fails
 --R 
 --R
@@ -6178,7 +6178,7 @@ sqrt(2)*2.0 -- fails
 --R                                                       Type: Expression Float
 --E
 
---S 263
+--S 263 of 267
 sqrt(2)::EXPR INT * 2.0 -- works
 --R 
 --R
@@ -6196,7 +6196,7 @@ bronstei@inf.ethz.ch/02/28/94 Manuel Bronstein
 <<*>>=
 )clear all
 
---S 264
+--S 264 of 267
 f := exp(exp(x)*exp(1/exp(x))) / exp exp x
 --R
 --R                1
@@ -6229,7 +6229,7 @@ You can now do things like
 <<*>>=
 )clear all
 
---S 265
+--S 265 of 267
 [1,2,3] :: DirectProduct(3, Fraction Integer)
 --R
 --R   (1)  [1,2,3]
@@ -6246,7 +6246,7 @@ Used to give a lisp error
 <<*>>=
 )clear all
 
---S 266
+--S 266 of 267
 x**10+1::Polynomial PrimeField 2
 --R
 --R         10
@@ -6259,7 +6259,7 @@ themos@num-alg-grp.co.uk/03/11/94 Themos Tsikas
 <<*>>=
 )clear all
 
---S 267
+--S 267 of 267
 f(x)==x**2
 --R                                                                   Type: Void
 --E
diff --git a/src/input/gstbl.input.pamphlet b/src/input/gstbl.input.pamphlet
index 7ba8d7b..649834a 100644
--- a/src/input/gstbl.input.pamphlet
+++ b/src/input/gstbl.input.pamphlet
@@ -20,7 +20,7 @@
 )set message auto off
 )clear all
  
---S 1
+--S 1 of 1
 patrons: GeneralSparseTable(String, Integer, KeyedAccessFile(Integer), 0) := table() ;
 --R 
 --R 
diff --git a/src/input/mappkg1.input.pamphlet b/src/input/mappkg1.input.pamphlet
deleted file mode 100644
index 1218a4f..0000000
--- a/src/input/mappkg1.input.pamphlet
+++ /dev/null
@@ -1,261 +0,0 @@
-\documentclass{article}
-\usepackage{axiom}
-\begin{document}
-\title{\$SPAD/src/input mappkg1.input}
-\author{Timothy Daly}
-\maketitle
-\begin{abstract}
-\end{abstract}
-\eject
-\tableofcontents
-\eject
-\section{License}
-<<license>>=
---Copyright The Numerical Algorithms Group Limited 1991.
-@
-<<*>>=
-)set break resume
-)spool mappkg1.output
-)set message test on
-)set message auto off
-)clear all
---S 1 of 26
-power(q: FRAC INT, n: INT): FRAC INT == q**n
---R 
---R   Function declaration power : (Fraction Integer,Integer) -> Fraction 
---R      Integer has been added to workspace.
---R                                                                   Type: Void
---E 1
-
---S 2 of 26
-power(2,3)
---R 
---R   Compiling function power with type (Fraction Integer,Integer) -> 
---R      Fraction Integer 
---R
---R   (2)  8
---R                                                       Type: Fraction Integer
---E 2
-
---S 3 of 26
-rewop := twist power
---R 
---R
---R   (3)  theMap(MAPPKG3;twist;MM;5!0)
---R                       Type: ((Integer,Fraction Integer) -> Fraction Integer)
---E 3
-
---S 4 of 26
-rewop(3, 2)
---R 
---R
---R   (4)  8
---R                                                       Type: Fraction Integer
---E 4
-
---S 5 of 26
-square: FRAC INT -> FRAC INT
---R 
---R                                                                   Type: Void
---E 5
-
---S 6 of 26
-square:= curryRight(power, 2)
---R 
---R
---R   (6)  theMap(MAPPKG3;curryRight;MBM;1!0,0)
---R                                 Type: (Fraction Integer -> Fraction Integer)
---E 6
-
---S 7 of 26
-square 4
---R 
---R
---R   (7)  16
---R                                                       Type: Fraction Integer
---E 7
-
---S 8 of 26
-squirrel:= constantRight(square)$MAPPKG3(FRAC INT,FRAC INT,FRAC INT)
---R 
---R
---R   (8)  theMap(MAPPKG3;constantRight;MM;3!0)
---R              Type: ((Fraction Integer,Fraction Integer) -> Fraction Integer)
---E 8
-
---S 9 of 26
-squirrel(1/2, 1/3)
---R 
---R
---R        1
---R   (9)  -
---R        4
---R                                                       Type: Fraction Integer
---E 9
-
---S 10 of 26
-sixteen := curry(square, 4/1)
---R 
---R
---R   (10)  theMap(MAPPKG2;curry;MAM;2!0,0)
---R                                               Type: (() -> Fraction Integer)
---E 10
-
---S 11 of 26
-sixteen()
---R 
---R
---R   (11)  16
---R                                                       Type: Fraction Integer
---E 11
-
---S 12 of 26
-square2:=square*square
---R 
---R
---R   (12)  theMap(MAPPKG3;*;MMM;6!0,0)
---R                                 Type: (Fraction Integer -> Fraction Integer)
---E 12
-
---S 13 of 26
-square2  3
---R 
---R
---R   (13)  81
---R                                                       Type: Fraction Integer
---E 13
-
---S 14 of 26
-sc(x: FRAC INT): FRAC INT == x + 1
---R 
---R   Function declaration sc : Fraction Integer -> Fraction Integer has 
---R      been added to workspace.
---R                                                                   Type: Void
---E 14
-
---S 15 of 26
-incfns := [sc**i for i in 0..10]
---R 
---R   Compiling function sc with type Fraction Integer -> Fraction Integer
---R      
---R
---R   (15)
---R   [theMap(MAPPKG1;**;MNniM;6!0,0), theMap(MAPPKG1;**;MNniM;6!0,0),
---R    theMap(MAPPKG1;**;MNniM;6!0,0), theMap(MAPPKG1;**;MNniM;6!0,0),
---R    theMap(MAPPKG1;**;MNniM;6!0,0), theMap(MAPPKG1;**;MNniM;6!0,0),
---R    theMap(MAPPKG1;**;MNniM;6!0,0), theMap(MAPPKG1;**;MNniM;6!0,0),
---R    theMap(MAPPKG1;**;MNniM;6!0,0), theMap(MAPPKG1;**;MNniM;6!0,0),
---R    theMap(MAPPKG1;**;MNniM;6!0,0)]
---R                            Type: List (Fraction Integer -> Fraction Integer)
---E 15
-
---S 16 of 26
-[f 4 for f in incfns]
---R 
---R
---R   (16)  [4,5,6,7,8,9,10,11,12,13,14]
---R                                                  Type: List Fraction Integer
---E 16
-
---S 17 of 26
-times(n:NNI, i:INT):INT == n*i
---R 
---R   Function declaration times : (NonNegativeInteger,Integer) -> Integer
---R      has been added to workspace.
---R                                                                   Type: Void
---E 17
-
---S 18 of 26
-r := recur(times)
---R 
---R   Compiling function times with type (NonNegativeInteger,Integer) -> 
---R      Integer 
---R
---R   (18)  theMap(MAPPKG1;recur;2M;7!0,0)
---R                              Type: ((NonNegativeInteger,Integer) -> Integer)
---E 18
-
---S 19 of 26
-fact := curryRight(r, 1)
---R 
---R
---R   (19)  theMap(MAPPKG3;curryRight;MBM;1!0,0)
---R                                        Type: (NonNegativeInteger -> Integer)
---E 19
-
---S 20 of 26
-fact 4
---R 
---R
---R   (20)  24
---R                                                        Type: PositiveInteger
---E 20
-
---S 21 of 26
-mto2ton(m, n) ==
-  raiser := square**n
-  raiser m
---R 
---R                                                                   Type: Void
---E 21
-
---S 22 of 26
-mto2ton(3, 3)
---R 
---R   Compiling function mto2ton with type (PositiveInteger,
---R      PositiveInteger) -> Fraction Integer 
---R
---R   (22)  6561
---R                                                       Type: Fraction Integer
---E 22
-
---S 23 of 26
-shiftfib(r: List INT) : INT ==
-  t := r.1
-  r.1 := r.2
-  r.2 := r.2 + t
-  t
---R 
---R   Function declaration shiftfib : List Integer -> Integer has been 
---R      added to workspace.
---R                                                                   Type: Void
---E 23
-
---S 24 of 26
-fibinit: List INT := [0, 1]
---R 
---R
---R   (24)  [0,1]
---R                                                           Type: List Integer
---E 24
-
---S 25 of 26
-fibs := curry(shiftfib, fibinit)
---R 
---R   Compiling function shiftfib with type List Integer -> Integer 
---R
---R   (25)  theMap(MAPPKG2;curry;MAM;2!0,0)
---R                                                        Type: (() -> Integer)
---E 25
-
---S 26 of 26
-[fibs() for i in 0..30]
---R 
---R
---R   (26)
---R   [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597,
---R    2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418,
---R    317811, 514229, 832040]
---R                                                           Type: List Integer
---E 26
-)spool 
-)lisp (bye)
- 
-@
-\eject
-\begin{thebibliography}{99}
-\bibitem{1} nothing
-\end{thebibliography}
-\end{document}
-
- 
diff --git a/src/input/parabola.input.pamphlet b/src/input/parabola.input.pamphlet
index d8f0e86..91ab8f2 100644
--- a/src/input/parabola.input.pamphlet
+++ b/src/input/parabola.input.pamphlet
@@ -19,7 +19,7 @@
 )set message test on
 )set message auto off
 )clear all
---S 1
+--S 1 of 1
 draw(curve(t**2 + 2*t - 1,t**2 + t - 2),t = -4..3)
 --R 
 --R   Compiling function %B with type DoubleFloat -> DoubleFloat 
