axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] 20081206.01.tpd.patch (regression file fixed created)


From: daly
Subject: [Axiom-developer] 20081206.01.tpd.patch (regression file fixed created)
Date: Sun, 7 Dec 2008 07:04:24 -0600

This adds 267 new tests to the Axiom regression test suite.
======================================================================
diff --git a/changelog b/changelog
index beaca4a..02caa58 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,12 @@
+20081206 tpd src/axiom-website/patches.html 20081206.01.tpd.patch
+20081206 tpd src/input/Makefile add fixed.regress
+20081206 tpd src/input/fixed.input convert to a regression file
+20081206 tpd src/input/schaum17.input fix missing space typo
+20081205 tpd src/axiom-website/patches.html 20081205.02.tpd.patch
+20081205 txl src/input/schaum17.input fix 14.355, 14.356
+20081205 tpd src/interp/setq.lisp add Tim Lahey
+20081205 tpd readme add Tim Lahey
+20081205 txl Tim Lahey <address@hidden>
 20081205 tpd src/axiom-website/patches.html 20081205.01.tpd.patch
 20081205 tpd src/algebra/integer.spad fix r21bugsbig regression
 20081205 tpd src/input/r20bugs.input.pamphlet fix regression
diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html
index 1891268..2428e91 100644
--- a/src/axiom-website/patches.html
+++ b/src/axiom-website/patches.html
@@ -785,6 +785,8 @@ clean up input regression files<br/>
 bug 7161: integer.spad remove signature change<br/>
 <a href="patches/20081205.02.tpd.patch">20081205.02.tpd.patch</a>
 schaum17 fix 14.355, 14.356<br/>
+<a href="patches/20081206.01.tpd.patch">20081206.01.tpd.patch</a>
+regression file fixed created<br/>
 
  </body>
 </html>
\ No newline at end of file
diff --git a/src/input/Makefile.pamphlet b/src/input/Makefile.pamphlet
index 032ce85..2cf453c 100644
--- a/src/input/Makefile.pamphlet
+++ b/src/input/Makefile.pamphlet
@@ -305,7 +305,8 @@ REGRES= algaggr.regress algbrbf.regress  algfacob.regress 
alist.regress  \
     expexpan.regress  explim.regress   expr1.regress    exprode.regress \
     expr.regress      exseries.regress exsum.regress    exprpoly.regress \
     farray.regress    ffdemo.regress   fferr.regress    ffx72.regress \
-    fib.regress       file.regress     float1.regress   float2.regress \
+    fib.regress       file.regress     fixed.regress \
+    float1.regress    float2.regress \
     float.regress     fname1.regress   fname.regress    fnla.regress \
     fns.regress       fparfrac.regress fparfrc.regress  fr1.regress \
     fr2.regress       frac.regress     fr.regress       free.regress \
@@ -315,7 +316,7 @@ REGRES= algaggr.regress algbrbf.regress  algfacob.regress 
alist.regress  \
     herm.regress      heugcd.regress \
     hexadec.regress   ico.regress      ideal.regress \
     ifact.regress     ifthenelse.regress \
-    infprod.regress  intaf.regress    intbypart.regress \
+    infprod.regress   intaf.regress    intbypart.regress \
     intdeq.regress \
     intef2.regress    intef.regress    intg0.regress    intheory.regress \
     intmix2.regress   intmix.regress   int.regress      intrf.regress \
diff --git a/src/input/fixed.input.pamphlet b/src/input/fixed.input.pamphlet
index c221351..4a5a5c3 100644
--- a/src/input/fixed.input.pamphlet
+++ b/src/input/fixed.input.pamphlet
@@ -10,413 +10,1181 @@
 \tableofcontents
 \eject
 \section{License}
-<<license>>=
---Copyright The Numerical Algorithms Group Limited 1996.
-@
+Copyright The Numerical Algorithms Group Limited 1996.
+
+daly/10/06/92
 <<*>>=
-<<license>>
---fixed.input
+)spool fixed.output
+)set message test on
+)set message auto off
+)set break resume
+)set expose add constructor SquareMatrix
 
--------------------------------------------------------------------
--- daly/10/06/92
--------------------------------------------------------------------
+@
+Something is wrong with the integration of serices, when the
+coeffiennts are not constants. while the series is mathematically
+correct, this is not what one expects as the taylor series, which
+does not exist. 
+<<*>>=
 )clear all
--- something is wrong with the integration of serices, when the
--- coeffiennts are not constants. while the series is mathematically
--- correct, this is not what one expects as the taylor series, which
--- does not exist. 
-series(x/(x+log(x)))
--- here integrate is treating log(x) as a constant, which is incorrect.
-integrate(%)
 
--------------------------------------------------------------------
--- bmt/10/19/92 integrate problem -- serious, wrong answer
--------------------------------------------------------------------
+--S 1
+t1:=series(x/(x+log(x)))
+--R
+--R   (1)
+--R        1          1     2      1     3      1     4      1     5      1    
 6
+--R     ------ x - ------- x  + ------- x  - ------- x  + ------- x  - ------- 
x
+--R     log(x)           2            3            4            5            6
+--R                log(x)       log(x)       log(x)       log(x)       log(x)
+--R   + 
+--R      1     7      1     8      1     9       1     10       1     11      
12
+--R   ------- x  - ------- x  + ------- x  - -------- x   + -------- x   + O(x 
 )
+--R         7            8            9            10             11
+--R   log(x)       log(x)       log(x)       log(x)         log(x)
+--R                   Type: GeneralUnivariatePowerSeries(Expression 
Integer,x,0)
+--E
+
+@
+Here integrate is treating log(x) as a constant, which is incorrect.
+<<*>>=
+
+--S 2
+integrate(t1)
+--R 
+--R 
+--RDaly Bug
+--R   >> Error detected within library code:
+--R   "'integrate' unavailable on this domain;  use 'approximate' first"
+--R
+--R   Continuing to read the file...
+--R
+--E
+
+@
+bmt/10/19/92 integrate problem -- serious, wrong answer
+<<*>>=
 )clear all
-2*sin(t)*sqrt(1+cos(t))
---correct answer is 2*sin(t)/sqrt(1+cos(t))
-integrate(%,t)
 
--------------------------------------------------------------------
--- bmt/10/20/92 multiple complex in type tower
--------------------------------------------------------------------
+--S 3
+t1:=2*sin(t)*sqrt(1+cos(t))
+--R
+--R                +----------+
+--R   (1)  2sin(t)\|cos(t) + 1
+--R                                                     Type: Expression 
Integer
+--E
+
+@
+Correct answer is \[\frac{2\sin(t)}{\sqrt{1+\cos(t)}}\]
+<<*>>=
+
+--S 4
+integrate(t1,t)
+--R
+--R                        +----------+
+--R        (- 4cos(t) - 4)\|cos(t) + 1
+--R   (2)  ----------------------------
+--R                      3
+--R                                          Type: Union(Expression 
Integer,...)
+--E
+
+@
+bmt/10/20/92 multiple complex in type tower
+<<*>>=
 )clear all
+
+--S 5
 n:Complex ?
--- an invalid type. can't have 2 complex constructors in a tower
+--R                                                                   Type: 
Void
+--E
+
+@
+An invalid type. can't have 2 complex constructors in a tower
+<<*>>=
+
+--S 6
 n:=x/y+%i
+--R
+--R        x
+--R   (2)  - + %i
+--R        y
+--R                                    Type: Complex Fraction Polynomial 
Integer
+--E
+
+@
+grabm/09/28/92 coercion bug
 
--------------------------------------------------------------------------
--- grabm/09/28/92 coercion bug
--- comment: this coercion must carefully check whether there is a symbol
---          among the kernels which is equal to an indeterminate of the
---          polynomial ring, and not simply considering every expression
---          as a constant
--------------------------------------------------------------------------
+This coercion must carefully check whether there is a symbol
+among the kernels which is equal to an indeterminate of the
+polynomial ring, and not simply considering every expression
+as a constant
+<<*>>=
 )clear all
+
+--S 7
 f:=(a-b-c-d)**2::EXPR INT
-f::DMP(['a,'b],EXPR INT)
-degree %
-
--------------------------------------------------------------------
--- bmt/10/26/92 wrong answer
--- comment:I believe this problem simplifies to
--- lfintegrate(sqrt(u**3+u**2),u) which returns the
--- wrong answer due to some confusion in prootintegrate in INTPAF.
--- I think the confusion happens with the use of radPoly and rootPoly.
--- The answer is computed with respect to the result returned by rootPoly
--- but the kernel which is substituted for "y" corresponds to radPoly.
--------------------------------------------------------------------
-)clear all
--- should be 2*sin(t)/sqrt(1+cos(t))
+--R
+--R         2                      2                 2           2
+--R   (1)  d  + (2c + 2b - 2a)d + c  + (2b - 2a)c + b  - 2a b + a
+--R                                                     Type: Expression 
Integer
+--E
+
+--S 8
+t1:=f::DMP(['a,'b],EXPR INT)
+--R
+--R         2                          2                 2           2
+--R   (2)  a  - 2a b + (- 2d - 2c)a + b  + (2d + 2c)b + d  + 2c d + c
+--R            Type: DistributedMultivariatePolynomial([a,b],Expression 
Integer)
+--E
+
+--S 9
+degree t1
+--R
+--R   (3)  [2,0]
+--R                                    Type: 
DirectProduct(2,NonNegativeInteger)
+--E
+
+@
+bmt/10/26/92 wrong answer
+
+I believe this problem simplifies to
+{\tt lfintegrate(sqrt(u**3+u**2),u)} which returns the
+wrong answer due to some confusion in prootintegrate in {\tt INTPAF}.
+I think the confusion happens with the use of radPoly and rootPoly.
+The answer is computed with respect to the result returned by rootPoly
+but the kernel which is substituted for ``y'' corresponds to radPoly.
+
+The answer should be should be \[\frac{2*\sin(t)}{\sqrt{1+\cos(t)}}\]
+<<*>>=
+)clear all
+
+--S 10
 integrate(sqrt(1+cos(x)),x)
+--R
+--R                +----------+
+--R        2sin(x)\|cos(x) + 1
+--R   (1)  --------------------
+--R             cos(x) + 1
+--R                                          Type: Union(Expression 
Integer,...)
+--E
 
--------------------------------------------------------------------
--- bmt/09/28/92 bug in ITRIGMNP
--- gives:
---    Cannot convert kernel to gaussian function
--------------------------------------------------------------------
+@
+bmt/09/28/92 bug in ITRIGMNP
+
+gives: Cannot convert kernel to gaussian function
+<<*>>=
 )clear all
+
+--S 11
 integrate(exp(x**2),x)
+--R
+--R           x     2
+--I         ++    %K
+--I   (1)   |   %e   d%K
+--R        ++
+--R                                          Type: Union(Expression 
Integer,...)
+--E
 
--------------------------------------------------------------------
--- themos/11/06/92 integration bug
---comment:
---I suggest changing line 11 of limitedLogs in INTTR from:
---      rows := max(degree den, 1 + "max"/[degree(u.contrib) for u in l1])
---to:
---      rows := max(degree den,
---                  1 + reduce(max,[degree(u.contrib) for u in l1],0)$List(N))
---Does you agree, thus max/ empty list would return 0.
--------------------------------------------------------------------
+@
+themos/11/06/92 integration bug
+
+I suggest changing line 11 of limitedLogs in INTTR from:
+\begin{verbatim}
+  rows := max(degree den, 1 + "max"/[degree(u.contrib) for u in l1])
+\end{verbatim}
+to
+\begin{verbatim}
+  rows := max(degree den,
+           1 + reduce(max,[degree(u.contrib) for u in l1],0)$List(N))
+\end{verbatim}
+Do you agree, thus max/ empty list would return 0.
+<<*>>=
 )clear all
+
+--S 12
 f:=log(1-(b*x/(a+c*x**2)))/x
---               2
---            c x  - b x + a
---        log(--------------)
---                  2
---               c x  + a
---   (1)  -------------------
---                 x
-integrate(%,x)
---                   2
---                 %J c - %J b + a
---             log(---------------)
---           x          2
---         ++         %J c + a
---   (2)   |   -------------------- d%J
---        ++            %J
-expand f
---                 2               2
---        - log(c x  + a) + log(c x  - b x + a)
---   (3)  -------------------------------------
---                          x
-integrate(%,x)
---   >> Error detected within library code:
---   No identity element for reduce of empty list using operation
---   max
-
--------------------------------------------------------------------
--- bmt/11/17/92 interpreter resolve problem
--------------------------------------------------------------------
--- says cannot find an appropriate *
+--R
+--R               2
+--R            c x  - b x + a
+--R        log(--------------)
+--R                  2
+--R               c x  + a
+--R   (1)  -------------------
+--R                 x
+--R                                                     Type: Expression 
Integer
+--E
+
+--S 13
+integrate(f,x)
+--R
+--R                   2
+--I                 %K c - %K b + a
+--R             log(---------------)
+--R           x           2
+--I         ++          %K c + a
+--I   (2)   |   -------------------- d%K
+--I        ++            %K
+--R                                          Type: Union(Expression 
Integer,...)
+--E
+
+--S 14
+g:=expand f
+--R
+--R                 2               2
+--R        - log(c x  + a) + log(c x  - b x + a)
+--R   (3)  -------------------------------------
+--R                          x
+--R                                                     Type: Expression 
Integer
+--E
+
+--S 15
+integrate(g,x)
+--R
+--R           x         2               2
+--I         ++  - log(%K c + a) + log(%K c - %K b + a)
+--I   (4)   |   -------------------------------------- d%K
+--I        ++                     %K
+--R                                          Type: Union(Expression 
Integer,...)
+--E
+
+@
+bmt/11/17/92 interpreter resolve problem\\
+Says cannot find an appropriate *
+<<*>>=
 )clear all
+
+--S 16
 %i/m*sqrt(m) 
+--R
+--R           +-+
+--R        %i\|m
+--R   (1)  ------
+--R           m
+--R                                             Type: Expression Complex 
Integer
+--E
 
--------------------------------------------------------------------------
--- tpd/09/22/92 this generates extra brackets
--------------------------------------------------------------------------
+@
+tpd/09/22/92 this generates extra brackets
+<<*>>=
 )clear all
+
+--S 17
 foo n == matrix[[i for i in 1..n] for j in 1..n]
+--R                                                                   Type: 
Void
+--E
+
+--S 18
 foo
+--R
+--R   (2)  foo n == [[i for i in 1..n] for j in 1..n]
+--R                                                     Type: FunctionCalled 
foo
+--E
+
+)clear all
+
+msq := Matrix SquareMatrix(2,POLY INT)
 
--------------------------------------------------------------------------
---- tpd/09/24/92 matrix multiplication appears broken in the product.
--- fails with
---   >> System error:
---   The function |deleteAssoc| is undefined.
---   You are being returned to the top level of the interpreter.
--- comment: (barry)
--- This bug is due to the new autoloading scheme for the compiler, the
--- function deleteAssoc needs to be moved into the in core system.
--- As a work around, 
--- if you compile a non existent file, the apropriate files will be loaded,
--- e.g.:
--- )co foo
---  comment: this works in version 2
--------------------------------------------------------------------------
+@
+tpd/09/24/92 matrix multiplication appears broken in the product.\\
+fails with
+\begin{verbatim}
+   >> System error:
+   The function |deleteAssoc| is undefined.
+   You are being returned to the top level of the interpreter.
+\end{verbatim}
+comment: (barry)\\
+This bug is due to the new autoloading scheme for the compiler, the
+function deleteAssoc needs to be moved into the in core system.
+
+As a work around, 
+if you compile a non existent file, the apropriate files will be loaded,
+e.g.:
+\begin{verbatim}
+)co foo
+\end{verbatim}
+comment: this works in version 2
+<<*>>=
+)clear all
+
+--S 19
 msq := Matrix SquareMatrix(2,POLY INT)
+--R 
+--R
+--R   (1)  Matrix SquareMatrix(2,Polynomial Integer)
+--R                                                                 Type: 
Domain
+--E
+
+--S 20
 m : msq := zero(2,2)
+--R
+--R        ++0  0+  +0  0++
+--R        ||    |  |    ||
+--R        |+0  0+  +0  0+|
+--R   (2)  |              |
+--R        |+0  0+  +0  0+|
+--R        ||    |  |    ||
+--R        ++0  0+  +0  0++
+--R                              Type: Matrix SquareMatrix(2,Polynomial 
Integer)
+--E
+
+--S 21
 m(1,1) := matrix([[1,2],[a,b]])
+--R
+--R        +1  2+
+--R   (3)  |    |
+--R        +a  b+
+--R                                     Type: SquareMatrix(2,Polynomial 
Integer)
+--E
+
+--S 22
 m(1,2) := matrix([[a,b],[2,b]])
+--R
+--R        +a  b+
+--R   (4)  |    |
+--R        +2  b+
+--R                                     Type: SquareMatrix(2,Polynomial 
Integer)
+--E
+
+--S 23
 m(2,2) := matrix([[1,2],[2,b]])
+--R
+--R        +1  2+
+--R   (5)  |    |
+--R        +2  b+
+--R                                     Type: SquareMatrix(2,Polynomial 
Integer)
+--E
+
+--S 24
 m
+--R
+--R        ++1  2+  +a  b++
+--R        ||    |  |    ||
+--R        |+a  b+  +2  b+|
+--R   (6)  |              |
+--R        |+0  0+  +1  2+|
+--R        ||    |  |    ||
+--R        ++0  0+  +2  b++
+--R                              Type: Matrix SquareMatrix(2,Polynomial 
Integer)
+--E
+
+--S 25
 m*m
+--R
+--R        +                    +              2           ++
+--R        |+2a + 1   2b + 2 +  |2b + 2a + 4  b  + 3b + 2a ||
+--R        ||                |  |                          ||
+--R        ||          2     |  |      2        2          ||
+--R   (7)  |+a b + a  b  + 2a+  +4b + a  + 2  2b  + a b + 4+|
+--R        |                                                |
+--R        |      +0  0+              +  5     2b + 2+      |
+--R        |      |    |              |              |      |
+--R        |      +0  0+              |         2    |      |
+--R        +                          +2b + 2  b  + 4+      +
+--R                              Type: Matrix SquareMatrix(2,Polynomial 
Integer)
+--E
+
+--S 26
 m**2
+--R
+--R        +                    +              2           ++
+--R        |+2a + 1   2b + 2 +  |2b + 2a + 4  b  + 3b + 2a ||
+--R        ||                |  |                          ||
+--R        ||          2     |  |      2        2          ||
+--R   (8)  |+a b + a  b  + 2a+  +4b + a  + 2  2b  + a b + 4+|
+--R        |                                                |
+--R        |      +0  0+              +  5     2b + 2+      |
+--R        |      |    |              |              |      |
+--R        |      +0  0+              |         2    |      |
+--R        +                          +2b + 2  b  + 4+      +
+--R                              Type: Matrix SquareMatrix(2,Polynomial 
Integer)
+--E
+
+--S 27
 m**3
+--R
+--R        +matrix1  matrix2+
+--R   (9)  |                |
+--R        +matrix3  matrix4+
+--R
+--R
+--R
+--R                  +                        2              +
+--R                  |   2a b + 4a + 1      2b  + 2b + 4a + 2|
+--R   where matrix1= |                                       |
+--R                  |   2           2        3              |
+--R                  +a b  + a b + 2a  + a   b  + 4a b + 2a  +
+--R
+--R   and matrix2 =
+--R     +        2           2                    3     2                      
  +
+--R     |      2b  + 12b + 2a  + 7a + 8          b  + 5b  + (4a + 7)b + 4a + 8 
  |
+--R     |                                                                      
  |
+--R     |  2     2                2              3       2                  2  
  |
+--R     +6b  + (a  + 2a + 4)b + 2a  + 4a + 10  3b  + 2a b  + (3a + 12)b + 2a  
+ 4+
+--R
+--R                +0  0+
+--R   and matrix3= |    |
+--R                +0  0+
+--R
+--R                +                 2          +
+--R                |   4b + 9      2b  + 2b + 10|
+--R   and matrix4= |                            |
+--R                |  2              3          |
+--R                +2b  + 2b + 10   b  + 8b + 4 +
+--R                              Type: Matrix SquareMatrix(2,Polynomial 
Integer)
+--E
+
+--S 28
 (m*m)*m
+--R
+--R         +matrix1  matrix2+
+--R   (10)  |                |
+--R         +matrix3  matrix4+
+--R
+--R
+--R
+--R                  +                        2              +
+--R                  |   2a b + 4a + 1      2b  + 2b + 4a + 2|
+--R   where matrix1= |                                       |
+--R                  |   2           2        3              |
+--R                  +a b  + a b + 2a  + a   b  + 4a b + 2a  +
+--R
+--R   and matrix2 =
+--R     +        2           2                    3     2                      
  +
+--R     |      2b  + 12b + 2a  + 7a + 8          b  + 5b  + (4a + 7)b + 4a + 8 
  |
+--R     |                                                                      
  |
+--R     |  2     2                2              3       2                  2  
  |
+--R     +6b  + (a  + 2a + 4)b + 2a  + 4a + 10  3b  + 2a b  + (3a + 12)b + 2a  
+ 4+
+--R
+--R                +0  0+
+--R   and matrix3= |    |
+--R                +0  0+
+--R
+--R                +                 2          +
+--R                |   4b + 9      2b  + 2b + 10|
+--R   and matrix4= |                            |
+--R                |  2              3          |
+--R                +2b  + 2b + 10   b  + 8b + 4 +
+--R                              Type: Matrix SquareMatrix(2,Polynomial 
Integer)
+--E
+
+--S 29
 mm:=m*m
+--R
+--R         +                    +              2           ++
+--R         |+2a + 1   2b + 2 +  |2b + 2a + 4  b  + 3b + 2a ||
+--R         ||                |  |                          ||
+--R         ||          2     |  |      2        2          ||
+--R   (11)  |+a b + a  b  + 2a+  +4b + a  + 2  2b  + a b + 4+|
+--R         |                                                |
+--R         |      +0  0+              +  5     2b + 2+      |
+--R         |      |    |              |              |      |
+--R         |      +0  0+              |         2    |      |
+--R         +                          +2b + 2  b  + 4+      +
+--R                              Type: Matrix SquareMatrix(2,Polynomial 
Integer)
+--E
+
+--S 30
 mm*m
+--R
+--R         +matrix1  matrix2+
+--R   (12)  |                |
+--R         +matrix3  matrix4+
+--R
+--R
+--R
+--R                  +                        2              +
+--R                  |   2a b + 4a + 1      2b  + 2b + 4a + 2|
+--R   where matrix1= |                                       |
+--R                  |   2           2        3              |
+--R                  +a b  + a b + 2a  + a   b  + 4a b + 2a  +
+--R
+--R   and matrix2 =
+--R     +        2           2                    3     2                      
  +
+--R     |      2b  + 12b + 2a  + 7a + 8          b  + 5b  + (4a + 7)b + 4a + 8 
  |
+--R     |                                                                      
  |
+--R     |  2     2                2              3       2                  2  
  |
+--R     +6b  + (a  + 2a + 4)b + 2a  + 4a + 10  3b  + 2a b  + (3a + 12)b + 2a  
+ 4+
+--R
+--R                +0  0+
+--R   and matrix3= |    |
+--R                +0  0+
+--R
+--R                +                 2          +
+--R                |   4b + 9      2b  + 2b + 10|
+--R   and matrix4= |                            |
+--R                |  2              3          |
+--R                +2b  + 2b + 10   b  + 8b + 4 +
+--R                              Type: Matrix SquareMatrix(2,Polynomial 
Integer)
+--E
 
--------------------------------------------------------------------------
--- tpd/09/25/92 new equation.spad from johannes grabmeier
--------------------------------------------------------------------------
-
-
---Furthermore, we have function to put 0 or 1 on one side
---and factor the left hand side, after the right hand side
---is 0 and we have an IntegralDomain.
---Johannes
+@
+tpd/09/25/92 new equation.spad from johannes grabmeier
 
+Furthermore, we have function to put 0 or 1 on one side
+and factor the left hand side, after the right hand side
+is 0 and we have an IntegralDomain.\\
+Johannes
+<<*>>=
+)clear all
+--S 31
 eq1 := (-6*x**3+13*x**2+4)=(-x**4+12*x)
---
---
---            3      2         4
---   (1)  - 6x  + 13x  + 4= - x  + 12x
---                                            Type: Equation Polynomial Integer
---                                       Time: 1.61 (IN) + 1.47 (OT) = 3.08 sec
+--R
+--R            3      2         4
+--R   (1)  - 6x  + 13x  + 4= - x  + 12x
+--R                                            Type: Equation Polynomial 
Integer
+--E
+
+--S 32
 eq2 := x**4+13*x**2-12*x = 6*x**3-4
---
---
---         4      2          3
---   (2)  x  + 13x  - 12x= 6x  - 4
---                                            Type: Equation Polynomial Integer
---                                       Time: 0.16 (IN) + 0.11 (OT) = 0.27 sec
+--R
+--R         4      2          3
+--R   (2)  x  + 13x  - 12x= 6x  - 4
+--R                                            Type: Equation Polynomial 
Integer
+--E
+
+--S 33
 eq := eq1*y**2+eq2
---
---
---             3      2      2    4      2            4        2     3
---   (3)  (- 6x  + 13x  + 4)y  + x  + 13x  - 12x= (- x  + 12x)y  + 6x  - 4
---                                            Type: Equation Polynomial Integer
---               Time: 0.26 (IN) + 0.01 (EV) + 0.01 (OT) + 1.54 (GC) = 1.82 sec
-swap %
---
---
---            4        2     3           3      2      2    4      2
---   (4)  (- x  + 12x)y  + 6x  - 4= (- 6x  + 13x  + 4)y  + x  + 13x  - 12x
---                                            Type: Equation Polynomial Integer
---                                                   Time: 0.07 (OT) = 0.07 sec
-% + 4
---
---
---            4        2     3       3      2      2    4      2
---   (5)  (- x  + 12x)y  + 6x = (- 6x  + 13x  + 4)y  + x  + 13x  - 12x + 4
---                                            Type: Equation Polynomial Integer
---                                       Time: 0.69 (IN) + 0.01 (OT) = 0.70 sec
-%-6*x**3
---
---
---            4        2       3      2      2    4     3      2
---   (6)  (- x  + 12x)y = (- 6x  + 13x  + 4)y  + x  - 6x  + 13x  - 12x + 4
---                                            Type: Equation Polynomial Integer
---                                       Time: 0.19 (IN) + 0.01 (OT) = 0.20 sec
-leftZero %
---
---
---             4     3      2            2    4     3      2
---   (7)  0= (x  - 6x  + 13x  - 12x + 4)y  + x  - 6x  + 13x  - 12x + 4
---                                            Type: Equation Polynomial Integer
---                                       Time: 0.01 (IN) + 0.05 (OT) = 0.06 sec
-swap %
---
---
---          4     3      2            2    4     3      2
---   (8)  (x  - 6x  + 13x  - 12x + 4)y  + x  - 6x  + 13x  - 12x + 4= 0
---                                            Type: Equation Polynomial Integer
---                                                   Time: 0.01 (IN) = 0.01 sec
-factor lhs %
---
---
---               2       2  2
---   (9)  (x - 2) (x - 1) (y  + 1)
---                                            Type: Factored Polynomial Integer
---                           Time: 0.50 (IN) + 0.09 (EV) + 0.30 (OT) = 0.89 sec
-factorAndSplit eq
---
---
---                             2
---   (10)  [x - 2= 0,x - 1= 0,y  + 1= 0]
---                                       Type: List Equation Polynomial Integer
---                                       Time: 0.09 (EV) + 0.21 (OT) = 0.30 sec
-inv (eq :: EQ FRAC POLY INT)
---
---
---                            1                                1
---   (11)  - ------------------------------------= - ----------------------
---              3      2      2    4      2            4        2     3
---           (6x  - 13x  - 4)y  - x  - 13x  + 12x    (x  - 12x)y  - 6x  + 4
---                                   Type: Equation Fraction Polynomial Integer
---                                                   Time: 0.03 (IN) = 0.03 sec
-- %
---
---
---                          1                              1
---   (12)  ------------------------------------= ----------------------
---            3      2      2    4      2          4        2     3
---         (6x  - 13x  - 4)y  - x  - 13x  + 12x  (x  - 12x)y  - 6x  + 4
---                                   Type: Equation Fraction Polynomial Integer
---                                       Time: 0.01 (IN) + 0.01 (OT) = 0.02 sec
-
-
--------------------------------------------------------------------
--- bmt/09/29/92 coercion bug
--- fails with:
--- failed cannot be coerced to mode 
--- (Record (: coef1 (Integer)) (: coef2 (Integer)))
--- fixed on 09/29/92
--------------------------------------------------------------------
-)clear all
-(p,q):UP(x,INT)
-p:=3*x**4+11*x**2-4
-q:=9*x**4+9*x**2-4
+--R
+--R             3      2      2    4      2            4        2     3
+--R   (3)  (- 6x  + 13x  + 4)y  + x  + 13x  - 12x= (- x  + 12x)y  + 6x  - 4
+--R                                            Type: Equation Polynomial 
Integer
+--E
+
+--S 34
+t1:=swap eq
+--R
+--R            4        2     3           3      2      2    4      2
+--R   (4)  (- x  + 12x)y  + 6x  - 4= (- 6x  + 13x  + 4)y  + x  + 13x  - 12x
+--R                                            Type: Equation Polynomial 
Integer
+--E
+
+--S 35
+t2:=t1 + 4
+--R
+--R            4        2     3       3      2      2    4      2
+--R   (5)  (- x  + 12x)y  + 6x = (- 6x  + 13x  + 4)y  + x  + 13x  - 12x + 4
+--R                                            Type: Equation Polynomial 
Integer
+--E
+
+--S 36
+t3:=t2-6*x**3
+--R
+--R            4        2       3      2      2    4     3      2
+--R   (6)  (- x  + 12x)y = (- 6x  + 13x  + 4)y  + x  - 6x  + 13x  - 12x + 4
+--R                                            Type: Equation Polynomial 
Integer
+--E
+
+--S 37
+t4:=leftZero t3
+--R
+--R             4     3      2            2    4     3      2
+--R   (7)  0= (x  - 6x  + 13x  - 12x + 4)y  + x  - 6x  + 13x  - 12x + 4
+--R                                            Type: Equation Polynomial 
Integer
+--E
+
+--S 38
+t5:=swap t4
+--R
+--R          4     3      2            2    4     3      2
+--R   (8)  (x  - 6x  + 13x  - 12x + 4)y  + x  - 6x  + 13x  - 12x + 4= 0
+--R                                            Type: Equation Polynomial 
Integer
+--E
+
+--S 39
+t6:=factor lhs t5
+--R
+--R               2       2  2
+--R   (9)  (x - 2) (x - 1) (y  + 1)
+--R                                            Type: Factored Polynomial 
Integer
+--E
+
+--S 40
+t7:=factorAndSplit eq
+--R
+--R                             2
+--R   (10)  [x - 2= 0,x - 1= 0,y  + 1= 0]
+--R                                       Type: List Equation Polynomial 
Integer
+--E
+
+--S 41
+t8:=inv (eq :: EQ FRAC POLY INT)
+--R
+--R                             1                                1
+--R   (11)  - ------------------------------------= - ----------------------
+--R              3      2      2    4      2            4        2     3
+--R           (6x  - 13x  - 4)y  - x  - 13x  + 12x    (x  - 12x)y  - 6x  + 4
+--R                                   Type: Equation Fraction Polynomial 
Integer
+--E
+
+--S 42
+- t8
+--R
+--R                           1                              1
+--R   (12)  ------------------------------------= ----------------------
+--R            3      2      2    4      2          4        2     3
+--R         (6x  - 13x  - 4)y  - x  - 13x  + 12x  (x  - 12x)y  - 6x  + 4
+--R                                   Type: Equation Fraction Polynomial 
Integer
+--E
+
+@
+bmt/09/29/92 coercion bug\\
+fails with:
+\begin{verbatim}
+ failed cannot be coerced to mode 
+ (Record (: coef1 (Integer)) (: coef2 (Integer)))
+\end{verbatim}
+fixed on 09/29/92
+
+Another subtle bug exists as of Nov 2008 release.
+The expression
+\begin{verbatim}
+  (p,q):UP(x,INT)
+\end{verbatim}
+generates the error
+\begin{verbatim} 
+Daly Bug
+   Category, domain or package constructor : is not available.
+\end{verbatim}
+works fine at the top of this file but not here. Which means that
+some property is not being cleared properly. The symbol ``p'' does get
+properly declared despite the error message. --Tim
+<<*>>=
+)clear all
+
+--S 43
+(p1,p2):UP(x,INT)
+--R                                                                   Type: 
Void
+--E
+
+--S 44
+p1:=3*x**4+11*x**2-4
+--R
+--R          4      2
+--R   (2)  3x  + 11x  - 4
+--R                                        Type: 
UnivariatePolynomial(x,Integer)
+--E
+
+--S 45
+p2:=9*x**4+9*x**2-4
+--R
+--R          4     2
+--R   (3)  9x  + 9x  - 4
+--R                                        Type: 
UnivariatePolynomial(x,Integer)
+--E
+
+--S 46
 myNextPrime: (INT,NNI) -> INT
