diff --git a/changelog b/changelog
index edb5476..18904cd 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,108 @@
+20070901 tpd src/doc/spadhelp add RealSolvePackage
+20070901 tpd src/algebra/Makefile add RealSolvePackage.help 
+20070901 tpd src/algebra/acplot.spad add RealSolvePackage.help (REALSOLV)
+20070901 tpd src/algebra/acplot.spad RealSolvePackage.input
+20070830 tpd src/doc/spadhelp add LinearOrdinaryDifferentialOperator2
+20070830 tpd src/algebra/Makefile add LinearOrdinaryDifferentialOperator2.help 
+20070830 tpd src/algebra/lodo.spad add LinearOrdinaryDifferentialOperator2.help
+20070830 tpd src/algebra/lodo.spad LinearOrdinaryDifferentialOperator2.input
+20070830 tpd src/doc/spadhelp add LinearOrdinaryDifferentialOperator1
+20070830 tpd src/algebra/Makefile add LinearOrdinaryDifferentialOperator1.help 
+20070830 tpd src/algebra/lodo.spad add LinearOrdinaryDifferentialOperator1.help
+20070830 tpd src/algebra/lodo.spad LinearOrdinaryDifferentialOperator1.input
+20070830 tpd src/doc/spadhelp add LinearOrdinaryDifferentialOperator
+20070830 tpd src/algebra/Makefile add LinearOrdinaryDifferentialOperator.help 
+20070830 tpd src/algebra/lodo.spad add LinearOrdinaryDifferentialOperator.help
+20070830 tpd src/algebra/lodo.spad add LinearOrdinaryDifferentialOperator.input
+20070830 tpd src/doc/spadhelp add LiePolynomial
+20070830 tpd src/algebra/Makefile add LiePolynomial.help 
+20070830 tpd src/algebra/xlpoly.spad add LiePolynomial.help (LPOLY)
+20070830 tpd src/algebra/xlpoly.spad add LiePolynomial.input
+20070830 tpd src/doc/spadhelp add LieExponentials
+20070830 tpd src/algebra/Makefile add LieExponentials.help 
+20070830 tpd src/algebra/xlpoly.spad add LieExponentials.help (LEXP)
+20070830 tpd src/algebra/xlpoly.spad add LieExponentials.input
+20070830 tpd src/doc/spadhelp add Library
+20070830 tpd src/algebra/Makefile add Library.help 
+20070830 tpd src/algebra/files.spad add Library.help (LIB)
+20070830 tpd src/algebra/files.spad add Library.input
+20070830 tpd src/doc/spadhelp add LexTriangularPackage
+20070830 tpd src/algebra/Makefile add LexTriangularPackage.help 
+20070830 tpd src/algebra/zerodim.spad add LexTriangularPackage.help (LEXTRIPK)
+20070830 tpd src/algebra/zerodim.spad add LexTriangularPackage.input
+20070830 tpd src/doc/spadhelp add KeyedAccessFile
+20070830 tpd src/algebra/Makefile add KeyedAccessFile.help 
+20070830 tpd src/algebra/numtheor.spad add KeyedAccessFile.help (KAFILE)
+20070830 tpd src/algebra/numtheor.spad add KeyedAccessFile.input
+20070830 tpd src/doc/spadhelp add Kernel
+20070830 tpd src/algebra/Makefile add Kernel.help 
+20070830 tpd src/algebra/numtheor.spad add Kernel.help (KERNEL)
+20070830 tpd src/algebra/numtheor.spad add Kernel.input
+20070830 tpd src/doc/spadhelp add IntegerNumberTheoryFunctions
+20070830 tpd src/algebra/Makefile add IntegerNumberTheoryFunctions.help 
+20070830 tpd src/algebra/numtheor.spad add IntegerNumberTheoryFunctions.help
+20070830 tpd src/algebra/numtheor.spad add IntegerNumberTheoryFunctions.input
+20070830 tpd src/doc/spadhelp add IntegerLinearDependence
+20070830 tpd src/algebra/Makefile add IntegerLinearDependence.help 
+20070830 tpd src/algebra/lindep.spad add IntegerLinearDependence.help (ZLINDEP)
+20070830 tpd src/algebra/lindep.spad add IntegerLinearDependence.input
+20070830 tpd src/doc/spadhelp add RomanNumeral
+20070830 tpd src/algebra/Makefile add RomanNumeral.help 
+20070830 tpd src/algebra/integer.spad add RomanNumeral.help (ROMAN)
+20070830 tpd src/algebra/integer.spad add RomanNumeral.input
+20070830 tpd src/doc/spadhelp add Integer
+20070830 tpd src/algebra/Makefile add Integer.help 
+20070830 tpd src/algebra/integer.spad add Integer.help (INT)
+20070830 tpd src/algebra/integer.spad add Integer.input
+20070830 tpd src/doc/spadhelp add HexadecimalExpansion
+20070830 tpd src/algebra/Makefile add HexadecimalExpansion.help 
+20070830 tpd src/algebra/radix.spad add HexadecimalExpansion.help (HEXADEC)
+20070830 tpd src/algebra/radix.spad add HexadecimalExpansion.input
+20070829 tpd src/doc/spadhelp add Heap
+20070829 tpd src/algebra/Makefile add Heap.help 
+20070829 tpd src/algebra/bags.spad add Heap.help (FR)
+20070829 tpd src/algebra/bags.spad add Heap.input
+20070829 tpd src/doc/spadhelp add GroebnerFactorizationPackage
+20070829 tpd src/algebra/Makefile add GroebnerFactorizationPackage.help 
+20070829 tpd src/algebra/fparfrac.spad add GroebnerFactorizationPackage.help
+20070829 tpd src/algebra/fparfrac.spad add GroebnerFactorizationPackage.input
+20070829 tpd src/doc/spadhelp add GeneralSparseTable
+20070829 tpd src/algebra/Makefile add GeneralSparseTable.help 
+20070829 tpd src/algebra/table.spad add GeneralSparseTable.help (GSTBL)
+20070829 tpd src/algebra/table.spad add GeneralSparseTable.input 
+20070829 tpd src/doc/spadhelp add FullPartialFractionExpansion
+20070829 tpd src/algebra/Makefile add FullPartialFractionExpansion.help 
+20070829 tpd src/algebra/fparfrac.spad add FullPartialFractionExpansion.help
+20070829 tpd src/algebra/fparfrac.spad add FullPartialFractionExpansion.input
+20080829 tpd src/doc/book.pamphlet correct typo
+20070829 tpd src/doc/spadhelp add Fraction
+20070829 tpd src/algebra/Makefile add Fraction.help 
+20070829 tpd src/algebra/fraction.spad add Fraction.help (FR)
+20070829 tpd src/algebra/fraction.spad add Fraction.input
+20070829 tpd src/doc/spadhelp add Float
+20070829 tpd src/algebra/Makefile add Float.help 
+20070829 tpd src/algebra/float.spad add Float.help (FLOAT)
+20070829 tpd src/algebra/float.spad add Float.input
+20070828 tpd src/doc/spadhelp add FlexibleArray
+20070828 tpd src/algebra/Makefile add FlexibleArray.help 
+20070828 tpd src/algebra/array1.spad add FlexibleArray.help (FARRAY)
+20070828 tpd src/algebra/array1.spad add FlexibleArray.input
+20070827 tpd src/doc/spadhelp add FileName
+20070827 tpd src/algebra/Makefile add FileName.help 
+20070827 tpd src/algebra/fname.spad add FileName.help (FNAME)
+20070827 tpd src/algebra/fname.spad add FileName.input
+20070827 tpd src/doc/spadhelp add File
+20070827 tpd src/algebra/Makefile add File.help 
+20070827 tpd src/algebra/files.spad add File.help (FILE)
+20070827 tpd src/algebra/files.spad add File.input
+20070827 tpd src/doc/spadhelp add FactoredFunctions2
+20070827 tpd src/algebra/Makefile add FactoredFunctions2.help 
+20070827 tpd src/algebra/fr.spad add FactoredFunctions2.help (FR2)
+20070827 tpd src/algebra/fr.spad add FactoredFunctions2.input
+20070827 tpd src/doc/spadhelp add Factored
+20070827 tpd src/algebra/Makefile add Factored.help 
+20070827 tpd src/algebra/fr.spad add Factored.help (FR)
+20070827 tpd src/algebra/fr.spad add Factored.input
 20070826 tpd --patch-51 (Sept 2007) release
 20070826 tpd Makefile.pamphlet update version to Sept 2007
 20070826 tpd Makefile update version to Sept 2007
diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet
index 5cfb29e..9621c48 100644
--- a/src/algebra/Makefile.pamphlet
+++ b/src/algebra/Makefile.pamphlet
@@ -1491,7 +1491,7 @@ DOCFILES= \
 <<environment>>=
 
 TESTS=${INPUT}/ACPLOT.input ${INPUT}/INTHEORY.input ${INPUT}/PERM.input \
-      ${INPUT}/REALSOLV.input ${INPUT}/TESTFR.input ${INPUT}/VIEW2D.input 
+      ${INPUT}/TESTFR.input ${INPUT}/VIEW2D.input 
 
 @
 <<testrules>>=
@@ -1518,12 +1518,6 @@ ${INPUT}/PERM.input: ${IN}/perm.spad.pamphlet
 	 ${TANGLE} -R"TEST PERM" ${IN}/perm.spad.pamphlet \
             >PERM.input )
 
-${INPUT}/REALSOLV.input: ${IN}/acplot.spad.pamphlet
-	@ echo making ${INPUT}/REALSOLV.input from ${IN}/acplot.spad.pamphlet
-	@(cd ${INPUT} ; \
-	 ${TANGLE} -R"TEST REALSOLV" ${IN}/acplot.spad.pamphlet \
-          >REALSOLV.input )
-
 ${INPUT}/VIEW2D.input: ${IN}/view2d.spad.pamphlet
 	@ echo making ${INPUT}/VIEW2D.input from ${IN}/view2d.spad.pamphlet
 	@(cd ${INPUT} ; \
@@ -2029,8 +2023,21 @@ SPADHELP=\
  ${HELP}/DecimalExpansion.help ${HELP}/DoubleFloat.help \
  ${HELP}/EqTable.help          ${HELP}/Equation.help \
  ${HELP}/DistributedMultivariatePolynomial.help \
+ ${HELP}/Factored.help         ${HELP}/Fraction.help \
  ${HELP}/GeneralDistributedMultivariatePolynomial.help \
- ${HELP}/HomogeneousDistributedMultivariatePolynomial.help
+ ${HELP}/GeneralSparseTable.help ${HELP}/GroebnerFactorizationPackage.help \
+ ${HELP}/Heap.help             ${HELP}/HexadecimalExpansion.help \
+ ${HELP}/HomogeneousDistributedMultivariatePolynomial.help \
+ ${HELP}/Integer.help          ${HELP}/IntegerLinearDependence.help \
+ ${HELP}/IntegerNumberTheoryFunctions.help ${HELP}/Kernel.help \
+ ${HELP}/KeyedAccessFile.help  ${HELP}/LexTriangularPackage.help \
+ ${HELP}/Library.help          ${HELP}/LieExponentials.help \
+ ${HELP}/LiePolynomial.help   \
+ ${HELP}/LinearOrdinaryDifferentialOperator.help \
+ ${HELP}/LinearOrdinaryDifferentialOperator1.help \
+ ${HELP}/LinearOrdinaryDifferentialOperator2.help \
+ ${HELP}/RealSolvePackage.help \
+ ${HELP}/RomanNumeral.help
 
 @
 The algebra files contain input chunks in regress format.
@@ -2051,8 +2058,21 @@ REGRESS=\
  DecimalExpansion.regress DoubleFloat.regress \
  EqTable.regress          Equation.regress \
  DistributedMultivariatePolynomial.regress \
+ Factored.regress         Fraction.regress \
  GeneralDistributedMultivariatePolynomial.regress \
- HomogeneousDistributedMultivariatePolynomial.regress 
+ GeneralSparseTable.regress GroebnerFactorizationPackage.regress \
+ Heap.regress             HexadecimalExpansion.regress \
+ HomogeneousDistributedMultivariatePolynomial.regress \
+ Integer.regress          IntegerLinearDependence.regress \
+ IntegerNumberTheoryFunctions.regress \
+ Kernel.regress           KeyedAccessFile.regress \
+ LexTriangularPackage.regress Library.regress \
+ LieExponentials.regress  LiePolynomial.regress \
+ LinearOrdinaryDifferentialOperator.regress \
+ LinearOrdinaryDifferentialOperator1.regress \
+ LinearOrdinaryDifferentialOperator2.regress \
+ RealSolvePackage.regress \
+ RomanNumeral.regress
 
 %.regress: %.input
 	@ echo algebra regression testing $*
@@ -2216,9 +2236,44 @@ ${HELP}/EqTable.help: ${IN}/table.spad.pamphlet
 	@${TANGLE} -R"EqTable.input" ${IN}/table.spad.pamphlet \
             >${INPUT}/EqTable.input
 
+${HELP}/Equation.help: ${IN}/equation2.spad.pamphlet
+	@echo 7018 create Equation.help from ${IN}/equation2.spad.pamphlet
+	@${TANGLE} -R"Equation.help" ${IN}/equation2.spad.pamphlet \
+            >${HELP}/Equation.help
+	@cp ${HELP}/Equation.help ${HELP}/EQ.help
+	@${TANGLE} -R"Equation.input" ${IN}/equation2.spad.pamphlet \
+            >${INPUT}/Equation.input
+
+${HELP}/Factored.help: ${IN}/fr.spad.pamphlet
+	@echo 7019 create Factored.help from ${IN}/fr.spad.pamphlet
+	@${TANGLE} -R"Factored.help" ${IN}/fr.spad.pamphlet \
+            >${HELP}/Factored.help
+	@cp ${HELP}/Factored.help ${HELP}/FR.help
+	@${TANGLE} -R"Factored.input" ${IN}/fr.spad.pamphlet \
+            >${INPUT}/Factored.input
+
+${HELP}/Fraction.help: ${IN}/fraction.spad.pamphlet
+	@echo 7020 create Fraction.help from ${IN}/fraction.spad.pamphlet
+	@${TANGLE} -R"Fraction.help" ${IN}/fraction.spad.pamphlet \
+            >${HELP}/Fraction.help
+	@cp ${HELP}/Fraction.help ${HELP}/FR.help
+	@${TANGLE} -R"Fraction.input" ${IN}/fraction.spad.pamphlet \
+            >${INPUT}/Fraction.input
+
+${HELP}/FullPartialFractionExpansion.help: ${IN}/fparfrac.spad.pamphlet
+	@echo 7021 create FullPartialFractionExpansion.help from \
+            ${IN}/fparfrac.spad.pamphlet
+	@${TANGLE} -R"FullPartialFractionExpansion.help" \
+           ${IN}/fparfrac.spad.pamphlet \
+            >${HELP}/FullPartialFractionExpansion.help
+	@cp ${HELP}/FullPartialFractionExpansion.help ${HELP}/FPARFRAC.help
+	@${TANGLE} -R"FullPartialFractionExpansion.input" \
+           ${IN}/fparfrac.spad.pamphlet \
+            >${INPUT}/FullPartialFractionExpansion.input
+
 ${HELP}/GeneralDistributedMultivariatePolynomial.help: \
             ${IN}/gdpoly.spad.pamphlet
-	@echo 7018 create GeneralDistributedMultivariatePolynomial.help \
+	@echo 7022 create GeneralDistributedMultivariatePolynomial.help \
             from ${IN}/gdpoly.spad.pamphlet
 	@${TANGLE} -R"GeneralDistributedMultivariatePolynomial.help" \
            ${IN}/gdpoly.spad.pamphlet \
@@ -2229,9 +2284,45 @@ ${HELP}/GeneralDistributedMultivariatePolynomial.help: \
            ${IN}/gdpoly.spad.pamphlet \
             >${INPUT}/GeneralDistributedMultivariatePolynomial.input
 
+${HELP}/GeneralSparseTable.help: ${IN}/table.spad.pamphlet
+	@echo 7023 create GeneralSparseTable.help from \
+            ${IN}/table.spad.pamphlet
+	@${TANGLE} -R"GeneralSparseTable.help" ${IN}/table.spad.pamphlet \
+            >${HELP}/GeneralSparseTable.help
+	@cp ${HELP}/GeneralSparseTable.help ${HELP}/GSTBL.help
+	@${TANGLE} -R"GeneralSparseTable.input" ${IN}/table.spad.pamphlet \
+            >${INPUT}/GeneralSparseTable.input
+
+${HELP}/GroebnerFactorizationPackage.help: ${IN}/groebf.spad.pamphlet
+	@echo 7024 create GroebnerFactorizationPackage.help \
+            from ${IN}/groebf.spad.pamphlet
+	@${TANGLE} -R"GroebnerFactorizationPackage.help" \
+           ${IN}/groebf.spad.pamphlet \
+            >${HELP}/GroebnerFactorizationPackage.help
+	@cp ${HELP}/GroebnerFactorizationPackage.help ${HELP}/GBF.help
+	@${TANGLE} -R"GroebnerFactorizationPackage.input" \
+           ${IN}/groebf.spad.pamphlet \
+            >${INPUT}/GroebnerFactorizationPackage.input
+
+${HELP}/Heap.help: ${IN}/bags.spad.pamphlet
+	@echo 7025 create Heap.help from ${IN}/bags.spad.pamphlet
+	@${TANGLE} -R"Heap.help" ${IN}/bags.spad.pamphlet >${HELP}/Heap.help
+	@cp ${HELP}/Heap.help ${HELP}/HEAP.help
+	@${TANGLE} -R"Heap.input" ${IN}/bags.spad.pamphlet \
+            >${INPUT}/Heap.input
+
+${HELP}/HexadecimalExpansion.help: ${IN}/radix.spad.pamphlet
+	@echo 7026 create HexadecimalExpansion.help \
+            from ${IN}/radix.spad.pamphlet
+	@${TANGLE} -R"HexadecimalExpansion.help" ${IN}/radix.spad.pamphlet \
+            >${HELP}/HexadecimalExpansion.help
+	@cp ${HELP}/HexadecimalExpansion.help  ${HELP}/HEXADEC.help
+	@${TANGLE} -R"HexadecimalExpansion.input" \
+           ${IN}/radix.spad.pamphlet >${INPUT}/HexadecimalExpansion.input
+
 ${HELP}/HomogeneousDistributedMultivariatePolynomial.help: \
             ${IN}/gdpoly.spad.pamphlet
-	@echo 7019 create HomogeneousDistributedMultivariatePolynomial.help \
+	@echo 7027 create HomogeneousDistributedMultivariatePolynomial.help \
             from ${IN}/gdpoly.spad.pamphlet
 	@${TANGLE} -R"HomogeneousDistributedMultivariatePolynomial.help" \
            ${IN}/gdpoly.spad.pamphlet \
@@ -2242,13 +2333,134 @@ ${HELP}/HomogeneousDistributedMultivariatePolynomial.help: \
            ${IN}/gdpoly.spad.pamphlet \
             >${INPUT}/HomogeneousDistributedMultivariatePolynomial.input
 
-${HELP}/Equation.help: ${IN}/equation2.spad.pamphlet
-	@echo 7020 create Equation.help from ${IN}/equation2.spad.pamphlet
-	@${TANGLE} -R"Equation.help" ${IN}/equation2.spad.pamphlet \
-            >${HELP}/Equation.help
-	@cp ${HELP}/Equation.help ${HELP}/EQTBL.help
-	@${TANGLE} -R"Equation.input" ${IN}/equation2.spad.pamphlet \
-            >${INPUT}/Equation.input
+${HELP}/Integer.help: ${IN}/integer.spad.pamphlet
+	@echo 7028 create Integer.help from ${IN}/integer.spad.pamphlet
+	@${TANGLE} -R"Integer.help" ${IN}/integer.spad.pamphlet \
+           >${HELP}/Integer.help
+	@cp ${HELP}/Integer.help ${HELP}/INT.help
+	@${TANGLE} -R"Integer.input" ${IN}/integer.spad.pamphlet \
+            >${INPUT}/Integer.input
+
+${HELP}/IntegerLinearDependence.help: ${IN}/lindep.spad.pamphlet
+	@echo 7029 create IntegerLinearDependence.help from \
+           ${IN}/lindep.spad.pamphlet
+	@${TANGLE} -R"IntegerLinearDependence.help" \
+           ${IN}/lindep.spad.pamphlet \
+           >${HELP}/IntegerLinearDependence.help
+	@cp ${HELP}/IntegerLinearDependence.help ${HELP}/ZLINDEP.help
+	@${TANGLE} -R"IntegerLinearDependence.input" \
+           ${IN}/lindep.spad.pamphlet \
+            >${INPUT}/IntegerLinearDependence.input
+
+${HELP}/IntegerNumberTheoryFunctions.help: ${IN}/numtheor.spad.pamphlet
+	@echo 7030 create IntegerNumberTheoryFunctions.help \
+            from ${IN}/numtheor.spad.pamphlet
+	@${TANGLE} -R"IntegerNumberTheoryFunctions.help" \
+           ${IN}/numtheor.spad.pamphlet \
+            >${HELP}/IntegerNumberTheoryFunctions.help
+	@cp ${HELP}/IntegerNumberTheoryFunctions.help \
+             ${HELP}/INTHEORY.help
+	@${TANGLE} -R"IntegerNumberTheoryFunctions.input" \
+           ${IN}/numtheor.spad.pamphlet \
+            >${INPUT}/IntegerNumberTheoryFunctions.input
+
+${HELP}/Kernel.help: ${IN}/kl.spad.pamphlet
+	@echo 7031 create Kernel.help from ${IN}/kl.spad.pamphlet
+	@${TANGLE} -R"Kernel.help" ${IN}/kl.spad.pamphlet \
+           >${HELP}/Kernel.help
+	@cp ${HELP}/Kernel.help ${HELP}/KERNEL.help
+	@${TANGLE} -R"Kernel.input" ${IN}/kl.spad.pamphlet \
+            >${INPUT}/Kernel.input
+
+${HELP}/KeyedAccessFile.help: ${IN}/files.spad.pamphlet
+	@echo 7032 create KeyedAccessFile.help from ${IN}/files.spad.pamphlet
+	@${TANGLE} -R"KeyedAccessFile.help" ${IN}/files.spad.pamphlet \
+           >${HELP}/KeyedAccessFile.help
+	@cp ${HELP}/KeyedAccessFile.help ${HELP}/KAFILE.help
+	@${TANGLE} -R"KeyedAccessFile.input" ${IN}/files.spad.pamphlet \
+            >${INPUT}/KeyedAccessFile.input
+
+${HELP}/LexTriangularPackage.help: ${IN}/zerodim.spad.pamphlet
+	@echo 7033 create LexTriangularPackage.help from \
+           ${IN}/zerodim.spad.pamphlet
+	@${TANGLE} -R"LexTriangularPackage.help" ${IN}/zerodim.spad.pamphlet \
+           >${HELP}/LexTriangularPackage.help
+	@cp ${HELP}/LexTriangularPackage.help ${HELP}/LEXTRIPK.help
+	@${TANGLE} -R"LexTriangularPackage.input" ${IN}/zerodim.spad.pamphlet \
+            >${INPUT}/LexTriangularPackage.input
+
+${HELP}/Library.help: ${IN}/files.spad.pamphlet
+	@echo 7034 create Library.help from ${IN}/files.spad.pamphlet
+	@${TANGLE} -R"Library.help" ${IN}/files.spad.pamphlet \
+           >${HELP}/Library.help
+	@cp ${HELP}/Library.help ${HELP}/LIB.help
+	@${TANGLE} -R"Library.input" ${IN}/files.spad.pamphlet \
+            >${INPUT}/Library.input
+
+${HELP}/LieExponentials.help: ${IN}/xlpoly.spad.pamphlet
+	@echo 7035 create LieExponentials.help from ${IN}/xlpoly.spad.pamphlet
+	@${TANGLE} -R"LieExponentials.help" ${IN}/xlpoly.spad.pamphlet \
+           >${HELP}/LieExponentials.help
+	@cp ${HELP}/LieExponentials.help ${HELP}/LEXP.help
+	@${TANGLE} -R"LieExponentials.input" ${IN}/xlpoly.spad.pamphlet \
+            >${INPUT}/LieExponentials.input
+
+${HELP}/LiePolynomial.help: ${IN}/xlpoly.spad.pamphlet
+	@echo 7035 create LiePolynomial.help from ${IN}/xlpoly.spad.pamphlet
+	@${TANGLE} -R"LiePolynomial.help" ${IN}/xlpoly.spad.pamphlet \
+           >${HELP}/LiePolynomial.help
+	@cp ${HELP}/LiePolynomial.help ${HELP}/LPOLY.help
+	@${TANGLE} -R"LiePolynomial.input" ${IN}/xlpoly.spad.pamphlet \
+            >${INPUT}/LiePolynomial.input
+
+${HELP}/LinearOrdinaryDifferentialOperator.help: ${IN}/lodo.spad.pamphlet
+	@echo 7037 create LinearOrdinaryDifferentialOperator.help \
+           from ${IN}/lodo.spad.pamphlet
+	@${TANGLE} -R"LinearOrdinaryDifferentialOperator.help" \
+          ${IN}/lodo.spad.pamphlet \
+           >${HELP}/LinearOrdinaryDifferentialOperator.help
+	@cp ${HELP}/LinearOrdinaryDifferentialOperator.help ${HELP}/LODO.help
+	@${TANGLE} -R"LinearOrdinaryDifferentialOperator.input" \
+           ${IN}/lodo.spad.pamphlet \
+            >${INPUT}/LinearOrdinaryDifferentialOperator.input
+
+${HELP}/LinearOrdinaryDifferentialOperator1.help: ${IN}/lodo.spad.pamphlet
+	@echo 7038 create LinearOrdinaryDifferentialOperator1.help \
+           from ${IN}/lodo.spad.pamphlet
+	@${TANGLE} -R"LinearOrdinaryDifferentialOperator1.help" \
+          ${IN}/lodo.spad.pamphlet \
+           >${HELP}/LinearOrdinaryDifferentialOperator1.help
+	@cp ${HELP}/LinearOrdinaryDifferentialOperator1.help ${HELP}/LODO1.help
+	@${TANGLE} -R"LinearOrdinaryDifferentialOperator1.input" \
+           ${IN}/lodo.spad.pamphlet \
+            >${INPUT}/LinearOrdinaryDifferentialOperator1.input
+
+${HELP}/LinearOrdinaryDifferentialOperator2.help: ${IN}/lodo.spad.pamphlet
+	@echo 7039 create LinearOrdinaryDifferentialOperator2.help \
+           from ${IN}/lodo.spad.pamphlet
+	@${TANGLE} -R"LinearOrdinaryDifferentialOperator2.help" \
+          ${IN}/lodo.spad.pamphlet \
+           >${HELP}/LinearOrdinaryDifferentialOperator2.help
+	@cp ${HELP}/LinearOrdinaryDifferentialOperator2.help ${HELP}/LODO2.help
+	@${TANGLE} -R"LinearOrdinaryDifferentialOperator2.input" \
+           ${IN}/lodo.spad.pamphlet \
+            >${INPUT}/LinearOrdinaryDifferentialOperator2.input
+
+${HELP}/RealSolvePackage.help: ${IN}/acplot.spad.pamphlet
+	@echo 7040 create RealSolvePackage.help from ${IN}/acplot.spad.pamphlet
+	@${TANGLE} -R"RealSolvePackage.help" ${IN}/acplot.spad.pamphlet \
+           >${HELP}/RealSolvePackage.help
+	@cp ${HELP}/RealSolvePackage.help ${HELP}/REALSOLV.help
+	@${TANGLE} -R"RealSolvePackage.input" ${IN}/acplot.spad.pamphlet \
+            >${INPUT}/RealSolvePackage.input
+
+${HELP}/RomanNumeral.help: ${IN}/integer.spad.pamphlet
+	@echo 7041 create RomanNumeral.help from ${IN}/integer.spad.pamphlet
+	@${TANGLE} -R"RomanNumeral.help" ${IN}/integer.spad.pamphlet \
+           >${HELP}/RomanNumeral.help
+	@cp ${HELP}/RomanNumeral.help ${HELP}/ROMAN.help
+	@${TANGLE} -R"RomanNumeral.input" ${IN}/integer.spad.pamphlet \
+            >${INPUT}/RomanNumeral.input
 
 @
 
diff --git a/src/algebra/acplot.spad.pamphlet b/src/algebra/acplot.spad.pamphlet
index f4542d7..dfef292 100644
--- a/src/algebra/acplot.spad.pamphlet
+++ b/src/algebra/acplot.spad.pamphlet
@@ -10,133 +10,154 @@
 \tableofcontents
 \eject
 \section{package REALSOLV RealSolvePackage}
-\subsection{realsolv input}
-<<TEST REALSOLV>>=
+<<RealSolvePackage.input>>=
+-- acplot.spad.pamphlet RealSolvePackage.input
+)spool RealSolvePackage.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 13
 p := 4*x^3 - 3*x^2 + 2*x - 4
+--R 
+--R
+--R          3     2
+--R   (1)  4x  - 3x  + 2x - 4
+--R                                                     Type: Polynomial Integer
+--E 1
+
+--S 2 of 13
 ans1 := solve(p,0.01)$REALSOLV
-if (ans1 ~= [1.11328125]) then upperCase("tpdfailed")
+--R 
+--R
+--R   (2)  [1.11328125]
+--R                                                             Type: List Float
+--E 2
 
+--S 3 of 13
 ans2 := solve(p::POLY(FRAC(INT)),0.01)$REALSOLV
-if (ans2 ~= [1.11328125]) then upperCase("tpdfailed case 1")
+--R 
+--R
+--R   (3)  [1.11328125]
+--R                                                             Type: List Float
+--E 3
 
+--S 4 of 13
 R := Integer
-ls : List Symbol := [x,y,z,t] 
-ls2 : List Symbol := [x,y,z,t,new()$Symbol] 
+--R 
+--R
+--R   (4)  Integer
+--R                                                                 Type: Domain
+--E 4
+
+--S 5 of 13
+ls : List Symbol := [x,y,z,t]
+--R 
+--R
+--R   (5)  [x,y,z,t]
+--R                                                            Type: List Symbol
+--E 5
+
+--S 6 of 13
+ls2 : List Symbol := [x,y,z,t,new()$Symbol]
+--R 
+--R
+--R   (6)  [x,y,z,t,%A]
+--R                                                            Type: List Symbol
+--E 6
+
+--S 7 of 13
 pack := ZDSOLVE(R,ls,ls2)
-p1 := x**2*y*z + y*z 
-p2 := x**2*y**2*z + x + z 
-p3 := x**2*y**2*z**2 +  z + 1 
+--R 
+--R
+--R   (7)  ZeroDimensionalSolvePackage(Integer,[x,y,z,t],[x,y,z,t,%A])
+--R                                                                 Type: Domain
+--E 7
+
+--S 8 of 13
+p1 := x**2*y*z + y*z
+--R 
+--R
+--R          2
+--R   (8)  (x  + 1)y z
+--R                                                     Type: Polynomial Integer
+--E 8
+
+--S 9 of 13
+p2 := x**2*y**2*z + x + z
+--R 
+--R
+--R          2 2
+--R   (9)  (x y  + 1)z + x
+--R                                                     Type: Polynomial Integer
+--E 9
+
+--S 10 of 13
+p3 := x**2*y**2*z**2 +  z + 1
+--R 
+--R
+--R          2 2 2
+--R   (10)  x y z  + z + 1
+--R                                                     Type: Polynomial Integer
+--E 10
+
+--S 11 of 13
 lp := [p1, p2, p3]
-ans3 := realSolve(lp,[x,y,z],0.01)
-if (ans3 ~= [[1.0,0.0,- 1.0]]) then upperCase("tpdfailed case 2")
-
+--R 
+--R
+--R            2           2 2            2 2 2
+--R   (11)  [(x  + 1)y z,(x y  + 1)z + x,x y z  + z + 1]
+--R                                                Type: List Polynomial Integer
+--E 11
+
+--S 12 of 13
+lsv:List(Symbol):=[x,y,z]
+--R 
+--R
+--R   (12)  [x,y,z]
+--R                                                            Type: List Symbol
+--E 12
+
+--S 13 of 13
+ans3 := realSolve(lp,lsv,0.01)$REALSOLV
+--R 
+--R
+--R   (13)  [[1.0,0.0,- 1.0]]
+--R                                                        Type: List List Float
+--E 13
+)spool
+ 
+)spool
+)lisp (bye)
 @
-\subsection{realsolv examples}
-<<realsolv.examples>>=
-\spadcommand{p := 4*x^3 - 3*x^2 + 2*x - 4}
-$$
-{4 \  {x \sp 3}} -{3 \  {x \sp 2}}+{2 \  x} -4 
-$$
-\returnType{Type: Polynomial Integer}
+<<RealSolvePackage.help>>=
+  p := 4*x^3 - 3*x^2 + 2*x - 4
 
-\spadcommand{ans1 := solve(p,0.01)$REALSOLV}
-$$
-\left[
-{1.11328125} 
-\right]
-$$
-\returnType{Type: List Float}
-
-\spadcommand{if (ans1 ~= [1.11328125]) then upperCase("tpdfail case 3")}
-\returnType{Type: Void}
+  ans1 := solve(p,0.01)$REALSOLV
 
-\spadcommand{ans2 := solve(p::POLY(FRAC(INT)),0.01)$REALSOLV}
-$$
-\left[
-{1.11328125} 
-\right]
-$$
-\returnType{Type: List Float}
+  ans2 := solve(p::POLY(FRAC(INT)),0.01)$REALSOLV
 
-\spadcommand{if (ans2 ~= [1.11328125]) then upperCase("tpdfail")}
-\returnType{Type: Void}
+  R := Integer
 
-\spadcommand{R := Integer}
-$$
-Integer 
-$$
-\returnType{Type: Domain}
+  ls : List Symbol := [x,y,z,t]
 
-\spadcommand{ls : List Symbol := [x,y,z,t]}
-$$
-\left[
-x, \: y, \: z, \: t 
-\right]
-$$
-\returnType{Type: List Symbol}
+  ls2 : List Symbol := [x,y,z,t,new()$Symbol]
 
-\spadcommand{ls2 : List Symbol := [x,y,z,t,new()$Symbol]}
-$$
-\left[
-x, \: y, \: z, \: t, \: \%G 
-\right]
-$$
-\returnType{Type: List Symbol}
+  pack := ZDSOLVE(R,ls,ls2)
 
-\spadcommand{pack := ZDSOLVE(R,ls,ls2)}
-$$
-ZeroDimensionalSolvePackage(Integer,[x,y,z,t],[x,y,z,t,%G]) 
-$$
-\returnType{Type: Domain}
+  p1 := x**2*y*z + y*z
 
-\spadcommand{p1 := x**2*y*z + y*z}
-$$
-{\left( {x \sp 2}+1 
-\right)}
-\  y \  z 
-$$
-\returnType{Type: Polynomial Integer}
+  p2 := x**2*y**2*z + x + z
 
-\spadcommand{p2 := x**2*y**2*z + x + z}
-$$
-{{\left( {{x \sp 2} \  {y \sp 2}}+1 
-\right)}
-\  z}+x 
-$$
-\returnType{Type: Polynomial Integer}
+  p3 := x**2*y**2*z**2 +  z + 1
 
-\spadcommand{p3 := x**2*y**2*z**2 +  z + 1}
-$$
-{{x \sp 2} \  {y \sp 2} \  {z \sp 2}}+z+1 
-$$
-\returnType{Type: Polynomial Integer}
+  lp := [p1, p2, p3]
 
-\spadcommand{lp := [p1, p2, p3]}
-$$
-\left[
-{{\left( {x \sp 2}+1 
-\right)}
-\  y \  z}, \: {{{\left( {{x \sp 2} \  {y \sp 2}}+1 
-\right)}
-\  z}+x}, \: {{{x \sp 2} \  {y \sp 2} \  {z \sp 2}}+z+1} 
-\right]
-$$
-\returnType{Type: List Polynomial Integer}
+  ans3 := realSolve(lp,[x,y,z],0.01)
 
-\spadcommand{ans3 := realSolve(lp,[x,y,z],0.01)}
-$$
-\left[
-{\left[ {1.0}, \: {0.0}, \: -{1.0} 
-\right]}
-\right]
-$$
-\returnType{Type: List List Float}
+See Also:
+o )show RealSolvePackage
+o $AXIOM/doc/src/algebra/acplot.spad.dvi
 
-\spadcommand{if (ans3 ~= [[1.0,0.0,- 1.0]]) then upperCase("tpdfail")}
-\returnType{Type: Void}
-@
-\subsection{realsolv manpage}
-<<realsolve.manpage>>=
 @
 \subsection{realsolv code}
 <<package REALSOLV RealSolvePackage>>=
@@ -209,9 +230,6 @@ $$
 $$
 \returnType{Type: PlaneAlgebraicCurvePlot}
 @
-\subsection{acplot manpage}
-<<acplot.manpage>>=
-@
 \subsection{acplot code}
 <<domain ACPLOT PlaneAlgebraicCurvePlot>>=
 --% PlaneAlgebraicCurvePlot
diff --git a/src/algebra/array1.spad.pamphlet b/src/algebra/array1.spad.pamphlet
index 0812a84..8c9e4af 100644
--- a/src/algebra/array1.spad.pamphlet
+++ b/src/algebra/array1.spad.pamphlet
@@ -370,6 +370,272 @@ IndexedFlexibleArray(S:Type, mn: Integer): Exports == Implementation where
 
 @
 \section{domain FARRAY FlexibleArray}
+<<FlexibleArray.input>>=
+-- array1.spad.pamphlet FlexibleArray.input
+)spool FlexibleArray.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 16
+flexibleArray [i for i in 1..6]
+--R 
+--R
+--R   (1)  [1,2,3,4,5,6]
+--R                                          Type: FlexibleArray PositiveInteger
+--E 1
+
+--S 2 of 16
+f : FARRAY INT := new(6,0)
+--R 
+--R
+--R   (2)  [0,0,0,0,0,0]
+--R                                                  Type: FlexibleArray Integer
+--E 2
+
+--S 3 of 16
+for i in 1..6 repeat f.i := i; f
+--R 
+--R
+--R   (3)  [1,2,3,4,5,6]
+--R                                                  Type: FlexibleArray Integer
+--E 3
+
+--S 4 of 16
+physicalLength f
+--R 
+--R
+--R   (4)  6
+--R                                                        Type: PositiveInteger
+--E 4
+
+--S 5 of 16
+concat!(f,11)
+--R 
+--R
+--R   (5)  [1,2,3,4,5,6,11]
+--R                                                  Type: FlexibleArray Integer
+--E 5
+
+--S 6 of 16
+physicalLength f
+--R 
+--R
+--R   (6)  10
+--R                                                        Type: PositiveInteger
+--E 6
+
+--S 7 of 16
+physicalLength!(f,15)
+--R 
+--R
+--R   (7)  [1,2,3,4,5,6,11]
+--R                                                  Type: FlexibleArray Integer
+--E 7
+
+--S 8 of 16
+concat!(f,f)
+--R 
+--R
+--R   (8)  [1,2,3,4,5,6,11,1,2,3,4,5,6,11]
+--R                                                  Type: FlexibleArray Integer
+--E 8
+
+--S 9 of 16
+insert!(22,f,1)
+--R 
+--R
+--R   (9)  [22,1,2,3,4,5,6,11,1,2,3,4,5,6,11]
+--R                                                  Type: FlexibleArray Integer
+--E 9
+
+--S 10 of 16
+g := f(10..)
+--R 
+--R
+--R   (10)  [2,3,4,5,6,11]
+--R                                                  Type: FlexibleArray Integer
+--E 10
+
+--S 11 of 16
+insert!(g,f,1)
+--R 
+--R
+--R   (11)  [2,3,4,5,6,11,22,1,2,3,4,5,6,11,1,2,3,4,5,6,11]
+--R                                                  Type: FlexibleArray Integer
+--E 11
+
+--S 12 of 16
+merge!(sort! f, sort! g)
+--R 
+--R
+--R   (12)  [1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,11,11,11,11,22]
+--R                                                  Type: FlexibleArray Integer
+--E 12
+
+--S 13 of 16
+removeDuplicates! f
+--R 
+--R
+--R   (13)  [1,2,3,4,5,6,11,22]
+--R                                                  Type: FlexibleArray Integer
+--E 13
+
+--S 14 of 16
+select!(i +-> even? i,f)
+--R 
+--R
+--R   (14)  [2,4,6,22]
+--R                                                  Type: FlexibleArray Integer
+--E 14
+
+--S 15 of 16
+physicalLength f
+--R 
+--R
+--R   (15)  8
+--R                                                        Type: PositiveInteger
+--E 15
+
+--S 16 of 16
+shrinkable(false)$FlexibleArray(Integer)
+--R 
+--R
+--R   (16)  true
+--R                                                                Type: Boolean
+--E 16
+)spool
+)lisp (bye)
+@
+<<FlexibleArray.help>>=
+====================================================================
+FlexibleArray
+====================================================================
+
+The FlexibleArray domain constructor creates one-dimensional
+arrays of elements of the same type.  Flexible arrays are an attempt
+to provide a data type that has the best features of both
+one-dimensional arrays (fast, random access to elements) and lists
+(flexibility).  They are implemented by a fixed block of storage.
+When necessary for expansion, a new, larger block of storage is
+allocated and the elements from the old storage area are copied into
+the new block.
+
+Flexible arrays have available most of the operations provided by
+OneDimensionalArray Vector.  Since flexible arrays are also of
+category ExtensibleLinearAggregate they have operations concat!,
+delete!, insert!, merge!, remove!, removeDuplicates!, and select!.  In
+addition, the operations physicalLength and physicalLength! provide
+user-control over expansion and contraction.
+
+A convenient way to create a flexible array is to apply the operation
+flexibleArray to a list of values.
+
+  flexibleArray [i for i in 1..6]
+    [1,2,3,4,5,6]
+                     Type: FlexibleArray PositiveInteger
+
+Create a flexible array of six zeroes.
+
+  f : FARRAY INT := new(6,0)
+    [0,0,0,0,0,0]
+                     Type: FlexibleArray Integer
+
+For i=1..6 set the i-th element to i.  Display f.
+
+  for i in 1..6 repeat f.i := i; f
+    [1,2,3,4,5,6]
+                     Type: FlexibleArray Integer
+
+Initially, the physical length is the same as the number of elements.
+
+  physicalLength f
+    6
+                     Type: PositiveInteger
+
+Add an element to the end of f.
+
+  concat!(f,11)
+    [1,2,3,4,5,6,11]
+                     Type: FlexibleArray Integer
+
+See that its physical length has grown.
+
+  physicalLength f
+    10
+                     Type: PositiveInteger
+
+Make f grow to have room for 15 elements.
+
+  physicalLength!(f,15)
+    [1,2,3,4,5,6,11]
+                     Type: FlexibleArray Integer
+
+Concatenate the elements of f to itself.  The physical length
+allows room for three more values at the end.
+
+  concat!(f,f)
+    [1,2,3,4,5,6,11,1,2,3,4,5,6,11]
+                     Type: FlexibleArray Integer
+
+Use insert! to add an element to the front of a flexible array.
+
+  insert!(22,f,1)
+    [22,1,2,3,4,5,6,11,1,2,3,4,5,6,11]
+                     Type: FlexibleArray Integer
+
+Create a second flexible array from f consisting of the elements from
+index 10 forward.
+
+  g := f(10..)
+    [2,3,4,5,6,11]
+                     Type: FlexibleArray Integer
+
+Insert this array at the front of f.
+
+  insert!(g,f,1)
+    [2,3,4,5,6,11,22,1,2,3,4,5,6,11,1,2,3,4,5,6,11]
+                     Type: FlexibleArray Integer
+
+Merge the flexible array f into g after sorting each in place.
+
+  merge!(sort! f, sort! g)
+    [1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,11,11,11,11,22]
+                     Type: FlexibleArray Integer
+
+Remove duplicates in place.
+
+  removeDuplicates! f
+    [1,2,3,4,5,6,11,22]
+                     Type: FlexibleArray Integer
+
+Remove all odd integers.
+
+  select!(i +-> even? i,f)
+    [2,4,6,22]
+                     Type: FlexibleArray Integer
+
+All these operations have shrunk the physical length of f.
+
+  physicalLength f
+    8
+                     Type: PositiveInteger
+
+To force Axiom not to shrink flexible arrays call the shrinkable
+operation with the argument false.  You must package call this
+operation.  The previous value is returned.
+
+  shrinkable(false)$FlexibleArray(Integer)
+    true
+                     Type: Boolean
+
+See Also:
+o )help OneDimensionalArray
+o )help Vector
+o )help ExtensibleLinearAggregate
+o )show FlexibleArray
+o $AXIOM/doc/src/algebra/array1.spad.dvi
+
+@
 <<domain FARRAY FlexibleArray>>=
 )abbrev domain FARRAY FlexibleArray
 ++ A FlexibleArray is the notion of an array intended to allow for growth
diff --git a/src/algebra/bags.spad.pamphlet b/src/algebra/bags.spad.pamphlet
index 8e1c335..32f07cf 100644
--- a/src/algebra/bags.spad.pamphlet
+++ b/src/algebra/bags.spad.pamphlet
@@ -204,6 +204,142 @@ Dequeue(S:SetCategory): DequeueAggregate S with
 
 @
 \section{domain HEAP Heap}
+<<Heap.input>>=
+-- bags.spad.pamphlet Heap.input
+)spool Heap.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 8
+h := heap [-4,9,11,2,7,-7]
+--R 
+--R
+--R   (1)  [11,7,9,- 4,2,- 7]
+--R                                                           Type: Heap Integer
+--E 1
+
+--S 2 of 8
+insert!(3,h)
+--R 
+--R
+--R   (2)  [11,7,9,- 4,2,- 7,3]
+--R                                                           Type: Heap Integer
+--E 2
+
+--S 3 of 8
+extract! h
+--R 
+--R
+--R   (3)  11
+--R                                                        Type: PositiveInteger
+--E 3
+
+--S 4 of 8
+h
+--R 
+--R
+--R   (4)  [9,7,3,- 4,2,- 7]
+--R                                                           Type: Heap Integer
+--E 4
+
+--S 5 of 8
+[extract!(h) while not empty?(h)]
+--R 
+--R
+--R   (5)  [9,7,3,2,- 4,- 7]
+--R                                                           Type: List Integer
+--E 5
+
+--S 6 of 8
+heapsort(x) == (empty? x => []; cons(extract!(x),heapsort x))
+--R 
+--R                                                                   Type: Void
+--E 6
+
+--S 7 of 8
+h1 := heap [17,-4,9,-11,2,7,-7]
+--R 
+--R
+--R   (7)  [17,2,9,- 11,- 4,7,- 7]
+--R                                                           Type: Heap Integer
+--E 7
+
+--S 8 of 8
+heapsort h1
+--R 
+--R   Compiling function heapsort with type Heap Integer -> List Integer 
+--R
+--R   (8)  [17,9,7,2,- 4,- 7,- 11]
+--R                                                           Type: List Integer
+--E 8
+)spool
+)lisp (bye)
+@
+<<Heap.help>>=
+====================================================================
+Heap examples
+====================================================================
+
+The domain Heap(S) implements a priority queue of objects of type S
+such that the operation extract! removes and returns the maximum
+element.  The implementation represents heaps as flexible arrays The
+representation and algorithms give complexity of O(log(n)) for
+insertion and extractions, and O(n) for construction.
+
+Create a heap of six elements.
+
+  h := heap [-4,9,11,2,7,-7]
+    [11,7,9,- 4,2,- 7]
+                      Type: Heap Integer
+
+Use insert! to add an element.
+
+  insert!(3,h)
+    [11,7,9,- 4,2,- 7,3]
+                      Type: Heap Integer
+
+The operation extract! removes and returns the maximum element.
+
+  extract! h
+    11
+                      Type: PositiveInteger
+
+The internal structure of h has been appropriately adjusted.
+
+  h
+    [9,7,3,- 4,2,- 7]
+                      Type: Heap Integer
+
+Now extract! elements repeatedly until none are left, collecting
+the elements in a list.
+
+  [extract!(h) while not empty?(h)]
+    [9,7,3,2,- 4,- 7]
+                      Type: List Integer
+
+Another way to produce the same result is by defining a heapsort function.
+
+  heapsort(x) == (empty? x => []; cons(extract!(x),heapsort x))
+                      Type: Void
+
+Create another sample heap.
+
+  h1 := heap [17,-4,9,-11,2,7,-7]
+    [17,2,9,- 11,- 4,7,- 7]
+                      Type: Heap Integer
+
+Apply heapsort to present elements in order.
+
+  heapsort h1
+    [17,9,7,2,- 4,- 7,- 11]
+                      Type: List Integer
+
+See Also:
+o )help FlexibleArray
+o )show Heap
+o $AXIOM/doc/src/algebra/bags.spad.dvi
+
+@
 <<domain HEAP Heap>>=
 )abbrev domain HEAP Heap
 ++ Author: Michael Monagan and Stephen Watt
diff --git a/src/algebra/equation2.spad.pamphlet b/src/algebra/equation2.spad.pamphlet
index ecabdd9..d84e1ad 100644
--- a/src/algebra/equation2.spad.pamphlet
+++ b/src/algebra/equation2.spad.pamphlet
@@ -16,68 +16,103 @@
 )set message test on
 )set message auto off
 )clear all
+--S 1
 eq1 := 3*x + 4*y = 5 
- 
+--R 
+--R
+--R   (1)  4y + 3x= 5
+--R                                            Type: Equation Polynomial Integer
+--E 1
 
-   (1)  4y + 3x= 5
-                                            Type: Equation Polynomial Integer
+--S 2
 eq2 := 2*x + 2*y = 3 
- 
+--R 
+--R
+--R   (2)  2y + 2x= 3
+--R                                            Type: Equation Polynomial Integer
+--E 2
 
-   (2)  2y + 2x= 3
-                                            Type: Equation Polynomial Integer
+--S 3
 lhs eq1
- 
+--R 
+--R
+--R   (3)  4y + 3x
+--R                                                     Type: Polynomial Integer
+--E 3
 
-   (3)  4y + 3x
-                                                     Type: Polynomial Integer
+--S 4
 rhs eq1
- 
+--R 
+--R
+--R   (4)  5
+--R                                                     Type: Polynomial Integer
+--E 4
 
-   (4)  5
-                                                     Type: Polynomial Integer
+--S 5
 eq1 + eq2 
- 
+--R 
+--R
+--R   (5)  6y + 5x= 8
+--R                                            Type: Equation Polynomial Integer
+--E 5
 
-   (5)  6y + 5x= 8
-                                            Type: Equation Polynomial Integer
+--S 6
 eq1 * eq2 
- 
-
-          2             2
-   (6)  8y  + 14x y + 6x = 15
-                                            Type: Equation Polynomial Integer
+--R 
+--R
+--R          2             2
+--R   (6)  8y  + 14x y + 6x = 15
+--R                                            Type: Equation Polynomial Integer
+--E 6
+
+--S 7
 2*eq2 - eq1
- 
+--R 
+--R
+--R   (7)  x= 1
+--R                                            Type: Equation Polynomial Integer
+--E 7
 
-   (7)  x= 1
-                                            Type: Equation Polynomial Integer
+--S 8
 eq1**2
- 
-
-           2             2
-   (8)  16y  + 24x y + 9x = 25
-                                            Type: Equation Polynomial Integer
+--R 
+--R
+--R           2             2
+--R   (8)  16y  + 24x y + 9x = 25
+--R                                            Type: Equation Polynomial Integer
+--E 8
+
+--S 9
 if x+1 = y then "equal" else "unequal"
- 
+--R 
+--R
+--R   (9)  "unequal"
+--R                                                                 Type: String
+--E 9
 
-   (9)  "unequal"
-                                                                 Type: String
+--S 10
 eqpol := x+1 = y 
- 
+--R 
+--R
+--R   (10)  x + 1= y
+--R                                            Type: Equation Polynomial Integer
+--E 10
 
-   (10)  x + 1= y
-                                            Type: Equation Polynomial Integer
+--S 11
 if eqpol then "equal" else "unequal"
- 
+--R 
+--R
+--R   (11)  "unequal"
+--R                                                                 Type: String
+--E 11
 
-   (11)  "unequal"
-                                                                 Type: String
+--S 12
 eqpol::Boolean
- 
-
-   (12)  false
-                                                                Type: Boolean
+--R 
+--R
+--R   (12)  false
+--R                                                                Type: Boolean
+--E 12
 )spool
 )lisp (bye)
 @
diff --git a/src/algebra/expr.spad.pamphlet b/src/algebra/expr.spad.pamphlet
index 9332493..ec03f7f 100644
--- a/src/algebra/expr.spad.pamphlet
+++ b/src/algebra/expr.spad.pamphlet
@@ -10,6 +10,381 @@
 \tableofcontents
 \eject
 \section{domain EXPR Expression}
+<<Expression.input>>=
+-- expr.spad.pamphlet Expression.input
+)spool Expression.output
+)set message test on
+)set message auto off
+)clear all
+--S 1
+sin(x) + 3*cos(x)**2
+--R 
+--R
+--R                        2
+--R   (1)  sin(x) + 3cos(x)
+--R                                                     Type: Expression Integer
+--E 1
+
+--S 2
+tan(x) - 3.45*x
+--R 
+--R
+--R   (2)  tan(x) - 3.45 x
+--R                                                       Type: Expression Float
+--E 2
+
+--S 3
+(tan sqrt 7 - sin sqrt 11)**2 / (4 - cos(x - y))
+--R 
+--R
+--R               +-+ 2         +--+      +-+         +--+ 2
+--R        - tan(\|7 )  + 2sin(\|11 )tan(\|7 ) - sin(\|11 )
+--R   (3)  -------------------------------------------------
+--R                          cos(y - x) - 4
+--R                                                     Type: Expression Integer
+--E 3
+
+--S 4
+log(exp  x)@Expression(Integer)
+--R 
+--R
+--R   (4)  x
+--R                                                     Type: Expression Integer
+--E 4
+
+--S 5
+log(exp  x)@Expression(Complex Integer)
+--R 
+--R
+--R              x
+--R   (5)  log(%e )
+--R                                             Type: Expression Complex Integer
+--E 5
+
+--S 6
+sqrt 3 + sqrt(2 + sqrt(-5))
+--R 
+--R
+--R         +----------+
+--R         | +---+         +-+
+--R   (6)  \|\|- 5  + 2  + \|3
+--R                                                        Type: AlgebraicNumber
+--E 6
+
+--S 7
+% :: Expression Integer
+--R 
+--R
+--R         +----------+
+--R         | +---+         +-+
+--R   (7)  \|\|- 5  + 2  + \|3
+--R                                                     Type: Expression Integer
+--E 7
+
+--S 8
+height mainKernel sin(x + 4)
+--R 
+--R
+--R   (8)  2
+--R                                                        Type: PositiveInteger
+--E 8
+
+--S 9
+e := (sin(x) - 4)**2 / ( 1 - 2*y*sqrt(- y) ) 
+--R 
+--R
+--R                2
+--R        - sin(x)  + 8sin(x) - 16
+--R   (9)  ------------------------
+--R                 +---+
+--R              2y\|- y  - 1
+--R                                                     Type: Expression Integer
+--E 9
+
+--S 10
+numer e 
+--R 
+--R
+--R                 2
+--R   (10)  - sin(x)  + 8sin(x) - 16
+--R        Type: SparseMultivariatePolynomial(Integer,Kernel Expression Integer)
+--E 10
+
+--S 11
+denom e
+--R 
+--R
+--R            +---+
+--R   (11)  2y\|- y  - 1
+--R        Type: SparseMultivariatePolynomial(Integer,Kernel Expression Integer)
+--E 11
+
+--S 12
+D(e, x) 
+--R 
+--R
+--R                                        +---+
+--R         (4y cos(x)sin(x) - 16y cos(x))\|- y  - 2cos(x)sin(x) + 8cos(x)
+--R   (12)  --------------------------------------------------------------
+--R                                  +---+     3
+--R                               4y\|- y  + 4y  - 1
+--R                                                     Type: Expression Integer
+--E 12
+
+--S 13
+D(e, [x, y], [1, 2])
+--R 
+--R
+--R   (13)
+--R                7       4                      7        4         +---+
+--R       ((- 2304y  + 960y )cos(x)sin(x) + (9216y  - 3840y )cos(x))\|- y
+--R     + 
+--R              9        6       3
+--R       (- 960y  + 2160y  - 180y  - 3)cos(x)sin(x)
+--R     + 
+--R             9        6       3
+--R       (3840y  - 8640y  + 720y  + 12)cos(x)
+--R  /
+--R            12        9        6       3      +---+        11        8       5
+--R       (256y   - 1792y  + 1120y  - 112y  + 1)\|- y  - 1024y   + 1792y  - 448y
+--R     + 
+--R          2
+--R       16y
+--R                                                     Type: Expression Integer
+--E 13
+
+--S 14
+complexNumeric(cos(2 - 3*%i))
+--R 
+--R
+--R   (14)  - 4.1896256909 688072301 + 9.1092278937 55336598 %i
+--R                                                          Type: Complex Float
+--E 14
+
+--S 15
+numeric(tan 3.8)
+--R 
+--R
+--R   (15)  0.7735560905 0312607286
+--R                                                                  Type: Float
+--E 15
+
+--S 16
+e2 := cos(x**2 - y + 3) 
+--R 
+--R
+--R                  2
+--R   (16)  cos(y - x  - 3)
+--R                                                     Type: Expression Integer
+--E 16
+
+--S 17
+e3 := asin(e2) - %pi/2
+--R 
+--R
+--R                2
+--R   (17)  - y + x  + 3
+--R                                                     Type: Expression Integer
+--E 17
+
+--S 18
+e3 :: Polynomial Integer
+--R 
+--R
+--R                2
+--R   (18)  - y + x  + 3
+--R                                                     Type: Polynomial Integer
+--E 18
+
+--S 19
+e3 :: DMP([x, y], Integer) 
+--R 
+--R
+--R          2
+--R   (19)  x  - y + 3
+--R                       Type: DistributedMultivariatePolynomial([x,y],Integer)
+--E 19
+
+--S 20
+sin %pi
+--R 
+--R
+--R   (20)  0
+--R                                                     Type: Expression Integer
+--E 20
+
+--S 21
+cos(%pi / 4)
+--R 
+--R
+--R          +-+
+--R         \|2
+--R   (21)  ----
+--R           2
+--R                                                     Type: Expression Integer
+--E 21
+
+--S 22
+tan(x)**6 + 3*tan(x)**4 + 3*tan(x)**2 + 1 
+--R 
+--R
+--R               6          4          2
+--R   (22)  tan(x)  + 3tan(x)  + 3tan(x)  + 1
+--R                                                     Type: Expression Integer
+--E 22
+
+--S 23
+simplify % 
+--R 
+--R
+--R            1
+--R   (23)  -------
+--R               6
+--R         cos(x)
+--R                                                     Type: Expression Integer
+--E 23
+)spool
+)lisp (bye)
+@
+<<Expression.help>>=
+====================================================================
+Expression examples
+====================================================================
+
+Expression is a constructor that creates domains whose objects
+can have very general symbolic forms.  Here are some examples:
+
+This is an object of type Expression Integer.
+
+  sin(x) + 3*cos(x)**2
+
+This is an object of type Expression Float.
+
+  tan(x) - 3.45*x
+
+This object contains symbolic function applications, sums,
+products, square roots, and a quotient.
+
+  (tan sqrt 7 - sin sqrt 11)**2 / (4 - cos(x - y))
+
+As you can see, Expression actually takes an argument domain.  The
+coefficients of the terms within the expression belong to the argument
+domain.  Integer and Float, along with Complex Integer and Complex
+Float are the most common coefficient domains.
+
+The choice of whether to use a Complex coefficient domain or not is
+important since Axiom can perform some simplifications on real-valued
+objects
+
+  log(exp  x)@Expression(Integer)
+
+... which are not valid on complex ones.
+
+  log(exp  x)@Expression(Complex Integer)
+
+Many potential coefficient domains, such as AlgebraicNumber, are not
+usually used because Expression can subsume them.
+
+  sqrt 3 + sqrt(2 + sqrt(-5))
+
+  % :: Expression Integer
+
+Note that we sometimes talk about "an object of type Expression."
+This is not really correct because we should say, for example, "an
+object of type Expression Integer" or "an object of type Expression
+Float."  By a similar abuse of language, when we refer to an
+"expression" in this section we will mean an object of type Expression
+R for some domain R.
+
+The Axiom documentation contains many examples of the use of
+Expression.  For the rest of this section, we'll give you some
+pointers to those examples plus give you some idea of how to
+manipulate expressions.
+
+It is important for you to know that Expression creates domains that
+have category Field.  Thus you can invert any non-zero expression and
+you shouldn't expect an operation like factor to give you much
+information.  You can imagine expressions as being represented as
+quotients of "multivariate" polynomials where the "variables" are
+kernels. A kernel can either be a symbol such as x or a symbolic
+function application like sin(x + 4).  The second example is actually
+a nested kernel since the argument to sin contains the kernel x.
+
+  height mainKernel sin(x + 4)
+
+Actually, the argument to sin is an expression, and so the structure
+of Expression is recursive. See Kernel which demonstrates how to
+extract the kernels in an expression.
+
+Use the HyperDoc Browse facility to see what operations are applicable
+to expression.  At the time of this writing, there were 262 operations
+with 147 distinct name in Expression Integer.  For example, numer and
+denom extract the numerator and denominator of an expression.
+
+  e := (sin(x) - 4)**2 / ( 1 - 2*y*sqrt(- y) ) 
+
+  numer e 
+
+  denom e
+
+Use D to compute partial derivatives.
+
+  D(e, x) 
+
+  D(e, [x, y], [1, 2])
+
+When an expression involves no ``symbol kernels'' (for example, x), it
+may be possible to numerically evaluate the expression.
+
+If you suspect the evaluation will create a complex number, use 
+complexNumeric.
+
+  complexNumeric(cos(2 - 3*%i))
+
+If you know it will be real, use numeric.
+
+  numeric(tan 3.8)
+
+The numeric operation will display an error message if the evaluation
+yields a calue with an non-zero imaginary part.  Both of these
+operations have an optional second argument n which specifies that the
+accuracy of the approximation be up to n decimal places.
+
+When an expression involves no "symbolic application" kernels, it
+may be possible to convert it a polynomial or rational function in the
+variables that are present.
+
+  e2 := cos(x**2 - y + 3) 
+
+  e3 := asin(e2) - %pi/2
+
+  e3 :: Polynomial Integer
+
+This also works for the polynomial types where specific variables
+and their ordering are given.
+
+  e3 :: DMP([x, y], Integer) 
+
+Finally, a certain amount of simplication takes place as expressions
+are constructed.
+
+  sin %pi
+
+  cos(%pi / 4)
+
+For simplications that involve multiple terms of the expression, use
+simplify.
+
+  tan(x)**6 + 3*tan(x)**4 + 3*tan(x)**2 + 1 
+
+  simplify % 
+
+See Also:
+o )show Kernel
+o )show Expression
+o $AXIOM/doc/src/algebra/void.spad.dvi
+
+@
 <<domain EXPR Expression>>=
 )abbrev domain EXPR Expression
 ++ Top-level mathematical expressions
diff --git a/src/algebra/files.spad.pamphlet b/src/algebra/files.spad.pamphlet
index 49cf2ad..184ab3e 100644
--- a/src/algebra/files.spad.pamphlet
+++ b/src/algebra/files.spad.pamphlet
@@ -68,6 +68,203 @@ FileCategory(Name, S): Category == FCdefinition where
  
 @
 \section{domain FILE File}
+<<File.input>>=
+-- files.spad.pamphlet File.input
+)spool File.output
+)set message test on
+)set message auto off
+)clear all
+--S 1
+ifile:File List Integer:=open("jazz1","output") 
+--R 
+--R
+--R   (1)  "jazz1"
+--R                                                      Type: File List Integer
+--E 1
+
+--S 2
+write!(ifile, [-1,2,3])
+--R 
+--R
+--R   (2)  [- 1,2,3]
+--R                                                           Type: List Integer
+--E 2
+
+--S 3
+write!(ifile, [10,-10,0,111])
+--R 
+--R
+--R   (3)  [10,- 10,0,111]
+--R                                                           Type: List Integer
+--E 3
+
+--S 4
+write!(ifile, [7])
+--R 
+--R
+--R   (4)  [7]
+--R                                                           Type: List Integer
+--E 4
+
+--S 5
+reopen!(ifile, "input")
+--R 
+--R
+--R   (5)  "jazz1"
+--R                                                      Type: File List Integer
+--E 5
+
+--S 6
+read! ifile
+--R 
+--R
+--R   (6)  [- 1,2,3]
+--R                                                           Type: List Integer
+--E 6
+
+--S 7
+read! ifile
+--R 
+--R
+--R   (7)  [10,- 10,0,111]
+--R                                                           Type: List Integer
+--E 7
+
+--S 8
+readIfCan! ifile 
+--R 
+--R
+--R   (8)  [7]
+--R                                                Type: Union(List Integer,...)
+--E 8
+
+--S 9
+readIfCan! ifile
+--R 
+--R
+--R   (9)  "failed"
+--R                                                    Type: Union("failed",...)
+--E 9
+
+--S 10
+iomode ifile
+--R 
+--R
+--R   (10)  "input"
+--R                                                                 Type: String
+--E 10
+
+--S 11
+name ifile
+--R 
+--R
+--R   (11)  "jazz1"
+--R                                                               Type: FileName
+--E 11
+
+--S 12
+close! ifile
+--R 
+--R
+--R   (12)  "jazz1"
+--R                                                      Type: File List Integer
+--E 12
+)system rm jazz1
+)spool
+)lisp (bye)
+@
+<<File.help>>=
+====================================================================
+File examples
+====================================================================
+
+The File(S) domain provides a basic interface to read and write values
+of type S in files.
+
+Before working with a file, it must be made accessible to Axiom with
+the open operation.
+
+  ifile:File List Integer:=open("/tmp/jazz1","output") 
+    "jazz1"
+                         Type: File List Integer
+
+The open function arguments are a FileNam} and a String specifying the
+mode.  If a full pathname is not specified, the current default
+directory is assumed.  The mode must be one of "input" or "output".
+If it is not specified, "input" is assumed.  Once the file has been
+opened, you can read or write data.
+
+The operations read and write are provided.
+
+  write!(ifile, [-1,2,3])
+    [- 1,2,3]
+                         Type: List Integer
+
+  write!(ifile, [10,-10,0,111])
+    [10,- 10,0,111]
+                         Type: List Integer
+
+  write!(ifile, [7])
+    [7]
+                         Type: List Integer
+
+You can change from writing to reading (or vice versa) by reopening a file.
+
+  reopen!(ifile, "input")
+    "jazz1"
+                         Type: File List Integer
+
+  read! ifile
+    [- 1,2,3]
+                         Type: List Integer
+
+  read! ifile
+    [10,- 10,0,111]
+                         Type: List Integer
+
+The read operation can cause an error if one tries to read more data
+than is in the file.  To guard against this possibility the readIfCan
+operation should be used.
+
+  readIfCan! ifile 
+    [7]
+                         Type: Union(List Integer,...)
+
+  readIfCan! ifile
+    "failed"
+                         Type: Union("failed",...)
+
+You can find the current mode of the file, and the file's name.
+
+  iomode ifile
+    "input"
+                         Type: String
+
+  name ifile
+    "jazz1"
+                         Type: FileName
+
+When you are finished with a file, you should close it.
+
+  close! ifile
+    "jazz1"
+                         Type: File List Integer
+
+  )system rm /tmp/jazz1
+
+A limitation of the underlying LISP system is that not all values can
+be represented in a file.  In particular, delayed values containing
+compiled functions cannot be saved.
+
+See Also:
+o )help TextFile
+o )help KeyedAccessFile
+o )help Library
+o )help Filename
+o )show File
+o $AXIOM/doc/src/algebra/files.spad.dvi
+
+@
 <<domain FILE File>>=
 )abbrev domain FILE File
 ++ Author: Stephen M. Watt, Victor Miller
@@ -345,6 +542,132 @@ BinaryFile: Cat == Def where
 
 @
 \section{domain KAFILE KeyedAccessFile}
+<<KeyedAccessFile.input>>=
+-- files.spad.pamphlet KeyedAccessFile.input
+)spool KeyedAccessFile.output
+)set message test on
+)set message auto off
+)clear all
+ey: KeyedAccessFile(Integer) := open("editor.year", "output")
+ey."Char":= 1986
+ey."Caviness" := 1985
+ey."Fitch"    := 1984
+ey."Char"
+ey("Char")
+ey "Char"
+search("Char", ey)
+search("Smith", ey)
+remove!("Char", ey)
+keys ey
+#ey
+KE := Record(key: String, entry: Integer)
+reopen!(ey, "output")
+write!(ey, ["van Hulzen", 1983]$KE)
+write!(ey, ["Calmet", 1982]$KE)
+write!(ey, ["Wang", 1981]$KE)
+close! ey
+keys ey
+members ey
+)system rm -r editor.year
+)spool
+)lisp (bye)
+@
+<<KeyedAccessFile.help>>=
+\section{KeyedAccessFile}
+\label{KeyedAccessFileXmpPage}
+
+The domain KeyedAccessFile(S) provides files which can be used
+as associative tables.  Data values are stored in these files and can
+be retrieved according to their keys.  The keys must be strings so
+this type behaves very much like the StringTable(S) domain.  The
+difference is that keyed access files reside in secondary storage
+while string tables are kept in memory.  
+
+Before a keyed access file can be used, it must first be opened.
+A new file can be created by opening it for output.
+
+  ey: KeyedAccessFile(Integer) := open("editor.year", "output")
+
+Just as for vectors, tables or lists, values are saved in a keyed
+access file by setting elements.
+
+  ey."Char":= 1986
+
+  ey."Caviness" := 1985
+
+  ey."Fitch"    := 1984
+
+Values are retrieved using application, in any of its syntactic forms.
+
+  ey."Char"
+
+  ey("Char")
+
+  ey "Char"
+
+Attempting to retrieve a non-existent element in this way causes an
+error.  If it is not known whether a key exists, you should use the
+search operation.
+
+  search("Char", ey)
+
+  search("Smith", ey)
+
+When an entry is no longer needed, it can be removed from the file.
+
+  remove!("Char", ey)
+
+The keys operation returns a list of all the keys for a given file.
+
+  keys ey
+
+The # operation gives the number of entries.
+
+  #ey
+
+The table view of keyed access files provides safe operations.  That
+is, if the Axiom program is terminated between file operations, the
+file is left in a consistent, current state.  This means, however,
+that the operations are somewhat costly.  For example, after each
+update the file is closed.
+
+Here we add several more items to the file, then check its contents.
+
+  KE := Record(key: String, entry: Integer)
+
+  reopen!(ey, "output")
+
+If many items are to be added to a file at the same time, then it is
+more efficient to use the write operation.
+
+  write!(ey, ["van Hulzen", 1983]$KE)
+
+  write!(ey, ["Calmet", 1982]$KE)
+
+  write!(ey, ["Wang", 1981]$KE)
+
+  close! ey
+
+The read operation is also available from the file view, but it
+returns elements in a random order.  It is generally clearer and more
+efficient to use the keys operation and to extract elements by key.
+
+  keys ey
+
+  members ey
+
+  )system rm -r editor.year
+
+See Also:
+o )help Table
+o )help StringTable
+o )help File
+o )help TextFile
+o )help Library
+o )show KeyedAccessFile
+o $AXIOM/doc/src/algebra/files.spad.dvi
+
+@
 <<domain KAFILE KeyedAccessFile>>=
 )abbrev domain KAFILE KeyedAccessFile
 ++ Author: Stephen M. Watt
@@ -476,6 +799,70 @@ KeyedAccessFile(Entry): KAFcategory == KAFcapsule where
 
 @
 \section{domain LIB Library}
+<<Library.input>>=
+-- files.spad.pamphlet Library.input
+)spool Library.output
+)set message test on
+)set message auto off
+)clear all
+stuff := library "Neat.stuff"
+stuff.int := 32**2
+stuff."poly" := x**2 + 1
+stuff.str := "Hello"
+keys stuff
+stuff.poly
+stuff("poly")
+)system rm -rf Neat.stuff
+)spool
+)lisp (bye)
+@
+<<Library.help>>=
+====================================================================
+Library examples
+====================================================================
+ 
+The Library domain provides a simple way to store Axiom values
+in a file.  This domain is similar to KeyedAccessFile but fewer
+declarations are needed and items of different types can be saved
+together in the same file.
+
+To create a library, you supply a file name.
+
+  stuff := library "Neat.stuff"
+
+Now values can be saved by key in the file.  The keys should be
+mnemonic, just as the field names are for records.  They can be given
+either as strings or symbols.
+
+  stuff.int := 32**2
+
+  stuff."poly" := x**2 + 1
+
+  stuff.str := "Hello"
+
+You obtain the set of available keys using the keys operation.
+
+  keys stuff
+
+You extract values by giving the desired key in this way.
+
+  stuff.poly
+
+  stuff("poly")
+
+When the file is no longer needed, you should remove it from the
+file system.
+
+  )system rm -rf Neat.stuff
+ 
+See Also:
+o )help File
+o )help TextFile
+o )help KeyedAccessFile
+o )show Library
+o $AXIOM/doc/src/algebra/files.spad.dvi
+
+@
 <<domain LIB Library>>=
 )abbrev domain LIB Library
 ++ Author: Stephen M. Watt
diff --git a/src/algebra/float.spad.pamphlet b/src/algebra/float.spad.pamphlet
index 3f5753f..6dae1d2 100644
--- a/src/algebra/float.spad.pamphlet
+++ b/src/algebra/float.spad.pamphlet
@@ -35,6 +35,819 @@ required function.
 It is currently unknown whether the unexpected behaviour
 of shift for negative arguments will cause bugs in other
 parts of Axiom.
+<<Float.input>>=
+-- float.spad.pamphlet Float.input
+)spool Float.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 37
+1.234
+--R 
+--R
+--R   (1)  1.234
+--R                                                                  Type: Float
+--E 1
+
+--S 2 of 37
+1.234E2
+--R 
+--R
+--R   (2)  123.4
+--R                                                                  Type: Float
+--E 2
+
+--S 3 of 37
+sqrt(1.2 + 2.3 / 3.4 ** 4.5)
+--R 
+--R
+--R   (3)  1.0996972790 671286226
+--R                                                                  Type: Float
+--E 3
+
+--S 4 of 37
+i := 3 :: Float
+--R 
+--R
+--R   (4)  3.0
+--R                                                                  Type: Float
+--E 4
+
+--S 5 of 37
+i :: Integer
+--R 
+--R
+--R   (5)  3
+--R                                                                Type: Integer
+--E 5
+
+--S 6 of 37
+i :: Fraction Integer 
+--R 
+--R
+--R   (6)  3
+--R                                                       Type: Fraction Integer
+--E 6
+
+--S 7 of 37
+r := 3/7 :: Float 
+--R 
+--R
+--R   (7)  0.4285714285 7142857143
+--R                                                                  Type: Float
+--E 7
+
+--S 8 of 37
+r :: Fraction Integer
+--R 
+--R
+--R        3
+--R   (8)  -
+--R        7
+--R                                                       Type: Fraction Integer
+--E 8
+
+--S 9 of 37
+r :: Integer
+--R 
+--R 
+--RDaly Bug
+--R   Cannot convert from type Float to Integer for value
+--R   0.4285714285 7142857143
+--R
+--E 9
+
+--S 10 of 37
+truncate 3.6
+--R 
+--R
+--R   (9)  3.0
+--R                                                                  Type: Float
+--E 10
+
+--S 11 of 37
+round 3.6
+--R 
+--R
+--R   (10)  4.0
+--R                                                                  Type: Float
+--E 11
+
+--S 12 of 37
+truncate(-3.6)
+--R 
+--R
+--R   (11)  - 3.0
+--R                                                                  Type: Float
+--E 12
+
+--S 13 of 37
+round(-3.6)
+--R 
+--R
+--R   (12)  - 4.0
+--R                                                                  Type: Float
+--E 13
+
+--S 14 of 37
+fractionPart 3.6
+--R 
+--R
+--R   (13)  0.6
+--R                                                                  Type: Float
+--E 14
+
+--S 15 of 37
+digits 40 
+--R 
+--R
+--R   (14)  20
+--R                                                        Type: PositiveInteger
+--E 15
+
+--S 16 of 37
+sqrt 0.2
+--R 
+--R
+--R   (15)  0.4472135954 9995793928 1834733746 2552470881
+--R                                                                  Type: Float
+--E 16
+
+--S 17 of 37
+pi()$Float
+--R 
+--R
+--R   (16)  3.1415926535 8979323846 2643383279 502884197
+--R                                                                  Type: Float
+--E 17
+
+--S 18 of 37
+digits 500
+--R 
+--R
+--R   (17)  40
+--R                                                        Type: PositiveInteger
+--E 18
+
+--S 19 of 37
+pi()$Float
+--R 
+--R
+--R   (18)
+--R  3.1415926535 8979323846 2643383279 5028841971 6939937510 5820974944 592307816
+--R  4 0628620899 8628034825 3421170679 8214808651 3282306647 0938446095 505822317
+--R  2 5359408128 4811174502 8410270193 8521105559 6446229489 5493038196 442881097
+--R  5 6659334461 2847564823 3786783165 2712019091 4564856692 3460348610 454326648
+--R  2 1339360726 0249141273 7245870066 0631558817 4881520920 9628292540 917153643
+--R  6 7892590360 0113305305 4882046652 1384146951 9415116094 3305727036 575959195
+--R  3 0921861173 8193261179 3105118548 0744623799 6274956735 1885752724 891227938
+--R  1 830119491
+--R                                                                  Type: Float
+--E 19
+
+--S 20 of 37
+digits 20
+--R 
+--R
+--R   (19)  500
+--R                                                        Type: PositiveInteger
+--E 20
+
+--S 21 of 37
+outputSpacing 0; x := sqrt 0.2
+--R 
+--R
+--R   (20)  0.44721359549995793928
+--R                                                                  Type: Float
+--E 21
+
+--S 22 of 37
+outputSpacing 5; x
+--R 
+--R
+--R   (21)  0.44721 35954 99957 93928
+--R                                                                  Type: Float
+--E 22
+
+--S 23 of 37
+y := x/10**10
+--R 
+--R
+--R   (22)  0.44721 35954 99957 93928 E -10
+--R                                                                  Type: Float
+--E 23
+
+--S 24 of 37
+outputFloating(); x 
+--R 
+--R
+--R   (23)  0.44721 35954 99957 93928 E 0
+--R                                                                  Type: Float
+--E 24
+
+--S 25 of 37
+outputFixed(); y 
+--R 
+--R
+--R   (24)  0.00000 00000 44721 35954 99957 93928
+--R                                                                  Type: Float
+--E 25
+
+--S 26 of 37
+outputFloating 2; y 
+--R 
+--R
+--R   (25)  0.45 E -10
+--R                                                                  Type: Float
+--E 26
+
+--S 27 of 37
+outputFixed 2; x 
+--R 
+--R
+--R   (26)  0.45
+--R                                                                  Type: Float
+--E 27
+
+--S 28 of 37
+outputGeneral()
+--R 
+--R                                                                   Type: Void
+--E 28
+
+--S 29 of 37
+a: Matrix Fraction Integer := matrix [ [1/(i+j+1) for j in 0..9] for i in 0..9]
+--R 
+--R
+--R         +    1   1   1   1   1   1   1   1    1+
+--R         |1   -   -   -   -   -   -   -   -   --|
+--R         |    2   3   4   5   6   7   8   9   10|
+--R         |                                      |
+--R         |1   1   1   1   1   1   1   1    1   1|
+--R         |-   -   -   -   -   -   -   -   --  --|
+--R         |2   3   4   5   6   7   8   9   10  11|
+--R         |                                      |
+--R         |1   1   1   1   1   1   1    1   1   1|
+--R         |-   -   -   -   -   -   -   --  --  --|
+--R         |3   4   5   6   7   8   9   10  11  12|
+--R         |                                      |
+--R         |1   1   1   1   1   1    1   1   1   1|
+--R         |-   -   -   -   -   -   --  --  --  --|
+--R         |4   5   6   7   8   9   10  11  12  13|
+--R         |                                      |
+--R         |1   1   1   1   1    1   1   1   1   1|
+--R         |-   -   -   -   -   --  --  --  --  --|
+--R         |5   6   7   8   9   10  11  12  13  14|
+--R   (28)  |                                      |
+--R         |1   1   1   1    1   1   1   1   1   1|
+--R         |-   -   -   -   --  --  --  --  --  --|
+--R         |6   7   8   9   10  11  12  13  14  15|
+--R         |                                      |
+--R         |1   1   1    1   1   1   1   1   1   1|
+--R         |-   -   -   --  --  --  --  --  --  --|
+--R         |7   8   9   10  11  12  13  14  15  16|
+--R         |                                      |
+--R         |1   1    1   1   1   1   1   1   1   1|
+--R         |-   -   --  --  --  --  --  --  --  --|
+--R         |8   9   10  11  12  13  14  15  16  17|
+--R         |                                      |
+--R         |1    1   1   1   1   1   1   1   1   1|
+--R         |-   --  --  --  --  --  --  --  --  --|
+--R         |9   10  11  12  13  14  15  16  17  18|
+--R         |                                      |
+--R         | 1   1   1   1   1   1   1   1   1   1|
+--R         |--  --  --  --  --  --  --  --  --  --|
+--R         +10  11  12  13  14  15  16  17  18  19+
+--R                                                Type: Matrix Fraction Integer
+--E 29
+
+--S 30 of 37
+d:= determinant a
+--R 
+--R
+--R                                   1
+--R   (29)  -----------------------------------------------------
+--R         46206893947914691316295628839036278726983680000000000
+--R                                                       Type: Fraction Integer
+--E 30
+
+--S 31 of 37
+d :: Float
+--R 
+--R
+--R   (30)  0.21641 79226 43149 18691 E -52
+--R                                                                  Type: Float
+--E 31
+
+--S 32 of 37
+b: Matrix DoubleFloat := matrix [ [1/(i+j+1$DoubleFloat) for j in 0..9] for i in 0..9]
+--R 
+--R
+--R   (31)
+--R   [
+--R     [1., 0.5, 0.33333333333333331, 0.25, 0.20000000000000001,
+--R      0.16666666666666666, 0.14285714285714285, 0.125, 0.1111111111111111,
+--R      0.10000000000000001]
+--R     ,
+--R
+--R     [0.5, 0.33333333333333331, 0.25, 0.20000000000000001, 0.16666666666666666,
+--R      0.14285714285714285, 0.125, 0.1111111111111111, 0.10000000000000001,
+--R      9.0909090909090912E-2]
+--R     ,
+--R
+--R     [0.33333333333333331, 0.25, 0.20000000000000001, 0.16666666666666666,
+--R      0.14285714285714285, 0.125, 0.1111111111111111, 0.10000000000000001,
+--R      9.0909090909090912E-2, 8.3333333333333329E-2]
+--R     ,
+--R
+--R     [0.25, 0.20000000000000001, 0.16666666666666666, 0.14285714285714285,
+--R      0.125, 0.1111111111111111, 0.10000000000000001, 9.0909090909090912E-2,
+--R      8.3333333333333329E-2, 7.6923076923076927E-2]
+--R     ,
+--R
+--R     [0.20000000000000001, 0.16666666666666666, 0.14285714285714285, 0.125,
+--R      0.1111111111111111, 0.10000000000000001, 9.0909090909090912E-2,
+--R      8.3333333333333329E-2, 7.6923076923076927E-2, 7.1428571428571425E-2]
+--R     ,
+--R
+--R     [0.16666666666666666, 0.14285714285714285, 0.125, 0.1111111111111111,
+--R      0.10000000000000001, 9.0909090909090912E-2, 8.3333333333333329E-2,
+--R      7.6923076923076927E-2, 7.1428571428571425E-2, 6.6666666666666666E-2]
+--R     ,
+--R
+--R     [0.14285714285714285, 0.125, 0.1111111111111111, 0.10000000000000001,
+--R      9.0909090909090912E-2, 8.3333333333333329E-2, 7.6923076923076927E-2,
+--R      7.1428571428571425E-2, 6.6666666666666666E-2, 6.25E-2]
+--R     ,
+--R
+--R     [0.125, 0.1111111111111111, 0.10000000000000001, 9.0909090909090912E-2,
+--R      8.3333333333333329E-2, 7.6923076923076927E-2, 7.1428571428571425E-2,
+--R      6.6666666666666666E-2, 6.25E-2, 5.8823529411764705E-2]
+--R     ,
+--R
+--R     [0.1111111111111111, 0.10000000000000001, 9.0909090909090912E-2,
+--R      8.3333333333333329E-2, 7.6923076923076927E-2, 7.1428571428571425E-2,
+--R      6.6666666666666666E-2, 6.25E-2, 5.8823529411764705E-2,
+--R      5.5555555555555552E-2]
+--R     ,
+--R
+--R     [0.10000000000000001, 9.0909090909090912E-2, 8.3333333333333329E-2,
+--R      7.6923076923076927E-2, 7.1428571428571425E-2, 6.6666666666666666E-2,
+--R      6.25E-2, 5.8823529411764705E-2, 5.5555555555555552E-2,
+--R      5.2631578947368418E-2]
+--R     ]
+--R                                                     Type: Matrix DoubleFloat
+--E 32
+
+--S 33 of 37
+determinant b
+--R 
+--R
+--R   (32)  2.1643677945721411E-53
+--R                                                            Type: DoubleFloat
+--E 33
+
+--S 34 of 37
+digits 40 
+--R 
+--R
+--R   (33)  20
+--R                                                        Type: PositiveInteger
+--E 34
+
+--S 35 of 37
+c: Matrix Float := matrix [ [1/(i+j+1$Float) for j in 0..9] for i in 0..9]
+--R 
+--R
+--R   (34)
+--R   [
+--R     [1.0, 0.5, 0.33333 33333 33333 33333 33333 33333 33333 33333, 0.25, 0.2,
+--R      0.16666 66666 66666 66666 66666 66666 66666 66667,
+--R      0.14285 71428 57142 85714 28571 42857 14285 71429, 0.125,
+--R      0.11111 11111 11111 11111 11111 11111 11111 11111, 0.1]
+--R     ,
+--R
+--R     [0.5, 0.33333 33333 33333 33333 33333 33333 33333 33333, 0.25, 0.2,
+--R      0.16666 66666 66666 66666 66666 66666 66666 66667,
+--R      0.14285 71428 57142 85714 28571 42857 14285 71429, 0.125,
+--R      0.11111 11111 11111 11111 11111 11111 11111 11111, 0.1,
+--R      0.09090 90909 09090 90909 09090 90909 09090 90909 1]
+--R     ,
+--R
+--R     [0.33333 33333 33333 33333 33333 33333 33333 33333, 0.25, 0.2,
+--R      0.16666 66666 66666 66666 66666 66666 66666 66667,
+--R      0.14285 71428 57142 85714 28571 42857 14285 71429, 0.125,
+--R      0.11111 11111 11111 11111 11111 11111 11111 11111, 0.1,
+--R      0.09090 90909 09090 90909 09090 90909 09090 90909 1,
+--R      0.08333 33333 33333 33333 33333 33333 33333 33333 4]
+--R     ,
+--R
+--R     [0.25, 0.2, 0.16666 66666 66666 66666 66666 66666 66666 66667,
+--R      0.14285 71428 57142 85714 28571 42857 14285 71429, 0.125,
+--R      0.11111 11111 11111 11111 11111 11111 11111 11111, 0.1,
+--R      0.09090 90909 09090 90909 09090 90909 09090 90909 1,
+--R      0.08333 33333 33333 33333 33333 33333 33333 33333 4,
+--R      0.07692 30769 23076 92307 69230 76923 07692 30769 2]
+--R     ,
+--R
+--R     [0.2, 0.16666 66666 66666 66666 66666 66666 66666 66667,
+--R      0.14285 71428 57142 85714 28571 42857 14285 71429, 0.125,
+--R      0.11111 11111 11111 11111 11111 11111 11111 11111, 0.1,
+--R      0.09090 90909 09090 90909 09090 90909 09090 90909 1,
+--R      0.08333 33333 33333 33333 33333 33333 33333 33333 4,
+--R      0.07692 30769 23076 92307 69230 76923 07692 30769 2,
+--R      0.07142 85714 28571 42857 14285 71428 57142 85714 3]
+--R     ,
+--R
+--R     [0.16666 66666 66666 66666 66666 66666 66666 66667,
+--R      0.14285 71428 57142 85714 28571 42857 14285 71429, 0.125,
+--R      0.11111 11111 11111 11111 11111 11111 11111 11111, 0.1,
+--R      0.09090 90909 09090 90909 09090 90909 09090 90909 1,
+--R      0.08333 33333 33333 33333 33333 33333 33333 33333 4,
+--R      0.07692 30769 23076 92307 69230 76923 07692 30769 2,
+--R      0.07142 85714 28571 42857 14285 71428 57142 85714 3,
+--R      0.06666 66666 66666 66666 66666 66666 66666 66666 7]
+--R     ,
+--R
+--R     [0.14285 71428 57142 85714 28571 42857 14285 71429, 0.125,
+--R      0.11111 11111 11111 11111 11111 11111 11111 11111, 0.1,
+--R      0.09090 90909 09090 90909 09090 90909 09090 90909 1,
+--R      0.08333 33333 33333 33333 33333 33333 33333 33333 4,
+--R      0.07692 30769 23076 92307 69230 76923 07692 30769 2,
+--R      0.07142 85714 28571 42857 14285 71428 57142 85714 3,
+--R      0.06666 66666 66666 66666 66666 66666 66666 66666 7, 0.0625]
+--R     ,
+--R
+--R     [0.125, 0.11111 11111 11111 11111 11111 11111 11111 11111, 0.1,
+--R      0.09090 90909 09090 90909 09090 90909 09090 90909 1,
+--R      0.08333 33333 33333 33333 33333 33333 33333 33333 4,
+--R      0.07692 30769 23076 92307 69230 76923 07692 30769 2,
+--R      0.07142 85714 28571 42857 14285 71428 57142 85714 3,
+--R      0.06666 66666 66666 66666 66666 66666 66666 66666 7, 0.0625,
+--R      0.05882 35294 11764 70588 23529 41176 47058 82352 9]
+--R     ,
+--R
+--R     [0.11111 11111 11111 11111 11111 11111 11111 11111, 0.1,
+--R      0.09090 90909 09090 90909 09090 90909 09090 90909 1,
+--R      0.08333 33333 33333 33333 33333 33333 33333 33333 4,
+--R      0.07692 30769 23076 92307 69230 76923 07692 30769 2,
+--R      0.07142 85714 28571 42857 14285 71428 57142 85714 3,
+--R      0.06666 66666 66666 66666 66666 66666 66666 66666 7, 0.0625,
+--R      0.05882 35294 11764 70588 23529 41176 47058 82352 9,
+--R      0.05555 55555 55555 55555 55555 55555 55555 55555 6]
+--R     ,
+--R
+--R     [0.1, 0.09090 90909 09090 90909 09090 90909 09090 90909 1,
+--R      0.08333 33333 33333 33333 33333 33333 33333 33333 4,
+--R      0.07692 30769 23076 92307 69230 76923 07692 30769 2,
+--R      0.07142 85714 28571 42857 14285 71428 57142 85714 3,
+--R      0.06666 66666 66666 66666 66666 66666 66666 66666 7, 0.0625,
+--R      0.05882 35294 11764 70588 23529 41176 47058 82352 9,
+--R      0.05555 55555 55555 55555 55555 55555 55555 55555 6,
+--R      0.05263 15789 47368 42105 26315 78947 36842 10526 3]
+--R     ]
+--R                                                           Type: Matrix Float
+--E 35
+
+--S 36 of 37
+determinant c
+--R 
+--R
+--R   (35)  0.21641 79226 43149 18690 60594 98362 26174 36159 E -52
+--R                                                                  Type: Float
+--E 36
+
+--S 37 of 37
+digits 20
+--R 
+--R
+--R   (36)  40
+--R                                                        Type: PositiveInteger
+--E 37
+)spool
+)lisp (bye)
+@
+<<Float.help>>=
+====================================================================
+Float
+====================================================================
+
+Axiom provides two kinds of floating point numbers.  The domain Float
+implements a model of arbitrary precision floating point numbers.  The
+domain DoubleFloat is intended to make available hardware floating
+point arithmetic in Axiom.  The actual model of floating point that
+DoubleFloat provides is system-dependent.  For example, on the IBM
+system 370 Axiom uses IBM double precision which has fourteen
+hexadecimal digits of precision or roughly sixteen decimal digits.
+Arbitrary precision floats allow the user to specify the precision at
+which arithmetic operations are computed.  Although this is an
+attractive facility, it comes at a cost.  Arbitrary-precision
+floating-point arithmetic typically takes twenty to two hundred times
+more time than hardware floating point.
+
+====================================================================
+Introduction to Float
+====================================================================
+
+Scientific notation is supported for input and output of floating
+point numbers.  A floating point number is written as a string of
+digits containing a decimal point optionally followed by the letter
+"E", and then the exponent.
+
+We begin by doing some calculations using arbitrary precision floats.
+The default precision is twenty decimal digits.
+
+  1.234
+   1.234
+                      Type: Float
+
+A decimal base for the exponent is assumed, so the number 
+1.234E2 denotes 1.234x10^2.
+
+  1.234E2
+    123.4
+                      Type: Float
+The normal arithmetic operations are available for floating point numbers.
+
+  sqrt(1.2 + 2.3 / 3.4 ** 4.5)
+    1.0996972790 671286226
+                      Type: Float
+
+====================================================================
+Conversion Functions
+====================================================================
+
+You can use conversion to go back and forth between Integer, Fraction
+Integer and Float, as appropriate.
+
+  i := 3 :: Float
+    3.0
+                      Type: Float
+
+  i :: Integer
+    3
+                      Type: Integer
+
+  i :: Fraction Integer 
+    3
+                      Type: Fraction Integer
+
+Since you are explicitly asking for a conversion, you must take
+responsibility for any loss of exactness.
+
+  r := 3/7 :: Float 
+    0.4285714285 7142857143
+                      Type: Float
+
+  r :: Fraction Integer
+    3
+    -
+    7
+                      Type: Fraction Integer
+
+This conversion cannot be performed: use truncate or round if that is
+what you intend.
+
+  r :: Integer
+   Cannot convert from type Float to Integer for value
+   0.4285714285 7142857143
+
+The operations truncate and round truncate ...
+
+   truncate 3.6
+    3.0
+                      Type: Float
+
+and round to the nearest integral Float respectively.
+
+  round 3.6
+    4.0
+                      Type: Float
+
+  truncate(-3.6)
+    - 3.0
+                      Type: Float
+
+  round(-3.6)
+    - 4.0
+                      Type: Float
+
+The operation fractionPart computes the fractional part of x, that is,
+x - truncate x.
+
+  fractionPart 3.6
+    0.6
+                      Type: Float
+
+The operation digits allows the user to set the precision.  It returns
+the previous value it was using.
+
+  digits 40 
+    20
+                      Type: PositiveInteger
+
+  sqrt 0.2
+    0.4472135954 9995793928 1834733746 2552470881
+                      Type: Float
+
+  pi()$Float
+    3.1415926535 8979323846 2643383279 502884197
+                      Type: Float
+
+The precision is only limited by the computer memory available.
+Calculations at 500 or more digits of precision are not difficult.
+
+  digits 500
+    40
+                      Type: PositiveInteger
+
+  pi()$Float
+  3.1415926535 8979323846 2643383279 5028841971 6939937510 5820974944 592307816
+  4 0628620899 8628034825 3421170679 8214808651 3282306647 0938446095 505822317
+  2 5359408128 4811174502 8410270193 8521105559 6446229489 5493038196 442881097
+  5 6659334461 2847564823 3786783165 2712019091 4564856692 3460348610 454326648
+  2 1339360726 0249141273 7245870066 0631558817 4881520920 9628292540 917153643
+  6 7892590360 0113305305 4882046652 1384146951 9415116094 3305727036 575959195
+  3 0921861173 8193261179 3105118548 0744623799 6274956735 1885752724 891227938
+  1 830119491
+                      Type: Float
+
+Reset digits to its default value.
+
+  digits 20
+    500
+                      Type: PositiveInteger
+
+Numbers of type Float are represented as a record of two
+integers, namely, the mantissa and the exponent where the base of the
+exponent is binary.  That is, the floating point number (m,e)
+represents the number m x 2^e.  A consequence of using a binary
+base is that decimal numbers can not, in general, be represented
+exactly.
+
+====================================================================
+Output Functions
+====================================================================
+
+A number of operations exist for specifying how numbers of type Float
+are to be displayed.  By default, spaces are inserted every ten digits
+in the output for readability. Note that you cannot include spaces in
+the input form of a floating point number, though you can use
+underscores.
+
+Output spacing can be modified with the outputSpacing operation.  This
+inserts no spaces and then displays the value of x.
+
+  outputSpacing 0; x := sqrt 0.2
+    0.44721359549995793928
+                      Type: Float
+
+Issue this to have the spaces inserted every 5 digits.
+
+  outputSpacing 5; x
+    0.44721 35954 99957 93928
+                      Type: Float
+
+By default, the system displays floats in either fixed format
+or scientific format, depending on the magnitude of the number.
+
+  y := x/10**10
+    0.44721 35954 99957 93928 E -10
+                      Type: Float
+
+A particular format may be requested with the operations
+outputFloating and outputFixed.
+
+  outputFloating(); x 
+    0.44721 35954 99957 93928 E 0
+                      Type: Float
+
+  outputFixed(); y 
+    0.00000 00000 44721 35954 99957 93928
+                      Type: Float
+
+Additionally, you can ask for n digits to be displayed after the
+decimal point.
+
+  outputFloating 2; y 
+    0.45 E -10
+                      Type: Float
+
+  outputFixed 2; x 
+    0.45
+                      Type: Float
+
+This resets the output printing to the default behavior.
+
+  outputGeneral()
+                      Type: Void
+
+====================================================================
+An Example: Determinant of a Hilbert Matrix
+====================================================================
+
+Consider the problem of computing the determinant of a 10 by 10 
+Hilbert matrix.  The (i,j)-th entry of a Hilbert matrix is given 
+by 1/(i+j+1).
+
+First do the computation using rational numbers to obtain the
+exact result.
+
+  a: Matrix Fraction Integer:=matrix[ [1/(i+j+1) for j in 0..9] for i in 0..9]
+         +    1   1   1   1   1   1   1   1    1+
+         |1   -   -   -   -   -   -   -   -   --|
+         |    2   3   4   5   6   7   8   9   10|
+         |                                      |
+         |1   1   1   1   1   1   1   1    1   1|
+         |-   -   -   -   -   -   -   -   --  --|
+         |2   3   4   5   6   7   8   9   10  11|
+         |                                      |
+         |1   1   1   1   1   1   1    1   1   1|
+         |-   -   -   -   -   -   -   --  --  --|
+         |3   4   5   6   7   8   9   10  11  12|
+         |                                      |
+         |1   1   1   1   1   1    1   1   1   1|
+         |-   -   -   -   -   -   --  --  --  --|
+         |4   5   6   7   8   9   10  11  12  13|
+         |                                      |
+         |1   1   1   1   1    1   1   1   1   1|
+         |-   -   -   -   -   --  --  --  --  --|
+         |5   6   7   8   9   10  11  12  13  14|
+         |                                      |
+         |1   1   1   1    1   1   1   1   1   1|
+         |-   -   -   -   --  --  --  --  --  --|
+         |6   7   8   9   10  11  12  13  14  15|
+         |                                      |
+         |1   1   1    1   1   1   1   1   1   1|
+         |-   -   -   --  --  --  --  --  --  --|
+         |7   8   9   10  11  12  13  14  15  16|
+         |                                      |
+         |1   1    1   1   1   1   1   1   1   1|
+         |-   -   --  --  --  --  --  --  --  --|
+         |8   9   10  11  12  13  14  15  16  17|
+         |                                      |
+         |1    1   1   1   1   1   1   1   1   1|
+         |-   --  --  --  --  --  --  --  --  --|
+         |9   10  11  12  13  14  15  16  17  18|
+         |                                      |
+         | 1   1   1   1   1   1   1   1   1   1|
+         |--  --  --  --  --  --  --  --  --  --|
+         +10  11  12  13  14  15  16  17  18  19+
+                     Type: Matrix Fraction Integer
+
+This version of determinant uses Gaussian elimination.
+
+  d:= determinant a
+                              1
+    -----------------------------------------------------
+    46206893947914691316295628839036278726983680000000000
+                     Type: Fraction Integer
+
+  d :: Float
+    0.21641 79226 43149 18691 E -52
+                     Type: Float
+
+Now use hardware floats. Note that a semicolon (;) is used to prevent
+the display of the matrix.
+
+  b: Matrix DoubleFloat:=matrix[ [1/(i+j+1\$DoubleFloat) for j in 0..9] for i in 0..9]; 
+ 
+
+                     Type: Matrix DoubleFloat
+
+The result given by hardware floats is correct only to four
+significant digits of precision.  In the jargon of numerical analysis,
+the Hilbert matrix is said to be "ill-conditioned."
+
+  determinant b
+    2.1643677945721411E-53
+                     Type: DoubleFloat
+
+Now repeat the computation at a higher precision using Float.
+
+  digits 40 
+    20
+                     Type: PositiveInteger
+
+  c: Matrix Float := matrix [ [1/(i+j+1\$Float) for j in 0..9] for i in 0..9];
+                     Type: Matrix Float
+
+  determinant c
+    0.21641 79226 43149 18690 60594 98362 26174 36159 E -52
+                     Type: Float
+
+Reset digits to its default value.
+
+  digits 20
+    40
+                     Type: PositiveInteger
+
+See Also:
+o )help DoubleFloat
+o )show Float
+o $AXIOM/doc/src/algebra/float.spad.dvi 
+
+@
 <<domain FLOAT Float>>=
 )abbrev domain FLOAT Float
 
diff --git a/src/algebra/fname.spad.pamphlet b/src/algebra/fname.spad.pamphlet
index 1a66d42..f4738b5 100644
--- a/src/algebra/fname.spad.pamphlet
+++ b/src/algebra/fname.spad.pamphlet
@@ -66,6 +66,285 @@ FileNameCategory(): Category == SetCategory with
 
 @
 \section{domain FNAME FileName}
+<<FileName.input>>=
+-- fname.spad.pamphlet FileName.input
+)spool FileName.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 18
+fn: FileName
+--R 
+--R                                                                   Type: Void
+--E 1
+
+--S 2 of 18
+fn := "fname.input"
+--R 
+--R
+--R   (2)  "fname.input"
+--R                                                               Type: FileName
+--E 2
+
+--S 3 of 18
+directory fn
+--R 
+--R
+--R   (3)  ""
+--R                                                                 Type: String
+--E 3
+
+--S 4 of 18
+name fn
+--R 
+--R
+--R   (4)  "fname"
+--R                                                                 Type: String
+--E 4
+
+--S 5 of 18
+extension fn
+--R 
+--R
+--R   (5)  "input"
+--R                                                                 Type: String
+--E 5
+
+--S 6 of 18
+fn := filename("/tmp", "fname", "input") 
+--R 
+--R
+--R   (6)  "/tmp/fname.input"
+--R                                                               Type: FileName
+--E 6
+
+--S 7 of 18
+objdir := "/tmp"
+--R 
+--R
+--R   (7)  "/tmp"
+--R                                                                 Type: String
+--E 7
+
+--S 8 of 18
+fn := filename(objdir, "table", "spad")
+--R 
+--R
+--R   (8)  "/tmp/table.spad"
+--R                                                               Type: FileName
+--E 8
+
+--S 9 of 18
+fn := filename("", "letter", "") 
+--R 
+--R
+--R   (9)  "letter"
+--R                                                               Type: FileName
+--E 9
+
+--S 10 of 18
+exists? "/etc/passwd"
+--R 
+--R
+--R   (10)  true
+--R                                                                Type: Boolean
+--E 10
+
+--S 11 of 18
+readable? "/etc/passwd"
+--R 
+--R
+--R   (11)  true
+--R                                                                Type: Boolean
+--E 11
+
+--S 12 of 18
+readable? "/etc/security/passwd"
+--R 
+--R
+--R   (12)  false
+--R                                                                Type: Boolean
+--E 12
+
+--S 13 of 18
+readable? "/ect/passwd"
+--R 
+--R
+--R   (13)  false
+--R                                                                Type: Boolean
+--E 13
+
+--S 14 of 18
+writable? "/etc/passwd"
+--R 
+--R
+--R   (14)  true
+--R                                                                Type: Boolean
+--E 14
+
+--S 15 of 18
+writable? "/dev/null"
+--R 
+--R
+--R   (15)  true
+--R                                                                Type: Boolean
+--E 15
+
+--S 16 of 18
+writable? "/etc/DoesNotExist"
+--R 
+--R
+--R   (16)  true
+--R                                                                Type: Boolean
+--E 16
+
+--S 17 of 18
+writable? "/tmp/DoesNotExist"
+--R 
+--R
+--R   (17)  true
+--R                                                             Type: Boolean
+--E 17
+
+--S 18 of 18
+fn := new(objdir, "xxx", "yy") 
+--R 
+--R
+--R   (18)  "/tmp/xxx1419.yy"
+--R                                                               Type: FileName
+--E 18
+)spool
+)lisp (bye)
+@
+<<Filename.help>>=
+====================================================================
+FileName examples
+====================================================================
+
+The FileName domain provides an interface to the computer's file
+system.  Functions are provided to manipulate file names and to test
+properties of files.
+ 
+The simplest way to use file names in the Axiom interpreter is to rely
+on conversion to and from strings.  The syntax of these strings
+depends on the operating system.
+
+  fn: FileName
+                       Type: Void
+
+On Linux, this is a proper file syntax:
+
+  fn := "fname.input"
+    "fname.input"
+                       Type: FileName
+
+Although it is very convenient to be able to use string notation
+for file names in the interpreter, it is desirable to have a portable
+way of creating and manipulating file names from within programs.
+
+A measure of portability is obtained by considering a file name to
+consist of three parts: the directory, the name, and the extension.
+
+  directory fn
+    ""
+                      Type: String
+
+  name fn
+    "fname"
+                      Type: String
+
+  extension fn
+    "input"
+                      Type: String
+
+The meaning of these three parts depends on the operating system.
+For example, on CMS the file "SPADPROF INPUT M" would have directory
+"M", name "SPADPROF" and extension "INPUT".
+ 
+It is possible to create a filename from its parts.
+
+  fn := filename("/tmp", "fname", "input") 
+    "/tmp/fname.input"
+                      Type: FileName
+
+When writing programs, it is helpful to refer to directories via
+variables.
+
+  objdir := "/tmp"
+    "/tmp"
+                      Type: String
+
+  fn := filename(objdir, "table", "spad")
+    "/tmp/table.spad"
+                      Type: FileName
+
+If the directory or the extension is given as an empty string, then
+a default is used.  On AIX, the defaults are the current directory
+and no extension.
+
+  fn := filename("", "letter", "") 
+    "letter"
+                      Type: FileName
+ 
+Three tests provide information about names in the file system.
+
+The exists? operation tests whether the named file exists.
+
+  exists? "/etc/passwd"
+    true
+                      Type: Boolean
+
+The operation readable? tells whether the named file can be read.  If
+the file does not exist, then it cannot be read.
+
+  readable? "/etc/passwd"
+    true
+                      Type: Boolean
+
+  readable? "/etc/security/passwd"
+    false
+                      Type: Boolean
+
+  readable? "/ect/passwd"
+    false
+                      Type: Boolean
+
+Likewise, the operation writable? tells whether the named file can be
+written.  If the file does not exist, the test is determined by the
+properties of the directory.
+
+  writable? "/etc/passwd"
+    true
+                      Type: Boolean
+
+  writable? "/dev/null"
+    true
+                      Type: Boolean
+
+  writable? "/etc/DoesNotExist"
+    true
+                      Type: Boolean
+
+  writable? "/tmp/DoesNotExist"
+    true
+                      Type: Boolean
+ 
+The new operation constructs the name of a new writable file.  The
+argument sequence is the same as for filename, except that the name
+part is actually a prefix for a constructed unique name.
+
+The resulting file is in the specified directory with the given
+extension, and the same defaults are used.
+
+  fn := new(objdir, "xxx", "yy") 
+    "/tmp/xxx1419.yy"
+                      Type: FileName
+
+See Also:
+o )show FileName
+o $AXIOM/doc/src/algebra/fname.spad.dvi
+
+@
 <<domain FNAME FileName>>=
 )abbrev domain FNAME FileName
 ++ Author: Stephen M. Watt
diff --git a/src/algebra/fparfrac.spad.pamphlet b/src/algebra/fparfrac.spad.pamphlet
index 9afe1d7..38d5f9f 100644
--- a/src/algebra/fparfrac.spad.pamphlet
+++ b/src/algebra/fparfrac.spad.pamphlet
@@ -10,6 +10,482 @@
 \tableofcontents
 \eject
 \section{domain FPARFRAC FullPartialFractionExpansion}
+<<FullPartialFractionExpansion.input>>=
+-- fparfrac.spad.pamphlet FullPartialFractionExpansion.input
+)spool FullPartialFractionExpansion.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 16
+Fx := FRAC UP(x, FRAC INT)
+--R 
+--R
+--R   (1)  Fraction UnivariatePolynomial(x,Fraction Integer)
+--R                                                                 Type: Domain
+--E 1
+
+--S 2 of 16
+f : Fx := 36 / (x**5-2*x**4-2*x**3+4*x**2+x-2) 
+--R 
+--R
+--R                     36
+--R   (2)  ----------------------------
+--R         5     4     3     2
+--R        x  - 2x  - 2x  + 4x  + x - 2
+--R                      Type: Fraction UnivariatePolynomial(x,Fraction Integer)
+--E 2
+
+--S 3 of 16
+g := fullPartialFraction f 
+--R 
+--R
+--R          4       4        --+      - 3%A - 6
+--R   (3)  ----- - ----- +    >        ---------
+--R        x - 2   x + 1      --+              2
+--R                          2         (x - %A)
+--R                        %A  - 1= 0
+Type: FullPartialFractionExpansion(Fraction Integer,UnivariatePolynomial(x,Fraction Integer))
+--E 3
+
+--S 4 of 16
+g :: Fx
+--R 
+--R
+--R                     36
+--R   (4)  ----------------------------
+--R         5     4     3     2
+--R        x  - 2x  - 2x  + 4x  + x - 2
+--R                      Type: Fraction UnivariatePolynomial(x,Fraction Integer)
+--E 4
+
+--S 5 of 16
+g5 := D(g, 5)
+--R 
+--R
+--R             480        480        --+      2160%A + 4320
+--R   (5)  - -------- + -------- +    >        -------------
+--R                 6          6      --+                7
+--R          (x - 2)    (x + 1)      2           (x - %A)
+--R                                %A  - 1= 0
+Type: FullPartialFractionExpansion(Fraction Integer,UnivariatePolynomial(x,Fraction Integer))
+--E 5
+
+--S 6 of 16
+f5 := D(f, 5)
+--R 
+--R
+--R   (6)
+--R                10           9            8            7            6
+--R       - 544320x   + 4354560x  - 14696640x  + 28615680x  - 40085280x
+--R     + 
+--R                5            4            3           2
+--R       46656000x  - 39411360x  + 18247680x  - 5870880x  + 3317760x + 246240
+--R  /
+--R        20      19      18      17       16       15       14        13
+--R       x   - 12x   + 53x   - 76x   - 159x   + 676x   - 391x   - 1596x
+--R     + 
+--R            12        11        10        9        8        7        6        5
+--R       2527x   + 1148x   - 4977x   + 1372x  + 4907x  - 3444x  - 2381x  + 2924x
+--R     + 
+--R           4        3       2
+--R       276x  - 1184x  + 208x  + 192x - 64
+--R                      Type: Fraction UnivariatePolynomial(x,Fraction Integer)
+--E 6
+
+--S 7 of 16
+g5::Fx - f5
+--R 
+--R
+--R   (7)  0
+--R                      Type: Fraction UnivariatePolynomial(x,Fraction Integer)
+--E 7
+
+--S 8 of 16
+f : Fx := (x**5 * (x-1)) / ((x**2 + x + 1)**2 * (x-2)**3)
+--R 
+--R
+--R                       6    5
+--R                      x  - x
+--R   (8)  -----------------------------------
+--R         7     6     5     3     2
+--R        x  - 4x  + 3x  + 9x  - 6x  - 4x - 8
+--R                      Type: Fraction UnivariatePolynomial(x,Fraction Integer)
+--E 8
+
+--S 9 of 16
+g := fullPartialFraction f 
+--R 
+--R
+--R   (9)
+--R      1952       464        32                          179       135
+--R      ----       ---        --                       - ---- %A + ----
+--R      2401       343        49            --+          2401      2401
+--R     ------ + -------- + -------- +       >          ----------------
+--R      x - 2          2          3         --+             x - %A
+--R              (x - 2)    (x - 2)      2
+--R                                    %A  + %A + 1= 0
+--R   + 
+--R                       37        20
+--R                      ---- %A + ----
+--R           --+        1029      1029
+--R           >          --------------
+--R           --+                   2
+--R       2                 (x - %A)
+--R     %A  + %A + 1= 0
+--RType: FullPartialFractionExpansion(Fraction Integer,UnivariatePolynomial(x,Fraction Integer))
+--E 9
+
+--S 10 of 16
+g :: Fx - f
+--R 
+--R
+--R   (10)  0
+--R                      Type: Fraction UnivariatePolynomial(x,Fraction Integer)
+--E 10
+
+--S 11 of 16
+f : Fx := (2*x**7-7*x**5+26*x**3+8*x) / (x**8-5*x**6+6*x**4+4*x**2-8) 
+--R 
+--R
+--R             7     5      3
+--R           2x  - 7x  + 26x  + 8x
+--R   (11)  ------------------------
+--R          8     6     4     2
+--R         x  - 5x  + 6x  + 4x  - 8
+--R                      Type: Fraction UnivariatePolynomial(x,Fraction Integer)
+--E 11
+
+--S 12 of 16
+g := fullPartialFraction f
+--R 
+--R
+--R                        1                                            1
+--R                        -                                            -
+--R            --+         2        --+          1          --+         2
+--R   (12)     >        ------ +    >        --------- +    >        ------
+--R            --+      x - %A      --+              3      --+      x - %A
+--R           2                    2         (x - %A)      2
+--R         %A  - 2= 0           %A  - 2= 0              %A  + 1= 0
+--RType: FullPartialFractionExpansion(Fraction Integer,UnivariatePolynomial(x,Fraction Integer))
+--E 12
+
+--S 13 of 16
+g :: Fx - f 
+--R 
+--R
+--R   (13)  0
+--R                      Type: Fraction UnivariatePolynomial(x,Fraction Integer)
+--E 13
+
+--S 14 of 16
+f:Fx := x**3 / (x**21 + 2*x**20 + 4*x**19 + 7*x**18 + 10*x**17 + 17*x**16 + 22*x**15 + 30*x**14 + 36*x**13 + 40*x**12 + 47*x**11 + 46*x**10 + 49*x**9 + 43*x**8 + 38*x**7 + 32*x**6 + 23*x**5 + 19*x**4 + 10*x**3 + 7*x**2 + 2*x + 1)
+--R 
+--R
+--R   (14)
+--R      3
+--R     x
+--R  /
+--R        21     20     19     18      17      16      15      14      13      12
+--R       x   + 2x   + 4x   + 7x   + 10x   + 17x   + 22x   + 30x   + 36x   + 40x
+--R     + 
+--R          11      10      9      8      7      6      5      4      3     2
+--R       47x   + 46x   + 49x  + 43x  + 38x  + 32x  + 23x  + 19x  + 10x  + 7x  + 2x
+--R     + 
+--R       1
+--R                      Type: Fraction UnivariatePolynomial(x,Fraction Integer)
+--E 14
+
+--S 15 of 16
+g := fullPartialFraction f 
+--R 
+--R
+--R   (15)
+--R                  1                        1      19
+--R                  - %A                     - %A - --
+--R        --+       2             --+        9      27
+--R        >        ------ +       >          ---------
+--R        --+      x - %A         --+          x - %A
+--R       2                    2
+--R     %A  + 1= 0           %A  + %A + 1= 0
+--R   + 
+--R                       1       1
+--R                      -- %A - --
+--R           --+        27      27
+--R           >          ----------
+--R           --+                 2
+--R       2               (x - %A)
+--R     %A  + %A + 1= 0
+--R   + 
+--R     SIGMA
+--R          5     2
+--R        %A  + %A  + 1= 0
+--R    ,
+--R               96556567040   4   420961732891   3    59101056149   2
+--R            - ------------ %A  + ------------ %A  - ------------ %A
+--R              912390759099       912390759099       912390759099
+--R          + 
+--R              373545875923      529673492498
+--R            - ------------ %A + ------------
+--R              912390759099      912390759099
+--R       /
+--R          x - %A
+--R   + 
+--R     SIGMA
+--R          5     2
+--R        %A  + %A  + 1= 0
+--R    ,
+--R           5580868   4    2024443   3    4321919   2    84614        5070620
+--R        - -------- %A  - -------- %A  + -------- %A  - ------- %A - --------
+--R          94070601       94070601       94070601       1542141      94070601
+--R        --------------------------------------------------------------------
+--R                                              2
+--R                                      (x - %A)
+--R   + 
+--R     SIGMA
+--R          5     2
+--R        %A  + %A  + 1= 0
+--R    ,
+--R         1610957   4    2763014   3    2016775   2    266953        4529359
+--R        -------- %A  + -------- %A  - -------- %A  + -------- %A + --------
+--R        94070601       94070601       94070601       94070601      94070601
+--R        -------------------------------------------------------------------
+--R                                             3
+--R                                     (x - %A)
+--RType: FullPartialFractionExpansion(Fraction Integer,UnivariatePolynomial(x,Fraction Integer))
+--E 15
+
+--S 16 of 16
+g :: Fx - f
+--R 
+--R
+--R   (16)  0
+--R                      Type: Fraction UnivariatePolynomial(x,Fraction Integer)
+--E 16
+)spool
+ 
+)spool
+)lisp (bye)
+@
+<<FullPartialFractionExpansion.help>>=
+====================================================================
+FullPartialFractionExpansion expansion
+====================================================================
+
+The domain FullPartialFractionExpansion implements factor-free
+conversion of quotients to full partial fractions.
+
+Our examples will all involve quotients of univariate polynomials
+with rational number coefficients.
+
+  Fx := FRAC UP(x, FRAC INT)
+    Fraction UnivariatePolynomial(x,Fraction Integer)
+                    Type: Domain
+
+Here is a simple-looking rational function.
+
+  f : Fx := 36 / (x**5-2*x**4-2*x**3+4*x**2+x-2) 
+                 36
+    ----------------------------
+     5     4     3     2
+    x  - 2x  - 2x  + 4x  + x - 2
+                    Type: Fraction UnivariatePolynomial(x,Fraction Integer)
+
+We use fullPartialFraction to convert it to an object of type
+FullPartialFractionExpansion.
+
+  g := fullPartialFraction f 
+      4       4        --+      - 3%A - 6
+    ----- - ----- +    >        ---------
+    x - 2   x + 1      --+              2
+                      2         (x - %A)
+                    %A  - 1= 0
+Type: FullPartialFractionExpansion(Fraction Integer,
+                                   UnivariatePolynomial(x,Fraction Integer))
+
+Use a coercion to change it back into a quotient.
+
+  g :: Fx
+                 36
+    ----------------------------
+     5     4     3     2
+    x  - 2x  - 2x  + 4x  + x - 2
+                  Type: Fraction UnivariatePolynomial(x,Fraction Integer)
+
+Full partial fractions differentiate faster than rational functions.
+
+  g5 := D(g, 5)
+         480        480        --+      2160%A + 4320
+    - -------- + -------- +    >        -------------
+             6          6      --+                7
+      (x - 2)    (x + 1)      2           (x - %A)
+                            %A  - 1= 0
+Type: FullPartialFractionExpansion(Fraction Integer,
+                                   UnivariatePolynomial(x,Fraction Integer))
+
+  f5 := D(f, 5)
+                10           9            8            7            6
+       - 544320x   + 4354560x  - 14696640x  + 28615680x  - 40085280x
+     + 
+                5            4            3           2
+       46656000x  - 39411360x  + 18247680x  - 5870880x  + 3317760x + 246240
+  /
+        20      19      18      17       16       15       14        13
+       x   - 12x   + 53x   - 76x   - 159x   + 676x   - 391x   - 1596x
+     + 
+            12        11        10        9        8        7        6        5
+       2527x   + 1148x   - 4977x   + 1372x  + 4907x  - 3444x  - 2381x  + 2924x
+     + 
+           4        3       2
+       276x  - 1184x  + 208x  + 192x - 64
+                      Type: Fraction UnivariatePolynomial(x,Fraction Integer)
+
+We can check that the two forms represent the same function.
+
+  g5::Fx - f5
+    0
+                      Type: Fraction UnivariatePolynomial(x,Fraction Integer)
+
+Here are some examples that are more complicated.
+
+  f : Fx := (x**5 * (x-1)) / ((x**2 + x + 1)**2 * (x-2)**3)
+                   6    5
+                  x  - x
+    -----------------------------------
+     7     6     5     3     2
+    x  - 4x  + 3x  + 9x  - 6x  - 4x - 8
+                      Type: Fraction UnivariatePolynomial(x,Fraction Integer)
+
+  g := fullPartialFraction f 
+      1952       464        32                          179       135
+      ----       ---        --                       - ---- %A + ----
+      2401       343        49            --+          2401      2401
+     ------ + -------- + -------- +       >          ----------------
+      x - 2          2          3         --+             x - %A
+              (x - 2)    (x - 2)      2
+                                    %A  + %A + 1= 0
+   + 
+                       37        20
+                      ---- %A + ----
+           --+        1029      1029
+           >          --------------
+           --+                   2
+       2                 (x - %A)
+     %A  + %A + 1= 0
+Type: FullPartialFractionExpansion(Fraction Integer,
+                                   UnivariatePolynomial(x,Fraction Integer))
+
+  g :: Fx - f
+    0
+                      Type: Fraction UnivariatePolynomial(x,Fraction Integer)
+
+  f : Fx := (2*x**7-7*x**5+26*x**3+8*x) / (x**8-5*x**6+6*x**4+4*x**2-8) 
+        7     5      3
+      2x  - 7x  + 26x  + 8x
+    ------------------------
+     8     6     4     2
+    x  - 5x  + 6x  + 4x  - 8
+                      Type: Fraction UnivariatePolynomial(x,Fraction Integer)
+
+  g := fullPartialFraction f
+                   1                                            1
+                   -                                            -
+       --+         2        --+          1          --+         2
+       >        ------ +    >        --------- +    >        ------
+       --+      x - %A      --+              3      --+      x - %A
+      2                    2         (x - %A)      2
+    %A  - 2= 0           %A  - 2= 0              %A  + 1= 0
+Type: FullPartialFractionExpansion(Fraction Integer,
+                                   UnivariatePolynomial(x,Fraction Integer))
+
+  g :: Fx - f 
+    0
+                     Type: Fraction UnivariatePolynomial(x,Fraction Integer)
+
+  f:Fx := x**3 / (x**21 + 2*x**20 + 4*x**19 + 7*x**18 + 10*x**17 + 17*x**16 + 22*x**15 + 30*x**14 + 36*x**13 + 40*x**12 + 47*x**11 + 46*x**10 + 49*x**9 + 43*x**8 + 38*x**7 + 32*x**6 + 23*x**5 + 19*x**4 + 10*x**3 + 7*x**2 + 2*x + 1)
+      3
+     x
+  /
+        21     20     19     18      17      16      15      14      13      12
+       x   + 2x   + 4x   + 7x   + 10x   + 17x   + 22x   + 30x   + 36x   + 40x
+     + 
+          11      10      9      8      7      6      5      4      3     2
+      47x   + 46x   + 49x  + 43x  + 38x  + 32x  + 23x  + 19x  + 10x  + 7x  + 2x
+     + 
+       1
+                      Type: Fraction UnivariatePolynomial(x,Fraction Integer)
+
+  g := fullPartialFraction f 
+                  1                        1      19
+                  - %A                     - %A - --
+        --+       2             --+        9      27
+        >        ------ +       >          ---------
+        --+      x - %A         --+          x - %A
+       2                    2
+     %A  + 1= 0           %A  + %A + 1= 0
+   + 
+                       1       1
+                      -- %A - --
+           --+        27      27
+           >          ----------
+           --+                 2
+       2               (x - %A)
+     %A  + %A + 1= 0
+   + 
+     SIGMA
+          5     2
+        %A  + %A  + 1= 0
+    ,
+               96556567040   4   420961732891   3    59101056149   2
+            - ------------ %A  + ------------ %A  - ------------ %A
+              912390759099       912390759099       912390759099
+          + 
+              373545875923      529673492498
+            - ------------ %A + ------------
+              912390759099      912390759099
+       /
+          x - %A
+   + 
+     SIGMA
+          5     2
+        %A  + %A  + 1= 0
+    ,
+           5580868   4    2024443   3    4321919   2    84614        5070620
+        - -------- %A  - -------- %A  + -------- %A  - ------- %A - --------
+          94070601       94070601       94070601       1542141      94070601
+        --------------------------------------------------------------------
+                                              2
+                                      (x - %A)
+   + 
+     SIGMA
+          5     2
+        %A  + %A  + 1= 0
+    ,
+         1610957   4    2763014   3    2016775   2    266953        4529359
+        -------- %A  + -------- %A  - -------- %A  + -------- %A + --------
+        94070601       94070601       94070601       94070601      94070601
+        -------------------------------------------------------------------
+                                             3
+                                     (x - %A)
+Type: FullPartialFractionExpansion(Fraction Integer,UnivariatePolynomial(x,Fraction Integer))
+
+This verification takes much longer than the conversion to partial fractions.
+
+  g :: Fx - f
+    0
+                      Type: Fraction UnivariatePolynomial(x,Fraction Integer)
+
+Use PartialFraction for standard partial fraction decompositions.
+
+For more information, see the paper: Bronstein, M and Salvy, B.
+"Full Partial Fraction Decomposition of Rational Functions,"
+Proceedings of ISSAC'93, Kiev, ACM Press.  
+
+See Also:
+o )help PartialFraction
+o )show FullPartialFractionExpansion
+o $AXIOM/doc/src/algebra/fparfrac.spad.dvi
+
+@
 <<domain FPARFRAC FullPartialFractionExpansion>>=
 )abbrev domain FPARFRAC FullPartialFractionExpansion
 ++ Full partial fraction expansion of rational functions
diff --git a/src/algebra/fr.spad.pamphlet b/src/algebra/fr.spad.pamphlet
index fc18057..5bf65c4 100644
--- a/src/algebra/fr.spad.pamphlet
+++ b/src/algebra/fr.spad.pamphlet
@@ -9,9 +9,628 @@
 \eject
 \tableofcontents
 \eject
+<<Factored.input>>=
+-- fr.spad.pamphlet Factored.input
+)spool Factored.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 38
+g := factor(4312)
+--R 
+--R
+--R         3 2
+--R   (1)  2 7 11
+--R                                                       Type: Factored Integer
+--E 1
+
+--S 2 of 38
+unit(g)
+--R 
+--R
+--R   (2)  1
+--R                                                        Type: PositiveInteger
+--E 2
+
+--S 3 of 38
+numberOfFactors(g)
+--R 
+--R
+--R   (3)  3
+--R                                                        Type: PositiveInteger
+--E 3
+
+--S 4 of 38
+[nthFactor(g,i) for i in 1..numberOfFactors(g)]
+--R 
+--R
+--R   (4)  [2,7,11]
+--R                                                           Type: List Integer
+--E 4
+
+--S 5 of 38
+[nthExponent(g,i) for i in 1..numberOfFactors(g)] 
+--R 
+--R
+--R   (5)  [3,2,1]
+--R                                                           Type: List Integer
+--E 5
+
+--S 6 of 38
+[nthFlag(g,i) for i in 1..numberOfFactors(g)] 
+--R 
+--R
+--R   (6)  ["prime","prime","prime"]
+--R                               Type: List Union("nil","sqfr","irred","prime")
+--E 6
+
+--S 7 of 38
+factorList(g) 
+--R 
+--R
+--R   (7)
+--R   [[flg= "prime",fctr= 2,xpnt= 3], [flg= "prime",fctr= 7,xpnt= 2],
+--R    [flg= "prime",fctr= 11,xpnt= 1]]
+--RType: List Record(flg: Union("nil","sqfr","irred","prime"),fctr: Integer,xpnt: Integer)
+--E 7
+
+--S 8 of 38
+factors(g) 
+--R 
+--R
+--R   (8)
+--R   [[factor= 2,exponent= 3],[factor= 7,exponent= 2],[factor= 11,exponent= 1]]
+--R                         Type: List Record(factor: Integer,exponent: Integer)
+--E 8
+
+--S 9 of 38
+first(%).factor 
+--R 
+--R
+--R   (9)  2
+--R                                                        Type: PositiveInteger
+--E 9
+
+--S 10 of 38
+g := factor(4312) 
+--R 
+--R
+--R          3 2
+--R   (10)  2 7 11
+--R                                                       Type: Factored Integer
+--E 10
+
+--S 11 of 38
+expand(g)
+--R 
+--R
+--R   (11)  4312
+--R                                                        Type: PositiveInteger
+--E 11
+
+--S 12 of 38
+reduce(*,[t.factor for t in factors(g)]) 
+--R 
+--R
+--R   (12)  154
+--R                                                        Type: PositiveInteger
+--E 12
+
+--S 13 of 38
+g := factor(4312) 
+--R 
+--R
+--R          3 2
+--R   (13)  2 7 11
+--R                                                       Type: Factored Integer
+--E 13
+
+--S 14 of 38
+f := factor(246960) 
+--R 
+--R
+--R          4 2   3
+--R   (14)  2 3 5 7
+--R                                                       Type: Factored Integer
+--E 14
+
+--S 15 of 38
+f * g 
+--R 
+--R
+--R          7 2   5
+--R   (15)  2 3 5 7 11
+--R                                                       Type: Factored Integer
+--E 15
+
+--S 16 of 38
+f**500 
+--R 
+--R
+--R          2000 1000 500 1500
+--R   (16)  2    3    5   7
+--R                                                       Type: Factored Integer
+--E 16
+
+--S 17 of 38
+gcd(f,g) 
+--R 
+--R
+--R          3 2
+--R   (17)  2 7
+--R                                                       Type: Factored Integer
+--E 17
+
+--S 18 of 38
+lcm(f,g) 
+--R 
+--R
+--R          4 2   3
+--R   (18)  2 3 5 7 11
+--R                                                       Type: Factored Integer
+--E 18
+
+--S 19 of 38
+f + g 
+--R 
+--R
+--R          3 2
+--R   (19)  2 7 641
+--R                                                       Type: Factored Integer
+--E 19
+
+--S 20 of 38
+f - g 
+--R 
+--R
+--R          3 2
+--R   (20)  2 7 619
+--R                                                       Type: Factored Integer
+--E 20
+
+--S 21 of 38
+zero?(factor(0))
+--R 
+--R
+--R   (21)  true
+--R                                                                Type: Boolean
+--E 21
+
+--S 22 of 38
+zero?(g) 
+--R 
+--R
+--R   (22)  false
+--R                                                                Type: Boolean
+--E 22
+
+--S 23 of 38
+one?(factor(1))
+--R 
+--R
+--R   (23)  true
+--R                                                                Type: Boolean
+--E 23
+
+--S 24 of 38
+one?(f) 
+--R 
+--R
+--R   (24)  false
+--R                                                                Type: Boolean
+--E 24
+
+--S 25 of 38
+0$Factored(Integer)
+--R 
+--R
+--R   (25)  0
+--R                                                       Type: Factored Integer
+--E 25
+
+--S 26 of 38
+1$Factored(Integer)
+--R 
+--R
+--R   (26)  1
+--R                                                       Type: Factored Integer
+--E 26
+
+--S 27 of 38
+nilFactor(24,2) 
+--R 
+--R
+--R           2
+--R   (27)  24
+--R                                                       Type: Factored Integer
+--E 27
+
+--S 28 of 38
+nthFlag(%,1) 
+--R 
+--R
+--R   (28)  "nil"
+--R                                                       Type: Union("nil",...)
+--E 28
+
+--S 29 of 38
+sqfrFactor(30,2)
+--R 
+--R
+--R           2
+--R   (29)  30
+--R                                                       Type: Factored Integer
+--E 29
+
+--S 30 of 38
+irreducibleFactor(13,10) 
+--R 
+--R
+--R           10
+--R   (30)  13
+--R                                                       Type: Factored Integer
+--E 30
+
+--S 31 of 38
+primeFactor(11,5) 
+--R 
+--R
+--R           5
+--R   (31)  11
+--R                                                       Type: Factored Integer
+--E 31
+
+--S 32 of 38
+h := factor(-720) 
+--R 
+--R
+--R            4 2
+--R   (32)  - 2 3 5
+--R                                                       Type: Factored Integer
+--E 32
+
+--S 33 of 38
+h - makeFR(unit(h),factorList(h))
+--R 
+--R
+--R   (33)  0
+--R                                                       Type: Factored Integer
+--E 33
+
+--S 34 of 38
+p := (4*x*x-12*x+9)*y*y + (4*x*x-12*x+9)*y + 28*x*x - 84*x + 63 
+--R 
+--R
+--R            2            2      2                  2
+--R   (34)  (4x  - 12x + 9)y  + (4x  - 12x + 9)y + 28x  - 84x + 63
+--R                                                     Type: Polynomial Integer
+--E 34
+
+--S 35 of 38
+fp := factor(p) 
+--R 
+--R
+--R                 2  2
+--R   (35)  (2x - 3) (y  + y + 7)
+--R                                            Type: Factored Polynomial Integer
+--E 35
+
+--S 36 of 38
+D(p,x) 
+--R 
+--R
+--R                   2
+--R   (36)  (8x - 12)y  + (8x - 12)y + 56x - 84
+--R                                                     Type: Polynomial Integer
+--E 36
+
+--S 37 of 38
+D(fp,x) 
+--R 
+--R
+--R                    2
+--R   (37)  4(2x - 3)(y  + y + 7)
+--R                                            Type: Factored Polynomial Integer
+--E 37
+
+--S 38 of 38
+numberOfFactors(%) 
+--R 
+--R
+--R   (38)  3
+--R                                                        Type: PositiveInteger
+--E 38
+)spool
+)lisp (bye)
+@
+
 -- This file contains a domain and packages for manipulating objects
 -- in factored form.
 \section{domain FR Factored}
+<<Factored.help>>=
+====================================================================
+Factored examples
+====================================================================
+
+Factored creates a domain whose objects are kept in factored form as
+long as possible.  Thus certain operations like * (multiplication) and
+gcd are relatively easy to do.  Others, such as addition, require
+somewhat more work, and the result may not be completely factored
+unless the argument domain R provides a factor operation.  Each object
+consists of a unit and a list of factors, where each factor consists
+of a member of R (the base), an exponent, and a flag indicating what
+is known about the base.  A flag may be one of "nil", "sqfr", "irred"
+or "prime", which mean that nothing is known about the base, it is
+square-free, it is irreducible, or it is prime, respectively.  The
+current restriction to factored objects of integral domains allows
+simplification to be performed without worrying about multiplication
+order.
+
+====================================================================
+Decomposing Factored Objects
+====================================================================
+
+In this section we will work with a factored integer.
+
+  g := factor(4312)
+     3 2
+    2 7 11
+                         Type: Factored Integer
+
+Let's begin by decomposing g into pieces.  The only possible
+units for integers are 1 and -1.
+
+  unit(g)
+    1
+                         Type: PositiveInteger
+
+There are three factors.
+
+  numberOfFactors(g)
+    3
+                         Type: PositiveInteger
+
+We can make a list of the bases, ...
+
+  [nthFactor(g,i) for i in 1..numberOfFactors(g)]
+    [2,7,11]
+                         Type: List Integer
+
+and the exponents, ...
+
+  [nthExponent(g,i) for i in 1..numberOfFactors(g)] 
+    [3,2,1]
+                         Type: List Integer
+
+and the flags.  You can see that all the bases (factors) are prime.
+
+  [nthFlag(g,i) for i in 1..numberOfFactors(g)] 
+    ["prime","prime","prime"]
+                         Type: List Union("nil","sqfr","irred","prime")
+
+A useful operation for pulling apart a factored object into a list
+of records of the components is factorList.
+
+  factorList(g) 
+    [[flg= "prime",fctr= 2,xpnt= 3], [flg= "prime",fctr= 7,xpnt= 2],
+     [flg= "prime",fctr= 11,xpnt= 1]]
+           Type: List Record(flg: Union("nil","sqfr","irred","prime"),
+                             fctr: Integer,xpnt: Integer)
+
+If you don't care about the flags, use factors.
+
+  factors(g) 
+    [[factor= 2,exponent= 3],[factor= 7,exponent= 2],[factor= 11,exponent= 1]]
+                         Type: List Record(factor: Integer,exponent: Integer)
+
+Neither of these operations returns the unit.
+
+  first(%).factor 
+    2
+                         Type: PositiveInteger
+
+====================================================================
+Expanding Factored Objects
+====================================================================
+
+Recall that we are working with this factored integer.
+
+  g := factor(4312) 
+     3 2
+    2 7 11
+                         Type: Factored Integer
+
+To multiply out the factors with their multiplicities, use expand.
+
+  expand(g)
+    4312
+                         Type: PositiveInteger
+
+If you would like, say, the distinct factors multiplied together but
+with multiplicity one, you could do it this way.
+
+  reduce(*,[t.factor for t in factors(g)]) 
+    154
+                         Type: PositiveInteger
+
+====================================================================
+Arithmetic with Factored Objects
+====================================================================
+
+We're still working with this factored integer.
+
+  g := factor(4312) 
+     3 2
+    2 7 11
+                         Type: Factored Integer
+
+We'll also define this factored integer.
+
+  f := factor(246960) 
+     4 2   3
+    2 3 5 7
+                         Type: Factored Integer
+
+Operations involving multiplication and division are particularly
+easy with factored objects.
+
+  f * g 
+     7 2   5
+    2 3 5 7 11
+                         Type: Factored Integer
+
+  f**500 
+     2000 1000 500 1500
+    2    3    5   7
+                         Type: Factored Integer
+
+  gcd(f,g) 
+     3 2
+    2 7
+                         Type: Factored Integer
+
+  lcm(f,g) 
+     4 2   3
+    2 3 5 7 11
+                         Type: Factored Integer
+
+If we use addition and subtraction things can slow down because
+we may need to compute greatest common divisors.
+
+  f + g 
+     3 2
+    2 7 641
+                         Type: Factored Integer
+
+  f - g 
+     3 2
+    2 7 619
+                         Type: Factored Integer
+
+Test for equality with 0 and 1 by using zero? and one?, respectively.
+
+  zero?(factor(0))
+    true
+                         Type: Boolean
+
+  zero?(g) 
+    false
+                         Type: Boolean
+
+  one?(factor(1))
+    true
+                         Type: Boolean
+
+  one?(f) 
+    false
+                         Type: Boolean
+
+Another way to get the zero and one factored objects is to use
+package calling.
+
+  0$Factored(Integer)
+    0
+                         Type: Factored Integer
+
+  1$Factored(Integer)
+    1
+                         Type: Factored Integer
+
+====================================================================
+Creating New Factored Objects
+====================================================================
+
+The map operation is used to iterate across the unit and bases of a
+factored object.
+
+The following four operations take a base and an exponent and create a
+factored object.  They differ in handling the flag component.
+
+  nilFactor(24,2) 
+      2
+    24
+                         Type: Factored Integer
+
+This factor has no associated information.
+
+  nthFlag(%,1) 
+    "nil"
+                         Type: Union("nil",...)
+
+This factor is asserted to be square-free.
+
+  sqfrFactor(30,2)
+      2
+    30
+                         Type: Factored Integer
+
+This factor is asserted to be irreducible.
+
+  irreducibleFactor(13,10) 
+      10
+    13
+                         Type: Factored Integer
+
+This factor is asserted to be prime.
+
+  primeFactor(11,5) 
+      5
+    11
+                         Type: Factored Integer
+
+A partial inverse to factorList is makeFR.
+
+  h := factor(-720) 
+       4 2
+    - 2 3 5
+                         Type: Factored Integer
+
+The first argument is the unit and the second is a list of records as
+returned by factorList.
+
+  h - makeFR(unit(h),factorList(h))
+    0
+                         Type: Factored Integer
+
+====================================================================
+Factored Objects with Variables
+====================================================================
+
+Some of the operations available for polynomials are also available
+for factored polynomials.
+
+  p := (4*x*x-12*x+9)*y*y + (4*x*x-12*x+9)*y + 28*x*x - 84*x + 63 
+       2            2      2                  2
+    (4x  - 12x + 9)y  + (4x  - 12x + 9)y + 28x  - 84x + 63
+                         Type: Polynomial Integer
+
+  fp := factor(p) 
+            2  2
+    (2x - 3) (y  + y + 7)
+                         Type: Factored Polynomial Integer
+
+You can differentiate with respect to a variable.
+
+  D(p,x) 
+              2
+    (8x - 12)y  + (8x - 12)y + 56x - 84
+                         Type: Polynomial Integer
+
+  D(fp,x) 
+               2
+    4(2x - 3)(y  + y + 7)
+                         Type: Factored Polynomial Integer
+
+  numberOfFactors(%) 
+    3
+                         Type: PositiveInteger
+
+See Also:
+o )help FactoredFunctions2
+o )show Factored
+o $AXIOM/doc/src/algebra/fr.spad.dvi
+
+@
 <<domain FR Factored>>=
 )abbrev domain FR Factored
 ++ Author: Robert S. Sutor
@@ -596,6 +1215,118 @@ FactoredFunctionUtilities(R): Exports == Implementation where
 
 @
 \section{package FR2 FactoredFunctions2}
+<<FactoredFunctions2.input>>=
+-- fr.spad.pamphlet FactoredFunctions2.input
+)spool FactoredFunctions2.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 6
+double(x) == x + x
+--R 
+--R                                                                   Type: Void
+--E 1
+
+--S 2 of 6
+f := factor(720) 
+--R 
+--R
+--R         4 2
+--R   (2)  2 3 5
+--R                                                       Type: Factored Integer
+--E 2
+
+--S 3 of 6
+map(double,f) 
+--R 
+--R   Compiling function double with type Integer -> Integer 
+--R
+--R           4 2
+--R   (3)  2 4 6 10
+--R                                                       Type: Factored Integer
+--E 3
+
+--S 4 of 6
+makePoly(b) == x + b 
+--R 
+--R                                                                   Type: Void
+--E 4
+
+--S 5 of 6
+g := map(makePoly,f) 
+--R 
+--R   Compiling function makePoly with type Integer -> Polynomial Integer 
+--R
+--R                      4       2
+--R   (5)  (x + 1)(x + 2) (x + 3) (x + 5)
+--R                                            Type: Factored Polynomial Integer
+--E 5
+
+--S 6 of 6
+nthFlag(g,1) 
+--R 
+--R
+--R   (6)  "nil"
+--R                                                       Type: Union("nil",...)
+--E 6
+)spool
+)lisp (bye)
+@
+
+<<FactoredFunctions2.help>>=
+====================================================================
+FactoredFunctions2 examples
+====================================================================
+
+The FactoredFunctions2 package implements one operation, map, for
+applying an operation to every base in a factored object and to the unit.
+
+  double(x) == x + x
+                         Type: Void
+
+  f := factor(720) 
+     4 2
+    2 3 5
+                         Type: Factored Integer
+
+Actually, the map operation used in this example comes from Factored
+itself, since double takes an integer argument and returns an integer
+result.
+
+  map(double,f) 
+       4 2
+    2 4 6 10
+                         Type: Factored Integer
+
+If we want to use an operation that returns an object that has a type
+different from the operation's argument, the map in Factored cannot be
+used and we use the one in FactoredFunctions2.
+
+  makePoly(b) == x + b 
+                  4       2
+    (x + 1)(x + 2) (x + 3) (x + 5)
+                         Type: Factored Polynomial Integer
+
+In fact, the "2" in the name of the package means that we might
+be using factored objects of two different types.
+
+  g := map(makePoly,f) 
+
+It is important to note that both versions of map destroy any information 
+known about the bases (the fact that they are prime, for instance).
+
+The flags for each base are set to "nil" in the object returned by map.
+
+  nthFlag(g,1) 
+    "nil"
+                        Type: Union("nil",...)
+
+See Also:
+o )help Factored
+o )show FactoredFunctions2
+o $AXIOM/doc/src/algebra/fr.spad.dvi
+
+@
 <<package FR2 FactoredFunctions2>>=
 )abbrev package FR2 FactoredFunctions2
 ++ Author: Robert S. Sutor
diff --git a/src/algebra/fraction.spad.pamphlet b/src/algebra/fraction.spad.pamphlet
index 51cbb0d..131a301 100644
--- a/src/algebra/fraction.spad.pamphlet
+++ b/src/algebra/fraction.spad.pamphlet
@@ -384,6 +384,262 @@ QuotientFieldCategoryFunctions2(A, B, R, S): Exports == Impl where
 
 @
 \section{domain FRAC Fraction}
+<<Fraction.input>>=
+-- fraction.spad.pamphlet Fraction.input
+)spool Fraction.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 12
+a := 11/12
+--R 
+--R
+--R        11
+--R   (1)  --
+--R        12
+--R                                                       Type: Fraction Integer
+--E 1
+
+--S 2 of 12
+b := 23/24
+--R 
+--R
+--R        23
+--R   (2)  --
+--R        24
+--R                                                       Type: Fraction Integer
+--E 2
+
+--S 3 of 12
+3 - a*b**2 + a + b/a
+--R 
+--R
+--R        313271
+--R   (3)  ------
+--R         76032
+--R                                                       Type: Fraction Integer
+--E 3
+
+--S 4 of 12
+numer(a)
+--R 
+--R
+--R   (4)  11
+--R                                                        Type: PositiveInteger
+--E 4
+
+--S 5 of 12
+denom(b)
+--R 
+--R
+--R   (5)  24
+--R                                                        Type: PositiveInteger
+--E 5
+
+--S 6 of 12
+r := (x**2 + 2*x + 1)/(x**2 - 2*x + 1)
+--R 
+--R
+--R         2
+--R        x  + 2x + 1
+--R   (6)  -----------
+--R         2
+--R        x  - 2x + 1
+--R                                            Type: Fraction Polynomial Integer
+--E 6
+
+--S 7 of 12
+factor(r)
+--R 
+--R
+--R         2
+--R        x  + 2x + 1
+--R   (7)  -----------
+--R         2
+--R        x  - 2x + 1
+--R                                   Type: Factored Fraction Polynomial Integer
+--E 7
+
+--S 8 of 12
+map(factor,r)
+--R 
+--R
+--R               2
+--R        (x + 1)
+--R   (8)  --------
+--R               2
+--R        (x - 1)
+--R                                   Type: Fraction Factored Polynomial Integer
+--E 8
+
+--S 9 of 12
+continuedFraction(7/12)
+--R 
+--R
+--R          1 |     1 |     1 |     1 |
+--R   (9)  +---+ + +---+ + +---+ + +---+
+--R        | 1     | 1     | 2     | 2
+--R                                              Type: ContinuedFraction Integer
+--E 9
+
+--S 10 of 12
+partialFraction(7,12)
+--R 
+--R
+--R              3   1
+--R   (10)  1 - -- + -
+--R              2   3
+--R             2
+--R                                                Type: PartialFraction Integer
+--E 10
+
+--S 11 of 12
+g := 2/3 + 4/5*%i
+--R 
+--R
+--R         2   4
+--R   (11)  - + - %i
+--R         3   5
+--R                                               Type: Complex Fraction Integer
+--E 11
+
+--S 12 of 12
+g :: FRAC COMPLEX INT
+--R 
+--R
+--R         10 + 12%i
+--R   (12)  ---------
+--R             15
+--R                                               Type: Fraction Complex Integer
+--E 12
+)spool
+ 
+)spool
+)lisp (bye)
+@
+<<Fraction.help>>=
+====================================================================
+Fraction examples
+====================================================================
+
+The Fraction domain implements quotients.  The elements must
+belong to a domain of category IntegralDomain: multiplication
+must be commutative and the product of two non-zero elements must not
+be zero.  This allows you to make fractions of most things you would
+think of, but don't expect to create a fraction of two matrices!  The
+abbreviation for Fraction is FRAC.
+
+Use / to create a fraction.
+
+  a := 11/12
+    11
+    --
+    12
+                   Type: Fraction Integer
+
+  b := 23/24
+    23
+    --
+    24
+                   Type: Fraction Integer
+
+The standard arithmetic operations are available.
+
+  3 - a*b**2 + a + b/a
+    313271
+    ------
+     76032
+                   Type: Fraction Integer
+
+Extract the numerator and denominator by using numer and denom,
+respectively.
+
+  numer(a)
+    11
+                   Type: PositiveInteger
+
+  denom(b)
+    24
+                   Type: PositiveInteger
+
+Operations like max, min, negative?, positive? and zero?
+are all available if they are provided for the numerators and
+denominators.  
+
+Don't expect a useful answer from factor, gcd or lcm if you apply
+them to fractions.
+
+  r := (x**2 + 2*x + 1)/(x**2 - 2*x + 1)
+     2
+    x  + 2x + 1
+    -----------
+     2
+    x  - 2x + 1
+                  Type: Fraction Polynomial Integer
+
+Since all non-zero fractions are invertible, these operations have trivial
+definitions.
+
+  factor(r)
+     2
+    x  + 2x + 1
+    -----------
+     2
+    x  - 2x + 1
+                  Type: Factored Fraction Polynomial Integer
+
+Use map to apply factor to the numerator and denominator, which is
+probably what you mean.
+
+  map(factor,r)
+           2
+    (x + 1)
+    --------
+           2
+    (x - 1)
+                  Type: Fraction Factored Polynomial Integer
+
+Other forms of fractions are available.  Use continuedFraction to
+create a continued fraction.
+
+  continuedFraction(7/12)
+      1 |     1 |     1 |     1 |
+    +---+ + +---+ + +---+ + +---+
+    | 1     | 1     | 2     | 2
+                  Type: ContinuedFraction Integer
+
+Use partialFraction to create a partial fraction.
+
+  partialFraction(7,12)
+          3   1
+     1 - -- + -
+          2   3
+         2
+                  Type: PartialFraction Integer
+
+Use conversion to create alternative views of fractions with objects
+moved in and out of the numerator and denominator.
+
+  g := 2/3 + 4/5*%i
+     2   4
+     - + - %i
+     3   5
+                  Type: Complex Fraction Integer
+
+  g :: FRAC COMPLEX INT
+    10 + 12%i
+    ---------
+        15
+                  Type: Fraction Complex Integer
+
+See Also: 
+o )help ContinuedFraction
+o )help PartialFraction
+o )help Integer
+o )show Fraction
+o $AXIOM/doc/src/algebra/fraction.spad.dvi
+
+@
 <<domain FRAC Fraction>>=
 )abbrev domain FRAC Fraction
 ++ Author:
diff --git a/src/algebra/groebf.spad.pamphlet b/src/algebra/groebf.spad.pamphlet
index 68cc216..26feae1 100644
--- a/src/algebra/groebf.spad.pamphlet
+++ b/src/algebra/groebf.spad.pamphlet
@@ -10,6 +10,204 @@
 \tableofcontents
 \eject
 \section{package GBF GroebnerFactorizationPackage}
+<<GroebnerFactorizationPackage.input>>=
+-- groebf.spad.pamphlet GroebnerFactorizationPackage.input
+)spool GroebnerFactorizationPackage.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 3
+mfzn : SQMATRIX(6,DMP([x,y,z],Fraction INT)) := [ [0,1,1,1,1,1], [1,0,1,8/3,x,8/3], [1,1,0,1,8/3,y], [1,8/3,1,0,1,8/3], [1,x,8/3,1,0,1], [1,8/3,y,8/3,1,0] ]
+--R 
+--R
+--R        +0  1  1  1  1  1+
+--R        |                |
+--R        |         8     8|
+--R        |1  0  1  -  x  -|
+--R        |         3     3|
+--R        |                |
+--R        |            8   |
+--R        |1  1  0  1  -  y|
+--R        |            3   |
+--R        |                |
+--R   (1)  |   8           8|
+--R        |1  -  1  0  1  -|
+--R        |   3           3|
+--R        |                |
+--R        |      8         |
+--R        |1  x  -  1  0  1|
+--R        |      3         |
+--R        |                |
+--R        |   8     8      |
+--R        |1  -  y  -  1  0|
+--R        +   3     3      +
+--RType: SquareMatrix(6,DistributedMultivariatePolynomial([x,y,z],Fraction Integer))
+--E 1
+
+--S 2 of 3
+eq := determinant mfzn
+--R 
+--R
+--R   (2)
+--R      2 2   22  2    25  2   22    2   388       250     25  2   250     14575
+--R   - x y  + -- x y - -- x  + -- x y  - --- x y - --- x - -- y  - --- y + -----
+--R             3        9       3         9         27      9       27       81
+--R            Type: DistributedMultivariatePolynomial([x,y,z],Fraction Integer)
+--E 2
+
+--S 3 of 3
+groebnerFactorize [eq,eval(eq, [x,y,z],[y,z,x]), eval(eq,[x,y,z],[z,x,y])] 
+--R 
+--R
+--R   (3)
+--R   [
+--R                  22           22     22     121
+--R     [x y + x z - -- x + y z - -- y - -- z + ---,
+--R                   3            3      3      3
+--R         2   22       25        2   22       25     22  2   388     250
+--R      x z  - -- x z + -- x + y z  - -- y z + -- y - -- z  + --- z + ---,
+--R              3        9             3        9      3       9       27
+--R       2 2   22  2    25  2   22    2   388       250     25  2   250     14575
+--R      y z  - -- y z + -- y  - -- y z  + --- y z + --- y + -- z  + --- z - -----]
+--R              3        9       3         9         27      9       27       81
+--R     ,
+--R             21994  2   21994     4427     463
+--R    [x + y - -----,y  - ----- y + ----,z - ---],
+--R              5625       5625      675      87
+--R      2   1       11     5     265        2   38     265
+--R    [x  - - x z - -- x - - z + ---,y - z,z  - -- z + ---],
+--R          2        2     6      18             3      9
+--R         25     11     11        11     11     11        5     5     5
+--R    [x - --,y - --,z - --], [x - --,y - --,z - --], [x + -,y + -,z + -],
+--R          9      3      3         3      3      3        3     3     3
+--R         19     5     5
+--R    [x - --,y + -,z + -]]
+--R          3     3     3
+--R  Type: List List DistributedMultivariatePolynomial([x,y,z],Fraction Integer)
+--E 3
+)spool
+)lisp (bye)
+@
+<<GroebnerFactorizationPackage.help>>=
+====================================================================
+GroebnerFactorizationPackage examples
+====================================================================
+
+Solving systems of polynomial equations with the Groebner basis
+algorithm can often be very time consuming because, in general, the
+algorithm has exponential run-time.  These systems, which often come
+from concrete applications, frequently have symmetries which are not
+taken advantage of by the algorithm.  However, it often happens in
+this case that the polynomials which occur during the Groebner
+calculations are reducible.  Since Axiom has an excellent polynomial
+factorization algorithm, it is very natural to combine the Groebner
+and factorization algorithms.
+
+GroebnerFactorizationPackage exports the groebnerFactorize operation
+which implements a modified Groebner basis algorithm.  In this
+algorithm, each polynomial that is to be put into the partial list of
+the basis is first factored.  The remaining calculation is split into
+as many parts as there are irreducible factors.  Call these factors
+p1,...,pN. In the branches corresponding to p2,...,pN, the factor p1
+can be divided out, and so on.  This package also contains operations
+that allow you to specify the polynomials that are not zero on the
+common roots of the final Groebner basis.
+
+Here is an example from chemistry.  In a theoretical model of the
+cyclohexan C6H12, the six carbon atoms each sit in the center of
+gravity of a tetrahedron that has two hydrogen atoms and two carbon
+atoms at its corners.  We first normalize and set the length of each
+edge to 1.  Hence, the distances of one fixed carbon atom to each of
+its immediate neighbours is 1.  We will denote the distances to the
+other three carbon atoms by x, y and z.
+
+A. Dress developed a theory to decide whether a set of points
+and distances between them can be realized in an n-dimensional space.
+Here, of course, we have n = 3.
+
+  mfzn : SQMATRIX(6,DMP([x,y,z],Fraction INT)) := _
+   [ [0,1,1,1,1,1], [1,0,1,8/3,x,8/3], [1,1,0,1,8/3,y], _
+     [1,8/3,1,0,1,8/3], [1,x,8/3,1,0,1], [1,8/3,y,8/3,1,0] ]
+        +0  1  1  1  1  1+
+        |                |
+        |         8     8|
+        |1  0  1  -  x  -|
+        |         3     3|
+        |                |
+        |            8   |
+        |1  1  0  1  -  y|
+        |            3   |
+        |                |
+        |   8           8|
+        |1  -  1  0  1  -|
+        |   3           3|
+        |                |
+        |      8         |
+        |1  x  -  1  0  1|
+        |      3         |
+        |                |
+        |   8     8      |
+        |1  -  y  -  1  0|
+        +   3     3      +
+Type: SquareMatrix(6,DistributedMultivariatePolynomial([x,y,z],
+                      Fraction Integer))
+
+For the cyclohexan, the distances have to satisfy this equation.
+
+  eq := determinant mfzn
+      2 2   22  2    25  2   22    2   388       250     25  2   250     14575
+   - x y  + -- x y - -- x  + -- x y  - --- x y - --- x - -- y  - --- y + -----
+             3        9       3         9         27      9       27       81
+            Type: DistributedMultivariatePolynomial([x,y,z],Fraction Integer)
+
+They also must satisfy the equations given by cyclic shifts of the
+indeterminates.
+
+  groebnerFactorize [eq,eval(eq, [x,y,z],[y,z,x]), eval(eq,[x,y,z],[z,x,y])] 
+   [
+                 22           22     22     121
+    [x y + x z - -- x + y z - -- y - -- z + ---,
+                  3            3      3      3
+        2   22       25        2   22       25     22  2   388     250
+     x z  - -- x z + -- x + y z  - -- y z + -- y - -- z  + --- z + ---,
+             3        9             3        9      3       9       27
+      2 2   22  2    25  2   22    2   388       250     25  2   250     14575
+     y z  - -- y z + -- y  - -- y z  + --- y z + --- y + -- z  + --- z - -----]
+             3        9       3         9         27      9       27       81
+    ,
+            21994  2   21994     4427     463
+   [x + y - -----,y  - ----- y + ----,z - ---],
+             5625       5625      675      87
+     2   1       11     5     265        2   38     265
+   [x  - - x z - -- x - - z + ---,y - z,z  - -- z + ---],
+         2        2     6      18             3      9
+        25     11     11        11     11     11        5     5     5
+   [x - --,y - --,z - --], [x - --,y - --,z - --], [x + -,y + -,z + -],
+         9      3      3         3      3      3        3     3     3
+        19     5     5
+   [x - --,y + -,z + -]]
+         3     3     3
+  Type: List List DistributedMultivariatePolynomial([x,y,z],Fraction Integer)
+
+The union of the solutions of this list is the solution of our original 
+problem.  If we impose positivity conditions, we get two relevant ideals.  
+One ideal is zero-dimensional, namely x = y = z =11/3, and this determines 
+the "boat" form of the cyclohexan.  The other ideal is one-dimensional, 
+which means that we have a solution space given by one parameter.  This 
+gives the "chair" form of the cyclohexan.  The parameter describes the 
+angle of the "back of the chair."
+
+groebnerFactorize has an optional Boolean-valued second argument.
+When it is true partial results are displayed, since it may happen
+that the calculation does not terminate in a reasonable time.  See the
+source code for GroebnerFactorizationPackage in groebf.spad.pamphlet
+for more details about the algorithms used.
+
+See Also:
+o )show GroebnerFactorizationPackage
+o $AXIOM/doc/src/algebra/groebf.spad.dvi
+
+@
 <<package GBF GroebnerFactorizationPackage>>=
 )abbrev package GBF GroebnerFactorizationPackage
 ++ Author: H. Michael Moeller, Johannes Grabmeier
diff --git a/src/algebra/integer.spad.pamphlet b/src/algebra/integer.spad.pamphlet
index 3aa12fa..bb76998 100644
--- a/src/algebra/integer.spad.pamphlet
+++ b/src/algebra/integer.spad.pamphlet
@@ -61,6 +61,667 @@ IntegerSolveLinearPolynomialEquation(): C ==T
 The function {\bf one?} has been rewritten back to its original form.
 The NAG version called a lisp primitive that exists only in Codemist
 Common Lisp and is not defined in Common Lisp.
+<<Integer.input>>=
+-- integer.spad.pamphlet Integer.input
+)spool Integer.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 42
+2**(5678 - 4856 + 2 * 17)
+--R 
+--R
+--R   (1)
+--R  4804810770435008147181540925125924391239526139871682263473855610088084200076_
+--R   308293086342527091412083743074572278211496076276922026433435687527334980249_
+--R   539302425425230458177649495442143929053063884787051467457680738771416988598_
+--R   15495632935288783334250628775936
+--R                                                        Type: PositiveInteger
+--E 1
+
+--S 2 of 42
+x := -101
+--R 
+--R
+--R   (2)  - 101
+--R                                                                Type: Integer
+--E 2
+
+--S 3 of 42
+abs(x)
+--R 
+--R
+--R   (3)  101
+--R                                                        Type: PositiveInteger
+--E 3
+
+--S 4 of 42
+sign(x)
+--R 
+--R
+--R   (4)  - 1
+--R                                                                Type: Integer
+--E 4
+
+--S 5 of 42
+x < 0
+--R 
+--R
+--R   (5)  true
+--R                                                                Type: Boolean
+--E 5
+
+--S 6 of 42
+x <= -1
+--R 
+--R
+--R   (6)  true
+--R                                                                Type: Boolean
+--E 6
+
+--S 7 of 42
+negative?(x)
+--R 
+--R
+--R   (7)  true
+--R                                                                Type: Boolean
+--E 7
+
+--S 8 of 42
+x > 0
+--R 
+--R
+--R   (8)  false
+--R                                                                Type: Boolean
+--E 8
+
+--S 9 of 42
+x >= 1
+--R 
+--R
+--R   (9)  false
+--R                                                                Type: Boolean
+--E 9
+
+--S 10 of 42
+positive?(x)
+--R 
+--R
+--R   (10)  false
+--R                                                                Type: Boolean
+--E 10
+
+--S 11 of 42
+zero?(x)
+--R 
+--R
+--R   (11)  false
+--R                                                                Type: Boolean
+--E 11
+
+--S 12 of 42
+one?(x)
+--R 
+--R
+--R   (12)  false
+--R                                                                Type: Boolean
+--E 12
+
+--S 13 of 42
+(x = -101)@Boolean
+--R 
+--R
+--R   (13)  true
+--R                                                                Type: Boolean
+--E 13
+
+--S 14 of 42
+odd?(x)
+--R 
+--R
+--R   (14)  true
+--R                                                                Type: Boolean
+--E 14
+
+--S 15 of 42
+even?(x)
+--R 
+--R
+--R   (15)  false
+--R                                                                Type: Boolean
+--E 15
+
+--S 16 of 42
+gcd(56788,43688)
+--R 
+--R
+--R   (16)  4
+--R                                                        Type: PositiveInteger
+--E 16
+
+--S 17 of 42
+lcm(56788,43688)
+--R 
+--R
+--R   (17)  620238536
+--R                                                        Type: PositiveInteger
+--E 17
+
+--S 18 of 42
+max(678,567)
+--R 
+--R
+--R   (18)  678
+--R                                                        Type: PositiveInteger
+--E 18
+
+--S 19 of 42
+min(678,567)
+--R 
+--R
+--R   (19)  567
+--R                                                        Type: PositiveInteger
+--E 19
+
+--S 20 of 42
+reduce(max,[2,45,-89,78,100,-45])
+--R 
+--R
+--R   (20)  100
+--R                                                        Type: PositiveInteger
+--E 20
+
+--S 21 of 42
+reduce(min,[2,45,-89,78,100,-45])
+--R 
+--R
+--R   (21)  - 89
+--R                                                                Type: Integer
+--E 21
+
+--S 22 of 42
+reduce(gcd,[2,45,-89,78,100,-45])
+--R 
+--R
+--R   (22)  1
+--R                                                        Type: PositiveInteger
+--E 22
+
+--S 23 of 42
+reduce(lcm,[2,45,-89,78,100,-45])
+--R 
+--R
+--R   (23)  1041300
+--R                                                        Type: PositiveInteger
+--E 23
+
+--S 24 of 42
+13 / 4
+--R 
+--R
+--R         13
+--R   (24)  --
+--R          4
+--R                                                       Type: Fraction Integer
+--E 24
+
+--S 25 of 42
+13 quo 4
+--R 
+--R
+--R   (25)  3
+--R                                                        Type: PositiveInteger
+--E 25
+
+--S 26 of 42
+13 rem 4
+--R 
+--R
+--R   (26)  1
+--R                                                        Type: PositiveInteger
+--E 26
+
+--S 27 of 42
+zero?(167604736446952 rem 2003644)
+--R 
+--R
+--R   (27)  true
+--R                                                                Type: Boolean
+--E 27
+
+--S 28 of 42
+d := divide(13,4)
+--R 
+--R
+--R   (28)  [quotient= 3,remainder= 1]
+--R                           Type: Record(quotient: Integer,remainder: Integer)
+--E 28
+
+--S 29 of 42
+d.quotient
+--R 
+--R
+--R   (29)  3
+--R                                                        Type: PositiveInteger
+--E 29
+
+--S 30 of 42
+d.remainder
+--R 
+--R
+--R   (30)  1
+--R                                                        Type: PositiveInteger
+--E 30
+
+--S 31 of 42
+factor 102400
+--R 
+--R
+--R          12 2
+--R   (31)  2  5
+--R                                                       Type: Factored Integer
+--E 31
+
+--S 32 of 42
+prime? 7
+--R 
+--R
+--R   (32)  true
+--R                                                                Type: Boolean
+--E 32
+
+--S 33 of 42
+prime? 8
+--R 
+--R
+--R   (33)  false
+--R                                                                Type: Boolean
+--E 33
+
+--S 34 of 42
+nextPrime 100
+--R 
+--R
+--R   (34)  101
+--R                                                        Type: PositiveInteger
+--E 34
+
+--S 35 of 42
+prevPrime 100
+--R 
+--R
+--R   (35)  97
+--R                                                        Type: PositiveInteger
+--E 35
+
+--S 36 of 42
+primes(100,175)
+--R 
+--R
+--R   (36)  [173,167,163,157,151,149,139,137,131,127,113,109,107,103,101]
+--R                                                           Type: List Integer
+--E 36
+
+--S 37 of 42
+factor(2 :: Complex Integer)
+--R 
+--R
+--R                      2
+--R   (37)  - %i (1 + %i)
+--R                                               Type: Factored Complex Integer
+--E 37
+
+--S 38 of 42
+[fibonacci(k) for k in 0..]
+--R 
+--R
+--R   (38)  [0,1,1,2,3,5,8,13,21,34,...]
+--R                                                         Type: Stream Integer
+--E 38
+
+--S 39 of 42
+[legendre(i,11) for i in 0..10]
+--R 
+--R
+--R   (39)  [0,1,- 1,1,1,1,- 1,- 1,- 1,1,- 1]
+--R                                                           Type: List Integer
+--E 39
+
+--S 40 of 42
+[jacobi(i,15) for i in 0..9]
+--R 
+--R
+--R   (40)  [0,1,1,0,1,0,0,- 1,1,0]
+--R                                                           Type: List Integer
+--E 40
+
+--S 41 of 42
+[eulerPhi i for i in 1..]
+--R 
+--R
+--R   (41)  [1,1,2,2,4,2,6,4,6,4,...]
+--R                                                         Type: Stream Integer
+--E 41
+
+--S 42 of 42
+[moebiusMu i for i in 1..]
+--R 
+--R
+--R   (42)  [1,- 1,- 1,0,- 1,1,- 1,0,0,1,...]
+--R                                                         Type: Stream Integer
+--E 42
+)spool
+)lisp (bye)
+@
+<<Integer.help>>=
+====================================================================
+Integer examples
+====================================================================
+
+Axiom provides many operations for manipulating arbitrary precision
+integers.  In this section we will show some of those that come from
+Integer itself plus some that are implemented in other packages.
+
+\subsection{Basic Functions}
+
+The size of an integer in Axiom is only limited by the amount of
+computer storage you have available.  The usual arithmetic operations
+are available.
+
+  2**(5678 - 4856 + 2 * 17)
+  4804810770435008147181540925125924391239526139871682263473855610088084200076_
+   308293086342527091412083743074572278211496076276922026433435687527334980249_
+   539302425425230458177649495442143929053063884787051467457680738771416988598_
+   15495632935288783334250628775936
+                        Type: PositiveInteger
+
+There are a number of ways of working with the sign of an integer.
+Let's use this x as an example.
+
+  x := -101
+    - 101
+                        Type: Integer
+
+First of all, there is the absolute value function.
+
+  abs(x)
+    101
+                        Type: PositiveInteger
+
+The sign operation returns -1 if its argument is negative, 0 if zero
+and 1 if positive.
+
+  sign(x)
+    - 1
+                        Type: Integer
+
+You can determine if an integer is negative in several other ways.
+
+  x < 0
+    true
+                        Type: Boolean
+
+  x <= -1
+    true
+                        Type: Boolean
+
+  negative?(x)
+    true
+                        Type: Boolean
+
+Similarly, you can find out if it is positive.
+
+  x > 0
+    false
+                        Type: Boolean
+
+  x >= 1
+    false
+                        Type: Boolean
+
+  positive?(x)
+    false
+                        Type: Boolean
+
+This is the recommended way of determining whether an integer is zero.
+
+  zero?(x)
+    false
+                        Type: Boolean
+
+Use the zero? operation whenever you are testing any mathematical
+object for equality with zero.  This is usually more efficient that
+using = (think of matrices: it is easier to tell if a matrix is zero
+by just checking term by term than constructing another "zero" matrix
+and comparing the two matrices term by term) and also avoids the
+problem that = is usually used for creating equations.
+
+This is the recommended way of determining whether an integer is equal
+to one.
+
+  one?(x)
+    false
+                       Type: Boolean
+
+This syntax is used to test equality using =.  It says that you want a
+Boolean (true or false) answer rather than an equation.
+
+  (x = -101)@Boolean
+    true
+                       Type: Boolean
+
+The operations odd? and even? determine whether an integer is odd or
+even, respectively.  They each return a Boolean object.
+
+  odd?(x)
+    true
+                       Type: Boolean
+
+  even?(x)
+    false
+                       Type: Boolean
+
+The operation gcd computes the greatest common divisor of two integers.
+
+  gcd(56788,43688)
+    4
+                       Type: PositiveInteger
+
+The operation lcm computes their least common multiple.
+
+  lcm(56788,43688)
+    620238536
+                       Type: PositiveInteger
+
+To determine the maximum of two integers, use max.
+
+  max(678,567)
+    678
+                       Type: PositiveInteger
+
+To determine the minimum, use min.
+
+  min(678,567)
+    567
+                       Type: PositiveInteger
+
+The reduce operation is used to extend binary operations to more
+than two arguments.  For example, you can use reduce to find the
+maximum integer in a list or compute the least common multiple of all
+integers in the list.
+
+  reduce(max,[2,45,-89,78,100,-45])
+    100
+                       Type: PositiveInteger
+
+  reduce(min,[2,45,-89,78,100,-45])
+    - 89
+                       Type: Integer
+
+  reduce(gcd,[2,45,-89,78,100,-45])
+    1
+                       Type: PositiveInteger
+
+  reduce(lcm,[2,45,-89,78,100,-45])
+    1041300
+                       Type: PositiveInteger
+
+The infix operator "/" is not used to compute the quotient of integers.  
+Rather, it is used to create rational numbers as described in Fraction.
+
+  13 / 4
+     13
+     --
+      4
+                       Type: Fraction Integer
+
+The infix operation quo computes the integer quotient.
+
+  13 quo 4
+    3
+                       Type: PositiveInteger
+
+The infix operation rem computes the integer remainder.
+
+  13 rem 4
+    1
+                       Type: PositiveInteger
+
+One integer is evenly divisible by another if the remainder is zero.
+The operation exquo can also be used.  
+
+  zero?(167604736446952 rem 2003644)
+    true
+                       Type: Boolean
+
+The operation divide returns a record of the quotient and remainder
+and thus is more efficient when both are needed.
+
+  d := divide(13,4)
+    [quotient= 3,remainder= 1]
+                       Type: Record(quotient: Integer,remainder: Integer)
+
+  d.quotient
+    3
+                       Type: PositiveInteger
+
+See help on Records for details on Records.
+
+  d.remainder
+    1
+                       Type: PositiveInteger
+
+====================================================================
+Primes and Factorization
+====================================================================
+
+Use the operation factor to factor integers.  It returns an object of
+type Factored Integer.
+
+  factor 102400
+     12 2
+    2  5
+                       Type: Factored Integer
+
+The operation prime? returns true or false depending on whether its
+argument is a prime.
+
+  prime? 7
+    true
+                       Type: Boolean
+
+  prime? 8
+    false
+                       Type: Boolean
+
+The operation nextPrime returns the least prime number greater than
+its argument.
+
+  nextPrime 100
+    101
+                       Type: PositiveInteger
+
+The operation prevPrime returns the greatest prime number less than
+its argument.
+
+  prevPrime 100
+    97
+                       Type: PositiveInteger
+
+To compute all primes between two integers (inclusively), use the
+operation primes.
+
+  primes(100,175)
+    [173,167,163,157,151,149,139,137,131,127,113,109,107,103,101]
+                       Type: List Integer
+
+You might sometimes want to see the factorization of an integer
+when it is considered a Gaussian integer.
+
+  factor(2 :: Complex Integer)
+                 2
+    - %i (1 + %i)
+                       Type: Factored Complex Integer
+
+====================================================================
+Some Number Theoretic Functions
+====================================================================
+
+Axiom provides several number theoretic operations for integers.
+
+The operation fibonacci computes the Fibonacci numbers.  The algorithm 
+has running time O(log^3n) for argument n.
+
+  [fibonacci(k) for k in 0..]
+    [0,1,1,2,3,5,8,13,21,34,...]
+                      Type: Stream Integer
+
+The operation legendre computes the Legendre symbol for its two integer 
+arguments where the second one is prime.  If you know the second argument 
+to be prime, use jacobi instead where no check is made.
+
+  [legendre(i,11) for i in 0..10]
+    [0,1,- 1,1,1,1,- 1,- 1,- 1,1,- 1]
+                      Type: List Integer
+
+The operation jacobi computes the Jacobi symbol for its two integer 
+arguments.  By convention, 0 is returned if the greatest common divisor 
+of the numerator and denominator is not 1.
+
+  [jacobi(i,15) for i in 0..9]
+    [0,1,1,0,1,0,0,- 1,1,0]
+                      Type: List Integer
+
+The operation eulerPhi computes the values of Euler's \phi-function 
+where \phi(n) equals the number of positive integers less than or equal 
+to n that are relatively prime to the positive integer n.
+
+  [eulerPhi i for i in 1..]
+    [1,1,2,2,4,2,6,4,6,4,...]
+                      Type: Stream Integer
+
+The operation moebiusMu computes the Moebius mu function.
+
+  [moebiusMu i for i in 1..]
+    [1,- 1,- 1,0,- 1,1,- 1,0,0,1,...]
+                      Type: Stream Integer
+
+
+See Also:
+o )help Complex
+o )help Factored
+o )help Records
+o )help Fraction
+o )help RadixExpansion
+o )help HexadecimalExpansion
+o )help BinaryExpansion
+o )help DecimalExpansion
+o )help IntegerNumberTheoryFunctions
+o )help RomanNumeral
+o )show Integer
+o $AXIOM/doc/src/algebra/integer.spad.dvi
+
+@
 <<domain INT Integer>>=
 )abbrev domain INT Integer
 ++ Author:
@@ -776,6 +1437,91 @@ Note that this code is not included in the generated catdef.spad file.
 
 @
 \section{domain ROMAN RomanNumeral}
+<<RomanNumeral.input>>=
+-- integer.spad.pamphlet RomanNumeral.input
+)spool RomanNumeral.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 5
+a := roman(78)
+--R 
+--R
+--R   (1)  LXXVIII
+--R                                                           Type: RomanNumeral
+--E 1
+
+--S 2 of 5
+b := roman(87)
+--R 
+--R
+--R   (2)  LXXXVII
+--R                                                           Type: RomanNumeral
+--E 2
+
+--S 3 of 5
+a + b 
+--R 
+--R
+--R   (3)  CLXV
+--R                                                           Type: RomanNumeral
+--E 3
+
+--S 4 of 5
+a * b
+--R 
+--R
+--R   (4)  MMMMMMDCCLXXXVI
+--R                                                           Type: RomanNumeral
+--E 4
+
+--S 5 of 5
+b rem a 
+--R 
+--R
+--R   (5)  IX
+--R                                                           Type: RomanNumeral
+--E 5
+)spool
+)lisp (bye)
+@
+
+<<RomanNumeral.help>>=
+  a := roman(78)
+    LXXVIII
+                      Type: RomanNumeral
+
+  b := roman(87)
+    LXXXVII
+                      Type: RomanNumeral
+
+  a + b 
+    CLXV
+                      Type: RomanNumeral
+
+  a * b
+    MMMMMMDCCLXXXVI
+                      Type: RomanNumeral
+
+  b rem a 
+    IX
+                      Type: RomanNumeral
+
+See Also:
+o )help Integer
+o )help Complex
+o )help Factored
+o )help Records
+o )help Fraction
+o )help RadixExpansion
+o )help HexadecimalExpansion
+o )help BinaryExpansion
+o )help DecimalExpansion
+o )help IntegerNumberTheoryFunctions
+o )show RomanNumeral
+o $AXIOM/doc/src/algebra/integer.spad.dvi
+
+@
 <<domain ROMAN RomanNumeral>>=
 )abbrev domain ROMAN RomanNumeral
 ++ Author:
diff --git a/src/algebra/kl.spad.pamphlet b/src/algebra/kl.spad.pamphlet
index 0ebb957..3453982 100644
--- a/src/algebra/kl.spad.pamphlet
+++ b/src/algebra/kl.spad.pamphlet
@@ -145,6 +145,315 @@ MakeCachableSet(S:SetCategory): Exports == Implementation where
 
 @
 \section{domain KERNEL Kernel}
+<<Kernel.input>>=
+-- kl.spad.pamphlet Kernel.input
+)spool Kernel.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 19
+x :: Expression Integer
+--R 
+--R
+--R   (1)  x
+--R                                                     Type: Expression Integer
+--E 1
+
+--S 2 of 19
+kernel x
+--R 
+--R
+--R   (2)  x
+--R                                              Type: Kernel Expression Integer
+--E 2
+
+--S 3 of 19
+sin(x) + cos(x)
+--R 
+--R
+--R   (3)  sin(x) + cos(x)
+--R                                                     Type: Expression Integer
+--E 3
+
+--S 4 of 19
+kernels %
+--R 
+--R
+--R   (4)  [sin(x),cos(x)]
+--R                                         Type: List Kernel Expression Integer
+--E 4
+
+--S 5 of 19
+sin(x)**2 + sin(x) + cos(x)
+--R 
+--R
+--R              2
+--R   (5)  sin(x)  + sin(x) + cos(x)
+--R                                                     Type: Expression Integer
+--E 5
+
+--S 6 of 19
+kernels %
+--R 
+--R
+--R   (6)  [sin(x),cos(x)]
+--R                                         Type: List Kernel Expression Integer
+--E 6
+
+--S 7 of 19
+kernels(1 :: Expression Integer)
+--R 
+--R
+--R   (7)  []
+--R                                         Type: List Kernel Expression Integer
+--E 7
+
+--S 8 of 19
+mainKernel(cos(x) + tan(x))
+--R 
+--R
+--R   (8)  tan(x)
+--R                                   Type: Union(Kernel Expression Integer,...)
+--E 8
+
+--S 9 of 19
+height kernel x
+--R 
+--R
+--R   (9)  1
+--R                                                        Type: PositiveInteger
+--E 9
+
+--S 10 of 19
+height mainKernel(sin x)
+--R 
+--R
+--R   (10)  2
+--R                                                        Type: PositiveInteger
+--E 10
+
+--S 11 of 19
+height mainKernel(sin cos x)
+--R 
+--R
+--R   (11)  3
+--R                                                        Type: PositiveInteger
+--E 11
+
+--S 12 of 19
+height mainKernel(sin cos (tan x + sin x))
+--R 
+--R
+--R   (12)  4
+--R                                                        Type: PositiveInteger
+--E 12
+
+--S 13 of 19
+operator mainKernel(sin cos (tan x + sin x))
+--R 
+--R
+--R   (13)  sin
+--R                                                          Type: BasicOperator
+--E 13
+
+--S 14 of 19
+name mainKernel(sin cos (tan x + sin x))
+--R 
+--R
+--R   (14)  sin
+--R                                                                 Type: Symbol
+--E 14
+
+--S 15 of 19
+f := operator 'f 
+--R 
+--R
+--R   (15)  f
+--R                                                          Type: BasicOperator
+--E 15
+
+--S 16 of 19
+e := f(x, y, 10) 
+--R 
+--R
+--R   (16)  f(x,y,10)
+--R                                                     Type: Expression Integer
+--E 16
+
+--S 17 of 19
+is?(e, f) 
+--R 
+--R
+--R   (17)  true
+--R                                                                Type: Boolean
+--E 17
+
+--S 18 of 19
+is?(e, 'f)
+--R 
+--R
+--R   (18)  true
+--R                                                                Type: Boolean
+--E 18
+
+--S 19 of 19
+argument mainKernel e
+--R 
+--R
+--R   (19)  [x,y,10]
+--R                                                Type: List Expression Integer
+--E 19
+)spool
+ 
+)spool
+)lisp (bye)
+@
+<<Kernel.help>>=
+====================================================================
+Kernel examples
+====================================================================
+
+A kernel is a symbolic function application (such as sin(x+ y)) 
+or a symbol (such as x).  More precisely, a non-symbol
+kernel over a set S is an operator applied to a given list of
+arguments from S.  The operator has type BasicOperator
+and the kernel object is usually part of an Expression object.
+
+Kernels are created implicitly for you when you create expressions.
+
+  x :: Expression Integer
+    x
+                         Type: Expression Integer
+
+You can directly create a "symbol" kernel by using the kernel operation.
+
+  kernel x
+    x
+                         Type: Kernel Expression Integer
+
+This expression has two different kernels.
+
+  sin(x) + cos(x)
+    sin(x) + cos(x)
+                         Type: Expression Integer
+
+The operator kernels returns a list of the kernels in an object of
+type Expression.
+
+  kernels %
+    [sin(x),cos(x)]
+                         Type: List Kernel Expression Integer
+
+This expression also has two different kernels.
+
+  sin(x)**2 + sin(x) + cos(x)
+          2
+    sin(x)  + sin(x) + cos(x)
+                         Type: Expression Integer
+
+The sin(x) kernel is used twice.
+
+  kernels %
+    [sin(x),cos(x)]
+                         Type: List Kernel Expression Integer
+
+An expression need not contain any kernels.
+
+  kernels(1 :: Expression Integer)
+    []
+                         Type: List Kernel Expression Integer
+
+If one or more kernels are present, one of them is designated the main
+kernel.
+
+  mainKernel(cos(x) + tan(x))
+    tan(x)
+                         Type: Union(Kernel Expression Integer,...)
+
+Kernels can be nested. Use height  to determine the nesting depth.
+
+  height kernel x
+    1
+                         Type: PositiveInteger
+
+This has height 2 because the x has height 1 and then we apply an
+operator to that.
+
+  height mainKernel(sin x)
+    2
+                         Type: PositiveInteger
+
+  height mainKernel(sin cos x)
+    3
+                         Type: PositiveInteger
+
+  height mainKernel(sin cos (tan x + sin x))
+    4
+                         Type: PositiveInteger
+
+Use the operator operation to extract the operator component of the
+kernel.  The operator has type BasicOperator.
+
+  operator mainKernel(sin cos (tan x + sin x))
+    sin
+                         Type: BasicOperator
+
+Use the name operation to extract the name of the operator component
+of the kernel.  The name has type Symbol.  This is really just a
+shortcut for a two-step process of extracting the operator and then
+calling name on the operator.
+
+  name mainKernel(sin cos (tan x + sin x))
+    sin
+                         Type: Symbol
+
+Axiom knows about functions such as sin, cos and so on and can make
+kernels and then expressions using them.  To create a kernel and
+expression using an arbitrary operator, use operator.
+
+Now f can be used to create symbolic function applications.
+
+  f := operator 'f 
+    f
+                        Type: BasicOperator
+
+  e := f(x, y, 10) 
+    f(x,y,10)
+                        Type: Expression Integer
+
+Use the is? operation to learn if the operator component of a kernel
+is equal to a given operator.
+
+  is?(e, f) 
+    true
+                        Type: Boolean
+
+You can also use a symbol or a string as the second argument to is?.
+
+  is?(e, 'f)
+    true
+                        Type: Boolean
+
+Use the argument operation to get a list containing the argument
+component of a kernel.
+
+  argument mainKernel e
+    [x,y,10]
+                        Type: List Expression Integer
+
+Conceptually, an object of type Expression can be thought of a
+quotient of multivariate polynomials, where the "variables" are
+kernels.  The arguments of the kernels are again expressions and so
+the structure recurses.  See Expression for examples of using kernels
+to take apart expression objects.
+
+See Also:
+o )help Expression
+o )help BasicOperator
+o )show Kernel
+o $AXIOM/doc/src/algebra/kl.spad.dvi
+
+@
 <<domain KERNEL Kernel>>=
 )abbrev domain KERNEL Kernel
 ++ Operators applied to elements of a set
diff --git a/src/algebra/lindep.spad.pamphlet b/src/algebra/lindep.spad.pamphlet
index fb52df5..f5cd057 100644
--- a/src/algebra/lindep.spad.pamphlet
+++ b/src/algebra/lindep.spad.pamphlet
@@ -84,6 +84,169 @@ LinearDependence(S, R): Exports == Implementation where
 
 @
 \section{package ZLINDEP IntegerLinearDependence}
+<<IntegerLinearDependence.input>>=
+-- lindep.spad.pamphlet IntegerLinearDependence.input
+)spool IntegerLinearDependence.output
+)set message test on
+)set message auto off
+)clear all
+--S 1
+M := SQMATRIX(2,INT)
+--R 
+--R
+--R   (1)  SquareMatrix(2,Integer)
+--R                                                                 Type: Domain
+--E 1
+
+--S 2
+m1: M := squareMatrix matrix [ [1, 2], [0, -1] ]
+--R 
+--R
+--R        +1   2 +
+--R   (2)  |      |
+--R        +0  - 1+
+--R                                                Type: SquareMatrix(2,Integer)
+--E 2
+
+--S 3
+m2: M := squareMatrix matrix [ [2, 3], [1, -2] ]
+--R 
+--R
+--R        +2   3 +
+--R   (3)  |      |
+--R        +1  - 2+
+--R                                                Type: SquareMatrix(2,Integer)
+--E 3
+
+--S 4
+m3: M := squareMatrix matrix [ [3, 4], [2, -3] ]
+--R 
+--R
+--R        +3   4 +
+--R   (4)  |      |
+--R        +2  - 3+
+--R                                                Type: SquareMatrix(2,Integer)
+--E 4
+
+--S 5
+linearlyDependentOverZ? vector [m1, m2, m3]
+--R 
+--R
+--R   (5)  true
+--R                                                                Type: Boolean
+--E 5
+
+--S 6
+c := linearDependenceOverZ vector [m1, m2, m3]
+--R 
+--R
+--R   (6)  [1,- 2,1]
+--R                                              Type: Union(Vector Integer,...)
+--E 6
+
+--S 7
+c.1 * m1 + c.2 * m2 + c.3 * m3
+--R 
+--R
+--R        +0  0+
+--R   (7)  |    |
+--R        +0  0+
+--R                                                Type: SquareMatrix(2,Integer)
+--E 7
+
+--S 8
+solveLinearlyOverQ(vector [m1, m3], m2)
+--R 
+--R
+--R         1 1
+--R   (8)  [-,-]
+--R         2 2
+--R                                     Type: Union(Vector Fraction Integer,...)
+--E 8
+)spool
+ 
+)spool
+)lisp (bye)
+@
+<<IntegerLinearDependence.help>>=
+====================================================================
+IntegerLinearDependence examples
+====================================================================
+
+The elements v1,...,vN of a module M over a ring R are said to be 
+linearly dependent over R if there exist c1,...,cN in R, not all 0, 
+such that c1 v1 + ...  cN vNn = 0.  If such ci's exist, they form 
+what is called a linear dependence relation over R for the vi's.
+
+The package IntegerLinearDependence provides functions for testing
+whether some elements of a module over the integers are linearly
+dependent over the integers, and to find the linear dependence
+relations, if any.
+
+Consider the domain of two by two square matrices with integer entries.
+
+  M := SQMATRIX(2,INT)
+    SquareMatrix(2,Integer)
+                      Type: Domain
+
+Now create three such matrices.
+
+  m1: M := squareMatrix matrix [ [1, 2], [0, -1] ]
+     +1   2 +
+     |      |
+     +0  - 1+
+                      Type: SquareMatrix(2,Integer)
+
+  m2: M := squareMatrix matrix [ [2, 3], [1, -2] ]
+    +2   3 +
+    |      |
+    +1  - 2+
+                      Type: SquareMatrix(2,Integer)
+
+  m3: M := squareMatrix matrix [ [3, 4], [2, -3] ]
+    +3   4 +
+    |      |
+    +2  - 3+
+                      Type: SquareMatrix(2,Integer)
+
+This tells you whether m1, m2 and m3 are linearly dependent over the integers.
+
+  linearlyDependentOverZ? vector [m1, m2, m3]
+    true
+                      Type: Boolean
+
+Since they are linearly dependent, you can ask for the dependence relation.
+
+  c := linearDependenceOverZ vector [m1, m2, m3]
+    [1,- 2,1]
+                      Type: Union(Vector Integer,...)
+
+This means that the following linear combination should be 0.
+
+  c.1 * m1 + c.2 * m2 + c.3 * m3
+    +0  0+
+    |    |
+    +0  0+
+                      Type: SquareMatrix(2,Integer)
+
+When a given set of elements are linearly dependent over R, this also 
+means that at least one of them can be rewritten as a linear combination 
+of the others with coefficients in the quotient field of R.
+
+To express a given element in terms of other elements, use the operation
+solveLinearlyOverQ.
+
+  solveLinearlyOverQ(vector [m1, m3], m2)
+     1 1
+    [-,-]
+     2 2
+                      Type: Union(Vector Fraction Integer,...)
+
+See Also:
+o )show IntegerLinearDependence
+o $AXIOM/doc/src/algebra/lindep.spad.dvi
+
+@
 <<package ZLINDEP IntegerLinearDependence>>=
 )abbrev package ZLINDEP IntegerLinearDependence
 ++ Test for linear dependence over the integers
diff --git a/src/algebra/lodo.spad.pamphlet b/src/algebra/lodo.spad.pamphlet
index c25901e..99f2ad8 100644
--- a/src/algebra/lodo.spad.pamphlet
+++ b/src/algebra/lodo.spad.pamphlet
@@ -172,6 +172,512 @@ LinearOrdinaryDifferentialOperatorsOps(A, L): Exports == Implementation where
 
 @
 \section{domain LODO LinearOrdinaryDifferentialOperator}
+<<LinearOrdinaryDifferentialOperator.input>>=
+-- lodo.spad.pamphlet LinearOrdinaryDifferentialOperator.input
+)spool LinearOrdinaryDifferentialOperator.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 16
+Dx: LODO(EXPR INT, f +-> D(f, x))
+--R 
+--R                                                                   Type: Void
+--E 1
+
+--S 2 of 16
+Dx := D()
+--R 
+--R
+--R   (2)  D
+--IType: LinearOrdinaryDifferentialOperator(Expression Integer,theMap LAMBDA-CLOSURE(NIL,NIL,NIL,G1404 envArg,SPADCALL(G1404,QUOTE x,ELT(*1;anonymousFunction;0;frame0;internal;MV,0))))
+--E 2
+
+--S 3 of 16
+Dop:= Dx^3 + G/x^2*Dx + H/x^3 - 1
+--R 
+--R
+--R                       3
+--R         3    G     - x  + H
+--R   (3)  D  + -- D + --------
+--R              2         3
+--R             x         x
+--IType: LinearOrdinaryDifferentialOperator(Expression Integer,theMap LAMBDA-CLOSURE(NIL,NIL,NIL,G1404 envArg,SPADCALL(G1404,QUOTE x,ELT(*1;anonymousFunction;0;frame0;internal;MV,0))))
+--E 3
+
+--S 4 of 16
+n == 3
+--R 
+--R                                                                   Type: Void
+--E 4
+
+--S 5 of 16
+phi == reduce(+,[subscript(s,[i])*exp(x)/x^i for i in 0..n])
+--R 
+--R                                                                   Type: Void
+--E 5
+
+--S 6 of 16
+phi1 ==  Dop(phi) / exp x
+--R 
+--R                                                                   Type: Void
+--E 6
+
+--S 7 of 16
+phi2 == phi1 *x**(n+3)
+--R 
+--R                                                                   Type: Void
+--E 7
+
+--S 8 of 16
+phi3 == retract(phi2)@(POLY INT)
+--R 
+--R                                                                   Type: Void
+--E 8
+
+--S 9 of 16
+pans == phi3 ::UP(x,POLY INT)
+--R 
+--R                                                                   Type: Void
+--E 9
+
+--S 10 of 16
+pans1 == [coefficient(pans, (n+3-i) :: NNI) for i in 2..n+1]
+--R 
+--R                                                                   Type: Void
+--E 10
+
+--S 11 of 16
+leq == solve(pans1,[subscript(s,[i]) for i in 1..n])
+--R 
+--R                                                                   Type: Void
+--E 11
+
+--S 12 of 16
+leq
+--R 
+--R   Compiling body of rule n to compute value of type PositiveInteger 
+--R   Compiling body of rule phi to compute value of type Expression 
+--R      Integer 
+--R   Compiling body of rule phi1 to compute value of type Expression 
+--R      Integer 
+--R   Compiling body of rule phi2 to compute value of type Expression 
+--R      Integer 
+--R   Compiling body of rule phi3 to compute value of type Polynomial 
+--R      Integer 
+--R   Compiling body of rule pans to compute value of type 
+--R      UnivariatePolynomial(x,Polynomial Integer) 
+--R   Compiling body of rule pans1 to compute value of type List 
+--R      Polynomial Integer 
+--R   Compiling body of rule leq to compute value of type List List 
+--R      Equation Fraction Polynomial Integer 
+--R   Compiling function G3349 with type Integer -> Boolean 
+--R
+--R   (12)
+--R                           2                                3        2
+--R         s G     3s H + s G  + 6s G     (9s G + 54s )H + s G  + 18s G  + 72s G
+--R          0        0     0       0         0       0      0        0        0
+--R   [[s = ---,s = ------------------,s = --------------------------------------]]
+--R      1   3   2          18          3                    162
+--R                         Type: List List Equation Fraction Polynomial Integer
+--E 12
+
+--S 13 of 16
+n==4
+--R 
+--R   Compiled code for n has been cleared.
+--R   Compiled code for leq has been cleared.
+--R   Compiled code for pans1 has been cleared.
+--R   Compiled code for phi2 has been cleared.
+--R   Compiled code for phi has been cleared.
+--R   Compiled code for phi3 has been cleared.
+--R   Compiled code for phi1 has been cleared.
+--R   Compiled code for pans has been cleared.
+--R   1 old definition(s) deleted for function or rule n 
+--R                                                                   Type: Void
+--E 13
+
+--S 14 of 16
+leq
+--R 
+--R   Compiling body of rule n to compute value of type PositiveInteger 
+--R   Compiling body of rule phi to compute value of type Expression 
+--R      Integer 
+--R   Compiling body of rule phi1 to compute value of type Expression 
+--R      Integer 
+--R   Compiling body of rule phi2 to compute value of type Expression 
+--R      Integer 
+--R   Compiling body of rule phi3 to compute value of type Polynomial 
+--R      Integer 
+--R   Compiling body of rule pans to compute value of type 
+--R      UnivariatePolynomial(x,Polynomial Integer) 
+--R   Compiling body of rule pans1 to compute value of type List 
+--R      Polynomial Integer 
+--R   Compiling body of rule leq to compute value of type List List 
+--R      Equation Fraction Polynomial Integer 
+--R
+--R   (14)
+--R   [
+--R                             2
+--R          s G      3s H + s G  + 6s G
+--R           0         0     0       0
+--R     [s = ---, s = ------------------,
+--R       1   3    2          18
+--R                              3        2
+--R          (9s G + 54s )H + s G  + 18s G  + 72s G
+--R             0       0      0        0        0
+--R      s = --------------------------------------,
+--R       3                    162
+--R
+--R       s  =
+--R        4
+--R                  2         2                          4        3         2
+--R             27s H  + (18s G  + 378s G + 1296s )H + s G  + 36s G  + 396s G
+--R                0         0         0         0      0        0         0
+--R           + 
+--R             1296s G
+--R                  0
+--R        /
+--R           1944
+--R       ]
+--R     ]
+--R                         Type: List List Equation Fraction Polynomial Integer
+--E 14
+
+--S 15 of 16
+n==7
+--R 
+--R   Compiled code for n has been cleared.
+--R   Compiled code for leq has been cleared.
+--R   Compiled code for pans1 has been cleared.
+--R   Compiled code for phi2 has been cleared.
+--R   Compiled code for phi has been cleared.
+--R   Compiled code for phi3 has been cleared.
+--R   Compiled code for phi1 has been cleared.
+--R   Compiled code for pans has been cleared.
+--R   1 old definition(s) deleted for function or rule n 
+--R                                                                   Type: Void
+--E 15
+
+--S 16 of 16
+leq
+--R 
+--R   Compiling body of rule n to compute value of type PositiveInteger 
+--R   Compiling body of rule phi to compute value of type Expression 
+--R      Integer 
+--R   Compiling body of rule phi1 to compute value of type Expression 
+--R      Integer 
+--R   Compiling body of rule phi2 to compute value of type Expression 
+--R      Integer 
+--R   Compiling body of rule phi3 to compute value of type Polynomial 
+--R      Integer 
+--R   Compiling body of rule pans to compute value of type 
+--R      UnivariatePolynomial(x,Polynomial Integer) 
+--R   Compiling body of rule pans1 to compute value of type List 
+--R      Polynomial Integer 
+--R   Compiling body of rule leq to compute value of type List List 
+--R      Equation Fraction Polynomial Integer 
+--R
+--R   (16)
+--R   [
+--R                             2
+--R          s G      3s H + s G  + 6s G
+--R           0         0     0       0
+--R     [s = ---, s = ------------------,
+--R       1   3    2          18
+--R                              3        2
+--R          (9s G + 54s )H + s G  + 18s G  + 72s G
+--R             0       0      0        0        0
+--R      s = --------------------------------------,
+--R       3                    162
+--R
+--R       s  =
+--R        4
+--R                  2         2                          4        3         2
+--R             27s H  + (18s G  + 378s G + 1296s )H + s G  + 36s G  + 396s G
+--R                0         0         0         0      0        0         0
+--R           + 
+--R             1296s G
+--R                  0
+--R        /
+--R           1944
+--R       ,
+--R
+--R       s  =
+--R        5
+--R                               2         3          2
+--R             (135s G + 2268s )H  + (30s G  + 1350s G  + 16416s G + 38880s )H
+--R                  0         0          0          0           0          0
+--R           + 
+--R                5        4          3          2
+--R             s G  + 60s G  + 1188s G  + 9504s G  + 25920s G
+--R              0        0          0          0           0
+--R        /
+--R           29160
+--R       ,
+--R
+--R       s  =
+--R        6
+--R                   3          2                        2
+--R             405s H  + (405s G  + 18468s G + 174960s )H
+--R                 0          0           0           0
+--R           + 
+--R                   4          3           2                                6
+--R             (45s G  + 3510s G  + 88776s G  + 777600s G + 1166400s )H + s G
+--R                 0          0           0            0            0      0
+--R           + 
+--R                  5          4           3           2
+--R             90s G  + 2628s G  + 27864s G  + 90720s G
+--R                0          0           0           0
+--R        /
+--R           524880
+--R       ,
+--R
+--R       s  =
+--R        7
+--R                                 3
+--R             (2835s G + 91854s )H
+--R                   0          0
+--R           + 
+--R                    3           2                            2
+--R             (945s G  + 81648s G  + 2082996s G + 14171760s )H
+--R                  0           0             0             0
+--R           + 
+--R                   5          4            3             2
+--R             (63s G  + 7560s G  + 317520s G  + 5554008s G  + 34058880s G)H
+--R                 0          0            0             0              0
+--R           + 
+--R                7         6          5           4             3              2
+--R             s G  + 126s G  + 4788s G  + 25272s G  - 1744416s G  - 26827200s G
+--R              0         0          0           0             0              0
+--R           + 
+--R             - 97977600s G
+--R                        0
+--R        /
+--R           11022480
+--R       ]
+--R     ]
+--R                         Type: List List Equation Fraction Polynomial Integer
+--E 16
+)spool
+ 
+Dx: LODO(EXPR INT, f +-> D(f, x))
+Dx := D()
+Dop:= Dx^3 + G/x^2*Dx + H/x^3 - 1
+n == 3
+phi == reduce(+,[subscript(s,[i])*exp(x)/x^i for i in 0..n])
+phi1 ==  Dop(phi) / exp x
+phi2 == phi1 *x**(n+3)
+phi3 == retract(phi2)@(POLY INT)
+pans == phi3 ::UP(x,POLY INT)
+pans1 == [coefficient(pans, (n+3-i) :: NNI) for i in 2..n+1]
+leq == solve(pans1,[subscript(s,[i]) for i in 1..n])
+leq
+n==4
+leq
+n==7
+leq
+)spool
+)lisp (bye)
+@
+<<LinearOrdinaryDifferentialOperator.help>>=
+====================================================================
+LinearOrdinaryDifferentialOperator examples
+====================================================================
+
+LinearOrdinaryDifferentialOperator(A, diff) is the domain of linear
+ordinary differential operators with coefficients in a ring A with a
+given derivation.
+
+====================================================================
+Differential Operators with Series Coefficients
+====================================================================
+
+Problem:
+  Find the first few coefficients of exp(x)/x^i of Dop phi where
+
+    Dop := D^3 + G/x^2 * D + H/x^3 - 1
+    phi := sum(s[i]*exp(x)/x^i, i = 0..)
+
+Solution:
+
+Define the differential.
+
+  Dx: LODO(EXPR INT, f +-> D(f, x))
+                         Type: Void
+
+  Dx := D()
+   D
+     Type: LinearOrdinaryDifferentialOperator(Expression Integer,
+      theMap LAMBDA-CLOSURE(NIL,NIL,NIL,G1404 envArg,
+              SPADCALL(G1404,QUOTE x,
+               ELT(*1;anonymousFunction;0;frame0;internal;MV,0))))
+
+Now define the differential operator Dop.
+
+  Dop:= Dx^3 + G/x^2*Dx + H/x^3 - 1
+                       3
+     3    G     - x  + H
+    D  + -- D + --------
+          2         3
+         x         x
+     Type: LinearOrdinaryDifferentialOperator(Expression Integer,
+      theMap LAMBDA-CLOSURE(NIL,NIL,NIL,G1404 envArg,
+              SPADCALL(G1404,QUOTE x,
+               ELT(*1;anonymousFunction;0;frame0;internal;MV,0))))
+
+  n == 3
+                          Type: Void
+
+  phi == reduce(+,[subscript(s,[i])*exp(x)/x^i for i in 0..n])
+                          Type: Void
+
+  phi1 ==  Dop(phi) / exp x
+                          Type: Void
+
+  phi2 == phi1 *x**(n+3)
+                          Type: Void
+
+  phi3 == retract(phi2)@(POLY INT)
+                          Type: Void
+
+  pans == phi3 ::UP(x,POLY INT)
+                          Type: Void
+
+  pans1 == [coefficient(pans, (n+3-i) :: NNI) for i in 2..n+1]
+                          Type: Void
+
+  leq == solve(pans1,[subscript(s,[i]) for i in 1..n])
+                          Type: Void
+
+Evaluate this for several values of n.
+
+  leq
+                          2                                3        2
+        s G     3s H + s G  + 6s G     (9s G + 54s )H + s G  + 18s G  + 72s G
+         0        0     0       0         0       0      0        0        0
+  [[s = ---,s = ------------------,s = --------------------------------------]]
+     1   3   2          18          3                    162
+                         Type: List List Equation Fraction Polynomial Integer
+
+  n==4
+                          Type: Void
+
+  leq
+   [
+                             2
+          s G      3s H + s G  + 6s G
+           0         0     0       0
+     [s = ---, s = ------------------,
+       1   3    2          18
+                              3        2
+          (9s G + 54s )H + s G  + 18s G  + 72s G
+             0       0      0        0        0
+      s = --------------------------------------,
+       3                    162
+
+       s  =
+        4
+                  2         2                          4        3         2
+             27s H  + (18s G  + 378s G + 1296s )H + s G  + 36s G  + 396s G
+                0         0         0         0      0        0         0
+           + 
+             1296s G
+                  0
+        /
+           1944
+       ]
+     ]
+                         Type: List List Equation Fraction Polynomial Integer
+
+  n==7
+                          Type: Void
+
+  leq
+   [
+                             2
+          s G      3s H + s G  + 6s G
+           0         0     0       0
+     [s = ---, s = ------------------,
+       1   3    2          18
+                              3        2
+          (9s G + 54s )H + s G  + 18s G  + 72s G
+             0       0      0        0        0
+      s = --------------------------------------,
+       3                    162
+
+       s  =
+        4
+                  2         2                          4        3         2
+             27s H  + (18s G  + 378s G + 1296s )H + s G  + 36s G  + 396s G
+                0         0         0         0      0        0         0
+           + 
+             1296s G
+                  0
+        /
+           1944
+       ,
+
+       s  =
+        5
+                               2         3          2
+             (135s G + 2268s )H  + (30s G  + 1350s G  + 16416s G + 38880s )H
+                  0         0          0          0           0          0
+           + 
+                5        4          3          2
+             s G  + 60s G  + 1188s G  + 9504s G  + 25920s G
+              0        0          0          0           0
+        /
+           29160
+       ,
+
+       s  =
+        6
+                   3          2                        2
+             405s H  + (405s G  + 18468s G + 174960s )H
+                 0          0           0           0
+           + 
+                   4          3           2                                6
+             (45s G  + 3510s G  + 88776s G  + 777600s G + 1166400s )H + s G
+                 0          0           0            0            0      0
+           + 
+                  5          4           3           2
+             90s G  + 2628s G  + 27864s G  + 90720s G
+                0          0           0           0
+        /
+           524880
+       ,
+
+       s  =
+        7
+                                 3
+             (2835s G + 91854s )H
+                   0          0
+           + 
+                    3           2                            2
+             (945s G  + 81648s G  + 2082996s G + 14171760s )H
+                  0           0             0             0
+           + 
+                   5          4            3             2
+             (63s G  + 7560s G  + 317520s G  + 5554008s G  + 34058880s G)H
+                 0          0            0             0              0
+           + 
+                7         6          5           4             3              2
+             s G  + 126s G  + 4788s G  + 25272s G  - 1744416s G  - 26827200s G
+              0         0          0           0             0              0
+           + 
+             - 97977600s G
+                        0
+        /
+           11022480
+       ]
+     ]
+                         Type: List List Equation Fraction Polynomial Integer
+
+See Also:
+o )show LinearOrdinaryDifferentialOperator
+o $AXIOM/doc/src/algebra/lodo.spad.dvi
+
+@
 <<domain LODO LinearOrdinaryDifferentialOperator>>=
 )abbrev domain LODO LinearOrdinaryDifferentialOperator
 ++ Author: Manuel Bronstein
@@ -203,6 +709,398 @@ LinearOrdinaryDifferentialOperator(A:Ring, diff: A -> A):
 
 @
 \section{domain LODO1 LinearOrdinaryDifferentialOperator1}
+<<LinearOrdinaryDifferentialOperator1.input>>=
+-- lodo.spad.pamphlet LinearOrdinaryDifferentialOperator1.input
+)spool LinearOrdinaryDifferentialOperator1.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 20
+RFZ := Fraction UnivariatePolynomial('x, Integer)
+--R 
+--R
+--R   (1)  Fraction UnivariatePolynomial(x,Integer)
+--R                                                                 Type: Domain
+--E 1
+
+--S 2 of 20
+x : RFZ := 'x
+--R 
+--R
+--R   (2)  x
+--R                               Type: Fraction UnivariatePolynomial(x,Integer)
+--E 2
+
+--S 3 of 20
+Dx : LODO1 RFZ := D()
+--R 
+--R
+--R   (3)  D
+--RType: LinearOrdinaryDifferentialOperator1 Fraction UnivariatePolynomial(x,Integer)
+--E 3
+
+--S 4 of 20
+b : LODO1 RFZ := 3*x**2*Dx**2 + 2*Dx + 1/x
+--R 
+--R
+--R          2 2        1
+--R   (4)  3x D  + 2D + -
+--R                     x
+--RType: LinearOrdinaryDifferentialOperator1 Fraction UnivariatePolynomial(x,Integer)
+--E 4
+
+--S 5 of 20
+a : LODO1 RFZ := b*(5*x*Dx + 7)
+--R 
+--R
+--R           3 3       2        2         7
+--R   (5)  15x D  + (51x  + 10x)D  + 29D + -
+--R                                        x
+--RType: LinearOrdinaryDifferentialOperator1 Fraction UnivariatePolynomial(x,Integer)
+--E 5
+
+--S 6 of 20
+p := x**2 + 1/x**2
+--R 
+--R
+--R         4
+--R        x  + 1
+--R   (6)  ------
+--R           2
+--R          x
+--R                               Type: Fraction UnivariatePolynomial(x,Integer)
+--E 6
+
+--S 7 of 20
+(a*b - b*a) p
+--R 
+--R
+--R             4
+--R        - 75x  + 540x - 75
+--R   (7)  ------------------
+--R                 4
+--R                x
+--R                               Type: Fraction UnivariatePolynomial(x,Integer)
+--E 7
+
+--S 8 of 20
+ld := leftDivide(a,b)
+--R 
+--R
+--R   (8)  [quotient= 5x D + 7,remainder= 0]
+--RType: Record(quotient: LinearOrdinaryDifferentialOperator1 Fraction UnivariatePolynomial(x,Integer),remainder: LinearOrdinaryDifferentialOperator1 Fraction UnivariatePolynomial(x,Integer))
+--E 8
+
+--S 9 of 20
+a = b * ld.quotient + ld.remainder
+--R 
+--R
+--R           3 3       2        2         7     3 3       2        2         7
+--R   (9)  15x D  + (51x  + 10x)D  + 29D + -= 15x D  + (51x  + 10x)D  + 29D + -
+--R                                        x                                  x
+--RType: Equation LinearOrdinaryDifferentialOperator1 Fraction UnivariatePolynomial(x,Integer)
+--E 9
+
+--S 10 of 20
+rd := rightDivide(a,b)
+--R 
+--R
+--R                                              5
+--R   (10)  [quotient= 5x D + 7,remainder= 10D + -]
+--R                                              x
+--RType: Record(quotient: LinearOrdinaryDifferentialOperator1 Fraction UnivariatePolynomial(x,Integer),remainder: LinearOrdinaryDifferentialOperator1 Fraction UnivariatePolynomial(x,Integer))
+--E 10
+
+--S 11 of 20
+a = rd.quotient * b + rd.remainder
+--R 
+--R
+--R            3 3       2        2         7     3 3       2        2         7
+--R   (11)  15x D  + (51x  + 10x)D  + 29D + -= 15x D  + (51x  + 10x)D  + 29D + -
+--R                                         x                                  x
+--RType: Equation LinearOrdinaryDifferentialOperator1 Fraction UnivariatePolynomial(x,Integer)
+--E 11
+
+--S 12 of 20
+rightQuotient(a,b)
+--R 
+--R
+--R   (12)  5x D + 7
+--RType: LinearOrdinaryDifferentialOperator1 Fraction UnivariatePolynomial(x,Integer)
+--E 12
+
+--S 13 of 20
+rightRemainder(a,b)
+--R 
+--R
+--R               5
+--R   (13)  10D + -
+--R               x
+--RType: LinearOrdinaryDifferentialOperator1 Fraction UnivariatePolynomial(x,Integer)
+--E 13
+
+--S 14 of 20
+leftExactQuotient(a,b)
+--R 
+--R
+--R   (14)  5x D + 7
+--RType: Union(LinearOrdinaryDifferentialOperator1 Fraction UnivariatePolynomial(x,Integer),...)
+--E 14
+
+--S 15 of 20
+e := leftGcd(a,b)
+--R 
+--R
+--R           2 2        1
+--R   (15)  3x D  + 2D + -
+--R                      x
+--RType: LinearOrdinaryDifferentialOperator1 Fraction UnivariatePolynomial(x,Integer)
+--E 15
+
+--S 16 of 20
+leftRemainder(a, e)
+--R 
+--R
+--R   (16)  0
+--RType: LinearOrdinaryDifferentialOperator1 Fraction UnivariatePolynomial(x,Integer)
+--E 16
+
+--S 17 of 20
+rightRemainder(a, e)
+--R 
+--R
+--R               5
+--R   (17)  10D + -
+--R               x
+--RType: LinearOrdinaryDifferentialOperator1 Fraction UnivariatePolynomial(x,Integer)
+--E 17
+
+--S 18 of 20
+f := rightLcm(a,b)
+--R 
+--R
+--R            3 3       2        2         7
+--R   (18)  15x D  + (51x  + 10x)D  + 29D + -
+--R                                         x
+--RType: LinearOrdinaryDifferentialOperator1 Fraction UnivariatePolynomial(x,Integer)
+--E 18
+
+--S 19 of 20
+rightRemainder(f, b)
+--R 
+--R
+--R               5
+--R   (19)  10D + -
+--R               x
+--RType: LinearOrdinaryDifferentialOperator1 Fraction UnivariatePolynomial(x,Integer)
+--E 19
+
+--S 20 of 20
+leftRemainder(f, b)
+--R 
+--R
+--R   (20)  0
+--RType: LinearOrdinaryDifferentialOperator1 Fraction UnivariatePolynomial(x,Integer)
+--E 20
+)spool
+)lisp (bye)
+@
+
+<<LinearOrdinaryDifferentialOperator1.help>>=
+====================================================================
+LinearOrdinaryDifferentialOperator1 example
+====================================================================
+
+LinearOrdinaryDifferentialOperator1(A) is the domain of linear
+ordinary differential operators with coefficients in the differential
+ring A.
+
+====================================================================
+Differential Operators with Rational Function Coefficients
+====================================================================
+
+This example shows differential operators with rational function
+coefficients.  In this case operator multiplication is non-commutative and,
+since the coefficients form a field, an operator division algorithm exists.
+
+We begin by defining RFZ to be the rational functions in x with
+integer coefficients and Dx to be the differential operator for d/dx.
+
+  RFZ := Fraction UnivariatePolynomial('x, Integer)
+    Fraction UnivariatePolynomial(x,Integer)
+                         Type: Domain
+
+  x : RFZ := 'x
+    x
+                         Type: Fraction UnivariatePolynomial(x,Integer)
+
+  Dx : LODO1 RFZ := D()
+    D
+                         Type: LinearOrdinaryDifferentialOperator1 
+                                 Fraction UnivariatePolynomial(x,Integer)
+
+Operators are created using the usual arithmetic operations.
+
+  b : LODO1 RFZ := 3*x**2*Dx**2 + 2*Dx + 1/x
+      2 2        1
+    3x D  + 2D + -
+                 x
+                         Type: LinearOrdinaryDifferentialOperator1 
+                                Fraction UnivariatePolynomial(x,Integer)
+
+  a : LODO1 RFZ := b*(5*x*Dx + 7)
+       3 3       2        2         7
+    15x D  + (51x  + 10x)D  + 29D + -
+                                    x
+                        Type: LinearOrdinaryDifferentialOperator1 
+                                Fraction UnivariatePolynomial(x,Integer)
+
+Operator multiplication corresponds to functional composition.
+
+  p := x**2 + 1/x**2
+     4
+    x  + 1
+    ------
+       2
+      x
+                        Type: Fraction UnivariatePolynomial(x,Integer)
+
+Since operator coefficients depend on x, the multiplication is not
+commutative.
+
+  (a*b - b*a) p
+         4
+    - 75x  + 540x - 75
+    ------------------
+             4
+            x
+                        Type: Fraction UnivariatePolynomial(x,Integer)
+
+When the coefficients of operator polynomials come from a field, as in
+this case, it is possible to define operator division.  Division on
+the left and division on the right yield different results when the
+multiplication is non-commutative.
+
+The results of leftDivide and rightDivide are quotient-remainder pairs
+satisfying:
+
+  leftDivide(a,b) = [q, r] such that  a = b*q + r
+  rightDivide(a,b) = [q, r] such that a = q*b + r
+
+In both cases, the degree of the remainder, r, is less than the degree
+of b.
+
+  ld := leftDivide(a,b)
+    [quotient= 5x D + 7,remainder= 0]
+      Type: Record(quotient: LinearOrdinaryDifferentialOperator1 
+                               Fraction UnivariatePolynomial(x,Integer),
+                   remainder: LinearOrdinaryDifferentialOperator1 
+                               Fraction UnivariatePolynomial(x,Integer))
+
+  a = b * ld.quotient + ld.remainder
+       3 3       2        2         7     3 3       2        2         7
+    15x D  + (51x  + 10x)D  + 29D + -= 15x D  + (51x  + 10x)D  + 29D + -
+      Type: Equation LinearOrdinaryDifferentialOperator1 
+                       Fraction UnivariatePolynomial(x,Integer)
+
+The operations of left and right division are so-called because the
+quotient is obtained by dividing a on that side by b.
+
+  rd := rightDivide(a,b)
+    [quotient= 5x D + 7,remainder= 10D + -]
+      Type: Record(quotient: LinearOrdinaryDifferentialOperator1 
+                               Fraction UnivariatePolynomial(x,Integer),
+                   remainder: LinearOrdinaryDifferentialOperator1 
+                               Fraction UnivariatePolynomial(x,Integer))
+
+  a = rd.quotient * b + rd.remainder
+       3 3       2        2         7     3 3       2        2         7
+    15x D  + (51x  + 10x)D  + 29D + -= 15x D  + (51x  + 10x)D  + 29D + -
+     Type: Equation LinearOrdinaryDifferentialOperator1 
+                      Fraction UnivariatePolynomial(x,Integer)
+
+Operations rightQuotient and rightRemainder are available if only one
+of the quotient or remainder are of interest to you.  This is the
+quotient from right division.
+
+  rightQuotient(a,b)
+    5x D + 7
+     Type: LinearOrdinaryDifferentialOperator1 
+             Fraction UnivariatePolynomial(x,Integer)
+
+This is the remainder from right division.  The corresponding "left"
+functions, leftQuotient and leftRemainder are also available.
+
+  rightRemainder(a,b)
+          5
+    10D + -
+          x
+      Type: LinearOrdinaryDifferentialOperator1 
+              Fraction UnivariatePolynomial(x,Integer)
+
+For exact division, operations leftExactQuotient and rightExactQuotient 
+are supplied.  These return the quotient but only if the remainder is zero.  
+The call rightExactQuotient(a,b) would yield an error.
+
+  leftExactQuotient(a,b)
+    5x D + 7
+     Type: Union(LinearOrdinaryDifferentialOperator1 
+                   Fraction UnivariatePolynomial(x,Integer),...)
+
+The division operations allow the computation of left and right greatest
+common divisors, leftGcd and rightGcd via remainder sequences, and 
+consequently the computation of left and right least common multiples,
+rightLcm and leftLcm.
+
+  e := leftGcd(a,b)
+      2 2        1
+    3x D  + 2D + -
+                 x
+     Type: LinearOrdinaryDifferentialOperator1 
+             Fraction UnivariatePolynomial(x,Integer)
+
+Note that a greatest common divisor doesn't necessarily divide a and b
+on both sides.  Here the left greatest common divisor does not divide
+a on the right.
+
+  leftRemainder(a, e)
+    0
+      Type: LinearOrdinaryDifferentialOperator1 
+              Fraction UnivariatePolynomial(x,Integer)
+
+  rightRemainder(a, e)
+          5
+    10D + -
+          x
+      Type: LinearOrdinaryDifferentialOperator1 
+              Fraction UnivariatePolynomial(x,Integer)
+
+Similarly, a least common multiple is not necessarily divisible from
+both sides.
+
+  f := rightLcm(a,b)
+       3 3       2        2         7
+    15x D  + (51x  + 10x)D  + 29D + -
+      Type: LinearOrdinaryDifferentialOperator1 
+              Fraction UnivariatePolynomial(x,Integer)
+
+  rightRemainder(f, b)
+          5
+    10D + -
+          x
+      Type: LinearOrdinaryDifferentialOperator1 
+              Fraction UnivariatePolynomial(x,Integer)
+
+  leftRemainder(f, b)
+    0
+      Type: LinearOrdinaryDifferentialOperator1 
+              Fraction UnivariatePolynomial(x,Integer)
+
+See Also:
+o )show LinearOrdinaryDifferentialOperator1
+o $AXIOM/doc/src/algebra/lodo.spad.dvi
+
+@
 <<domain LODO1 LinearOrdinaryDifferentialOperator1>>=
 )abbrev domain LODO1 LinearOrdinaryDifferentialOperator1
 ++ Author: Manuel Bronstein
@@ -219,6 +1117,527 @@ LinearOrdinaryDifferentialOperator1(A:DifferentialRing) ==
 
 @
 \section{domain LODO2 LinearOrdinaryDifferentialOperator2}
+<<LinearOrdinaryDifferentialOperator2.input>>=
+-- lodo.spad.pamphlet LinearOrdinaryDifferentialOperator2.input
+)spool LinearOrdinaryDifferentialOperator2.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 26
+Q  := Fraction Integer
+--R 
+--R
+--R   (1)  Fraction Integer
+--R                                                                 Type: Domain
+--E 1
+
+--S 2 of 26
+PQ := UnivariatePolynomial('x, Q)
+--R 
+--R
+--R   (2)  UnivariatePolynomial(x,Fraction Integer)
+--R                                                                 Type: Domain
+--E 2
+
+--S 3 of 26
+x: PQ := 'x
+--R 
+--R
+--R   (3)  x
+--R                               Type: UnivariatePolynomial(x,Fraction Integer)
+--E 3
+
+--S 4 of 26
+Dx: LODO2(Q, PQ) := D()
+--R 
+--R
+--R   (4)  D
+--RType: LinearOrdinaryDifferentialOperator2(Fraction Integer,UnivariatePolynomial(x,Fraction Integer))
+--E 4
+
+--S 5 of 26
+a := Dx  + 1
+--R 
+--R
+--R   (5)  D + 1
+--RType: LinearOrdinaryDifferentialOperator2(Fraction Integer,UnivariatePolynomial(x,Fraction Integer))
+--E 5
+
+--S 6 of 26
+b := a + 1/2*Dx**2 - 1/2
+--R 
+--R
+--R        1  2       1
+--R   (6)  - D  + D + -
+--R        2          2
+--RType: LinearOrdinaryDifferentialOperator2(Fraction Integer,UnivariatePolynomial(x,Fraction Integer))
+--E 6
+
+--S 7 of 26
+p := 4*x**2 + 2/3
+--R 
+--R
+--R          2   2
+--R   (7)  4x  + -
+--R              3
+--R                               Type: UnivariatePolynomial(x,Fraction Integer)
+--E 7
+
+--S 8 of 26
+a p 
+--R 
+--R
+--R          2        2
+--R   (8)  4x  + 8x + -
+--R                   3
+--R                               Type: UnivariatePolynomial(x,Fraction Integer)
+--E 8
+
+--S 9 of 26
+(a * b) p = a b p
+--R 
+--R
+--R          2         37    2         37
+--R   (9)  2x  + 12x + --= 2x  + 12x + --
+--R                     3               3
+--R                      Type: Equation UnivariatePolynomial(x,Fraction Integer)
+--E 9
+
+--S 10 of 26
+c := (1/9)*b*(a + b)^2
+--R 
+--R
+--R          1  6    5  5   13  4   19  3   79  2    7     1
+--R   (10)  -- D  + -- D  + -- D  + -- D  + -- D  + -- D + -
+--R         72      36      24      18      72      12     8
+--RType: LinearOrdinaryDifferentialOperator2(Fraction Integer,UnivariatePolynomial(x,Fraction Integer))
+--E 10
+
+--S 11 of 26
+(a**2 - 3/4*b + c) (p + 1)
+--R 
+--R
+--R           2   44     541
+--R   (11)  3x  + -- x + ---
+--R                3      36
+--R                               Type: UnivariatePolynomial(x,Fraction Integer)
+--E 11
+)clear all
+--S 12 of 26
+PZ := UnivariatePolynomial(x,Integer)
+--R 
+--R
+--R   (1)  UnivariatePolynomial(x,Integer)
+--R                                                                 Type: Domain
+--E 12
+
+--S 13 of 26
+x:PZ := 'x
+--R 
+--R
+--R   (2)  x
+--R                                        Type: UnivariatePolynomial(x,Integer)
+--E 13
+
+--S 14 of 26
+Mat  := SquareMatrix(3,PZ)
+--R 
+--R
+--R   (3)  SquareMatrix(3,UnivariatePolynomial(x,Integer))
+--R                                                                 Type: Domain
+--E 14
+
+--S 15 of 26
+Vect := DPMM(3, PZ, Mat, PZ)
+--R 
+--R
+--R   (4)
+--R  DirectProductMatrixModule(3,UnivariatePolynomial(x,Integer),SquareMatrix(3,Un
+--R  ivariatePolynomial(x,Integer)),UnivariatePolynomial(x,Integer))
+--R                                                                 Type: Domain
+--E 15
+
+--S 16 of 26
+Modo := LODO2(Mat, Vect)
+--R 
+--R
+--R   (5)
+--R  LinearOrdinaryDifferentialOperator2(SquareMatrix(3,UnivariatePolynomial(x,Int
+--R  eger)),DirectProductMatrixModule(3,UnivariatePolynomial(x,Integer),SquareMatr
+--R  ix(3,UnivariatePolynomial(x,Integer)),UnivariatePolynomial(x,Integer)))
+--R                                                                 Type: Domain
+--E 16
+
+--S 17 of 26
+m:Mat := matrix [ [x^2,1,0],[1,x^4,0],[0,0,4*x^2] ]
+--R 
+--R
+--R        + 2         +
+--R        |x   1    0 |
+--R        |           |
+--R   (6)  |     4     |
+--R        |1   x    0 |
+--R        |           |
+--R        |          2|
+--R        +0   0   4x +
+--R                        Type: SquareMatrix(3,UnivariatePolynomial(x,Integer))
+--E 17
+
+--S 18 of 26
+p:Vect := directProduct [3*x^2+1,2*x,7*x^3+2*x]
+--R 
+--R
+--R           2          3
+--R   (7)  [3x  + 1,2x,7x  + 2x]
+--RType: DirectProductMatrixModule(3,UnivariatePolynomial(x,Integer),SquareMatrix(3,UnivariatePolynomial(x,Integer)),UnivariatePolynomial(x,Integer))
+--E 18
+
+--S 19 of 26
+q: Vect := m * p
+--R 
+--R
+--R           4    2        5     2        5     3
+--R   (8)  [3x  + x  + 2x,2x  + 3x  + 1,28x  + 8x ]
+--RType: DirectProductMatrixModule(3,UnivariatePolynomial(x,Integer),SquareMatrix(3,UnivariatePolynomial(x,Integer)),UnivariatePolynomial(x,Integer))
+--E 19
+
+--S 20 of 26
+Dx : Modo := D()
+--R 
+--R
+--R   (9)  D
+--RType: LinearOrdinaryDifferentialOperator2(SquareMatrix(3,UnivariatePolynomial(x,Integer)),DirectProductMatrixModule(3,UnivariatePolynomial(x,Integer),SquareMatrix(3,UnivariatePolynomial(x,Integer)),UnivariatePolynomial(x,Integer)))
+--E 20
+
+--S 21 of 26
+a : Modo := Dx  + m
+--R 
+--R
+--R             + 2         +
+--R             |x   1    0 |
+--R             |           |
+--R   (10)  D + |     4     |
+--R             |1   x    0 |
+--R             |           |
+--R             |          2|
+--R             +0   0   4x +
+--RType: LinearOrdinaryDifferentialOperator2(SquareMatrix(3,UnivariatePolynomial(x,Integer)),DirectProductMatrixModule(3,UnivariatePolynomial(x,Integer),SquareMatrix(3,UnivariatePolynomial(x,Integer)),UnivariatePolynomial(x,Integer)))
+--E 21
+
+--S 22 of 26
+b : Modo := m*Dx  + 1
+--R 
+--R
+--R         + 2         +
+--R         |x   1    0 |    +1  0  0+
+--R         |           |    |       |
+--R   (11)  |     4     |D + |0  1  0|
+--R         |1   x    0 |    |       |
+--R         |           |    +0  0  1+
+--R         |          2|
+--R         +0   0   4x +
+--RType: LinearOrdinaryDifferentialOperator2(SquareMatrix(3,UnivariatePolynomial(x,Integer)),DirectProductMatrixModule(3,UnivariatePolynomial(x,Integer),SquareMatrix(3,UnivariatePolynomial(x,Integer)),UnivariatePolynomial(x,Integer)))
+--E 22
+
+--S 23 of 26
+c := a*b
+--R 
+--R
+--R   (12)
+--R   + 2         +     + 4              4    2                  +    + 2         +
+--R   |x   1    0 |     |x  + 2x + 2    x  + x            0      |    |x   1    0 |
+--R   |           | 2   |                                        |    |           |
+--R   |     4     |D  + |   4    2     8     3                   |D + |     4     |
+--R   |1   x    0 |     |  x  + x     x  + 4x  + 2        0      |    |1   x    0 |
+--R   |           |     |                                        |    |           |
+--R   |          2|     |                              4         |    |          2|
+--R   +0   0   4x +     +     0            0        16x  + 8x + 1+    +0   0   4x +
+--RType: LinearOrdinaryDifferentialOperator2(SquareMatrix(3,UnivariatePolynomial(x,Integer)),DirectProductMatrixModule(3,UnivariatePolynomial(x,Integer),SquareMatrix(3,UnivariatePolynomial(x,Integer)),UnivariatePolynomial(x,Integer)))
+--E 23
+
+--S 24 of 26
+a p
+--R 
+--R
+--R            4    2        5     2        5     3      2
+--R   (13)  [3x  + x  + 8x,2x  + 3x  + 3,28x  + 8x  + 21x  + 2]
+--RType: DirectProductMatrixModule(3,UnivariatePolynomial(x,Integer),SquareMatrix(3,UnivariatePolynomial(x,Integer)),UnivariatePolynomial(x,Integer))
+--E 24
+
+--S 25 of 26
+b p
+--R 
+--R
+--R            3     2       4         4     3     2
+--R   (14)  [6x  + 3x  + 3,2x  + 8x,84x  + 7x  + 8x  + 2x]
+--RType: DirectProductMatrixModule(3,UnivariatePolynomial(x,Integer),SquareMatrix(3,UnivariatePolynomial(x,Integer)),UnivariatePolynomial(x,Integer))
+--E 25
+
+--S 26 of 26
+(a + b + c) (p + q)
+--R 
+--R
+--R   (15)
+--R       8      7      6      5      4      3      2
+--R   [10x  + 12x  + 16x  + 30x  + 85x  + 94x  + 40x  + 40x + 17,
+--R       12      9      8      7     6      5      4      3      2
+--R    10x   + 10x  + 12x  + 92x  + 6x  + 32x  + 72x  + 28x  + 49x  + 32x + 19,
+--R         8       7        6        5       4       3      2
+--R    2240x  + 224x  + 1280x  + 3508x  + 492x  + 751x  + 98x  + 18x + 4]
+--RType: DirectProductMatrixModule(3,UnivariatePolynomial(x,Integer),SquareMatrix(3,UnivariatePolynomial(x,Integer)),UnivariatePolynomial(x,Integer))
+--E 26
+)spool
+)lisp (bye)
+@
+<<LinearOrdinaryDifferentialOperator2.help>>=
+====================================================================
+LinearOrdinaryDifferentialOperator2
+====================================================================
+
+LinearOrdinaryDifferentialOperator2(A, M) is the domain of linear
+ordinary differential operators with coefficients in the differential
+ring A and operating on M, an A-module.  This includes the cases of
+operators which are polynomials in D acting upon scalar or vector
+expressions of a single variable.  The coefficients of the operator
+polynomials can be integers, rational functions, matrices or elements
+of other domains.
+
+====================================================================
+Differential Operators with Constant Coefficients
+====================================================================
+
+This example shows differential operators with rational number
+coefficients operating on univariate polynomials.
+
+We begin by making type assignments so we can conveniently refer
+to univariate polynomials in x over the rationals.
+
+  Q  := Fraction Integer
+    Fraction Integer
+                         Type: Domain
+
+  PQ := UnivariatePolynomial('x, Q)
+    UnivariatePolynomial(x,Fraction Integer)
+                         Type: Domain
+
+  x: PQ := 'x
+    x
+                         Type: UnivariatePolynomial(x,Fraction Integer)
+
+Now we assign Dx to be the differential operator D corresponding to d/dx.
+
+  Dx: LODO2(Q, PQ) := D()
+    D
+     Type: LinearOrdinaryDifferentialOperator2(Fraction Integer,
+             UnivariatePolynomial(x,Fraction Integer))
+
+New operators are created as polynomials in D().
+
+  a := Dx  + 1
+    D + 1
+     Type: LinearOrdinaryDifferentialOperator2(Fraction Integer,
+             UnivariatePolynomial(x,Fraction Integer))
+
+  b := a + 1/2*Dx**2 - 1/2
+    1  2       1
+    - D  + D + -
+    2          2
+      Type: LinearOrdinaryDifferentialOperator2(Fraction Integer,
+              UnivariatePolynomial(x,Fraction Integer))
+
+To apply the operator a to the value p the usual function call syntax
+is used.
+
+  p := 4*x**2 + 2/3
+      2   2
+    4x  + -
+          3
+                     Type: UnivariatePolynomial(x,Fraction Integer)
+
+  a p 
+      2        2
+    4x  + 8x + -
+               3
+                     Type: UnivariatePolynomial(x,Fraction Integer)
+
+Operator multiplication is defined by the identity (a*b)p = a(b(p))
+
+  (a * b) p = a b p
+      2         37    2         37
+    2x  + 12x + --= 2x  + 12x + --
+                 3               3
+                     Type: Equation UnivariatePolynomial(x,Fraction Integer)
+
+Exponentiation follows from multiplication.
+
+  c := (1/9)*b*(a + b)^2
+      1  6    5  5   13  4   19  3   79  2    7     1
+     -- D  + -- D  + -- D  + -- D  + -- D  + -- D + -
+     72      36      24      18      72      12     8
+      Type: LinearOrdinaryDifferentialOperator2(Fraction Integer,
+              UnivariatePolynomial(x,Fraction Integer))
+
+Finally, note that operator expressions may be applied directly.
+
+  (a**2 - 3/4*b + c) (p + 1)
+       2   44     541
+     3x  + -- x + ---
+            3      36
+                     Type: UnivariatePolynomial(x,Fraction Integer)
+
+====================================================================
+Differential Operators with Matrix Coefficients Operating on Vectors}
+====================================================================
+
+This is another example of linear ordinary differential operators with
+non-commutative multiplication.  Unlike the rational function case,
+the differential ring of square matrices (of a given dimension) with
+univariate polynomial entries does not form a field.  Thus the number
+of operations available is more limited.
+
+In this section, the operators have three by three matrix coefficients
+with polynomial entries.
+
+  PZ := UnivariatePolynomial(x,Integer)
+    UnivariatePolynomial(x,Integer)
+                           Type: Domain
+
+  x:PZ := 'x
+    x
+                           Type: UnivariatePolynomial(x,Integer)
+
+  Mat  := SquareMatrix(3,PZ)
+    SquareMatrix(3,UnivariatePolynomial(x,Integer))
+                           Type: Domain
+
+The operators act on the vectors considered as a Mat-module.
+
+  Vect := DPMM(3, PZ, Mat, PZ)
+  DirectProductMatrixModule(3,UnivariatePolynomial(x,Integer),SquareMatrix(3,Un
+  ivariatePolynomial(x,Integer)),UnivariatePolynomial(x,Integer))
+                           Type: Domain
+
+  Modo := LODO2(Mat, Vect)
+  LinearOrdinaryDifferentialOperator2(SquareMatrix(3,UnivariatePolynomial(x,Int
+  eger)),DirectProductMatrixModule(3,UnivariatePolynomial(x,Integer),SquareMatr
+  ix(3,UnivariatePolynomial(x,Integer)),UnivariatePolynomial(x,Integer)))
+                           Type: Domain
+
+The matrix m is used as a coefficient and the vectors p and q are
+operated upon.
+
+  m:Mat := matrix [ [x^2,1,0],[1,x^4,0],[0,0,4*x^2] ]
+        + 2         +
+        |x   1    0 |
+        |           |
+        |     4     |
+        |1   x    0 |
+        |           |
+        |          2|
+        +0   0   4x +
+                        Type: SquareMatrix(3,UnivariatePolynomial(x,Integer))
+
+  p:Vect := directProduct [3*x^2+1,2*x,7*x^3+2*x]
+       2          3
+    [3x  + 1,2x,7x  + 2x]
+    Type: DirectProductMatrixModule(3,UnivariatePolynomial(x,Integer),
+             SquareMatrix(3,UnivariatePolynomial(x,Integer)),
+                UnivariatePolynomial(x,Integer))
+
+  q: Vect := m * p
+       4    2        5     2        5     3
+    [3x  + x  + 2x,2x  + 3x  + 1,28x  + 8x ]
+      Type: DirectProductMatrixModule(3,UnivariatePolynomial(x,Integer),
+         SquareMatrix(3,UnivariatePolynomial(x,Integer)),
+            UnivariatePolynomial(x,Integer))
+
+Now form a few operators.
+
+  Dx : Modo := D()
+    D
+      Type: LinearOrdinaryDifferentialOperator2(
+             SquareMatrix(3,UnivariatePolynomial(x,Integer)),
+             DirectProductMatrixModule(3,UnivariatePolynomial(x,Integer),
+             SquareMatrix(3,UnivariatePolynomial(x,Integer)),
+             UnivariatePolynomial(x,Integer)))
+
+  a : Modo := Dx  + m
+             + 2         +
+             |x   1    0 |
+             |           |
+         D + |     4     |
+             |1   x    0 |
+             |           |
+             |          2|
+             +0   0   4x +
+    Type: LinearOrdinaryDifferentialOperator2(
+             SquareMatrix(3,UnivariatePolynomial(x,Integer)),
+             DirectProductMatrixModule(3,UnivariatePolynomial(x,Integer),
+             SquareMatrix(3,UnivariatePolynomial(x,Integer)),
+             UnivariatePolynomial(x,Integer)))
+
+  b : Modo := m*Dx  + 1
+         + 2         +
+         |x   1    0 |    +1  0  0+
+         |           |    |       |
+         |     4     |D + |0  1  0|
+         |1   x    0 |    |       |
+         |           |    +0  0  1+
+         |          2|
+         +0   0   4x +
+     Type: LinearOrdinaryDifferentialOperator2(
+              SquareMatrix(3,UnivariatePolynomial(x,Integer)),
+              DirectProductMatrixModule(3,UnivariatePolynomial(x,Integer),
+              SquareMatrix(3,UnivariatePolynomial(x,Integer)),
+              UnivariatePolynomial(x,Integer)))
+
+  c := a*b
+  + 2         +     + 4              4    2                  +    + 2         +
+  |x   1    0 |     |x  + 2x + 2    x  + x            0      |    |x   1    0 |
+  |           | 2   |                                        |    |           |
+  |     4     |D  + |   4    2     8     3                   |D + |     4     |
+  |1   x    0 |     |  x  + x     x  + 4x  + 2        0      |    |1   x    0 |
+  |           |     |                                        |    |           |
+  |          2|     |                              4         |    |          2|
+  +0   0   4x +     +     0            0        16x  + 8x + 1+    +0   0   4x +
+    Type: LinearOrdinaryDifferentialOperator2(
+            SquareMatrix(3,UnivariatePolynomial(x,Integer)),
+            DirectProductMatrixModule(3,UnivariatePolynomial(x,Integer),
+            SquareMatrix(3,UnivariatePolynomial(x,Integer)),
+            UnivariatePolynomial(x,Integer)))
+
+These operators can be applied to vector values.
+
+  a p
+        4    2        5     2        5     3      2
+     [3x  + x  + 8x,2x  + 3x  + 3,28x  + 8x  + 21x  + 2]
+       Type: DirectProductMatrixModule(3,UnivariatePolynomial(x,Integer),
+               SquareMatrix(3,UnivariatePolynomial(x,Integer)),
+                  UnivariatePolynomial(x,Integer))
+
+  b p
+        3     2       4         4     3     2
+     [6x  + 3x  + 3,2x  + 8x,84x  + 7x  + 8x  + 2x]
+        Type: DirectProductMatrixModule(3,UnivariatePolynomial(x,Integer),
+                SquareMatrix(3,UnivariatePolynomial(x,Integer)),
+                  UnivariatePolynomial(x,Integer))
+
+  (a + b + c) (p + q)
+       8      7      6      5      4      3      2
+   [10x  + 12x  + 16x  + 30x  + 85x  + 94x  + 40x  + 40x + 17,
+       12      9      8      7     6      5      4      3      2
+    10x   + 10x  + 12x  + 92x  + 6x  + 32x  + 72x  + 28x  + 49x  + 32x + 19,
+         8       7        6        5       4       3      2
+    2240x  + 224x  + 1280x  + 3508x  + 492x  + 751x  + 98x  + 18x + 4]
+     Type: DirectProductMatrixModule(3,UnivariatePolynomial(x,Integer),
+             SquareMatrix(3,UnivariatePolynomial(x,Integer)),
+               UnivariatePolynomial(x,Integer))
+
+See Also:
+o )show LinearOrdinaryDifferentialOperator2
+o $AXIOM/doc/src/algebra/lodo.spad.dvi
+
+@
 <<domain LODO2 LinearOrdinaryDifferentialOperator2>>=
 )abbrev domain LODO2 LinearOrdinaryDifferentialOperator2
 ++ Author: Stephen M. Watt, Manuel Bronstein
diff --git a/src/algebra/numtheor.spad.pamphlet b/src/algebra/numtheor.spad.pamphlet
index b5cf740..8547989 100644
--- a/src/algebra/numtheor.spad.pamphlet
+++ b/src/algebra/numtheor.spad.pamphlet
@@ -11,29 +11,374 @@ Clifton J. Williamson}
 \tableofcontents
 \eject
 \section{package INTHEORY IntegerNumberTheoryFunctions}
-\subsection{The inverse function}
-The inverse function is derived from the 
-{\bf Extended Euclidean Algorithm}.
+<<IntegerNumberTheoryFunctions.input>>=
+-- numtheor.spad.pamphlet IntegerNumberTheoryFunctions.input
+)spool IntegerNumberTheoryFunctions.output
+)set message test on
+)set message auto off
+)clear all
+div144 := divisors(144)
+--R 
+--R
+--R   (1)  [1,2,3,4,6,8,9,12,16,18,24,36,48,72,144]
+--R                                                           Type: List Integer
+#(div144)
+--R 
+--R
+--R   (2)  15
+--R                                                        Type: PositiveInteger
+reduce(+,div144)
+--R 
+--R
+--R   (3)  403
+--R                                                        Type: PositiveInteger
+numberOfDivisors(144)
+--R 
+--R
+--R   (4)  15
+--R                                                        Type: PositiveInteger
+sumOfDivisors(144)
+--R 
+--R
+--R   (5)  403
+--R                                                        Type: PositiveInteger
+f1(n)==reduce(+,[moebiusMu(d)*numberOfDivisors(quo(n,d))_
+     for d in divisors(n)])
+--R 
+--R                                                                   Type: Void
+f1(200)
+--R 
+--R   Compiling function f1 with type PositiveInteger -> Integer 
+--R
+--R   (7)  1
+--R                                                        Type: PositiveInteger
+f1(846)
+--R 
+--R
+--R   (8)  1
+--R                                                        Type: PositiveInteger
+f2(n) == reduce(+,[moebiusMu(d) * sumOfDivisors(quo(n,d))_
+     for d in divisors(n)]) 
+--R 
+--R                                                                   Type: Void
+f2(200)
+--R 
+--R   Compiling function f2 with type PositiveInteger -> Integer 
+--R
+--R   (10)  200
+--R                                                        Type: PositiveInteger
+f2(846)
+--R 
+--R
+--R   (11)  846
+--R                                                        Type: PositiveInteger
+fibonacci(25)
+--R 
+--R
+--R   (12)  75025
+--R                                                        Type: PositiveInteger
+[fibonacci(n) for n in 1..15]
+--R 
+--R
+--R   (13)  [1,1,2,3,5,8,13,21,34,55,89,144,233,377,610]
+--R                                                           Type: List Integer
+fib(n) == reduce(+,[binomial(n-1-k,k) for k in 0..quo(n-1,2)])
+--R 
+--R                                                                   Type: Void
+fib(25)
+--R 
+--R   Compiling function fib with type PositiveInteger -> Integer 
+--R
+--R   (15)  75025
+--R                                                        Type: PositiveInteger
+[fib(n) for n in 1..15]
+--R 
+--R
+--R   (16)  [1,1,2,3,5,8,13,21,34,55,89,144,233,377,610]
+--R                                                           Type: List Integer
+legendre(3,5)
+--R 
+--R
+--R   (17)  - 1
+--R                                                                Type: Integer
+legendre(23,691)
+--R 
+--R
+--R   (18)  - 1
+--R                                                                Type: Integer
+h(d) == quo(reduce(+,[jacobi(d,k) for k in 1..quo(-d, 2)]),2-jacobi(d,2))
+--R 
+--R                                                                   Type: Void
+h(-163)
+--R 
+--R   Compiling function h with type Integer -> Integer 
+--R
+--R   (20)  1
+--R                                                        Type: PositiveInteger
+h(-499)
+--R 
+--R
+--R   (21)  3
+--R                                                        Type: PositiveInteger
+h(-1832)
+--R 
+--R
+--R   (22)  26
+--R                                                        Type: PositiveInteger
+inverse:(INT,INT)->INT
+--R 
+--R                                                                   Type: Void
+inverse(a,b) ==
+  borg:INT:=b
+  c1:INT := 1
+  d1:INT := 0
+  while b ~= 0 repeat
+    q := a quo b
+    r := a-q*b
+    print [a, "=", q, "*(", b, ")+", r]
+    (a,b):=(b,r)
+    (c1,d1):=(d1,c1-q*d1)
+  a ~= 1 => error("moduli are not relatively prime")
+  positiveRemainder(c1,borg)
+--R 
+--R                                                                   Type: Void
+inverse(15,26)
+--R 
+--R   Compiling function inverse with type (Integer,Integer) -> Integer 
+--R   [15,"=",0,"*(",26,")+",15]
+--R   [26,"=",1,"*(",15,")+",11]
+--R   [15,"=",1,"*(",11,")+",4]
+--R   [11,"=",2,"*(",4,")+",3]
+--R   [4,"=",1,"*(",3,")+",1]
+--R   [3,"=",3,"*(",1,")+",0]
+--R
+--R   (25)  7
+--R                                                        Type: PositiveInteger
+x1:=4
+--R 
+--R
+--R   (26)  4
+--R                                                        Type: PositiveInteger
+m1:=5
+--R 
+--R
+--R   (27)  5
+--R                                                        Type: PositiveInteger
+x2:=2
+--R 
+--R
+--R   (28)  2
+--R                                                        Type: PositiveInteger
+m2:=3
+--R 
+--R
+--R   (29)  3
+--R                                                        Type: PositiveInteger
+result:=chineseRemainder(x1,m1,x2,m2)
+--R 
+--R
+--R   (30)  14
+--R                                                        Type: PositiveInteger
+)spool
+)lisp (bye)
+@
+<<IntegerNumberTheoryFunctions.help>>=
+====================================================================
+IntegerNumberTheoryFunctions examples
+====================================================================
+
+The IntegerNumberTheoryFunctions package contains a variety of operations 
+of interest to number theorists.  Many of these operations deal with 
+divisibility properties of integers.  (Recall that an integer a divides 
+an integer b if there is an integer c such that b = a * c.)
+
+The operation divisors returns a list of the divisors of an integer.
+
+  div144 := divisors(144)
+    [1,2,3,4,6,8,9,12,16,18,24,36,48,72,144]
+                           Type: List Integer
+
+You can now compute the number of divisors of 144 and the sum of the
+divisors of 144 by counting and summing the elements of the list we
+just created.
+
+  #(div144)
+    15
+                           Type: PositiveInteger
+
+  reduce(+,div144)
+    403
+                           Type: PositiveInteger
+
+Of course, you can compute the number of divisors of an integer n,
+usually denoted d(n), and the sum of the divisors of an integer n,
+usually denoted sigma(n), without ever listing the divisors of n.
+
+In Axiom, you can simply call the operations numberOfDivisors and
+sumOfDivisors.
+
+  numberOfDivisors(144)
+    15
+                           Type: PositiveInteger
+
+  sumOfDivisors(144)
+    403
+                           Type: PositiveInteger
+
+The key is that d(n) and sigma(n) are "multiplicative functions."  
+This means that when n and m are relatively prime, that is, when 
+n and m have no prime factor in common, then d(nm) = d(n) d(m) and 
+sigma(nm) = sigma(n) sigma(m).  Note that these functions are trivial to
+compute when n is a prime power and are computed for general n from the 
+prime factorization of n.  Other examples of multiplicative functions 
+are sigma_k(n), the sum of the k-th powers of the divisors of n and 
+varphi(n), the number of integers between 1 and n which are prime to n.
+The corresponding Axiom operations are called sumOfKthPowerDivisors and
+eulerPhi.
+
+An interesting function is mu(n), the Moebius mu function, defined as 
+follows: mu(1) = 1, mu(n) = 0, when n is divisible by a square, and 
+mu = (-1)^k, when n is the product of k distinct primes.  The corresponding
+Axiom operation is moebiusMu. This function occurs in the following theorem:
+
+Theorem: (Moebius Inversion Formula): 
+  Let f(n) be a function on the positive integers and let F(n)
+  be defined by 
+    F(n) = \sum_{d | n} f(n) 
+  the sum of f(n) over d | n where the sum is taken over the 
+  positive divisors of n.  Then the values of f(n) can be recovered 
+  from the values of F(n): f(n) = sum_{d | n} \mu(n) F(n/d) where 
+  again the sum is taken over the positive divisors of n.
+
+When f(n) = 1, then F(n) = d(n).  Thus, if you sum mu(d)..d(n/d) over 
+the positive divisors d of n, you should always get 1.
+
+  f1(n)==reduce(+,[moebiusMu(d)*numberOfDivisors(quo(n,d))_
+     for d in divisors(n)])
+                           Type: Void
+
+  f1(200)
+    1
+                           Type: PositiveInteger
+
+  f1(846)
+    1
+                           Type: PositiveInteger
+
+Similarly, when f(n) = n, then F(n) = sigma(n).  Thus, if you sum 
+mu(d)..sigma(n/d) over the positive divisors d of n, you should always get n.
+
+  f2(n) == reduce(+,[moebiusMu(d) * sumOfDivisors(quo(n,d))_
+     for d in divisors(n)]) 
+                           Type: Void
+
+  f2(200)
+    200
+                           Type: PositiveInteger
+
+  f2(846)
+    846
+                           Type: PositiveInteger
+
+The Fibonacci numbers are defined by 
+   F(1) = F(2) = 1 and
+   F(n) = F(n-1) + F(n-2) for n = 3,4,...
+
+The operation fibonacci computes the n-th Fibonacci number.
+
+  fibonacci(25)
+    75025
+                           Type: PositiveInteger
+
+  [fibonacci(n) for n in 1..15]
+    [1,1,2,3,5,8,13,21,34,55,89,144,233,377,610]
+                           Type: List Integer
+
+Fibonacci numbers can also be expressed as sums of binomial coefficients.
+
+  fib(n) == reduce(+,[binomial(n-1-k,k) for k in 0..quo(n-1,2)])
+                            Type: Void
+
+  fib(25)
+    75025
+                            Type: PositiveInteger
+
+  [fib(n) for n in 1..15]
+    [1,1,2,3,5,8,13,21,34,55,89,144,233,377,610]
+                            Type: List Integer
+
+Quadratic symbols can be computed with the operations legendre and
+jacobi.  The Legendre symbol a/p is defined for integers a and p with
+p an odd prime number.  By definition,
+
+  (a/p) = +1, when a is a square (mod p),
+  (a/p)= -1, when a is not a square (mod p), and
+  (a/p) = 0, when a is divisible by p.
+
+You compute (a/p) via the command legendre(a,p).
+
+  legendre(3,5)
+    - 1
+                             Type: Integer
+
+  legendre(23,691)
+    - 1
+                             Type: Integer
+
+The Jacobi symbol (a/n) is the usual extension of the Legendre symbol,
+where n is an arbitrary integer.  The most important property of the
+Jacobi symbol is the following: if K is a quadratic field with
+discriminant d and quadratic character chi, then chi(n) = (d/n).
+Thus, you can use the Jacobi symbol to compute, say, the class numbers
+of imaginary quadratic fields from a standard class number formula.
+
+This function computes the class number of the imaginary quadratic
+field with discriminant d.
+
+  h(d) == quo(reduce(+,[jacobi(d,k) for k in 1..quo(-d, 2)]),2-jacobi(d,2))
+                             Type: Void
+
+  h(-163)
+    1
+                             Type: PositiveInteger
+
+  h(-499)
+    3
+                             Type: PositiveInteger
+
+  h(-1832)
+    26
+                             Type: PositiveInteger
+
+====================================================================
+The inverse function
+====================================================================
+
+The inverse function is derived from the Extended Euclidean Algorithm.
 If we divide one integer by another nonzero integer we get an integer
 quotient plus a remainder which is, in general, a rational number. 
 For instance, 
-\[13/5 = 2 + 3/5\]
-where 2 is the quotient and $3/5$ is the remainder.
+  13/5 = 2 + 3/5
+where 2 is the quotient and 3/5 is the remainder.
 
 If we multiply thru by the denominator of the remainder we get an answer
 in integer terms which no longer involves division:
-\[13 = 2(5) + 3\]
+  13 = 2(5) + 3
 
 This gives a method of dividing integers. Specifically, if a and b are
-positive integers, there exist unique non-negative integers q
-and r so that
-\[a = qb + r , {\rm\ where\ } 0 \le r < b\]
+positive integers, there exist unique non-negative integers q and r so that
+
+  a = qb + r , where 0 <= r < b
+
 q is called the quotient and r the remainder.
 
 The greatest common divisor of integers a and b, denoted by gcd(a,b),
 is the largest integer that divides (without remainder) both a and
-b. So, for example: gcd(15, 5) = 5, gcd(7, 9) = 1, gcd(12, 9) = 3,
-gcd(81, 57) = 3.
+b. So, for example: 
+  gcd(15, 5)  = 5, 
+  gcd(7, 9)   = 1, 
+  gcd(12, 9)  = 3,
+  gcd(81, 57) = 3.
 
 The gcd of two integers can be found by repeated application of the
 division algorithm, this is known as the Euclidean Algorithm. You
@@ -41,202 +386,186 @@ repeatedly divide the divisor by the remainder until the remainder is
 0. The gcd is the last non-zero remainder in this algorithm. The
 following example shows the algorithm.
 
-Finding the gcd of 81 and 57 by the {\bf Euclidean Algorithm}:
-\[
-\begin{array}{rcl}
-81 & = & 1(57) + 24\\
-57 & = & 2(24) + 9\\
-24 & = & 2(9) + 6\\
-9 & = & 1(6) + 3\\
-6 & = & 2(3) + 0
-\end{array}
-\]
+Finding the gcd of 81 and 57 by the Euclidean Algorithm:
+  81 = 1(57) + 24
+  57 = 2(24) + 9
+  24 = 2(9)  + 6
+  9  = 1(6)  + 3
+  6  = 2(3)  + 0
 
 So the greatest commmon divisor, the GCD(81,51)=3.
 
 If the gcd(a, b) = r then there exist integers s and t so that
-\[s(a) + t(b) = r\]
+  
+  s(a) + t(b) = r
 
 By back substitution in the steps in the Euclidean Algorithm, it is
 possible to find these integers s and t. We shall do this with the
 above example:
 
 Starting with the next to last line, we have:
-\[3 = 9 -1(6)\]
-From the line before that, we see that $6 = 24 - 2(9)$, so:
-\[3 = 9 - 1(24 - 2(9)) = 3(9) - 1(24)\]
-From the line before that, we have $9 = 57 - 2(24)$, so:
-\[3 = 3( 57 - 2(24)) - 1(24) = 3(57) - 7(24)\]
-And, from the line before that $24 = 81 - 1(57)$, giving us:
-\[3 = 3(57) - 7( 81 - 1(57)) = 10(57) -7(81)\]
+
+   3 = 9 -1(6)
+
+From the line before that, we see that 6 = 24 - 2(9), so:
+
+  3 = 9 - 1(24 - 2(9)) = 3(9) - 1(24)
+
+From the line before that, we have 9 = 57 - 2(24), so:
+
+  3 = 3( 57 - 2(24)) - 1(24) = 3(57) - 7(24)
+
+And, from the line before that 24 = 81 - 1(57), giving us:
+
+  3 = 3(57) - 7( 81 - 1(57)) = 10(57) -7(81)
+
 So we have found s = -7 and t = 10.
 
-The {\bf Extended Euclidean Algorithm} computes the GCD($a$,$b$) and 
-the values for $s$ and $t$.
+The Extended Euclidean Algorithm computes the GCD(a,b) and 
+the values for s and t.
 
 Suppose we were doing arithmetics modulo 26 and we needed to find the
-inverse of a number mod 26. This turned out to be a difficult task
-(and not always possible). We observed that a number $x$ had an inverse
-mod 26 (i.e., a number $y$ so that $xy = 1 {\rm\ mod\ } 26$) 
-if and only if $gcd(x,26) = 1$. 
-In the general case the inverse
-of $x$ exists if and only if $gcd(x, n) = 1$ and if it exists then
-there exist integers $s$ and $t$ so that
-
-\[sx + tn = 1\]
-
-But this says that $sx = 1 + (-t)n$, or in other words, 
-\[sx \equiv 1 {\rm\ mod\ } n\]  
-So, s (reduced mod n if need be) is the inverse of $x {\rm\ mod\ }n$. 
-The extended Euclidean algorithm calculates $s$ efficiently.
-
-\subsubsection{Finding the inverse mod n}
-
-We will number the steps of the Euclidean algorithm starting
-with step 0. The quotient obtained at step $i$ will be denoted by $q_i$ 
-and an auxillary number, $s_i$. For the first two steps, the value
-of this number is given: $s_0 = 0$ and $s_1 = 1$. For the remainder of the
-steps, we recursively calculate 
-\[s_i = s_{i-2} - s_{i-1} q_{i-2} {\rm\ (mod\ n)}\] 
-
-The algorithm starts by "dividing" $n$ by $x$. 
-If the last non-zero remainder occurs at step $k$, 
-then if this remainder is 1, $x$ has an inverse and it is $s_{k+2}$. 
-If the remainder is not 1, then $x$ does not have an inverse. 
-
-Find the inverse of 15 mod 26.
-\[
-\begin{array}{crcll}
-Step 0: &26 &=& 1(15) + 11 &s_0 = 0\\
-Step 1: &15 &=& 1(11) + 4  &s_1 = 1\\
-Step 2: &11 &=& 2(4) + 3   
-&s_2 = 0 - 1( 1) {\rm\ mod\ } 26 = 25\\
-Step 3: &4  &=& 1(3) + 1   
-&s_3 = 1 - 25( 1) {\rm\ mod\ } 26 = -24 {\rm\ mod\ } 26 = 2\\
-Step 4: &3  &=& 3(1) + 0   
-&s_4 = 25 - 2( 2) {\rm\ mod\ } 26 = 21\\
-&&& &s_5 = 2 - 21( 1) {\rm\ mod\ } 26 = -19 {\rm\ mod\ } 26 = 7
-\end{array}
-\]
-Notice that $15(7) = 105 = 1 + 4(26) \equiv 1 ({\rm\ mod\ } 26)$. 
+inverse of a number mod 26. This turned out to be a difficult task (and
+not always possible). We observed that a number x had an inverse mod 26 
+(i.e., a number y so that xy = 1 mod 26) if and only if gcd(x,26) = 1. 
+In the general case the inverse of x exists if and only if gcd(x, n) = 1 
+and if it exists then there exist integers s and t so that
+
+  sx + tn = 1
+
+But this says that sx = 1 + (-t)n, or in other words, 
+
+  sx == 1 mod n
+
+So, s (reduced mod n if need be) is the inverse of x mod n. 
+The extended Euclidean algorithm calculates s efficiently.
+
+====================================================================
+Finding the inverse mod n
+====================================================================
+
+We will number the steps of the Euclidean algorithm starting with step 0. 
+The quotient obtained at step i will be denoted by qi and an auxillary 
+number, si. For the first two steps, the value of this number is given: 
+  s(0) = 0 and 
+  s(1) = 1. 
+
+For the remainder of the steps, we recursively calculate 
+  s(i) = s(i-2) - s(i-1) q(i-2) mod n
+
+The algorithm starts by "dividing" n by x. If the last non-zero remainder 
+occurs at step k, then if this remainder is 1, x has an inverse and it is 
+s(k+2). If the remainder is not 1, then x does not have an inverse. 
+
+For example, find the inverse of 15 mod 26.
+
+Step 0: 26 = 1(15) + 11 s(0) = 0
+Step 1: 15 = 1(11) + 4  s(1) = 1
+Step 2: 11 = 2(4) + 3   s(2) = 0  -  1( 1) mod 26 =  25
+Step 3: 4  = 1(3) + 1   s(3) = 1  - 25( 1) mod 26 = -24 mod 26 = 2
+Step 4: 3  = 3(1) + 0   s(4) = 25 -  2( 2) mod 26 =  21
+                        s(5) = 2  - 21( 1) mod 26 = -19 mod 26 = 7
+
+Notice that 15(7) = 105 = 1 + 4(26) == 1 (mod 26). 
 
 Using the half extended Euclidean algorithm we compute 1/a mod b.
-<<inverse(a,b)>>=
+
+  inverse:(INT,INT)->INT
+                              Type: Void
+
   inverse(a,b) ==
-    borg:I:=b
-    c1:I := 1
-    d1:I := 0
-    while b ^= 0 repeat
-      q:I := a quo b
-      r:I := a-q*b
+    borg:INT:=b
+    c1:INT := 1
+    d1:INT := 0
+    while b ~= 0 repeat
+      q := a quo b
+      r := a-q*b
+      print [a, "=", q, "*(", b, ")+", r]
       (a,b):=(b,r)
       (c1,d1):=(d1,c1-q*d1)
-    a ^= 1 => error("moduli are not relatively prime")
+    a ~= 1 => error("moduli are not relatively prime")
     positiveRemainder(c1,borg)
-  
-@
-<<inverse : (I,I) -> I>>=
-  inverse : (I,I) -> I
-@
-Since this algorithm in local we need to reproduce it in the 
-input file for testing purposes.
-<<TESTinverse>>=
-)clear completely 
+                              Type: Void
 
-inverse:(INT,INT)->INT
+  inverse(15,26)
+   [15,"=",0,"*(",26,")+",15]
+   [26,"=",1,"*(",15,")+",11]
+   [15,"=",1,"*(",11,")+",4]
+   [11,"=",2,"*(",4,")+",3]
+   [4,"=",1,"*(",3,")+",1]
+   [3,"=",3,"*(",1,")+",0]
 
-inverse(a,b) ==
-  borg:INT:=b
-  c1:INT := 1
-  d1:INT := 0
-  while b ~= 0 repeat
-    q := a quo b
-    r := a-q*b
-    print [a, "=", q, "*(", b, ")+", r]
-    (a,b):=(b,r)
-    (c1,d1):=(d1,c1-q*d1)
-  a ~= 1 => error("moduli are not relatively prime")
-  positiveRemainder(c1,borg)
+   7
+                              Type: PositiveInteger
 
-if ((inverse(26,15)*26)::IntegerMod(15) ~= 1) then print "DALY BUG"
-if ((inverse(15,26)*15)::IntegerMod(26) ~= 1) then print "DALY BUG"
 
-@
-\subsection{The Chinese Remainder Algorithm}
-\subsubsection{Chinese Remainder Theorem}
-Let $m_1$,$m_2$,\ldots,$m_r$ be positive integers that are pairwise
-relatively prime. Let $x_1$,$x_2$,\ldots,$x_r$ be integers with 
-$0 \le x_i < m_i$. Then, there is exactly one $x$ in the interval
-\[0 \le x < m_1 \cdot m_2 \cdots m_r\]
-that satisfies the remainder equations
-\[{\rm\ irem\ }(x,m_i) = x_i,\ \ \ i=1,2,\ldots,r\]
-where {\bf irem} is the positive integer remainder function.
-\subsubsection{Chinese Remainder Example}
-Let $x_1 = 4$, $m_1 = 5$, $x_2 = 2$, $m_2 = 3$. We know that 
-\[{\rm\ irem\ }(x,m_1) = x_1\]
-\[{\rm\ irem\ }(x,m_2) = x_2\]
-where $0 \le x_1 < m_1$ and $0 \le x_2 < m_2$. By the extended
-Euclidean Algorithm there are integers $c$ and $d$ such that
-\[c m_1 + d m_2 = 1\].
-\noindent
+====================================================================
+The Chinese Remainder Algorithm
+====================================================================
+
+Let m1,m2,...,mr be positive integers that are pairwise relatively prime. 
+Let x1,x2,..,xr be integers with 0 <= xi < mi. Then, there is exactly one 
+x in the interval 0 <= x < m1 ... m2 ... mr
+that satisfies the remainder equations 
+
+  irem(x,mi) = xi, i=1,2,...,r
+
+where irem is the positive integer remainder function.
+
+For example, et x1 = 4, m1 = 5, x2 = 2, m2 = 3. We know that 
+  irem(x,m1) = x1
+  irem(x,m2) = x2
+where 0 <= x_ < m1 and 0 <= x2 < m2. 
+
+By the extended Euclidean Algorithm there are integers c and d such that
+  c m1 + d m2 = 1
+
 In this case we are looking for an integer such that
-\[{\rm\ irem\ }(x,5) = 4\]
-\[{\rm\ irem\ }(x,3) = 2\]
-
-The algorithm we use is to first 
-compute the positive integer
-remainder of $x_1$ and $m_1$ to get a new $x_1$:
-\[
-\begin{array}{rcl}
-x_1 & = & {\rm\ positiveRemainder\ }(x_1,m_1)\\
-4 & = & {\rm\ positiveRemainder\ }(4,5)
-\end{array}
-\]
-Next compute the positive integer
-remainder of $x_2$ and $m_2$ to get a new $x_2$:
-\[
-\begin{array}{rcl}
-x_2 & = & {\rm\ positiveRemainder\ }(x_2,m_2)\\
-2 & = & {\rm\ positiveRemainder\ }(2,3)
-\end{array}
-\]
-Then we compute
-\[x_1 + m_1 \cdot {\rm\ positiveRemainder\ }
-(((x_2-x_1)\cdot{\rm inverse}(m_1,m_2)),m_2)\]
+ irem(x,5) = 4,
+ irem(x,3) = 2
+
+The algorithm we use is to first compute the positive integer remainder of 
+x1 and m1 to get a new x1:
+
+ x1 = positiveRemainder(x1,m1)
+  4 = positiveRemainder(4,5)
+
+Next compute the positive integer remainder of x2 and m2 to get a new x2:
+
+ x2 = positiveRemainder(x2,m2)
+  2 = positiveRemainder(2,3)
+
+Then we compute x1 + m1 ... positiveRemainder(((x2-x1)*inverse(m1,m2)),m2)
 or
-\[4+5*{\rm\ positiveRemainder\ }(((2-4)*{\rm\ inverse\ }(5,3)),3)\]
+  4+5*positiveRemainder(((2-4)*inverse(5,3)),3)
 or
-\[4+5*{\rm\ positiveRemainder\ }(-2*2),3)\]
+  4+5*positiveRemainder(-2*2),3)
 or
-\[4+5*2\]
+  4+5*2
 or
-\[14\]
-<<chineseRemainder(x1,m1,x2,m2)>>=
-  chineseRemainder(x1,m1,x2,m2) ==
-    m1 < 0 or m2 < 0 => error "moduli must be positive"
-    x1 := positiveRemainder(x1,m1)
-    x2 := positiveRemainder(x2,m2)
-    x1 + m1 * positiveRemainder(((x2-x1) * inverse(m1,m2)),m2)
+  14
 
-@
 This function has a restricted signature which only allows for
 computing the chinese remainder of two numbers and two moduli.
-<<chineseRemainder: (I,I,I,I) -> I>>=
-  chineseRemainder: (I,I,I,I) -> I
-    ++ \spad{chineseRemainder(x1,m1,x2,m2)} returns w, where w is such that
-    ++ \spad{w = x1 mod m1} and \spad{w = x2 mod m2}. Note: \spad{m1} and
-    ++ \spad{m2} must be relatively prime.
-@
-We test the particular example. The result should be 14.
-<<TESTchineseRemainder>>=
-)clear all
-x1:=4
-m1:=5
-x2:=2
-m2:=3
-result:=chineseRemainder(x1,m1,x2,m2)
-expected:=14
-if (result-expected ~=0) then print "DALY BUG"
+  x1:=4
+    4
+                          Type: PositiveInteger
+  m1:=5
+    5
+                          Type: PositiveInteger
+  x2:=2
+    2
+                          Type: PositiveInteger
+  m2:=3
+    3
+                          Type: PositiveInteger
+  result:=chineseRemainder(x1,m1,x2,m2)
+    14
+                          Type: PositiveInteger
+
+See Also:
+o )show IntegerNumberTheoryFunctions
+o $AXIOM/doc/src/algebra/numtheor.spad.dvi
 
 @
 <<package INTHEORY IntegerNumberTheoryFunctions>>=
@@ -264,7 +593,10 @@ IntegerNumberTheoryFunctions(): Exports == Implementation where
     ++ \spad{bernoulli(n)} returns the nth Bernoulli number.
     ++ this is \spad{B(n,0)}, where \spad{B(n,x)} is the \spad{n}th Bernoulli
     ++ polynomial.
-<<chineseRemainder: (I,I,I,I) -> I>>
+  chineseRemainder: (I,I,I,I) -> I
+    ++ \spad{chineseRemainder(x1,m1,x2,m2)} returns w, where w is such that
+    ++ \spad{w = x1 mod m1} and \spad{w = x2 mod m2}. Note: \spad{m1} and
+    ++ \spad{m2} must be relatively prime.
   divisors : I -> List I
     ++ \spad{divisors(n)} returns a list of the divisors of n.
   euler : I -> I
@@ -379,9 +711,25 @@ IntegerNumberTheoryFunctions(): Exports == Implementation where
       B(i) := -b/((i+1)::RN)
     B(n)
 
-<<inverse : (I,I) -> I>>
-<<inverse(a,b)>>
-<<chineseRemainder(x1,m1,x2,m2)>>
+  inverse : (I,I) -> I
+
+  inverse(a,b) ==
+    borg:I:=b
+    c1:I := 1
+    d1:I := 0
+    while b ^= 0 repeat
+      q:I := a quo b
+      r:I := a-q*b
+      (a,b):=(b,r)
+      (c1,d1):=(d1,c1-q*d1)
+    a ^= 1 => error("moduli are not relatively prime")
+    positiveRemainder(c1,borg)
+
+  chineseRemainder(x1,m1,x2,m2) ==
+    m1 < 0 or m2 < 0 => error "moduli must be positive"
+    x1 := positiveRemainder(x1,m1)
+    x2 := positiveRemainder(x2,m2)
+    x1 + m1 * positiveRemainder(((x2-x1) * inverse(m1,m2)),m2)
 
   jacobi(a,b) ==
     -- Revised by Clifton Williamson January 1989.
@@ -469,11 +817,6 @@ IntegerNumberTheoryFunctions(): Exports == Implementation where
     1
 
 @
-\subsection{TEST INTHEORY}
-<<TEST INTHEORY>>=
-<<TESTchineseRemainder>>
-<<TESTinverse>>
-@
 \section{package PNTHEORY PolynomialNumberTheoryFunctions}
 <<package PNTHEORY PolynomialNumberTheoryFunctions>>=
 )abbrev package PNTHEORY PolynomialNumberTheoryFunctions
diff --git a/src/algebra/radix.spad.pamphlet b/src/algebra/radix.spad.pamphlet
index f35780e..4c25fd0 100644
--- a/src/algebra/radix.spad.pamphlet
+++ b/src/algebra/radix.spad.pamphlet
@@ -634,6 +634,151 @@ DecimalExpansion(): Exports == Implementation where
 
 @
 \section{domain HEXADEC HexadecimalExpansion}
+<<HexadecimalExpansion.input>>=
+-- radix.spad.pamphlet HexadecimalExpansion.input
+)spool HexadecimalExpansion.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 7
+r := hex(22/7)
+--R 
+--R
+--R          ___
+--R   (1)  3.249
+--R                                                   Type: HexadecimalExpansion
+--E 1
+
+--S 2 of 7
+r + hex(6/7)
+--R 
+--R
+--R   (2)  4
+--R                                                   Type: HexadecimalExpansion
+--E 2
+
+--S 3 of 7
+[hex(1/i) for i in 350..354]
+--R 
+--R
+--R   (3)
+--R       _______________    _________      _____    ______________________
+--R   [0.00BB3EE721A54D88, 0.00BAB6561, 0.00BA2E8, 0.00B9A7862A0FF465879D5F,
+--R       _____________________________
+--R    0.00B92143FA36F5E02E4850FE8DBD78]
+--R                                              Type: List HexadecimalExpansion
+--E 3
+
+--S 4 of 7
+hex(1/1007)
+--R 
+--R
+--R   (4)
+--R   0.
+--R     OVERBAR
+--R        0041149783F0BF2C7D13933192AF6980619EE345E91EC2BB9D5CCA5C071E40926E54E8D
+--R          DAE24196C0B2F8A0AAD60DBA57F5D4C8536262210C74F1
+--R                                                   Type: HexadecimalExpansion
+--E 4
+
+--S 5 of 7
+p := hex(1/4)*x**2 + hex(2/3)*x + hex(4/9)
+--R 
+--R
+--R            2     _      ___
+--R   (5)  0.4x  + 0.Ax + 0.71C
+--R                                        Type: Polynomial HexadecimalExpansion
+--E 5
+
+--S 6 of 7
+q := D(p, x)
+--R 
+--R
+--R                 _
+--R   (6)  0.8x + 0.A
+--R                                        Type: Polynomial HexadecimalExpansion
+--E 6
+
+--S 7 of 7
+g := gcd(p, q)
+--R 
+--R
+--R              _
+--R   (7)  x + 1.5
+--R                                        Type: Polynomial HexadecimalExpansion
+--E 7
+)spool
+ 
+)spool
+)lisp (bye)
+@
+<<HexadecimalExpansion.help>>=
+\section{HexadecimalExpansion}
+\label{HexadecimalExpansionXmpPage}
+
+All rationals have repeating hexadecimal expansions.  The operation
+hex returns these expansions of type HexadecimalExpansion.  Operations
+to access the individual numerals of a hexadecimal expansion can be
+obtained by converting the value to RadixExpansion(16).  More examples
+of expansions are available in the DecimalExpansion, BinaryExpansion,
+and RadixExpansion.
+
+This is a hexadecimal expansion of a rational number.
+
+  r := hex(22/7)
+      ___
+    3.249
+                      Type: HexadecimalExpansion
+
+Arithmetic is exact.
+
+  r + hex(6/7)
+    4
+                      Type: HexadecimalExpansion
+
+The period of the expansion can be short or long ...
+
+  [hex(1/i) for i in 350..354]
+       _______________    _________      _____    ______________________
+   [0.00BB3EE721A54D88, 0.00BAB6561, 0.00BA2E8, 0.00B9A7862A0FF465879D5F,
+       _____________________________
+    0.00B92143FA36F5E02E4850FE8DBD78]
+                      Type: List HexadecimalExpansion
+
+or very long!
+
+  hex(1/1007)
+     _______________________________________________________________________
+   0.0041149783F0BF2C7D13933192AF6980619EE345E91EC2BB9D5CCA5C071E40926E54E8D
+     ______________________________________________
+     DAE24196C0B2F8A0AAD60DBA57F5D4C8536262210C74F1
+                      Type: HexadecimalExpansion
+
+These numbers are bona fide algebraic objects.
+
+  p := hex(1/4)*x**2 + hex(2/3)*x + hex(4/9)
+        2     _      ___
+    0.4x  + 0.Ax + 0.71C
+                      Type: Polynomial HexadecimalExpansion
+
+  q := D(p, x)
+             _
+    0.8x + 0.A
+                      Type: Polynomial HexadecimalExpansion
+
+  g := gcd(p, q)
+          _
+    x + 1.5
+                      Type: Polynomial HexadecimalExpansion
+
+See Also:
+o )help RadixExpansion
+o )help BinaryExpansion
+o )help DecimalExpansion
+o )show HexadecimalExpansion
+o $AXIOM/doc/src/algebra/radix.spad.dvi
+
+@
 <<domain HEXADEC HexadecimalExpansion>>=
 )abbrev domain HEXADEC HexadecimalExpansion
 ++ Author: Clifton J. Williamson
diff --git a/src/algebra/table.spad.pamphlet b/src/algebra/table.spad.pamphlet
index fc97720..11a0c2c 100644
--- a/src/algebra/table.spad.pamphlet
+++ b/src/algebra/table.spad.pamphlet
@@ -259,6 +259,89 @@ StringTable(Entry: SetCategory) ==
 
 @
 \section{domain GSTBL GeneralSparseTable}
+<<GeneralSparseTable.input>>=
+-- table.spad.pamphlet GeneralSparseTable.input
+)spool GeneralSparseTable.output
+)set message test on
+)set message auto off
+)set break resume
+)clear all
+--S 1 of 7
+patrons: GeneralSparseTable(String, Integer, KeyedAccessFile(Integer), 0) := table() ; 
+--E 1
+
+--S 2 of 7
+patrons."Smith" := 10500 
+--E 2
+
+--S 3 of 7
+patrons."Jones" := 22000
+--E 3
+
+--S 4 of 7
+patrons."Jones" 
+--E 4
+
+--S 5 of 7
+patrons."Stingy"
+--E 5
+
+--S 6 of 7
+reduce(+, entries patrons) 
+--E 6
+
+--S 7 of 7
+)system rm -r kaf*.sdata
+--E 7
+)spool
+)lisp (bye)
+@
+<<GeneralSparseTable.help>>=
+====================================================================
+GeneralSparseTable
+====================================================================
+
+Sometimes when working with tables there is a natural value to use as
+the entry in all but a few cases.  The GeneralSparseTable constructor
+can be used to provide any table type with a default value for
+entries.
+
+Suppose we launched a fund-raising campaign to raise fifty thousand
+dollars.  To record the contributions, we want a table with strings as
+keys (for the names) and integer entries (for the amount).  In a data
+base of cash contributions, unless someone has been explicitly
+entered, it is reasonable to assume they have made a zero dollar
+contribution.
+
+This creates a keyed access file with default entry 0.
+
+  patrons: GeneralSparseTable(String, Integer, KeyedAccessFile(Integer), 0) := table() ; 
+
+Now patrons can be used just as any other table.  Here we record two gifts.
+
+  patrons."Smith" := 10500 
+
+  patrons."Jones" := 22000
+
+Now let us look up the size of the contributions from Jones and Stingy.
+
+  patrons."Jones" 
+
+  patrons."Stingy"
+
+Have we met our seventy thousand dollar goal?
+
+  reduce(+, entries patrons) 
+
+So the project is cancelled and we can delete the data base:
+
+  )system rm -r kaf*.sdata
+
+See Also:
+o )show GeneralSparseTable
+o $AXIOM/doc/src/algebra/table.spad.dvi
+
+@
 <<domain GSTBL GeneralSparseTable>>=
 )abbrev domain GSTBL GeneralSparseTable
 ++ Author: Stephen M. Watt
diff --git a/src/algebra/void.spad.pamphlet b/src/algebra/void.spad.pamphlet
index 1a27a5f..314b9a4 100644
--- a/src/algebra/void.spad.pamphlet
+++ b/src/algebra/void.spad.pamphlet
@@ -40,6 +40,107 @@ Void: with
 
 @
 \section{domain EXIT Exit}
+<<Exit.input>>=
+-- void.spad.pamphlet Exit.input
+)spool Exit.output
+)set message test on
+)set message auto off
+)clear all
+--S 1
+n := 0
+--R 
+--R
+--R   (1)  0
+--R                                                     Type: NonNegativeInteger
+--E 1
+
+--S 2
+gasp(): Exit ==
+  free n
+  n := n + 1
+  error "Oh no!"
+--R 
+--R   Function declaration gasp : () -> Exit has been added to workspace.
+--R                                                                   Type: Void
+--E 2
+
+--S 3
+half(k) ==
+  if odd? k then gasp()
+  else k quo 2
+--R 
+--R                                                                   Type: Void
+--E 3
+
+--S 4
+half 4
+--R 
+--R   Compiling function gasp with type () -> Exit 
+--R   Compiling function half with type PositiveInteger -> Integer 
+--R
+--R   (4)  2
+--R                                                        Type: PositiveInteger
+--E 4
+
+--S 5
+half 3
+--R 
+--R 
+--RDaly Bug
+--R   Error signalled from user code in function gasp: 
+--R      Oh no!
+--E 5
+
+--S 6
+n
+--R 
+--R
+--R   (5)  1
+--R                                                     Type: NonNegativeInteger
+--E 6
+)spool
+)lisp (bye)
+@
+<<Exit.help>>=
+====================================================================
+Exit examples
+====================================================================
+
+A function that does not return directly to its caller has Exit as its
+return type.  The operation error is an example of one which does not
+return to its caller.  Instead, it causes a return to top-level.
+
+  n := 0
+
+The function gasp is given return type Exit since it is guaranteed
+never to return a value to its caller.
+
+  gasp(): Exit ==
+    free n
+    n := n + 1
+    error "Oh no!"
+ 
+The return type of half is determined by resolving the types of the
+two branches of the if.
+
+  half(k) ==
+    if odd? k then gasp()
+    else k quo 2
+
+Because gasp has the return type Exit, the type of if in half is
+resolved to be Integer.
+
+  half 4
+
+  half 3
+
+  n
+
+See Also:
+o )show Exit
+o $AXIOM/doc/src/algebra/void.spad.dvi
+
+@
 <<domain EXIT Exit>>=
 )abbrev domain EXIT Exit
 ++ Author: Stephen M. Watt
diff --git a/src/algebra/xlpoly.spad.pamphlet b/src/algebra/xlpoly.spad.pamphlet
index c863ac2..34c26e1 100644
--- a/src/algebra/xlpoly.spad.pamphlet
+++ b/src/algebra/xlpoly.spad.pamphlet
@@ -488,6 +488,407 @@ XExponentialPackage(R, VarSet, XPOLY): Public == Private where
 
 @
 \section{domain LPOLY LiePolynomial}
+<<LiePolynomial.input>>=
+-- xlpoly.spad.pamphlet LiePolynomial.input
+)spool LiePolynomial.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 28
+RN := Fraction Integer
+--R 
+--R
+--R   (1)  Fraction Integer
+--R                                                                 Type: Domain
+--E 1
+
+--S 2 of 28
+Lpoly := LiePolynomial(Symbol,RN)
+--R 
+--R
+--R   (2)  LiePolynomial(Symbol,Fraction Integer)
+--R                                                                 Type: Domain
+--E 2
+
+--S 3 of 28
+Dpoly := XDPOLY(Symbol,RN)
+--R 
+--R
+--R   (3)  XDistributedPolynomial(Symbol,Fraction Integer)
+--R                                                                 Type: Domain
+--E 3
+
+--S 4 of 28
+Lword := LyndonWord Symbol
+--R 
+--R
+--R   (4)  LyndonWord Symbol
+--R                                                                 Type: Domain
+--E 4
+
+--S 5 of 28
+a:Symbol := 'a
+--R 
+--R
+--R   (5)  a
+--R                                                                 Type: Symbol
+--E 5
+
+--S 6 of 28
+b:Symbol := 'b 
+--R 
+--R
+--R   (6)  b
+--R                                                                 Type: Symbol
+--E 6
+
+--S 7 of 28
+c:Symbol := 'c
+--R 
+--R
+--R   (7)  c
+--R                                                                 Type: Symbol
+--E 7
+
+--S 8 of 28
+aa: Lpoly := a 
+--R 
+--R
+--R   (8)  [a]
+--R                                 Type: LiePolynomial(Symbol,Fraction Integer)
+--E 8
+
+--S 9 of 28
+bb: Lpoly := b
+--R 
+--R
+--R   (9)  [b]
+--R                                 Type: LiePolynomial(Symbol,Fraction Integer)
+--E 9
+
+--S 10 of 28
+cc: Lpoly := c
+--R 
+--R
+--R   (10)  [c]
+--R                                 Type: LiePolynomial(Symbol,Fraction Integer)
+--E 10
+
+--S 11 of 28
+p : Lpoly := [aa,bb]
+--R 
+--R
+--R   (11)  [a b]
+--R                                 Type: LiePolynomial(Symbol,Fraction Integer)
+--E 11
+
+--S 12 of 28
+q : Lpoly := [p,bb]
+--R 
+--R
+--R             2
+--R   (12)  [a b ]
+--R                                 Type: LiePolynomial(Symbol,Fraction Integer)
+--E 12
+
+--S 13 of 28
+liste : List Lword := LyndonWordsList([a,b], 4)
+--R 
+--R
+--R                          2       2    3     2 2      3
+--R   (13)  [[a],[b],[a b],[a b],[a b ],[a b],[a b ],[a b ]]
+--R                                                 Type: List LyndonWord Symbol
+--E 13
+
+--S 14 of 28
+r: Lpoly := p + q + 3*LiePoly(liste.4)$Lpoly
+--R 
+--R
+--R                    2         2
+--R   (14)  [a b] + 3[a b] + [a b ]
+--R                                 Type: LiePolynomial(Symbol,Fraction Integer)
+--E 14
+
+--S 15 of 28
+s:Lpoly := [p,r]
+--R 
+--R
+--R              2                 2
+--R   (15)  - 3[a b a b] + [a b a b ]
+--R                                 Type: LiePolynomial(Symbol,Fraction Integer)
+--E 15
+
+--S 16 of 28
+t:Lpoly  := s  + 2*LiePoly(liste.3) - 5*LiePoly(liste.5)
+--R 
+--R
+--R                       2       2                 2
+--R   (16)  2[a b] - 5[a b ] - 3[a b a b] + [a b a b ]
+--R                                 Type: LiePolynomial(Symbol,Fraction Integer)
+--E 16
+
+--S 17 of 28
+degree t
+--R 
+--R
+--R   (17)  5
+--R                                                        Type: PositiveInteger
+--E 17
+
+--S 18 of 28
+mirror t
+--R 
+--R
+--R                         2       2                 2
+--R   (18)  - 2[a b] - 5[a b ] - 3[a b a b] + [a b a b ]
+--R                                 Type: LiePolynomial(Symbol,Fraction Integer)
+--E 18
+
+--S 19 of 28
+Jacobi(p: Lpoly, q: Lpoly, r: Lpoly): Lpoly == _
+   [ [p,q]$Lpoly, r] + [ [q,r]$Lpoly, p] + [ [r,p]$Lpoly, q]  
+--R 
+--R   Function declaration Jacobi : (LiePolynomial(Symbol,Fraction Integer
+--R      ),LiePolynomial(Symbol,Fraction Integer),LiePolynomial(Symbol,
+--R      Fraction Integer)) -> LiePolynomial(Symbol,Fraction Integer) has 
+--R      been added to workspace.
+--R                                                                   Type: Void
+--E 19
+
+--S 20 of 28
+test: Lpoly := Jacobi(a,b,b)
+--R 
+--R   Compiling function Jacobi with type (LiePolynomial(Symbol,Fraction 
+--R      Integer),LiePolynomial(Symbol,Fraction Integer),LiePolynomial(
+--R      Symbol,Fraction Integer)) -> LiePolynomial(Symbol,Fraction 
+--R      Integer) 
+--R
+--R   (20)  0
+--R                                 Type: LiePolynomial(Symbol,Fraction Integer)
+--E 20
+
+--S 21 of 28
+test: Lpoly := Jacobi(p,q,r)
+--R 
+--R
+--R   (21)  0
+--R                                 Type: LiePolynomial(Symbol,Fraction Integer)
+--E 21
+
+--S 22 of 28
+test: Lpoly := Jacobi(r,s,t)
+--R 
+--R
+--R   (22)  0
+--R                                 Type: LiePolynomial(Symbol,Fraction Integer)
+--E 22
+
+--S 23 of 28
+eval(p, a, p)$Lpoly
+--R 
+--R
+--R             2
+--R   (23)  [a b ]
+--R                                 Type: LiePolynomial(Symbol,Fraction Integer)
+--E 23
+
+--S 24 of 28
+eval(p, [a,b], [2*bb, 3*aa])$Lpoly
+--R 
+--R
+--R   (24)  - 6[a b]
+--R                                 Type: LiePolynomial(Symbol,Fraction Integer)
+--E 24
+
+--S 25 of 28
+r: Lpoly := [p,c]
+--R 
+--R
+--R   (25)  [a b c] + [a c b]
+--R                                 Type: LiePolynomial(Symbol,Fraction Integer)
+--E 25
+
+--S 26 of 28
+r1: Lpoly := eval(r, [a,b,c], [bb, cc, aa])$Lpoly 
+--R 
+--R
+--R   (26)  - [a b c]
+--R                                 Type: LiePolynomial(Symbol,Fraction Integer)
+--E 26
+
+--S 27 of 28
+r2: Lpoly := eval(r, [a,b,c], [cc, aa, bb])$Lpoly 
+--R 
+--R
+--R   (27)  - [a c b]
+--R                                 Type: LiePolynomial(Symbol,Fraction Integer)
+--E 27
+
+--S 28 of 28
+r + r1 + r2
+--R 
+--R
+--R   (28)  0
+--R                                 Type: LiePolynomial(Symbol,Fraction Integer)
+--E 28
+)spool
+ 
+)spool
+)lisp (bye)
+@
+<<LiePolynomial.help>>=
+====================================================================
+LiePolynomial examples
+====================================================================
+
+====================================================================
+Declaration of domains
+====================================================================
+
+  RN := Fraction Integer
+    Fraction Integer
+                     Type: Domain
+
+  Lpoly := LiePolynomial(Symbol,RN)
+    LiePolynomial(Symbol,Fraction Integer)
+                     Type: Domain
+
+  Dpoly := XDPOLY(Symbol,RN)
+    XDistributedPolynomial(Symbol,Fraction Integer)
+                     Type: Domain
+
+  Lword := LyndonWord Symbol
+    LyndonWord Symbol
+                     Type: Domain
+
+====================================================================
+Initialisation
+====================================================================
+
+  a:Symbol := 'a
+    a
+                     Type: Symbol
+
+  b:Symbol := 'b 
+    b
+                     Type: Symbol
+
+  c:Symbol := 'c
+    c
+                     Type: Symbol
+
+  aa: Lpoly := a 
+    [a]
+                     Type: LiePolynomial(Symbol,Fraction Integer)
+
+  bb: Lpoly := b
+    [b]
+                     Type: LiePolynomial(Symbol,Fraction Integer)
+
+  cc: Lpoly := c
+    [c]
+                     Type: LiePolynomial(Symbol,Fraction Integer)
+
+  p : Lpoly := [aa,bb]
+    [a b]
+                     Type: LiePolynomial(Symbol,Fraction Integer)
+
+  q : Lpoly := [p,bb]
+        2
+    [a b ]
+                     Type: LiePolynomial(Symbol,Fraction Integer)
+
+All the Lyndon words of order 4
+
+  liste : List Lword := LyndonWordsList([a,b], 4)
+                     2       2    3     2 2      3
+    [[a],[b],[a b],[a b],[a b ],[a b],[a b ],[a b ]]
+                     Type: List LyndonWord Symbol
+
+  r: Lpoly := p + q + 3*LiePoly(liste.4)$Lpoly
+               2         2
+    [a b] + 3[a b] + [a b ]
+                     Type: LiePolynomial(Symbol,Fraction Integer)
+
+  s:Lpoly := [p,r]
+         2                 2
+    - 3[a b a b] + [a b a b ]
+                     Type: LiePolynomial(Symbol,Fraction Integer)
+
+  t:Lpoly  := s  + 2*LiePoly(liste.3) - 5*LiePoly(liste.5)
+                  2       2                 2
+    2[a b] - 5[a b ] - 3[a b a b] + [a b a b ]
+                     Type: LiePolynomial(Symbol,Fraction Integer)
+
+  degree t
+    5
+                     Type: PositiveInteger
+
+  mirror t
+                    2       2                 2
+    - 2[a b] - 5[a b ] - 3[a b a b] + [a b a b ]
+                     Type: LiePolynomial(Symbol,Fraction Integer)
+
+====================================================================
+Jacobi Relation
+====================================================================
+
+ Jacobi(p: Lpoly, q: Lpoly, r: Lpoly): Lpoly == _
+   [ [p,q]\$Lpoly, r] + [ [q,r]\$Lpoly, p] + [ [r,p]\$Lpoly, q]  
+                    Type: Void
+
+====================================================================
+Tests
+====================================================================
+
+  test: Lpoly := Jacobi(a,b,b)
+    0
+                    Type: LiePolynomial(Symbol,Fraction Integer)
+
+  test: Lpoly := Jacobi(p,q,r)
+    0
+                    Type: LiePolynomial(Symbol,Fraction Integer)
+
+  test: Lpoly := Jacobi(r,s,t)
+    0
+                    Type: LiePolynomial(Symbol,Fraction Integer)
+
+====================================================================
+Evaluation
+====================================================================
+
+  eval(p, a, p)$Lpoly
+        2
+    [a b ]
+                    Type: LiePolynomial(Symbol,Fraction Integer)
+
+  eval(p, [a,b], [2*bb, 3*aa])$Lpoly
+    - 6[a b]
+                    Type: LiePolynomial(Symbol,Fraction Integer)
+
+  r: Lpoly := [p,c]
+    [a b c] + [a c b]
+                    Type: LiePolynomial(Symbol,Fraction Integer)
+
+  r1: Lpoly := eval(r, [a,b,c], [bb, cc, aa])$Lpoly 
+    - [a b c]
+                    Type: LiePolynomial(Symbol,Fraction Integer)
+
+  r2: Lpoly := eval(r, [a,b,c], [cc, aa, bb])$Lpoly 
+    - [a c b]
+                    Type: LiePolynomial(Symbol,Fraction Integer)
+
+  r + r1 + r2
+    0
+                    Type: LiePolynomial(Symbol,Fraction Integer)
+
+See Also:
+o )help LyndonWord
+o )help XDistributedPolynomial
+o )show LiePolynomial
+o $AXIOM/doc/src/algebra/xlpoly.spad.dvi 
+
+@
 <<domain LPOLY LiePolynomial>>=
 )abbrev domain LPOLY LiePolynomial
 ++ Author: Michel Petitot (petitot@lifl.fr).
@@ -1027,6 +1428,225 @@ XPBWPolynomial(VarSet:OrderedSet,R:CommutativeRing): XDPcat == XDPdef where
 
 @
 \section{domain LEXP LieExponentials}
+<<LieExponentials.input>>=
+-- xlpoly.spad.pamphlet LieExponentials.input
+)spool LieExponentials.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 13
+a: Symbol := 'a
+--R 
+--R
+--R   (1)  a
+--R                                                                 Type: Symbol
+--E 1
+
+--S 2 of 13
+b: Symbol := 'b
+--R 
+--R
+--R   (2)  b
+--R                                                                 Type: Symbol
+--E 2
+
+--S 3 of 13
+coef := Fraction(Integer) 
+--R 
+--R
+--R   (3)  Fraction Integer
+--R                                                                 Type: Domain
+--E 3
+
+--S 4 of 13
+group := LieExponentials(Symbol, coef, 3)
+--R 
+--R
+--R   (4)  LieExponentials(Symbol,Fraction Integer,3)
+--R                                                                 Type: Domain
+--E 4
+
+--S 5 of 13
+lpoly := LiePolynomial(Symbol, coef)
+--R 
+--R
+--R   (5)  LiePolynomial(Symbol,Fraction Integer)
+--R                                                                 Type: Domain
+--E 5
+
+--S 6 of 13
+poly := XPBWPolynomial(Symbol, coef)
+--R 
+--R
+--R   (6)  XPBWPolynomial(Symbol,Fraction Integer)
+--R                                                                 Type: Domain
+--E 6
+
+--S 7 of 13
+ea := exp(a::lpoly)$group
+--R 
+--R
+--R         [a]
+--R   (7)  e
+--R                             Type: LieExponentials(Symbol,Fraction Integer,3)
+--E 7
+
+--S 8 of 13
+eb := exp(b::lpoly)$group
+--R 
+--R
+--R         [b]
+--R   (8)  e
+--R                             Type: LieExponentials(Symbol,Fraction Integer,3)
+--E 8
+
+--S 9 of 13
+g: group := ea*eb
+--R 
+--R
+--R             1     2        1   2
+--R             - [a b ]       - [a b]
+--R         [b] 2        [a b] 2       [a]
+--R   (9)  e   e        e     e       e
+--R                             Type: LieExponentials(Symbol,Fraction Integer,3)
+--E 9
+
+--S 10 of 13
+g :: poly
+--R 
+--R
+--R   (10)
+--R                     1                           1          1
+--R     1 + [a] + [b] + - [a][a] + [a b] + [b][a] + - [b][b] + - [a][a][a]
+--R                     2                           2          6
+--R   + 
+--R     1   2                1     2    1                        1
+--R     - [a b] + [a b][a] + - [a b ] + - [b][a][a] + [b][a b] + - [b][b][a]
+--R     2                    2          2                        2
+--R   + 
+--R     1
+--R     - [b][b][b]
+--R     6
+--R                                Type: XPBWPolynomial(Symbol,Fraction Integer)
+--E 10
+
+--S 11 of 13
+log(g)$group
+--R 
+--R
+--R                     1          1   2      1     2
+--R   (11)  [a] + [b] + - [a b] + -- [a b] + -- [a b ]
+--R                     2         12         12
+--R                                 Type: LiePolynomial(Symbol,Fraction Integer)
+--E 11
+
+--S 12 of 13
+g1: group := inv(g)
+--R 
+--R
+--R          - [b] - [a]
+--R   (12)  e     e
+--R                             Type: LieExponentials(Symbol,Fraction Integer,3)
+--E 12
+
+--S 13 of 13
+g*g1
+--R 
+--R
+--R   (13)  1
+--R                             Type: LieExponentials(Symbol,Fraction Integer,3)
+--E 13
+)spool
+)lisp (bye)
+@
+<<LieExponentials.help>>=
+====================================================================
+LieExponentials examples
+====================================================================
+
+  a: Symbol := 'a
+    a
+                         Type: Symbol
+
+  b: Symbol := 'b
+    b
+                         Type: Symbol
+
+====================================================================
+Declarations of domains
+====================================================================
+
+  coef := Fraction(Integer) 
+    Fraction Integer
+                         Type: Domain
+
+  group := LieExponentials(Symbol, coef, 3)
+    LieExponentials(Symbol,Fraction Integer,3)
+                         Type: Domain
+
+  lpoly := LiePolynomial(Symbol, coef)
+    LiePolynomial(Symbol,Fraction Integer)
+                         Type: Domain
+
+  poly := XPBWPolynomial(Symbol, coef)
+    XPBWPolynomial(Symbol,Fraction Integer)
+                         Type: Domain
+
+====================================================================
+Calculations
+====================================================================
+
+  ea := exp(a::lpoly)$group
+     [a]
+    e
+                         Type: LieExponentials(Symbol,Fraction Integer,3)
+
+  eb := exp(b::lpoly)$group
+     [b]
+    e
+                         Type: LieExponentials(Symbol,Fraction Integer,3)
+
+  g: group := ea*eb
+         1     2        1   2
+         - [a b ]       - [a b]
+     [b] 2        [a b] 2       [a]
+    e   e        e     e       e
+                         Type: LieExponentials(Symbol,Fraction Integer,3)
+
+  g :: poly
+                     1                           1          1
+     1 + [a] + [b] + - [a][a] + [a b] + [b][a] + - [b][b] + - [a][a][a]
+                     2                           2          6
+   + 
+     1   2                1     2    1                        1
+     - [a b] + [a b][a] + - [a b ] + - [b][a][a] + [b][a b] + - [b][b][a]
+     2                    2          2                        2
+   + 
+     1
+     - [b][b][b]
+     6
+                        Type: XPBWPolynomial(Symbol,Fraction Integer)
+
+  log(g)$group
+                1          1   2      1     2
+    [a] + [b] + - [a b] + -- [a b] + -- [a b ]
+                2         12         12
+                        Type: LiePolynomial(Symbol,Fraction Integer)
+
+  g1: group := inv(g)
+     - [b] - [a]
+    e     e
+                        Type: LieExponentials(Symbol,Fraction Integer,3)
+
+  g*g1
+    1
+                        Type: LieExponentials(Symbol,Fraction Integer,3)
+
+See Also:
+o )show LieExponentials
+o $AXIOM/doc/src/algebra/xlpoly.spad.dvi
+
+@
 <<domain LEXP LieExponentials>>=
 )abbrev domain LEXP LieExponentials
 ++ Author: Michel Petitot (petitot@lifl.fr).
diff --git a/src/algebra/zerodim.spad.pamphlet b/src/algebra/zerodim.spad.pamphlet
index 6b1db2a..8e20563 100644
--- a/src/algebra/zerodim.spad.pamphlet
+++ b/src/algebra/zerodim.spad.pamphlet
@@ -127,6 +127,3448 @@ RegularChain(R,ls): Exports == Implementation where
 
 @
 \section{package LEXTRIPK LexTriangularPackage}
+<<LexTriangularPackage.input>>=
+-- zerodim.spad.pamphlet LexTriangularPackage.input
+)spool LexTriangularPackage.output
+)set message test on
+)set message auto off
+)clear all
+--S 1 of 22
+R := Integer
+--R 
+--R
+--R   (1)  Integer
+--R                                                                 Type: Domain
+--E 1
+
+--S 2 of 22
+ls : List Symbol := [a,b,c,d,e,f]
+--R 
+--R
+--R   (2)  [a,b,c,d,e,f]
+--R                                                            Type: List Symbol
+--E 2
+
+--S 3 of 22
+V := OVAR(ls)
+--R 
+--R
+--R   (3)  OrderedVariableList [a,b,c,d,e,f]
+--R                                                                 Type: Domain
+--E 3
+
+--S 4 of 22
+P := NSMP(R, V)
+--R 
+--R
+--R   (4)
+--R   NewSparseMultivariatePolynomial(Integer,OrderedVariableList [a,b,c,d,e,f])
+--R                                                                 Type: Domain
+--E 4
+
+--S 5 of 22
+p1: P :=  a*b*c*d*e*f - 1
+--R 
+--R
+--R   (5)  f e d c b a - 1
+--RType: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [a,b,c,d,e,f])
+--E 5
+
+--S 6 of 22
+p2: P := a*b*c*d*e +a*b*c*d*f +a*b*c*e*f +a*b*d*e*f +a*c*d*e*f +b*c*d*e*f 
+--R 
+--R
+--R   (6)  ((((e + f)d + f e)c + f e d)b + f e d c)a + f e d c b
+--RType: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [a,b,c,d,e,f])
+--E 6
+
+--S 7 of 22
+p3: P :=  a*b*c*d + a*b*c*f + a*b*e*f + a*d*e*f + b*c*d*e + c*d*e*f 
+--R 
+--R
+--R   (7)  (((d + f)c + f e)b + f e d)a + e d c b + f e d c
+--RType: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [a,b,c,d,e,f])
+--E 7
+
+--S 8 of 22
+p4: P := a*b*c + a*b*f + a*e*f + b*c*d + c*d*e + d*e*f 
+--R 
+--R
+--R   (8)  ((c + f)b + f e)a + d c b + e d c + f e d
+--RType: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [a,b,c,d,e,f])
+--E 8
+
+--S 9 of 22
+p5: P := a*b + a*f + b*c + c*d + d*e + e*f 
+--R 
+--R
+--R   (9)  (b + f)a + c b + d c + e d + f e
+--RType: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [a,b,c,d,e,f])
+--E 9
+
+--S 10 of 22
+p6: P := a + b + c + d + e + f 
+--R 
+--R
+--R   (10)  a + b + c + d + e + f
+--RType: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [a,b,c,d,e,f])
+--E 10
+
+--S 11 of 22
+lp := [p1, p2, p3, p4, p5, p6]
+--R 
+--R
+--R   (11)
+--R   [f e d c b a - 1, ((((e + f)d + f e)c + f e d)b + f e d c)a + f e d c b,
+--R    (((d + f)c + f e)b + f e d)a + e d c b + f e d c,
+--R    ((c + f)b + f e)a + d c b + e d c + f e d,
+--R    (b + f)a + c b + d c + e d + f e, a + b + c + d + e + f]
+--RType: List NewSparseMultivariatePolynomial(Integer,OrderedVariableList [a,b,c,d,e,f])
+--E 11
+
+--S 12 of 22
+lextripack :=  LEXTRIPK(R,ls)
+--R 
+--R
+--R   (12)  LexTriangularPackage(Integer,[a,b,c,d,e,f])
+--R                                                                 Type: Domain
+--E 12
+
+--S 13 of 22
+lg := groebner(lp)$lextripack
+--R 
+--R
+--R   (13)
+--R   [a + b + c + d + e + f,
+--R
+--R                        2                                           2
+--R       3968379498283200b  + 15873517993132800f b + 3968379498283200d
+--R     + 
+--R                                               3 5                     4 4
+--R       15873517993132800f d + 3968379498283200f e  - 15873517993132800f e
+--R     + 
+--R                         5 3                       6                       2
+--R       23810276989699200f e  + (206355733910726400f  + 230166010900425600)e
+--R     + 
+--R                             43                       37
+--R           - 729705987316687f   + 1863667496867205421f
+--R         + 
+--R                                 31                         25
+--R           291674853771731104461f   + 365285994691106921745f
+--R         + 
+--R                              19                         13
+--R           549961185828911895f   - 365048404038768439269f
+--R         + 
+--R                                   7
+--R           - 292382820431504027669f  - 2271898467631865497f
+--R      *
+--R         e
+--R     + 
+--R                          44                        38
+--R       - 3988812642545399f   + 10187423878429609997f
+--R     + 
+--R                              32                          26
+--R       1594377523424314053637f   + 1994739308439916238065f
+--R     + 
+--R                           20                          14
+--R       1596840088052642815f   - 1993494118301162145413f
+--R     + 
+--R                                8                        2
+--R       - 1596049742289689815053f  - 11488171330159667449f
+--R     ,
+--R
+--R                                                                      2
+--R       (23810276989699200c - 23810276989699200f)b + 23810276989699200c
+--R     + 
+--R                                                2
+--R       71430830969097600f c - 23810276989699200d  - 95241107958796800f d
+--R     + 
+--R                           3 5                      4 4                      5 3
+--R       - 55557312975964800f e  + 174608697924460800f e  - 174608697924460800f e
+--R     + 
+--R                              6                        2
+--R       (- 2428648252949318400f  - 2611193709870345600)e
+--R     + 
+--R                            43                        37
+--R           8305444561289527f   - 21212087151945459641f
+--R         + 
+--R                                    31                          25
+--R           - 3319815883093451385381f   - 4157691646261657136445f
+--R         + 
+--R                                 19                          13
+--R           - 6072721607510764095f   + 4154986709036460221649f
+--R         + 
+--R                                  7
+--R           3327761311138587096749f  + 25885340608290841637f
+--R      *
+--R         e
+--R     + 
+--R                         44                         38
+--R       45815897629010329f   - 117013765582151891207f
+--R     + 
+--R                                 32                           26
+--R       - 18313166848970865074187f   - 22909971239649297438915f
+--R     + 
+--R                              20                           14
+--R       - 16133250761305157265f   + 22897305857636178256623f
+--R     + 
+--R                               8                         2
+--R       18329944781867242497923f  + 130258531002020420699f
+--R     ,
+--R
+--R       (7936758996566400d - 7936758996566400f)b - 7936758996566400f d
+--R     + 
+--R                          3 5                     4 4                     5 3
+--R       - 7936758996566400f e  + 23810276989699200f e  - 23810276989699200f e
+--R     + 
+--R                             6                       2
+--R       (- 337312257354072000f  - 369059293340337600)e
+--R     + 
+--R                            43                       37
+--R           1176345388640471f   - 3004383582891473073f
+--R         + 
+--R                                   31                         25
+--R           - 470203502707246105653f   - 588858183402644348085f
+--R         + 
+--R                                19                         13
+--R           - 856939308623513535f   + 588472674242340526377f
+--R         + 
+--R                                 7
+--R           471313241958371103517f  + 3659742549078552381f
+--R      *
+--R         e
+--R     + 
+--R                        44                        38                          32
+--R       6423170513956901f   - 16404772137036480803f   - 2567419165227528774463f
+--R     + 
+--R                                26                       20
+--R       - 3211938090825682172335f   - 2330490332697587485f
+--R     + 
+--R                              14                          8
+--R       3210100109444754864587f   + 2569858315395162617847f
+--R     + 
+--R                            2
+--R       18326089487427735751f
+--R     ,
+--R
+--R                                                                     3 5
+--R       (11905138494849600e - 11905138494849600f)b - 3968379498283200f e
+--R     + 
+--R                         4 4                     5 3
+--R       15873517993132800f e  - 27778656487982400f e
+--R     + 
+--R                             6                       2
+--R       (- 208339923659868000f  - 240086959646133600)e
+--R     + 
+--R                           43                       37
+--R           786029984751110f   - 2007519008182245250f
+--R         + 
+--R                                   31                         25
+--R           - 314188062908073807090f   - 393423667537929575250f
+--R         + 
+--R                                19                         13
+--R           - 550329120654394950f   + 393196408728889612770f
+--R         + 
+--R                                 7
+--R           314892372799176495730f  + 2409386515146668530f
+--R      *
+--R         e
+--R     + 
+--R                        44                        38                          32
+--R       4177638546747827f   - 10669685294602576381f   - 1669852980419949524601f
+--R     + 
+--R                                26                       20
+--R       - 2089077057287904170745f   - 1569899763580278795f
+--R     + 
+--R                              14                          8
+--R       2087864026859015573349f   + 1671496085945199577969f
+--R     + 
+--R                            2
+--R       11940257226216280177f
+--R     ,
+--R
+--R                          6                                           2 5
+--R       (11905138494849600f  - 11905138494849600)b - 15873517993132800f e
+--R     + 
+--R                         3 4                     4 3
+--R       39683794982832000f e  - 39683794982832000f e
+--R     + 
+--R                             11                      5  2
+--R       (- 686529653202993600f   - 607162063237329600f )e
+--R     + 
+--R                          42                      36                        30
+--R           65144531306704f   - 166381280901088652f   - 26033434502470283472f
+--R         + 
+--R                                  24                      18
+--R           - 31696259583860650140f   + 971492093167581360f
+--R         + 
+--R                              12                        6
+--R         32220085033691389548f   + 25526177666070529808f  + 138603268355749244
+--R      *
+--R         e
+--R     + 
+--R                       43                      37                        31
+--R       167620036074811f   - 428102417974791473f   - 66997243801231679313f
+--R     + 
+--R                              25                      19
+--R       - 83426716722148750485f   + 203673895369980765f
+--R     + 
+--R                            13                        7
+--R       83523056326010432457f   + 66995789640238066937f  + 478592855549587901f
+--R     ,
+--R
+--R                    3                   2                 2                45
+--R       801692827936c  + 2405078483808f c  - 2405078483808f c - 13752945467f
+--R     + 
+--R                      39                    33                    27
+--R       35125117815561f   + 5496946957826433f   + 6834659447749117f
+--R     + 
+--R                        21                    15                    9
+--R       - 44484880462461f   - 6873406230093057f   - 5450844938762633f
+--R     + 
+--R                     3
+--R       1216586044571f
+--R     ,
+--R
+--R                                                                      2
+--R       (23810276989699200d - 23810276989699200f)c + 23810276989699200d
+--R     + 
+--R                                               3 5                     4 4
+--R       71430830969097600f d + 7936758996566400f e  - 31747035986265600f e
+--R     + 
+--R                         5 3                       6                       2
+--R       31747035986265600f e  + (404774708824886400f  + 396837949828320000)e
+--R     + 
+--R                              43                       37
+--R           - 1247372229446701f   + 3185785654596621203f
+--R         + 
+--R                                 31                         25
+--R           498594866849974751463f   + 624542545845791047935f
+--R         + 
+--R                              19                         13
+--R           931085755769682885f   - 624150663582417063387f
+--R         + 
+--R                                   7
+--R           - 499881859388360475647f  - 3926885313819527351f
+--R      *
+--R         e
+--R     + 
+--R                          44                        38
+--R       - 7026011547118141f   + 17944427051950691243f
+--R     + 
+--R                              32                          26
+--R       2808383522593986603543f   + 3513624142354807530135f
+--R     + 
+--R                           20                          14
+--R       2860757006705537685f   - 3511356735642190737267f
+--R     + 
+--R                                8                        2
+--R       - 2811332494697103819887f  - 20315011631522847311f
+--R     ,
+--R
+--R       (7936758996566400e - 7936758996566400f)c
+--R     + 
+--R                           43                     37                       31
+--R           - 4418748183673f   + 11285568707456559f   + 1765998617294451019f
+--R         + 
+--R                               25                     19
+--R           2173749283622606155f   - 55788292195402895f
+--R         + 
+--R                               13                       7
+--R         - 2215291421788292951f   - 1718142665347430851f  + 30256569458230237f
+--R      *
+--R         e
+--R     + 
+--R                     44                     38                       32
+--R       4418748183673f   - 11285568707456559f   - 1765998617294451019f
+--R     + 
+--R                             26                     20                       14
+--R       - 2173749283622606155f   + 55788292195402895f   + 2215291421788292951f
+--R     + 
+--R                           8                     2
+--R       1718142665347430851f  - 30256569458230237f
+--R     ,
+--R
+--R                       6                                  43
+--R       (72152354514240f  - 72152354514240)c + 40950859449f
+--R     + 
+--R                         37                     31                     25
+--R       - 104588980990367f   - 16367227395575307f   - 20268523416527355f
+--R     + 
+--R                       19                     13                     7
+--R       442205002259535f   + 20576059935789063f   + 15997133796970563f
+--R     + 
+--R       - 275099892785581f
+--R     ,
+--R
+--R                        3                      2                    2
+--R       1984189749141600d  + 5952569247424800f d  - 5952569247424800f d
+--R     + 
+--R                          4 5                     5 4                     3
+--R       - 3968379498283200f e  + 15873517993132800f e  + 17857707742274400e
+--R     + 
+--R                             7                        2
+--R       (- 148814231185620000f  - 162703559429611200f)e
+--R     + 
+--R                             44                      38
+--R           - 390000914678878f   + 996062704593756434f
+--R         + 
+--R                                 32                         26
+--R           155886323972034823914f   + 194745956143985421330f
+--R         + 
+--R                            20                         14
+--R           6205077595574430f   - 194596512653299068786f
+--R         + 
+--R                                   8                       2
+--R           - 155796897940756922666f  - 1036375759077320978f
+--R      *
+--R         e
+--R     + 
+--R                         45                      39                         33
+--R       - 374998630035991f   + 957747106595453993f   + 149889155566764891693f
+--R     + 
+--R                             27                      21
+--R       187154171443494641685f   - 127129015426348065f
+--R     + 
+--R                             15                         9                      3
+--R     - 187241533243115040417f   - 149719983567976534037f  - 836654081239648061f
+--R     ,
+--R
+--R                                                                   3 5
+--R       (5952569247424800e - 5952569247424800f)d - 3968379498283200f e
+--R     + 
+--R                        4 4                    5 3
+--R       9920948745708000f e  - 3968379498283200f e
+--R     + 
+--R                             6                       2
+--R       (- 148814231185620000f  - 150798420934761600)e
+--R     + 
+--R                           43                       37
+--R           492558110242553f   - 1257992359608074599f
+--R         + 
+--R                                   31                         25
+--R           - 196883094539368513959f   - 246562115745735428055f
+--R         + 
+--R                                19                         13
+--R           - 325698701993885505f   + 246417769883651808111f
+--R         + 
+--R                                 7
+--R           197327352068200652911f  + 1523373796389332143f
+--R      *
+--R         e
+--R     + 
+--R                        44                       38                          32
+--R       2679481081803026f   - 6843392695421906608f   - 1071020459642646913578f
+--R     + 
+--R                                26                      20
+--R       - 1339789169692041240060f   - 852746750910750210f
+--R     + 
+--R                              14                          8
+--R       1339105101971878401312f   + 1071900289758712984762f
+--R     + 
+--R                           2
+--R       7555239072072727756f
+--R     ,
+--R
+--R                          6                                          2 5
+--R       (11905138494849600f  - 11905138494849600)d - 7936758996566400f e
+--R     + 
+--R                         3 4                     4 3
+--R       31747035986265600f e  - 31747035986265600f e
+--R     + 
+--R                             11                      5  2
+--R       (- 420648226818019200f   - 404774708824886400f )e
+--R     + 
+--R                          42                     36                       30
+--R           15336187600889f   - 39169739565161107f   - 6127176127489690827f
+--R         + 
+--R                                 24                      18
+--R           - 7217708742310509615f   + 538628483890722735f
+--R         + 
+--R                               12                       6
+--R           7506804353843507643f   + 5886160769782607203f  + 63576108396535879
+--R      *
+--R         e
+--R     + 
+--R                      43                      37                        31
+--R       71737781777066f   - 183218856207557938f   - 28672874271132276078f
+--R     + 
+--R                              25                      19
+--R       - 35625223686939812010f   + 164831339634084390f
+--R     + 
+--R                            13                        7
+--R       35724160423073052642f   + 28627022578664910622f  + 187459987029680506f
+--R     ,
+--R
+--R                        6                      5                    2 4
+--R       1322793166094400e  - 3968379498283200f e  + 3968379498283200f e
+--R     + 
+--R                          3 3
+--R       - 5291172664377600f e
+--R     + 
+--R                             10                      4  2
+--R       (- 230166010900425600f   - 226197631402142400f )e
+--R     + 
+--R                                47                         41
+--R           - 152375364610443885f   + 389166626064854890415f
+--R         + 
+--R                                   35                           29
+--R           60906097841360558987335f   + 76167367934608798697275f
+--R         + 
+--R                                23                           17
+--R           27855066785995181125f   - 76144952817052723145495f
+--R         + 
+--R                                     11                         5
+--R           - 60933629892463517546975f   - 411415071682002547795f
+--R      *
+--R         e
+--R     + 
+--R                         42                      36                        30
+--R       - 209493533143822f   + 535045979490560586f   + 83737947964973553146f
+--R     + 
+--R                             24                      18
+--R       104889507084213371570f   + 167117997269207870f
+--R     + 
+--R                               12                        6
+--R       - 104793725781390615514f   - 83842685189903180394f  - 569978796672974242
+--R     ,
+--R
+--R                       6                   3
+--R       (25438330117200f  + 25438330117200)e
+--R     + 
+--R                       7                    2
+--R       (76314990351600f  + 76314990351600f)e
+--R     + 
+--R                           44                    38                      32
+--R           - 1594966552735f   + 4073543370415745f   + 637527159231148925f
+--R         + 
+--R                              26                   20                      14
+--R           797521176113606525f   + 530440941097175f   - 797160527306433145f
+--R         + 
+--R                                8                    2
+--R           - 638132320196044965f  - 4510507167940725f
+--R      *
+--R         e
+--R     + 
+--R                       45                     39                       33
+--R       - 6036376800443f   + 15416903421476909f   + 2412807646192304449f
+--R     + 
+--R                           27                    21                       15
+--R       3017679923028013705f   + 1422320037411955f   - 3016560402417843941f
+--R     + 
+--R                             9                     3
+--R       - 2414249368183033161f  - 16561862361763873f
+--R     ,
+--R
+--R                      12                  2
+--R       (1387545279120f   - 1387545279120)e
+--R     + 
+--R                      43                  37                    31
+--R           4321823003f   - 11037922310209f   - 1727510711947989f
+--R         + 
+--R                              25                 19                    13
+--R           - 2165150991154425f   - 5114342560755f   + 2162682824948601f
+--R         + 
+--R                            7
+--R           1732620732685741f  + 13506088516033f
+--R      *
+--R         e
+--R     + 
+--R                   44                  38                    32
+--R       24177661775f   - 61749727185325f   - 9664106795754225f
+--R     + 
+--R                           26                 20                     14
+--R       - 12090487758628245f   - 8787672733575f   + 12083693383005045f
+--R     + 
+--R                        8                  2
+--R       9672870290826025f  + 68544102808525f
+--R     ,
+--R     48        42          36          30          18          12        6
+--R    f   - 2554f   - 399710f   - 499722f   + 499722f   + 399710f   + 2554f  - 1]
+--RType: List NewSparseMultivariatePolynomial(Integer,OrderedVariableList [a,b,c,d,e,f])
+--E 13
+
+--S 14 of 22
+lexTriangular(lg,false)$lextripack
+--R 
+--R
+--R   (14)
+--R   [
+--R       6       6       5     2 4     3 3     4 2     5
+--R     {f  + 1, e  - 3f e  + 3f e  - 4f e  + 3f e  - 3f e - 1,
+--R            2 5     3 4     4 3     5 2
+--R      3d + f e  - 4f e  + 4f e  - 2f e  - 2e + 2f, c + f,
+--R             2 5     3 4     4 3      5 2
+--R      3b + 2f e  - 5f e  + 5f e  - 10f e  - 4e + 7f,
+--R           2 5     3 4     4 3     5 2
+--R      a - f e  + 3f e  - 3f e  + 4f e  + 3e - 3f}
+--R     ,
+--R      6                  2           2                    2
+--R    {f  - 1,e - f,d - f,c  + 4f c + f ,(c - f)b - f c - 5f ,a + b + c + 3f},
+--R      6                        2           2
+--R    {f  - 1,e - f,d - f,c - f,b  + 4f b + f ,a + b + 4f},
+--R      6            2           2                    2
+--R    {f  - 1,e - f,d  + 4f d + f ,(d - f)c - f d - 5f ,b - f,a + c + d + 3f},
+--R
+--R       36        30          24          18          12        6
+--R     {f   - 2554f   - 399709f   - 502276f   - 399709f   - 2554f  + 1,
+--R
+--R                    12              2
+--R         (161718564f   - 161718564)e
+--R       + 
+--R                      31              25                19                13
+--R             - 504205f   + 1287737951f   + 201539391380f   + 253982817368f
+--R           + 
+--R                          7
+--R             201940704665f  + 1574134601f
+--R        *
+--R           e
+--R       + 
+--R                   32              26                 20                 14
+--R         - 2818405f   + 7198203911f   + 1126548149060f   + 1416530563364f
+--R       + 
+--R                       8              2
+--R         1127377589345f  + 7988820725f
+--R       ,
+--R
+--R                       6                                 2 5                 3 4
+--R         (693772639560f  - 693772639560)d - 462515093040f e  + 1850060372160f e
+--R       + 
+--R                         4 3                     11                  5  2
+--R         - 1850060372160f e  + (- 24513299931120f   - 23588269745040f )e
+--R       + 
+--R                         30                 24                   18
+--R             - 890810428f   + 2275181044754f   + 355937263869776f
+--R           + 
+--R                             12                   6
+--R             413736880104344f   + 342849304487996f  + 3704966481878
+--R        *
+--R           e
+--R       + 
+--R                      31                  25                    19
+--R         - 4163798003f   + 10634395752169f   + 1664161760192806f
+--R       + 
+--R                          13                    7
+--R         2079424391370694f   + 1668153650635921f  + 10924274392693f
+--R       ,
+--R
+--R                      6                           31               25
+--R         (12614047992f  - 12614047992)c - 7246825f   + 18508536599f
+--R       + 
+--R                       19                 13                 7
+--R         2896249516034f   + 3581539649666f   + 2796477571739f  - 48094301893f
+--R       ,
+--R
+--R                       6                                 2 5                 3 4
+--R         (693772639560f  - 693772639560)b - 925030186080f e  + 2312575465200f e
+--R       + 
+--R                         4 3                     11                  5  2
+--R         - 2312575465200f e  + (- 40007555547960f   - 35382404617560f )e
+--R       + 
+--R                          30                 24                    18
+--R             - 3781280823f   + 9657492291789f   + 1511158913397906f
+--R           + 
+--R                              12                    6
+--R             1837290892286154f   + 1487216006594361f  + 8077238712093
+--R        *
+--R           e
+--R       + 
+--R                      31                  25                    19
+--R         - 9736390478f   + 24866827916734f   + 3891495681905296f
+--R       + 
+--R                          13                    7
+--R         4872556418871424f   + 3904047887269606f  + 27890075838538f
+--R       ,
+--R      a + b + c + d + e + f}
+--R     ,
+--R      6      2           2                    2
+--R    {f  - 1,e  + 4f e + f ,(e - f)d - f e - 5f ,c - f,b - f,a + d + e + 3f}]
+--R                               Type: List RegularChain(Integer,[a,b,c,d,e,f])
+--E 14
+
+--S 15 of 22
+lts := lexTriangular(lg,true)$lextripack
+--R 
+--R
+--R   (15)
+--R   [
+--R       6       6       5     2 4     3 3     4 2     5
+--R     {f  + 1, e  - 3f e  + 3f e  - 4f e  + 3f e  - 3f e - 1,
+--R            2 5     3 4     4 3     5 2
+--R      3d + f e  - 4f e  + 4f e  - 2f e  - 2e + 2f, c + f,
+--R             2 5     3 4     4 3      5 2
+--R      3b + 2f e  - 5f e  + 5f e  - 10f e  - 4e + 7f,
+--R           2 5     3 4     4 3     5 2
+--R      a - f e  + 3f e  - 3f e  + 4f e  + 3e - 3f}
+--R     ,
+--R      6                  2           2
+--R    {f  - 1,e - f,d - f,c  + 4f c + f ,b + c + 4f,a - f},
+--R      6                        2           2
+--R    {f  - 1,e - f,d - f,c - f,b  + 4f b + f ,a + b + 4f},
+--R      6            2           2
+--R    {f  - 1,e - f,d  + 4f d + f ,c + d + 4f,b - f,a - f},
+--R
+--R       36        30          24          18          12        6
+--R     {f   - 2554f   - 399709f   - 502276f   - 399709f   - 2554f  + 1,
+--R
+--R                       2
+--R         1387545279120e
+--R       + 
+--R                        31                  25                    19
+--R             4321823003f   - 11037922310209f   - 1727506390124986f
+--R           + 
+--R                                13                    7
+--R             - 2176188913464634f   - 1732620732685741f  - 13506088516033f
+--R        *
+--R           e
+--R       + 
+--R                     32                  26                    20
+--R         24177661775f   - 61749727185325f   - 9664082618092450f
+--R       + 
+--R                             14                    8                  2
+--R         - 12152237485813570f   - 9672870290826025f  - 68544102808525f
+--R       ,
+--R
+--R         1387545279120d
+--R       + 
+--R                          30                 24                   18
+--R             - 1128983050f   + 2883434331830f   + 451234998755840f
+--R           + 
+--R                             12                   6
+--R             562426491685760f   + 447129055314890f  - 165557857270
+--R        *
+--R           e
+--R       + 
+--R                      31                 25                   19
+--R         - 1816935351f   + 4640452214013f   + 726247129626942f
+--R       + 
+--R                         13                   7
+--R         912871801716798f   + 726583262666877f  + 4909358645961f
+--R       ,
+--R
+--R                                    31                 25                   19
+--R         1387545279120c + 778171189f   - 1987468196267f   - 310993556954378f
+--R       + 
+--R                           13                   7
+--R         - 383262822316802f   - 300335488637543f  + 5289595037041f
+--R       ,
+--R
+--R         1387545279120b
+--R       + 
+--R                        30                 24                   18
+--R             1128983050f   - 2883434331830f   - 451234998755840f
+--R           + 
+--R                               12                   6
+--R             - 562426491685760f   - 447129055314890f  + 165557857270
+--R        *
+--R           e
+--R       + 
+--R                      31                 25                    19
+--R         - 3283058841f   + 8384938292463f   + 1312252817452422f
+--R       + 
+--R                          13                    7
+--R         1646579934064638f   + 1306372958656407f  + 4694680112151f
+--R       ,
+--R
+--R                                                      31                  25
+--R         1387545279120a + 1387545279120e + 4321823003f   - 11037922310209f
+--R       + 
+--R                            19                    13                    7
+--R         - 1727506390124986f   - 2176188913464634f   - 1732620732685741f
+--R       + 
+--R         - 13506088516033f
+--R       }
+--R     ,
+--R      6      2           2
+--R    {f  - 1,e  + 4f e + f ,d + e + 4f,c - f,b - f,a - f}]
+--R                               Type: List RegularChain(Integer,[a,b,c,d,e,f])
+--E 15
+
+--S 16 of 22
+[ [init(p) for p in (ts :: List(P))] for ts in lts]
+--R 
+--R
+--R   (16)
+--R   [[1,3,1,3,1,1], [1,1,1,1,1,1], [1,1,1,1,1,1], [1,1,1,1,1,1],
+--R    [1387545279120,1387545279120,1387545279120,1387545279120,1387545279120,1],
+--R    [1,1,1,1,1,1]]
+--RType: List List NewSparseMultivariatePolynomial(Integer,OrderedVariableList [a,b,c,d,e,f])
+--E 16
+
+--S 17 of 22
+squareFreeLexTriangular(lg,true)$lextripack
+--R 
+--R
+--R   (17)
+--R   [
+--R       6       6       5     2 4     3 3     4 2     5
+--R     {f  + 1, e  - 3f e  + 3f e  - 4f e  + 3f e  - 3f e - 1,
+--R            2 5     3 4     4 3     5 2
+--R      3d + f e  - 4f e  + 4f e  - 2f e  - 2e + 2f, c + f,
+--R             2 5     3 4     4 3      5 2
+--R      3b + 2f e  - 5f e  + 5f e  - 10f e  - 4e + 7f,
+--R           2 5     3 4     4 3     5 2
+--R      a - f e  + 3f e  - 3f e  + 4f e  + 3e - 3f}
+--R     ,
+--R      6                  2           2
+--R    {f  - 1,e - f,d - f,c  + 4f c + f ,b + c + 4f,a - f},
+--R      6                        2           2
+--R    {f  - 1,e - f,d - f,c - f,b  + 4f b + f ,a + b + 4f},
+--R      6            2           2
+--R    {f  - 1,e - f,d  + 4f d + f ,c + d + 4f,b - f,a - f},
+--R
+--R       36        30          24          18          12        6
+--R     {f   - 2554f   - 399709f   - 502276f   - 399709f   - 2554f  + 1,
+--R
+--R                       2
+--R         1387545279120e
+--R       + 
+--R                        31                  25                    19
+--R             4321823003f   - 11037922310209f   - 1727506390124986f
+--R           + 
+--R                                13                    7
+--R             - 2176188913464634f   - 1732620732685741f  - 13506088516033f
+--R        *
+--R           e
+--R       + 
+--R                     32                  26                    20
+--R         24177661775f   - 61749727185325f   - 9664082618092450f
+--R       + 
+--R                             14                    8                  2
+--R         - 12152237485813570f   - 9672870290826025f  - 68544102808525f
+--R       ,
+--R
+--R         1387545279120d
+--R       + 
+--R                          30                 24                   18
+--R             - 1128983050f   + 2883434331830f   + 451234998755840f
+--R           + 
+--R                             12                   6
+--R             562426491685760f   + 447129055314890f  - 165557857270
+--R        *
+--R           e
+--R       + 
+--R                      31                 25                   19
+--R         - 1816935351f   + 4640452214013f   + 726247129626942f
+--R       + 
+--R                         13                   7
+--R         912871801716798f   + 726583262666877f  + 4909358645961f
+--R       ,
+--R
+--R                                    31                 25                   19
+--R         1387545279120c + 778171189f   - 1987468196267f   - 310993556954378f
+--R       + 
+--R                           13                   7
+--R         - 383262822316802f   - 300335488637543f  + 5289595037041f
+--R       ,
+--R
+--R         1387545279120b
+--R       + 
+--R                        30                 24                   18
+--R             1128983050f   - 2883434331830f   - 451234998755840f
+--R           + 
+--R                               12                   6
+--R             - 562426491685760f   - 447129055314890f  + 165557857270
+--R        *
+--R           e
+--R       + 
+--R                      31                 25                    19
+--R         - 3283058841f   + 8384938292463f   + 1312252817452422f
+--R       + 
+--R                          13                    7
+--R         1646579934064638f   + 1306372958656407f  + 4694680112151f
+--R       ,
+--R
+--R                                                      31                  25
+--R         1387545279120a + 1387545279120e + 4321823003f   - 11037922310209f
+--R       + 
+--R                            19                    13                    7
+--R         - 1727506390124986f   - 2176188913464634f   - 1732620732685741f
+--R       + 
+--R         - 13506088516033f
+--R       }
+--R     ,
+--R      6      2           2
+--R    {f  - 1,e  + 4f e + f ,d + e + 4f,c - f,b - f,a - f}]
+--RType: List SquareFreeRegularTriangularSet(Integer,IndexedExponents OrderedVariableList [a,b,c,d,e,f],OrderedVariableList [a,b,c,d,e,f],NewSparseMultivariatePolynomial(Integer,OrderedVariableList [a,b,c,d,e,f]))
+--E 17
+
+--S 18 of 22
+reduce(+,[degree(ts) for ts in lts])
+--R 
+--R
+--R   (18)  156
+--R                                                        Type: PositiveInteger
+--E 18
+
+--S 19 of 22
+ls2 : List Symbol := concat(ls,new()$Symbol)
+--R 
+--R
+--R   (19)  [a,b,c,d,e,f,%A]
+--R                                                            Type: List Symbol
+--E 19
+
+--S 20 of 22
+zdpack := ZDSOLVE(R,ls,ls2)
+--R 
+--R
+--R   (20)  ZeroDimensionalSolvePackage(Integer,[a,b,c,d,e,f],[a,b,c,d,e,f,%A])
+--R                                                                 Type: Domain
+--E 20
+
+--S 21 of 22
+concat [univariateSolve(ts)$zdpack for ts in lts]
+--R 
+--R
+--R   (21)
+--R   [
+--R                     4      2
+--R     [complexRoots= ?  - 13?  + 49,
+--R
+--R       coordinates =
+--R                 3                3                3                3
+--R         [7a + %A  - 6%A, 21b + %A  + %A, 21c - 2%A  + 19%A, 7d - %A  + 6%A,
+--R                  3                3
+--R          21e - %A  - %A, 21f + 2%A  - 19%A]
+--R       ]
+--R     ,
+--R
+--R                     4      2
+--R     [complexRoots= ?  + 11?  + 49,
+--R
+--R       coordinates =
+--R                   3                 3                  3
+--R         [35a + 3%A  + 19%A, 35b + %A  + 18%A, 35c - 2%A  - %A,
+--R                   3                 3                  3
+--R          35d - 3%A  - 19%A, 35e - %A  - 18%A, 35f + 2%A  + %A]
+--R       ]
+--R     ,
+--R
+--R     [
+--R       complexRoots =
+--R          8      7      6       5       4       3       2
+--R         ?  - 12?  + 58?  - 120?  + 207?  - 360?  + 802?  - 1332? + 1369
+--R       ,
+--R
+--R       coordinates =
+--R         [
+--R                                7           6            5            4
+--R             43054532a + 33782%A  - 546673%A  + 3127348%A  - 6927123%A
+--R           + 
+--R                      3             2
+--R             4365212%A  - 25086957%A  + 39582814%A - 107313172
+--R           ,
+--R
+--R                                7           6            5            4
+--R             43054532b - 33782%A  + 546673%A  - 3127348%A  + 6927123%A
+--R           + 
+--R                        3             2
+--R             - 4365212%A  + 25086957%A  - 39582814%A + 107313172
+--R           ,
+--R
+--R                                7           6            5            4
+--R             21527266c - 22306%A  + 263139%A  - 1166076%A  + 1821805%A
+--R           + 
+--R                        3             2
+--R             - 2892788%A  + 10322663%A  - 9026596%A + 12950740
+--R           ,
+--R
+--R                                7           6            5            4
+--R             43054532d + 22306%A  - 263139%A  + 1166076%A  - 1821805%A
+--R           + 
+--R                      3             2
+--R             2892788%A  - 10322663%A  + 30553862%A - 12950740
+--R           ,
+--R
+--R                                7           6            5            4
+--R             43054532e - 22306%A  + 263139%A  - 1166076%A  + 1821805%A
+--R           + 
+--R                        3             2
+--R             - 2892788%A  + 10322663%A  - 30553862%A + 12950740
+--R           ,
+--R
+--R                                7           6            5            4
+--R             21527266f + 22306%A  - 263139%A  + 1166076%A  - 1821805%A
+--R           + 
+--R                      3             2
+--R             2892788%A  - 10322663%A  + 9026596%A - 12950740
+--R           ]
+--R       ]
+--R     ,
+--R
+--R     [
+--R       complexRoots =
+--R          8      7      6       5       4       3       2
+--R         ?  + 12?  + 58?  + 120?  + 207?  + 360?  + 802?  + 1332? + 1369
+--R       ,
+--R
+--R       coordinates =
+--R         [
+--R                                7           6            5            4
+--R             43054532a + 33782%A  + 546673%A  + 3127348%A  + 6927123%A
+--R           + 
+--R                      3             2
+--R             4365212%A  + 25086957%A  + 39582814%A + 107313172
+--R           ,
+--R
+--R                                7           6            5            4
+--R             43054532b - 33782%A  - 546673%A  - 3127348%A  - 6927123%A
+--R           + 
+--R                        3             2
+--R             - 4365212%A  - 25086957%A  - 39582814%A - 107313172
+--R           ,
+--R
+--R                                7           6            5            4
+--R             21527266c - 22306%A  - 263139%A  - 1166076%A  - 1821805%A
+--R           + 
+--R                        3             2
+--R             - 2892788%A  - 10322663%A  - 9026596%A - 12950740
+--R           ,
+--R
+--R                                7           6            5            4
+--R             43054532d + 22306%A  + 263139%A  + 1166076%A  + 1821805%A
+--R           + 
+--R                      3             2
+--R             2892788%A  + 10322663%A  + 30553862%A + 12950740
+--R           ,
+--R
+--R                                7           6            5            4
+--R             43054532e - 22306%A  - 263139%A  - 1166076%A  - 1821805%A
+--R           + 
+--R                        3             2
+--R             - 2892788%A  - 10322663%A  - 30553862%A - 12950740
+--R           ,
+--R
+--R                                7           6            5            4
+--R             21527266f + 22306%A  + 263139%A  + 1166076%A  + 1821805%A
+--R           + 
+--R                      3             2
+--R             2892788%A  + 10322663%A  + 9026596%A + 12950740
+--R           ]
+--R       ]
+--R     ,
+--R
+--R                     4    2
+--R     [complexRoots= ?  - ?  + 1,
+--R                                 3            3              3            3
+--R      coordinates= [a - %A,b + %A  - %A,c + %A ,d + %A,e - %A  + %A,f - %A ]]
+--R     ,
+--R
+--R                     8     6      4      2
+--R     [complexRoots= ?  + 4?  + 12?  + 16?  + 4,
+--R
+--R       coordinates =
+--R                  7      5       3                 7      5       3
+--R         [4a - 2%A  - 7%A  - 20%A  - 22%A, 4b + 2%A  + 7%A  + 20%A  + 22%A,
+--R                 7      5       3                7      5       3
+--R          4c + %A  + 3%A  + 10%A  + 10%A, 4d + %A  + 3%A  + 10%A  + 6%A,
+--R                 7      5       3               7      5       3
+--R          4e - %A  - 3%A  - 10%A  - 6%A, 4f - %A  - 3%A  - 10%A  - 10%A]
+--R       ]
+--R     ,
+--R
+--R                     4     3      2
+--R     [complexRoots= ?  + 6?  + 30?  + 36? + 36,
+--R
+--R       coordinates =
+--R                  3      2                    3      2
+--R         [30a - %A  - 5%A  - 30%A - 6, 6b + %A  + 5%A  + 24%A + 6,
+--R                  3      2              3      2
+--R          30c - %A  - 5%A  - 6, 30d - %A  - 5%A  - 30%A - 6,
+--R                  3      2                     3      2
+--R          30e - %A  - 5%A  - 30%A - 6, 30f - %A  - 5%A  - 30%A - 6]
+--R       ]
+--R     ,
+--R
+--R                     4     3      2
+--R     [complexRoots= ?  - 6?  + 30?  - 36? + 36,
+--R
+--R       coordinates =
+--R                  3      2                    3      2
+--R         [30a - %A  + 5%A  - 30%A + 6, 6b + %A  - 5%A  + 24%A - 6,
+--R                  3      2              3      2
+--R          30c - %A  + 5%A  + 6, 30d - %A  + 5%A  - 30%A + 6,
+--R                  3      2                     3      2
+--R          30e - %A  + 5%A  - 30%A + 6, 30f - %A  + 5%A  - 30%A + 6]
+--R       ]
+--R     ,
+--R
+--R                     2
+--R     [complexRoots= ?  + 6? + 6,
+--R      coordinates= [a + 1,b - %A - 5,c + %A + 1,d + 1,e + 1,f + 1]]
+--R     ,
+--R
+--R                     2
+--R     [complexRoots= ?  - 6? + 6,
+--R      coordinates= [a - 1,b - %A + 5,c + %A - 1,d - 1,e - 1,f - 1]]
+--R     ,
+--R
+--R                     4     3      2
+--R     [complexRoots= ?  + 6?  + 30?  + 36? + 36,
+--R
+--R       coordinates =
+--R                 3      2                     3      2
+--R         [6a + %A  + 5%A  + 24%A + 6, 30b - %A  - 5%A  - 6,
+--R                  3      2                     3      2
+--R          30c - %A  - 5%A  - 30%A - 6, 30d - %A  - 5%A  - 30%A - 6,
+--R                  3      2                     3      2
+--R          30e - %A  - 5%A  - 30%A - 6, 30f - %A  - 5%A  - 30%A - 6]
+--R       ]
+--R     ,
+--R
+--R                     4     3      2
+--R     [complexRoots= ?  - 6?  + 30?  - 36? + 36,
+--R
+--R       coordinates =
+--R                 3      2                     3      2
+--R         [6a + %A  - 5%A  + 24%A - 6, 30b - %A  + 5%A  + 6,
+--R                  3      2                     3      2
+--R          30c - %A  + 5%A  - 30%A + 6, 30d - %A  + 5%A  - 30%A + 6,
+--R                  3      2                     3      2
+--R          30e - %A  + 5%A  - 30%A + 6, 30f - %A  + 5%A  - 30%A + 6]
+--R       ]
+--R     ,
+--R
+--R                     2
+--R     [complexRoots= ?  + 6? + 6,
+--R      coordinates= [a - %A - 5,b + %A + 1,c + 1,d + 1,e + 1,f + 1]]
+--R     ,
+--R
+--R                     2
+--R     [complexRoots= ?  - 6? + 6,
+--R      coordinates= [a - %A + 5,b + %A - 1,c - 1,d - 1,e - 1,f - 1]]
+--R     ,
+--R
+--R                     4     3      2
+--R     [complexRoots= ?  + 6?  + 30?  + 36? + 36,
+--R
+--R       coordinates =
+--R                  3      2                     3      2
+--R         [30a - %A  - 5%A  - 30%A - 6, 30b - %A  - 5%A  - 30%A - 6,
+--R                 3      2                     3      2
+--R          6c + %A  + 5%A  + 24%A + 6, 30d - %A  - 5%A  - 6,
+--R                  3      2                     3      2
+--R          30e - %A  - 5%A  - 30%A - 6, 30f - %A  - 5%A  - 30%A - 6]
+--R       ]
+--R     ,
+--R
+--R                     4     3      2
+--R     [complexRoots= ?  - 6?  + 30?  - 36? + 36,
+--R
+--R       coordinates =
+--R                  3      2                     3      2
+--R         [30a - %A  + 5%A  - 30%A + 6, 30b - %A  + 5%A  - 30%A + 6,
+--R                 3      2                     3      2
+--R          6c + %A  - 5%A  + 24%A - 6, 30d - %A  + 5%A  + 6,
+--R                  3      2                     3      2
+--R          30e - %A  + 5%A  - 30%A + 6, 30f - %A  + 5%A  - 30%A + 6]
+--R       ]
+--R     ,
+--R
+--R                     2
+--R     [complexRoots= ?  + 6? + 6,
+--R      coordinates= [a + 1,b + 1,c - %A - 5,d + %A + 1,e + 1,f + 1]]
+--R     ,
+--R
+--R                     2
+--R     [complexRoots= ?  - 6? + 6,
+--R      coordinates= [a - 1,b - 1,c - %A + 5,d + %A - 1,e - 1,f - 1]]
+--R     ,
+--R
+--R                     8     7      6      5      4     2
+--R     [complexRoots= ?  + 6?  + 16?  + 24?  + 18?  - 8?  + 4,
+--R
+--R       coordinates =
+--R                  7      6       5       4      3       2
+--R         [2a + 2%A  + 9%A  + 18%A  + 19%A  + 4%A  - 10%A  - 2%A + 4,
+--R                  7      6       5       4      3       2
+--R          2b + 2%A  + 9%A  + 18%A  + 19%A  + 4%A  - 10%A  - 4%A + 4,
+--R                 7      6      5      4      3
+--R          2c - %A  - 4%A  - 8%A  - 9%A  - 4%A  - 2%A - 4,
+--R                 7      6      5      4      3
+--R          2d + %A  + 4%A  + 8%A  + 9%A  + 4%A  + 2%A + 4,
+--R                  7      6       5       4      3       2
+--R          2e - 2%A  - 9%A  - 18%A  - 19%A  - 4%A  + 10%A  + 4%A - 4,
+--R                  7      6       5       4      3       2
+--R          2f - 2%A  - 9%A  - 18%A  - 19%A  - 4%A  + 10%A  + 2%A - 4]
+--R       ]
+--R     ,
+--R
+--R     [
+--R       complexRoots =
+--R          8      7      6       5       4       3        2
+--R         ?  + 12?  + 64?  + 192?  + 432?  + 768?  + 1024?  + 768? + 256
+--R       ,
+--R
+--R       coordinates =
+--R         [
+--R                         7        6        5         4         3         2
+--R             1408a - 19%A  - 200%A  - 912%A  - 2216%A  - 4544%A  - 6784%A
+--R           + 
+--R             - 6976%A - 1792
+--R           ,
+--R
+--R                         7        6         5         4          3          2
+--R             1408b - 37%A  - 408%A  - 1952%A  - 5024%A  - 10368%A  - 16768%A
+--R           + 
+--R             - 17920%A - 5120
+--R           ,
+--R
+--R                         7        6         5         4          3          2
+--R             1408c + 37%A  + 408%A  + 1952%A  + 5024%A  + 10368%A  + 16768%A
+--R           + 
+--R             17920%A + 5120
+--R           ,
+--R
+--R                         7        6        5         4         3         2
+--R             1408d + 19%A  + 200%A  + 912%A  + 2216%A  + 4544%A  + 6784%A
+--R           + 
+--R             6976%A + 1792
+--R           ,
+--R          2e + %A, 2f - %A]
+--R       ]
+--R     ,
+--R
+--R                     8     6      4      2
+--R     [complexRoots= ?  + 4?  + 12?  + 16?  + 4,
+--R
+--R       coordinates =
+--R                 7      5       3               7      5       3
+--R         [4a - %A  - 3%A  - 10%A  - 6%A, 4b - %A  - 3%A  - 10%A  - 10%A,
+--R                  7      5       3                 7      5       3
+--R          4c - 2%A  - 7%A  - 20%A  - 22%A, 4d + 2%A  + 7%A  + 20%A  + 22%A,
+--R                 7      5       3                7      5       3
+--R          4e + %A  + 3%A  + 10%A  + 10%A, 4f + %A  + 3%A  + 10%A  + 6%A]
+--R       ]
+--R     ,
+--R
+--R                     8      6      4       2
+--R     [complexRoots= ?  + 16?  - 96?  + 256?  + 256,
+--R
+--R       coordinates =
+--R                   7       5        3
+--R         [512a - %A  - 12%A  + 176%A  - 448%A,
+--R                   7       5       3
+--R          128b - %A  - 16%A  + 96%A  - 256%A,
+--R                   7       5       3
+--R          128c + %A  + 16%A  - 96%A  + 256%A,
+--R                   7       5        3
+--R          512d + %A  + 12%A  - 176%A  + 448%A, 2e + %A, 2f - %A]
+--R       ]
+--R     ,
+--R
+--R     [
+--R       complexRoots =
+--R          8      7      6       5       4       3        2
+--R         ?  - 12?  + 64?  - 192?  + 432?  - 768?  + 1024?  - 768? + 256
+--R       ,
+--R
+--R       coordinates =
+--R         [
+--R                         7        6        5         4         3         2
+--R             1408a - 19%A  + 200%A  - 912%A  + 2216%A  - 4544%A  + 6784%A
+--R           + 
+--R             - 6976%A + 1792
+--R           ,
+--R
+--R                         7        6         5         4          3          2
+--R             1408b - 37%A  + 408%A  - 1952%A  + 5024%A  - 10368%A  + 16768%A
+--R           + 
+--R             - 17920%A + 5120
+--R           ,
+--R
+--R                         7        6         5         4          3          2
+--R             1408c + 37%A  - 408%A  + 1952%A  - 5024%A  + 10368%A  - 16768%A
+--R           + 
+--R             17920%A - 5120
+--R           ,
+--R
+--R                         7        6        5         4         3         2
+--R             1408d + 19%A  - 200%A  + 912%A  - 2216%A  + 4544%A  - 6784%A
+--R           + 
+--R             6976%A - 1792
+--R           ,
+--R          2e + %A, 2f - %A]
+--R       ]
+--R     ,
+--R
+--R                     8     7      6      5      4     2
+--R     [complexRoots= ?  - 6?  + 16?  - 24?  + 18?  - 8?  + 4,
+--R
+--R       coordinates =
+--R                  7      6       5       4      3       2
+--R         [2a + 2%A  - 9%A  + 18%A  - 19%A  + 4%A  + 10%A  - 2%A - 4,
+--R                  7      6       5       4      3       2
+--R          2b + 2%A  - 9%A  + 18%A  - 19%A  + 4%A  + 10%A  - 4%A - 4,
+--R                 7      6      5      4      3
+--R          2c - %A  + 4%A  - 8%A  + 9%A  - 4%A  - 2%A + 4,
+--R                 7      6      5      4      3
+--R          2d + %A  - 4%A  + 8%A  - 9%A  + 4%A  + 2%A - 4,
+--R                  7      6       5       4      3       2
+--R          2e - 2%A  + 9%A  - 18%A  + 19%A  - 4%A  - 10%A  + 4%A + 4,
+--R                  7      6       5       4      3       2
+--R          2f - 2%A  + 9%A  - 18%A  + 19%A  - 4%A  - 10%A  + 2%A + 4]
+--R       ]
+--R     ,
+--R
+--R                     4      2
+--R     [complexRoots= ?  + 12?  + 144,
+--R
+--R       coordinates =
+--R                  2               2               2               2
+--R         [12a - %A  - 12, 12b - %A  - 12, 12c - %A  - 12, 12d - %A  - 12,
+--R                 2                    2
+--R          6e + %A  + 3%A + 12, 6f + %A  - 3%A + 12]
+--R       ]
+--R     ,
+--R
+--R                     4     3      2
+--R     [complexRoots= ?  + 6?  + 30?  + 36? + 36,
+--R
+--R       coordinates =
+--R                 3      2                     3      2
+--R         [6a - %A  - 5%A  - 24%A - 6, 30b + %A  + 5%A  + 30%A + 6,
+--R                  3      2                     3      2
+--R          30c + %A  + 5%A  + 30%A + 6, 30d + %A  + 5%A  + 30%A + 6,
+--R                  3      2                     3      2
+--R          30e + %A  + 5%A  + 30%A + 6, 30f + %A  + 5%A  + 6]
+--R       ]
+--R     ,
+--R
+--R                     4     3      2
+--R     [complexRoots= ?  - 6?  + 30?  - 36? + 36,
+--R
+--R       coordinates =
+--R                 3      2                     3      2
+--R         [6a - %A  + 5%A  - 24%A + 6, 30b + %A  - 5%A  + 30%A - 6,
+--R                  3      2                     3      2
+--R          30c + %A  - 5%A  + 30%A - 6, 30d + %A  - 5%A  + 30%A - 6,
+--R                  3      2                     3      2
+--R          30e + %A  - 5%A  + 30%A - 6, 30f + %A  - 5%A  - 6]
+--R       ]
+--R     ,
+--R
+--R                     4      2
+--R     [complexRoots= ?  + 12?  + 144,
+--R
+--R       coordinates =
+--R                  2               2               2               2
+--R         [12a + %A  + 12, 12b + %A  + 12, 12c + %A  + 12, 12d + %A  + 12,
+--R                 2                    2
+--R          6e - %A  + 3%A - 12, 6f - %A  - 3%A - 12]
+--R       ]
+--R     ,
+--R
+--R                     2
+--R     [complexRoots= ?  - 12,
+--R      coordinates= [a - 1,b - 1,c - 1,d - 1,2e + %A + 4,2f - %A + 4]]
+--R     ,
+--R
+--R                     2
+--R     [complexRoots= ?  + 6? + 6,
+--R      coordinates= [a + %A + 5,b - 1,c - 1,d - 1,e - 1,f - %A - 1]]
+--R     ,
+--R
+--R                     2
+--R     [complexRoots= ?  - 6? + 6,
+--R      coordinates= [a + %A - 5,b + 1,c + 1,d + 1,e + 1,f - %A + 1]]
+--R     ,
+--R
+--R                     2
+--R     [complexRoots= ?  - 12,
+--R      coordinates= [a + 1,b + 1,c + 1,d + 1,2e + %A - 4,2f - %A - 4]]
+--R     ,
+--R
+--R                     4     3      2
+--R     [complexRoots= ?  + 6?  + 30?  + 36? + 36,
+--R
+--R       coordinates =
+--R                  3      2                     3      2
+--R         [30a - %A  - 5%A  - 30%A - 6, 30b - %A  - 5%A  - 30%A - 6,
+--R                  3      2                    3      2
+--R          30c - %A  - 5%A  - 30%A - 6, 6d + %A  + 5%A  + 24%A + 6,
+--R                  3      2              3      2
+--R          30e - %A  - 5%A  - 6, 30f - %A  - 5%A  - 30%A - 6]
+--R       ]
+--R     ,
+--R
+--R                     4     3      2
+--R     [complexRoots= ?  - 6?  + 30?  - 36? + 36,
+--R
+--R       coordinates =
+--R                  3      2                     3      2
+--R         [30a - %A  + 5%A  - 30%A + 6, 30b - %A  + 5%A  - 30%A + 6,
+--R                  3      2                    3      2
+--R          30c - %A  + 5%A  - 30%A + 6, 6d + %A  - 5%A  + 24%A - 6,
+--R                  3      2              3      2
+--R          30e - %A  + 5%A  + 6, 30f - %A  + 5%A  - 30%A + 6]
+--R       ]
+--R     ,
+--R
+--R                     2
+--R     [complexRoots= ?  + 6? + 6,
+--R      coordinates= [a + 1,b + 1,c + 1,d - %A - 5,e + %A + 1,f + 1]]
+--R     ,
+--R
+--R                     2
+--R     [complexRoots= ?  - 6? + 6,
+--R      coordinates= [a - 1,b - 1,c - 1,d - %A + 5,e + %A - 1,f - 1]]
+--R     ]
+--RType: List Record(complexRoots: SparseUnivariatePolynomial Integer,coordinates: List Polynomial Integer)
+--E 21
+
+--S 22 of 22
+concat [realSolve(ts)$zdpack for ts in lts] 
+--R 
+--R
+--R   (22)
+--R   [[%B1,%B1,%B1,%B5,- %B5 - 4%B1,%B1], [%B1,%B1,%B1,%B6,- %B6 - 4%B1,%B1],
+--R    [%B2,%B2,%B2,%B3,- %B3 - 4%B2,%B2], [%B2,%B2,%B2,%B4,- %B4 - 4%B2,%B2],
+--R    [%B7,%B7,%B7,%B7,%B11,- %B11 - 4%B7], [%B7,%B7,%B7,%B7,%B12,- %B12 - 4%B7],
+--R    [%B8,%B8,%B8,%B8,%B9,- %B9 - 4%B8], [%B8,%B8,%B8,%B8,%B10,- %B10 - 4%B8],
+--R    [%B13,%B13,%B17,- %B17 - 4%B13,%B13,%B13],
+--R    [%B13,%B13,%B18,- %B18 - 4%B13,%B13,%B13],
+--R    [%B14,%B14,%B15,- %B15 - 4%B14,%B14,%B14],
+--R    [%B14,%B14,%B16,- %B16 - 4%B14,%B14,%B14],
+--R
+--R     [%B19, %B29,
+--R
+--R           7865521      31   6696179241     25   25769893181     19
+--R         ---------- %B19   - ---------- %B19   - ----------- %B19
+--R         6006689520          2002229840            49235160
+--R       + 
+--R           1975912990729     13   1048460696489     7   21252634831
+--R         - ------------- %B19   - ------------- %B19  - ----------- %B19
+--R             3003344760             2002229840           6006689520
+--R       ,
+--R
+--R             778171189       31   1987468196267     25   155496778477189     19
+--R         - ------------- %B19   + ------------- %B19   + --------------- %B19
+--R           1387545279120          1387545279120            693772639560
+--R       + 
+--R         191631411158401     13   300335488637543     7   755656433863
+--R         --------------- %B19   + --------------- %B19  - ------------ %B19
+--R           693772639560            1387545279120          198220754160
+--R       ,
+--R
+--R          1094352947      31   2794979430821     25   218708802908737     19
+--R         ------------ %B19   - ------------- %B19   - --------------- %B19
+--R         462515093040           462515093040            231257546520
+--R       + 
+--R           91476663003591     13   145152550961823     7   1564893370717
+--R         - -------------- %B19   - --------------- %B19  - ------------- %B19
+--R             77085848840             154171697680           462515093040
+--R       ,
+--R
+--R                    4321823003      31   180949546069     25
+--R         - %B29 - ------------- %B19   + ------------ %B19
+--R                  1387545279120           22746643920
+--R       + 
+--R         863753195062493     19   1088094456732317     13
+--R         --------------- %B19   + ---------------- %B19
+--R           693772639560             693772639560
+--R       + 
+--R         1732620732685741     7   13506088516033
+--R         ---------------- %B19  + -------------- %B19
+--R           1387545279120           1387545279120
+--R       ]
+--R     ,
+--R
+--R     [%B19, %B30,
+--R
+--R           7865521      31   6696179241     25   25769893181     19
+--R         ---------- %B19   - ---------- %B19   - ----------- %B19
+--R         6006689520          2002229840            49235160
+--R       + 
+--R           1975912990729     13   1048460696489     7   21252634831
+--R         - ------------- %B19   - ------------- %B19  - ----------- %B19
+--R             3003344760             2002229840           6006689520
+--R       ,
+--R
+--R             778171189       31   1987468196267     25   155496778477189     19
+--R         - ------------- %B19   + ------------- %B19   + --------------- %B19
+--R           1387545279120          1387545279120            693772639560
+--R       + 
+--R         191631411158401     13   300335488637543     7   755656433863
+--R         --------------- %B19   + --------------- %B19  - ------------ %B19
+--R           693772639560            1387545279120          198220754160
+--R       ,
+--R
+--R          1094352947      31   2794979430821     25   218708802908737     19
+--R         ------------ %B19   - ------------- %B19   - --------------- %B19
+--R         462515093040           462515093040            231257546520
+--R       + 
+--R           91476663003591     13   145152550961823     7   1564893370717
+--R         - -------------- %B19   - --------------- %B19  - ------------- %B19
+--R             77085848840             154171697680           462515093040
+--R       ,
+--R
+--R                    4321823003      31   180949546069     25
+--R         - %B30 - ------------- %B19   + ------------ %B19
+--R                  1387545279120           22746643920
+--R       + 
+--R         863753195062493     19   1088094456732317     13
+--R         --------------- %B19   + ---------------- %B19
+--R           693772639560             693772639560
+--R       + 
+--R         1732620732685741     7   13506088516033
+--R         ---------------- %B19  + -------------- %B19
+--R           1387545279120           1387545279120
+--R       ]
+--R     ,
+--R
+--R     [%B20, %B27,
+--R
+--R           7865521      31   6696179241     25   25769893181     19
+--R         ---------- %B20   - ---------- %B20   - ----------- %B20
+--R         6006689520          2002229840            49235160
+--R       + 
+--R           1975912990729     13   1048460696489     7   21252634831
+--R         - ------------- %B20   - ------------- %B20  - ----------- %B20
+--R             3003344760             2002229840           6006689520
+--R       ,
+--R
+--R             778171189       31   1987468196267     25   155496778477189     19
+--R         - ------------- %B20   + ------------- %B20   + --------------- %B20
+--R           1387545279120          1387545279120            693772639560
+--R       + 
+--R         191631411158401     13   300335488637543     7   755656433863
+--R         --------------- %B20   + --------------- %B20  - ------------ %B20
+--R           693772639560            1387545279120          198220754160
+--R       ,
+--R
+--R          1094352947      31   2794979430821     25   218708802908737     19
+--R         ------------ %B20   - ------------- %B20   - --------------- %B20
+--R         462515093040           462515093040            231257546520
+--R       + 
+--R           91476663003591     13   145152550961823     7   1564893370717
+--R         - -------------- %B20   - --------------- %B20  - ------------- %B20
+--R             77085848840             154171697680           462515093040
+--R       ,
+--R
+--R                    4321823003      31   180949546069     25
+--R         - %B27 - ------------- %B20   + ------------ %B20
+--R                  1387545279120           22746643920
+--R       + 
+--R         863753195062493     19   1088094456732317     13
+--R         --------------- %B20   + ---------------- %B20
+--R           693772639560             693772639560
+--R       + 
+--R         1732620732685741     7   13506088516033
+--R         ---------------- %B20  + -------------- %B20
+--R           1387545279120           1387545279120
+--R       ]
+--R     ,
+--R
+--R     [%B20, %B28,
+--R
+--R           7865521      31   6696179241     25   25769893181     19
+--R         ---------- %B20   - ---------- %B20   - ----------- %B20
+--R         6006689520          2002229840            49235160
+--R       + 
+--R           1975912990729     13   1048460696489     7   21252634831
+--R         - ------------- %B20   - ------------- %B20  - ----------- %B20
+--R             3003344760             2002229840           6006689520
+--R       ,
+--R
+--R             778171189       31   1987468196267     25   155496778477189     19
+--R         - ------------- %B20   + ------------- %B20   + --------------- %B20
+--R           1387545279120          1387545279120            693772639560
+--R       + 
+--R         191631411158401     13   300335488637543     7   755656433863
+--R         --------------- %B20   + --------------- %B20  - ------------ %B20
+--R           693772639560            1387545279120          198220754160
+--R       ,
+--R
+--R          1094352947      31   2794979430821     25   218708802908737     19
+--R         ------------ %B20   - ------------- %B20   - --------------- %B20
+--R         462515093040           462515093040            231257546520
+--R       + 
+--R           91476663003591     13   145152550961823     7   1564893370717
+--R         - -------------- %B20   - --------------- %B20  - ------------- %B20
+--R             77085848840             154171697680           462515093040
+--R       ,
+--R
+--R                    4321823003      31   180949546069     25
+--R         - %B28 - ------------- %B20   + ------------ %B20
+--R                  1387545279120           22746643920
+--R       + 
+--R         863753195062493     19   1088094456732317     13
+--R         --------------- %B20   + ---------------- %B20
+--R           693772639560             693772639560
+--R       + 
+--R         1732620732685741     7   13506088516033
+--R         ---------------- %B20  + -------------- %B20
+--R           1387545279120           1387545279120
+--R       ]
+--R     ,
+--R
+--R     [%B21, %B25,
+--R
+--R           7865521      31   6696179241     25   25769893181     19
+--R         ---------- %B21   - ---------- %B21   - ----------- %B21
+--R         6006689520          2002229840            49235160
+--R       + 
+--R           1975912990729     13   1048460696489     7   21252634831
+--R         - ------------- %B21   - ------------- %B21  - ----------- %B21
+--R             3003344760             2002229840           6006689520
+--R       ,
+--R
+--R             778171189       31   1987468196267     25   155496778477189     19
+--R         - ------------- %B21   + ------------- %B21   + --------------- %B21
+--R           1387545279120          1387545279120            693772639560
+--R       + 
+--R         191631411158401     13   300335488637543     7   755656433863
+--R         --------------- %B21   + --------------- %B21  - ------------ %B21
+--R           693772639560            1387545279120          198220754160
+--R       ,
+--R
+--R          1094352947      31   2794979430821     25   218708802908737     19
+--R         ------------ %B21   - ------------- %B21   - --------------- %B21
+--R         462515093040           462515093040            231257546520
+--R       + 
+--R           91476663003591     13   145152550961823     7   1564893370717
+--R         - -------------- %B21   - --------------- %B21  - ------------- %B21
+--R             77085848840             154171697680           462515093040
+--R       ,
+--R
+--R                    4321823003      31   180949546069     25
+--R         - %B25 - ------------- %B21   + ------------ %B21
+--R                  1387545279120           22746643920
+--R       + 
+--R         863753195062493     19   1088094456732317     13
+--R         --------------- %B21   + ---------------- %B21
+--R           693772639560             693772639560
+--R       + 
+--R         1732620732685741     7   13506088516033
+--R         ---------------- %B21  + -------------- %B21
+--R           1387545279120           1387545279120
+--R       ]
+--R     ,
+--R
+--R     [%B21, %B26,
+--R
+--R           7865521      31   6696179241     25   25769893181     19
+--R         ---------- %B21   - ---------- %B21   - ----------- %B21
+--R         6006689520          2002229840            49235160
+--R       + 
+--R           1975912990729     13   1048460696489     7   21252634831
+--R         - ------------- %B21   - ------------- %B21  - ----------- %B21
+--R             3003344760             2002229840           6006689520
+--R       ,
+--R
+--R             778171189       31   1987468196267     25   155496778477189     19
+--R         - ------------- %B21   + ------------- %B21   + --------------- %B21
+--R           1387545279120          1387545279120            693772639560
+--R       + 
+--R         191631411158401     13   300335488637543     7   755656433863
+--R         --------------- %B21   + --------------- %B21  - ------------ %B21
+--R           693772639560            1387545279120          198220754160
+--R       ,
+--R
+--R          1094352947      31   2794979430821     25   218708802908737     19
+--R         ------------ %B21   - ------------- %B21   - --------------- %B21
+--R         462515093040           462515093040            231257546520
+--R       + 
+--R           91476663003591     13   145152550961823     7   1564893370717
+--R         - -------------- %B21   - --------------- %B21  - ------------- %B21
+--R             77085848840             154171697680           462515093040
+--R       ,
+--R
+--R                    4321823003      31   180949546069     25
+--R         - %B26 - ------------- %B21   + ------------ %B21
+--R                  1387545279120           22746643920
+--R       + 
+--R         863753195062493     19   1088094456732317     13
+--R         --------------- %B21   + ---------------- %B21
+--R           693772639560             693772639560
+--R       + 
+--R         1732620732685741     7   13506088516033
+--R         ---------------- %B21  + -------------- %B21
+--R           1387545279120           1387545279120
+--R       ]
+--R     ,
+--R
+--R     [%B22, %B23,
+--R
+--R           7865521      31   6696179241     25   25769893181     19
+--R         ---------- %B22   - ---------- %B22   - ----------- %B22
+--R         6006689520          2002229840            49235160
+--R       + 
+--R           1975912990729     13   1048460696489     7   21252634831
+--R         - ------------- %B22   - ------------- %B22  - ----------- %B22
+--R             3003344760             2002229840           6006689520
+--R       ,
+--R
+--R             778171189       31   1987468196267     25   155496778477189     19
+--R         - ------------- %B22   + ------------- %B22   + --------------- %B22
+--R           1387545279120          1387545279120            693772639560
+--R       + 
+--R         191631411158401     13   300335488637543     7   755656433863
+--R         --------------- %B22   + --------------- %B22  - ------------ %B22
+--R           693772639560            1387545279120          198220754160
+--R       ,
+--R
+--R          1094352947      31   2794979430821     25   218708802908737     19
+--R         ------------ %B22   - ------------- %B22   - --------------- %B22
+--R         462515093040           462515093040            231257546520
+--R       + 
+--R           91476663003591     13   145152550961823     7   1564893370717
+--R         - -------------- %B22   - --------------- %B22  - ------------- %B22
+--R             77085848840             154171697680           462515093040
+--R       ,
+--R
+--R                    4321823003      31   180949546069     25
+--R         - %B23 - ------------- %B22   + ------------ %B22
+--R                  1387545279120           22746643920
+--R       + 
+--R         863753195062493     19   1088094456732317     13
+--R         --------------- %B22   + ---------------- %B22
+--R           693772639560             693772639560
+--R       + 
+--R         1732620732685741     7   13506088516033
+--R         ---------------- %B22  + -------------- %B22
+--R           1387545279120           1387545279120
+--R       ]
+--R     ,
+--R
+--R     [%B22, %B24,
+--R
+--R           7865521      31   6696179241     25   25769893181     19
+--R         ---------- %B22   - ---------- %B22   - ----------- %B22
+--R         6006689520          2002229840            49235160
+--R       + 
+--R           1975912990729     13   1048460696489     7   21252634831
+--R         - ------------- %B22   - ------------- %B22  - ----------- %B22
+--R             3003344760             2002229840           6006689520
+--R       ,
+--R
+--R             778171189       31   1987468196267     25   155496778477189     19
+--R         - ------------- %B22   + ------------- %B22   + --------------- %B22
+--R           1387545279120          1387545279120            693772639560
+--R       + 
+--R         191631411158401     13   300335488637543     7   755656433863
+--R         --------------- %B22   + --------------- %B22  - ------------ %B22
+--R           693772639560            1387545279120          198220754160
+--R       ,
+--R
+--R          1094352947      31   2794979430821     25   218708802908737     19
+--R         ------------ %B22   - ------------- %B22   - --------------- %B22
+--R         462515093040           462515093040            231257546520
+--R       + 
+--R           91476663003591     13   145152550961823     7   1564893370717
+--R         - -------------- %B22   - --------------- %B22  - ------------- %B22
+--R             77085848840             154171697680           462515093040
+--R       ,
+--R
+--R                    4321823003      31   180949546069     25
+--R         - %B24 - ------------- %B22   + ------------ %B22
+--R                  1387545279120           22746643920
+--R       + 
+--R         863753195062493     19   1088094456732317     13
+--R         --------------- %B22   + ---------------- %B22
+--R           693772639560             693772639560
+--R       + 
+--R         1732620732685741     7   13506088516033
+--R         ---------------- %B22  + -------------- %B22
+--R           1387545279120           1387545279120
+--R       ]
+--R     ,
+--R    [%B31,%B35,- %B35 - 4%B31,%B31,%B31,%B31],
+--R    [%B31,%B36,- %B36 - 4%B31,%B31,%B31,%B31],
+--R    [%B32,%B33,- %B33 - 4%B32,%B32,%B32,%B32],
+--R    [%B32,%B34,- %B34 - 4%B32,%B32,%B32,%B32]]
+--R                                 Type: List List RealClosure Fraction Integer
+--E 22
+)spool
+ 
+)spool
+)lisp (bye)
+@
+<<LexTriangularPackage.help>>=
+====================================================================
+LexTriangularPackage examples
+====================================================================
+
+The LexTriangularPackage package constructor provides an
+implementation of the lexTriangular algorithm (D. Lazard "Solving
+Zero-dimensional Algebraic Systems", J. of Symbol. Comput., 1992).
+This algorithm decomposes a zero-dimensional variety into zero-sets of
+regular triangular sets.  Thus the input system must have a finite
+number of complex solutions.  Moreover, this system needs to be a
+lexicographical Groebner basis.
+
+This package takes two arguments: the coefficient-ring R of the
+polynomials, which must be a GcdDomain and their set of variables
+given by ls a List Symbol.  The type of the input polynomials must be
+NewSparseMultivariatePolynomial(R,V) where V is OrderedVariableList(ls).  
+The abbreviation for LexTriangularPackage is LEXTRIPK.  The main operations 
+are lexTriangular and squareFreeLexTriangular.  The later provide 
+decompositions by means of square-free regular triangular sets, built 
+with the SquareFreeRegularTriangularSet constructor, whereas the former 
+uses the RegularTriangularSet constructor.  Note that these constructors
+also implement another algorithm for solving algebraic systems by
+means of regular triangular sets; in that case no computations of
+Groebner bases are needed and the input system may have any dimension
+(i.e. it may have an infinite number of solutions).
+
+The implementation of the lexTriangular algorithm provided in the
+LexTriangularPackage constructor differs from that reported in
+"Computations of gcd over algebraic towers of simple extensions" by
+M. Moreno Maza and R. Rioboo (in proceedings of AAECC11, Paris, 1995).
+Indeed, the squareFreeLexTriangular operation removes all multiplicities 
+of the solutions (i.e. the computed solutions are pairwise different) 
+and the lexTriangular operation may keep some multiplicities; this 
+later operation runs generally faster than the former.
+
+The interest of the lexTriangular algorithm is due to the
+following experimental remark.  For some examples, a triangular
+decomposition of a zero-dimensional variety can be computed faster via
+a lexicographical Groebner basis computation than by using a direct method 
+(like that of SquareFreeRegularTriangularSet and RegularTriangularSet).  
+This happens typically when the total degree of the system relies 
+essentially on its smallest variable (like in the Katsura systems).  
+When this is not the case, the direct method may give better timings 
+(like in the Rose system).
+
+Of course, the direct method can also be applied to a lexicographical
+Groebner basis.  However, the lexTriangular algorithm takes advantage 
+of the structure of this basis and avoids many unnecessary computations 
+which are performed by the direct method.
+
+For this purpose of solving algebraic systems with a finite number of
+solutions, see also the ZeroDimensionalSolvePackage.  It allows
+to use both strategies (the lexTriangular algorithm and the direct
+method) for computing either the complex or real roots of a system.
+
+Note that the way of understanding triangular decompositions is
+detailed in the example of the RegularTriangularSet constructor.
+
+Since the LexTriangularPackage package constructor is limited to
+zero-dimensional systems, it provides a zeroDimensional? operation to
+check whether this requirement holds.  There is also a groebner operation 
+to compute the lexicographical Groebner basis of a set of polynomials 
+with type NewSparseMultivariatePolynomial(R,V).  The elimination ordering 
+is that given by ls (the greatest variable being the first element
+of ls).  This basis is computed by the FLGM algorithm (Faugere et al. 
+"Efficient Computation of Zero-Dimensional Groebner Bases by Change 
+of Ordering" , J. of Symbol. Comput., 1993) implemented in the 
+LinGroebnerPackage package constructor.
+
+Once a lexicographical Groebner basis is computed, then one can call
+the operations lexTriangular and squareFreeLexTriangular.  Note that
+these operations admit an optional argument to produce normalized
+triangular sets.  There is also a zeroSetSplit operation which does
+all the job from the input system; an error is produced if this system
+is not zero-dimensional.
+
+Let us illustrate the facilities of the LexTriangularPackage constructor
+by a famous example, the cyclic-6 root system.
+
+Define the coefficient ring.
+
+  R := Integer
+   Integer
+                       Type: Domain
+
+Define the list of variables,
+
+  ls : List Symbol := [a,b,c,d,e,f]
+    [a,b,c,d,e,f]
+                      Type: List Symbol
+
+and make it an ordered set.
+
+  V := OVAR(ls)
+    OrderedVariableList [a,b,c,d,e,f]
+                      Type: Domain
+
+Define the polynomial ring.
+
+  P := NSMP(R, V)
+   NewSparseMultivariatePolynomial(Integer,OrderedVariableList [a,b,c,d,e,f])
+                      Type: Domain
+
+Define the polynomials.
+
+  p1: P :=  a*b*c*d*e*f - 1
+   f e d c b a - 1
+    Type: NewSparseMultivariatePolynomial(Integer,
+                                          OrderedVariableList [a,b,c,d,e,f])
+
+  p2: P := a*b*c*d*e +a*b*c*d*f +a*b*c*e*f +a*b*d*e*f +a*c*d*e*f +b*c*d*e*f 
+   ((((e + f)d + f e)c + f e d)b + f e d c)a + f e d c b
+    Type: NewSparseMultivariatePolynomial(Integer,
+                                          OrderedVariableList [a,b,c,d,e,f])
+
+  p3: P :=  a*b*c*d + a*b*c*f + a*b*e*f + a*d*e*f + b*c*d*e + c*d*e*f 
+   (((d + f)c + f e)b + f e d)a + e d c b + f e d c
+    Type: NewSparseMultivariatePolynomial(Integer,
+                                          OrderedVariableList [a,b,c,d,e,f])
+
+  p4: P := a*b*c + a*b*f + a*e*f + b*c*d + c*d*e + d*e*f 
+   ((c + f)b + f e)a + d c b + e d c + f e d
+    Type: NewSparseMultivariatePolynomial(Integer,
+                                          OrderedVariableList [a,b,c,d,e,f])
+
+  p5: P := a*b + a*f + b*c + c*d + d*e + e*f 
+   (b + f)a + c b + d c + e d + f e
+    Type: NewSparseMultivariatePolynomial(Integer,
+                                          OrderedVariableList [a,b,c,d,e,f])
+
+  p6: P := a + b + c + d + e + f 
+   a + b + c + d + e + f
+    Type: NewSparseMultivariatePolynomial(Integer,
+                                          OrderedVariableList [a,b,c,d,e,f])
+
+  lp := [p1, p2, p3, p4, p5, p6]
+    [f e d c b a - 1, ((((e + f)d + f e)c + f e d)b + f e d c)a + f e d c b,
+     (((d + f)c + f e)b + f e d)a + e d c b + f e d c,
+     ((c + f)b + f e)a + d c b + e d c + f e d,
+     (b + f)a + c b + d c + e d + f e, a + b + c + d + e + f]
+   Type: List NewSparseMultivariatePolynomial(Integer,
+                                           OrderedVariableList [a,b,c,d,e,f])
+
+Now call LEXTRIPK.
+
+  lextripack :=  LEXTRIPK(R,ls)
+    LexTriangularPackage(Integer,[a,b,c,d,e,f])
+                        Type: Domain
+
+Compute the lexicographical Groebner basis of the system.  This may
+take between 5 minutes and one hour, depending on your machine.
+
+  lg := groebner(lp)$lextripack
+   [a + b + c + d + e + f,
+                        2                                           2
+      3968379498283200b  + 15873517993132800f b + 3968379498283200d
+    + 
+                                              3 5                     4 4
+      15873517993132800f d + 3968379498283200f e  - 15873517993132800f e
+    + 
+                        5 3                       6                       2
+      23810276989699200f e  + (206355733910726400f  + 230166010900425600)e
+    + 
+                            43                       37
+          - 729705987316687f   + 1863667496867205421f
+        + 
+                                31                         25
+          291674853771731104461f   + 365285994691106921745f
+        + 
+                             19                         13
+          549961185828911895f   - 365048404038768439269f
+        + 
+                                  7
+          - 292382820431504027669f  - 2271898467631865497f
+     *
+        e
+    + 
+                         44                        38
+      - 3988812642545399f   + 10187423878429609997f
+    + 
+                             32                          26
+      1594377523424314053637f   + 1994739308439916238065f
+    + 
+                          20                          14
+      1596840088052642815f   - 1993494118301162145413f
+    + 
+                               8                        2
+      - 1596049742289689815053f  - 11488171330159667449f
+    ,
+                                                                      2
+      (23810276989699200c - 23810276989699200f)b + 23810276989699200c
+    + 
+                                               2
+      71430830969097600f c - 23810276989699200d  - 95241107958796800f d
+    + 
+                          3 5                      4 4                      5 3
+      - 55557312975964800f e  + 174608697924460800f e  - 174608697924460800f e
+    + 
+                             6                        2
+      (- 2428648252949318400f  - 2611193709870345600)e
+    + 
+                           43                        37
+          8305444561289527f   - 21212087151945459641f
+        + 
+                                   31                          25
+          - 3319815883093451385381f   - 4157691646261657136445f
+        + 
+                                19                          13
+          - 6072721607510764095f   + 4154986709036460221649f
+        + 
+                                 7
+          3327761311138587096749f  + 25885340608290841637f
+     *
+        e
+    + 
+                        44                         38
+      45815897629010329f   - 117013765582151891207f
+    + 
+                                32                           26
+      - 18313166848970865074187f   - 22909971239649297438915f
+    + 
+                             20                           14
+      - 16133250761305157265f   + 22897305857636178256623f
+    + 
+                              8                         2
+      18329944781867242497923f  + 130258531002020420699f
+    ,
+       (7936758996566400d - 7936758996566400f)b - 7936758996566400f d
+    + 
+                         3 5                     4 4                     5 3
+      - 7936758996566400f e  + 23810276989699200f e  - 23810276989699200f e
+    + 
+                            6                       2
+      (- 337312257354072000f  - 369059293340337600)e
+    + 
+                           43                       37
+          1176345388640471f   - 3004383582891473073f
+        + 
+                                  31                         25
+          - 470203502707246105653f   - 588858183402644348085f
+        + 
+                               19                         13
+          - 856939308623513535f   + 588472674242340526377f
+        + 
+                                7
+          471313241958371103517f  + 3659742549078552381f
+     *
+        e
+    + 
+                       44                        38                          32
+      6423170513956901f   - 16404772137036480803f   - 2567419165227528774463f
+    + 
+                               26                       20
+      - 3211938090825682172335f   - 2330490332697587485f
+    + 
+                             14                          8
+      3210100109444754864587f   + 2569858315395162617847f
+    + 
+                           2
+      18326089487427735751f
+    ,
+                                                                     3 5
+      (11905138494849600e - 11905138494849600f)b - 3968379498283200f e
+    + 
+                        4 4                     5 3
+      15873517993132800f e  - 27778656487982400f e
+    + 
+                            6                       2
+      (- 208339923659868000f  - 240086959646133600)e
+    + 
+                          43                       37
+          786029984751110f   - 2007519008182245250f
+        + 
+                                  31                         25
+          - 314188062908073807090f   - 393423667537929575250f
+        + 
+                               19                         13
+          - 550329120654394950f   + 393196408728889612770f
+        + 
+                                7
+          314892372799176495730f  + 2409386515146668530f
+     *
+        e
+    + 
+                       44                        38                          32
+      4177638546747827f   - 10669685294602576381f   - 1669852980419949524601f
+    + 
+                               26                       20
+      - 2089077057287904170745f   - 1569899763580278795f
+    + 
+                             14                          8
+      2087864026859015573349f   + 1671496085945199577969f
+    + 
+                           2
+      11940257226216280177f
+    ,
+                          6                                           2 5
+      (11905138494849600f  - 11905138494849600)b - 15873517993132800f e
+    + 
+                        3 4                     4 3
+      39683794982832000f e  - 39683794982832000f e
+    + 
+                            11                      5  2
+      (- 686529653202993600f   - 607162063237329600f )e
+    + 
+                         42                      36                        30
+          65144531306704f   - 166381280901088652f   - 26033434502470283472f
+        + 
+                                 24                      18
+          - 31696259583860650140f   + 971492093167581360f
+        + 
+                             12                        6
+        32220085033691389548f   + 25526177666070529808f  + 138603268355749244
+     *
+        e
+    + 
+                      43                      37                        31
+      167620036074811f   - 428102417974791473f   - 66997243801231679313f
+    + 
+                             25                      19
+      - 83426716722148750485f   + 203673895369980765f
+    + 
+                           13                        7
+      83523056326010432457f   + 66995789640238066937f  + 478592855549587901f
+    ,
+                    3                   2                 2                45
+      801692827936c  + 2405078483808f c  - 2405078483808f c - 13752945467f
+    + 
+                     39                    33                    27
+      35125117815561f   + 5496946957826433f   + 6834659447749117f
+    + 
+                       21                    15                    9
+      - 44484880462461f   - 6873406230093057f   - 5450844938762633f
+    + 
+                    3
+      1216586044571f
+    ,
+                                                                      2
+      (23810276989699200d - 23810276989699200f)c + 23810276989699200d
+    + 
+                                              3 5                     4 4
+      71430830969097600f d + 7936758996566400f e  - 31747035986265600f e
+    + 
+                        5 3                       6                       2
+      31747035986265600f e  + (404774708824886400f  + 396837949828320000)e
+    + 
+                             43                       37
+          - 1247372229446701f   + 3185785654596621203f
+        + 
+                                31                         25
+          498594866849974751463f   + 624542545845791047935f
+        + 
+                             19                         13
+          931085755769682885f   - 624150663582417063387f
+        + 
+                                  7
+          - 499881859388360475647f  - 3926885313819527351f
+     *
+        e
+    + 
+                         44                        38
+      - 7026011547118141f   + 17944427051950691243f
+    + 
+                             32                          26
+      2808383522593986603543f   + 3513624142354807530135f
+    + 
+                          20                          14
+      2860757006705537685f   - 3511356735642190737267f
+    + 
+                               8                        2
+      - 2811332494697103819887f  - 20315011631522847311f
+    ,
+       (7936758996566400e - 7936758996566400f)c
+    + 
+                          43                     37                       31
+          - 4418748183673f   + 11285568707456559f   + 1765998617294451019f
+        + 
+                              25                     19
+          2173749283622606155f   - 55788292195402895f
+        + 
+                              13                       7
+        - 2215291421788292951f   - 1718142665347430851f  + 30256569458230237f
+     *
+        e
+    + 
+                    44                     38                       32
+      4418748183673f   - 11285568707456559f   - 1765998617294451019f
+    + 
+                            26                     20                       14
+      - 2173749283622606155f   + 55788292195402895f   + 2215291421788292951f
+    + 
+                          8                     2
+      1718142665347430851f  - 30256569458230237f
+    ,
+                       6                                  43
+      (72152354514240f  - 72152354514240)c + 40950859449f
+    + 
+                        37                     31                     25
+      - 104588980990367f   - 16367227395575307f   - 20268523416527355f
+    + 
+                      19                     13                     7
+      442205002259535f   + 20576059935789063f   + 15997133796970563f
+    + 
+      - 275099892785581f
+    ,
+                        3                      2                    2
+      1984189749141600d  + 5952569247424800f d  - 5952569247424800f d
+    + 
+                         4 5                     5 4                     3
+      - 3968379498283200f e  + 15873517993132800f e  + 17857707742274400e
+    + 
+                            7                        2
+      (- 148814231185620000f  - 162703559429611200f)e
+    + 
+                            44                      38
+          - 390000914678878f   + 996062704593756434f
+        + 
+                                32                         26
+          155886323972034823914f   + 194745956143985421330f
+        + 
+                           20                         14
+          6205077595574430f   - 194596512653299068786f
+        + 
+                                  8                       2
+          - 155796897940756922666f  - 1036375759077320978f
+     *
+        e
+    + 
+                        45                      39                         33
+      - 374998630035991f   + 957747106595453993f   + 149889155566764891693f
+    + 
+                            27                      21
+      187154171443494641685f   - 127129015426348065f
+    + 
+                            15                         9                      3
+    - 187241533243115040417f   - 149719983567976534037f  - 836654081239648061f
+    ,
+                                                                   3 5
+      (5952569247424800e - 5952569247424800f)d - 3968379498283200f e
+    + 
+                       4 4                    5 3
+      9920948745708000f e  - 3968379498283200f e
+    + 
+                            6                       2
+      (- 148814231185620000f  - 150798420934761600)e
+    + 
+                          43                       37
+          492558110242553f   - 1257992359608074599f
+        + 
+                                  31                         25
+          - 196883094539368513959f   - 246562115745735428055f
+        + 
+                               19                         13
+          - 325698701993885505f   + 246417769883651808111f
+        + 
+                                7
+          197327352068200652911f  + 1523373796389332143f
+     *
+        e
+    + 
+                       44                       38                          32
+      2679481081803026f   - 6843392695421906608f   - 1071020459642646913578f
+    + 
+                               26                      20
+      - 1339789169692041240060f   - 852746750910750210f
+    + 
+                             14                          8
+      1339105101971878401312f   + 1071900289758712984762f
+    + 
+                          2
+      7555239072072727756f
+    ,
+                          6                                          2 5
+      (11905138494849600f  - 11905138494849600)d - 7936758996566400f e
+    + 
+                        3 4                     4 3
+      31747035986265600f e  - 31747035986265600f e
+    + 
+                            11                      5  2
+      (- 420648226818019200f   - 404774708824886400f )e
+    + 
+                         42                     36                       30
+          15336187600889f   - 39169739565161107f   - 6127176127489690827f
+        + 
+                                24                      18
+          - 7217708742310509615f   + 538628483890722735f
+        + 
+                              12                       6
+          7506804353843507643f   + 5886160769782607203f  + 63576108396535879
+     *
+        e
+    + 
+                     43                      37                        31
+      71737781777066f   - 183218856207557938f   - 28672874271132276078f
+    + 
+                             25                      19
+      - 35625223686939812010f   + 164831339634084390f
+    + 
+                           13                        7
+      35724160423073052642f   + 28627022578664910622f  + 187459987029680506f
+    ,
+                        6                      5                    2 4
+      1322793166094400e  - 3968379498283200f e  + 3968379498283200f e
+    + 
+                         3 3
+      - 5291172664377600f e
+    + 
+                            10                      4  2
+      (- 230166010900425600f   - 226197631402142400f )e
+    + 
+                               47                         41
+          - 152375364610443885f   + 389166626064854890415f
+        + 
+                                  35                           29
+          60906097841360558987335f   + 76167367934608798697275f
+        + 
+                               23                           17
+          27855066785995181125f   - 76144952817052723145495f
+        + 
+                                    11                         5
+          - 60933629892463517546975f   - 411415071682002547795f
+     *
+        e
+    + 
+                        42                      36                        30
+      - 209493533143822f   + 535045979490560586f   + 83737947964973553146f
+    + 
+                            24                      18
+      104889507084213371570f   + 167117997269207870f
+    + 
+                              12                        6
+      - 104793725781390615514f   - 83842685189903180394f  - 569978796672974242
+    ,
+                       6                   3
+      (25438330117200f  + 25438330117200)e
+    + 
+                      7                    2
+      (76314990351600f  + 76314990351600f)e
+    + 
+                          44                    38                      32
+          - 1594966552735f   + 4073543370415745f   + 637527159231148925f
+        + 
+                             26                   20                      14
+          797521176113606525f   + 530440941097175f   - 797160527306433145f
+        + 
+                               8                    2
+          - 638132320196044965f  - 4510507167940725f
+     *
+        e
+    + 
+                      45                     39                       33
+      - 6036376800443f   + 15416903421476909f   + 2412807646192304449f
+    + 
+                          27                    21                       15
+      3017679923028013705f   + 1422320037411955f   - 3016560402417843941f
+    + 
+                            9                     3
+      - 2414249368183033161f  - 16561862361763873f
+    ,
+                      12                  2
+      (1387545279120f   - 1387545279120)e
+    + 
+                     43                  37                    31
+          4321823003f   - 11037922310209f   - 1727510711947989f
+        + 
+                             25                 19                    13
+          - 2165150991154425f   - 5114342560755f   + 2162682824948601f
+        + 
+                           7
+          1732620732685741f  + 13506088516033f
+     *
+        e
+    + 
+                  44                  38                    32
+      24177661775f   - 61749727185325f   - 9664106795754225f
+    + 
+                          26                 20                     14
+      - 12090487758628245f   - 8787672733575f   + 12083693383005045f
+    + 
+                       8                  2
+      9672870290826025f  + 68544102808525f
+    ,
+    48        42          36          30          18          12        6
+   f   - 2554f   - 399710f   - 499722f   + 499722f   + 399710f   + 2554f  - 1]
+  Type: List NewSparseMultivariatePolynomial(Integer,
+    OrderedVariableList [a,b,c,d,e,f])
+
+Apply lexTriangular to compute a decomposition into regular triangular sets.
+This should not take more than 5 seconds.
+
+  lexTriangular(lg,false)$lextripack
+  [
+     6       6       5     2 4     3 3     4 2     5
+   {f  + 1, e  - 3f e  + 3f e  - 4f e  + 3f e  - 3f e - 1,
+          2 5     3 4     4 3     5 2
+    3d + f e  - 4f e  + 4f e  - 2f e  - 2e + 2f, c + f,
+           2 5     3 4     4 3      5 2
+    3b + 2f e  - 5f e  + 5f e  - 10f e  - 4e + 7f,
+         2 5     3 4     4 3     5 2
+    a - f e  + 3f e  - 3f e  + 4f e  + 3e - 3f}
+   ,
+    6                  2           2                    2
+  {f  - 1,e - f,d - f,c  + 4f c + f ,(c - f)b - f c - 5f ,a + b + c + 3f},
+    6                        2           2
+  {f  - 1,e - f,d - f,c - f,b  + 4f b + f ,a + b + 4f},
+    6            2           2                    2
+  {f  - 1,e - f,d  + 4f d + f ,(d - f)c - f d - 5f ,b - f,a + c + d + 3f},
+      36        30          24          18          12        6
+   {f   - 2554f   - 399709f   - 502276f   - 399709f   - 2554f  + 1,
+                   12              2
+       (161718564f   - 161718564)e
+     + 
+                    31              25                19                13
+           - 504205f   + 1287737951f   + 201539391380f   + 253982817368f
+         + 
+                        7
+           201940704665f  + 1574134601f
+      *
+         e
+     + 
+                 32              26                 20                 14
+       - 2818405f   + 7198203911f   + 1126548149060f   + 1416530563364f
+     + 
+                     8              2
+       1127377589345f  + 7988820725f
+     ,
+                      6                                 2 5                 3 4
+       (693772639560f  - 693772639560)d - 462515093040f e  + 1850060372160f e
+     + 
+                       4 3                     11                  5  2
+       - 1850060372160f e  + (- 24513299931120f   - 23588269745040f )e
+     + 
+                       30                 24                   18
+           - 890810428f   + 2275181044754f   + 355937263869776f
+         + 
+                           12                   6
+           413736880104344f   + 342849304487996f  + 3704966481878
+      *
+         e
+     + 
+                    31                  25                    19
+       - 4163798003f   + 10634395752169f   + 1664161760192806f
+     + 
+                        13                    7
+       2079424391370694f   + 1668153650635921f  + 10924274392693f
+     ,
+                     6                           31               25
+       (12614047992f  - 12614047992)c - 7246825f   + 18508536599f
+     + 
+                     19                 13                 7
+       2896249516034f   + 3581539649666f   + 2796477571739f  - 48094301893f
+     ,
+                      6                                 2 5                 3 4
+       (693772639560f  - 693772639560)b - 925030186080f e  + 2312575465200f e
+     + 
+                       4 3                     11                  5  2
+       - 2312575465200f e  + (- 40007555547960f   - 35382404617560f )e
+     + 
+                        30                 24                    18
+           - 3781280823f   + 9657492291789f   + 1511158913397906f
+         + 
+                            12                    6
+           1837290892286154f   + 1487216006594361f  + 8077238712093
+      *
+         e
+     + 
+                    31                  25                    19
+       - 9736390478f   + 24866827916734f   + 3891495681905296f
+     + 
+                        13                    7
+       4872556418871424f   + 3904047887269606f  + 27890075838538f
+     ,
+    a + b + c + d + e + f}
+   ,
+    6      2           2                    2
+  {f  - 1,e  + 4f e + f ,(e - f)d - f e - 5f ,c - f,b - f,a + d + e + 3f}]
+                             Type: List RegularChain(Integer,[a,b,c,d,e,f])
+
+Note that the first set of the decomposition is normalized (all
+initials are integer numbers) but not the second one (normalized
+triangular sets are defined in the description of the 
+NormalizedTriangularSetCategory constructor).
+
+So apply now lexTriangular to produce normalized triangular sets.
+
+  lts := lexTriangular(lg,true)$lextripack
+   [
+      6       6       5     2 4     3 3     4 2     5
+    {f  + 1, e  - 3f e  + 3f e  - 4f e  + 3f e  - 3f e - 1,
+           2 5     3 4     4 3     5 2
+     3d + f e  - 4f e  + 4f e  - 2f e  - 2e + 2f, c + f,
+            2 5     3 4     4 3      5 2
+     3b + 2f e  - 5f e  + 5f e  - 10f e  - 4e + 7f,
+          2 5     3 4     4 3     5 2
+     a - f e  + 3f e  - 3f e  + 4f e  + 3e - 3f}
+    ,
+     6                  2           2
+   {f  - 1,e - f,d - f,c  + 4f c + f ,b + c + 4f,a - f},
+     6                        2           2
+   {f  - 1,e - f,d - f,c - f,b  + 4f b + f ,a + b + 4f},
+     6            2           2
+   {f  - 1,e - f,d  + 4f d + f ,c + d + 4f,b - f,a - f},
+       36        30          24          18          12        6
+    {f   - 2554f   - 399709f   - 502276f   - 399709f   - 2554f  + 1,
+                       2
+        1387545279120e
+      + 
+                       31                  25                    19
+            4321823003f   - 11037922310209f   - 1727506390124986f
+          + 
+                               13                    7
+            - 2176188913464634f   - 1732620732685741f  - 13506088516033f
+       *
+          e
+      + 
+                    32                  26                    20
+        24177661775f   - 61749727185325f   - 9664082618092450f
+      + 
+                            14                    8                  2
+        - 12152237485813570f   - 9672870290826025f  - 68544102808525f
+      ,
+         1387545279120d
+      + 
+                         30                 24                   18
+            - 1128983050f   + 2883434331830f   + 451234998755840f
+          + 
+                            12                   6
+            562426491685760f   + 447129055314890f  - 165557857270
+       *
+          e
+      + 
+                     31                 25                   19
+        - 1816935351f   + 4640452214013f   + 726247129626942f
+      + 
+                        13                   7
+        912871801716798f   + 726583262666877f  + 4909358645961f
+      ,
+                                    31                 25                   19
+        1387545279120c + 778171189f   - 1987468196267f   - 310993556954378f
+      + 
+                          13                   7
+        - 383262822316802f   - 300335488637543f  + 5289595037041f
+      ,
+         1387545279120b
+      + 
+                       30                 24                   18
+            1128983050f   - 2883434331830f   - 451234998755840f
+          + 
+                              12                   6
+            - 562426491685760f   - 447129055314890f  + 165557857270
+       *
+          e
+      + 
+                     31                 25                    19
+        - 3283058841f   + 8384938292463f   + 1312252817452422f
+      + 
+                         13                    7
+        1646579934064638f   + 1306372958656407f  + 4694680112151f
+      ,
+                                                      31                  25
+        1387545279120a + 1387545279120e + 4321823003f   - 11037922310209f
+      + 
+                           19                    13                    7
+        - 1727506390124986f   - 2176188913464634f   - 1732620732685741f
+      + 
+        - 13506088516033f
+      }
+    ,
+     6      2           2
+   {f  - 1,e  + 4f e + f ,d + e + 4f,c - f,b - f,a - f}]
+                              Type: List RegularChain(Integer,[a,b,c,d,e,f])
+
+We check that all initials are constant.
+
+  [ [init(p) for p in (ts :: List(P))] for ts in lts]
+   [[1,3,1,3,1,1], [1,1,1,1,1,1], [1,1,1,1,1,1], [1,1,1,1,1,1],
+    [1387545279120,1387545279120,1387545279120,1387545279120,1387545279120,1],
+    [1,1,1,1,1,1]]
+     Type: List List NewSparseMultivariatePolynomial(Integer,
+                                       OrderedVariableList [a,b,c,d,e,f])
+
+Note that each triangular set in lts is a lexicographical Groebner
+basis.  Recall that a point belongs to the variety associated with lp
+if and only if it belongs to that associated with one triangular set
+ts in lts.
+
+By running the squareFreeLexTriangular operation, we retrieve the
+above decomposition.
+
+  squareFreeLexTriangular(lg,true)$lextripack
+  [
+      6       6       5     2 4     3 3     4 2     5
+    {f  + 1, e  - 3f e  + 3f e  - 4f e  + 3f e  - 3f e - 1,
+           2 5     3 4     4 3     5 2
+     3d + f e  - 4f e  + 4f e  - 2f e  - 2e + 2f, c + f,
+            2 5     3 4     4 3      5 2
+     3b + 2f e  - 5f e  + 5f e  - 10f e  - 4e + 7f,
+          2 5     3 4     4 3     5 2
+     a - f e  + 3f e  - 3f e  + 4f e  + 3e - 3f}
+    ,
+     6                  2           2
+   {f  - 1,e - f,d - f,c  + 4f c + f ,b + c + 4f,a - f},
+     6                        2           2
+   {f  - 1,e - f,d - f,c - f,b  + 4f b + f ,a + b + 4f},
+     6            2           2
+   {f  - 1,e - f,d  + 4f d + f ,c + d + 4f,b - f,a - f},
+       36        30          24          18          12        6
+    {f   - 2554f   - 399709f   - 502276f   - 399709f   - 2554f  + 1,
+                       2
+        1387545279120e
+      + 
+                       31                  25                    19
+            4321823003f   - 11037922310209f   - 1727506390124986f
+          + 
+                               13                    7
+            - 2176188913464634f   - 1732620732685741f  - 13506088516033f
+       *
+          e
+      + 
+                    32                  26                    20
+        24177661775f   - 61749727185325f   - 9664082618092450f
+      + 
+                            14                    8                  2
+        - 12152237485813570f   - 9672870290826025f  - 68544102808525f
+      ,
+         1387545279120d
+      + 
+                         30                 24                   18
+            - 1128983050f   + 2883434331830f   + 451234998755840f
+          + 
+                            12                   6
+            562426491685760f   + 447129055314890f  - 165557857270
+       *
+          e
+      + 
+                     31                 25                   19
+        - 1816935351f   + 4640452214013f   + 726247129626942f
+      + 
+                        13                   7
+        912871801716798f   + 726583262666877f  + 4909358645961f
+      ,
+                                    31                 25                   19
+        1387545279120c + 778171189f   - 1987468196267f   - 310993556954378f
+      + 
+                          13                   7
+        - 383262822316802f   - 300335488637543f  + 5289595037041f
+      ,
+         1387545279120b
+      + 
+                       30                 24                   18
+            1128983050f   - 2883434331830f   - 451234998755840f
+          + 
+                              12                   6
+            - 562426491685760f   - 447129055314890f  + 165557857270
+       *
+          e
+      + 
+                     31                 25                    19
+        - 3283058841f   + 8384938292463f   + 1312252817452422f
+      + 
+                         13                    7
+        1646579934064638f   + 1306372958656407f  + 4694680112151f
+      ,
+                                                      31                  25
+        1387545279120a + 1387545279120e + 4321823003f   - 11037922310209f
+      + 
+                           19                    13                    7
+        - 1727506390124986f   - 2176188913464634f   - 1732620732685741f
+      + 
+        - 13506088516033f
+      }
+    ,
+     6      2           2
+   {f  - 1,e  + 4f e + f ,d + e + 4f,c - f,b - f,a - f}]
+  Type: List SquareFreeRegularTriangularSet(Integer,
+               IndexedExponents OrderedVariableList [a,b,c,d,e,f],
+               OrderedVariableList [a,b,c,d,e,f],
+               NewSparseMultivariatePolynomial(Integer,
+                                OrderedVariableList [a,b,c,d,e,f]))
+
+Thus the solutions given by lts are pairwise different.
+
+We count them as follows.
+
+  reduce(+,[degree(ts) for ts in lts])
+    156
+                      Type: PositiveInteger
+
+We can investigate the triangular decomposition lts by using the
+ZeroDimensionalSolvePackage.
+
+This requires to add an extra variable (smaller than the others) as follows.
+
+  ls2 : List Symbol := concat(ls,new()$Symbol)
+    [a,b,c,d,e,f,%A]
+                      Type: List Symbol
+
+Then we call the package.
+
+  zdpack := ZDSOLVE(R,ls,ls2)
+   (20)  ZeroDimensionalSolvePackage(Integer,[a,b,c,d,e,f],[a,b,c,d,e,f,%A])
+                      Type: Domain
+
+We compute a univariate representation of the variety associated with
+the input system as follows.
+
+  concat [univariateSolve(ts)$zdpack for ts in lts]
+  [
+                    4      2
+    [complexRoots= ?  - 13?  + 49,
+       coordinates =
+                3                3                3                3
+        [7a + %A  - 6%A, 21b + %A  + %A, 21c - 2%A  + 19%A, 7d - %A  + 6%A,
+                 3                3
+         21e - %A  - %A, 21f + 2%A  - 19%A]
+      ]
+    ,
+                     4      2
+    [complexRoots= ?  + 11?  + 49,
+       coordinates =
+                  3                 3                  3
+        [35a + 3%A  + 19%A, 35b + %A  + 18%A, 35c - 2%A  - %A,
+                  3                 3                  3
+         35d - 3%A  - 19%A, 35e - %A  - 18%A, 35f + 2%A  + %A]
+      ]
+    ,
+     [
+      complexRoots =
+         8      7      6       5       4       3       2
+        ?  - 12?  + 58?  - 120?  + 207?  - 360?  + 802?  - 1332? + 1369
+      ,
+       coordinates =
+        [
+                               7           6            5            4
+            43054532a + 33782%A  - 546673%A  + 3127348%A  - 6927123%A
+          + 
+                     3             2
+            4365212%A  - 25086957%A  + 39582814%A - 107313172
+          ,
+                                7           6            5            4
+            43054532b - 33782%A  + 546673%A  - 3127348%A  + 6927123%A
+          + 
+                       3             2
+            - 4365212%A  + 25086957%A  - 39582814%A + 107313172
+          ,
+                                7           6            5            4
+            21527266c - 22306%A  + 263139%A  - 1166076%A  + 1821805%A
+          + 
+                       3             2
+            - 2892788%A  + 10322663%A  - 9026596%A + 12950740
+          ,
+                                7           6            5            4
+            43054532d + 22306%A  - 263139%A  + 1166076%A  - 1821805%A
+          + 
+                     3             2
+            2892788%A  - 10322663%A  + 30553862%A - 12950740
+          ,
+                                7           6            5            4
+            43054532e - 22306%A  + 263139%A  - 1166076%A  + 1821805%A
+          + 
+                       3             2
+            - 2892788%A  + 10322663%A  - 30553862%A + 12950740
+          ,
+                                7           6            5            4
+            21527266f + 22306%A  - 263139%A  + 1166076%A  - 1821805%A
+          + 
+                     3             2
+            2892788%A  - 10322663%A  + 9026596%A - 12950740
+          ]
+      ]
+    ,
+     [
+      complexRoots =
+         8      7      6       5       4       3       2
+        ?  + 12?  + 58?  + 120?  + 207?  + 360?  + 802?  + 1332? + 1369
+      ,
+       coordinates =
+        [
+                               7           6            5            4
+            43054532a + 33782%A  + 546673%A  + 3127348%A  + 6927123%A
+          + 
+                     3             2
+            4365212%A  + 25086957%A  + 39582814%A + 107313172
+          ,
+                                7           6            5            4
+            43054532b - 33782%A  - 546673%A  - 3127348%A  - 6927123%A
+          + 
+                       3             2
+            - 4365212%A  - 25086957%A  - 39582814%A - 107313172
+          ,
+                                7           6            5            4
+            21527266c - 22306%A  - 263139%A  - 1166076%A  - 1821805%A
+          + 
+                       3             2
+            - 2892788%A  - 10322663%A  - 9026596%A - 12950740
+          ,
+                                7           6            5            4
+            43054532d + 22306%A  + 263139%A  + 1166076%A  + 1821805%A
+          + 
+                     3             2
+            2892788%A  + 10322663%A  + 30553862%A + 12950740
+          ,
+                                7           6            5            4
+            43054532e - 22306%A  - 263139%A  - 1166076%A  - 1821805%A
+          + 
+                       3             2
+            - 2892788%A  - 10322663%A  - 30553862%A - 12950740
+          ,
+                                7           6            5            4
+            21527266f + 22306%A  + 263139%A  + 1166076%A  + 1821805%A
+          + 
+                     3             2
+            2892788%A  + 10322663%A  + 9026596%A + 12950740
+          ]
+      ]
+    ,
+                     4    2
+    [complexRoots= ?  - ?  + 1,
+                                3            3              3            3
+     coordinates= [a - %A,b + %A  - %A,c + %A ,d + %A,e - %A  + %A,f - %A ]]
+    ,
+                     8     6      4      2
+    [complexRoots= ?  + 4?  + 12?  + 16?  + 4,
+       coordinates =
+                 7      5       3                 7      5       3
+        [4a - 2%A  - 7%A  - 20%A  - 22%A, 4b + 2%A  + 7%A  + 20%A  + 22%A,
+                7      5       3                7      5       3
+         4c + %A  + 3%A  + 10%A  + 10%A, 4d + %A  + 3%A  + 10%A  + 6%A,
+                7      5       3               7      5       3
+         4e - %A  - 3%A  - 10%A  - 6%A, 4f - %A  - 3%A  - 10%A  - 10%A]
+      ]
+    ,
+                     4     3      2
+    [complexRoots= ?  + 6?  + 30?  + 36? + 36,
+       coordinates =
+                 3      2                    3      2
+        [30a - %A  - 5%A  - 30%A - 6, 6b + %A  + 5%A  + 24%A + 6,
+                 3      2              3      2
+         30c - %A  - 5%A  - 6, 30d - %A  - 5%A  - 30%A - 6,
+                 3      2                     3      2
+         30e - %A  - 5%A  - 30%A - 6, 30f - %A  - 5%A  - 30%A - 6]
+      ]
+    ,
+                     4     3      2
+    [complexRoots= ?  - 6?  + 30?  - 36? + 36,
+       coordinates =
+                 3      2                    3      2
+        [30a - %A  + 5%A  - 30%A + 6, 6b + %A  - 5%A  + 24%A - 6,
+                 3      2              3      2
+         30c - %A  + 5%A  + 6, 30d - %A  + 5%A  - 30%A + 6,
+                 3      2                     3      2
+         30e - %A  + 5%A  - 30%A + 6, 30f - %A  + 5%A  - 30%A + 6]
+      ]
+    ,
+                     2
+    [complexRoots= ?  + 6? + 6,
+     coordinates= [a + 1,b - %A - 5,c + %A + 1,d + 1,e + 1,f + 1]]
+    ,
+                     2
+    [complexRoots= ?  - 6? + 6,
+     coordinates= [a - 1,b - %A + 5,c + %A - 1,d - 1,e - 1,f - 1]]
+    ,
+                     4     3      2
+    [complexRoots= ?  + 6?  + 30?  + 36? + 36,
+       coordinates =
+                3      2                     3      2
+        [6a + %A  + 5%A  + 24%A + 6, 30b - %A  - 5%A  - 6,
+                 3      2                     3      2
+         30c - %A  - 5%A  - 30%A - 6, 30d - %A  - 5%A  - 30%A - 6,
+                 3      2                     3      2
+         30e - %A  - 5%A  - 30%A - 6, 30f - %A  - 5%A  - 30%A - 6]
+      ]
+    ,
+                     4     3      2
+    [complexRoots= ?  - 6?  + 30?  - 36? + 36,
+       coordinates =
+                3      2                     3      2
+        [6a + %A  - 5%A  + 24%A - 6, 30b - %A  + 5%A  + 6,
+                 3      2                     3      2
+         30c - %A  + 5%A  - 30%A + 6, 30d - %A  + 5%A  - 30%A + 6,
+                 3      2                     3      2
+         30e - %A  + 5%A  - 30%A + 6, 30f - %A  + 5%A  - 30%A + 6]
+      ]
+    ,
+                     2
+    [complexRoots= ?  + 6? + 6,
+     coordinates= [a - %A - 5,b + %A + 1,c + 1,d + 1,e + 1,f + 1]]
+    ,
+                     2
+    [complexRoots= ?  - 6? + 6,
+     coordinates= [a - %A + 5,b + %A - 1,c - 1,d - 1,e - 1,f - 1]]
+    ,
+                     4     3      2
+    [complexRoots= ?  + 6?  + 30?  + 36? + 36,
+       coordinates =
+                 3      2                     3      2
+        [30a - %A  - 5%A  - 30%A - 6, 30b - %A  - 5%A  - 30%A - 6,
+                3      2                     3      2
+         6c + %A  + 5%A  + 24%A + 6, 30d - %A  - 5%A  - 6,
+                 3      2                     3      2
+         30e - %A  - 5%A  - 30%A - 6, 30f - %A  - 5%A  - 30%A - 6]
+      ]
+    ,
+                     4     3      2
+    [complexRoots= ?  - 6?  + 30?  - 36? + 36,
+       coordinates =
+                 3      2                     3      2
+        [30a - %A  + 5%A  - 30%A + 6, 30b - %A  + 5%A  - 30%A + 6,
+                3      2                     3      2
+         6c + %A  - 5%A  + 24%A - 6, 30d - %A  + 5%A  + 6,
+                 3      2                     3      2
+         30e - %A  + 5%A  - 30%A + 6, 30f - %A  + 5%A  - 30%A + 6]
+      ]
+    ,
+                     2
+    [complexRoots= ?  + 6? + 6,
+     coordinates= [a + 1,b + 1,c - %A - 5,d + %A + 1,e + 1,f + 1]]
+    ,
+                     2
+    [complexRoots= ?  - 6? + 6,
+     coordinates= [a - 1,b - 1,c - %A + 5,d + %A - 1,e - 1,f - 1]]
+    ,
+                     8     7      6      5      4     2
+    [complexRoots= ?  + 6?  + 16?  + 24?  + 18?  - 8?  + 4,
+       coordinates =
+                 7      6       5       4      3       2
+        [2a + 2%A  + 9%A  + 18%A  + 19%A  + 4%A  - 10%A  - 2%A + 4,
+                 7      6       5       4      3       2
+         2b + 2%A  + 9%A  + 18%A  + 19%A  + 4%A  - 10%A  - 4%A + 4,
+                7      6      5      4      3
+         2c - %A  - 4%A  - 8%A  - 9%A  - 4%A  - 2%A - 4,
+                7      6      5      4      3
+         2d + %A  + 4%A  + 8%A  + 9%A  + 4%A  + 2%A + 4,
+                 7      6       5       4      3       2
+         2e - 2%A  - 9%A  - 18%A  - 19%A  - 4%A  + 10%A  + 4%A - 4,
+                 7      6       5       4      3       2
+         2f - 2%A  - 9%A  - 18%A  - 19%A  - 4%A  + 10%A  + 2%A - 4]
+      ]
+    ,
+     [
+      complexRoots =
+         8      7      6       5       4       3        2
+        ?  + 12?  + 64?  + 192?  + 432?  + 768?  + 1024?  + 768? + 256
+      ,
+       coordinates =
+        [
+                        7        6        5         4         3         2
+            1408a - 19%A  - 200%A  - 912%A  - 2216%A  - 4544%A  - 6784%A
+          + 
+            - 6976%A - 1792
+          ,
+                         7        6         5         4          3          2
+            1408b - 37%A  - 408%A  - 1952%A  - 5024%A  - 10368%A  - 16768%A
+          + 
+            - 17920%A - 5120
+          ,
+                         7        6         5         4          3          2
+            1408c + 37%A  + 408%A  + 1952%A  + 5024%A  + 10368%A  + 16768%A
+          + 
+            17920%A + 5120
+          ,
+                         7        6        5         4         3         2
+            1408d + 19%A  + 200%A  + 912%A  + 2216%A  + 4544%A  + 6784%A
+          + 
+            6976%A + 1792
+          ,
+         2e + %A, 2f - %A]
+      ]
+    ,
+                     8     6      4      2
+    [complexRoots= ?  + 4?  + 12?  + 16?  + 4,
+       coordinates =
+                7      5       3               7      5       3
+        [4a - %A  - 3%A  - 10%A  - 6%A, 4b - %A  - 3%A  - 10%A  - 10%A,
+                 7      5       3                 7      5       3
+         4c - 2%A  - 7%A  - 20%A  - 22%A, 4d + 2%A  + 7%A  + 20%A  + 22%A,
+                7      5       3                7      5       3
+         4e + %A  + 3%A  + 10%A  + 10%A, 4f + %A  + 3%A  + 10%A  + 6%A]
+      ]
+    ,
+                     8      6      4       2
+    [complexRoots= ?  + 16?  - 96?  + 256?  + 256,
+       coordinates =
+                  7       5        3
+        [512a - %A  - 12%A  + 176%A  - 448%A,
+                  7       5       3
+         128b - %A  - 16%A  + 96%A  - 256%A,
+                  7       5       3
+         128c + %A  + 16%A  - 96%A  + 256%A,
+                  7       5        3
+         512d + %A  + 12%A  - 176%A  + 448%A, 2e + %A, 2f - %A]
+      ]
+    ,
+     [
+      complexRoots =
+         8      7      6       5       4       3        2
+        ?  - 12?  + 64?  - 192?  + 432?  - 768?  + 1024?  - 768? + 256
+      ,
+       coordinates =
+        [
+                        7        6        5         4         3         2
+            1408a - 19%A  + 200%A  - 912%A  + 2216%A  - 4544%A  + 6784%A
+          + 
+            - 6976%A + 1792
+          ,
+                         7        6         5         4          3          2
+            1408b - 37%A  + 408%A  - 1952%A  + 5024%A  - 10368%A  + 16768%A
+          + 
+            - 17920%A + 5120
+          ,
+                         7        6         5         4          3          2
+            1408c + 37%A  - 408%A  + 1952%A  - 5024%A  + 10368%A  - 16768%A
+          + 
+            17920%A - 5120
+          ,
+                         7        6        5         4         3         2
+            1408d + 19%A  - 200%A  + 912%A  - 2216%A  + 4544%A  - 6784%A
+          + 
+            6976%A - 1792
+          ,
+         2e + %A, 2f - %A]
+      ]
+    ,
+                     8     7      6      5      4     2
+    [complexRoots= ?  - 6?  + 16?  - 24?  + 18?  - 8?  + 4,
+       coordinates =
+                 7      6       5       4      3       2
+        [2a + 2%A  - 9%A  + 18%A  - 19%A  + 4%A  + 10%A  - 2%A - 4,
+                 7      6       5       4      3       2
+         2b + 2%A  - 9%A  + 18%A  - 19%A  + 4%A  + 10%A  - 4%A - 4,
+                7      6      5      4      3
+         2c - %A  + 4%A  - 8%A  + 9%A  - 4%A  - 2%A + 4,
+                7      6      5      4      3
+         2d + %A  - 4%A  + 8%A  - 9%A  + 4%A  + 2%A - 4,
+                 7      6       5       4      3       2
+         2e - 2%A  + 9%A  - 18%A  + 19%A  - 4%A  - 10%A  + 4%A + 4,
+                 7      6       5       4      3       2
+         2f - 2%A  + 9%A  - 18%A  + 19%A  - 4%A  - 10%A  + 2%A + 4]
+      ]
+    ,
+                     4      2
+    [complexRoots= ?  + 12?  + 144,
+       coordinates =
+                 2               2               2               2
+        [12a - %A  - 12, 12b - %A  - 12, 12c - %A  - 12, 12d - %A  - 12,
+                2                    2
+         6e + %A  + 3%A + 12, 6f + %A  - 3%A + 12]
+      ]
+    ,
+                     4     3      2
+    [complexRoots= ?  + 6?  + 30?  + 36? + 36,
+       coordinates =
+                3      2                     3      2
+        [6a - %A  - 5%A  - 24%A - 6, 30b + %A  + 5%A  + 30%A + 6,
+                 3      2                     3      2
+         30c + %A  + 5%A  + 30%A + 6, 30d + %A  + 5%A  + 30%A + 6,
+                 3      2                     3      2
+         30e + %A  + 5%A  + 30%A + 6, 30f + %A  + 5%A  + 6]
+      ]
+    ,
+                     4     3      2
+    [complexRoots= ?  - 6?  + 30?  - 36? + 36,
+       coordinates =
+                3      2                     3      2
+        [6a - %A  + 5%A  - 24%A + 6, 30b + %A  - 5%A  + 30%A - 6,
+                 3      2                     3      2
+         30c + %A  - 5%A  + 30%A - 6, 30d + %A  - 5%A  + 30%A - 6,
+                 3      2                     3      2
+         30e + %A  - 5%A  + 30%A - 6, 30f + %A  - 5%A  - 6]
+      ]
+    ,
+                     4      2
+    [complexRoots= ?  + 12?  + 144,
+       coordinates =
+                 2               2               2               2
+        [12a + %A  + 12, 12b + %A  + 12, 12c + %A  + 12, 12d + %A  + 12,
+                2                    2
+         6e - %A  + 3%A - 12, 6f - %A  - 3%A - 12]
+      ]
+    ,
+                     2
+    [complexRoots= ?  - 12,
+     coordinates= [a - 1,b - 1,c - 1,d - 1,2e + %A + 4,2f - %A + 4]]
+    ,
+                     2
+    [complexRoots= ?  + 6? + 6,
+     coordinates= [a + %A + 5,b - 1,c - 1,d - 1,e - 1,f - %A - 1]]
+    ,
+                     2
+    [complexRoots= ?  - 6? + 6,
+     coordinates= [a + %A - 5,b + 1,c + 1,d + 1,e + 1,f - %A + 1]]
+    ,
+                     2
+    [complexRoots= ?  - 12,
+     coordinates= [a + 1,b + 1,c + 1,d + 1,2e + %A - 4,2f - %A - 4]]
+    ,
+                     4     3      2
+    [complexRoots= ?  + 6?  + 30?  + 36? + 36,
+       coordinates =
+                 3      2                     3      2
+        [30a - %A  - 5%A  - 30%A - 6, 30b - %A  - 5%A  - 30%A - 6,
+                 3      2                    3      2
+         30c - %A  - 5%A  - 30%A - 6, 6d + %A  + 5%A  + 24%A + 6,
+                 3      2              3      2
+         30e - %A  - 5%A  - 6, 30f - %A  - 5%A  - 30%A - 6]
+      ]
+    ,
+                     4     3      2
+    [complexRoots= ?  - 6?  + 30?  - 36? + 36,
+       coordinates =
+                 3      2                     3      2
+        [30a - %A  + 5%A  - 30%A + 6, 30b - %A  + 5%A  - 30%A + 6,
+                 3      2                    3      2
+         30c - %A  + 5%A  - 30%A + 6, 6d + %A  - 5%A  + 24%A - 6,
+                 3      2              3      2
+         30e - %A  + 5%A  + 6, 30f - %A  + 5%A  - 30%A + 6]
+      ]
+    ,
+                     2
+    [complexRoots= ?  + 6? + 6,
+     coordinates= [a + 1,b + 1,c + 1,d - %A - 5,e + %A + 1,f + 1]]
+    ,
+                     2
+    [complexRoots= ?  - 6? + 6,
+     coordinates= [a - 1,b - 1,c - 1,d - %A + 5,e + %A - 1,f - 1]]
+    ]
+  Type: List Record(complexRoots: SparseUnivariatePolynomial Integer,
+                    coordinates: List Polynomial Integer)
+
+Since the univariateSolve operation may split a regular set, it
+returns a list. This explains the use of concat.
+
+Look at the last item of the result. It consists of two parts.  For
+any complex root ? of the univariate polynomial in the first part, we
+get a tuple of univariate polynomials (in a, ...,f respectively) by
+replacing %A by ? in the second part.  Each of these tuples t
+describes a point of the variety associated with lp by equaling to
+zero the polynomials in t.
+
+Note that the way of reading these univariate representations is
+explained also in the example illustrating the ZeroDimensionalSolvePackage 
+constructor.
+
+Now, we compute the points of the variety with real coordinates.
+
+  concat [realSolve(ts)$zdpack for ts in lts] 
+  [[%B1,%B1,%B1,%B5,- %B5 - 4%B1,%B1], [%B1,%B1,%B1,%B6,- %B6 - 4%B1,%B1],
+   [%B2,%B2,%B2,%B3,- %B3 - 4%B2,%B2], [%B2,%B2,%B2,%B4,- %B4 - 4%B2,%B2],
+   [%B7,%B7,%B7,%B7,%B11,- %B11 - 4%B7], [%B7,%B7,%B7,%B7,%B12,- %B12 - 4%B7],
+   [%B8,%B8,%B8,%B8,%B9,- %B9 - 4%B8], [%B8,%B8,%B8,%B8,%B10,- %B10 - 4%B8],
+   [%B13,%B13,%B17,- %B17 - 4%B13,%B13,%B13],
+   [%B13,%B13,%B18,- %B18 - 4%B13,%B13,%B13],
+   [%B14,%B14,%B15,- %B15 - 4%B14,%B14,%B14],
+   [%B14,%B14,%B16,- %B16 - 4%B14,%B14,%B14],
+     [%B19, %B29,
+           7865521      31   6696179241     25   25769893181     19
+        ---------- %B19   - ---------- %B19   - ----------- %B19
+        6006689520          2002229840            49235160
+      + 
+          1975912990729     13   1048460696489     7   21252634831
+        - ------------- %B19   - ------------- %B19  - ----------- %B19
+            3003344760             2002229840           6006689520
+      ,
+             778171189       31   1987468196267     25   155496778477189     19
+        - ------------- %B19   + ------------- %B19   + --------------- %B19
+          1387545279120          1387545279120            693772639560
+      + 
+        191631411158401     13   300335488637543     7   755656433863
+        --------------- %B19   + --------------- %B19  - ------------ %B19
+          693772639560            1387545279120          198220754160
+      ,
+          1094352947      31   2794979430821     25   218708802908737     19
+        ------------ %B19   - ------------- %B19   - --------------- %B19
+        462515093040           462515093040            231257546520
+      + 
+          91476663003591     13   145152550961823     7   1564893370717
+        - -------------- %B19   - --------------- %B19  - ------------- %B19
+            77085848840             154171697680           462515093040
+      ,
+                    4321823003      31   180949546069     25
+        - %B29 - ------------- %B19   + ------------ %B19
+                 1387545279120           22746643920
+      + 
+        863753195062493     19   1088094456732317     13
+        --------------- %B19   + ---------------- %B19
+          693772639560             693772639560
+      + 
+        1732620732685741     7   13506088516033
+        ---------------- %B19  + -------------- %B19
+          1387545279120           1387545279120
+      ]
+    ,
+     [%B19, %B30,
+           7865521      31   6696179241     25   25769893181     19
+        ---------- %B19   - ---------- %B19   - ----------- %B19
+        6006689520          2002229840            49235160
+      + 
+          1975912990729     13   1048460696489     7   21252634831
+        - ------------- %B19   - ------------- %B19  - ----------- %B19
+            3003344760             2002229840           6006689520
+      ,
+             778171189       31   1987468196267     25   155496778477189     19
+        - ------------- %B19   + ------------- %B19   + --------------- %B19
+          1387545279120          1387545279120            693772639560
+      + 
+        191631411158401     13   300335488637543     7   755656433863
+        --------------- %B19   + --------------- %B19  - ------------ %B19
+          693772639560            1387545279120          198220754160
+      ,
+          1094352947      31   2794979430821     25   218708802908737     19
+        ------------ %B19   - ------------- %B19   - --------------- %B19
+        462515093040           462515093040            231257546520
+      + 
+          91476663003591     13   145152550961823     7   1564893370717
+        - -------------- %B19   - --------------- %B19  - ------------- %B19
+            77085848840             154171697680           462515093040
+      ,
+                    4321823003      31   180949546069     25
+        - %B30 - ------------- %B19   + ------------ %B19
+                 1387545279120           22746643920
+      + 
+        863753195062493     19   1088094456732317     13
+        --------------- %B19   + ---------------- %B19
+          693772639560             693772639560
+      + 
+        1732620732685741     7   13506088516033
+        ---------------- %B19  + -------------- %B19
+          1387545279120           1387545279120
+      ]
+    ,
+     [%B20, %B27,
+           7865521      31   6696179241     25   25769893181     19
+        ---------- %B20   - ---------- %B20   - ----------- %B20
+        6006689520          2002229840            49235160
+      + 
+          1975912990729     13   1048460696489     7   21252634831
+        - ------------- %B20   - ------------- %B20  - ----------- %B20
+            3003344760             2002229840           6006689520
+      ,
+             778171189       31   1987468196267     25   155496778477189     19
+        - ------------- %B20   + ------------- %B20   + --------------- %B20
+          1387545279120          1387545279120            693772639560
+      + 
+        191631411158401     13   300335488637543     7   755656433863
+        --------------- %B20   + --------------- %B20  - ------------ %B20
+          693772639560            1387545279120          198220754160
+      ,
+          1094352947      31   2794979430821     25   218708802908737     19
+        ------------ %B20   - ------------- %B20   - --------------- %B20
+        462515093040           462515093040            231257546520
+      + 
+          91476663003591     13   145152550961823     7   1564893370717
+        - -------------- %B20   - --------------- %B20  - ------------- %B20
+            77085848840             154171697680           462515093040
+      ,
+                    4321823003      31   180949546069     25
+        - %B27 - ------------- %B20   + ------------ %B20
+                 1387545279120           22746643920
+      + 
+        863753195062493     19   1088094456732317     13
+        --------------- %B20   + ---------------- %B20
+          693772639560             693772639560
+      + 
+        1732620732685741     7   13506088516033
+        ---------------- %B20  + -------------- %B20
+          1387545279120           1387545279120
+      ]
+    ,
+     [%B20, %B28,
+           7865521      31   6696179241     25   25769893181     19
+        ---------- %B20   - ---------- %B20   - ----------- %B20
+        6006689520          2002229840            49235160
+      + 
+          1975912990729     13   1048460696489     7   21252634831
+        - ------------- %B20   - ------------- %B20  - ----------- %B20
+            3003344760             2002229840           6006689520
+      ,
+             778171189       31   1987468196267     25   155496778477189     19
+        - ------------- %B20   + ------------- %B20   + --------------- %B20
+          1387545279120          1387545279120            693772639560
+      + 
+        191631411158401     13   300335488637543     7   755656433863
+        --------------- %B20   + --------------- %B20  - ------------ %B20
+          693772639560            1387545279120          198220754160
+      ,
+          1094352947      31   2794979430821     25   218708802908737     19
+        ------------ %B20   - ------------- %B20   - --------------- %B20
+        462515093040           462515093040            231257546520
+      + 
+          91476663003591     13   145152550961823     7   1564893370717
+        - -------------- %B20   - --------------- %B20  - ------------- %B20
+            77085848840             154171697680           462515093040
+      ,
+                    4321823003      31   180949546069     25
+        - %B28 - ------------- %B20   + ------------ %B20
+                 1387545279120           22746643920
+      + 
+        863753195062493     19   1088094456732317     13
+        --------------- %B20   + ---------------- %B20
+          693772639560             693772639560
+      + 
+        1732620732685741     7   13506088516033
+        ---------------- %B20  + -------------- %B20
+          1387545279120           1387545279120
+      ]
+    ,
+     [%B21, %B25,
+           7865521      31   6696179241     25   25769893181     19
+        ---------- %B21   - ---------- %B21   - ----------- %B21
+        6006689520          2002229840            49235160
+      + 
+          1975912990729     13   1048460696489     7   21252634831
+        - ------------- %B21   - ------------- %B21  - ----------- %B21
+            3003344760             2002229840           6006689520
+      ,
+             778171189       31   1987468196267     25   155496778477189     19
+        - ------------- %B21   + ------------- %B21   + --------------- %B21
+          1387545279120          1387545279120            693772639560
+      + 
+        191631411158401     13   300335488637543     7   755656433863
+        --------------- %B21   + --------------- %B21  - ------------ %B21
+          693772639560            1387545279120          198220754160
+      ,
+          1094352947      31   2794979430821     25   218708802908737     19
+        ------------ %B21   - ------------- %B21   - --------------- %B21
+        462515093040           462515093040            231257546520
+      + 
+          91476663003591     13   145152550961823     7   1564893370717
+        - -------------- %B21   - --------------- %B21  - ------------- %B21
+            77085848840             154171697680           462515093040
+      ,
+                    4321823003      31   180949546069     25
+        - %B25 - ------------- %B21   + ------------ %B21
+                 1387545279120           22746643920
+      + 
+        863753195062493     19   1088094456732317     13
+        --------------- %B21   + ---------------- %B21
+          693772639560             693772639560
+      + 
+        1732620732685741     7   13506088516033
+        ---------------- %B21  + -------------- %B21
+          1387545279120           1387545279120
+      ]
+    ,
+     [%B21, %B26,
+           7865521      31   6696179241     25   25769893181     19
+        ---------- %B21   - ---------- %B21   - ----------- %B21
+        6006689520          2002229840            49235160
+      + 
+          1975912990729     13   1048460696489     7   21252634831
+        - ------------- %B21   - ------------- %B21  - ----------- %B21
+            3003344760             2002229840           6006689520
+      ,
+             778171189       31   1987468196267     25   155496778477189     19
+        - ------------- %B21   + ------------- %B21   + --------------- %B21
+          1387545279120          1387545279120            693772639560
+      + 
+        191631411158401     13   300335488637543     7   755656433863
+        --------------- %B21   + --------------- %B21  - ------------ %B21
+          693772639560            1387545279120          198220754160
+      ,
+          1094352947      31   2794979430821     25   218708802908737     19
+        ------------ %B21   - ------------- %B21   - --------------- %B21
+        462515093040           462515093040            231257546520
+      + 
+          91476663003591     13   145152550961823     7   1564893370717
+        - -------------- %B21   - --------------- %B21  - ------------- %B21
+            77085848840             154171697680           462515093040
+      ,
+                    4321823003      31   180949546069     25
+        - %B26 - ------------- %B21   + ------------ %B21
+                 1387545279120           22746643920
+      + 
+        863753195062493     19   1088094456732317     13
+        --------------- %B21   + ---------------- %B21
+          693772639560             693772639560
+      + 
+        1732620732685741     7   13506088516033
+        ---------------- %B21  + -------------- %B21
+          1387545279120           1387545279120
+      ]
+    ,
+     [%B22, %B23,
+           7865521      31   6696179241     25   25769893181     19
+        ---------- %B22   - ---------- %B22   - ----------- %B22
+        6006689520          2002229840            49235160
+      + 
+          1975912990729     13   1048460696489     7   21252634831
+        - ------------- %B22   - ------------- %B22  - ----------- %B22
+            3003344760             2002229840           6006689520
+      ,
+             778171189       31   1987468196267     25   155496778477189     19
+        - ------------- %B22   + ------------- %B22   + --------------- %B22
+          1387545279120          1387545279120            693772639560
+      + 
+        191631411158401     13   300335488637543     7   755656433863
+        --------------- %B22   + --------------- %B22  - ------------ %B22
+          693772639560            1387545279120          198220754160
+      ,
+          1094352947      31   2794979430821     25   218708802908737     19
+        ------------ %B22   - ------------- %B22   - --------------- %B22
+        462515093040           462515093040            231257546520
+      + 
+          91476663003591     13   145152550961823     7   1564893370717
+        - -------------- %B22   - --------------- %B22  - ------------- %B22
+            77085848840             154171697680           462515093040
+      ,
+                    4321823003      31   180949546069     25
+        - %B23 - ------------- %B22   + ------------ %B22
+                 1387545279120           22746643920
+      + 
+        863753195062493     19   1088094456732317     13
+        --------------- %B22   + ---------------- %B22
+          693772639560             693772639560
+      + 
+        1732620732685741     7   13506088516033
+        ---------------- %B22  + -------------- %B22
+          1387545279120           1387545279120
+      ]
+    ,
+     [%B22, %B24,
+           7865521      31   6696179241     25   25769893181     19
+        ---------- %B22   - ---------- %B22   - ----------- %B22
+        6006689520          2002229840            49235160
+      + 
+          1975912990729     13   1048460696489     7   21252634831
+        - ------------- %B22   - ------------- %B22  - ----------- %B22
+            3003344760             2002229840           6006689520
+      ,
+             778171189       31   1987468196267     25   155496778477189     19
+        - ------------- %B22   + ------------- %B22   + --------------- %B22
+          1387545279120          1387545279120            693772639560
+      + 
+        191631411158401     13   300335488637543     7   755656433863
+        --------------- %B22   + --------------- %B22  - ------------ %B22
+          693772639560            1387545279120          198220754160
+      ,
+          1094352947      31   2794979430821     25   218708802908737     19
+        ------------ %B22   - ------------- %B22   - --------------- %B22
+        462515093040           462515093040            231257546520
+      + 
+          91476663003591     13   145152550961823     7   1564893370717
+        - -------------- %B22   - --------------- %B22  - ------------- %B22
+            77085848840             154171697680           462515093040
+      ,
+                    4321823003      31   180949546069     25
+        - %B24 - ------------- %B22   + ------------ %B22
+                 1387545279120           22746643920
+      + 
+        863753195062493     19   1088094456732317     13
+        --------------- %B22   + ---------------- %B22
+          693772639560             693772639560
+      + 
+        1732620732685741     7   13506088516033
+        ---------------- %B22  + -------------- %B22
+          1387545279120           1387545279120
+      ]
+    ,
+   [%B31,%B35,- %B35 - 4%B31,%B31,%B31,%B31],
+   [%B31,%B36,- %B36 - 4%B31,%B31,%B31,%B31],
+   [%B32,%B33,- %B33 - 4%B32,%B32,%B32,%B32],
+   [%B32,%B34,- %B34 - 4%B32,%B32,%B32,%B32]]
+                                Type: List List RealClosure Fraction Integer
+
+We obtain 24 points given by lists of elements in the RealClosure
+of Fraction of R.  In each list, the first value corresponds 
+to the indeterminate f, the second to e and so on. 
+
+See Also:
+o )help RegularChain
+o )help RegularTriangularSet
+o )help SquareFreeRegularTriangularSet
+o )help ZeroDimensionalSolvePackage
+o )help NewSparseMultivariatePolynomial
+o )help LinGroebnerPackage
+o )help NormalizedTriangularSetCategory
+o )help RealClosure
+o )help Fraction
+o )show LexTriangularPackage
+o $AXIOM/doc/src/algebra/zerodim.spad.dvi
+
+@
 <<package LEXTRIPK LexTriangularPackage>>=
 )abbrev package LEXTRIPK LexTriangularPackage
 ++ Author: Marc Moreno Maza
diff --git a/src/doc/book.pamphlet b/src/doc/book.pamphlet
index 4930c49..b941c08 100644
--- a/src/doc/book.pamphlet
+++ b/src/doc/book.pamphlet
@@ -31592,7 +31592,7 @@ $$
 
 For more information, see the paper: Bronstein, M and Salvy, B.
 ``Full Partial Fraction Decomposition of Rational Functions,'' 
-{\it Proceedings of ISSAC'93, Kiev}, ACM Press.  All see
+{\it Proceedings of ISSAC'93, Kiev}, ACM Press.  Also see
 \ref{PartialFractionXmpPage} on page~\pageref{PartialFractionXmpPage} 
 for standard partial fraction decompositions.
 
diff --git a/src/doc/spadhelp.pamphlet b/src/doc/spadhelp.pamphlet
index ed3bde9..cda0ac8 100644
--- a/src/doc/spadhelp.pamphlet
+++ b/src/doc/spadhelp.pamphlet
@@ -1482,18 +1482,33 @@ syntax        trace      undo       what       while
 
 Available algebra help topics are:
 
-AssociationList (ALIST)    BalancedBinaryTree (BBTREE)
-BasicOperator (BOP)        BinaryExpansion (BINARY)
-BinarySearchTree (BSTREE)  CardinalNumber (CARD)
-CartesianTensor (CARTEN)   Character (CHAR)
-CharacterClass (CCLASS)    CliffordAlgebra (CLIF)
-Complex (COMPLEX)          ContinuedFraction (CONTFRAC)
-CycleIndicators (CYCLES)   DeRhamComplex (DERHAM)
-DecimalExpansion (DECIMAL) DistributedMultivariatePolynomial (DMP)
-DoubleFloat (DFLOAT)       EqTable (EQTBL)
-Equation (EQ)
+AssociationList (ALIST)         BalancedBinaryTree (BBTREE)
+BasicOperator (BOP)             BinaryExpansion (BINARY)
+BinarySearchTree (BSTREE)       CardinalNumber (CARD)
+CartesianTensor (CARTEN)        Character (CHAR)
+CharacterClass (CCLASS)         CliffordAlgebra (CLIF)
+Complex (COMPLEX)               ContinuedFraction (CONTFRAC)
+CycleIndicators (CYCLES)        DeRhamComplex (DERHAM)
+DecimalExpansion (DECIMAL)      DistributedMultivariatePolynomial (DMP)
+DoubleFloat (DFLOAT)            EqTable (EQTBL)
+Equation (EQ)                   Factored (FR)
+FactoredFunctions2 (FR2)        File (FILE)
+FileName (FNAME)                FlexibleArray (FARRAY)
+Float (FLOAT)                   Fraction (FR)
+FullPartialFractionExpansion (FPARFRAC)
 GeneralDistributedMultivariatePolynomial (GDMP)
+GeneralSparseTable (GSTBL)      GroebnerFactorizationPackage (GBF)
+Heap (HEAP)                     HexadecimalExpansion (HEXADEC)
 HomogeneousDistributedMultivariatePolynomial (HDMP)
+Integer (INT)                   IntegerLinearDependence (ZLINDEP)
+IntegerNumberTheoryFunctions (INTHEORY)
+Kernel (KERNEL)                 KeyedAccessFile (KAFILE)
+LexTriangularPackage (LEXTRIPK) Library (LIB)
+LieExponentials (LEXP)          LinearOrdinaryDifferentialOperator (LODO)
+LinearOrdinaryDifferentialOperator1 (LODO1)
+LinearOrdinaryDifferentialOperator2 (LODO2)
+RealSolvePackage (REALSOLV)
+RomanNumeral (ROMAN)
 
 @ 
 