+--R                                                                   Type: 
Void
+--E
+
+--S 47
 myNextPrime(x,n)==nextPrime(x)$PRIMES(INT)
---  runs forever due to algebra bug in handling leading coefficients
-modularGcd([p,q])$InnerModularGcd(INT,UP(x,INT),67108859,myNextPrime)
+--R                                                                   Type: 
Void
+--E
 
--------------------------------------------------------------------
--- dewar/10/02/92
--- actually, this was never wrong
--------------------------------------------------------------------
+@
+Runs forever due to algebra bug in handling leading coefficients
+<<*>>=
+--S 48
+modularGcd([p1,p2])$InnerModularGcd(INT,UP(x,INT),67108859,myNextPrime)
+--R   Compiling function myNextPrime with type (Integer,NonNegativeInteger
+--R      ) -> Integer 
+--R
+--R          2
+--R   (6)  3x  - 1
+--R                                        Type: 
UnivariatePolynomial(x,Integer)
+--E
+
+@
+dewar/10/02/92 actually, this was never wrong
+<<*>>=
+)clear all
+
+--S 49
 numeric(%e ** %pi)
---gives
-   (61)
---  23.1406926327 7926900563 5493084578 4861294789 0532254433 2912200665 
--- 6744971913 2534837468 7163222983 2730035
+--R
+--R   (1)  23.1406926327 79269006
+--R                                                                  Type: 
Float
+--E
 
--------------------------------------------------------------------
--- themos/10/07/92
--------------------------------------------------------------------
+@
+themos/10/07/92
+<<*>>=
 )clear all
+
+--S 50
 y:=operator 'y
+--R
+--R   (1)  y
+--R                                                          Type: 
BasicOperator
+--E
+
+--S 51
 deqx:=differentiate(y(x),x,2)+differentiate(y(x),x)+y(x)
+--R
+--R         ,,       ,
+--R   (2)  y  (x) + y (x) + y(x)
+--R
+--R                                                     Type: Expression 
Integer
+--E
+
+--S 52
 solve(deqx,y,x)
+--R
+--R                                             x     x
+--R                                     +-+   - -   - -      +-+
+--R                                   x\|3      2     2    x\|3
+--R   (3)  [particular= 0,basis= [cos(-----)%e   ,%e   sin(-----)]]
+--R                                     2                    2
+--RType: Union(Record(particular: Expression Integer,basis: List Expression 
Integer),...)
+--E
+
+--S 53
 solve(deqx,y,x=0,[1])
+--R
+--R                      x
+--R              +-+   - -
+--R            x\|3      2
+--R   (4)  cos(-----)%e
+--R              2
+--R                                          Type: Union(Expression 
Integer,...)
+--E
+
+--S 54
 deqt:=differentiate(y(t),t,2)+differentiate(y(t),t)+y(t)
+--R
+--R         ,,       ,
+--R   (5)  y  (t) + y (t) + y(t)
+--R
+--R                                                     Type: Expression 
Integer
+--E
+
+--S 55
 solve(deqt,y,t)
+--R
+--R                                             t     t
+--R                                     +-+   - -   - -      +-+
+--R                                   t\|3      2     2    t\|3
+--R   (6)  [particular= 0,basis= [cos(-----)%e   ,%e   sin(-----)]]
+--R                                     2                    2
+--RType: Union(Record(particular: Expression Integer,basis: List Expression 
Integer),...)
+--E
+
+--S 56
 solve(deqt,y,t=0,[1]) -- bug
+--R
+--R                      t
+--R              +-+   - -
+--R            t\|3      2
+--R   (7)  cos(-----)%e
+--R              2
+--R                                          Type: Union(Expression 
Integer,...)
+--E
+
+--S 57
 deqz:=differentiate(y(z),z,2)+differentiate(y(z),z)+y(z)
+--R
+--R         ,,       ,
+--R   (8)  y  (z) + y (z) + y(z)
+--R
+--R                                                     Type: Expression 
Integer
+--E
+
+--S 58
 solve(deqz,y,z)
+--R
+--R                                             z     z
+--R                                     +-+   - -   - -      +-+
+--R                                   z\|3      2     2    z\|3
+--R   (9)  [particular= 0,basis= [cos(-----)%e   ,%e   sin(-----)]]
+--R                                     2                    2
+--RType: Union(Record(particular: Expression Integer,basis: List Expression 
Integer),...)
+--E
+
+--S 59
 solve(deqz,y,z=0,[1]) --bug
+--R
+--R                       z
+--R               +-+   - -
+--R             z\|3      2
+--R   (10)  cos(-----)%e
+--R               2
+--R                                          Type: Union(Expression 
Integer,...)
+--E
 
--------------------------------------------------------------------
--- themos/10/07/92 equation
--------------------------------------------------------------------
+@
+themos/10/07/92 equation
+<<*>>=
 )clear all
+
+--S 60
 y:=operator 'y
-deq:=D(y(x),x)+x**2=(y x)/x-(y x)**2
+--R
+--R   (1)  y
+--R                                                          Type: 
BasicOperator
+--E
 
+--S 61
+deq:=D(y(x),x)+x**2=(y x)/x-(y x)**2
+--R
+--R                            2
+--R         ,       2  - x y(x)  + y(x)
+--R   (2)  y (x) + x = ----------------
+--R                            x
+--R                                            Type: Equation Expression 
Integer
+--E
 
--------------------------------------------------------------------
--- bmt/10/08/92 laplace
--------------------------------------------------------------------
+@
+bmt/10/08/92 laplace
+<<*>>=
 )clear all
+
+--S 62
 laplace(exp(-x**3)*x**7,x,s) 
+--R
+--R                       3
+--R                 7  - x
+--R   (1)  laplace(x %e    ,x,s)
+--R                                                     Type: Expression 
Integer
+--E
+
+@
+bmt/09/30/92 nonlinear ODE 
 
--------------------------------------------------------------------
--- bmt/09/30/92 nonlinear ODE 
--------------------------------------------------------------------
--- Any hope of solving the following which appeared in Barry
--- Simon's computer algebra test suite:
--- (Apparently it has Bernoulli form)
+Any hope of solving the following which appeared in Barry
+Simon's computer algebra test suite:
+(Apparently it has Bernoulli form)
+<<*>>=
+)clear all
+
+--S 63
 y:=operator 'y
+--R
+--R   (1)  y
+--R                                                          Type: 
BasicOperator
+--E
+
+--S 64
 x**2 * D(y x, x) + 2*x*(y x) - (y x)**3 = 0
+--R
+--R         2 ,          3
+--R   (2)  x y (x) - y(x)  + 2x y(x)= 0
+--R
+--R                                            Type: Equation Expression 
Integer
+--E
+
+--S 65
 solve(%,y,x)
+--R
+--R             5         2
+--R        (- 3x  - 2)y(x)  + 5x
+--R   (3)  ---------------------
+--R                 5    2
+--R               5x y(x)
+--R                                          Type: Union(Expression 
Integer,...)
+--E
 
+@
+sit/10/08/92 factor bug
+<<*>>=
+)clear all
 
--------------------------------------------------------------------
--- sit/10/08/92 factor bug
--------------------------------------------------------------------
+--S 66
 p:POLY FRAC INT := 3*(x+1)
--- is wrong (missing factor of 3).
+--R
+--R   (1)  3x + 3
+--R                                            Type: Polynomial Fraction 
Integer
+--E
+
+@
+Is wrong (missing factor of 3).
+<<*>>=
+
+--S 67
 factor(p)**2 
+--R
+--R                2
+--R   (2)  9(x + 1)
+--R                                   Type: Factored Polynomial Fraction 
Integer
+--E
+
+@
+henderson/10/08/92 
+
+TextFile cliams that the operator readLineIfCan! returns ``failed'' when
+the end of the file is reached.  In fact, I get a system error, which is
+not very useful:
+\begin{verbatim}
+(16) ->readLineIfCan!(fp)
+   >> System error:
+   Unexpected end of #<input stream "/home/mcd/work/work">.
+   You are being returned to the top level of the interpreter.
+\end{verbatim}
+
+<<*>>=
+)clear all
 
--------------------------------------------------------------------
--- henderson/10/08/92 
--------------------------------------------------------------------
-)clear all
---TextFile cliams that the operator readLineIfCan! returns "failed" when
---the end of the file is reached.  In fact, I get a system error, which is
---not very useful:
---(16) ->readLineIfCan!(fp)
---   >> System error:
---   Unexpected end of #<input stream "/home/mcd/work/work">.
---   You are being returned to the top level of the interpreter.
+--S 68
 fout:TextFile:=open("/tmp/foo","output")
+--R
+--R   (1)  "/tmp/foo"
+--R                                                               Type: 
TextFile
+--E
+
+--S 69
 write!(fout,"foo")
+--R
+--R   (2)  "foo"
+--R                                                                 Type: 
String
+--E
+
+--S 70
 close!(fout)
+--R
+--R   (3)  "/tmp/foo"
+--R                                                               Type: 
TextFile
+--E
+
+--S 71
 fin:TextFile:=open("/tmp/foo","input")
+--R
+--R   (4)  "/tmp/foo"
+--R                                                               Type: 
TextFile
+--E
+
+--S 72
 readLineIfCan!(fin)
+--R
+--R   (5)  "foo"
+--R                                                      Type: 
Union(String,...)
+--E
+
+--S 73
 readLineIfCan!(fin)
+--R
+--R   (6)  "failed"
+--R                                                    Type: 
Union("failed",...)
+--E
+
+--S 74
 close!(fin)
+--R
+--R   (7)  "/tmp/foo"
+--R                                                               Type: 
TextFile
+--E
+
+--S 75
 )lis (system "rm /tmp/foo")
+--R 
+--RValue = 0
+--E
 
--------------------------------------------------------------------
--- bmt/10/08/92 factoring over SAEs
--------------------------------------------------------------------
+@
+bmt/10/08/92 factoring over SAEs
+<<*>>=
 )clear all
+
+--S 76
 a | a**2+1
-(x+a)*(x+a+1)
-factor %
+--R   Your statement has resulted in the following assignments and 
+--R      declaration:
+--R
+--R   SAEa := SimpleAlgebraicExtension(Fraction 
Integer,UnivariatePolynomial(a,Fraction Integer),a*a+1)
+--R   a : SAEa := a
+--R
+--R   (1)  a
+--RType: SimpleAlgebraicExtension(Fraction 
Integer,UnivariatePolynomial(a,Fraction Integer),a*a+1)
+--E
+
+--S 77
+t1:=(x+a)*(x+a+1)
+--R
+--R         2
+--R   (2)  x  + (2a + 1)x + a - 1
+--RType: Polynomial SimpleAlgebraicExtension(Fraction 
Integer,UnivariatePolynomial(a,Fraction Integer),a*a+1)
+--E
+
+--S 78
+factor t1
+--R
+--R   (3)  (x + a + 1)(x + a)
+--RType: Factored Polynomial SimpleAlgebraicExtension(Fraction 
Integer,UnivariatePolynomial(a,Fraction Integer),a*a+1)
+--E
 
--------------------------------------------------------------------
--- miller/10/09/92 local vars in types
--------------------------------------------------------------------
-)clear all
---Fixed (Victor's) bug with using local variables in type expressions
---assigned to local variables.  It now gives a message and correctly uses
---interpret-only mode.
---The function changed was getAndEvalConstructorArgument from i-spec1.boot.
+@
+miller/10/09/92 local vars in types
+
+Fixed (Victor's) bug with using local variables in type expressions
+assigned to local variables.  It now gives a message and correctly uses
+interpret-only mode.
+The function changed was getAndEvalConstructorArgument from i-spec1.boot.
+
+themos/10/19/92
 
--------------------------------------------------------------------
--- themos/10/19/92
--------------------------------------------------------------------
+Do this in a virgin system
+<<*>>=
 )clear all
--- Do this in a virgin system
+
 )set expose add constructor SquareMatrix
+
+--S 79
 S2:= SquareMatrix(2,FRAC POLY INT);
-V2: S2 := matrix([[v,-v],[-v,v]]);
-I2: S2 := 1;
-m:=5;
+--R
+--R                                                                 Type: 
Domain
+--E
+
+--S 80
+V2: S2 := matrix([[v,-v],[-v,v]])
+--R
+--R        + v   - v+
+--R   (2)  |        |
+--R        +- v   v +
+--R                            Type: SquareMatrix(2,Fraction Polynomial 
Integer)
+--E
+
+--S 81
+I2: S2 := 1
+--R
+--R        +1  0+
+--R   (3)  |    |
+--R        +0  1+
+--R                            Type: SquareMatrix(2,Fraction Polynomial 
Integer)
+--E
+
+--S 82
+m:=5
+--R
+--R   (4)  5
+--R                                                        Type: 
PositiveInteger
+--E
+
+--S 83
 l: List(S2) := append(cons(V2+h*I2,_
             [(V2+2*h*I2) for i in 2 .. (m-1)]),_
              [V2+h*I2])
+--R 
+--R
+--R   (5)
+--R    +v + h   - v +  +v + 2h   - v  +  +v + 2h   - v  +  +v + 2h   - v  +
+--R   [|            |, |              |, |              |, |              |,
+--R    + - v   v + h+  + - v    v + 2h+  + - v    v + 2h+  + - v    v + 2h+
+--R    +v + h   - v +
+--R    |            |]
+--R    + - v   v + h+
+--R                       Type: List SquareMatrix(2,Fraction Polynomial 
Integer)
+--E
+
+@
+Does this give an error of deleteAssoc not defined ??
+<<*>>=
+--S 84
 A: SquareMatrix(m, S2) := diagonalMatrix(l)
--- did you get an error of deleteAssoc not defined ??
+--R
+--R        +matrix1  matrix2  matrix2  matrix2  matrix2+
+--R        |                                           |
+--R        |matrix2  matrix3  matrix2  matrix2  matrix2|
+--R        |                                           |
+--R   (6)  |matrix2  matrix2  matrix3  matrix2  matrix2|
+--R        |                                           |
+--R        |matrix2  matrix2  matrix2  matrix3  matrix2|
+--R        |                                           |
+--R        +matrix2  matrix2  matrix2  matrix2  matrix1+
+--R
+--R
+--R
+--R                  +v + h   - v +
+--R   where matrix1= |            |
+--R                  + - v   v + h+
+--R
+--R                +0  0+
+--R   and matrix2= |    |
+--R                +0  0+
+--R
+--R                +v + 2h   - v  +
+--R   and matrix3= |              |
+--R                + - v    v + 2h+
+--R            Type: SquareMatrix(5,SquareMatrix(2,Fraction Polynomial 
Integer))
+--E
 
--- load definition of deleteAssoc
+@
+load definition of deleteAssoc
+\begin{verbatim}
 )li (load "/spad/obj/rios/interp/c-util")
 
 A: SquareMatrix(m, S2) := diagonalMatrix(l)
---now , can print.
+\end{verbatim}
+now , can print.
+
+bmt/10/19/92 squareFree bug
+
+Has an extra factor of 2.
+<<*>>=
+)clear all
 
--------------------------------------------------------------------
--- bmt/10/19/92 squareFree bug
--------------------------------------------------------------------
--- has an extra factor of 2.
+--S 85
 squareFree((2*x*y+1)*(x*y+1)**2)
+--R
+--R                 2
+--R   (1)  (x y + 1) (2x y + 1)
+--R                                            Type: Factored Polynomial 
Integer
+--E
+
+@
+bmt/10/19/92 division by zero error
+<<*>>=
+)clear all
 
--------------------------------------------------------------------
--- bmt/10/19/92 division by zero error
--------------------------------------------------------------------
+--S 86
 limit(atan(1/sin(x)),x=0)
+--R
+--R                          %pi                 %pi
+--R   (1)  [leftHandLimit= - ---,rightHandLimit= ---]
+--R                           2                   2
+--RType: Union(Record(leftHandLimit: Union(OrderedCompletion Expression 
Integer,"failed"),rightHandLimit: Union(OrderedCompletion Expression 
Integer,"failed")),...)
+--E
+
+@
+bmt/10/19/92 limit problem
 
--------------------------------------------------------------------
--- bmt/10/19/92 limit problem
--------------------------------------------------------------------
+The left and right hand limits don't agree
+<<*>>=
 )clear all
--- the left and right hand limits don't agree
+
+--S 87
 limit(atan(-sin(x)/(cos(x)+e)),x=acos(-e))
--- the left and right hand limits don't agree
+--R
+--R                          %pi                 %pi
+--R   (1)  [leftHandLimit= - ---,rightHandLimit= ---]
+--R                           2                   2
+--RType: Union(Record(leftHandLimit: Union(OrderedCompletion Expression 
Integer,"failed"),rightHandLimit: Union(OrderedCompletion Expression 
Integer,"failed")),...)
+--E
+
+--S 88
 limit(atan(1/(cos(x)+e)),x=acos(-e))
+--R
+--R                        %pi                   %pi
+--R   (2)  [leftHandLimit= ---,rightHandLimit= - ---]
+--R                         2                     2
+--RType: Union(Record(leftHandLimit: Union(OrderedCompletion Expression 
Integer,"failed"),rightHandLimit: Union(OrderedCompletion Expression 
Integer,"failed")),...)
+--E
 
--------------------------------------------------------------------
--- grabmeier/10/19/92 unable to compute the determinant of an 8x8
--------------------------------------------------------------------
+@
+grabmeier/10/19/92 unable to compute the determinant of an 8x8
+<<*>>=
 )clear all
-D := MATRIX FRAC(POLY INT)
 
+--S 89
+D := MATRIX FRAC(POLY INT)
+--R
+--R   (1)  Matrix Fraction Polynomial Integer
+--R                                                                 Type: 
Domain
+--E
 
+--S 90
 d : (INT, Boolean) -> POLY INT
+--R                                                                   Type: 
Void
+--E
+
+--S 91
 d(i,ss)  ==
   ex := i rem 4
   if ex < 0 then ex := ex+4
@@ -429,13 +1197,34 @@ d(i,ss)  ==
   ex = 1 => 'd
   ex = 2 => 'dd
   'ddd
-
-
+--R 
+--R                                                                   Type: 
Void
+--E
 
 -- 1,d,dd,ddd,s,sd,sdd,sddd
 
+--S 92
 mTV4 : D := new(8,8,0)
-
+--R
+--R        +0  0  0  0  0  0  0  0+
+--R        |                      |
+--R        |0  0  0  0  0  0  0  0|
+--R        |                      |
+--R        |0  0  0  0  0  0  0  0|
+--R        |                      |
+--R        |0  0  0  0  0  0  0  0|
+--R   (4)  |                      |
+--R        |0  0  0  0  0  0  0  0|
+--R        |                      |
+--R        |0  0  0  0  0  0  0  0|
+--R        |                      |
+--R        |0  0  0  0  0  0  0  0|
+--R        |                      |
+--R        +0  0  0  0  0  0  0  0+
+--R                                     Type: Matrix Fraction Polynomial 
Integer
+--E
+
+--S 93
 for i in 1..8 repeat
   for j in 1..8 repeat
     mTV4(i,j) :=
@@ -444,52 +1233,1022 @@ for i in 1..8 repeat
         d(-i+j,true)
       j <= 4 => d(i+j-2,true)
       d(-i+j,false)
+--R 
+--R   Compiling function d with type (Integer,Boolean) -> Polynomial 
+--R      Integer 
+--R                                                                   Type: 
Void
+--E
+
+--S 94
 mTV4
+--R
+--R        + 1     d     dd   ddd    s     sd   sdd   sddd+
+--R        |                                              |
+--R        | d     dd   ddd    1    sddd   s     sd   sdd |
+--R        |                                              |
+--R        | dd   ddd    1     d    sdd   sddd   s     sd |
+--R        |                                              |
+--R        |ddd    1     d     dd    sd   sdd   sddd   s  |
+--R   (6)  |                                              |
+--R        | s     sd   sdd   sddd   1     d     dd   ddd |
+--R        |                                              |
+--R        | sd   sdd   sddd   s    ddd    1     d     dd |
+--R        |                                              |
+--R        |sdd   sddd   s     sd    dd   ddd    1     d  |
+--R        |                                              |
+--R        +sddd   s     sd   sdd    d     dd   ddd    1  +
+--R                                     Type: Matrix Fraction Polynomial 
Integer
+--E
+
+--S 95
 gdd4 := determinant mTV4
+--R
+--R   (7)
+--R           8                2       2      2     2         6
+--R     - sddd  + (8s sdd + 4sd  + 4ddd  + 4dd  + 4d  + 4)sddd
+--R   + 
+--R                  2
+--R         - 8sd sdd  + ((- 8dd - 8)ddd - 8d dd - 8d)sdd
+--R       + 
+--R              2
+--R         (- 8s  - 16d ddd - 16dd)sd + ((- 8dd - 8)ddd - 8d dd - 8d)s
+--R    *
+--R           5
+--R       sddd
+--R   + 
+--R             4         2       2                2            2        2
+--R         2sdd  + (- 20s  + 4ddd  + 16d ddd + 4dd  + 16dd + 4d  + 4)sdd
+--R       + 
+--R                    2
+--R             - 8s sd  + ((24dd + 24)ddd + 24d dd + 24d)sd
+--R           + 
+--R                     2                 2             2
+--R             (- 16ddd  + 16d ddd - 16dd  + 16dd - 16d  - 16)s
+--R        *
+--R           sdd
+--R       + 
+--R              4          2      2     2       2
+--R         - 6sd  + (- 4ddd  - 4dd  - 4d  - 4)sd
+--R       + 
+--R                                                 4
+--R         ((24dd + 24)ddd + 24d dd + 24d)s sd + 2s
+--R       + 
+--R              2                2            2      2       4
+--R         (4ddd  + 16d ddd + 4dd  + 16dd + 4d  + 4)s  - 6ddd
+--R       + 
+--R               2           2        2         2                        4
+--R         (- 8dd  + 8dd - 4d  - 8)ddd  + (8d dd  + 32d dd + 8d)ddd - 6dd
+--R       + 
+--R              2       2     2       4     2
+--R         (- 8d  - 4)dd  + 8d dd - 6d  - 8d  - 6
+--R    *
+--R           4
+--R       sddd
+--R   + 
+--R                                                      3
+--R         (32s sd + (- 16dd - 16)ddd - 16d dd - 16d)sdd
+--R       + 
+--R              3                                                             
 2
+--R         (16sd  + (- 32d ddd - 32dd)sd + ((16dd + 16)ddd + 16d dd + 
16d)s)sdd
+--R       + 
+--R                                                2
+--R             ((- 16dd - 16)ddd - 16d dd - 16d)sd
+--R           + 
+--R                 3           2       2      2
+--R             (32s  + (- 32ddd  - 32dd  - 32d  - 32)s)sd
+--R           + 
+--R                                             2                 3
+--R             ((16dd + 16)ddd + 16d dd + 16d)s  + (16dd + 16)ddd
+--R           + 
+--R                                2
+--R             (- 16d dd - 16d)ddd
+--R           + 
+--R                  3       2         2              2                  3
+--R             (16dd  - 16dd  + (- 16d  - 16)dd - 16d  + 16)ddd + 16d dd
+--R           + 
+--R                     2       3               3
+--R             - 16d dd  + (16d  - 16d)dd + 16d  + 16d
+--R        *
+--R           sdd
+--R       + 
+--R             2                    3                                        2
+--R         (16s  + 32d ddd + 32dd)sd  + ((- 16dd - 16)ddd - 16d dd - 16d)s sd
+--R       + 
+--R                                2          3          2         2
+--R             (- 32d ddd - 32dd)s  + 32d ddd  + (- 16dd  - 16)ddd
+--R           + 
+--R                            3           3      2  2             2
+--R             (- 64d dd + 32d )ddd + 32dd  - 16d dd  + 32dd - 16d
+--R        *
+--R           sd
+--R       + 
+--R                                           3
+--R         ((- 16dd - 16)ddd - 16d dd - 16d)s
+--R       + 
+--R                           3                      2
+--R             (16dd + 16)ddd  + (- 16d dd - 16d)ddd
+--R           + 
+--R                  3       2         2              2                  3
+--R             (16dd  - 16dd  + (- 16d  - 16)dd - 16d  + 16)ddd + 16d dd
+--R           + 
+--R                     2       3               3
+--R             - 16d dd  + (16d  - 16d)dd + 16d  + 16d
+--R        *
+--R           s
+--R    *
+--R           3
+--R       sddd
+--R   + 
+--R                 5          2       2                2            2        4
+--R         - 8s sdd  + (- 20sd  + 4ddd  + 16d ddd + 4dd  + 16dd + 4d  + 4)sdd
+--R       + 
+--R                                                 3                          
3
+--R         (((16dd + 16)ddd + 16d dd + 16d)sd + 16s  + (- 32d ddd - 32dd)s)sdd
+--R       + 
+--R                   2        2                 2             2        2
+--R             (- 56s  + 24ddd  - 32d ddd + 24dd  - 32dd + 24d  + 24)sd
+--R           + 
+--R             ((- 16dd - 16)ddd - 16d dd - 16d)s sd
+--R           + 
+--R                   2                 2             2       2       4        
  3
+--R             (24ddd  - 32d ddd + 24dd  - 32dd + 24d  + 24)s  - 8ddd  - 16d 
ddd
+--R           + 
+--R                   2      2        2                3          4       3
+--R             (- 8dd  + 16d  - 8)ddd  + (96d dd - 16d )ddd - 8dd  - 16dd
+--R           + 
+--R                  2        2            4     2
+--R             (- 8d  + 16)dd  - 16dd - 8d  - 8d  - 8
+--R        *
+--R              2
+--R           sdd
+--R       + 
+--R                    4                                      3
+--R             - 8s sd  + ((- 16dd - 16)ddd - 16d dd - 16d)sd
+--R           + 
+--R                   2                 2             2          2
+--R             (32ddd  + 96d ddd + 32dd  + 96dd + 32d  + 32)s sd
+--R           + 
+--R                                                   2                   3
+--R                 ((- 16dd - 16)ddd - 16d dd - 16d)s  + (- 16dd - 16)ddd
+--R               + 
+--R                                  2
+--R                 (16d dd + 16d)ddd
+--R               + 
+--R                        3       2       2              2                  3
+--R                 (- 16dd  + 16dd  + (16d  + 16)dd + 16d  - 16)ddd - 16d dd
+--R               + 
+--R                       2         3               3
+--R                 16d dd  + (- 16d  + 16d)dd - 16d  - 16d
+--R            *
+--R               sd
+--R           + 
+--R                 5                      3
+--R             - 8s  + (- 32d ddd - 32dd)s
+--R           + 
+--R                     4                2    2            2                4
+--R                 8ddd  + (- 32dd + 48d )ddd  + (- 32d dd  - 32d)ddd + 8dd
+--R               + 
+--R                     2      2       4
+--R                 48dd  - 32d dd + 8d  + 8
+--R            *
+--R               s
+--R        *
+--R           sdd
+--R       + 
+--R            6          2      2     2       4
+--R         4sd  + (- 4ddd  - 4dd  - 4d  - 4)sd
+--R       + 
+--R                                              3
+--R         ((- 16dd - 16)ddd - 16d dd - 16d)s sd
+--R       + 
+--R                  4         2                 2             2       2       
4
+--R             - 20s  + (24ddd  - 32d ddd + 24dd  - 32dd + 24d  + 24)s  - 4ddd
+--R           + 
+--R                  2             2         2          2                      
   4
+--R             (16dd  + 48dd - 88d  + 16)ddd  + (48d dd  - 64d dd + 48d)ddd - 
4dd
+--R           + 
+--R                 2        2      2       4      2
+--R             (16d  - 88)dd  + 48d dd - 4d  + 16d  - 4
+--R        *
+--R             2
+--R           sd
+--R       + 
+--R                                             3
+--R             ((16dd + 16)ddd + 16d dd + 16d)s
+--R           + 
+--R                                 3                    2
+--R                 (- 16dd - 16)ddd  + (16d dd + 16d)ddd
+--R               + 
+--R                        3       2       2              2                  3
+--R                 (- 16dd  + 16dd  + (16d  + 16)dd + 16d  - 16)ddd - 16d dd
+--R               + 
+--R                       2         3               3
+--R                 16d dd  + (- 16d  + 16d)dd - 16d  - 16d
+--R            *
+--R               s
+--R        *
+--R           sd
+--R       + 
+--R              2                2            2      4
+--R         (4ddd  + 16d ddd + 4dd  + 16dd + 4d  + 4)s
+--R       + 
+--R                   4          3         2      2        2                3
+--R             - 8ddd  - 16d ddd  + (- 8dd  + 16d  - 8)ddd  + (96d dd - 16d 
)ddd
+--R           + 
+--R                  4       3        2        2            4     2
+--R             - 8dd  - 16dd  + (- 8d  + 16)dd  - 16dd - 8d  - 8d  - 8
+--R        *
+--R            2
+--R           s
+--R       + 
+--R             6       2            2        4             3
+--R         4ddd  + (4dd  - 16dd - 4d  + 4)ddd  - 32d dd ddd
+--R       + 
+--R             4       2        2      2       4      2        2
+--R         (4dd  + (24d  + 24)dd  + 32d dd - 4d  + 24d  + 4)ddd
+--R       + 
+--R                  4         3         2         3                         6
+--R         (- 16d dd  - 32d dd  + 32d dd  + (- 32d  - 32d)dd - 16d)ddd + 4dd
+--R       + 
+--R            2       4      4      2       2      4       6     4     2
+--R         (4d  - 4)dd  + (4d  + 24d  - 4)dd  - 16d dd + 4d  + 4d  + 4d  + 4
+--R    *
+--R           2
+--R       sddd
+--R   + 
+--R                6                                   5
+--R         8sd sdd  + ((- 8dd - 8)ddd - 8d dd - 8d)sdd
+--R       + 
+--R                  2        2                 2             2
+--R             (- 8s  - 16ddd  + 16d ddd - 16dd  + 16dd - 16d  - 16)sd
+--R           + 
+--R             ((24dd + 24)ddd + 24d dd + 24d)s
+--R        *
+--R              4
+--R           sdd
+--R       + 
+--R                   3                                    2
+--R             32s sd  + ((16dd + 16)ddd + 16d dd + 16d)sd
+--R           + 
+--R                     2       2      2
+--R             (- 32ddd  - 32dd  - 32d  - 32)s sd
+--R           + 
+--R                                               2                 3
+--R             ((- 16dd - 16)ddd - 16d dd - 16d)s  + (16dd + 16)ddd
+--R           + 
+--R                                2
+--R             (- 16d dd - 16d)ddd
+--R           + 
+--R                  3       2         2              2                  3
+--R             (16dd  - 16dd  + (- 16d  - 16)dd - 16d  + 16)ddd + 16d dd
+--R           + 
+--R                     2       3               3
+--R             - 16d dd  + (16d  - 16d)dd + 16d  + 16d
+--R        *
+--R              3
+--R           sdd
+--R       + 
+--R                  5                       3
+--R             - 8sd  + (- 32d ddd - 32dd)sd
+--R           + 
+--R                                                  2
+--R             ((- 16dd - 16)ddd - 16d dd - 16d)s sd
+--R           + 
+--R                     4         2                 2             2       2    
   4
+--R                 - 8s  + (32ddd  + 96d ddd + 32dd  + 96dd + 32d  + 32)s  + 
8ddd
+--R               + 
+--R                              2    2            2                4       2
+--R                 (- 32dd + 48d )ddd  + (- 32d dd  - 32d)ddd + 8dd  + 48dd
+--R               + 
+--R                      2       4
+--R                 - 32d dd + 8d  + 8
+--R            *
+--R               sd
+--R           + 
+--R                                               3
+--R             ((- 16dd - 16)ddd - 16d dd - 16d)s
+--R           + 
+--R                                 3                    2
+--R                 (- 16dd - 16)ddd  + (16d dd + 16d)ddd
+--R               + 
+--R                        3       2       2              2                  3
+--R                 (- 16dd  + 16dd  + (16d  + 16)dd + 16d  - 16)ddd - 16d dd
+--R               + 
+--R                       2         3               3
+--R                 16d dd  + (- 16d  + 16d)dd - 16d  - 16d
+--R            *
+--R               s
+--R        *
+--R              2
+--R           sdd
+--R       + 
+--R                                              4
+--R             ((24dd + 24)ddd + 24d dd + 24d)sd
+--R           + 
+--R                 3           2       2      2          3
+--R             (32s  + (- 32ddd  - 32dd  - 32d  - 32)s)sd
+--R           + 
+--R                                                   2                   3
+--R                 ((- 16dd - 16)ddd - 16d dd - 16d)s  + (- 16dd - 16)ddd
+--R               + 
+--R                                  2
+--R                 (16d dd + 16d)ddd
+--R               + 
+--R                        3       2       2              2                  3
+--R                 (- 16dd  + 16dd  + (16d  + 16)dd + 16d  - 16)ddd - 16d dd
+--R               + 
+--R                       2         3               3
+--R                 16d dd  + (- 16d  + 16d)dd - 16d  - 16d
+--R            *
+--R                 2
+--R               sd
+--R           + 
+--R                         2       2      2       3
+--R                 (- 32ddd  - 32dd  - 32d  - 32)s
+--R               + 
+--R                          4          3        2      2         2
+--R                     32ddd  - 64d ddd  + (96dd  - 64d  + 96)ddd
+--R                   + 
+--R                                     3           4       3       2        2
+--R                     (- 128d dd - 64d )ddd + 32dd  - 64dd  + (96d  - 64)dd
+--R                   + 
+--R                                 4      2
+--R                     - 64dd + 32d  + 96d  + 32
+--R                *
+--R                   s
+--R            *
+--R               sd
+--R           + 
+--R                                             4
+--R             ((24dd + 24)ddd + 24d dd + 24d)s
+--R           + 
+--R                                 3                    2
+--R                 (- 16dd - 16)ddd  + (16d dd + 16d)ddd
+--R               + 
+--R                        3       2       2              2                  3
+--R                 (- 16dd  + 16dd  + (16d  + 16)dd + 16d  - 16)ddd - 16d dd
+--R               + 
+--R                       2         3               3
+--R                 16d dd  + (- 16d  + 16d)dd - 16d  - 16d
+--R            *
+--R                2
+--R               s
+--R           + 
+--R                           5                    4
+--R             (- 8dd - 8)ddd  + (24d dd + 24d)ddd
+--R           + 
+--R                    3       2         2              2         3
+--R             (- 16dd  + 16dd  + (- 16d  + 16)dd - 16d  - 16)ddd
+--R           + 
+--R                    3         2         3               3          2
+--R             (16d dd  - 16d dd  + (- 16d  - 16d)dd - 16d  + 16d)ddd
+--R           + 
+--R                      5       4       2        3         2        2
+--R                 - 8dd  + 24dd  + (16d  - 16)dd  + (- 16d  - 16)dd
+--R               + 
+--R                     4      2              4      2
+--R                 (24d  - 16d  + 24)dd + 24d  + 16d  - 8
+--R            *
+--R               ddd
+--R           + 
+--R                    5         4         3         3       3         2
+--R             - 8d dd  + 24d dd  + (- 16d  - 16d)dd  + (16d  - 16d)dd
+--R           + 
+--R                  5      3              5      3
+--R             (- 8d  + 16d  + 24d)dd - 8d  - 16d  - 8d
+--R        *
+--R           sdd
+--R       + 
+--R              2                    5                                      4
+--R         (- 8s  - 16d ddd - 16dd)sd  + ((24dd + 24)ddd + 24d dd + 24d)s sd
+--R       + 
+--R                                2          3          2         2
+--R             (- 32d ddd - 32dd)s  + 32d ddd  + (- 16dd  - 16)ddd
+--R           + 
+--R                            3           3      2  2             2
+--R             (- 64d dd + 32d )ddd + 32dd  - 16d dd  + 32dd - 16d
+--R        *
+--R             3
+--R           sd
+--R       + 
+--R                                             3
+--R             ((16dd + 16)ddd + 16d dd + 16d)s
+--R           + 
+--R                                 3                    2
+--R                 (- 16dd - 16)ddd  + (16d dd + 16d)ddd
+--R               + 
+--R                        3       2       2              2                  3
+--R                 (- 16dd  + 16dd  + (16d  + 16)dd + 16d  - 16)ddd - 16d dd
+--R               + 
+--R                       2         3               3
+--R                 16d dd  + (- 16d  + 16d)dd - 16d  - 16d
+--R            *
+--R               s
+--R        *
+--R             2
+--R           sd
+--R       + 
+--R               6           2                 2             2       4
+--R             8s  + (- 16ddd  + 16d ddd - 16dd  + 16dd - 16d  - 16)s
+--R           + 
+--R                     4                2    2            2                4
+--R                 8ddd  + (- 32dd + 48d )ddd  + (- 32d dd  - 32d)ddd + 8dd
+--R               + 
+--R                     2      2       4
+--R                 48dd  - 32d dd + 8d  + 8
+--R            *
+--R                2
+--R               s
+--R           + 
+--R                      5        2                4            2      3       
   3
+--R             - 16d ddd  + (16dd  + 16dd + 16)ddd  + (- 32d dd  + 32d  - 
32d)ddd
+--R           + 
+--R                  4       3         2        2       2              2       
  2
+--R             (16dd  - 32dd  + (- 32d  - 32)dd  + (96d  - 32)dd - 32d  + 
16)ddd
+--R           + 
+--R                    4         3         2      5      3                 5
+--R             (16d dd  + (- 32d  + 96d)dd  - 16d  - 32d  + 16d)ddd - 16dd
+--R           + 
+--R                2  4         2        3       4      2   2
+--R             16d dd  + (- 32d  + 32)dd  + (16d  - 32d )dd
+--R           + 
+--R                 4      2              4      2
+--R             (16d  - 32d  - 16)dd + 16d  + 16d
+--R        *
+--R           sd
+--R       + 
+--R                                       5
+--R         ((- 8dd - 8)ddd - 8d dd - 8d)s
+--R       + 
+--R                           3                      2
+--R             (16dd + 16)ddd  + (- 16d dd - 16d)ddd
+--R           + 
+--R                  3       2         2              2                  3
+--R             (16dd  - 16dd  + (- 16d  - 16)dd - 16d  + 16)ddd + 16d dd
+--R           + 
+--R                     2       3               3
+--R             - 16d dd  + (16d  - 16d)dd + 16d  + 16d
+--R        *
+--R            3
+--R           s
+--R       + 
+--R                           5                    4
+--R             (- 8dd - 8)ddd  + (24d dd + 24d)ddd
+--R           + 
+--R                    3       2         2              2         3
+--R             (- 16dd  + 16dd  + (- 16d  + 16)dd - 16d  - 16)ddd
+--R           + 
+--R                    3         2         3               3          2
+--R             (16d dd  - 16d dd  + (- 16d  - 16d)dd - 16d  + 16d)ddd
+--R           + 
+--R                      5       4       2        3         2        2
+--R                 - 8dd  + 24dd  + (16d  - 16)dd  + (- 16d  - 16)dd
+--R               + 
+--R                     4      2              4      2
+--R                 (24d  - 16d  + 24)dd + 24d  + 16d  - 8
+--R            *
+--R               ddd
+--R           + 
+--R                    5         4         3         3       3         2
+--R             - 8d dd  + 24d dd  + (- 16d  - 16d)dd  + (16d  - 16d)dd
+--R           + 
+--R                  5      3              5      3
+--R             (- 8d  + 16d  + 24d)dd - 8d  - 16d  - 8d
+--R        *
+--R           s
+--R    *
+--R       sddd
+--R   + 
+--R          8      2       2      2     2        6
+--R     - sdd  + (4s  + 4ddd  + 4dd  + 4d  + 4)sdd
+--R   + 
+--R             2                                                            5
+--R     (- 8s sd  + ((- 8dd - 8)ddd - 8d dd - 8d)sd + (- 16d ddd - 16dd)s)sdd
+--R   + 
+--R            4        2                2            2       2
+--R         2sd  + (4ddd  + 16d ddd + 4dd  + 16dd + 4d  + 4)sd
+--R       + 
+--R                                                 4
+--R         ((24dd + 24)ddd + 24d dd + 24d)s sd - 6s
+--R       + 
+--R                2      2     2      2       4         2           2        2
+--R         (- 4ddd  - 4dd  - 4d  - 4)s  - 6ddd  + (- 8dd  + 8dd - 4d  - 8)ddd
+--R       + 
+--R             2                        4        2       2     2       4     2
+--R       (8d dd  + 32d dd + 8d)ddd - 6dd  + (- 8d  - 4)dd  + 8d dd - 6d  - 8d 
 - 6
+--R    *
+--R          4
+--R       sdd
+--R   + 
+--R                                            3       3                       
  2
+--R         ((- 16dd - 16)ddd - 16d dd - 16d)sd  + (16s  + (- 32d ddd - 
32dd)s)sd
+--R       + 
+--R                                               2                 3
+--R             ((- 16dd - 16)ddd - 16d dd - 16d)s  + (16dd + 16)ddd
+--R           + 
+--R                                2
+--R             (- 16d dd - 16d)ddd
+--R           + 
+--R                  3       2         2              2                  3
+--R             (16dd  - 16dd  + (- 16d  - 16)dd - 16d  + 16)ddd + 16d dd
+--R           + 
+--R                     2       3               3
+--R             - 16d dd  + (16d  - 16d)dd + 16d  + 16d
+--R        *
+--R           sd
+--R       + 
+--R                          3
+--R         (32d ddd + 32dd)s
+--R       + 
+--R                    3          2         2                  3           3
+--R             32d ddd  + (- 16dd  - 16)ddd  + (- 64d dd + 32d )ddd + 32dd
+--R           + 
+--R                  2  2             2
+--R             - 16d dd  + 32dd - 16d
+--R        *
+--R           s
+--R    *
+--R          3
+--R       sdd
+--R   + 
+--R               2       2                2            2       4
+--R         (- 20s  + 4ddd  + 16d ddd + 4dd  + 16dd + 4d  + 4)sd
+--R       + 
+--R                                            3
+--R         ((16dd + 16)ddd + 16d dd + 16d)s sd
+--R       + 
+--R                   2                 2             2       2       4        
  3
+--R             (24ddd  - 32d ddd + 24dd  - 32dd + 24d  + 24)s  - 8ddd  - 16d 
ddd
+--R           + 
+--R                   2      2        2                3          4       3
+--R             (- 8dd  + 16d  - 8)ddd  + (96d dd - 16d )ddd - 8dd  - 16dd
+--R           + 
+--R                  2        2            4     2
+--R             (- 8d  + 16)dd  - 16dd - 8d  - 8d  - 8
+--R        *
+--R             2
+--R           sd
+--R       + 
+--R                                               3
+--R             ((- 16dd - 16)ddd - 16d dd - 16d)s
+--R           + 
+--R                                 3                    2
+--R                 (- 16dd - 16)ddd  + (16d dd + 16d)ddd
+--R               + 
+--R                        3       2       2              2                  3
+--R                 (- 16dd  + 16dd  + (16d  + 16)dd + 16d  - 16)ddd - 16d dd
+--R               + 
+--R                       2         3               3
+--R                 16d dd  + (- 16d  + 16d)dd - 16d  - 16d
+--R            *
+--R               s
+--R        *
+--R           sd
+--R       + 
+--R           6          2      2     2      4
+--R         4s  + (- 4ddd  - 4dd  - 4d  - 4)s
+--R       + 
+--R                   4        2             2         2
+--R             - 4ddd  + (16dd  + 48dd - 88d  + 16)ddd
+--R           + 
+--R                    2                         4       2        2      2     
  4
+--R             (48d dd  - 64d dd + 48d)ddd - 4dd  + (16d  - 88)dd  + 48d dd - 
4d
+--R           + 
+--R                2
+--R             16d  - 4
+--R        *
+--R            2
+--R           s
+--R       + 
+--R             6       2            2        4             3
+--R         4ddd  + (4dd  - 16dd - 4d  + 4)ddd  - 32d dd ddd
+--R       + 
+--R             4       2        2      2       4      2        2
+--R         (4dd  + (24d  + 24)dd  + 32d dd - 4d  + 24d  + 4)ddd
+--R       + 
+--R                  4         3         2         3                         6
+--R         (- 16d dd  - 32d dd  + 32d dd  + (- 32d  - 32d)dd - 16d)ddd + 4dd
+--R       + 
+--R            2       4      4      2       2      4       6     4     2
+--R         (4d  - 4)dd  + (4d  + 24d  - 4)dd  - 16d dd + 4d  + 4d  + 4d  + 4
+--R    *
+--R          2
+--R       sdd
+--R   + 
+--R              6                                  5
+--R         8s sd  + ((- 8dd - 8)ddd - 8d dd - 8d)sd
+--R       + 
+--R                 2                 2             2          4
+--R         (- 16ddd  + 16d ddd - 16dd  + 16dd - 16d  - 16)s sd
+--R       + 
+--R                                             2                 3
+--R             ((16dd + 16)ddd + 16d dd + 16d)s  + (16dd + 16)ddd
+--R           + 
+--R                                2
+--R             (- 16d dd - 16d)ddd
+--R           + 
+--R                  3       2         2              2                  3
+--R             (16dd  - 16dd  + (- 16d  - 16)dd - 16d  + 16)ddd + 16d dd
+--R           + 
+--R                     2       3               3
+--R             - 16d dd  + (16d  - 16d)dd + 16d  + 16d
+--R        *
+--R             3
+--R           sd
+--R       + 
+--R                 5                      3
+--R             - 8s  + (- 32d ddd - 32dd)s
+--R           + 
+--R                     4                2    2            2                4
+--R                 8ddd  + (- 32dd + 48d )ddd  + (- 32d dd  - 32d)ddd + 8dd
+--R               + 
+--R                     2      2       4
+--R                 48dd  - 32d dd + 8d  + 8
+--R            *
+--R               s
+--R        *
+--R             2
+--R           sd
+--R       + 
+--R                                             4
+--R             ((24dd + 24)ddd + 24d dd + 24d)s
+--R           + 
+--R                                 3                    2
+--R                 (- 16dd - 16)ddd  + (16d dd + 16d)ddd
+--R               + 
+--R                        3       2       2              2                  3
+--R                 (- 16dd  + 16dd  + (16d  + 16)dd + 16d  - 16)ddd - 16d dd
+--R               + 
+--R                       2         3               3
+--R                 16d dd  + (- 16d  + 16d)dd - 16d  - 16d
+--R            *
+--R                2
+--R               s
+--R           + 
+--R                           5                    4
+--R             (- 8dd - 8)ddd  + (24d dd + 24d)ddd
+--R           + 
+--R                    3       2         2              2         3
+--R             (- 16dd  + 16dd  + (- 16d  + 16)dd - 16d  - 16)ddd
+--R           + 
+--R                    3         2         3               3          2
+--R             (16d dd  - 16d dd  + (- 16d  - 16d)dd - 16d  + 16d)ddd
+--R           + 
+--R                      5       4       2        3         2        2
+--R                 - 8dd  + 24dd  + (16d  - 16)dd  + (- 16d  - 16)dd
+--R               + 
+--R                     4      2              4      2
+--R                 (24d  - 16d  + 24)dd + 24d  + 16d  - 8
+--R            *
+--R               ddd
+--R           + 
+--R                    5         4         3         3       3         2
+--R             - 8d dd  + 24d dd  + (- 16d  - 16d)dd  + (16d  - 16d)dd
+--R           + 
+--R                  5      3              5      3
+--R             (- 8d  + 16d  + 24d)dd - 8d  - 16d  - 8d
+--R        *
+--R           sd
+--R       + 
+--R                            5
+--R         (- 16d ddd - 16dd)s
+--R       + 
+--R                    3          2         2                  3           3
+--R             32d ddd  + (- 16dd  - 16)ddd  + (- 64d dd + 32d )ddd + 32dd
+--R           + 
+--R                  2  2             2
+--R             - 16d dd  + 32dd - 16d
+--R        *
+--R            3
+--R           s
+--R       + 
+--R                      5        2                4            2      3       
   3
+--R             - 16d ddd  + (16dd  + 16dd + 16)ddd  + (- 32d dd  + 32d  - 
32d)ddd
+--R           + 
+--R                  4       3         2        2       2              2       
  2
+--R             (16dd  - 32dd  + (- 32d  - 32)dd  + (96d  - 32)dd - 32d  + 
16)ddd
+--R           + 
+--R                    4         3         2      5      3                 5
+--R             (16d dd  + (- 32d  + 96d)dd  - 16d  - 32d  + 16d)ddd - 16dd
+--R           + 
+--R                2  4         2        3       4      2   2
+--R             16d dd  + (- 32d  + 32)dd  + (16d  - 32d )dd
+--R           + 
+--R                 4      2              4      2
+--R             (16d  - 32d  - 16)dd + 16d  + 16d
+--R        *
+--R           s
+--R    *
+--R       sdd
+--R   + 
+--R         8        2      2     2       6                                    
5
+--R     - sd  + (4ddd  + 4dd  + 4d  + 4)sd  + ((- 8dd - 8)ddd - 8d dd - 8d)s sd
+--R   + 
+--R           4        2                2            2      2       4
+--R         2s  + (4ddd  + 16d ddd + 4dd  + 16dd + 4d  + 4)s  - 6ddd
+--R       + 
+--R               2           2        2         2                        4
+--R         (- 8dd  + 8dd - 4d  - 8)ddd  + (8d dd  + 32d dd + 8d)ddd - 6dd
+--R       + 
+--R              2       2     2       4     2
+--R         (- 8d  - 4)dd  + 8d dd - 6d  - 8d  - 6
+--R    *
+--R         4
+--R       sd
+--R   + 
+--R                                           3
+--R         ((- 16dd - 16)ddd - 16d dd - 16d)s
+--R       + 
+--R                           3                      2
+--R             (16dd + 16)ddd  + (- 16d dd - 16d)ddd
+--R           + 
+--R                  3       2         2              2                  3
+--R             (16dd  - 16dd  + (- 16d  - 16)dd - 16d  + 16)ddd + 16d dd
+--R           + 
+--R                     2       3               3
+--R             - 16d dd  + (16d  - 16d)dd + 16d  + 16d
+--R        *
+--R           s
+--R    *
+--R         3
+--R       sd
+--R   + 
+--R              2                2            2      4
+--R         (4ddd  + 16d ddd + 4dd  + 16dd + 4d  + 4)s
+--R       + 
+--R                   4          3         2      2        2                3
+--R             - 8ddd  - 16d ddd  + (- 8dd  + 16d  - 8)ddd  + (96d dd - 16d 
)ddd
+--R           + 
+--R                  4       3        2        2            4     2
+--R             - 8dd  - 16dd  + (- 8d  + 16)dd  - 16dd - 8d  - 8d  - 8
+--R        *
+--R            2
+--R           s
+--R       + 
+--R             6       2            2        4             3
+--R         4ddd  + (4dd  - 16dd - 4d  + 4)ddd  - 32d dd ddd
+--R       + 
+--R             4       2        2      2       4      2        2
+--R         (4dd  + (24d  + 24)dd  + 32d dd - 4d  + 24d  + 4)ddd
+--R       + 
+--R                  4         3         2         3                         6
+--R         (- 16d dd  - 32d dd  + 32d dd  + (- 32d  - 32d)dd - 16d)ddd + 4dd
+--R       + 
+--R            2       4      4      2       2      4       6     4     2
+--R         (4d  - 4)dd  + (4d  + 24d  - 4)dd  - 16d dd + 4d  + 4d  + 4d  + 4
+--R    *
+--R         2
+--R       sd
+--R   + 
+--R                                       5
+--R         ((- 8dd - 8)ddd - 8d dd - 8d)s
+--R       + 
+--R                           3                      2
+--R             (16dd + 16)ddd  + (- 16d dd - 16d)ddd
+--R           + 
+--R                  3       2         2              2                  3
+--R             (16dd  - 16dd  + (- 16d  - 16)dd - 16d  + 16)ddd + 16d dd
+--R           + 
+--R                     2       3               3
+--R             - 16d dd  + (16d  - 16d)dd + 16d  + 16d
+--R        *
+--R            3
+--R           s
+--R       + 
+--R                           5                    4
+--R             (- 8dd - 8)ddd  + (24d dd + 24d)ddd
+--R           + 
+--R                    3       2         2              2         3
+--R             (- 16dd  + 16dd  + (- 16d  + 16)dd - 16d  - 16)ddd
+--R           + 
+--R                    3         2         3               3          2
+--R             (16d dd  - 16d dd  + (- 16d  - 16d)dd - 16d  + 16d)ddd
+--R           + 
+--R                      5       4       2        3         2        2
+--R                 - 8dd  + 24dd  + (16d  - 16)dd  + (- 16d  - 16)dd
+--R               + 
+--R                     4      2              4      2
+--R                 (24d  - 16d  + 24)dd + 24d  + 16d  - 8
+--R            *
+--R               ddd
+--R           + 
+--R                    5         4         3         3       3         2
+--R             - 8d dd  + 24d dd  + (- 16d  - 16d)dd  + (16d  - 16d)dd
+--R           + 
+--R                  5      3              5      3
+--R             (- 8d  + 16d  + 24d)dd - 8d  - 16d  - 8d
+--R        *
+--R           s
+--R    *
+--R       sd
+--R   + 
+--R        8        2      2     2      6
+--R     - s  + (4ddd  + 4dd  + 4d  + 4)s
+--R   + 
+--R               4         2           2        2         2
+--R         - 6ddd  + (- 8dd  + 8dd - 4d  - 8)ddd  + (8d dd  + 32d dd + 8d)ddd
+--R       + 
+--R              4        2       2     2       4     2
+--R         - 6dd  + (- 8d  - 4)dd  + 8d dd - 6d  - 8d  - 6
+--R    *
+--R        4
+--R       s
+--R   + 
+--R             6       2            2        4             3
+--R         4ddd  + (4dd  - 16dd - 4d  + 4)ddd  - 32d dd ddd
+--R       + 
+--R             4       2        2      2       4      2        2
+--R         (4dd  + (24d  + 24)dd  + 32d dd - 4d  + 24d  + 4)ddd
+--R       + 
+--R                  4         3         2         3                         6
+--R         (- 16d dd  - 32d dd  + 32d dd  + (- 32d  - 32d)dd - 16d)ddd + 4dd
+--R       + 
+--R            2       4      4      2       2      4       6     4     2
+--R         (4d  - 4)dd  + (4d  + 24d  - 4)dd  - 16d dd + 4d  + 4d  + 4d  + 4
+--R    *
+--R        2
+--R       s
+--R   + 
+--R          8            2    6           2         5
+--R     - ddd  + (8dd + 4d )ddd  + (- 8d dd  - 8d)ddd
+--R   + 
+--R         4       2     2       4        4
+--R     (2dd  - 20dd  - 8d dd - 6d  + 2)ddd
+--R   + 
+--R            3      3  2               3    3
+--R     (32d dd  + 16d dd  + 32d dd + 16d )ddd
+--R   + 
+--R           5      2  4       3      2  2        4            6      2    2
+--R     (- 8dd  - 20d dd  + 16dd  - 56d dd  + (- 8d  - 8)dd + 4d  - 20d )ddd
+--R   + 
+--R           6        4      3  3        5        2      3       5            
  8
+--R     (8d dd  - 8d dd  + 32d dd  + (- 8d  - 8d)dd  + 32d dd - 8d  + 8d)ddd - 
dd
+--R   + 
+--R        6     2  5      4       4      2  3         4       2      6     2
+--R     4dd  - 8d dd  + (2d  - 6)dd  + 16d dd  + (- 20d  + 4)dd  + (8d  - 8d 
)dd
+--R   + 
+--R        8     4
+--R     - d  + 2d  - 1
+--R                                            Type: Fraction Polynomial 
Integer
+--E
 
--------------------------------------------------------------------
--- sutor/09/28/92 operator bug?
--------------------------------------------------------------------
+@
+sutor/09/28/92 operator bug?
+<<*>>=
 )clear all
+
+--S 96
 L n ==
   n = 0 => 1
   n = 1 => x
   (2*n-1)/n * x * L(n-1) - (n-1)/n * L(n-2)
+--R 
+--R                                                                   Type: 
Void
+--E
+
+--S 97
 dx:=operator("D")::OP(POLY FRAC INT)
+--R
+--R   (2)  D
+--R                                   Type: Operator Polynomial Fraction 
Integer
+--E
+
+--S 98
 evaluate(dx,p+-> differentiate(p,'x))
+--R 
+--R   There are 4 exposed and 1 unexposed library operations named 
+--R      evaluate having 2 argument(s) but none was determined to be 
+--R      applicable. Use HyperDoc Browse, or issue
+--R                            )display op evaluate
+--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 
+--R      evaluate with argument type(s) 
+--R                    Operator Polynomial Fraction Integer
+--R                              AnonymousFunction
+--R      
+--R      Perhaps you should use "@" to indicate the required return type, 
+--R      or "$" to specify which version of the function you need.
+--E
+
+--S 99
 E n == (1-x**2)*dx**2-2*x*dx+n*(n+1)
+--R                                                                   Type: 
Void
+--E
+
+--S 100
 L 15
--- used to fail on this line
+--R   Compiling function L with type Integer -> Polynomial Fraction 
+--R      Integer 
+--R   Compiling function L as a recurrence relation.
+--R
+--R   (4)
+--R     9694845  15   35102025  13   50702925  11   37182145  9   14549535  7
+--R     ------- x   - -------- x   + -------- x   - -------- x  + -------- x
+--R       2048          2048           2048           2048          2048
+--R   + 
+--R       2909907  5   255255  3   6435
+--R     - ------- x  + ------ x  - ---- x
+--R         2048        2048       2048
+--R                                            Type: Polynomial Fraction 
Integer
+--E
+
+@
+Used to fail on this line
+<<*>>=
+
+--S 101
 E 15
+--R   Compiling function E with type PositiveInteger -> Operator 
+--R      Polynomial Fraction Integer 
+--R
+--R                       2      2
+--R   (5)  240 - 2x D - (x  - 1)D
+--R                                   Type: Operator Polynomial Fraction 
Integer
+--E
 
--------------------------------------------------------------------
--- bmt/10/12/92 EFSTRUC recursion problem
--------------------------------------------------------------------
+@
+bmt/10/12/92 EFSTRUC recursion problem
+<<*>>=
 )clear all
+
+--S 102
 bug:=(1+x**(1/4))**(1/3)/(x**(1/2))
--- gives a value stack overflow
-integrate(bug,x) -- seems to go into infinite recursion in rischNormalize
+--R
+--R         +--------+
+--R        3|4+-+
+--R        \|\|x  + 1
+--R   (1)  -----------
+--R             +-+
+--R            \|x
+--R                                                     Type: Expression 
Integer
+--E
 
--------------------------------------------------------------------
--- james/10/28/92 coerce bug
--------------------------------------------------------------------
+@
+Gives a value stack overflow
+
+Seems to go into infinite recursion in rischNormalize
+<<*>>=
+--S 103
+integrate(bug,x)
+--R
+--R                              +--------+
+--R           4+-+2    4+-+     3|4+-+
+--R        (12\|x   + 3\|x  - 9)\|\|x  + 1
+--R   (2)  --------------------------------
+--R                        7
+--R                                          Type: Union(Expression 
Integer,...)
+--E
+
+@
+james/10/28/92 coerce bug
+
+Improper character in Roman numeral: G
+<<*>>=
 )clear all
--- improper character in Roman numeral: G
+
+--S 104
 g::ROMAN
+--R 
+--R 
+--RDaly Bug
+--R   >> Error detected within library code:
+--R   Improper character in Roman numeral: 
+--R   #\G
+--R
+--R   Continuing to read the file...
+--R
+--E
+
+@
+grabm/10/28/92 runs forever
 
--------------------------------------------------------------------
--- grabm/10/28/92 runs forever
--------------------------------------------------------------------
+factor is quick but sqrt runs forever
+<<*>>=
 )clear all
--- this is quick
+
+--S 105
 factor 1068303355883998767544567663620885466990173600
--- but this runs forever
-sqrt 1068303355883998767544567663620885466990173600
+--R
+--R         5 7 2 4  2  2  2
+--R   (1)  2 3 5 7 17 19 23 3343 4219 326705949951846198203
+--R                                                       Type: Factored 
Integer
+--E
 
+--S 106
+sqrt 1068303355883998767544567663620885466990173600
+--R
+--R                  +-----------------------------+
+--R   (2)  196571340\|27647393656301898872761810506
+--R                                                        Type: 
AlgebraicNumber
+--E
 
--------------------------------------------------------------------
--- themos/11/05/92 fortran output bug
--------------------------------------------------------------------
+@
+themos/11/05/92 fortran output bug
+<<*>>=
 )clear all
 --      REAL T7,T6,T5,T4,T3,T2,T1
 --      T1=x*x
@@ -503,670 +2262,3465 @@ sqrt 1068303355883998767544567663620885466990173600
 --     &16.*x)*T4+(-T5+16.*T6)*y)*COS(x))/(y**8+4.*T1*y**6+6.*T7*y**4+4.*x
 --     &**6*y*y+x**8)
 -- T7 is referenced before it is defined
-a1:=sin(x)/(x**2+y**2);a2:=D(a1,[x,y]);a2+D(a2,x)
-
--------------------------------------------------------------------
--- grabm/11/05/92 
--- comment:
---I believe the "bug" is that the interpreter is converting gb which is
---a list of dmp style polynomials to a list of POLY type polynomials.
---Unfortunately the result of such a conversion is no longer a groebner basis.
---I don't see any reasonable way to prevent this, and would therefore have to
---classify this as "user error", when working with grobner bases, the user
---needs to force all his polynomials to be the appropriate type (thus having
---the correct ordering).
--------------------------------------------------------------------
--- expressing a symmetric functions in terms of elementary symm. functions
--- working in POLY INT is o.k.
+
+--S 107
+a1:=sin(x)/(x**2+y**2)
+--R
+--R         sin(x)
+--R   (1)  -------
+--R         2    2
+--R        y  + x
+--R                                                     Type: Expression 
Integer
+--E
+
+--S 108
+a2:=D(a1,[x,y])
+--R
+--R                           3     2
+--R        8x y sin(x) + (- 2y  - 2x y)cos(x)
+--R   (2)  ----------------------------------
+--R               6     2 4     4 2    6
+--R              y  + 3x y  + 3x y  + x
+--R                                                     Type: Expression 
Integer
+--E
+
+--S 109
+a2+D(a2,x)
+--R
+--R   (3)
+--R          5      2           3      4     3      2
+--R       (2y  + (4x  + 8x + 8)y  + (2x  + 8x  - 40x )y)sin(x)
+--R     + 
+--R            5        2        3        4      3
+--R       (- 2y  + (- 4x  + 16x)y  + (- 2x  + 16x )y)cos(x)
+--R  /
+--R      8     2 6     4 4     6 2    8
+--R     y  + 4x y  + 6x y  + 4x y  + x
+--R                                                     Type: Expression 
Integer
+--E
+
+@
+grabm/11/05/92 
+
+I believe the ``bug'' is that the interpreter is converting gb which is
+a list of dmp style polynomials to a list of POLY type polynomials.
+Unfortunately the result of such a conversion is no longer a groebner basis.
+I don't see any reasonable way to prevent this, and would therefore have to
+classify this as ``user error'', when working with grobner bases, the user
+needs to force all his polynomials to be the appropriate type (thus having
+the correct ordering).
+
+Expressing a symmetric functions in terms of elementary symm. functions
+working in POLY INT is o.k.
+<<*>>=
+)clear all
+
+--S 110
 R := FRAC INT
---   (1)  Fraction Integer
+--R
+--R   (1)  Fraction Integer
+--R                                                                 Type: 
Domain
+--E
+
+--S 111
 lpx : List POLY R := [x1+x2+x3, x1*x2+x1*x3+x2*x3,x1*x2*x3]
---   (2)  [x3 + x2 + x1,(x2 + x1)x3 + x1 x2,x1 x2 x3]
-lip := [lpx.1-e3, lpx.2-e2, lpx.3-e1]
---   (3)  [x3 + x2 + x1 - e3,(x2 + x1)x3 + x1 x2 - e2,x1 x2 x3 - e1]
+--R
+--R   (2)  [x3 + x2 + x1,(x2 + x1)x3 + x1 x2,x1 x2 x3]
+--R                                       Type: List Polynomial Fraction 
Integer
+--E
+
+--S 112
+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
 gbp := groebner lip
---   (4)
---                         2                   2
---   [x3 + x2 + x1 - e3, x2  + (x1 - e3)x2 + x1  - e3 x1 + e2,
---      3        2
---    x1  - e3 x1  + e2 x1 - e1]
+--R
+--R   (4)
+--R                         2                   2
+--R   [x3 + x2 + x1 - e3, x2  + (x1 - e3)x2 + x1  - e3 x1 + e2,
+--R      3        2
+--R    x1  - e3 x1  + e2 x1 - e1]
+--R                                       Type: List Polynomial Fraction 
Integer
+--E
+
+--S 114
 normalForm(x1**2+x2**2+x3**2,gbp)
---          2
---   (5)  e3  - 2e2
--- working in DMP is o.k.
+--R
+--R          2
+--R   (5)  e3  - 2e2
+--R                                            Type: Polynomial Fraction 
Integer
+--E
+
+--S 115
 dmp := DMP([x1,x2,x3,e1,e2,e3],INT)
---   (6)  DistributedMultivariatePolynomial([x1,x2,x3,e1,e2,e3],Integer)
+--R
+--R   (6)  DistributedMultivariatePolynomial([x1,x2,x3,e1,e2,e3],Integer)
+--R                                                                 Type: 
Domain
+--E
+
+--S 116
 li : List dmp := [lpx.1-e1, lpx.2-e2, lpx.3-e3]
---   (7)  [x1 + x2 + x3 - e1,x1 x2 + x1 x3 + x2 x3 - e2,x1 x2 x3 - 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
 gb := groebner li
---   (8)
---                         2                     2
---   [x1 + x2 + x3 - e1, x2  + x2 x3 - x2 e1 + x3  - x3 e1 + e2,
---      3     2
---    x3  - x3 e1 + x3 e2 - e3]
+--R
+--R   (8)
+--R                         2                     2
+--R   [x1 + x2 + x3 - e1, x2  + x2 x3 - x2 e1 + x3  - x3 e1 + e2,
+--R      3     2
+--R    x3  - x3 e1 + x3 e2 - e3]
+--R    Type: List 
DistributedMultivariatePolynomial([x1,x2,x3,e1,e2,e3],Integer)
+--E
+
+--S 118
 p:dmp:=(x1**2+x2**2+x3**2)
---          2     2     2
---   (9)  x1  + x2  + x3
+--R
+--R          2     2     2
+--R   (9)  x1  + x2  + x3
+--R         Type: 
DistributedMultivariatePolynomial([x1,x2,x3,e1,e2,e3],Integer)
+--E
+
+--S 119
 normalForm(p,gb)
---           2
---   (10)  e1  - 2e2
--- but we have some problems (coercion? ordering?) here:
+--R
+--R           2
+--R   (10)  e1  - 2e2
+--RType: DistributedMultivariatePolynomial([x1,x2,x3,e1,e2,e3],Fraction 
Integer)
+--E
+
+--S 120
 normalForm(x1**2+x2**2+x3**2,gb)
---            2                      2              2
---   (11)  2x2  + (2x1 - 2e1)x2 + 2x1  - 2e1 x1 + e1
+--R
+--R            2                      2              2
+--R   (11)  2x2  + (2x1 - 2e1)x2 + 2x1  - 2e1 x1 + e1
+--R                                            Type: Polynomial Fraction 
Integer
+--E
 
+@
+bmt/11/17/92 Ifintegrate
+
+It seems that one cannot simply parametrize reducible curves.
+Any attempt at parametrization can only follow one branch.
+For curves of the form $y^2=a^2x^2+bx+c$, these are only reducible
+if $a^2x^2+bx+c$ is a perfect square. Basically I think we need to
+choose 1 branch in this case. Under some circumstances we could
+try to proceed down both branches and then unify the result, but for
+the time being, perhaps we should just perform the substitution
+$y=sqrt(a^2x^2+bx+c)$ whenever that is a perfect square.
+(then we don't even need to do any back subsitution or change to dx).
+
+For another example, perhaps due to the same essential difficulty try
+<<*>>=
+)clear all
 
+--S 121
+integrate(normalize(sqrt(1+cos(x)),x),x)
+--R
+--R                +--------+
+--R             x  |     x 2
+--R        2sin(-) |2cos(-)
+--R             2 \|     2
+--R   (1)  ------------------
+--R                  x
+--R              cos(-)
+--R                  2
+--R                                          Type: Union(Expression 
Integer,...)
+--E
 
+@
+This gets a non-invertible error
 
--------------------------------------------------------------------
--- bmt/11/17/92 Ifintegrate
--------------------------------------------------------------------
---It seems that one cannot simply parametrize reducible curves.
---Any attempt at parametrization can only follow one branch.
---For curves of the form y**2=a**2*x**2+b*x+c, these are only reducible
---if a**2*x**2+b*x+c is a perfect square. Basically I think we need to
---choose 1 branch in this case. Under some circumstances we could
---try to proceed down both branches and then unify the result, but for
---the time being, perhaps we should just perform the substitution
---y=sqrt(a**2*x**2+b*x+c) whenever that is a perfect square.
---(then we don't even need to do any back subsitution or change to dx).
---
---For another example, perhaps due to the same essential difficulty try
+I have fixed integrate(sqrt(1+cos(x)),x) and
 integrate(normalize(sqrt(1+cos(x)),x),x)
--- this gets a non-invertible error
+fix was to function prootintegrate in INTPAF in intaf.spad
 
---I have fixed integrate(sqrt(1+cos(x)),x) and
---integrate(normalize(sqrt(1+cos(x)),x),x)
---fix was to function prootintegrate in INTPAF in intaf.spad
+james/02/11/93 integrate
 
+used to give error:
+\begin{verbatim}
+  No identity element for reduce of empty list using operation max
+\end{verbatim}
+<<*>>=
+)clear all
 
--------------------------------------------------------------------
--- james/02/11/93 integrate
--- used to give error:
---   No identity element for reduce of empty list using operation
---   max
--------------------------------------------------------------------
+--S 122
 integrate(((-x-1)*log((x**2+x))**2+2*log(x))/(x+1),x)
+--R
+--R           x                 2      2
+--I         ++  (- %K - 1)log(%K  + %K)  + 2log(%K)
+--I   (1)   |   ----------------------------------- d%K
+--I        ++                  %K + 1
+--R                                          Type: Union(Expression 
Integer,...)
+--E
 
--------------------------------------------------------------------
--- dewar/02/15/93
--------------------------------------------------------------------
+@
+dewar/02/15/93
+
+\begin{verbatim}
+  i::Polynomial(Integer)
+  %::Union(Symbol,Polynomial Integer)
+  list %
+\end{verbatim}
+This is a bug in old style union handling, this style of unions
+will become obsolete, so the suggested fix is to use tagged unions instead:
+
+<<*>>=
 )clear all
---i::Polynomial(Integer)
---%::Union(Symbol,Polynomial Integer)
---list %
---
---this is a bug in old style union handling, this style of unions
---will become obsolete, so the suggested fix is to use tagged unions instead:
-i::POLY INT
-%::Union(s:Symbol, p:POLY INT)
-list % -- works
 
--------------------------------------------------------------------
--- grabm/03/04/93
--- parser bug? not for system commands
--------------------------------------------------------------------
+--S 123
+t1:=i::POLY INT
+--R
+--R   (1)  i
+--R                                                     Type: Polynomial 
Integer
+--E
+
+--S 124
+t2:=t1::Union(s:Symbol, p:POLY INT)
+--R
+--R   (2)  i
+--R                                       Type: Union(p: Polynomial 
Integer,...)
+--E
+
+--S 125
+list t2
+--R
+--R   (3)  [i]
+--R                            Type: List Union(s: Symbol,p: Polynomial 
Integer)
+--E
+
+@
+grabm/03/04/93 parser bug? not for system commands
+\begin{verbatim}
 )clear all
 -- gives error: Sorry, but no option begins with upd;
 )load /spad/mnt/rios/algebra/EQ )upd; a:=1
 -- works
 )load /spad/mnt/rios/algebra/EQ )upd ; a:=1
+\end{verbatim}
 
--------------------------------------------------------------------
--- bronstein/03/08/93
--------------------------------------------------------------------
+bronstein/03/08/93 wrong particular solution
+<<*>>=
 )clear all
+
+--S 126
 I:=operator 'I
+--R
+--R   (1)  I
+--R                                                          Type: 
BasicOperator
+--E
+
+--S 127
 J:=operator 'J
+--R
+--R   (2)  J
+--R                                                          Type: 
BasicOperator
+--E
+
+--S 128
 eq := mu * D(I x,x) = - (K + S) * I(x) + S*J(x)
+--R
+--R           ,
+--R   (3)  muI (x)= S J(x) + (- S - K)I(x)
+--R
+--R                                            Type: Equation Expression 
Integer
+--E
+
+--S 129
 solve(eq,I,x)
---> wrong particular solution
-
--------------------------------------------------------------------
--- dewar/03/16/93
--- bug writing backslash to files
---comment:
---This is not a bug, what is written to the file is the lisp representation
---of the string "\\test" (since '\' is lisp escape character).
---The file is read and written using lisp primitives and thus the escape
---characters need to be doubled. This is consistent, since if you read the
---item back in from the file, the correct string is reconstituted.
---
---If you want to create a text file which simply contains lines of text
---instead of lines of lisp strings, use:
---ofile : TextFile := open("test","output")  ...
---then you will get a file of literal strings with no string delimiters and
---no escape characters.
--------------------------------------------------------------------
+--R
+--R   (4)
+--R                  (- S - K)x                                       (- S - 
K)x
+--R                  ----------   x                                   
----------
+--I                      mu     ++        S J(%K)                         mu
+--I   [particular= %e           |   ------------------ d%K ,basis= [%e         
 ]]
+--I                            ++        - %K S - %K K
+--R                                      -------------
+--R                                            mu
+--R                                 mu %e
+--RType: Union(Record(particular: Expression Integer,basis: List Expression 
Integer),...)
+--E
+
+@
+
+dewar/03/16/93 bug writing backslash to files
+
+This is not a bug, what is written to the file is the lisp representation
+of the string "\\test" (since '\' is lisp escape character).
+The file is read and written using lisp primitives and thus the escape
+characters need to be doubled. This is consistent, since if you read the
+item back in from the file, the correct string is reconstituted.
+
+If you want to create a text file which simply contains lines of text
+instead of lines of lisp strings, use:
+\begin{verbatim}
+  ofile : TextFile := open("test","output")  ...
+\end{verbatim}
+then you will get a file of literal strings with no string delimiters and
+no escape characters.
+<<*>>=
 )clear all
+
+--S 130
 ofile: File String := open("/tmp/test","output")
--- this writes "\\\\test" but should write "\\test"
+--R
+--R   (1)  "/tmp/test"
+--R                                                            Type: File 
String
+--E
+
+@
+This writes ``\verb|\\\\test|'' but should write ``\verb|\\test|''
+<<*>>=
+
+--S 131
 write!(ofile,"\\test"::String)
+--R
+--R   (2)  "\\test"
+--R                                                                 Type: 
String
+--E
+
+--S 132
 close! ofile
+--R
+--R   (3)  "/tmp/test"
+--R                                                            Type: File 
String
+--E
+
+@
+
+themos/04/07/93 this sometimes fails
 
--------------------------------------------------------------------
--- themos/04/07/93
--- this sometimes fails
--- comment:
---thanks for tracing down the problem. Basically the lines for monicizing
---the result need to be done before we try to 
---retract back from the algebraic extension.
--------------------------------------------------------------------
+Thanks for tracing down the problem. Basically the lines for monicizing
+the result need to be done before we try to 
+retract back from the algebraic extension.
+<<*>>=
 )clear all
+
+--S 133
 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
+--R   (1)  x y  + x y z + x z  + x y z  + y z + y z
+--R                Type: DistributedMultivariatePolynomial([x,y,z],PrimeField 
2)
+--E
+
+--S 134
 factor pol
+--R
+--R         2 2    2       2 2        2    3       3
+--R   (2)  x y  + x y z + x z  + x y z  + y z + y z
+--R       Type: Factored DistributedMultivariatePolynomial([x,y,z],PrimeField 
2)
+--E
+
+@
+williamson/04/21/93
 
--------------------------------------------------------------------
--- williamson/04/21/93
--- comment:
---I ran into some problems when factoring polynomials over number fields.
---Evidently the interpretor doesn't choose the correct function 'factor'.
---It uses a function from MULTFACT, when it should be using a function from
---SAEFACT. 
--------------------------------------------------------------------
+I ran into some problems when factoring polynomials over number fields.
+Evidently the interpretor doesn't choose the correct function 'factor'.
+It uses a function from MULTFACT, when it should be using a function from
+SAEFACT. 
+<<*>>=
 )clear all
+
+--S 135
 up := UP('w,FRAC INT)
+--R
+--R   (1)  UnivariatePolynomial(w,Fraction Integer)
+--R                                                                 Type: 
Domain
+--E
+
+--S 136
 p : up := w**4 + w**3 + w**2 + w + 1
+--R
+--R         4    3    2
+--R   (2)  w  + w  + w  + w + 1
+--R                               Type: UnivariatePolynomial(w,Fraction 
Integer)
+--E
+
+--S 137
 sae := SAE(FRAC INT,up,p)
+--R
+--R   (3)
+--R  SimpleAlgebraicExtension(Fraction Integer,UnivariatePolynomial(w,Fraction 
Int
+--R  eger),w**4+w**3+w*w+w+1)
+--R                                                                 Type: 
Domain
+--E
+
+--S 138
 q : UP('x,sae) := x**5 - 1
-factor q -- used to report: x**5-1 
+--R
+--R         5
+--R   (4)  x  - 1
+--RType: UnivariatePolynomial(x,SimpleAlgebraicExtension(Fraction 
Integer,UnivariatePolynomial(w,Fraction Integer),w**4+w**3+w*w+w+1))
+--E
+
+@
+Used to report: x**5-1 
+<<*>>=
+--S 139
+factor q 
+--R
+--R                            2       3       3    2
+--R   (5)  (x - 1)(x - w)(x - w )(x - w )(x + w  + w  + w + 1)
+--RType: Factored UnivariatePolynomial(x,SimpleAlgebraicExtension(Fraction 
Integer,UnivariatePolynomial(w,Fraction Integer),w**4+w**3+w*w+w+1))
+--E
+
+--S 140
 saefact := SAEFACT(up,sae,UP('x,sae))
+--R
+--R   (6)
+--R  SimpleAlgebraicExtensionAlgFactor(UnivariatePolynomial(w,Fraction 
Integer),Si
+--R  mpleAlgebraicExtension(Fraction Integer,UnivariatePolynomial(w,Fraction 
Integ
+--R  
er),w**4+w**3+w*w+w+1),UnivariatePolynomial(x,SimpleAlgebraicExtension(Fracti
+--R  on Integer,UnivariatePolynomial(w,Fraction Integer),w**4+w**3+w*w+w+1)))
+--R                                                                 Type: 
Domain
+--E
+
+--S 141
 factor(q)$saefact
+--R
+--R                            2       3       3    2
+--R   (7)  (x - 1)(x - w)(x - w )(x - w )(x + w  + w  + w + 1)
+--RType: Factored UnivariatePolynomial(x,SimpleAlgebraicExtension(Fraction 
Integer,UnivariatePolynomial(w,Fraction Integer),w**4+w**3+w*w+w+1))
+--E
+
+@
+
+grabm/04/30/93
 
--------------------------------------------------------------------
--- grabm/04/30/93
--- comment:
---This bug has been fixed at yorktown, in radix.spad, change line 163, the
---third line of intgroup to be:
---      empty? rest li => intToExpr first(li)
---and then recompile RADIX
--------------------------------------------------------------------
+This bug has been fixed at yorktown, in radix.spad, change line 163, the
+third line of intgroup to be:
+\begin{verbatim}
+  empty? rest li => intToExpr first(li)
+\end{verbatim}
+and then recompile RADIX
+
+Results in 10 and not A
+<<*>>=
 )clear all
--- results in 10 and not A
+
+--S 142
 10::RadixExpansion(16)
+--R
+--R   (1)  A
+--R                                                      Type: RadixExpansion 
16
+--E
+
+@
address@hidden (manuel bronstein)
 
--------------------------------------------------------------------
--- address@hidden (manuel bronstein)
--------------------------------------------------------------------
+Used to return x, now returns 1
+<<*>>=
 )clear all
+
+--S 143
 r:=rule 'x == 1
--- used to return x, now returns 1
+--R
+--R   (1)  x == 1
+--R                        Type: RewriteRule(Integer,Integer,Expression 
Integer)
+--E
+
+--S 144
 r x
+--R
+--R   (2)  1
+--R                                                     Type: Expression 
Integer
+--E
+
+@
address@hidden (tony kennedy)
 
--------------------------------------------------------------------
--- address@hidden (tony kennedy)
--------------------------------------------------------------------
+<<*>>=
 )clear all
-factor(-12)
-%**2
 
--------------------------------------------------------------------
--- address@hidden (manuel bronstein)
--- >> Error: cannot retract nonconstant polynomial
--------------------------------------------------------------------
+--S 145
+t1:=factor(-12)
+--R
+--R           2
+--R   (1)  - 2 3
+--R                                                       Type: Factored 
Integer
+--E
+
+--S 146
+t1**2
+--R
+--R         4 2
+--R   (2)  2 3
+--R                                                       Type: Factored 
Integer
+--E
+
+@
address@hidden (manuel bronstein)
+
+Error: cannot retract nonconstant polynomial
+<<*>>=
 )clear all
+
+--S 147
 complexNumeric(log(sqrt(-3)))
+--R
+--R   (1)  0.5493061443 340548457 + 1.5707963267 948966192 %i
+--R                                                          Type: Complex 
Float
+--E
+
+@
address@hidden/8/15/93 (Claude Quitte)
+
+Why is it impossible to specify the target/cible types for the
+functions leftProductBy and rightProductBy in the body of the package ???
 
--------------------------------------------------------------------
--- address@hidden/8/15/93 (Claude Quitte)
--------------------------------------------------------------------
+The code for leftProductBy is correct but the code for rightProductBy
+troubles the compiler !!!! It seems to compile a LOCAL function with
+ANOTHER signature.
+
+\begin{verbatim}
+   initializing nrlib TEST for Test
+   compiling into nrlib TEST
+   compiling exported leftProductBy : Integer -> Integer -> Integer
+Time: 0.35 SEC.
+
+   compiling local rightProductBy : Integer -> Integer
+****** comp fails at level 2 with expression: ******
+error in function rightProductBy
+
+****** level 2  ******
+$x:= #1
+$m:= $EmptyMode
+$f:=
+((((|n| # #) (|rightProductBy| # # #) (|n| #) (|rightProductBy| # # #) ...)))
+
+   >> Apparent user error:
+   no mode found for
+   #1
+   You are being returned to the top level of the interpreter.
+\end{verbatim}
+answer (barry):
+
+Your problem in TEST about specifying target types which are Mapping's
+was a bug in the compiler and has been fixed for Axiom release 2.0.
+
+<<*>>=
+\begin{verbatim}
 )clear all
---)abbreviation package TEST Test
---
---Test() : with
---
---   leftProductBy : Integer -> (Integer -> Integer)
---   rightProductBy : Integer -> Mapping(Integer, Integer)
---
--- == add
---
---   leftProductBy(n) == n * #1
---
---   rightProductBy(n : Integer) : Mapping(Integer, Integer) == #1 * n
---------------------------------------------------------------------------
---
---Why is it impossible to specify the target/cible types for the
---functions leftProductBy and rightProductBy in the body of the package ???
---
---The code for leftProductBy is correct but the code for rightProductBy
---troubles the compiler !!!! It seems to compile a LOCAL function with
---ANOTHER signature.
---
---------------------------------------------------------------------------
---   initializing nrlib TEST for Test
---   compiling into nrlib TEST
---   compiling exported leftProductBy : Integer -> Integer -> Integer
---Time: 0.35 SEC.
---
---   compiling local rightProductBy : Integer -> Integer
---****** comp fails at level 2 with expression: ******
---error in function rightProductBy
---
---****** level 2  ******
---$x:= #1
---$m:= $EmptyMode
---$f:=
---((((|n| # #) (|rightProductBy| # # #) (|n| #) (|rightProductBy| # # #) ...)))
---
---   >> Apparent user error:
---   no mode found for
---   #1
---   You are being returned to the top level of the interpreter.
-------------------------------------------------------------------------
--- answer (barry):
---
---Your problem in TEST about specifying target types which are Mapping's
---was a bug in the compiler and has been fixed for Axiom release 2.0.
---
+)sys rm -f /tmp/tpd.spad
+)lisp (setq ofile (open "/tmp/tpd.spad" :direction :output))
+)lisp (format ofile ")abbreviation package TPD Tpd~%")
+)lisp (format ofile "Tpd() : with~%")
+)lisp (format ofile "   leftProductBy : Integer -> (Integer -> Integer)~%")
+)lisp (format ofile "   rightProductBy : Integer -> Mapping(Integer, 
Integer)~%")
+)lisp (format ofile "  == add~%")
+)lisp (format ofile "   leftProductBy(n) == n * #1~%")
+)lisp (format ofile "   rightProductBy(n : Integer) : Mapping(Integer, 
Integer) == #1 * n~%")
+)lisp (close ofile)
+)compile /tmp/tpd.spad
+)sys rm -f /tmp/tpd.spad
+)sys rm -rf /tmp/TPD.nrlib
 
--------------------------------------------------------------------
--- address@hidden/10/6/93 (Manuel Bronstein)
--------------------------------------------------------------------
+@
address@hidden/10/6/93 (Manuel Bronstein)
+
+Here is algfunc.spad with an old bug fixed: eventh-roots of negative floats
+coerced to EXPR FLOAT (e.g. sqrt(-1::EXPR FLOAT)) used to produced an error
+message since the sqrt from FLOAT was called. 
+
+I have now fixed iroot from AF(R,)
+to call the sqrt from R only if either R is algebraically closed, or the
+root is odd, or the argument is positive. Here's the new behaviour:
+
+As a side-effect, this fixes the problem with numeric
+(which was instantiating \verb|sqrt(-1)\$EXPR(FLOAT))|.
+<<*>>=
 )clear all
---Here is algfunc.spad with an old bug fixed: eventh-roots of negative floats
---coerced to EXPR FLOAT (e.g. sqrt(-1::EXPR FLOAT)) used to produced an error
---message since the sqrt from FLOAT was called. 
---I have now fixed iroot from AF(R,)
---to call the sqrt from R only if either R is algebraically closed, or the
---root is odd, or the argument is positive. Here's the new behaviour:
+
+--S 148
 sqrt(-1::EXPR FLOAT)
+--R
+--R         +-----+
+--R   (1)  \|- 1.0
+--R                                                       Type: Expression 
Float
+--E
+
+--S 149
 sqrt(2::EXPR FLOAT)
+--R 
+--R
+--R   (2)  1.4142135623 730950488
+--R                                                       Type: Expression 
Float
+--E
+
+--S 150
 nthRoot(-2::EXPR FLOAT, 3)
+--R
+--R   (3)  - 1.2599210498 948731648
+--R                                                       Type: Expression 
Float
+--E
+
+--S 151
 nthRoot(-2::EXPR FLOAT, 4)
---As a side-effect, this fixes the problem with numeric
--- (which was instantiating sqrt(-1)$EXPR(FLOAT)).
+--R
+--R        4+-----+
+--R   (4)  \|- 2.0
+--R                                                       Type: Expression 
Float
+--E
 
--------------------------------------------------------------------
--- address@hidden/10/6/93 (Manuel Bronstein)
--------------------------------------------------------------------
+@
address@hidden/10/6/93 (Manuel Bronstein)
+
+Here is an updated efstruc.spad where ker2trigs now knows about abs.
+<<*>>=
 )clear all
---Here is an updated efstruc.spad where ker2trigs now knows about abs.
-real abs(4 + %i * 5) -- does the right thing.
 
--------------------------------------------------------------------
--- address@hidden/10/5/93 (Manuel Bronstein)
--------------------------------------------------------------------
+--S 152
+real abs(4 + %i * 5)
+--R
+--R         +--+
+--R   (1)  \|41
+--R                                                     Type: Expression 
Integer
+--E
+
+@
address@hidden/10/5/93 (Manuel Bronstein)
+
+Here is again an enhanced elemntry.spad. What happens now is that
+\begin{verbatim}
+  exp(q * %i * %pi)
+\end{verbatim}
+gets automatically simplifed whenever q is a rational number whose
+denominator is one of  \{1,2,3,4,6\}.
+<<*>>=
 )clear all
---Here is again an enhanced elemntry.spad. What happens now is that
-exp(q * %i * %pi)
---gets automatically simplifed whenever q is a rational number whose
---denominator is one of  {1,2,3,4,6}.
+
+--S 153
 exp(5/3*%i*%pi)
+--R
+--R             +-+
+--R        - %i\|3  + 1
+--R   (1)  ------------
+--R              2
+--R                                             Type: Expression Complex 
Integer
+--E
 
--------------------------------------------------------------------
--- address@hidden/10/4/93 (Manuel Bronstein)
--- address@hidden (Richard Luczak)
--------------------------------------------------------------------
+@
address@hidden/10/4/93 (Manuel Bronstein),\\
address@hidden (Richard Luczak)
+<<*>>=
 )clear all
+
+--S 154
 exp(log(-1))
+--R
+--R   (1)  - 1
+--R                                                     Type: Expression 
Integer
+--E
+
+--S 155
 sum((-1)**k * (k+m),k=0..n)
+--R
+--R                          n
+--R        (2n + 2m + 1)(- 1)  + 2m - 1
+--R   (2)  ----------------------------
+--R                      4
+--R                                                     Type: Expression 
Integer
+--E
+
+@
address@hidden/10/4/93 (Manuel Bronstein)
 
--------------------------------------------------------------------
--- address@hidden/10/4/93 (Manuel Bronstein)
--------------------------------------------------------------------
+Simplifies (abs now checks quotients instead of just retraction to R).
+<<*>>=
 )clear all
---simplifies (abs now checks quotients instead of just retraction to R).
+
+--S 156
 abs((1/2)::EXPR(INT))
+--R
+--R        1
+--R   (1)  -
+--R        2
+--R                                                     Type: Expression 
Integer
+--E
 
--------------------------------------------------------------------
--- address@hidden/10/4/93 (Manuel Bronstein)
--------------------------------------------------------------------
+@
address@hidden/10/4/93 (Manuel Bronstein)
+<<*>>=
 )clear all
+
+--S 157
 integrate(1/(x**2 + %i*a),x)
+--R
+--R         +--+         +--+         +--+           +--+
+--R         |%i          |%i          |%i            |%i
+--R         |-- log(%i a |--  + x) -  |-- log(- %i a |--  + x)
+--R        \| a         \| a         \| a           \| a
+--R   (1)  ---------------------------------------------------
+--R                                 2
+--R                                  Type: Union(Expression Complex 
Integer,...)
+--E
 
--------------------------------------------------------------------
--- address@hidden/9/28/93 (Barry Trager)
--------------------------------------------------------------------
+@
address@hidden/9/28/93 (Barry Trager)
+<<*>>=
 )clear all
+
+--S 158
 limit(1/2**n,n=%plusInfinity)
+--R
+--R   (1)  0
+--R                        Type: Union(OrderedCompletion Expression 
Integer,...)
+--E
+
+@
address@hidden/9/22/93 (Manuel Bronstein)
 
--------------------------------------------------------------------
--- address@hidden/9/22/93 (Manuel Bronstein)
--------------------------------------------------------------------
+Here is an update to efstruc.spad that handles complex constants much better.
+Negative square roots and negative logs are now recognized as complex and
+treated properly by real?, real, imag, and complexForm:
+
+As a result, integrals involving sqrt(-2) etc... are now treated correctly
+(this was the case only for sqrt(-1) with the older version).
+<<*>>=
 )clear all
---Here is an update to efstruc.spad that handles complex constants much better.
---Negative square roots and negative logs are now recognized as complex and
---treated properly by real?, real, imag, and complexForm:
+
+--S 159
 x := sqrt(-3) + sqrt 2 + sqrt(- exp a) + log(-a**2-1)
+--R
+--R         +-----+
+--R         |    a           2         +-+    +---+
+--R   (1)  \|- %e   + log(- a  - 1) + \|2  + \|- 3
+--R                                                     Type: Expression 
Integer
+--E
+
+--S 160
 real? x
+--R
+--R   (2)  false
+--R                                                                Type: 
Boolean
+--E
+
+--S 161
 real x
+--R
+--R             2         +-+
+--R   (3)  log(a  + 1) + \|2
+--R                                                     Type: Expression 
Integer
+--E
+
+--S 162
 imag x
---As a result, integrals involving sqrt(-2) etc... are now treated correctly
---(this was the case only for sqrt(-1) with the older version).
-
--------------------------------------------------------------------
--- address@hidden/9/22/93 (Manuel Bronstein)
--------------------------------------------------------------------
-)clear all
--->> haha := rule x*x == z
--->> haha(a*a + b*b + c**2)        -->  3z
--->> haha(a*a + b*b + c**2 + d*d)  -->  z
--->>
--->> the bug is that the last line returns z instead of 4z.
---
---Sorry guys, this is not a bug: haha is so general a rule that it matches
---the integer 4 (as 2 squared), so the rewrite chain for the last example is:
---
---a*a + b*b + c**2 + d*d  --->  z + z + z + z  = 4 * z ---> z * z ---> z
---
---Here is a console showing what exactly happens:
+--R
+--R         +---+
+--R         |  a     +-+
+--R   (4)  \|%e   + \|3  + %pi
+--R                                                     Type: Expression 
Integer
+--E
+
+@
address@hidden/9/22/93 (Manuel Bronstein)
+\begin{verbatim}
+  haha := rule x*x == z
+  haha(a*a + b*b + c**2)        -->  3z
+  haha(a*a + b*b + c**2 + d*d)  -->  z
+\end{verbatim}
+
+The bug is that the last line returns z instead of 4z.
+
+Sorry guys, this is not a bug: haha is so general a rule that it matches
+the integer 4 (as 2 squared), so the rewrite chain for the last example is:
+\begin{verbatim}
+ a*a + b*b + c**2 + d*d  --->  z + z + z + z  = 4 * z ---> z * z ---> z
+\end{verbatim}
+Here is a console showing what exactly happens:
+<<*>>=
+)clear all
+
+--S 163
 haha := rule x*x == z
+--R
+--R         2
+--R   (1)  x  == z
+--R                        Type: RewriteRule(Integer,Integer,Expression 
Integer)
+--E
+
+--S 164
 haha 4
+--R
+--R   (2)  z
+--R                                                     Type: Expression 
Integer
+--E
+
+--S 165
 haha 3
+--R
+--R   (3)  3
+--R                                                     Type: Expression 
Integer
+--E
+
+--S 166
 haha(4*z)
+--R
+--R   (4)  z
+--R                                                     Type: Expression 
Integer
+--E
+
+--S 167
 haha(3*z)
---To see the whole rewrite chain:
-a*a + b*b + c**2 + d*d
-applyRules([haha], %, 1)$APPRULE(INT,INT,EXPR INT)
-applyRules([haha], %, 1)$APPRULE(INT,INT,EXPR INT)
-applyRules([haha], %, 1)$APPRULE(INT,INT,EXPR INT)
---I think it's actually the proper behavior for the pattern matcher. This
---example shows that rules can bite, something Mma users are quite aware about!
-
--------------------------------------------------------------------
--- dewar/9/16/93 (mike dewar)
--------------------------------------------------------------------
---There's an odd discontinuity about the behaviour of the following
---function:
+--R
+--R   (5)  3z
+--R                                                     Type: Expression 
Integer
+--E
+
+@
+To see the whole rewrite chain:
+<<*>>=
+
+--S 168
+t1:=a*a + b*b + c**2 + d*d
+--R
+--R         2    2    2    2
+--R   (6)  d  + c  + b  + a
+--R                                                     Type: Polynomial 
Integer
+--E
+
+--S 169
+t2:=applyRules([haha], t1, 1)$APPRULE(INT,INT,EXPR INT)
+--R
+--R   (7)  4z
+--R                                                     Type: Expression 
Integer
+--E
+
+--S 170
+t3:=applyRules([haha], t2, 1)$APPRULE(INT,INT,EXPR INT)
+--R
+--R         2
+--R   (8)  z
+--R                                                     Type: Expression 
Integer
+--E
+
+--S 171
+t4:=applyRules([haha], t3, 1)$APPRULE(INT,INT,EXPR INT)
+--R
+--R   (9)  z
+--R                                                     Type: Expression 
Integer
+--E
+
+@
+I think it's actually the proper behavior for the pattern matcher. This
+example shows that rules can bite, something Mma users are quite aware about!
+
+dewar/9/16/93 (mike dewar)
+
+There's an odd discontinuity about the behaviour of the following function:
+
+<<*>>=
+)clear all
 
+--S 172
 harm(1) == 1
+--R                                                                   Type: 
Void
+--E
+
+--S 173
 harm(n) == harm(n-1) + 1/n
+--R                                                                   Type: 
Void
+--E
+
+--S 174
 harm : Integer -> Fraction Integer
-harm(1023) -- takes a little while, as expected
-harm(1024) -- takes forever?
-
--------------------------------------------------------------------
--- address@hidden/9/1/93 (Clifton Williamson)
--------------------------------------------------------------------
---> we should probably support integrate(%,x) on series types.
---> x could be either the variable of expansion or a parameter variable.
---
---We've discussed this before with regard to the function 'differentiate'.
---The technical problem is that "generalized" power series may have
---"coefficients" involving the series variable:
-series(x**x,x=0)
---In this case, as currently implemented, 'differentiate' returns incorrect
---answers:
-)set mess test off
-differentiate %
-)set mess test on
---The solution we discussed (perhaps "resolution" is a better word) was to
---create a separate series type for generalized series.  This would be a
---carbon copy of UPXS, except that differentiate(series,variable(series)) and
---integrate(series,variable(series)) would return an error message.  The
---error message could also suggest that the user first apply 'approximate',
---then compute a derivative or integral.  We would also have a coercion from
---UPXS to this type.  The function 'series' would return a UPXS, when the
---coefficients do not involve the series variable, and a "generalized series",
---when the coefficients involve the series variable.
---
---If this sounds cool to you, I'll go ahead with it when I have time.  (I'm
---trying to meet a 16 September deadline for a MEGA '94 submission.  I'm still
---getting my results together, so time is tight.  Let me know if there is a
---time deadline for the AXIOM code!)
---
---> Also we need better tools for taking finite truncations of series objects.
---> In particular since we now mostly use series(expr,var) to create a series,
---> UPXS if over a coefficient domain which supports the symbol of expansion,
---> should be able to truncate a series to an EXPR.
---
---I thought I had you on this one!  The signature is there (in pscat.spad):
---
---    if Coef has coerce: Symbol -> Coef then
---      if Coef has "**":(Coef,Expon) -> Coef then
---        approximate: ($,Expon) -> Coef
---          ++ \spad{approximate(f)} returns a truncated power series with the
---          ++ series variable viewed as an element of the coefficient domain.
---
---It certainly works for Laurent series:
-laurent(cos(a+x)/x,x=0)
-approximate(%,3)
---But, unfortunately, I never implemented it for Puiseux series:
-puiseux(cos(a+x)/x,x=0)
-approximate(%,3)
-series(cos(x**(2/3) + a),x=0)
-approximate(%,2)
-approximate(%% 1,7/5)
-
-
--------------------------------------------------------------------
--- address@hidden/10/6/93 (manuel bronstein)
--------------------------------------------------------------------
-)clear all
-)set message type off
-
--- Here is algfunc.spad with an old bug fixed: eventh-roots of negative floats
--- coerced to EXPR FLOAT (e.g. sqrt(-1::EXPR FLOAT)) used to produced an error
--- message since the sqrt from FLOAT was called. 
--- I have now fixed iroot from AF(R,)
--- to call the sqrt from R only if either R is algebraically closed, or the
--- root is odd, or the argument is positive. Here's the new behaviour:
+--R                                                                   Type: 
Void
+--E
+
+--S 175
+harm(1023)
+--R   Compiling function harm with type Integer -> Fraction Integer 
+--R   Compiling function harm as a recurrence relation.
+--R
+--R   (4)
+--R    
56918929836783747778186562994910417364284519936484803738256503363047591584_
+--R     
2733402533503384016070102378254838554019021072460441324115730731899754524_
+--R     
3051637047716166927952839924926898113855910441901034429495456850574721819_
+--R     
0959291999714039498339199810512595613399980225816207570338522992407348206_
+--R     
8458996501642275777927445608416707051265982507444007863105751583310646982_
+--R     
3197880912123301992627534179914738912810939235218743092316208657821544413_
+--R     7507111
+--R  /
+--R    
75809030906834453523777687598142141106414192506285711254121803198491495253_
+--R     
8828569124484088941284219071465702944545255084351101237230340026626588247_
+--R     
6367291194600696876416243191521584529737974727209031624214028323361847170_
+--R     
9764957043186933388156027004157275042770718773974970630837005685761111898_
+--R     
3824612373575784564285126841732340269099782510311467722310664215128464192_
+--R     
0090417465131869897386008931792841181410706392968052396422445537614139284_
+--R     160000
+--R                                                       Type: Fraction 
Integer
+--E
+
+--S 176
+harm(1024)
+--R
+--R   (5)
+--R    
11385266612491648666057698881942984686550388639494349140449232739078238853_
+--R     
8713454502191389383076154933054707275314439864005454497269185801458595955_
+--R     
4127443958199377930451435489735214028719028533199097687298001800355635024_
+--R     
8967439746760057644460577384504944069458175160764295712712838133748769663_
+--R     
0859452124788876557627760315566968995024077356615956093475101696822581124_
+--R     
2802077948390776255359440156469896861491512274902986275736609357453715408_
+--R     90803597
+--R  /
+--R    
15161806181366890704755537519628428221282838501257142250824360639698299050_
+--R     
7765713824896817788256843814293140588909051016870220247446068005325317649_
+--R     
5273458238920139375283248638304316905947594945441806324842805664672369434_
+--R     
1952991408637386677631205400831455008554143754794994126167401137152222379_
+--R     
6764922474715156912857025368346468053819956502062293544462132843025692838_
+--R     
4018083493026373979477201786358568236282141278593610479284489107522827856_
+--R     8320000
+--R                                                       Type: Fraction 
Integer
+--E
+
+@
address@hidden/9/1/93 (Clifton Williamson)
+
+We should probably support integrate(%,x) on series types.
+x could be either the variable of expansion or a parameter variable.
+
+We've discussed this before with regard to the function 'differentiate'.
+The technical problem is that ``generalized'' power series may have
+``coefficients'' involving the series variable:
+<<*>>=
+)clear all
+
+--S 177
+t1:=series(x**x,x=0)
+--R
+--R   (1)
+--R                         2            3            4            5
+--R                   log(x)   2   log(x)   3   log(x)   4   log(x)   5
+--R     1 + log(x)x + ------- x  + ------- x  + ------- x  + ------- x
+--R                      2            6            24          120
+--R   + 
+--R           6            7            8            9            10
+--R     log(x)   6   log(x)   7   log(x)   8   log(x)   9   log(x)    10      
11
+--R     ------- x  + ------- x  + ------- x  + ------- x  + -------- x   + O(x 
 )
+--R       720          5040        40320        362880       3628800
+--R                   Type: GeneralUnivariatePowerSeries(Expression 
Integer,x,0)
+--E
+
+@
+In this case, as currently implemented, 'differentiate' returns incorrect
+answers:
+<<*>>=
+
+--S 178
+differentiate t1
+ 
+   >> Error detected within library code:
+   "'differentiate' unavailable on this domain;  use 'approximate' first"
+
+--E
+
+@
+The solution we discussed (perhaps ``resolution'' is a better word) was to
+create a separate series type for generalized series.  This would be a
+carbon copy of UPXS, except that differentiate(series,variable(series)) and
+integrate(series,variable(series)) would return an error message.  The
+error message could also suggest that the user first apply 'approximate',
+then compute a derivative or integral.  We would also have a coercion from
+UPXS to this type.  The function 'series' would return a UPXS, when the
+coefficients do not involve the series variable, and a ``generalized series'',
+when the coefficients involve the series variable.
+
+If this sounds cool to you, I'll go ahead with it when I have time.  (I'm
+trying to meet a 16 September deadline for a MEGA '94 submission.  I'm still
+getting my results together, so time is tight.  Let me know if there is a
+time deadline for the AXIOM code!)
+
+Also we need better tools for taking finite truncations of series objects.
+In particular since we now mostly use series(expr,var) to create a series,
+UPXS if over a coefficient domain which supports the symbol of expansion,
+should be able to truncate a series to an EXPR.
+
+I thought I had you on this one!  The signature is there (in pscat.spad):
+\begin{verbatim}
+    if Coef has coerce: Symbol -> Coef then
+      if Coef has "**":(Coef,Expon) -> Coef then
+        approximate: ($,Expon) -> Coef
+          ++ \spad{approximate(f)} returns a truncated power series with the
+          ++ series variable viewed as an element of the coefficient domain.
+\end{verbatim}
+It certainly works for Laurent series:
+<<*>>=
+)clear all
+
+--S 179
+t1:=laurent(cos(a+x)/x,x=0)
+--R
+--R   (1)
+--R            - 1            cos(a)     sin(a)  2   cos(a)  3   sin(a)  4
+--R     cos(a)x    - sin(a) - ------ x + ------ x  + ------ x  - ------ x
+--R                              2          6          24          120
+--R   + 
+--R       cos(a)  5   sin(a)  6   cos(a)  7   sin(a)  8    cos(a)  9      10
+--R     - ------ x  + ------ x  + ------ x  - ------ x  - ------- x  + O(x  )
+--R         720        5040        40320      362880      3628800
+--R                        Type: UnivariateLaurentSeries(Expression 
Integer,x,0)
+--E
+
+--S 180
+approximate(t1,3)
+--R
+--R           3                  4      2
+--R        (4x  - 24x)sin(a) + (x  - 12x  + 24)cos(a)
+--R   (2)  ------------------------------------------
+--R                            24x
+--R                                                     Type: Expression 
Integer
+--E
+
+@
+But, unfortunately, I never implemented it for Puiseux series:
+<<*>>=
+
+--S 181
+t2:=puiseux(cos(a+x)/x,x=0)
+--R
+--R   (3)
+--R            - 1            cos(a)     sin(a)  2   cos(a)  3   sin(a)  4
+--R     cos(a)x    - sin(a) - ------ x + ------ x  + ------ x  - ------ x
+--R                              2          6          24          120
+--R   + 
+--R       cos(a)  5   sin(a)  6   cos(a)  7   sin(a)  8    cos(a)  9      10
+--R     - ------ x  + ------ x  + ------ x  - ------ x  - ------- x  + O(x  )
+--R         720        5040        40320      362880      3628800
+--R                        Type: UnivariatePuiseuxSeries(Expression 
Integer,x,0)
+--E
+
+--S 182
+approximate(t2,3)
+--R
+--R           3                  4      2
+--R        (4x  - 24x)sin(a) + (x  - 12x  + 24)cos(a)
+--R   (4)  ------------------------------------------
+--R                            24x
+--R                                                     Type: Expression 
Integer
+--E
+
+--S 183
+t3:=series(cos(x**(2/3) + a),x=0)
+--R
+--R   (5)
+--R                   2           4                       8           10      
11
+--R                   -           -                       -           --      
--
+--R                   3   cos(a)  3   sin(a)  2   cos(a)  3   sin(a)   3       
3
+--R   cos(a) - sin(a)x  - ------ x  + ------ x  + ------ x  - ------ x   + O(x 
 )
+--R                          2           6          24          120
+--R                        Type: UnivariatePuiseuxSeries(Expression 
Integer,x,0)
+--E
+
+--S 184
+approximate(t3,2)
+--R
+--R                 3+-+2            3+-+    2
+--R        - 6sin(a)\|x   - 3x cos(a)\|x  + x sin(a) + 6cos(a)
+--R   (6)  ---------------------------------------------------
+--R                                 6
+--R                                                     Type: Expression 
Integer
+--E
+
+--S 185
+approximate(t1,7)
+--R
+--R   (7)
+--R          7       5        3
+--R       (8x  - 336x  + 6720x  - 40320x)sin(a)
+--R     + 
+--R         8      6        4         2
+--R       (x  - 56x  + 1680x  - 20160x  + 40320)cos(a)
+--R  /
+--R     40320x
+--R                                                     Type: Expression 
Integer
+--E
+
+@
address@hidden/10/6/93 (manuel bronstein)
+
+Here is algfunc.spad with an old bug fixed: eventh-roots of negative floats
+coerced to EXPR FLOAT (e.g. sqrt(-1::EXPR FLOAT)) used to produced an error
+message since the sqrt from FLOAT was called. 
+
+I have now fixed iroot from AF(R,)
+to call the sqrt from R only if either R is algebraically closed, or the
+root is odd, or the argument is positive. Here's the new behaviour:
+<<*>>=
+)clear all
+
+--S 186
 sqrt(-1::EXPR FLOAT)
+--R
+--R         +-----+
+--R   (1)  \|- 1.0
+--R                                                       Type: Expression 
Float
+--E
+
+--S 187
 sqrt(2::EXPR FLOAT)
+--R
+--R   (2)  1.4142135623 730950488
+--R                                                       Type: Expression 
Float
+--E
+
+--S 188
 nthRoot(-2::EXPR FLOAT, 3)
+--R
+--R   (3)  - 1.2599210498 948731648
+--R                                                       Type: Expression 
Float
+--E
+
+--S 189
 nthRoot(-2::EXPR FLOAT, 4)
---As a side-effect, this fixes the problem with numeric
--- (which was instantiating sqrt(-1)$EXPR(FLOAT)).
+--R
+--R        4+-----+
+--R   (4)  \|- 2.0
+--R                                                       Type: Expression 
Float
+--E
 
--------------------------------------------------------------------
--- address@hidden/9/22/93 (manuel bronstein)
--------------------------------------------------------------------
-)clear all
---Here is a (rather major) bug fix to ffactor in FSUPFACT.nrlib. It causes
---a large family of integrals to return 0, because ffactor(?**2+expr) returned
---?**2 when expr involved a parameter. This is fixed now.
+@
+As a side-effect, this fixes the problem with numeric
+(which was instantiating sqrt(-1)\$EXPR(FLOAT)).
+
address@hidden/9/22/93 (manuel bronstein)
+
+Here is a (rather major) bug fix to ffactor in FSUPFACT.nrlib. It causes
+a large family of integrals to return 0, because ffactor(?**2+expr) returned
+?**2 when expr involved a parameter. This is fixed now.
+
address@hidden/8/15/93 James Davenport
+
+\begin{verbatim}
+   (1)
+   VCONCAT
+                             log(x)
+                       atan(---------)
+                             +------+
+                             | 2
+           2                \|a  - 1
+      ((- a  + 1<0) -> ---------------)
+                           +------+
+                           | 2
+                          \|a  - 1
+  ,
+      PAREN
+               2
+           (- a  + 1>0)
+         ->
+                                      +--------+
+                          2    2      |   2           2
+               log((log(x)  - a  + 1)\|- a  + 1  + (2a  - 2)log(x))
+             +
+                           2    2
+               - log(log(x)  + a  - 1)
+          /
+               +--------+
+               |   2
+             2\|- a  + 1
+  ,
+                            1
+      ( Or (a - 1=0) -> - ------)
+           (a + 1=0)      log(x)
+                                          Type: ConditionalExpression Integer
+
+\end{verbatim}
+is still fairly ugly.
 
--------------------------------------------------------------------
--- address@hidden/8/15/93 James Davenport
--------------------------------------------------------------------
+<<*>>=
 )clear all
+
+--S 190
 integrate(1/(x*(log(x)**2+a**2-1)),x)
---   (1)
---   VCONCAT
---                             log(x)
---                       atan(---------)
---                             +------+
---                             | 2
---           2                \|a  - 1
---      ((- a  + 1<0) -> ---------------)
---                           +------+
---                           | 2
---                          \|a  - 1
---  ,
---      PAREN
---               2
---           (- a  + 1>0)
---         ->
---                                      +--------+
---                          2    2      |   2           2
---               log((log(x)  - a  + 1)\|- a  + 1  + (2a  - 2)log(x))
---             +
---                           2    2
---               - log(log(x)  + a  - 1)
---          /
---               +--------+
---               |   2
---             2\|- a  + 1
---  ,
---                            1
---      ( Or (a - 1=0) -> - ------)
---           (a + 1=0)      log(x)
---                                          Type: ConditionalExpression Integer
---
---is still fairly ugly.
+--R
+--R   (1)
+--R                           +--------+                                
+------+
+--R               2    2      |   2           2                         | 2
+--R        (log(x)  - a  + 1)\|- a  + 1  + (2a  - 2)log(x)       log(x)\|a  - 1
+--R    log(-----------------------------------------------) 
atan(---------------)
+--R                              2    2                                2
+--R                        log(x)  + a  - 1                           a  - 1
+--R   
[----------------------------------------------------,---------------------]
+--R                          +--------+                            +------+
+--R                          |   2                                 | 2
+--R                        2\|- a  + 1                            \|a  - 1
+--R                                     Type: Union(List Expression 
Integer,...)
+--E
 
--------------------------------------------------------------------
--- address@hidden/8/9/93 (manuel bronstein)
--------------------------------------------------------------------
+@
address@hidden/8/9/93 (manuel bronstein)
+
+Here is efstruc.spad with a change to normalize so that
+this now returns  2**(1/4) ** 2 + 2**(1/4)
+<<*>>=
 )clear all
---Here is efstruc.spad with a change to normalize so that
-normalize(2**(1/2) + 2**(1/4)) now returns  2**(1/4) ** 2 + 2**(1/4).
 
+--S 191
+normalize(2**(1/2) + 2**(1/4)) 
+--R
+--R        4+-+2   4+-+
+--R   (1)  \|2   + \|2
+--R                                                     Type: Expression 
Integer
+--E
 
--------------------------------------------------------------------
--- address@hidden/8/7/93 satoshi hamaguchi
--------------------------------------------------------------------
+@
+
address@hidden/8/7/93 satoshi hamaguchi
+
+In axiom, both of these yield a warning ``potentialPole''.
+If I use ``noPole'' they give the right answer.
+Isn't this a bug?
+<<*>>=
 )clear all
--- In axiom, both
-  integrate(%e**x,x=0..1)
---and
-  integrate(log(x),x=1..2)
---yield a warning  potentialPole    .
---If I use "noPole", they give right answers. Isn't this a bug?
---... Satoshi
 
--------------------------------------------------------------------
--- address@hidden/8/5/93 (manuel bronstein)
--------------------------------------------------------------------
+--S 912
+integrate(%e**x,x=0..1)
+--R
+--R   (1)  %e - 1
+--R                    Type: Union(f1: OrderedCompletion Expression 
Integer,...)
+--E
+
+--S 913
+integrate(log(x),x=1..2)
+--R
+--R   (2)  log(4) - 1
+--R                    Type: Union(f1: OrderedCompletion Expression 
Integer,...)
+--E
+
+@
+
address@hidden/8/5/93 (manuel bronstein)
+
+This will return 2**(5/6).
+<<*>>=
 )clear all
-simplify(2**(1/3)*2**(1/2)) -- will return 2**(5/6).
 
--------------------------------------------------------------------
--- address@hidden/8/4/93 (manuel bronstein)
--------------------------------------------------------------------
+--S 194
+simplify(2**(1/3)*2**(1/2)) -- 
+--R
+--R        6+-+5
+--R   (1)  \|2
+--R                                                     Type: Expression 
Integer
+--E
+
+@
address@hidden/8/4/93 (manuel bronstein)
+<<*>>=
 )clear all
+
+--S 195
 integrate(1/sqrt(1+cos(x)), x)
+--R
+--R                  +-+       +----------+         2
+--R         +-+    2\|2 sin(x)\|cos(x) + 1  - cos(x)  + 2cos(x) + 3
+--R        \|2 log(------------------------------------------------)
+--R                                    2
+--R                              cos(x)  + 2cos(x) + 1
+--R   (1)  ---------------------------------------------------------
+--R                                    2
+--R                                          Type: Union(Expression 
Integer,...)
+--E
 
--------------------------------------------------------------------
--- address@hidden/8/4/93 (manuel bronstein)
--------------------------------------------------------------------
+@
address@hidden/8/4/93 (manuel bronstein)
+
+This used to be division by 0 error
+<<*>>=
 )clear all
-normalize atan(cos(x)/sin(x))  -- used to be division by 0 error
 
--------------------------------------------------------------------
--- address@hidden/8/4/93 (manuel bronstein)
--------------------------------------------------------------------
+--S 196
+normalize atan(cos(x)/sin(x))
+--R
+--R        - 2x + %pi
+--R   (1)  ----------
+--R             2
+--R                                                     Type: Expression 
Integer
+--E
+
+@
+
address@hidden/8/4/93 (manuel bronstein)
+<<*>>=
 )clear all
+
+--S 197
 a := 2**(1/6)
+--R
+--R        6+-+
+--R   (1)  \|2
+--R                                                        Type: 
AlgebraicNumber
+--E
+
+--S 198
 [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+-+
+--R   (2)  [\|2  ,\|2  ,\|2  ,\|2  ,2,2\|2 ,2\|2  ,2\|2  ,2\|2  ,2\|2  ,4,4\|2 
]
+--R                                                   Type: List 
AlgebraicNumber
+--E
+
+@
 
--------------------------------------------------------------------
--- address@hidden/8/4/93 (manuel bronstein)
--------------------------------------------------------------------
address@hidden/8/4/93 (manuel bronstein)
+<<*>>=
 )clear all
+
+--S 199
 int:=sqrt(a*(1-u**2)/(1+u**2))/u
-integrate(eval(int,a=1),u) -- works
-integrate(eval(int,a=sqrt(-1)),u) -- seems to run forever
-integrate(eval(int,a=1)*(-1)**(1/4),u) -- dies after a long time
- -- with an elt index error.
+--R
+--R         +----------+
+--R         |     2
+--R         |- a u  + a
+--R         |----------
+--R         |   2
+--R        \|  u  + 1
+--R   (1)  -------------
+--R              u
+--R                                                     Type: Expression 
Integer
+--E
+
+--S 200
+integrate(eval(int,a=1),u) 
+--R
+--R                     +--------+                       +--------+
+--R                     |   2                            |   2
+--R              2      |- u  + 1                 2      |- u  + 1
+--R            (u  + 1) |--------  - 1          (u  + 1) |--------  - 1
+--R                     |  2                             |  2
+--R                    \| u  + 1                        \| u  + 1
+--R        log(-----------------------) + 2atan(-----------------------)
+--R                        2                                2
+--R                       u                                u
+--R   (2)  -------------------------------------------------------------
+--R                                      2
+--R                                          Type: Union(Expression 
Integer,...)
+--E
+
+@
+Runs forever?
+<<*>>=
+--S 201
+integrate(eval(int,a=sqrt(-1)),u)
+--R
+--R   (3)
+--R             +---+      +-+
+--R         (- \|- 1  + 1)\|2
+--R      *
+--R                                +----------------+
+--R                                |    2      +---+
+--R               2      +---+ +-+ |(- u  + 1)\|- 1       2      +---+    2
+--R             (u  + 1)\|- 1 \|2  |----------------  + (u  - 1)\|- 1  + u  + 1
+--R                                |      2
+--R                               \|     u  + 1
+--R         
log(---------------------------------------------------------------)
+--R                                        2 +---+ +-+
+--R                                       u \|- 1 \|2
+--R     + 
+--R                                              +----------------+
+--R                                              |    2      +---+
+--R                             2      +---+ +-+ |(- u  + 1)\|- 1      +---+
+--R                           (u  + 1)\|- 1 \|2  |----------------  - \|- 1  + 
1
+--R                                              |      2
+--R         +---+      +-+                      \|     u  + 1
+--R       (\|- 1  + 1)\|2 
log(--------------------------------------------------)
+--R                                               2 +---+ +-+
+--R                                              u \|- 1 \|2
+--R     + 
+--R           +---+      +-+
+--R         (\|- 1  - 1)\|2
+--R      *
+--R                                +----------------+
+--R                                |    2      +---+
+--R               2      +---+ +-+ |(- u  + 1)\|- 1         2      +---+    2
+--R             (u  + 1)\|- 1 \|2  |----------------  + (- u  - 1)\|- 1  - u  
+ 1
+--R                                |      2
+--R                               \|     u  + 1
+--R         
log(-----------------------------------------------------------------)
+--R                                         2 +---+ +-+
+--R                                        u \|- 1 \|2
+--R  /
+--R     4
+--R                                          Type: Union(Expression 
Integer,...)
+--E
 
--------------------------------------------------------------------
--- address@hidden/8/4/93 (manuel bronstein)
--------------------------------------------------------------------
+@
+Dies after a long time with an elt index error
+<<*>>=
+--S 202
+integrate(eval(int,a=1)*(-1)**(1/4),u)
+--R
+--R   (4)
+--R                                            +--------+
+--R                                            |   2
+--R                               2      +---+ |- u  + 1     +---+    2
+--R                             (u  + 1)\|- 1  |--------  - \|- 1  + u
+--R                                            |  2
+--R           +---+      +-+                  \| u  + 1
+--R       (- \|- 1  + 1)\|2 log(---------------------------------------)
+--R                                              2 +---+
+--R                                             u \|- 1
+--R     + 
+--R                                    +--------+
+--R                                    |   2
+--R                             2      |- u  + 1
+--R                           (u  + 1) |--------  - 1
+--R                                    |  2
+--R         +---+      +-+            \| u  + 1
+--R       (\|- 1  + 1)\|2 log(-----------------------)
+--R                                       2
+--R                                      u
+--R     + 
+--R                                          +--------+
+--R                                          |   2
+--R                             2      +---+ |- u  + 1     +---+    2
+--R                           (u  + 1)\|- 1  |--------  - \|- 1  - u
+--R                                          |  2
+--R         +---+      +-+                  \| u  + 1
+--R       (\|- 1  - 1)\|2 log(---------------------------------------)
+--R                                            2 +---+
+--R                                           u \|- 1
+--R  /
+--R     4
+--R                                          Type: Union(Expression 
Integer,...)
+--E
+
+@
address@hidden/8/4/93 (manuel bronstein)
+<<*>>=
 )clear all
-sqrt((1-x**2)*(1-k**2*x**2))
-integrate(x/%,x)
 
--------------------------------------------------------------------
--- address@hidden/7/26/93 (manuel bronstein)
--------------------------------------------------------------------
+--S 203
+t1:=sqrt((1-x**2)*(1-k**2*x**2))
+--R
+--R         +-----------------------+
+--R         | 2 4       2      2
+--R   (1)  \|k x  + (- k  - 1)x  + 1
+--R                                                     Type: Expression 
Integer
+--E
+
+--S 204
+integrate(x/t1,x)
+--R
+--R                 +-----------------------+
+--R                 | 2 4       2      2          2 2    2
+--R          log(2k\|k x  + (- k  - 1)x  + 1  - 2k x  + k  + 1)
+--R   (2)  - --------------------------------------------------
+--R                                  2k
+--R                                          Type: Union(Expression 
Integer,...)
+--E
+
+@
address@hidden/7/26/93 (manuel bronstein)
+<<*>>=
 )clear all
-rad:=last zerosOf((2+y)**8-3,y)
-k:=first kernels %
-eval(rad,k,rad)
 
--------------------------------------------------------------------
--- address@hidden/7/15/93 themos tsikas
--------------------------------------------------------------------
+--S 205
+t1:=last zerosOf((2+y)**8-3,y)
+--R
+--R           +-------------+
+--R           |    +-------+
+--R           |    |    +-+
+--R        - \|- 2\|- 4\|3    - 4
+--R   (1)  ----------------------
+--R                   2
+--R                                                     Type: Expression 
Integer
+--E
+
+--S 206
+k:=first kernels t1
+--R
+--R         +-------------+
+--R         |    +-------+
+--R         |    |    +-+
+--R   (2)  \|- 2\|- 4\|3
+--R                                              Type: Kernel Expression 
Integer
+--E
+
+--S 207
+eval(t1,k,t1)
+--R
+--R         +-------------+
+--R         |    +-------+
+--R         |    |    +-+
+--R        \|- 2\|- 4\|3    - 4
+--R   (3)  --------------------
+--R                  4
+--R                                                     Type: Expression 
Integer
+--E
+
+@
address@hidden/7/15/93 themos tsikas
+<<*>>=
 )clear all
+
+--S 208
 f := (x - y) / (x + y)
+--R
+--R        - y + x
+--R   (1)  -------
+--R         y + x
+--R                                            Type: Fraction Polynomial 
Integer
+--E
+
+--S 209
 eval(f,x=1/x)
+--R
+--R        - x y + 1
+--R   (2)  ---------
+--R         x y + 1
+--R                                            Type: Fraction Polynomial 
Integer
+--E
+
+@
address@hidden/7/15/93 themos tsikas
 
--------------------------------------------------------------------
--- address@hidden/7/15/93 themos tsikas
--------------------------------------------------------------------
+I claim that these two should give the same result (they do in Reduce):
+(precision was 200)
+
+<<*>>=
 )clear all
+
+--S 210
 digits 200
---I claim that these two should give the same result (they do in Reduce):
---(precision was 200)
+--R
+--R   (1)  20
+--R                                                        Type: 
PositiveInteger
+--E
+
+--S 211
 a:=4*sin(2*%pi/9)*sin(5*%pi/9)/sqrt(3)
+--R
+--R             2%pi     5%pi
+--R        4sin(----)sin(----)
+--R               9        9
+--R   (2)  -------------------
+--R                 +-+
+--R                \|3
+--R                                                     Type: Expression 
Integer
+--E
+
+--S 212
 b:=1/(2*sin(%pi/9))
+--R
+--R            1
+--R   (3)  ---------
+--R             %pi
+--R        2sin(---)
+--R              9
+--R                                                     Type: Expression 
Integer
+--E
+
+--S 213
 a::EXPR FLOAT
-b::EXPR FLOAT                                 
-
--------------------------------------------------------------------
--- address@hidden/9/15/93 (Barry Trager)
--------------------------------------------------------------------
+--R
+--R   (4)
+--R  1.4619022000 8154362611 6377206683 1458519367 5283075946 2240855318 
493177672
+--R  5 8139967590 4919627790 5155131563 5927196029 5136978338 4351923544 
366777748
+--R  4 3145835284 9347399264 0517928099 4530246377 7454860377 762537213
+--R                                                       Type: Expression 
Float
+--E
+
+--S 214
+b::EXPR FLOAT
+--R
+--R   (5)
+--R  1.4619022000 8154362611 6377206683 1458519367 5283075946 2240855318 
493177672
+--R  5 8139967590 4919627790 5155131563 5927196029 5136978338 4351923544 
366777748
+--R  4 3145835284 9347399264 0517928099 4530246377 7454860377 762537213
+--R                                                       Type: Expression 
Float
+--E
+
+--S 215
+digits 20
+--R
+--R   (6)  200
+--R                                                        Type: 
PositiveInteger
+--E
+@
address@hidden/9/15/93 (Barry Trager)
+<<*>>=
 )clear all
+
+--S 216
 limit(tanh(x),x=%plusInfinity)
+--R
+--R   (1)  1
+--R                        Type: Union(OrderedCompletion Expression 
Integer,...)
+--E
 
--------------------------------------------------------------------
--- address@hidden/6/14/93 (manuel bronstein)
--------------------------------------------------------------------
+@
address@hidden/6/14/93 (manuel bronstein)
+<<*>>=
 )clear all
+
+--S 217
 a := x::EXPR INT
+--R
+--R   (1)  x
+--R                                                     Type: Expression 
Integer
+--E
+
+--S 218
 b := x::EXPR COMPLEX INT
+--R
+--R   (2)  x
+--R                                             Type: Expression Complex 
Integer
+--E
+
+--S 219
 zeroOf(a**4+1,x)
+--R
+--R         +---+
+--R        \|- 1  + 1
+--R   (3)  ----------
+--R            +-+
+--R           \|2
+--R                                                     Type: Expression 
Integer
+--E
+
+--S 220
 zeroOf(b**4+1,x)
+--R
+--R        1 + %i
+--R   (4)  ------
+--R          +-+
+--R         \|2
+--R                                             Type: Expression Complex 
Integer
+--E
+
+@
address@hidden/6/11/93 (manuel bronstein)
+
+Now returns 0  (was crashing before)
+<<*>>=
+)clear all
+
+--S 221
+normalize(0**a)
+--R
+--R   (1)  0
+--R                                                     Type: Expression 
Integer
+--E
 
--------------------------------------------------------------------
--- address@hidden/6/11/93 (manuel bronstein)
--------------------------------------------------------------------
+@
address@hidden/6/11/93 (manuel bronstein)
+
+New export ``complexForm(f)'' which returns the rectangular complex form of f:
+<<*>>=
 )clear all
-normalize(0**a) -- now returns 0  (was crashing before)
 
--------------------------------------------------------------------
--- address@hidden/6/11/93 (manuel bronstein)
--------------------------------------------------------------------
+--S 222
+t1:=log(a+%i * b)
+--R
+--R   (1)  log(%i b + a)
+--R                                             Type: Expression Complex 
Integer
+--E
+
+--S 223
+complexForm t1
+--R
+--R             2    2
+--R        log(b  + a )        b
+--R   (2)  ------------ + atan(-)%i
+--R              2             a
+--R                                             Type: Complex Expression 
Integer
+--E
+
+--S 224
+t2:=complexIntegrate(1/(x-%i),x)
+--R
+--R   (3)  log(x - %i)
+--R                                             Type: Expression Complex 
Integer
+--E
+
+--S 225
+complexForm t2
+--R
+--R             2
+--R        log(x  + 1)        1
+--R   (4)  ----------- - atan(-)%i
+--R             2             x
+--R                                             Type: Complex Expression 
Integer
+--E
+
+@
address@hidden
+
+normalForm est faux pour les polynomes a coef dans un anneau:
+<<*>>=
 )clear all
--  new export  complexForm(f)  which returns the rectangular complex form of f:
-log(a+%i * b)
-complexForm %
-complexIntegrate(1/(x-%i),x)
-complexForm %
 
--------------------------------------------------------------------
--- address@hidden
--------------------------------------------------------------------
---  normalForm est faux pour les polynomes a coef dans un anneau:
+--S 226
 D:=DMP([a,b],INT)
+--R
+--R   (1)  DistributedMultivariatePolynomial([a,b],Integer)
+--R                                                                 Type: 
Domain
+--E
+
+--S 227
 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
 g:=groebner l
+--R
+--R   (3)  [2a - 1,2b - 1]
+--R                  Type: List 
DistributedMultivariatePolynomial([a,b],Integer)
+--E
+
+--S 229
 p:D:=a
+--R
+--R   (4)  a
+--R                       Type: 
DistributedMultivariatePolynomial([a,b],Integer)
+--E
+
+@
+Was 1, au lieu de 1/2 !!
+<<*>>=
+--S 230
 normalForm(p,g)
--- was  1
---   au lieu de 1/2 !!
+--R
+--R        1
+--R   (5)  -
+--R        2
+--R              Type: DistributedMultivariatePolynomial([a,b],Fraction 
Integer)
+--E
 
--------------------------------------------------------------------
--- address@hidden/6/9/93 themos tsikas
--------------------------------------------------------------------
+@
address@hidden/6/9/93 themos tsikas
+<<*>>=
 )clear all
+
+--S 231
 squareFreePart(50)
+--R
+--R   (1)  10
+--R                                                        Type: 
PositiveInteger
+--E
+
+@
 
--------------------------------------------------------------------
--- address@hidden/6/4/92 mike dewar
--------------------------------------------------------------------
address@hidden/6/4/92 mike dewar
+<<*>>=
 )clear all
+
+--S 232
 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
 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
 imag g
+--R
+--R        - log(5) + log(2)
+--R   (3)  -----------------
+--R                2
+--R                                                     Type: Expression 
Integer
+--E
 
--------------------------------------------------------------------
--- daly
--------------------------------------------------------------------
+@
+daly - not wrong but the order is obscure...
+<<*>>=
 )clear all
--- not wrong but the order is obscure...
+
+--S 235
 primes(1,10)
+--R
+--R   (1)  [2,7,5,3]
+--R                                                           Type: List 
Integer
+--E
 
--------------------------------------------------------------------
--- address@hidden/1/11/93 themos tsikas
--------------------------------------------------------------------
+@
address@hidden/1/11/93 themos tsikas
+<<*>>=
 )clear all
+
+--S 236
 m:=matrix[[1,a,0],[b,0,a],[0,b,c]]
+--R
+--R        +1  a  0+
+--R        |       |
+--R   (1)  |b  0  a|
+--R        |       |
+--R        +0  b  c+
+--R                                              Type: Matrix Polynomial 
Integer
+--E
+
+@
+This ends in error:
+Internal system problem in function appInfix : fewer than 2 arguments to
+an infix function
+<<*>>=
+--S 237
 ll:=radicalEigenvectors m
--- ends in error:
--- Internal system problem in function appInfix : fewer than 2 arguments to
--- an infix function
---
--- but this works
+--R
+--R   (2)
+--R   [
+--R     [
+--R       radval =
+--R               9
+--R            *
+--R                 ROOT
+--R                          9
+--R                       *
+--R                          ROOT
+--R                                            4              3
+--R                               (- 4a b - 1)c  + (6a b + 2)c
+--R                             + 
+--R                                     2 2             2       2 2
+--R                               (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c
+--R                             + 
+--R                                    3 3      2 2
+--R                               - 32a b  - 13a b  - 4a b
+--R                      + 
+--R                           3     2                             +-+
+--R                        (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R                   /
+--R                         +-+
+--R                      54\|3
+--R                ,
+--R                    3
+--R              **
+--R                 2
+--R           + 
+--R               (3c + 3)
+--R            *
+--R               ROOT
+--R                        9
+--R                     *
+--R                        ROOT
+--R                                          4              3
+--R                             (- 4a b - 1)c  + (6a b + 2)c
+--R                           + 
+--R                                   2 2             2       2 2              
 3 3
+--R                             (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 
32a b
+--R                           + 
+--R                                  2 2
+--R                             - 13a b  - 4a b
+--R                    + 
+--R                         3     2                             +-+
+--R                      (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R                 /
+--R                       +-+
+--R                    54\|3
+--R              ,
+--R                  3
+--R           + 
+--R              2
+--R             c  - c + 6a b + 1
+--R        /
+--R             9
+--R          *
+--R             ROOT
+--R                      9
+--R                   *
+--R                      ROOT
+--R                                        4              3
+--R                           (- 4a b - 1)c  + (6a b + 2)c
+--R                         + 
+--R                                 2 2             2       2 2               
3 3
+--R                           (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 32a 
b
+--R                         + 
+--R                                2 2
+--R                           - 13a b  - 4a b
+--R                  + 
+--R                       3     2                             +-+
+--R                    (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R               /
+--R                     +-+
+--R                  54\|3
+--R            ,
+--R                3
+--R       ,
+--R      radmult= 1,
+--R
+--R       radvect =
+--R         [
+--R   [
+--R     [
+--R                                  +-+
+--R             (- 18c + 18a b + 18)\|3
+--R          *
+--R               ROOT
+--R                        9
+--R                     *
+--R                        ROOT
+--R                                          4              3
+--R                             (- 4a b - 1)c  + (6a b + 2)c
+--R                           + 
+--R                                   2 2             2       2 2              
 3 3
+--R                             (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 
32a b
+--R                           + 
+--R                                  2 2
+--R                             - 13a b  - 4a b
+--R                    + 
+--R                         3     2                             +-+
+--R                      (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R                 /
+--R                       +-+
+--R                    54\|3
+--R              ,
+--R                  3
+--R            **
+--R               2
+--R         + 
+--R                 9
+--R              *
+--R                 ROOT
+--R                                   4              3         2 2             
2
+--R                      (- 4a b - 1)c  + (6a b + 2)c  + (- 13a b  - 4a b - 1)c
+--R                    + 
+--R                          2 2               3 3      2 2
+--R                      (22a b  + 6a b)c - 32a b  - 13a b  - 4a b
+--R             + 
+--R                  2                               +-+
+--R               (3c  + (- 21a b - 9)c + 15a b + 6)\|3
+--R          *
+--R             ROOT
+--R                      9
+--R                   *
+--R                      ROOT
+--R                                        4              3
+--R                           (- 4a b - 1)c  + (6a b + 2)c
+--R                         + 
+--R                                 2 2             2       2 2               
3 3
+--R                           (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 32a 
b
+--R                         + 
+--R                                2 2
+--R                           - 13a b  - 4a b
+--R                  + 
+--R                       3     2                             +-+
+--R                    (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R               /
+--R                     +-+
+--R                  54\|3
+--R            ,
+--R                3
+--R         + 
+--R             (- 3c + 6)
+--R          *
+--R             ROOT
+--R                               4              3         2 2             2
+--R                  (- 4a b - 1)c  + (6a b + 2)c  + (- 13a b  - 4a b - 1)c
+--R                + 
+--R                      2 2               3 3      2 2
+--R                  (22a b  + 6a b)c - 32a b  - 13a b  - 4a b
+--R         + 
+--R             3               2                       2 2             +-+
+--R           (c  + (11a b + 1)c  + (- 11a b - 4)c + 24a b  + 2a b + 2)\|3
+--R      /
+--R              2 +-+
+--R           54b \|3
+--R        *
+--R             ROOT
+--R                      9
+--R                   *
+--R                      ROOT
+--R                                        4              3
+--R                           (- 4a b - 1)c  + (6a b + 2)c
+--R                         + 
+--R                                 2 2             2       2 2               
3 3
+--R                           (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 32a 
b
+--R                         + 
+--R                                2 2
+--R                           - 13a b  - 4a b
+--R                  + 
+--R                       3     2                             +-+
+--R                    (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R               /
+--R                     +-+
+--R                  54\|3
+--R            ,
+--R                3
+--R          **
+--R             2
+--R       ]
+--R     ,
+--R
+--R     [
+--R             9
+--R          *
+--R               ROOT
+--R                        9
+--R                     *
+--R                        ROOT
+--R                                          4              3
+--R                             (- 4a b - 1)c  + (6a b + 2)c
+--R                           + 
+--R                                   2 2             2       2 2              
 3 3
+--R                             (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 
32a b
+--R                           + 
+--R                                  2 2
+--R                             - 13a b  - 4a b
+--R                    + 
+--R                         3     2                             +-+
+--R                      (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R                 /
+--R                       +-+
+--R                    54\|3
+--R              ,
+--R                  3
+--R            **
+--R               2
+--R         + 
+--R             (- 6c + 3)
+--R          *
+--R             ROOT
+--R                      9
+--R                   *
+--R                      ROOT
+--R                                        4              3
+--R                           (- 4a b - 1)c  + (6a b + 2)c
+--R                         + 
+--R                                 2 2             2       2 2               
3 3
+--R                           (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 32a 
b
+--R                         + 
+--R                                2 2
+--R                           - 13a b  - 4a b
+--R                  + 
+--R                       3     2                             +-+
+--R                    (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R               /
+--R                     +-+
+--R                  54\|3
+--R            ,
+--R                3
+--R         + 
+--R            2
+--R           c  - c + 6a b + 1
+--R      /
+--R           9b
+--R        *
+--R           ROOT
+--R                    9
+--R                 *
+--R                    ROOT
+--R                                      4              3         2 2          
   2
+--R                         (- 4a b - 1)c  + (6a b + 2)c  + (- 13a b  - 4a b - 
1)c
+--R                       + 
+--R                             2 2               3 3      2 2
+--R                         (22a b  + 6a b)c - 32a b  - 13a b  - 4a b
+--R                + 
+--R                     3     2                             +-+
+--R                  (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R             /
+--R                   +-+
+--R                54\|3
+--R          ,
+--R              3
+--R       ]
+--R     ,
+--R    [1]]
+--R           ]
+--R       ]
+--R     ,
+--R
+--R     [
+--R       radval =
+--R                    +---+
+--R               (- 9\|- 3  - 9)
+--R            *
+--R                 ROOT
+--R                          9
+--R                       *
+--R                          ROOT
+--R                                            4              3
+--R                               (- 4a b - 1)c  + (6a b + 2)c
+--R                             + 
+--R                                     2 2             2       2 2
+--R                               (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c
+--R                             + 
+--R                                    3 3      2 2
+--R                               - 32a b  - 13a b  - 4a b
+--R                      + 
+--R                           3     2                             +-+
+--R                        (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R                   /
+--R                         +-+
+--R                      54\|3
+--R                ,
+--R                    3
+--R              **
+--R                 2
+--R           + 
+--R                         +---+
+--R               ((3c + 3)\|- 3  - 3c - 3)
+--R            *
+--R               ROOT
+--R                        9
+--R                     *
+--R                        ROOT
+--R                                          4              3
+--R                             (- 4a b - 1)c  + (6a b + 2)c
+--R                           + 
+--R                                   2 2             2       2 2              
 3 3
+--R                             (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 
32a b
+--R                           + 
+--R                                  2 2
+--R                             - 13a b  - 4a b
+--R                    + 
+--R                         3     2                             +-+
+--R                      (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R                 /
+--R                       +-+
+--R                    54\|3
+--R              ,
+--R                  3
+--R           + 
+--R               2
+--R             2c  - 2c + 12a b + 2
+--R        /
+--R                +---+
+--R             (9\|- 3  - 9)
+--R          *
+--R             ROOT
+--R                      9
+--R                   *
+--R                      ROOT
+--R                                        4              3
+--R                           (- 4a b - 1)c  + (6a b + 2)c
+--R                         + 
+--R                                 2 2             2       2 2               
3 3
+--R                           (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 32a 
b
+--R                         + 
+--R                                2 2
+--R                           - 13a b  - 4a b
+--R                  + 
+--R                       3     2                             +-+
+--R                    (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R               /
+--R                     +-+
+--R                  54\|3
+--R            ,
+--R                3
+--R       ,
+--R      radmult= 1,
+--R
+--R       radvect =
+--R         [
+--R   [
+--R     [
+--R                                  +-+
+--R             (- 36c + 36a b + 36)\|3
+--R          *
+--R               ROOT
+--R                        9
+--R                     *
+--R                        ROOT
+--R                                          4              3
+--R                             (- 4a b - 1)c  + (6a b + 2)c
+--R                           + 
+--R                                   2 2             2       2 2              
 3 3
+--R                             (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 
32a b
+--R                           + 
+--R                                  2 2
+--R                             - 13a b  - 4a b
+--R                    + 
+--R                         3     2                             +-+
+--R                      (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R                 /
+--R                       +-+
+--R                    54\|3
+--R              ,
+--R                  3
+--R            **
+--R               2
+--R         + 
+--R                      +---+
+--R                 (- 9\|- 3  - 9)
+--R              *
+--R                 ROOT
+--R                                   4              3         2 2             
2
+--R                      (- 4a b - 1)c  + (6a b + 2)c  + (- 13a b  - 4a b - 1)c
+--R                    + 
+--R                          2 2               3 3      2 2
+--R                      (22a b  + 6a b)c - 32a b  - 13a b  - 4a b
+--R             + 
+--R                        2                             +---+     2
+--R                   (- 3c  + (21a b + 9)c - 15a b - 6)\|- 3  - 3c  + (21a b 
+ 9)c
+--R                 + 
+--R                   - 15a b - 6
+--R              *
+--R                  +-+
+--R                 \|3
+--R          *
+--R             ROOT
+--R                      9
+--R                   *
+--R                      ROOT
+--R                                        4              3
+--R                           (- 4a b - 1)c  + (6a b + 2)c
+--R                         + 
+--R                                 2 2             2       2 2               
3 3
+--R                           (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 32a 
b
+--R                         + 
+--R                                2 2
+--R                           - 13a b  - 4a b
+--R                  + 
+--R                       3     2                             +-+
+--R                    (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R               /
+--R                     +-+
+--R                  54\|3
+--R            ,
+--R                3
+--R         + 
+--R                         +---+
+--R             ((- 3c + 6)\|- 3  + 3c - 6)
+--R          *
+--R             ROOT
+--R                               4              3         2 2             2
+--R                  (- 4a b - 1)c  + (6a b + 2)c  + (- 13a b  - 4a b - 1)c
+--R                + 
+--R                      2 2               3 3      2 2
+--R                  (22a b  + 6a b)c - 32a b  - 13a b  - 4a b
+--R         + 
+--R                 3               2                       2 2             
+---+
+--R               (c  + (11a b + 1)c  + (- 11a b - 4)c + 24a b  + 2a b + 2)\|- 
3
+--R             + 
+--R                  3                 2                     2 2
+--R               - c  + (- 11a b - 1)c  + (11a b + 4)c - 24a b  - 2a b - 2
+--R          *
+--R              +-+
+--R             \|3
+--R      /
+--R               2 +-+
+--R           108b \|3
+--R        *
+--R             ROOT
+--R                      9
+--R                   *
+--R                      ROOT
+--R                                        4              3
+--R                           (- 4a b - 1)c  + (6a b + 2)c
+--R                         + 
+--R                                 2 2             2       2 2               
3 3
+--R                           (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 32a 
b
+--R                         + 
+--R                                2 2
+--R                           - 13a b  - 4a b
+--R                  + 
+--R                       3     2                             +-+
+--R                    (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R               /
+--R                     +-+
+--R                  54\|3
+--R            ,
+--R                3
+--R          **
+--R             2
+--R       ]
+--R     ,
+--R
+--R     [
+--R                  +---+
+--R             (- 9\|- 3  - 9)
+--R          *
+--R               ROOT
+--R                        9
+--R                     *
+--R                        ROOT
+--R                                          4              3
+--R                             (- 4a b - 1)c  + (6a b + 2)c
+--R                           + 
+--R                                   2 2             2       2 2              
 3 3
+--R                             (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 
32a b
+--R                           + 
+--R                                  2 2
+--R                             - 13a b  - 4a b
+--R                    + 
+--R                         3     2                             +-+
+--R                      (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R                 /
+--R                       +-+
+--R                    54\|3
+--R              ,
+--R                  3
+--R            **
+--R               2
+--R         + 
+--R                         +---+
+--R             ((- 6c + 3)\|- 3  + 6c - 3)
+--R          *
+--R             ROOT
+--R                      9
+--R                   *
+--R                      ROOT
+--R                                        4              3
+--R                           (- 4a b - 1)c  + (6a b + 2)c
+--R                         + 
+--R                                 2 2             2       2 2               
3 3
+--R                           (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 32a 
b
+--R                         + 
+--R                                2 2
+--R                           - 13a b  - 4a b
+--R                  + 
+--R                       3     2                             +-+
+--R                    (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R               /
+--R                     +-+
+--R                  54\|3
+--R            ,
+--R                3
+--R         + 
+--R             2
+--R           2c  - 2c + 12a b + 2
+--R      /
+--R               +---+
+--R           (9b\|- 3  - 9b)
+--R        *
+--R           ROOT
+--R                    9
+--R                 *
+--R                    ROOT
+--R                                      4              3         2 2          
   2
+--R                         (- 4a b - 1)c  + (6a b + 2)c  + (- 13a b  - 4a b - 
1)c
+--R                       + 
+--R                             2 2               3 3      2 2
+--R                         (22a b  + 6a b)c - 32a b  - 13a b  - 4a b
+--R                + 
+--R                     3     2                             +-+
+--R                  (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R             /
+--R                   +-+
+--R                54\|3
+--R          ,
+--R              3
+--R       ]
+--R     ,
+--R    [1]]
+--R           ]
+--R       ]
+--R     ,
+--R
+--R     [
+--R       radval =
+--R                    +---+
+--R               (- 9\|- 3  + 9)
+--R            *
+--R                 ROOT
+--R                          9
+--R                       *
+--R                          ROOT
+--R                                            4              3
+--R                               (- 4a b - 1)c  + (6a b + 2)c
+--R                             + 
+--R                                     2 2             2       2 2
+--R                               (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c
+--R                             + 
+--R                                    3 3      2 2
+--R                               - 32a b  - 13a b  - 4a b
+--R                      + 
+--R                           3     2                             +-+
+--R                        (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R                   /
+--R                         +-+
+--R                      54\|3
+--R                ,
+--R                    3
+--R              **
+--R                 2
+--R           + 
+--R                         +---+
+--R               ((3c + 3)\|- 3  + 3c + 3)
+--R            *
+--R               ROOT
+--R                        9
+--R                     *
+--R                        ROOT
+--R                                          4              3
+--R                             (- 4a b - 1)c  + (6a b + 2)c
+--R                           + 
+--R                                   2 2             2       2 2              
 3 3
+--R                             (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 
32a b
+--R                           + 
+--R                                  2 2
+--R                             - 13a b  - 4a b
+--R                    + 
+--R                         3     2                             +-+
+--R                      (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R                 /
+--R                       +-+
+--R                    54\|3
+--R              ,
+--R                  3
+--R           + 
+--R                 2
+--R             - 2c  + 2c - 12a b - 2
+--R        /
+--R                +---+
+--R             (9\|- 3  + 9)
+--R          *
+--R             ROOT
+--R                      9
+--R                   *
+--R                      ROOT
+--R                                        4              3
+--R                           (- 4a b - 1)c  + (6a b + 2)c
+--R                         + 
+--R                                 2 2             2       2 2               
3 3
+--R                           (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 32a 
b
+--R                         + 
+--R                                2 2
+--R                           - 13a b  - 4a b
+--R                  + 
+--R                       3     2                             +-+
+--R                    (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R               /
+--R                     +-+
+--R                  54\|3
+--R            ,
+--R                3
+--R       ,
+--R      radmult= 1,
+--R
+--R       radvect =
+--R         [
+--R   [
+--R     [
+--R                                  +-+
+--R             (- 36c + 36a b + 36)\|3
+--R          *
+--R               ROOT
+--R                        9
+--R                     *
+--R                        ROOT
+--R                                          4              3
+--R                             (- 4a b - 1)c  + (6a b + 2)c
+--R                           + 
+--R                                   2 2             2       2 2              
 3 3
+--R                             (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 
32a b
+--R                           + 
+--R                                  2 2
+--R                             - 13a b  - 4a b
+--R                    + 
+--R                         3     2                             +-+
+--R                      (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R                 /
+--R                       +-+
+--R                    54\|3
+--R              ,
+--R                  3
+--R            **
+--R               2
+--R         + 
+--R                    +---+
+--R                 (9\|- 3  - 9)
+--R              *
+--R                 ROOT
+--R                                   4              3         2 2             
2
+--R                      (- 4a b - 1)c  + (6a b + 2)c  + (- 13a b  - 4a b - 1)c
+--R                    + 
+--R                          2 2               3 3      2 2
+--R                      (22a b  + 6a b)c - 32a b  - 13a b  - 4a b
+--R             + 
+--R                      2                               +---+     2
+--R                   (3c  + (- 21a b - 9)c + 15a b + 6)\|- 3  - 3c  + (21a b 
+ 9)c
+--R                 + 
+--R                   - 15a b - 6
+--R              *
+--R                  +-+
+--R                 \|3
+--R          *
+--R             ROOT
+--R                      9
+--R                   *
+--R                      ROOT
+--R                                        4              3
+--R                           (- 4a b - 1)c  + (6a b + 2)c
+--R                         + 
+--R                                 2 2             2       2 2               
3 3
+--R                           (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 32a 
b
+--R                         + 
+--R                                2 2
+--R                           - 13a b  - 4a b
+--R                  + 
+--R                       3     2                             +-+
+--R                    (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R               /
+--R                     +-+
+--R                  54\|3
+--R            ,
+--R                3
+--R         + 
+--R                       +---+
+--R             ((3c - 6)\|- 3  + 3c - 6)
+--R          *
+--R             ROOT
+--R                               4              3         2 2             2
+--R                  (- 4a b - 1)c  + (6a b + 2)c  + (- 13a b  - 4a b - 1)c
+--R                + 
+--R                      2 2               3 3      2 2
+--R                  (22a b  + 6a b)c - 32a b  - 13a b  - 4a b
+--R         + 
+--R                   3                 2                     2 2             
+---+
+--R               (- c  + (- 11a b - 1)c  + (11a b + 4)c - 24a b  - 2a b - 
2)\|- 3
+--R             + 
+--R                  3                 2                     2 2
+--R               - c  + (- 11a b - 1)c  + (11a b + 4)c - 24a b  - 2a b - 2
+--R          *
+--R              +-+
+--R             \|3
+--R      /
+--R               2 +-+
+--R           108b \|3
+--R        *
+--R             ROOT
+--R                      9
+--R                   *
+--R                      ROOT
+--R                                        4              3
+--R                           (- 4a b - 1)c  + (6a b + 2)c
+--R                         + 
+--R                                 2 2             2       2 2               
3 3
+--R                           (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 32a 
b
+--R                         + 
+--R                                2 2
+--R                           - 13a b  - 4a b
+--R                  + 
+--R                       3     2                             +-+
+--R                    (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R               /
+--R                     +-+
+--R                  54\|3
+--R            ,
+--R                3
+--R          **
+--R             2
+--R       ]
+--R     ,
+--R
+--R     [
+--R                  +---+
+--R             (- 9\|- 3  + 9)
+--R          *
+--R               ROOT
+--R                        9
+--R                     *
+--R                        ROOT
+--R                                          4              3
+--R                             (- 4a b - 1)c  + (6a b + 2)c
+--R                           + 
+--R                                   2 2             2       2 2              
 3 3
+--R                             (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 
32a b
+--R                           + 
+--R                                  2 2
+--R                             - 13a b  - 4a b
+--R                    + 
+--R                         3     2                             +-+
+--R                      (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R                 /
+--R                       +-+
+--R                    54\|3
+--R              ,
+--R                  3
+--R            **
+--R               2
+--R         + 
+--R                         +---+
+--R             ((- 6c + 3)\|- 3  - 6c + 3)
+--R          *
+--R             ROOT
+--R                      9
+--R                   *
+--R                      ROOT
+--R                                        4              3
+--R                           (- 4a b - 1)c  + (6a b + 2)c
+--R                         + 
+--R                                 2 2             2       2 2               
3 3
+--R                           (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 32a 
b
+--R                         + 
+--R                                2 2
+--R                           - 13a b  - 4a b
+--R                  + 
+--R                       3     2                             +-+
+--R                    (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R               /
+--R                     +-+
+--R                  54\|3
+--R            ,
+--R                3
+--R         + 
+--R               2
+--R           - 2c  + 2c - 12a b - 2
+--R      /
+--R               +---+
+--R           (9b\|- 3  + 9b)
+--R        *
+--R           ROOT
+--R                    9
+--R                 *
+--R                    ROOT
+--R                                      4              3         2 2          
   2
+--R                         (- 4a b - 1)c  + (6a b + 2)c  + (- 13a b  - 4a b - 
1)c
+--R                       + 
+--R                             2 2               3 3      2 2
+--R                         (22a b  + 6a b)c - 32a b  - 13a b  - 4a b
+--R                + 
+--R                     3     2                             +-+
+--R                  (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R             /
+--R                   +-+
+--R                54\|3
+--R          ,
+--R              3
+--R       ]
+--R     ,
+--R    [1]]
+--R           ]
+--R       ]
+--R     ]
+--RType: List Record(radval: Expression Integer,radmult: Integer,radvect: List 
Matrix Expression Integer)
+--E
+
+@
+but this works
+<<*>>=
+
+--S 238
 ll 1
+--R
+--R   (3)
+--R   [
+--R     radval =
+--R             9
+--R          *
+--R               ROOT
+--R                        9
+--R                     *
+--R                        ROOT
+--R                                          4              3
+--R                             (- 4a b - 1)c  + (6a b + 2)c
+--R                           + 
+--R                                   2 2             2       2 2              
 3 3
+--R                             (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 
32a b
+--R                           + 
+--R                                  2 2
+--R                             - 13a b  - 4a b
+--R                    + 
+--R                         3     2                             +-+
+--R                      (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R                 /
+--R                       +-+
+--R                    54\|3
+--R              ,
+--R                  3
+--R            **
+--R               2
+--R         + 
+--R             (3c + 3)
+--R          *
+--R             ROOT
+--R                      9
+--R                   *
+--R                      ROOT
+--R                                        4              3
+--R                           (- 4a b - 1)c  + (6a b + 2)c
+--R                         + 
+--R                                 2 2             2       2 2               
3 3
+--R                           (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 32a 
b
+--R                         + 
+--R                                2 2
+--R                           - 13a b  - 4a b
+--R                  + 
+--R                       3     2                             +-+
+--R                    (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R               /
+--R                     +-+
+--R                  54\|3
+--R            ,
+--R                3
+--R         + 
+--R            2
+--R           c  - c + 6a b + 1
+--R      /
+--R           9
+--R        *
+--R           ROOT
+--R                    9
+--R                 *
+--R                    ROOT
+--R                                      4              3         2 2          
   2
+--R                         (- 4a b - 1)c  + (6a b + 2)c  + (- 13a b  - 4a b - 
1)c
+--R                       + 
+--R                             2 2               3 3      2 2
+--R                         (22a b  + 6a b)c - 32a b  - 13a b  - 4a b
+--R                + 
+--R                     3     2                             +-+
+--R                  (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R             /
+--R                   +-+
+--R                54\|3
+--R          ,
+--R              3
+--R     ,
+--R    radmult= 1,
+--R
+--R     radvect =
+--R       [
+--R   [
+--R     [
+--R                                  +-+
+--R             (- 18c + 18a b + 18)\|3
+--R          *
+--R               ROOT
+--R                        9
+--R                     *
+--R                        ROOT
+--R                                          4              3
+--R                             (- 4a b - 1)c  + (6a b + 2)c
+--R                           + 
+--R                                   2 2             2       2 2              
 3 3
+--R                             (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 
32a b
+--R                           + 
+--R                                  2 2
+--R                             - 13a b  - 4a b
+--R                    + 
+--R                         3     2                             +-+
+--R                      (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R                 /
+--R                       +-+
+--R                    54\|3
+--R              ,
+--R                  3
+--R            **
+--R               2
+--R         + 
+--R                 9
+--R              *
+--R                 ROOT
+--R                                   4              3         2 2             
2
+--R                      (- 4a b - 1)c  + (6a b + 2)c  + (- 13a b  - 4a b - 1)c
+--R                    + 
+--R                          2 2               3 3      2 2
+--R                      (22a b  + 6a b)c - 32a b  - 13a b  - 4a b
+--R             + 
+--R                  2                               +-+
+--R               (3c  + (- 21a b - 9)c + 15a b + 6)\|3
+--R          *
+--R             ROOT
+--R                      9
+--R                   *
+--R                      ROOT
+--R                                        4              3
+--R                           (- 4a b - 1)c  + (6a b + 2)c
+--R                         + 
+--R                                 2 2             2       2 2               
3 3
+--R                           (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 32a 
b
+--R                         + 
+--R                                2 2
+--R                           - 13a b  - 4a b
+--R                  + 
+--R                       3     2                             +-+
+--R                    (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R               /
+--R                     +-+
+--R                  54\|3
+--R            ,
+--R                3
+--R         + 
+--R             (- 3c + 6)
+--R          *
+--R             ROOT
+--R                               4              3         2 2             2
+--R                  (- 4a b - 1)c  + (6a b + 2)c  + (- 13a b  - 4a b - 1)c
+--R                + 
+--R                      2 2               3 3      2 2
+--R                  (22a b  + 6a b)c - 32a b  - 13a b  - 4a b
+--R         + 
+--R             3               2                       2 2             +-+
+--R           (c  + (11a b + 1)c  + (- 11a b - 4)c + 24a b  + 2a b + 2)\|3
+--R      /
+--R              2 +-+
+--R           54b \|3
+--R        *
+--R             ROOT
+--R                      9
+--R                   *
+--R                      ROOT
+--R                                        4              3
+--R                           (- 4a b - 1)c  + (6a b + 2)c
+--R                         + 
+--R                                 2 2             2       2 2               
3 3
+--R                           (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 32a 
b
+--R                         + 
+--R                                2 2
+--R                           - 13a b  - 4a b
+--R                  + 
+--R                       3     2                             +-+
+--R                    (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R               /
+--R                     +-+
+--R                  54\|3
+--R            ,
+--R                3
+--R          **
+--R             2
+--R       ]
+--R     ,
+--R
+--R     [
+--R             9
+--R          *
+--R               ROOT
+--R                        9
+--R                     *
+--R                        ROOT
+--R                                          4              3
+--R                             (- 4a b - 1)c  + (6a b + 2)c
+--R                           + 
+--R                                   2 2             2       2 2              
 3 3
+--R                             (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 
32a b
+--R                           + 
+--R                                  2 2
+--R                             - 13a b  - 4a b
+--R                    + 
+--R                         3     2                             +-+
+--R                      (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R                 /
+--R                       +-+
+--R                    54\|3
+--R              ,
+--R                  3
+--R            **
+--R               2
+--R         + 
+--R             (- 6c + 3)
+--R          *
+--R             ROOT
+--R                      9
+--R                   *
+--R                      ROOT
+--R                                        4              3
+--R                           (- 4a b - 1)c  + (6a b + 2)c
+--R                         + 
+--R                                 2 2             2       2 2               
3 3
+--R                           (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 32a 
b
+--R                         + 
+--R                                2 2
+--R                           - 13a b  - 4a b
+--R                  + 
+--R                       3     2                             +-+
+--R                    (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R               /
+--R                     +-+
+--R                  54\|3
+--R            ,
+--R                3
+--R         + 
+--R            2
+--R           c  - c + 6a b + 1
+--R      /
+--R           9b
+--R        *
+--R           ROOT
+--R                    9
+--R                 *
+--R                    ROOT
+--R                                      4              3         2 2          
   2
+--R                         (- 4a b - 1)c  + (6a b + 2)c  + (- 13a b  - 4a b - 
1)c
+--R                       + 
+--R                             2 2               3 3      2 2
+--R                         (22a b  + 6a b)c - 32a b  - 13a b  - 4a b
+--R                + 
+--R                     3     2                             +-+
+--R                  (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R             /
+--R                   +-+
+--R                54\|3
+--R          ,
+--R              3
+--R       ]
+--R     ,
+--R    [1]]
+--R         ]
+--R     ]
+--RType: Record(radval: Expression Integer,radmult: Integer,radvect: List 
Matrix Expression Integer)
+--E
+
+--S 239
 ll 2
+--R
+--R   (4)
+--R   [
+--R     radval =
+--R                  +---+
+--R             (- 9\|- 3  - 9)
+--R          *
+--R               ROOT
+--R                        9
+--R                     *
+--R                        ROOT
+--R                                          4              3
+--R                             (- 4a b - 1)c  + (6a b + 2)c
+--R                           + 
+--R                                   2 2             2       2 2              
 3 3
+--R                             (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 
32a b
+--R                           + 
+--R                                  2 2
+--R                             - 13a b  - 4a b
+--R                    + 
+--R                         3     2                             +-+
+--R                      (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R                 /
+--R                       +-+
+--R                    54\|3
+--R              ,
+--R                  3
+--R            **
+--R               2
+--R         + 
+--R                       +---+
+--R             ((3c + 3)\|- 3  - 3c - 3)
+--R          *
+--R             ROOT
+--R                      9
+--R                   *
+--R                      ROOT
+--R                                        4              3
+--R                           (- 4a b - 1)c  + (6a b + 2)c
+--R                         + 
+--R                                 2 2             2       2 2               
3 3
+--R                           (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 32a 
b
+--R                         + 
+--R                                2 2
+--R                           - 13a b  - 4a b
+--R                  + 
+--R                       3     2                             +-+
+--R                    (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R               /
+--R                     +-+
+--R                  54\|3
+--R            ,
+--R                3
+--R         + 
+--R             2
+--R           2c  - 2c + 12a b + 2
+--R      /
+--R              +---+
+--R           (9\|- 3  - 9)
+--R        *
+--R           ROOT
+--R                    9
+--R                 *
+--R                    ROOT
+--R                                      4              3         2 2          
   2
+--R                         (- 4a b - 1)c  + (6a b + 2)c  + (- 13a b  - 4a b - 
1)c
+--R                       + 
+--R                             2 2               3 3      2 2
+--R                         (22a b  + 6a b)c - 32a b  - 13a b  - 4a b
+--R                + 
+--R                     3     2                             +-+
+--R                  (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R             /
+--R                   +-+
+--R                54\|3
+--R          ,
+--R              3
+--R     ,
+--R    radmult= 1,
+--R
+--R     radvect =
+--R       [
+--R   [
+--R     [
+--R                                  +-+
+--R             (- 36c + 36a b + 36)\|3
+--R          *
+--R               ROOT
+--R                        9
+--R                     *
+--R                        ROOT
+--R                                          4              3
+--R                             (- 4a b - 1)c  + (6a b + 2)c
+--R                           + 
+--R                                   2 2             2       2 2              
 3 3
+--R                             (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 
32a b
+--R                           + 
+--R                                  2 2
+--R                             - 13a b  - 4a b
+--R                    + 
+--R                         3     2                             +-+
+--R                      (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R                 /
+--R                       +-+
+--R                    54\|3
+--R              ,
+--R                  3
+--R            **
+--R               2
+--R         + 
+--R                      +---+
+--R                 (- 9\|- 3  - 9)
+--R              *
+--R                 ROOT
+--R                                   4              3         2 2             
2
+--R                      (- 4a b - 1)c  + (6a b + 2)c  + (- 13a b  - 4a b - 1)c
+--R                    + 
+--R                          2 2               3 3      2 2
+--R                      (22a b  + 6a b)c - 32a b  - 13a b  - 4a b
+--R             + 
+--R                        2                             +---+     2
+--R                   (- 3c  + (21a b + 9)c - 15a b - 6)\|- 3  - 3c  + (21a b 
+ 9)c
+--R                 + 
+--R                   - 15a b - 6
+--R              *
+--R                  +-+
+--R                 \|3
+--R          *
+--R             ROOT
+--R                      9
+--R                   *
+--R                      ROOT
+--R                                        4              3
+--R                           (- 4a b - 1)c  + (6a b + 2)c
+--R                         + 
+--R                                 2 2             2       2 2               
3 3
+--R                           (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 32a 
b
+--R                         + 
+--R                                2 2
+--R                           - 13a b  - 4a b
+--R                  + 
+--R                       3     2                             +-+
+--R                    (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R               /
+--R                     +-+
+--R                  54\|3
+--R            ,
+--R                3
+--R         + 
+--R                         +---+
+--R             ((- 3c + 6)\|- 3  + 3c - 6)
+--R          *
+--R             ROOT
+--R                               4              3         2 2             2
+--R                  (- 4a b - 1)c  + (6a b + 2)c  + (- 13a b  - 4a b - 1)c
+--R                + 
+--R                      2 2               3 3      2 2
+--R                  (22a b  + 6a b)c - 32a b  - 13a b  - 4a b
+--R         + 
+--R                 3               2                       2 2             
+---+
+--R               (c  + (11a b + 1)c  + (- 11a b - 4)c + 24a b  + 2a b + 2)\|- 
3
+--R             + 
+--R                  3                 2                     2 2
+--R               - c  + (- 11a b - 1)c  + (11a b + 4)c - 24a b  - 2a b - 2
+--R          *
+--R              +-+
+--R             \|3
+--R      /
+--R               2 +-+
+--R           108b \|3
+--R        *
+--R             ROOT
+--R                      9
+--R                   *
+--R                      ROOT
+--R                                        4              3
+--R                           (- 4a b - 1)c  + (6a b + 2)c
+--R                         + 
+--R                                 2 2             2       2 2               
3 3
+--R                           (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 32a 
b
+--R                         + 
+--R                                2 2
+--R                           - 13a b  - 4a b
+--R                  + 
+--R                       3     2                             +-+
+--R                    (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R               /
+--R                     +-+
+--R                  54\|3
+--R            ,
+--R                3
+--R          **
+--R             2
+--R       ]
+--R     ,
+--R
+--R     [
+--R                  +---+
+--R             (- 9\|- 3  - 9)
+--R          *
+--R               ROOT
+--R                        9
+--R                     *
+--R                        ROOT
+--R                                          4              3
+--R                             (- 4a b - 1)c  + (6a b + 2)c
+--R                           + 
+--R                                   2 2             2       2 2              
 3 3
+--R                             (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 
32a b
+--R                           + 
+--R                                  2 2
+--R                             - 13a b  - 4a b
+--R                    + 
+--R                         3     2                             +-+
+--R                      (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R                 /
+--R                       +-+
+--R                    54\|3
+--R              ,
+--R                  3
+--R            **
+--R               2
+--R         + 
+--R                         +---+
+--R             ((- 6c + 3)\|- 3  + 6c - 3)
+--R          *
+--R             ROOT
+--R                      9
+--R                   *
+--R                      ROOT
+--R                                        4              3
+--R                           (- 4a b - 1)c  + (6a b + 2)c
+--R                         + 
+--R                                 2 2             2       2 2               
3 3
+--R                           (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 32a 
b
+--R                         + 
+--R                                2 2
+--R                           - 13a b  - 4a b
+--R                  + 
+--R                       3     2                             +-+
+--R                    (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R               /
+--R                     +-+
+--R                  54\|3
+--R            ,
+--R                3
+--R         + 
+--R             2
+--R           2c  - 2c + 12a b + 2
+--R      /
+--R               +---+
+--R           (9b\|- 3  - 9b)
+--R        *
+--R           ROOT
+--R                    9
+--R                 *
+--R                    ROOT
+--R                                      4              3         2 2          
   2
+--R                         (- 4a b - 1)c  + (6a b + 2)c  + (- 13a b  - 4a b - 
1)c
+--R                       + 
+--R                             2 2               3 3      2 2
+--R                         (22a b  + 6a b)c - 32a b  - 13a b  - 4a b
+--R                + 
+--R                     3     2                             +-+
+--R                  (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R             /
+--R                   +-+
+--R                54\|3
+--R          ,
+--R              3
+--R       ]
+--R     ,
+--R    [1]]
+--R         ]
+--R     ]
+--RType: Record(radval: Expression Integer,radmult: Integer,radvect: List 
Matrix Expression Integer)
+--E
+
+--S 240
 ll 3
+--R
+--R   (5)
+--R   [
+--R     radval =
+--R                  +---+
+--R             (- 9\|- 3  + 9)
+--R          *
+--R               ROOT
+--R                        9
+--R                     *
+--R                        ROOT
+--R                                          4              3
+--R                             (- 4a b - 1)c  + (6a b + 2)c
+--R                           + 
+--R                                   2 2             2       2 2              
 3 3
+--R                             (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 
32a b
+--R                           + 
+--R                                  2 2
+--R                             - 13a b  - 4a b
+--R                    + 
+--R                         3     2                             +-+
+--R                      (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R                 /
+--R                       +-+
+--R                    54\|3
+--R              ,
+--R                  3
+--R            **
+--R               2
+--R         + 
+--R                       +---+
+--R             ((3c + 3)\|- 3  + 3c + 3)
+--R          *
+--R             ROOT
+--R                      9
+--R                   *
+--R                      ROOT
+--R                                        4              3
+--R                           (- 4a b - 1)c  + (6a b + 2)c
+--R                         + 
+--R                                 2 2             2       2 2               
3 3
+--R                           (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 32a 
b
+--R                         + 
+--R                                2 2
+--R                           - 13a b  - 4a b
+--R                  + 
+--R                       3     2                             +-+
+--R                    (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R               /
+--R                     +-+
+--R                  54\|3
+--R            ,
+--R                3
+--R         + 
+--R               2
+--R           - 2c  + 2c - 12a b - 2
+--R      /
+--R              +---+
+--R           (9\|- 3  + 9)
+--R        *
+--R           ROOT
+--R                    9
+--R                 *
+--R                    ROOT
+--R                                      4              3         2 2          
   2
+--R                         (- 4a b - 1)c  + (6a b + 2)c  + (- 13a b  - 4a b - 
1)c
+--R                       + 
+--R                             2 2               3 3      2 2
+--R                         (22a b  + 6a b)c - 32a b  - 13a b  - 4a b
+--R                + 
+--R                     3     2                             +-+
+--R                  (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R             /
+--R                   +-+
+--R                54\|3
+--R          ,
+--R              3
+--R     ,
+--R    radmult= 1,
+--R
+--R     radvect =
+--R       [
+--R   [
+--R     [
+--R                                  +-+
+--R             (- 36c + 36a b + 36)\|3
+--R          *
+--R               ROOT
+--R                        9
+--R                     *
+--R                        ROOT
+--R                                          4              3
+--R                             (- 4a b - 1)c  + (6a b + 2)c
+--R                           + 
+--R                                   2 2             2       2 2              
 3 3
+--R                             (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 
32a b
+--R                           + 
+--R                                  2 2
+--R                             - 13a b  - 4a b
+--R                    + 
+--R                         3     2                             +-+
+--R                      (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R                 /
+--R                       +-+
+--R                    54\|3
+--R              ,
+--R                  3
+--R            **
+--R               2
+--R         + 
+--R                    +---+
+--R                 (9\|- 3  - 9)
+--R              *
+--R                 ROOT
+--R                                   4              3         2 2             
2
+--R                      (- 4a b - 1)c  + (6a b + 2)c  + (- 13a b  - 4a b - 1)c
+--R                    + 
+--R                          2 2               3 3      2 2
+--R                      (22a b  + 6a b)c - 32a b  - 13a b  - 4a b
+--R             + 
+--R                      2                               +---+     2
+--R                   (3c  + (- 21a b - 9)c + 15a b + 6)\|- 3  - 3c  + (21a b 
+ 9)c
+--R                 + 
+--R                   - 15a b - 6
+--R              *
+--R                  +-+
+--R                 \|3
+--R          *
+--R             ROOT
+--R                      9
+--R                   *
+--R                      ROOT
+--R                                        4              3
+--R                           (- 4a b - 1)c  + (6a b + 2)c
+--R                         + 
+--R                                 2 2             2       2 2               
3 3
+--R                           (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 32a 
b
+--R                         + 
+--R                                2 2
+--R                           - 13a b  - 4a b
+--R                  + 
+--R                       3     2                             +-+
+--R                    (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R               /
+--R                     +-+
+--R                  54\|3
+--R            ,
+--R                3
+--R         + 
+--R                       +---+
+--R             ((3c - 6)\|- 3  + 3c - 6)
+--R          *
+--R             ROOT
+--R                               4              3         2 2             2
+--R                  (- 4a b - 1)c  + (6a b + 2)c  + (- 13a b  - 4a b - 1)c
+--R                + 
+--R                      2 2               3 3      2 2
+--R                  (22a b  + 6a b)c - 32a b  - 13a b  - 4a b
+--R         + 
+--R                   3                 2                     2 2             
+---+
+--R               (- c  + (- 11a b - 1)c  + (11a b + 4)c - 24a b  - 2a b - 
2)\|- 3
+--R             + 
+--R                  3                 2                     2 2
+--R               - c  + (- 11a b - 1)c  + (11a b + 4)c - 24a b  - 2a b - 2
+--R          *
+--R              +-+
+--R             \|3
+--R      /
+--R               2 +-+
+--R           108b \|3
+--R        *
+--R             ROOT
+--R                      9
+--R                   *
+--R                      ROOT
+--R                                        4              3
+--R                           (- 4a b - 1)c  + (6a b + 2)c
+--R                         + 
+--R                                 2 2             2       2 2               
3 3
+--R                           (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 32a 
b
+--R                         + 
+--R                                2 2
+--R                           - 13a b  - 4a b
+--R                  + 
+--R                       3     2                             +-+
+--R                    (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R               /
+--R                     +-+
+--R                  54\|3
+--R            ,
+--R                3
+--R          **
+--R             2
+--R       ]
+--R     ,
+--R
+--R     [
+--R                  +---+
+--R             (- 9\|- 3  + 9)
+--R          *
+--R               ROOT
+--R                        9
+--R                     *
+--R                        ROOT
+--R                                          4              3
+--R                             (- 4a b - 1)c  + (6a b + 2)c
+--R                           + 
+--R                                   2 2             2       2 2              
 3 3
+--R                             (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 
32a b
+--R                           + 
+--R                                  2 2
+--R                             - 13a b  - 4a b
+--R                    + 
+--R                         3     2                             +-+
+--R                      (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R                 /
+--R                       +-+
+--R                    54\|3
+--R              ,
+--R                  3
+--R            **
+--R               2
+--R         + 
+--R                         +---+
+--R             ((- 6c + 3)\|- 3  - 6c + 3)
+--R          *
+--R             ROOT
+--R                      9
+--R                   *
+--R                      ROOT
+--R                                        4              3
+--R                           (- 4a b - 1)c  + (6a b + 2)c
+--R                         + 
+--R                                 2 2             2       2 2               
3 3
+--R                           (- 13a b  - 4a b - 1)c  + (22a b  + 6a b)c - 32a 
b
+--R                         + 
+--R                                2 2
+--R                           - 13a b  - 4a b
+--R                  + 
+--R                       3     2                             +-+
+--R                    (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R               /
+--R                     +-+
+--R                  54\|3
+--R            ,
+--R                3
+--R         + 
+--R               2
+--R           - 2c  + 2c - 12a b - 2
+--R      /
+--R               +---+
+--R           (9b\|- 3  + 9b)
+--R        *
+--R           ROOT
+--R                    9
+--R                 *
+--R                    ROOT
+--R                                      4              3         2 2          
   2
+--R                         (- 4a b - 1)c  + (6a b + 2)c  + (- 13a b  - 4a b - 
1)c
+--R                       + 
+--R                             2 2               3 3      2 2
+--R                         (22a b  + 6a b)c - 32a b  - 13a b  - 4a b
+--R                + 
+--R                     3     2                             +-+
+--R                  (2c  - 3c  + (- 9a b - 3)c - 9a b + 2)\|3
+--R             /
+--R                   +-+
+--R                54\|3
+--R          ,
+--R              3
+--R       ]
+--R     ,
+--R    [1]]
+--R         ]
+--R     ]
+--RType: Record(radval: Expression Integer,radmult: Integer,radvect: List 
Matrix Expression Integer)
+--E
 
-
--------------------------------------------------------------------
--- address@hidden/11/24/93 Manuel Bronstein
--------------------------------------------------------------------
+@
address@hidden/11/24/93 Manuel Bronstein
+\begin{verbatim}
 --)clear all
 --Here's a bug that appears with the )math option only.
 --
@@ -1180,314 +5734,554 @@ ll 3
 --
 -- Internal system problem in function appInfix :
 -- fewer than 2 arguments to an infix function
+\end{verbatim}
+
address@hidden/12/1/93 Don Coppersmith
 
--------------------------------------------------------------------
--- address@hidden/12/1/93 Don Coppersmith
--------------------------------------------------------------------
+Attached is the list of integers n such that 2**512-n is prime
+and n is between 0 and 5000:
+\begin{verbatim}
+   4893,4653,4475,4005,3893,3669,3459,3143,2967,
+   2807,2529,1827,1695,975,875,629,569
+\end{verbatim}
+
+It was gotten from Axiom by issuing the commands
+<<*>>=
 )clear all
---Attached is the list of integers n such that 2**512-n is prime
---and n is between 0 and 5000:
---
---   4893,4653,4475,4005,3893,3669,3459,3143,2967,
---   2807,2529,1827,1695,975,875,629,569
 
---It was gotten from Axiom by issuing the commands
+--S 241
 qrimes : Stream Integer := generate(nextPrime,2**512-5000)
+--R
+--R   (1)
+--R   [
+--R    
13407807929942597099574024998205846127479365820592393377723561443721764030_
+--R     
0735469768018742981669034276900318581864860508537538828119465699464336490_
+--R     06079096
+--R     ,
+--R
+--R    
13407807929942597099574024998205846127479365820592393377723561443721764030_
+--R     
0735469768018742981669034276900318581864860508537538828119465699464336490_
+--R     06079203
+--R     ,
+--R
+--R    
13407807929942597099574024998205846127479365820592393377723561443721764030_
+--R     
0735469768018742981669034276900318581864860508537538828119465699464336490_
+--R     06079443
+--R     ,
+--R
+--R    
13407807929942597099574024998205846127479365820592393377723561443721764030_
+--R     
0735469768018742981669034276900318581864860508537538828119465699464336490_
+--R     06079621
+--R     ,
+--R
+--R    
13407807929942597099574024998205846127479365820592393377723561443721764030_
+--R     
0735469768018742981669034276900318581864860508537538828119465699464336490_
+--R     06080091
+--R     ,
+--R
+--R    
13407807929942597099574024998205846127479365820592393377723561443721764030_
+--R     
0735469768018742981669034276900318581864860508537538828119465699464336490_
+--R     06080203
+--R     ,
+--R
+--R    
13407807929942597099574024998205846127479365820592393377723561443721764030_
+--R     
0735469768018742981669034276900318581864860508537538828119465699464336490_
+--R     06080427
+--R     ,
+--R
+--R    
13407807929942597099574024998205846127479365820592393377723561443721764030_
+--R     
0735469768018742981669034276900318581864860508537538828119465699464336490_
+--R     06080637
+--R     ,
+--R
+--R    
13407807929942597099574024998205846127479365820592393377723561443721764030_
+--R     
0735469768018742981669034276900318581864860508537538828119465699464336490_
+--R     06080953
+--R     ,
+--R
+--R    
13407807929942597099574024998205846127479365820592393377723561443721764030_
+--R     
0735469768018742981669034276900318581864860508537538828119465699464336490_
+--R     06081129
+--R     ,
+--R    ...]
+--R                                                         Type: Stream 
Integer
+--E
+
+--S 242
 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
 srimes := complete rrimes
+--R
+--R   (3)  [5000,4893,4653,4475,4005,3893,3669,3459,3143,2967,...]
+--R                                                         Type: Stream 
Integer
+--E
+
+--S 244
 [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
 [srimes.i for i in [10..18]]
+--R
+--R   (5)  [[2967,2807,2529,1827,1695,975,875,629,569]]
+--R                                                    Type: List Stream 
Integer
+--E
+
+@
address@hidden/12/13/93 (Mike Richardson)
 
--------------------------------------------------------------------
--- address@hidden/12/13/93 (Mike Richardson)
--------------------------------------------------------------------
+This is fixed now. You get an Expression Float.
+
+I suspect that this is an example of the same thing - but it looks worse:
+\begin{verbatim} 
+  (145) ->X := log(0.7*%i*x)
+ 
+    >> Error detected within library code:
+    negative root
+\end{verbatim}
+<<*>>=
 )clear all
---
---This is fixed now. You get an Expression Float.
---
---> 
---> I suspect that this is an example of the same thing - but it looks
---> worse:
---> 
---> (145) ->X := log(0.7*%i*x)
---> 
--->    >> Error detected within library code:
--->    negative root
---> 
---> Mike
---> 
-
-
--------------------------------------------------------------------
---  address@hidden/12/15/93 (Robert S. Sutor)
--------------------------------------------------------------------
-)clear all
---enter Integer in input box
---choose domains
---choose Description
---click on Convertible(String)
---
---page cannot be formatted
 
--------------------------------------------------------------------
--- address@hidden/15/93 (barry trager)
--------------------------------------------------------------------
+--S 246
+X := log(0.7*%i*x)
+--R
+--R   (1)  log(0.7 %i x)
+--R                                               Type: Expression Complex 
Float
+--E
+
+@
+
address@hidden/12/15/93 (Robert S. Sutor)
+\begin{itemize}
+\item enter Integer in input box
+\item choose domains
+\item choose Description
+\item click on Convertible(String)
+\end{itemize}
+page cannot be formatted
+
address@hidden/15/93 (barry trager)
+<<*>>=
 )clear all
+
+--S 247
 log2() --> Float
-exp1() --> DoubleFLoat ???
+--R 
+--R
+--R   (1)  0.6931471805 5994530942
+--R                                                                  Type: 
Float
+--E
 
+--S 248
+exp1() --> DoubleFLoat ???
+--R 
+--R
+--R   (2)  2.7182818284 590452354
+--R                                                                  Type: 
Float
+--E
 
--------------------------------------------------------------------
---  address@hidden/12/14/93 Claude Quitte
--------------------------------------------------------------------
+@
address@hidden/12/14/93 Claude Quitte
+
+There is a bug in the function \verb|delete_!|
+for the type List ; this function,
+has two arguments, a list L and an integer n : \verb|delete_!(L, n)| 
+returns a list L with the n nth-item deleted, MODIFYING its argument L.
+
+But for n = 1, the argument L is not MODIFIED !!! (exactly for n =
+minIndex(L)). An extract of the package ListAggregate (abbreviation LSAGG,
+file aggcat.spad).
+
+\begin{verbatim}
+ListAggregate(S:Object): Category == Join(StreamAggregate S,
+   FiniteLinearAggregate S, ExtensibleLinearAggregate S) with
+      list: S -> $
+       ++ list(x) returns the list of one element x.
+ add
+   ..........
+
+   delete_!(x:$, i:I) ==
+     i < (m := minIndex x) => error "index out of range"
+     i = m => rest x                           ****** <- here is the error
+     y := rest(x, (i - 1 - m)::N)
+     setrest_!(y, rest(y, 2))
+     x
+
+A little session :
+\end{verbatim}
+<<*>>=
 )clear all
---There is a bug in the function delete_! for the type List ; this function,
---has two arguments, a list L and an integer n : delete_!(L, n) returns
---a list L with the n nth-item deleted, MODIFYING its argument L.
---
---But for n = 1, the argument L is not MODIFIED !!! (exactly for n =
---minIndex(L)). An extract of the package ListAggregate (abbreviation LSAGG,
---file aggcat.spad).
---
---
-----------------------------------------------------------------------
---ListAggregate(S:Object): Category == Join(StreamAggregate S,
---   FiniteLinearAggregate S, ExtensibleLinearAggregate S) with
---      list: S -> $
---     ++ list(x) returns the list of one element x.
--- add
---   ..........
---
---   delete_!(x:$, i:I) ==
---     i < (m := minIndex x) => error "index out of range"
---     i = m => rest x                         ****** <- here is the error
---     y := rest(x, (i - 1 - m)::N)
---     setrest_!(y, rest(y, 2))
---     x
---
---A little session :
---
+
+--S 249
 L : List(String) := ["There is", "it seems", "a real bug", "here"]
---   (1)  ["There is","it seems","a real bug","here"]
---                                                            Type: List String
---
+--R
+--R   (1)  ["There is","it seems","a real bug","here"]
+--R                                                            Type: List 
String
+--E
+
+--S 250
 L1 := delete!(L, 1)
---   (2)  ["it seems","a real bug","here"]
---                                                            Type: List String
+--R
+--R   (2)  ["it seems","a real bug","here"]
+--R                                                            Type: List 
String
+--E
+
+--S 251
 L
---   (3)  ["There is","it seems","a real bug","here"]
---                                                            Type: List String
---
+--R
+--R   (3)  ["There is","it seems","a real bug","here"]
+--R                                                            Type: List 
String
+--E
+
+--S 252
 L2 := delete!(L, 2)
---   (4)  ["There is","a real bug","here"]
---                                                            Type: List String
+--R
+--R   (4)  ["There is","a real bug","here"]
+--R                                                            Type: List 
String
+--E
+
+--S 253
 L
---   (5)  ["There is","a real bug","here"]
---
---Is there a way to fix this bug quickly ?? (I am ready to modify the source
---Axiom aggcat.spad).
---The problem with ! functions lies in the documentation not in the code. We
---need to explain more clearly that ! functions are ALLOWED to update their
---arguments, not REQUIRED to do so. 
---Whenever using ! functions you should always
---use the returned result, not try to use the updated argument. This is how
---the code is designed. 
---For example if you try to do insert! into an empty list,
---the argument is not updatable and thus a new list is created. The reason for
---having ! operations is for efficiency to do less copying, not to guarantee
---that given arguments will always be updated. So the correct use is to only
---depend on the results returned by updating functions.
-
-
--------------------------------------------------------------------
---  address@hidden/1/13/94 Claude Quitte
--------------------------------------------------------------------
+--R
+--R   (5)  ["There is","a real bug","here"]
+--R                                                            Type: List 
String
+--E
+
+@
+\begin{verbatim}
+   (5)  ["There is","a real bug","here"]
+\end{verbatim}
+Is there a way to fix this bug quickly ?? (I am ready to modify the source
+Axiom aggcat.spad).
+
+The problem with ! functions lies in the documentation not in the code. We
+need to explain more clearly that ! functions are ALLOWED to update their
+arguments, not REQUIRED to do so. 
+
+Whenever using ! functions you should always
+use the returned result, not try to use the updated argument. This is how
+the code is designed. 
+
+For example if you try to do insert! into an empty list,
+the argument is not updatable and thus a new list is created. The reason for
+having ! operations is for efficiency to do less copying, not to guarantee
+that given arguments will always be updated. So the correct use is to only
+depend on the results returned by updating functions.
+
address@hidden/1/13/94 Claude Quitte
+<<*>>=
 )clear all
+
+--S 254
 K := Fraction(Integer)   
+--R
+--R   (1)  Fraction Integer
+--R                                                                 Type: 
Domain
+--E
+
+--S 255
 PolK := UP('X, K) 
+--R
+--R   (2)  UnivariatePolynomial(X,Fraction Integer)
+--R                                                                 Type: 
Domain
+--E
+
+--S 256
 X : PolK := monomial(1, 1) 
+--R
+--R   (3)  X
+--R                               Type: UnivariatePolynomial(X,Fraction 
Integer)
+--E
+
+--S 257
 n : PositiveInteger := 15 
+--R
+--R   (4)  15
+--R                                                        Type: 
PositiveInteger
+--E
+
+--S 258
 E := SimpleAlgebraicExtension(K, PolK, X**n + X**(n-3) -1) 
+--R
+--R   (5)
+--R  SimpleAlgebraicExtension(Fraction Integer,UnivariatePolynomial(X,Fraction 
Int
+--R  eger),X**15+X**12-1)
+--R                                                                 Type: 
Domain
+--E
+
+--S 259
 y : E := X::E
+--R
+--R   (6)  X
+--RType: SimpleAlgebraicExtension(Fraction 
Integer,UnivariatePolynomial(X,Fraction Integer),X**15+X**12-1)
+--E
+
+--S 260
 minimalPolynomial(y)$E
---
---Internal Error
---The function minimalPolynomial with signature SimpleAlgebraicExtension(
---Fraction Integer,UnivariatePolynomial(X,Fraction Integer),X**15+X**12-1)
----> UnivariatePolynomial(X,Fraction Integer) is missing from domain
---SimpleAlgebraicExtension(Fraction (Integer))
---(UnivariatePolynomial X (Fraction (Integer)))((15 1 . 1) (12 1 . 1) (0 -1 . 
1))
+--R
+--R         15    12
+--R   (7)  X   + X   - 1
+--R                               Type: UnivariatePolynomial(X,Fraction 
Integer)
+--E
+
+@
+\begin{verbatim}
+Internal Error
+The function minimalPolynomial with signature SimpleAlgebraicExtension(
+Fraction Integer,UnivariatePolynomial(X,Fraction Integer),X**15+X**12-1)
+ UnivariatePolynomial(X,Fraction Integer) is missing from domain
+SimpleAlgebraicExtension(Fraction (Integer))
+(UnivariatePolynomial X (Fraction (Integer)))((15 1 . 1) (12 1 . 1) (0 -1 . 1))
+\end{verbatim}
 
--------------------------------------------------------------------
--- address@hidden/02/20/94 (Richard Luczak)
--------------------------------------------------------------------
address@hidden/02/20/94 (Richard Luczak)
+
+I'm trying to define the following rule
+
+<<*>>=
 )clear all
---
---I'm trying to define the following rule
---
+
+--S 261
 tr := rule cos(x)**(n | integer? n and even? n)==(1-sin(x)**2)**(n/2)
---
---Axiom returns
---
---   Cannot find a definition or library operation named even? with argument
---   types
---                             Expression Integer
---
---   We will attempt to step through and interpret the code.
---
---                                  n
---                                  -
---              n             2     2
---   (2)  cos(x)  == (- sin(x)  + 1)
---                        Type: RewriteRule(Integer,Integer,Expression Integer)
---
---
---and henceforth the rule does not work as desired. Variations on the same bug
---occur involving positive?. Of course, I get what I want using integer?(n/2)
---but ... Is this a bug?
---
--- from barry:
---
---Should use integer? n and even? integer n  instead.
---
---I toyed with the idea of implementing:
---    even? x == integer? x and even? integer x
---    odd? x == integer? x and odd? integer x
---in EXPR, but this would mean that   (x +-> even? x or odd? x)  is not always
---true anymore and I'm not sure it's a good idea. If you guys don't think it's
---a problem, it takes 2 minutes to add it to EXPR R when R has RETRACT INT
---(don't use integer? but address@hidden(Integer, "failed")).
-
--------------------------------------------------------------------
--- address@hidden/02/22/94 don coppersmith
--------------------------------------------------------------------
-)clear all
---Questions that came up using Axiom on Aixproj:
---
---How does one find a Pade approximation?  I tried  pade(2,2,y)
---pade(y,2,2)  Pade(2,2,y)  PadeApproximation(2,2,y)
---(where y is a series in x) to no avail.
---
---Complaint: The error message
---
---    Could not find library function "pade" with arguments
---         (integer, integer, series).
---
---is misleading.  If it can't find any "pade", then say
---
---    Could not find library function "pade".
---
---If there is such a function, but I've got the arguments wrong,
---why not say
---
---    The library function "pade" takes arguments
---          (series, integer, integer)
---
---or at least make that information available somehow.
---
--- from bob sutor:
---
---Don,
---  Try using )what op pade  to see what is available. This will give
---you all operations with "pade" in their names. You can also search for
---*pade* via the HyperDoc Browse utility. If you don't use Browse, following
---up with, say, )display op pade, will give you a more information, though
---it is badly formatted (I will look at that).
---
---Aixproj is back-level, so I'm not sure exactly what is up their
---relative to the current system.
---
---I agree we could use better messages regarding unknown functions
---and I will look at that.
---  Bob
---
--- from bob sutor:
---
---The pade operation requires a taylor series as its third object while
---"series" returns a UnivariatePuiseuxSeries. If you set
---  y := taylor(1+x)**(1/5)
---then things work. You can also do
---  pade(1,1,y :: UTS(EXPR INT, x, 0) )
---but this is more work if you really have a Taylor series.
---
---This is unintuitive and there should be a "pade" for Puiseux series that
---fails if the series is not appropriate. Barry? I will now look at adding
---a bit more coercion support to the interpreter to allow Puiseux series
---to possibly retract to Laurent series and then possibly to Taylor series.
---
---Don,
---  I added the retractions I mentioned before to the development system.
---When the system is unsuccessful in matching a UnivariatePuiseuxSeries
---to an operation, it will first try to retract it to a
---UnivariateLaurentSeries. If that fails still, it will try to retract to
---a UnivariateTaylorSeries.
---
---  Be aware that this sort of thing happens when you are evaluating
---an expression. If you are defining a function, you should add
---explicit coercions or create objects of the correct type for
---efficiency. You function may still work, but it may not run in
---a compiled form.
+--R
+--R                                  n
+--R                                  -
+--R              n             2     2
+--R   (1)  cos(x)  == (- sin(x)  + 1)
+--R                        Type: RewriteRule(Integer,Integer,Expression 
Integer)
+--E
 
--------------------------------------------------------------------
--- address@hidden/02/24/94 Barry Trager
--------------------------------------------------------------------
+@
+Axiom returns
+\begin{verbatim}
+  Cannot find a definition or library operation named even? with argument
+  types
+                            Expression Integer
+   We will attempt to step through and interpret the code.
+                                  n
+                                  -
+              n             2     2
+   (2)  cos(x)  == (- sin(x)  + 1)
+                        Type: RewriteRule(Integer,Integer,Expression Integer)
+
+\end{verbatim}
+and henceforth the rule does not work as desired. Variations on the same bug
+occur involving positive?. Of course, I get what I want using integer?(n/2)
+but ... Is this a bug?
+
+from barry:
+
+Should use integer? n and even? integer n  instead.
+
+I toyed with the idea of implementing:
+\begin{verbatim}
+    even? x == integer? x and even? integer x
+    odd? x == integer? x and odd? integer x
+\end{verbatim}
+in EXPR, but this would mean that   (x +-> even? x or odd? x)  is not always
+true anymore and I'm not sure it's a good idea. If you guys don't think it's
+a problem, it takes 2 minutes to add it to EXPR R when R has RETRACT INT
+(don't use integer? but address@hidden(Integer, "failed")).
+
address@hidden/02/22/94 don coppersmith
+
+Questions that came up using Axiom on Aixproj:
+
+How does one find a Pade approximation?  I tried  pade(2,2,y)
+pade(y,2,2)  Pade(2,2,y)  PadeApproximation(2,2,y)
+(where y is a series in x) to no avail.
+
+Complaint: The error message
+\begin{verbatim}
+    Could not find library function "pade" with arguments
+         (integer, integer, series).
+\end{verbatim}
+is misleading.  If it can't find any "pade", then say
+\begin{verbatim}
+    Could not find library function "pade".
+\end{verbatim}
+If there is such a function, but I've got the arguments wrong,
+why not say
+\begin{verbatim}
+    The library function "pade" takes arguments
+          (series, integer, integer)
+\end{verbatim}
+or at least make that information available somehow.
+
+from bob sutor:
+
+Don,
+
+Try using )what op pade  to see what is available. This will give
+you all operations with "pade" in their names. You can also search for
+*pade* via the HyperDoc Browse utility. If you don't use Browse, following
+up with, say, )display op pade, will give you a more information, though
+it is badly formatted (I will look at that).
+
+Aixproj is back-level, so I'm not sure exactly what is up their
+relative to the current system.
+
+I agree we could use better messages regarding unknown functions
+and I will look at that.
+
+Bob
+
+from bob sutor:
+
+The pade operation requires a taylor series as its third object while
+``series'' returns a UnivariatePuiseuxSeries. If you set
+\begin{verbatim}
+  y := taylor(1+x)**(1/5)
+\end{verbatim}
+then things work. You can also do
+\begin{verbatim}
+  pade(1,1,y :: UTS(EXPR INT, x, 0) )
+\end{verbatim}
+but this is more work if you really have a Taylor series.
+
+This is unintuitive and there should be a ``pade'' for Puiseux series that
+fails if the series is not appropriate. Barry? I will now look at adding
+a bit more coercion support to the interpreter to allow Puiseux series
+to possibly retract to Laurent series and then possibly to Taylor series.
+
+Don,
+
+I added the retractions I mentioned before to the development system.
+When the system is unsuccessful in matching a UnivariatePuiseuxSeries
+to an operation, it will first try to retract it to a
+UnivariateLaurentSeries. If that fails still, it will try to retract to
+a UnivariateTaylorSeries.
+
+Be aware that this sort of thing happens when you are evaluating
+an expression. If you are defining a function, you should add
+explicit coercions or create objects of the correct type for
+efficiency. You function may still work, but it may not run in
+a compiled form.
+
address@hidden/02/24/94 Barry Trager
+<<*>>=
 )clear all
+
+--S 262
 sqrt(2)*2.0 -- fails
+--R 
+--R
+--R   (1)  2.8284271247 461900976
+--R                                                       Type: Expression 
Float
+--E
+
+--S 263
 sqrt(2)::EXPR INT * 2.0 -- works
+--R 
+--R
+--R   (2)  2.8284271247 461900976
+--R                                                       Type: Expression 
Float
+--E
 
--- tpd: this now fails with sample : () -> Reference Integer is missing
--- from domain: Integer
--- Internal Error
+@
+tpd: this now fails with sample : () -> Reference Integer is missing
+from domain: Integer
+Internal Error
 
address@hidden/02/28/94 Manuel Bronstein
 
--------------------------------------------------------------------
--- address@hidden/02/28/94 Manuel Bronstein
--------------------------------------------------------------------
+<<*>>=
 )clear all
+
+--S 264
 f := exp(exp(x)*exp(1/exp(x))) / exp exp x
---)tr LIMITPS )math
---)tr DFINTTLS )math
---)tr DFINTTLS_;findLimit
--- the following exits back to the shell after limit returns "failed":
-computeInt(first tower f, f, 0, %plusInfinity, false)$DFINTTLS(INT, EXPR INT)
-
--------------------------------------------------------------------
--- address@hidden/03/02/94 James Davenport
--------------------------------------------------------------------
-)clear all
---I've fixed coercions of List and Vector to DirectProduct.
---You can now do things like
+--R
+--R                1
+--R               ---
+--R                 x
+--R            x  %e
+--R          %e %e
+--R        %e
+--R   (1)  ----------
+--R               x
+--R             %e
+--R           %e
+--R                                                     Type: Expression 
Integer
+--E
+
+@
+\begin{verbatim}
+ )tr LIMITPS )math
+ )tr DFINTTLS )math
+ )tr DFINTTLS_;findLimit
+\end{verbatim}
+the following exits back to the shell after limit returns ``failed'':
+computeInt(first tower f, f, 0, \%plusInfinity, false)\$DFINTTLS(INT, EXPR INT)
+
address@hidden/03/02/94 James Davenport
+
+I've fixed coercions of List and Vector to DirectProduct.
+You can now do things like
+
+<<*>>=
+)clear all
+
+--S 265
 [1,2,3] :: DirectProduct(3, Fraction Integer)
---
---I also fixed coercions from Vector to List, which seems to have
---been removed via a library change.
+--R
+--R   (1)  [1,2,3]
+--R                                      Type: DirectProduct(3,Fraction 
Integer)
+--E
+
+@
+I also fixed coercions from Vector to List, which seems to have
+been removed via a library change.
+
address@hidden/03/09/94 James Davenport
 
--------------------------------------------------------------------
--- address@hidden/03/09/94 James Davenport
--------------------------------------------------------------------
+Used to give a lisp error
+<<*>>=
 )clear all
--- used to give a lisp error
+
+--S 266
 x**10+1::Polynomial PrimeField 2
+--R
+--R         10
+--R   (1)  x   + 1
+--R                                                Type: Polynomial PrimeField 
2
+--E
 
--------------------------------------------------------------------
--- address@hidden/03/11/94 Themos Tsikas
--------------------------------------------------------------------
+@
address@hidden/03/11/94 Themos Tsikas
+<<*>>=
 )clear all
+
+--S 267
 f(x)==x**2
+--R                                                                   Type: 
Void
+--E
+
+@
 draw(f,-1..1)
 
--------------------------------------------------------------------
--- address@hidden/03/16/94 Themos Tsikas
--------------------------------------------------------------------
-)clear all
---The problem was that nobody was around to catch the coerceOrCroaker.
---Just comment out the first line of intCodeGenCoerce1 in i-code.boot
---(the one with the explicit THROW). Bothe the riemannSphereDraw and JHD's
---original example will then work. -- bob sutor
address@hidden/03/16/94 Themos Tsikas
+
+The problem was that nobody was around to catch the coerceOrCroaker.
+Just comment out the first line of intCodeGenCoerce1 in i-code.boot
+(the one with the explicit THROW). Bothe the riemannSphereDraw and JHD's
+original example will then work. -- bob sutor
+
+\begin{verbatim}
 )read conformal
 riemannSphereDraw(1..2,0..%pi,4,4,"polar")
+\end{verbatim}
 
-
+<<*>>=
+)spool
+)lisp (bye)
 
 @
 \eject
diff --git a/src/input/schaum17.input.pamphlet 
b/src/input/schaum17.input.pamphlet
index 6c5e67c..fdc11a2 100644
--- a/src/input/schaum17.input.pamphlet
+++ b/src/input/schaum17.input.pamphlet
@@ -776,7 +776,7 @@ bb:=-1/a*tan(%pi/4-(a*x)/2)
 
 --S 57 of 136
 cc:=aa-bb
---R
+--R 
 --R
 --R                                       2a x - %pi
 --R        (- sin(a x) - cos(a x) - 1)tan(----------) - 2cos(a x) - 2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]