diff --git a/changelog b/changelog index 6ffd80a..753235b 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,81 @@ +20070906 tpd merge help files branch +20070906 tpd src/doc/spadhelp add ZeroDimensionalSolvePackage +20070906 tpd src/algebra/Makefile add ZeroDimensionalSolvePackage.help +20070906 tpd src/algebra/zerodim.spad add ZeroDimensionalSolvePackage.help +20070906 tpd src/algebra/zerodim.spad ZeroDimensionalSolvePackage.input +20070906 tpd src/doc/spadhelp add XPolynomialRing +20070906 tpd src/algebra/Makefile add XPolynomialRing.help +20070906 tpd src/algebra/xpoly.spad add XPolynomialRing.help (XPR) +20070906 tpd src/algebra/xpoly.spad XPolynomialRing.input +20070906 tpd src/doc/spadhelp add XPolynomial +20070906 tpd src/algebra/Makefile add XPolynomial.help +20070906 tpd src/algebra/xpoly.spad add XPolynomial.help (XPOLY) +20070906 tpd src/algebra/xpoly.spad XPolynomial.input +20070906 tpd src/doc/spadhelp add XPBWPolynomial +20070906 tpd src/algebra/Makefile add XPBWPolynomial.help +20070906 tpd src/algebra/xlpoly.spad add XPBWPolynomial.help (XPBWPOLY) +20070906 tpd src/algebra/xlpoly.spad XPBWPolynomial.input +20070905 tpd src/doc/spadhelp add WuWenTsunTriangularSet +20070905 tpd src/algebra/Makefile add WuWenTsunTriangularSet.help +20070905 tpd src/algebra/triset.spad add WuWenTsunTriangularSet.help (WUTSET) +20070905 tpd src/algebra/triset.spad WuWenTsunTriangularSet.input +20070905 tpd src/doc/spadhelp add Void +20070905 tpd src/algebra/Makefile add Void.help +20070905 tpd src/algebra/void.spad add Void.help (VOID) +20070905 tpd src/algebra/void.spad Void.input +20070905 tpd src/doc/spadhelp add Vector +20070905 tpd src/algebra/Makefile add Vector.help +20070905 tpd src/algebra/vector.spad add Vector.help (Vector) +20070905 tpd src/algebra/vector.spad Vector.input +20070905 tpd src/doc/spadhelp add UniversalSegment +20070905 tpd src/algebra/Makefile add UniversalSegment.help +20070905 tpd src/algebra/seg.spad add UniversalSegment.help (UNISEG) +20070905 tpd src/algebra/seg.spad UniversalSegment.input +20070905 tpd src/doc/spadhelp add UnivariatePolynomial +20070905 tpd src/algebra/Makefile add UnivariatePolynomial.help +20070905 tpd src/algebra/poly.spad add UnivariatePolynomial.help (UP) +20070905 tpd src/algebra/poly.spad UnivariatePolynomial.input +20070905 tpd src/doc/spadhelp add TwoDimensionalArray +20070905 tpd src/algebra/Makefile add TwoDimensionalArray.help +20070905 tpd src/algebra/array2.spad add TwoDimensionalArray.help (ARRAY2) +20070905 tpd src/algebra/array2.spad TwoDimensionalArray.input +20070905 tpd src/doc/spadhelp add TextFile +20070905 tpd src/algebra/Makefile add TextFile.help +20070905 tpd src/algebra/files.spad add TextFile.help (TEXTFILE) +20070905 tpd src/algebra/files.spad TextFile.input +20070905 tpd src/doc/spadhelp add Table +20070905 tpd src/algebra/Makefile add Table.help +20070905 tpd src/algebra/table.spad add Table.help (TABLE) +20070905 tpd src/algebra/table.spad Table.input +20070905 tpd src/doc/spadhelp add StringTable +20070905 tpd src/algebra/Makefile add StringTable.help +20070905 tpd src/algebra/table.spad add StringTable.help (STRTBL) +20070905 tpd src/algebra/table.spad StringTable.input +20070905 tpd src/doc/spadhelp add String +20070905 tpd src/algebra/Makefile add String.help +20070905 tpd src/algebra/stream.spad add String.help (STRING) +20070905 tpd src/algebra/stream.spad String.input +20070905 tpd src/doc/book remove duplicate upperCase, lowerCase typo +20070905 tpd src/doc/spadhelp add Stream +20070905 tpd src/algebra/Makefile add Stream.help +20070905 tpd src/algebra/stream.spad add Stream.help (STREAM) +20070905 tpd src/algebra/stream.spad Stream.input +20070905 tpd src/doc/spadhelp add SquareFreeRegularTriangularSet +20070905 tpd src/algebra/Makefile add SquareFreeRegularTriangularSet.help +20070905 tpd src/algebra/sregset.spad add SquareFreeRegularTriangularSet.help +20070905 tpd src/algebra/sregset.spad SquareFreeRegularTriangularSet.input +20070905 tpd src/doc/spadhelp add SquareMatrix +20070905 tpd src/algebra/Makefile add SquareMatrix.help +20070905 tpd src/algebra/matrix.spad add SquareMatrix.help (SQMATRIX) +20070905 tpd src/algebra/matrix.spad SquareMatrix.input +20070905 tpd src/doc/spadhelp add SparseTable +20070905 tpd src/algebra/Makefile add SparseTable.help +20070905 tpd src/algebra/table.spad add SparseTable.help (STBL) +20070905 tpd src/algebra/table.spad SparseTable.input +20070905 tpd src/doc/spadhelp add SingleInteger +20070905 tpd src/algebra/Makefile add SingleInteger.help +20070905 tpd src/algebra/si.spad add SingleInteger.help (SINT) +20070905 tpd src/algebra/si.spad SingleInteger.input 20070905 tpd src/doc/spadhelp add Set 20070905 tpd src/algebra/Makefile add Set.help 20070905 tpd src/algebra/sets.spad add Set.help (SET) diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet index 8c50591..ba8b53f 100644 --- a/src/algebra/Makefile.pamphlet +++ b/src/algebra/Makefile.pamphlet @@ -2069,46 +2069,60 @@ This keeps the regression test list in the algebra Makefile. <>= SPADHELP=\ - ${HELP}/AssociationList.help ${HELP}/BalancedBinaryTree.help \ - ${HELP}/BasicOperator.help ${HELP}/BinaryExpansion.help \ - ${HELP}/BinarySearchTree.help ${HELP}/CardinalNumber.help \ - ${HELP}/CartesianTensor.help ${HELP}/Character.help \ - ${HELP}/CharacterClass.help ${HELP}/CliffordAlgebra.help \ - ${HELP}/Complex.help ${HELP}/ContinuedFraction.help \ - ${HELP}/CycleIndicators.help ${HELP}/DeRhamComplex.help \ - ${HELP}/DecimalExpansion.help ${HELP}/DoubleFloat.help \ - ${HELP}/EqTable.help ${HELP}/Equation.help \ + ${HELP}/AssociationList.help ${HELP}/BalancedBinaryTree.help \ + ${HELP}/BasicOperator.help ${HELP}/BinaryExpansion.help \ + ${HELP}/BinarySearchTree.help ${HELP}/CardinalNumber.help \ + ${HELP}/CartesianTensor.help ${HELP}/Character.help \ + ${HELP}/CharacterClass.help ${HELP}/CliffordAlgebra.help \ + ${HELP}/Complex.help ${HELP}/ContinuedFraction.help \ + ${HELP}/CycleIndicators.help ${HELP}/DeRhamComplex.help \ + ${HELP}/DecimalExpansion.help ${HELP}/DoubleFloat.help \ + ${HELP}/EqTable.help ${HELP}/Equation.help \ ${HELP}/DistributedMultivariatePolynomial.help \ - ${HELP}/Factored.help ${HELP}/Fraction.help \ + ${HELP}/Factored.help ${HELP}/FactoredFunctions2.help \ + ${HELP}/File.help ${HELP}/FileName.help \ + ${HELP}/FlexibleArray.help ${HELP}/Float.help \ + ${HELP}/Fraction.help \ + ${HELP}/FullPartialFractionExpansion.help \ ${HELP}/GeneralDistributedMultivariatePolynomial.help \ ${HELP}/GeneralSparseTable.help ${HELP}/GroebnerFactorizationPackage.help \ - ${HELP}/Heap.help ${HELP}/HexadecimalExpansion.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}/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}/List.help \ - ${HELP}/LyndonWord.help ${HELP}/Magma.help \ - ${HELP}/MakeFunction.help ${HELP}/MappingPackage1.help \ - ${HELP}/MappingPackage2.help ${HELP}/MappingPackage3.help \ - ${HELP}/Matrix.help ${HELP}/Multiset.help \ + ${HELP}/LyndonWord.help ${HELP}/Magma.help \ + ${HELP}/MakeFunction.help ${HELP}/MappingPackage1.help \ + ${HELP}/MappingPackage2.help ${HELP}/MappingPackage3.help \ + ${HELP}/Matrix.help ${HELP}/Multiset.help \ ${HELP}/MultivariatePolynomial.help ${HELP}/None.help \ - ${HELP}/Octonion.help ${HELP}/OneDimensionalArray.help \ - ${HELP}/Operator.help ${HELP}/OrderedVariableList.help \ + ${HELP}/Octonion.help ${HELP}/OneDimensionalArray.help \ + ${HELP}/Operator.help ${HELP}/OrderedVariableList.help \ ${HELP}/OrderlyDifferentialPolynomial.help \ ${HELP}/PlaneAlgebraicCurvePlot.help \ - ${HELP}/Permutation.help ${HELP}/PartialFraction.help \ - ${HELP}/Permanent.help ${HELP}/Polynomial.help \ - ${HELP}/Quaternion.help ${HELP}/RadixExpansion.help \ - ${HELP}/RealClosure.help ${HELP}/RealSolvePackage.help \ - ${HELP}/RegularTriangularSet.help \ - ${HELP}/RomanNumeral.help ${HELP}/Segment.help \ - ${HELP}/Set.help \ - ${HELP}/TwoDimensionalViewport.help + ${HELP}/PartialFraction.help \ + ${HELP}/Permanent.help ${HELP}/Permutation.help \ + ${HELP}/Polynomial.help ${HELP}/Quaternion.help \ + ${HELP}/RadixExpansion.help ${HELP}/RealClosure.help \ + ${HELP}/RealSolvePackage.help ${HELP}/RegularTriangularSet.help \ + ${HELP}/RomanNumeral.help ${HELP}/Segment.help \ + ${HELP}/Set.help ${HELP}/SingleInteger.help \ + ${HELP}/SparseTable.help ${HELP}/SquareMatrix.help \ + ${HELP}/SquareFreeRegularTriangularSet.help \ + ${HELP}/Stream.help ${HELP}/String.help \ + ${HELP}/StringTable.help ${HELP}/Symbol.help \ + ${HELP}/Table.help ${HELP}/TextFile.help \ + ${HELP}/TwoDimensionalArray.help ${HELP}/TwoDimensionalViewport.help \ + ${HELP}/UnivariatePolynomial.help ${HELP}/UniversalSegment.help \ + ${HELP}/Vector.help ${HELP}/Void.help \ + ${HELP}/WuWenTsunTriangularSet.help ${HELP}/XPBWPolynomial.help \ + ${HELP}/XPolynomial.help ${HELP}/XPolynomialRing.help \ + ${HELP}/ZeroDimensionalSolvePackage.help @ The algebra files contain input chunks in regress format. @@ -2119,46 +2133,60 @@ is put into a int/Makefile.algebra and then executed by make. TESTSYS= ${OBJ}/${SYS}/bin/interpsys REGRESS=\ - AssociationList.regress BalancedBinaryTree.regress \ - BasicOperator.regress BinaryExpansion.regress \ - BinarySearchTree.regress CardinalNumber.regress \ - CartesianTensor.regress Character.regress \ - CharacterClass.regress CliffordAlgebra.regress \ - Complex.regress ContinuedFraction.regress \ - CycleIndicators.regress DeRhamComplex.regress \ - DecimalExpansion.regress DoubleFloat.regress \ - EqTable.regress Equation.regress \ + AssociationList.regress BalancedBinaryTree.regress \ + BasicOperator.regress BinaryExpansion.regress \ + BinarySearchTree.regress CardinalNumber.regress \ + CartesianTensor.regress Character.regress \ + CharacterClass.regress CliffordAlgebra.regress \ + Complex.regress ContinuedFraction.regress \ + CycleIndicators.regress DeRhamComplex.regress \ + DecimalExpansion.regress DoubleFloat.regress \ + EqTable.regress Equation.regress \ DistributedMultivariatePolynomial.regress \ - Factored.regress Fraction.regress \ + Factored.regress FactoredFunctions2.regress \ + File.regress FileName.regress \ + FlexibleArray.regress Float.regress \ + Fraction.regress FullPartialFractionExpansion.regress \ GeneralDistributedMultivariatePolynomial.regress \ - GeneralSparseTable.regress GroebnerFactorizationPackage.regress \ - Heap.regress HexadecimalExpansion.regress \ + GeneralSparseTable.regress GroebnerFactorizationPackage.regress \ + Heap.regress HexadecimalExpansion.regress \ HomogeneousDistributedMultivariatePolynomial.regress \ - Integer.regress IntegerLinearDependence.regress \ + Integer.regress IntegerLinearDependence.regress \ IntegerNumberTheoryFunctions.regress \ - Kernel.regress KeyedAccessFile.regress \ - LexTriangularPackage.regress Library.regress \ - LieExponentials.regress LiePolynomial.regress \ + Kernel.regress KeyedAccessFile.regress \ + LexTriangularPackage.regress Library.regress \ + LieExponentials.regress LiePolynomial.regress \ LinearOrdinaryDifferentialOperator.regress \ LinearOrdinaryDifferentialOperator1.regress \ LinearOrdinaryDifferentialOperator2.regress List.regress \ - LyndonWord.regress Magma.regress \ - MakeFunction.regress MappingPackage1.regress \ - MappingPackage2.regress MappingPackage3.regress \ - Matrix.regress Multiset.regress \ + LyndonWord.regress Magma.regress \ + MakeFunction.regress MappingPackage1.regress \ + MappingPackage2.regress MappingPackage3.regress \ + Matrix.regress Multiset.regress \ MultivariatePolynomial.regress None.regress \ - Octonion.regress OneDimensionalArray.regress \ - Operator.regress OrderedVariableList.regress \ - OrderlyDifferentialPolynomial.regress PartialFraction.regress \ - Permanent.regress Permutation.regress \ + Octonion.regress OneDimensionalArray.regress \ + Operator.regress OrderedVariableList.regress \ + OrderlyDifferentialPolynomial.regress \ + PartialFraction.regress \ + Permanent.regress Permutation.regress \ PlaneAlgebraicCurvePlot.regress \ - Polynomial.regress Quaternion.regress \ - RadixExpansion.regress RealClosure.regress \ - RealSolvePackage.regress RegularTriangularSet.regress \ - RomanNumeral.regress Segment.regress \ - Set.regress - -# this requires graphics + Polynomial.regress Quaternion.regress \ + RadixExpansion.regress RealClosure.regress \ + RealSolvePackage.regress RegularTriangularSet.regress \ + RomanNumeral.regress Segment.regress \ + Set.regress SingleInteger.regress \ + SparseTable.regress SquareMatrix.regress \ + SquareFreeRegularTriangularSet.regress \ + Stream.regress String.regress \ + StringTable.regress Symbol.regress \ + Table.regress TextFile.regress \ + TwoDimensionalArray.regress \ + UnivariatePolynomial.regress UniversalSegment.regress \ + Vector.regress Void.regress \ + WuWenTsunTriangularSet.regress XPBWPolynomial.regress \ + XPolynomial.regress XPolynomialRing.regress \ + ZeroDimensionalSolvePackage.regress +# these requires graphics # TwoDimensionalViewport %.regress: %.input @@ -2339,8 +2367,48 @@ ${HELP}/Factored.help: ${IN}/fr.spad.pamphlet @${TANGLE} -R"Factored.input" ${IN}/fr.spad.pamphlet \ >${INPUT}/Factored.input +${HELP}/FactoredFunctions2.help: ${IN}/fr.spad.pamphlet + @echo 7020 create FactoredFunctions2.help from ${IN}/fr.spad.pamphlet + @${TANGLE} -R"FactoredFunctions2.help" ${IN}/fr.spad.pamphlet \ + >${HELP}/FactoredFunctions2.help + @cp ${HELP}/FactoredFunctions2.help ${HELP}/FR2.help + @${TANGLE} -R"FactoredFunctions2.input" ${IN}/fr.spad.pamphlet \ + >${INPUT}/FactoredFunctions2.input + +${HELP}/File.help: ${IN}/files.spad.pamphlet + @echo 7021 create File.help from ${IN}/files.spad.pamphlet + @${TANGLE} -R"File.help" ${IN}/files.spad.pamphlet \ + >${HELP}/File.help + @cp ${HELP}/File.help ${HELP}/FILE.help + @${TANGLE} -R"File.input" ${IN}/files.spad.pamphlet \ + >${INPUT}/File.input + +${HELP}/FileName.help: ${IN}/fname.spad.pamphlet + @echo 7022 create FileName.help from ${IN}/fname.spad.pamphlet + @${TANGLE} -R"FileName.help" ${IN}/fname.spad.pamphlet \ + >${HELP}/FileName.help + @cp ${HELP}/FileName.help ${HELP}/FNAME.help + @${TANGLE} -R"FileName.input" ${IN}/fname.spad.pamphlet \ + >${INPUT}/FileName.input + +${HELP}/FlexibleArray.help: ${IN}/array1.spad.pamphlet + @echo 7023 create FlexibleArray.help from ${IN}/array1.spad.pamphlet + @${TANGLE} -R"FlexibleArray.help" ${IN}/array1.spad.pamphlet \ + >${HELP}/FlexibleArray.help + @cp ${HELP}/FlexibleArray.help ${HELP}/FARRAY.help + @${TANGLE} -R"FlexibleArray.input" ${IN}/array1.spad.pamphlet \ + >${INPUT}/FlexibleArray.input + +${HELP}/Float.help: ${IN}/float.spad.pamphlet + @echo 7024 create Float.help from ${IN}/float.spad.pamphlet + @${TANGLE} -R"Float.help" ${IN}/float.spad.pamphlet \ + >${HELP}/Float.help + @cp ${HELP}/Float.help ${HELP}/FLOAT.help + @${TANGLE} -R"Float.input" ${IN}/float.spad.pamphlet \ + >${INPUT}/Float.input + ${HELP}/Fraction.help: ${IN}/fraction.spad.pamphlet - @echo 7020 create Fraction.help from ${IN}/fraction.spad.pamphlet + @echo 7025 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 @@ -2348,7 +2416,7 @@ ${HELP}/Fraction.help: ${IN}/fraction.spad.pamphlet >${INPUT}/Fraction.input ${HELP}/FullPartialFractionExpansion.help: ${IN}/fparfrac.spad.pamphlet - @echo 7021 create FullPartialFractionExpansion.help from \ + @echo 7026 create FullPartialFractionExpansion.help from \ ${IN}/fparfrac.spad.pamphlet @${TANGLE} -R"FullPartialFractionExpansion.help" \ ${IN}/fparfrac.spad.pamphlet \ @@ -2360,7 +2428,7 @@ ${HELP}/FullPartialFractionExpansion.help: ${IN}/fparfrac.spad.pamphlet ${HELP}/GeneralDistributedMultivariatePolynomial.help: \ ${IN}/gdpoly.spad.pamphlet - @echo 7022 create GeneralDistributedMultivariatePolynomial.help \ + @echo 7027 create GeneralDistributedMultivariatePolynomial.help \ from ${IN}/gdpoly.spad.pamphlet @${TANGLE} -R"GeneralDistributedMultivariatePolynomial.help" \ ${IN}/gdpoly.spad.pamphlet \ @@ -2372,7 +2440,7 @@ ${HELP}/GeneralDistributedMultivariatePolynomial.help: \ >${INPUT}/GeneralDistributedMultivariatePolynomial.input ${HELP}/GeneralSparseTable.help: ${IN}/table.spad.pamphlet - @echo 7023 create GeneralSparseTable.help from \ + @echo 7028 create GeneralSparseTable.help from \ ${IN}/table.spad.pamphlet @${TANGLE} -R"GeneralSparseTable.help" ${IN}/table.spad.pamphlet \ >${HELP}/GeneralSparseTable.help @@ -2381,7 +2449,7 @@ ${HELP}/GeneralSparseTable.help: ${IN}/table.spad.pamphlet >${INPUT}/GeneralSparseTable.input ${HELP}/GroebnerFactorizationPackage.help: ${IN}/groebf.spad.pamphlet - @echo 7024 create GroebnerFactorizationPackage.help \ + @echo 7029 create GroebnerFactorizationPackage.help \ from ${IN}/groebf.spad.pamphlet @${TANGLE} -R"GroebnerFactorizationPackage.help" \ ${IN}/groebf.spad.pamphlet \ @@ -2392,14 +2460,14 @@ ${HELP}/GroebnerFactorizationPackage.help: ${IN}/groebf.spad.pamphlet >${INPUT}/GroebnerFactorizationPackage.input ${HELP}/Heap.help: ${IN}/bags.spad.pamphlet - @echo 7025 create Heap.help from ${IN}/bags.spad.pamphlet + @echo 7030 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 \ + @echo 7031 create HexadecimalExpansion.help \ from ${IN}/radix.spad.pamphlet @${TANGLE} -R"HexadecimalExpansion.help" ${IN}/radix.spad.pamphlet \ >${HELP}/HexadecimalExpansion.help @@ -2409,7 +2477,7 @@ ${HELP}/HexadecimalExpansion.help: ${IN}/radix.spad.pamphlet ${HELP}/HomogeneousDistributedMultivariatePolynomial.help: \ ${IN}/gdpoly.spad.pamphlet - @echo 7027 create HomogeneousDistributedMultivariatePolynomial.help \ + @echo 7032 create HomogeneousDistributedMultivariatePolynomial.help \ from ${IN}/gdpoly.spad.pamphlet @${TANGLE} -R"HomogeneousDistributedMultivariatePolynomial.help" \ ${IN}/gdpoly.spad.pamphlet \ @@ -2421,7 +2489,7 @@ ${HELP}/HomogeneousDistributedMultivariatePolynomial.help: \ >${INPUT}/HomogeneousDistributedMultivariatePolynomial.input ${HELP}/Integer.help: ${IN}/integer.spad.pamphlet - @echo 7028 create Integer.help from ${IN}/integer.spad.pamphlet + @echo 7033 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 @@ -2429,7 +2497,7 @@ ${HELP}/Integer.help: ${IN}/integer.spad.pamphlet >${INPUT}/Integer.input ${HELP}/IntegerLinearDependence.help: ${IN}/lindep.spad.pamphlet - @echo 7029 create IntegerLinearDependence.help from \ + @echo 7034 create IntegerLinearDependence.help from \ ${IN}/lindep.spad.pamphlet @${TANGLE} -R"IntegerLinearDependence.help" \ ${IN}/lindep.spad.pamphlet \ @@ -2440,7 +2508,7 @@ ${HELP}/IntegerLinearDependence.help: ${IN}/lindep.spad.pamphlet >${INPUT}/IntegerLinearDependence.input ${HELP}/IntegerNumberTheoryFunctions.help: ${IN}/numtheor.spad.pamphlet - @echo 7030 create IntegerNumberTheoryFunctions.help \ + @echo 7035 create IntegerNumberTheoryFunctions.help \ from ${IN}/numtheor.spad.pamphlet @${TANGLE} -R"IntegerNumberTheoryFunctions.help" \ ${IN}/numtheor.spad.pamphlet \ @@ -2452,7 +2520,7 @@ ${HELP}/IntegerNumberTheoryFunctions.help: ${IN}/numtheor.spad.pamphlet >${INPUT}/IntegerNumberTheoryFunctions.input ${HELP}/Kernel.help: ${IN}/kl.spad.pamphlet - @echo 7031 create Kernel.help from ${IN}/kl.spad.pamphlet + @echo 7036 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 @@ -2460,7 +2528,7 @@ ${HELP}/Kernel.help: ${IN}/kl.spad.pamphlet >${INPUT}/Kernel.input ${HELP}/KeyedAccessFile.help: ${IN}/files.spad.pamphlet - @echo 7032 create KeyedAccessFile.help from ${IN}/files.spad.pamphlet + @echo 7037 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 @@ -2468,7 +2536,7 @@ ${HELP}/KeyedAccessFile.help: ${IN}/files.spad.pamphlet >${INPUT}/KeyedAccessFile.input ${HELP}/LexTriangularPackage.help: ${IN}/zerodim.spad.pamphlet - @echo 7033 create LexTriangularPackage.help from \ + @echo 7038 create LexTriangularPackage.help from \ ${IN}/zerodim.spad.pamphlet @${TANGLE} -R"LexTriangularPackage.help" ${IN}/zerodim.spad.pamphlet \ >${HELP}/LexTriangularPackage.help @@ -2477,7 +2545,7 @@ ${HELP}/LexTriangularPackage.help: ${IN}/zerodim.spad.pamphlet >${INPUT}/LexTriangularPackage.input ${HELP}/Library.help: ${IN}/files.spad.pamphlet - @echo 7034 create Library.help from ${IN}/files.spad.pamphlet + @echo 7039 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 @@ -2485,7 +2553,7 @@ ${HELP}/Library.help: ${IN}/files.spad.pamphlet >${INPUT}/Library.input ${HELP}/LieExponentials.help: ${IN}/xlpoly.spad.pamphlet - @echo 7035 create LieExponentials.help from ${IN}/xlpoly.spad.pamphlet + @echo 7040 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 @@ -2493,7 +2561,7 @@ ${HELP}/LieExponentials.help: ${IN}/xlpoly.spad.pamphlet >${INPUT}/LieExponentials.input ${HELP}/LiePolynomial.help: ${IN}/xlpoly.spad.pamphlet - @echo 7035 create LiePolynomial.help from ${IN}/xlpoly.spad.pamphlet + @echo 7041 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 @@ -2501,7 +2569,7 @@ ${HELP}/LiePolynomial.help: ${IN}/xlpoly.spad.pamphlet >${INPUT}/LiePolynomial.input ${HELP}/LinearOrdinaryDifferentialOperator.help: ${IN}/lodo.spad.pamphlet - @echo 7037 create LinearOrdinaryDifferentialOperator.help \ + @echo 7042 create LinearOrdinaryDifferentialOperator.help \ from ${IN}/lodo.spad.pamphlet @${TANGLE} -R"LinearOrdinaryDifferentialOperator.help" \ ${IN}/lodo.spad.pamphlet \ @@ -2512,7 +2580,7 @@ ${HELP}/LinearOrdinaryDifferentialOperator.help: ${IN}/lodo.spad.pamphlet >${INPUT}/LinearOrdinaryDifferentialOperator.input ${HELP}/LinearOrdinaryDifferentialOperator1.help: ${IN}/lodo.spad.pamphlet - @echo 7038 create LinearOrdinaryDifferentialOperator1.help \ + @echo 7043 create LinearOrdinaryDifferentialOperator1.help \ from ${IN}/lodo.spad.pamphlet @${TANGLE} -R"LinearOrdinaryDifferentialOperator1.help" \ ${IN}/lodo.spad.pamphlet \ @@ -2523,7 +2591,7 @@ ${HELP}/LinearOrdinaryDifferentialOperator1.help: ${IN}/lodo.spad.pamphlet >${INPUT}/LinearOrdinaryDifferentialOperator1.input ${HELP}/LinearOrdinaryDifferentialOperator2.help: ${IN}/lodo.spad.pamphlet - @echo 7039 create LinearOrdinaryDifferentialOperator2.help \ + @echo 7044 create LinearOrdinaryDifferentialOperator2.help \ from ${IN}/lodo.spad.pamphlet @${TANGLE} -R"LinearOrdinaryDifferentialOperator2.help" \ ${IN}/lodo.spad.pamphlet \ @@ -2534,7 +2602,7 @@ ${HELP}/LinearOrdinaryDifferentialOperator2.help: ${IN}/lodo.spad.pamphlet >${INPUT}/LinearOrdinaryDifferentialOperator2.input ${HELP}/List.help: ${IN}/list.spad.pamphlet - @echo 7040 create List.help from ${IN}/list.spad.pamphlet + @echo 7045 create List.help from ${IN}/list.spad.pamphlet @${TANGLE} -R"List.help" ${IN}/list.spad.pamphlet \ >${HELP}/List.help @cp ${HELP}/List.help ${HELP}/LIST.help @@ -2542,7 +2610,7 @@ ${HELP}/List.help: ${IN}/list.spad.pamphlet >${INPUT}/List.input ${HELP}/LyndonWord.help: ${IN}/xlpoly.spad.pamphlet - @echo 7041 create LyndonWord.help from ${IN}/xlpoly.spad.pamphlet + @echo 7046 create LyndonWord.help from ${IN}/xlpoly.spad.pamphlet @${TANGLE} -R"LyndonWord.help" ${IN}/xlpoly.spad.pamphlet \ >${HELP}/LyndonWord.help @cp ${HELP}/LyndonWord.help ${HELP}/LWORD.help @@ -2550,7 +2618,7 @@ ${HELP}/LyndonWord.help: ${IN}/xlpoly.spad.pamphlet >${INPUT}/LyndonWord.input ${HELP}/Magma.help: ${IN}/xlpoly.spad.pamphlet - @echo 7042 create Magma.help from ${IN}/xlpoly.spad.pamphlet + @echo 7047 create Magma.help from ${IN}/xlpoly.spad.pamphlet @${TANGLE} -R"Magma.help" ${IN}/xlpoly.spad.pamphlet \ >${HELP}/Magma.help @cp ${HELP}/Magma.help ${HELP}/MAGMA.help @@ -2558,7 +2626,7 @@ ${HELP}/Magma.help: ${IN}/xlpoly.spad.pamphlet >${INPUT}/Magma.input ${HELP}/MakeFunction.help: ${IN}/mkfunc.spad.pamphlet - @echo 7043 create MakeFunction.help from ${IN}/mkfunc.spad.pamphlet + @echo 7048 create MakeFunction.help from ${IN}/mkfunc.spad.pamphlet @${TANGLE} -R"MakeFunction.help" ${IN}/mkfunc.spad.pamphlet \ >${HELP}/MakeFunction.help @cp ${HELP}/MakeFunction.help ${HELP}/MKFUNC.help @@ -2566,7 +2634,7 @@ ${HELP}/MakeFunction.help: ${IN}/mkfunc.spad.pamphlet >${INPUT}/MakeFunction.input ${HELP}/MappingPackage1.help: ${IN}/mappkg.spad.pamphlet - @echo 7044 create MappingPackage1.help from ${IN}/mappkg.spad.pamphlet + @echo 7049 create MappingPackage1.help from ${IN}/mappkg.spad.pamphlet @${TANGLE} -R"MappingPackage1.help" ${IN}/mappkg.spad.pamphlet \ >${HELP}/MappingPackage1.help @cp ${HELP}/MappingPackage1.help ${HELP}/MAPPKG1.help @@ -2574,7 +2642,7 @@ ${HELP}/MappingPackage1.help: ${IN}/mappkg.spad.pamphlet >${INPUT}/MappingPackage1.input ${HELP}/MappingPackage2.help: ${IN}/mappkg.spad.pamphlet - @echo 7045 create MappingPackage2.help from ${IN}/mappkg.spad.pamphlet + @echo 7050 create MappingPackage2.help from ${IN}/mappkg.spad.pamphlet @${TANGLE} -R"MappingPackage2.help" ${IN}/mappkg.spad.pamphlet \ >${HELP}/MappingPackage2.help @cp ${HELP}/MappingPackage2.help ${HELP}/MAPPKG2.help @@ -2582,7 +2650,7 @@ ${HELP}/MappingPackage2.help: ${IN}/mappkg.spad.pamphlet >${INPUT}/MappingPackage2.input ${HELP}/MappingPackage3.help: ${IN}/mappkg.spad.pamphlet - @echo 7046 create MappingPackage3.help from ${IN}/mappkg.spad.pamphlet + @echo 7051 create MappingPackage3.help from ${IN}/mappkg.spad.pamphlet @${TANGLE} -R"MappingPackage3.help" ${IN}/mappkg.spad.pamphlet \ >${HELP}/MappingPackage3.help @cp ${HELP}/MappingPackage3.help ${HELP}/MAPPKG3.help @@ -2590,7 +2658,7 @@ ${HELP}/MappingPackage3.help: ${IN}/mappkg.spad.pamphlet >${INPUT}/MappingPackage3.input ${HELP}/Matrix.help: ${IN}/matrix.spad.pamphlet - @echo 7047 create Matrix.help from ${IN}/matrix.spad.pamphlet + @echo 7052 create Matrix.help from ${IN}/matrix.spad.pamphlet @${TANGLE} -R"Matrix.help" ${IN}/matrix.spad.pamphlet \ >${HELP}/Matrix.help @cp ${HELP}/Matrix.help ${HELP}/MATRIX.help @@ -2598,7 +2666,7 @@ ${HELP}/Matrix.help: ${IN}/matrix.spad.pamphlet >${INPUT}/Matrix.input ${HELP}/Multiset.help: ${IN}/mset.spad.pamphlet - @echo 7048 create Multiset.help from ${IN}/mset.spad.pamphlet + @echo 7053 create Multiset.help from ${IN}/mset.spad.pamphlet @${TANGLE} -R"Multiset.help" ${IN}/mset.spad.pamphlet \ >${HELP}/Multiset.help @cp ${HELP}/Multiset.help ${HELP}/MSET.help @@ -2606,7 +2674,7 @@ ${HELP}/Multiset.help: ${IN}/mset.spad.pamphlet >${INPUT}/Multiset.input ${HELP}/MultivariatePolynomial.help: ${IN}/multpoly.spad.pamphlet - @echo 7049 create MultivariatePolynomial.help from \ + @echo 7054 create MultivariatePolynomial.help from \ ${IN}/multpoly.spad.pamphlet @${TANGLE} -R"MultivariatePolynomial.help" \ ${IN}/multpoly.spad.pamphlet \ @@ -2617,13 +2685,13 @@ ${HELP}/MultivariatePolynomial.help: ${IN}/multpoly.spad.pamphlet >${INPUT}/MultivariatePolynomial.input ${HELP}/None.help: ${IN}/any.spad.pamphlet - @echo 7050 create None.help from ${IN}/any.spad.pamphlet + @echo 7055 create None.help from ${IN}/any.spad.pamphlet @${TANGLE} -R"None.help" ${IN}/any.spad.pamphlet >${HELP}/None.help @cp ${HELP}/None.help ${HELP}/NONE.help @${TANGLE} -R"None.input" ${IN}/any.spad.pamphlet >${INPUT}/None.input ${HELP}/Octonion.help: ${IN}/oct.spad.pamphlet - @echo 7051 create Octonion.help from ${IN}/oct.spad.pamphlet + @echo 7056 create Octonion.help from ${IN}/oct.spad.pamphlet @${TANGLE} -R"Octonion.help" ${IN}/oct.spad.pamphlet \ >${HELP}/Octonion.help @cp ${HELP}/Octonion.help ${HELP}/OCT.help @@ -2631,7 +2699,7 @@ ${HELP}/Octonion.help: ${IN}/oct.spad.pamphlet >${INPUT}/Octonion.input ${HELP}/OneDimensionalArray.help: ${IN}/array1.spad.pamphlet - @echo 7052 create OneDimensionalArray.help from \ + @echo 7057 create OneDimensionalArray.help from \ ${IN}/array1.spad.pamphlet @${TANGLE} -R"OneDimensionalArray.help" ${IN}/array1.spad.pamphlet \ >${HELP}/OneDimensionalArray.help @@ -2640,7 +2708,7 @@ ${HELP}/OneDimensionalArray.help: ${IN}/array1.spad.pamphlet >${INPUT}/OneDimensionalArray.input ${HELP}/Operator.help: ${IN}/opalg.spad.pamphlet - @echo 7053 create Operator.help from ${IN}/opalg.spad.pamphlet + @echo 7058 create Operator.help from ${IN}/opalg.spad.pamphlet @${TANGLE} -R"Operator.help" ${IN}/opalg.spad.pamphlet \ >${HELP}/Operator.help @cp ${HELP}/Operator.help ${HELP}/OP.help @@ -2648,7 +2716,7 @@ ${HELP}/Operator.help: ${IN}/opalg.spad.pamphlet >${INPUT}/Operator.input ${HELP}/OrderedVariableList.help: ${IN}/variable.spad.pamphlet - @echo 7054 create OrderedVariableList.help from \ + @echo 7059 create OrderedVariableList.help from \ ${IN}/variable.spad.pamphlet @${TANGLE} -R"OrderedVariableList.help" ${IN}/variable.spad.pamphlet \ >${HELP}/OrderedVariableList.help @@ -2657,7 +2725,7 @@ ${HELP}/OrderedVariableList.help: ${IN}/variable.spad.pamphlet >${INPUT}/OrderedVariableList.input ${HELP}/OrderlyDifferentialPolynomial.help: ${IN}/dpolcat.spad.pamphlet - @echo 7055 create OrderlyDifferentialPolynomial.help from \ + @echo 7060 create OrderlyDifferentialPolynomial.help from \ ${IN}/dpolcat.spad.pamphlet @${TANGLE} -R"OrderlyDifferentialPolynomial.help" \ ${IN}/dpolcat.spad.pamphlet \ @@ -2668,7 +2736,7 @@ ${HELP}/OrderlyDifferentialPolynomial.help: ${IN}/dpolcat.spad.pamphlet >${INPUT}/OrderlyDifferentialPolynomial.input ${HELP}/PartialFraction.help: ${IN}/pfr.spad.pamphlet - @echo 7056 create PartialFraction.help from ${IN}/pfr.spad.pamphlet + @echo 7061 create PartialFraction.help from ${IN}/pfr.spad.pamphlet @${TANGLE} -R"PartialFraction.help" ${IN}/pfr.spad.pamphlet \ >${HELP}/PartialFraction.help @cp ${HELP}/PartialFraction.help ${HELP}/PFR.help @@ -2676,23 +2744,23 @@ ${HELP}/PartialFraction.help: ${IN}/pfr.spad.pamphlet >${INPUT}/PartialFraction.input ${HELP}/Permanent.help: ${IN}/perman.spad.pamphlet - @echo 7057 create Permanent.help from ${IN}/perman.spad.pamphlet + @echo 7062 create Permanent.help from ${IN}/perman.spad.pamphlet @${TANGLE} -R"Permanent.help" ${IN}/perman.spad.pamphlet \ >${HELP}/Permanent.help @cp ${HELP}/Permanent.help ${HELP}/PERMAN.help @${TANGLE} -R"Permanent.input" ${IN}/perman.spad.pamphlet \ >${INPUT}/Permanent.input -${HELP}/Polynomial.help: ${IN}/multpoly.spad.pamphlet - @echo 7058 create Polynomial.help from ${IN}/multpoly.spad.pamphlet - @${TANGLE} -R"Polynomial.help" ${IN}/multpoly.spad.pamphlet \ - >${HELP}/Polynomial.help - @cp ${HELP}/Polynomial.help ${HELP}/POLY.help - @${TANGLE} -R"Polynomial.input" ${IN}/multpoly.spad.pamphlet \ - >${INPUT}/Polynomial.input +${HELP}/Permutation.help: ${IN}/perm.spad.pamphlet + @echo 7063 create Permutation.help from ${IN}/perm.spad.pamphlet + @${TANGLE} -R"Permutation.help" ${IN}/perm.spad.pamphlet \ + >${HELP}/Permutation.help + @cp ${HELP}/Permutation.help ${HELP}/PERM.help + @${TANGLE} -R"Permutation.input" ${IN}/perm.spad.pamphlet \ + >${INPUT}/Permutation.input ${HELP}/PlaneAlgebraicCurvePlot.help: ${IN}/acplot.spad.pamphlet - @echo 7059 create PlaneAlgebraicCurvePlot.help from \ + @echo 7064 create PlaneAlgebraicCurvePlot.help from \ ${IN}/acplot.spad.pamphlet @${TANGLE} -R"PlaneAlgebraicCurvePlot.help" \ ${IN}/acplot.spad.pamphlet \ @@ -2702,16 +2770,16 @@ ${HELP}/PlaneAlgebraicCurvePlot.help: ${IN}/acplot.spad.pamphlet ${IN}/acplot.spad.pamphlet \ >${INPUT}/PlaneAlgebraicCurvePlot.input -${HELP}/Permutation.help: ${IN}/perm.spad.pamphlet - @echo 7060 create Permutation.help from ${IN}/perm.spad.pamphlet - @${TANGLE} -R"Permutation.help" ${IN}/perm.spad.pamphlet \ - >${HELP}/Permutation.help - @cp ${HELP}/Permutation.help ${HELP}/PERM.help - @${TANGLE} -R"Permutation.input" ${IN}/perm.spad.pamphlet \ - >${INPUT}/Permutation.input +${HELP}/Polynomial.help: ${IN}/multpoly.spad.pamphlet + @echo 7065 create Polynomial.help from ${IN}/multpoly.spad.pamphlet + @${TANGLE} -R"Polynomial.help" ${IN}/multpoly.spad.pamphlet \ + >${HELP}/Polynomial.help + @cp ${HELP}/Polynomial.help ${HELP}/POLY.help + @${TANGLE} -R"Polynomial.input" ${IN}/multpoly.spad.pamphlet \ + >${INPUT}/Polynomial.input ${HELP}/Quaternion.help: ${IN}/quat.spad.pamphlet - @echo 7061 create Quaternion.help from ${IN}/quat.spad.pamphlet + @echo 7066 create Quaternion.help from ${IN}/quat.spad.pamphlet @${TANGLE} -R"Quaternion.help" ${IN}/quat.spad.pamphlet \ >${HELP}/Quaternion.help @cp ${HELP}/Quaternion.help ${HELP}/QUAT.help @@ -2719,7 +2787,7 @@ ${HELP}/Quaternion.help: ${IN}/quat.spad.pamphlet >${INPUT}/Quaternion.input ${HELP}/RadixExpansion.help: ${IN}/radix.spad.pamphlet - @echo 7062 create RadixExpansion.help from ${IN}/radix.spad.pamphlet + @echo 7067 create RadixExpansion.help from ${IN}/radix.spad.pamphlet @${TANGLE} -R"RadixExpansion.help" ${IN}/radix.spad.pamphlet \ >${HELP}/RadixExpansion.help @cp ${HELP}/RadixExpansion.help ${HELP}/RADIX.help @@ -2727,7 +2795,7 @@ ${HELP}/RadixExpansion.help: ${IN}/radix.spad.pamphlet >${INPUT}/RadixExpansion.input ${HELP}/RealClosure.help: ${IN}/reclos.spad.pamphlet - @echo 7063 create RealClosure.help from ${IN}/reclos.spad.pamphlet + @echo 7068 create RealClosure.help from ${IN}/reclos.spad.pamphlet @${TANGLE} -R"RealClosure.help" ${IN}/reclos.spad.pamphlet \ >${HELP}/RealClosure.help @cp ${HELP}/RealClosure.help ${HELP}/RECLOS.help @@ -2735,7 +2803,7 @@ ${HELP}/RealClosure.help: ${IN}/reclos.spad.pamphlet >${INPUT}/RealClosure.input ${HELP}/RealSolvePackage.help: ${IN}/acplot.spad.pamphlet - @echo 7064 create RealSolvePackage.help from ${IN}/acplot.spad.pamphlet + @echo 7069 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 @@ -2743,7 +2811,7 @@ ${HELP}/RealSolvePackage.help: ${IN}/acplot.spad.pamphlet >${INPUT}/RealSolvePackage.input ${HELP}/RegularTriangularSet.help: ${IN}/regset.spad.pamphlet - @echo 7065 create RegularTriangularSet.help from \ + @echo 7070 create RegularTriangularSet.help from \ ${IN}/regset.spad.pamphlet @${TANGLE} -R"RegularTriangularSet.help" ${IN}/regset.spad.pamphlet \ >${HELP}/RegularTriangularSet.help @@ -2752,7 +2820,7 @@ ${HELP}/RegularTriangularSet.help: ${IN}/regset.spad.pamphlet >${INPUT}/RegularTriangularSet.input ${HELP}/RomanNumeral.help: ${IN}/integer.spad.pamphlet - @echo 7066 create RomanNumeral.help from ${IN}/integer.spad.pamphlet + @echo 7071 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 @@ -2760,7 +2828,7 @@ ${HELP}/RomanNumeral.help: ${IN}/integer.spad.pamphlet >${INPUT}/RomanNumeral.input ${HELP}/Segment.help: ${IN}/seg.spad.pamphlet - @echo 7067 create Segment.help from ${IN}/seg.spad.pamphlet + @echo 7072 create Segment.help from ${IN}/seg.spad.pamphlet @${TANGLE} -R"Segment.help" ${IN}/seg.spad.pamphlet \ >${HELP}/Segment.help @cp ${HELP}/Segment.help ${HELP}/SEG.help @@ -2768,15 +2836,107 @@ ${HELP}/Segment.help: ${IN}/seg.spad.pamphlet >${INPUT}/Segment.input ${HELP}/Set.help: ${IN}/sets.spad.pamphlet - @echo 7068 create Set.help from ${IN}/sets.spad.pamphlet + @echo 7073 create Set.help from ${IN}/sets.spad.pamphlet @${TANGLE} -R"Set.help" ${IN}/sets.spad.pamphlet \ >${HELP}/Set.help @cp ${HELP}/Set.help ${HELP}/SET.help @${TANGLE} -R"Set.input" ${IN}/sets.spad.pamphlet \ >${INPUT}/Set.input +${HELP}/SingleInteger.help: ${IN}/si.spad.pamphlet + @echo 7074 create SingleInteger.help from ${IN}/si.spad.pamphlet + @${TANGLE} -R"SingleInteger.help" ${IN}/si.spad.pamphlet \ + >${HELP}/SingleInteger.help + @cp ${HELP}/SingleInteger.help ${HELP}/SINT.help + @${TANGLE} -R"SingleInteger.input" ${IN}/si.spad.pamphlet \ + >${INPUT}/SingleInteger.input + +${HELP}/SparseTable.help: ${IN}/table.spad.pamphlet + @echo 7075 create SparseTable.help from ${IN}/table.spad.pamphlet + @${TANGLE} -R"SparseTable.help" ${IN}/table.spad.pamphlet \ + >${HELP}/SparseTable.help + @cp ${HELP}/SparseTable.help ${HELP}/STBL.help + @${TANGLE} -R"SparseTable.input" ${IN}/table.spad.pamphlet \ + >${INPUT}/SparseTable.input + +${HELP}/SquareMatrix.help: ${IN}/matrix.spad.pamphlet + @echo 7076 create SquareMatrix.help from ${IN}/matrix.spad.pamphlet + @${TANGLE} -R"SquareMatrix.help" ${IN}/matrix.spad.pamphlet \ + >${HELP}/SquareMatrix.help + @cp ${HELP}/SquareMatrix.help ${HELP}/SQMATRIX.help + @${TANGLE} -R"SquareMatrix.input" ${IN}/matrix.spad.pamphlet \ + >${INPUT}/SquareMatrix.input + +${HELP}/SquareFreeRegularTriangularSet.help: ${IN}/sregset.spad.pamphlet + @echo 7077 create SquareFreeRegularTriangularSet.help from \ + ${IN}/sregset.spad.pamphlet + @${TANGLE} -R"SquareFreeRegularTriangularSet.help" \ + ${IN}/sregset.spad.pamphlet \ + >${HELP}/SquareFreeRegularTriangularSet.help + @cp ${HELP}/SquareFreeRegularTriangularSet.help ${HELP}/SREGSET.help + @${TANGLE} -R"SquareFreeRegularTriangularSet.input" \ + ${IN}/sregset.spad.pamphlet \ + >${INPUT}/SquareFreeRegularTriangularSet.input + +${HELP}/Stream.help: ${IN}/stream.spad.pamphlet + @echo 7078 create Stream.help from ${IN}/stream.spad.pamphlet + @${TANGLE} -R"Stream.help" ${IN}/stream.spad.pamphlet \ + >${HELP}/Stream.help + @cp ${HELP}/Stream.help ${HELP}/STREAM.help + @${TANGLE} -R"Stream.input" ${IN}/stream.spad.pamphlet \ + >${INPUT}/Stream.input + +${HELP}/String.help: ${IN}/string.spad.pamphlet + @echo 7079 create String.help from ${IN}/string.spad.pamphlet + @${TANGLE} -R"String.help" ${IN}/string.spad.pamphlet \ + >${HELP}/String.help + @cp ${HELP}/String.help ${HELP}/STRING.help + @${TANGLE} -R"String.input" ${IN}/string.spad.pamphlet \ + >${INPUT}/String.input + +${HELP}/StringTable.help: ${IN}/table.spad.pamphlet + @echo 7080 create StringTable.help from ${IN}/table.spad.pamphlet + @${TANGLE} -R"StringTable.help" ${IN}/table.spad.pamphlet \ + >${HELP}/StringTable.help + @cp ${HELP}/StringTable.help ${HELP}/STRTBL.help + @${TANGLE} -R"StringTable.input" ${IN}/table.spad.pamphlet \ + >${INPUT}/StringTable.input + +${HELP}/Symbol.help: ${IN}/symbol.spad.pamphlet + @echo 7081 create Symbol.help from ${IN}/symbol.spad.pamphlet + @${TANGLE} -R"Symbol.help" ${IN}/symbol.spad.pamphlet \ + >${HELP}/Symbol.help + @cp ${HELP}/Symbol.help ${HELP}/SYMBOL.help + @${TANGLE} -R"Symbol.input" ${IN}/symbol.spad.pamphlet \ + >${INPUT}/Symbol.input + +${HELP}/Table.help: ${IN}/table.spad.pamphlet + @echo 7082 create Table.help from ${IN}/table.spad.pamphlet + @${TANGLE} -R"Table.help" ${IN}/table.spad.pamphlet \ + >${HELP}/Table.help + @cp ${HELP}/Table.help ${HELP}/TABLE.help + @${TANGLE} -R"Table.input" ${IN}/table.spad.pamphlet \ + >${INPUT}/Table.input + +${HELP}/TextFile.help: ${IN}/files.spad.pamphlet + @echo 7083 create TextFile.help from ${IN}/files.spad.pamphlet + @${TANGLE} -R"TextFile.help" ${IN}/files.spad.pamphlet \ + >${HELP}/TextFile.help + @cp ${HELP}/TextFile.help ${HELP}/TEXTFILE.help + @${TANGLE} -R"TextFile.input" ${IN}/files.spad.pamphlet \ + >${INPUT}/TextFile.input + +${HELP}/TwoDimensionalArray.help: ${IN}/array2.spad.pamphlet + @echo 7084 create TwoDimensionalArray.help from \ + ${IN}/array2.spad.pamphlet + @${TANGLE} -R"TwoDimensionalArray.help" ${IN}/array2.spad.pamphlet \ + >${HELP}/TwoDimensionalArray.help + @cp ${HELP}/TwoDimensionalArray.help ${HELP}/ARRAY2.help + @${TANGLE} -R"TwoDimensionalArray.input" ${IN}/array2.spad.pamphlet \ + >${INPUT}/TwoDimensionalArray.input + ${HELP}/TwoDimensionalViewport.help: ${IN}/view2d.spad.pamphlet - @echo 7069 create TwoDimensionalViewport.help from \ + @echo 7085 create TwoDimensionalViewport.help from \ ${IN}/view2d.spad.pamphlet @${TANGLE} -R"TwoDimensionalViewport.help" \ ${IN}/view2d.spad.pamphlet \ @@ -2784,6 +2944,86 @@ ${HELP}/TwoDimensionalViewport.help: ${IN}/view2d.spad.pamphlet @cp ${HELP}/TwoDimensionalViewport.help ${HELP}/VIEW2D.help # Note:no input regression file due to graphics +${HELP}/UnivariatePolynomial.help: ${IN}/poly.spad.pamphlet + @echo 7086 create UnivariatePolynomial.help from \ + ${IN}/poly.spad.pamphlet + @${TANGLE} -R"UnivariatePolynomial.help" ${IN}/poly.spad.pamphlet \ + >${HELP}/UnivariatePolynomial.help + @cp ${HELP}/UnivariatePolynomial.help ${HELP}/UP.help + @${TANGLE} -R"UnivariatePolynomial.input" ${IN}/poly.spad.pamphlet \ + >${INPUT}/UnivariatePolynomial.input + +${HELP}/UniversalSegment.help: ${IN}/seg.spad.pamphlet + @echo 7087 create UniversalSegment.help from ${IN}/seg.spad.pamphlet + @${TANGLE} -R"UniversalSegment.help" ${IN}/seg.spad.pamphlet \ + >${HELP}/UniversalSegment.help + @cp ${HELP}/UniversalSegment.help ${HELP}/UNISEG.help + @${TANGLE} -R"UniversalSegment.input" ${IN}/seg.spad.pamphlet \ + >${INPUT}/UniversalSegment.input + +${HELP}/Vector.help: ${IN}/vector.spad.pamphlet + @echo 7088 create Vector.help from ${IN}/vector.spad.pamphlet + @${TANGLE} -R"Vector.help" ${IN}/vector.spad.pamphlet \ + >${HELP}/Vector.help + @cp ${HELP}/Vector.help ${HELP}/VECTOR.help + @${TANGLE} -R"Vector.input" ${IN}/vector.spad.pamphlet \ + >${INPUT}/Vector.input + +${HELP}/Void.help: ${IN}/void.spad.pamphlet + @echo 7089 create Void.help from ${IN}/void.spad.pamphlet + @${TANGLE} -R"Void.help" ${IN}/void.spad.pamphlet >${HELP}/Void.help + @cp ${HELP}/Void.help ${HELP}/VOID.help + @${TANGLE} -R"Void.input" ${IN}/void.spad.pamphlet >${INPUT}/Void.input + +${HELP}/WuWenTsunTriangularSet.help: ${IN}/triset.spad.pamphlet + @echo 7090 create WuWenTsunTriangularSet.help from \ + ${IN}/triset.spad.pamphlet + @${TANGLE} -R"WuWenTsunTriangularSet.help" \ + ${IN}/triset.spad.pamphlet \ + >${HELP}/WuWenTsunTriangularSet.help + @cp ${HELP}/WuWenTsunTriangularSet.help ${HELP}/WUTSET.help + @${TANGLE} -R"WuWenTsunTriangularSet.input" \ + ${IN}/triset.spad.pamphlet \ + >${INPUT}/WuWenTsunTriangularSet.input + +${HELP}/XPBWPolynomial.help: ${IN}/xlpoly.spad.pamphlet + @echo 7091 create XPBWPolynomial.help from \ + ${IN}/xlpoly.spad.pamphlet + @${TANGLE} -R"XPBWPolynomial.help" \ + ${IN}/xlpoly.spad.pamphlet \ + >${HELP}/XPBWPolynomial.help + @cp ${HELP}/XPBWPolynomial.help ${HELP}/XPBWPOLY.help + @${TANGLE} -R"XPBWPolynomial.input" \ + ${IN}/xlpoly.spad.pamphlet \ + >${INPUT}/XPBWPolynomial.input + +${HELP}/XPolynomial.help: ${IN}/xpoly.spad.pamphlet + @echo 7092 create XPolynomial.help from ${IN}/xpoly.spad.pamphlet + @${TANGLE} -R"XPolynomial.help" ${IN}/xpoly.spad.pamphlet \ + >${HELP}/XPolynomial.help + @cp ${HELP}/XPolynomial.help ${HELP}/XPOLY.help + @${TANGLE} -R"XPolynomial.input" ${IN}/xpoly.spad.pamphlet \ + >${INPUT}/XPolynomial.input + +${HELP}/XPolynomialRing.help: ${IN}/xpoly.spad.pamphlet + @echo 7093 create XPolynomialRing.help from ${IN}/xpoly.spad.pamphlet + @${TANGLE} -R"XPolynomialRing.help" ${IN}/xpoly.spad.pamphlet \ + >${HELP}/XPolynomialRing.help + @cp ${HELP}/XPolynomialRing.help ${HELP}/XPR.help + @${TANGLE} -R"XPolynomialRing.input" ${IN}/xpoly.spad.pamphlet \ + >${INPUT}/XPolynomialRing.input + +${HELP}/ZeroDimensionalSolvePackage.help: ${IN}/zerodim.spad.pamphlet + @echo 7094 create ZeroDimensionalSolvePackage.help from \ + ${IN}/zerodim.spad.pamphlet + @${TANGLE} -R"ZeroDimensionalSolvePackage.help" \ + ${IN}/zerodim.spad.pamphlet \ + >${HELP}/ZeroDimensionalSolvePackage.help + @cp ${HELP}/ZeroDimensionalSolvePackage.help ${HELP}/ZDSOLVE.help + @${TANGLE} -R"ZeroDimensionalSolvePackage.input" \ + ${IN}/zerodim.spad.pamphlet \ + >${INPUT}/ZeroDimensionalSolvePackage.input + @ \section{The Makefile} diff --git a/src/algebra/array2.spad.pamphlet b/src/algebra/array2.spad.pamphlet index ef540c4..38f6ba0 100644 --- a/src/algebra/array2.spad.pamphlet +++ b/src/algebra/array2.spad.pamphlet @@ -387,6 +387,452 @@ IndexedTwoDimensionalArray(R,mnRow,mnCol):Exports == Implementation where @ \section{domain ARRAY2 TwoDimensionalArray} +<>= +-- array2.spad.pamphlet TwoDimensionalArray.input +)spool TwoDimensionalArray.output +)set message test on +)set message auto off +)clear all +--S 1 of 20 +arr : ARRAY2 INT := new(5,4,0) +--R +--R +--R +0 0 0 0+ +--R | | +--R |0 0 0 0| +--R | | +--R (1) |0 0 0 0| +--R | | +--R |0 0 0 0| +--R | | +--R +0 0 0 0+ +--R Type: TwoDimensionalArray Integer +--E 1 + +--S 2 of 20 +setelt(arr,1,1,17) +--R +--R +--R (2) 17 +--R Type: PositiveInteger +--E 2 + +--S 3 of 20 +arr +--R +--R +--R +17 0 0 0+ +--R | | +--R |0 0 0 0| +--R | | +--R (3) |0 0 0 0| +--R | | +--R |0 0 0 0| +--R | | +--R +0 0 0 0+ +--R Type: TwoDimensionalArray Integer +--E 3 + +--S 4 of 20 +elt(arr,1,1) +--R +--R +--R (4) 17 +--R Type: PositiveInteger +--E 4 + +--S 5 of 20 +arr(3,2) := 15 +--R +--R +--R (5) 15 +--R Type: PositiveInteger +--E 5 + +--S 6 of 20 +arr(3,2) +--R +--R +--R (6) 15 +--R Type: PositiveInteger +--E 6 + +--S 7 of 20 +row(arr,1) +--R +--R +--R (7) [17,0,0,0] +--R Type: OneDimensionalArray Integer +--E 7 + +--S 8 of 20 +column(arr,1) +--R +--R +--R (8) [17,0,0,0,0] +--R Type: OneDimensionalArray Integer +--E 8 + +--S 9 of 20 +nrows(arr) +--R +--R +--R (9) 5 +--R Type: PositiveInteger +--E 9 + +--S 10 of 20 +ncols(arr) +--R +--R +--R (10) 4 +--R Type: PositiveInteger +--E 10 + +--S 11 of 20 +map(-,arr) +--R +--R +--R +- 17 0 0 0+ +--R | | +--R | 0 0 0 0| +--R | | +--R (11) | 0 - 15 0 0| +--R | | +--R | 0 0 0 0| +--R | | +--R + 0 0 0 0+ +--R Type: TwoDimensionalArray Integer +--E 11 + +--S 12 of 20 +map((x +-> x + x),arr) +--R +--R +--R +34 0 0 0+ +--R | | +--R |0 0 0 0| +--R | | +--R (12) |0 30 0 0| +--R | | +--R |0 0 0 0| +--R | | +--R +0 0 0 0+ +--R Type: TwoDimensionalArray Integer +--E 12 + +--S 13 of 20 +arrc := copy(arr) +--R +--R +--R +17 0 0 0+ +--R | | +--R |0 0 0 0| +--R | | +--R (13) |0 15 0 0| +--R | | +--R |0 0 0 0| +--R | | +--R +0 0 0 0+ +--R Type: TwoDimensionalArray Integer +--E 13 + +--S 14 of 20 +map!(-,arrc) +--R +--R +--R +- 17 0 0 0+ +--R | | +--R | 0 0 0 0| +--R | | +--R (14) | 0 - 15 0 0| +--R | | +--R | 0 0 0 0| +--R | | +--R + 0 0 0 0+ +--R Type: TwoDimensionalArray Integer +--E 14 + +--S 15 of 20 +arrc +--R +--R +--R +- 17 0 0 0+ +--R | | +--R | 0 0 0 0| +--R | | +--R (15) | 0 - 15 0 0| +--R | | +--R | 0 0 0 0| +--R | | +--R + 0 0 0 0+ +--R Type: TwoDimensionalArray Integer +--E 15 + +--S 16 of 20 +arr +--R +--R +--R +17 0 0 0+ +--R | | +--R |0 0 0 0| +--R | | +--R (16) |0 15 0 0| +--R | | +--R |0 0 0 0| +--R | | +--R +0 0 0 0+ +--R Type: TwoDimensionalArray Integer +--E 16 + +--S 17 of 20 +member?(17,arr) +--R +--R +--R (17) true +--R Type: Boolean +--E 17 + +--S 18 of 20 +member?(10317,arr) +--R +--R +--R (18) false +--R Type: Boolean +--E 18 + +--S 19 of 20 +count(17,arr) +--R +--R +--R (19) 1 +--R Type: PositiveInteger +--E 19 + +--S 20 of 20 +count(0,arr) +--R +--R +--R (20) 18 +--R Type: PositiveInteger +--E 20 +)spool +)lisp (bye) +@ +<>= +==================================================================== +TwoDimensionalArray examples +==================================================================== + +The TwoDimensionalArray domain is used for storing data in a two +dimensional data structure indexed by row and by column. Such an +array is a homogeneous data structure in that all the entries of the +array must belong to the same Axiom domain.. Each array has a fixed +number of rows and columns specified by the user and arrays are not +extensible. In Axiom, the indexing of two-dimensional arrays is +one-based. This means that both the "first" row of an array and the +"first" column of an array are given the index 1. Thus, the entry +in the upper left corner of an array is in position (1,1). + +The operation new creates an array with a specified number of rows and +columns and fills the components of that array with a specified entry. +The arguments of this operation specify the number of rows, the number +of columns, and the entry. + +This creates a five-by-four array of integers, all of whose entries are +zero. + + arr : ARRAY2 INT := new(5,4,0) + +0 0 0 0+ + | | + |0 0 0 0| + | | + |0 0 0 0| + | | + |0 0 0 0| + | | + +0 0 0 0+ + Type: TwoDimensionalArray Integer + +The entries of this array can be set to other integers using setelt. + +Issue this to set the element in the upper left corner of this array to 17. + + setelt(arr,1,1,17) + 17 + Type: PositiveInteger + +Now the first element of the array is 17. + + arr + +17 0 0 0+ + | | + |0 0 0 0| + | | + |0 0 0 0| + | | + |0 0 0 0| + | | + +0 0 0 0+ + Type: TwoDimensionalArray Integer + +Likewise, elements of an array are extracted using the operation elt. + + elt(arr,1,1) + 17 + Type: PositiveInteger + +Another way to use these two operations is as follows. This sets the +element in position (3,2) of the array to 15. + + arr(3,2) := 15 + 15 + Type: PositiveInteger + +This extracts the element in position (3,2) of the array. + + arr(3,2) + 15 + Type: PositiveInteger + +The operations elt and setelt come equipped with an error check which +verifies that the indices are in the proper ranges. For example, the +above array has five rows and four columns, so if you ask for the +entry in position (6,2) with arr(6,2) Axiom displays an error message. +If there is no need for an error check, you can call the operations qelt +and qsetelt which provide the same functionality but without the error +check. Typically, these operations are called in well-tested programs. + +The operations row and column extract rows and columns, respectively, +and return objects of OneDimensionalArray with the same underlying +element type. + + row(arr,1) + [17,0,0,0] + Type: OneDimensionalArray Integer + + column(arr,1) + [17,0,0,0,0] + Type: OneDimensionalArray Integer + +You can determine the dimensions of an array by calling the operations +nrows and ncols, which return the number of rows and columns, respectively. + + nrows(arr) + 5 + Type: PositiveInteger + + ncols(arr) + 4 + Type: PositiveInteger + +To apply an operation to every element of an array, use map. This +creates a new array. This expression negates every element. + + map(-,arr) + +- 17 0 0 0+ + | | + | 0 0 0 0| + | | + | 0 - 15 0 0| + | | + | 0 0 0 0| + | | + + 0 0 0 0+ + Type: TwoDimensionalArray Integer + +This creates an array where all the elements are doubled. + + map((x +-> x + x),arr) + +34 0 0 0+ + | | + |0 0 0 0| + | | + |0 30 0 0| + | | + |0 0 0 0| + | | + +0 0 0 0+ + Type: TwoDimensionalArray Integer + +To change the array destructively, use map instead of map. If you +need to make a copy of any array, use copy. + + arrc := copy(arr) + +17 0 0 0+ + | | + |0 0 0 0| + | | + |0 15 0 0| + | | + |0 0 0 0| + | | + +0 0 0 0+ + Type: TwoDimensionalArray Integer + + map!(-,arrc) + +- 17 0 0 0+ + | | + | 0 0 0 0| + | | + | 0 - 15 0 0| + | | + | 0 0 0 0| + | | + + 0 0 0 0+ + Type: TwoDimensionalArray Integer + + arrc + +- 17 0 0 0+ + | | + | 0 0 0 0| + | | + | 0 - 15 0 0| + | | + | 0 0 0 0| + | | + + 0 0 0 0+ + Type: TwoDimensionalArray Integer + + arr + +17 0 0 0+ + | | + |0 0 0 0| + | | + |0 15 0 0| + | | + |0 0 0 0| + | | + +0 0 0 0+ + Type: TwoDimensionalArray Integer + +Use member? to see if a given element is in an array. + + member?(17,arr) + true + Type: Boolean + + member?(10317,arr) + false + Type: Boolean + +To see how many times an element appears in an array, use count. + + count(17,arr) + 1 + Type: PositiveInteger + + count(0,arr) + 18 + Type: PositiveInteger + +See Also: +o )help Matrix +o )help OneDimensionalArray +o )show TwoDimensionalArray +o $AXIOM/doc/src/algebra/array2.spad.dvi + +@ <>= )abbrev domain ARRAY2 TwoDimensionalArray TwoDimensionalArray(R):Exports == Implementation where diff --git a/src/algebra/files.spad.pamphlet b/src/algebra/files.spad.pamphlet index ec29146..e13ed79 100644 --- a/src/algebra/files.spad.pamphlet +++ b/src/algebra/files.spad.pamphlet @@ -348,6 +348,173 @@ File(S:SetCategory): FileCategory(FileName, S) with @ \section{domain TEXTFILE TextFile} +<>= +-- files.spad.pamphlet TextFile.input +)spool TextFile.output +)set message test on +)set message auto off +)clear all +--S 1 of 10 +f1: TextFile := open("/etc/group", "input") +--R +--R +--R (1) "/etc/group" +--R Type: TextFile +--E 1 + +--S 2 of 10 +f2: TextFile := open("MOTD", "output") +--R +--R +--R (2) "MOTD" +--R Type: TextFile +--E 2 + +--S 3 of 10 +l := readLine! f1 +--R +--R +--R (3) "root:x:0:root" +--R Type: String +--E 3 + +--S 4 of 10 +writeLine!(f2, upperCase l) +--R +--R +--R (4) "ROOT:X:0:ROOT" +--R Type: String +--E 4 + +--S 5 of 10 +while not endOfFile? f1 repeat + s := readLine! f1 + writeLine!(f2, upperCase s) +--R +--R Type: Void +--E 5 + +--S 6 of 10 +close! f1 +--R +--R +--R (6) "/etc/group" +--R Type: TextFile +--E 6 + +--S 7 of 10 +write!(f2, "-The-") +--R +--R +--R (7) "-The-" +--R Type: String +--E 7 + +--S 8 of 10 +write!(f2, "-End-") +--R +--R +--R (8) "-End-" +--R Type: String +--E 8 + +--S 9 of 10 +writeLine! f2 +--R +--R +--R (9) "" +--R Type: String +--E 9 + +--S 10 of 10 +close! f2 +--R +--R +--R (10) "MOTD" +--R Type: TextFile +--E 10 +)system rm -f MOTD +)spool +)lisp (bye) +@ +<>= +==================================================================== +TextFile examples +==================================================================== + +The domain TextFile allows Axiom to read and write character data and +exchange text with other programs. This type behaves in Axiom much +like a File of strings, with additional operations to cause new lines. +We give an example of how to produce an upper case copy of a file. + +This is the file from which we read the text. + + f1: TextFile := open("/etc/group", "input") + "/etc/group" + Type: TextFile + +This is the file to which we write the text. + + f2: TextFile := open("/tmp/MOTD", "output") + "MOTD" + Type: TextFile + +Entire lines are handled using the readLine and writeLine operations. + + l := readLine! f1 + "root:x:0:root" + Type: String + + writeLine!(f2, upperCase l) + "ROOT:X:0:ROOT" + Type: String + +Use the endOfFile? operation to check if you have reached the end of the file. + + while not endOfFile? f1 repeat + s := readLine! f1 + writeLine!(f2, upperCase s) + Type: Void + +The file f1 is exhausted and should be closed. + + close! f1 + "/etc/group" + Type: TextFile + +It is sometimes useful to write lines a bit at a time. The write operation +allows this. + + write!(f2, "-The-") + "-The-" + Type: String + + write!(f2, "-End-") + "-End-" + Type: String + +This ends the line. This is done in a machine-dependent manner. + + writeLine! f2 + "" + Type: String + + close! f2 + "MOTD" + Type: TextFile + +Finally, clean up. + + )system rm /tmp/MOTD + +See Also: +o )help File +o )help KeyedAccessFile +o )help Library +o )show TextFile +o $AXIOM/doc/src/algebra/files.spad.dvi + +@ <>= )abbrev domain TEXTFILE TextFile ++ Author: Stephen M. Watt diff --git a/src/algebra/fname.spad.pamphlet b/src/algebra/fname.spad.pamphlet index f4738b5..4c44625 100644 --- a/src/algebra/fname.spad.pamphlet +++ b/src/algebra/fname.spad.pamphlet @@ -203,20 +203,20 @@ writable? "/tmp/DoesNotExist" --R --R --R (17) true ---R Type: Boolean +--R Type: Boolean --E 17 --S 18 of 18 fn := new(objdir, "xxx", "yy") --R --R ---R (18) "/tmp/xxx1419.yy" +--I (18) "/tmp/xxx1419.yy" --R Type: FileName --E 18 )spool )lisp (bye) @ -<>= +<>= ==================================================================== FileName examples ==================================================================== diff --git a/src/algebra/fparfrac.spad.pamphlet b/src/algebra/fparfrac.spad.pamphlet index 38d5f9f..09b6ba3 100644 --- a/src/algebra/fparfrac.spad.pamphlet +++ b/src/algebra/fparfrac.spad.pamphlet @@ -44,7 +44,7 @@ g := fullPartialFraction f --R x - 2 x + 1 --+ 2 --R 2 (x - %A) --R %A - 1= 0 -Type: FullPartialFractionExpansion(Fraction Integer,UnivariatePolynomial(x,Fraction Integer)) +--RType: FullPartialFractionExpansion(Fraction Integer,UnivariatePolynomial(x,Fraction Integer)) --E 3 --S 4 of 16 @@ -67,7 +67,7 @@ g5 := D(g, 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)) +--RType: FullPartialFractionExpansion(Fraction Integer,UnivariatePolynomial(x,Fraction Integer)) --E 5 --S 6 of 16 @@ -262,8 +262,6 @@ g :: Fx - f --R Type: Fraction UnivariatePolynomial(x,Fraction Integer) --E 16 )spool - -)spool )lisp (bye) @ <>= diff --git a/src/algebra/matrix.spad.pamphlet b/src/algebra/matrix.spad.pamphlet index 7b7a10f..590cd3e 100644 --- a/src/algebra/matrix.spad.pamphlet +++ b/src/algebra/matrix.spad.pamphlet @@ -1256,6 +1256,150 @@ RectangularMatrix(m,n,R): Exports == Implementation where @ \section{domain SQMATRIX SquareMatrix} +<>= +-- matrix.spad.pamphlet SquareMatrix.input +)spool SquareMatrix.output +)set message test on +)set message auto off +)clear all +--S 1 of 6 +)set expose add constructor SquareMatrix +--R +--I SquareMatrix is now explicitly exposed in frame frame0 +--E 1 + +--S 2 of 6 +m := squareMatrix [ [1,-%i],[%i,4] ] +--R +--R +--R +1 - %i+ +--R (1) | | +--R +%i 4 + +--R Type: SquareMatrix(2,Complex Integer) +--E 2 + +--S 3 of 6 +m*m - m +--R +--R +--R + 1 - 4%i+ +--R (2) | | +--R +4%i 13 + +--R Type: SquareMatrix(2,Complex Integer) +--E 3 + +--S 4 of 6 +mm := squareMatrix [ [m, 1], [1-m, m**2] ] +--R +--R +--R ++1 - %i+ +1 0+ + +--R || | | | | +--R |+%i 4 + +0 1+ | +--R (3) | | +--R |+ 0 %i + + 2 - 5%i+| +--R || | | || +--R ++- %i - 3+ +5%i 17 ++ +--R Type: SquareMatrix(2,SquareMatrix(2,Complex Integer)) +--E 4 + +--S 5 of 6 +p := (x + m)**2 +--R +--R +--R 2 + 2 - 2%i+ + 2 - 5%i+ +--R (4) x + | |x + | | +--R +2%i 8 + +5%i 17 + +--R Type: Polynomial SquareMatrix(2,Complex Integer) +--E 5 + +--S 6 of 6 +p::SquareMatrix(2, ?) +--R +--R +--R + 2 + +--R |x + 2x + 2 - 2%i x - 5%i| +--R (5) | | +--R | 2 | +--R +2%i x + 5%i x + 8x + 17 + +--R Type: SquareMatrix(2,Polynomial Complex Integer) +--E 6 +)spool +)lisp (bye) +@ +<>= +==================================================================== +SquareMatrix examples +==================================================================== + +The top level matrix type in Axiom is Matrix, which provides basic +arithmetic and linear algebra functions. However, since the matrices +can be of any size it is not true that any pair can be added or +multiplied. Thus Matrix has little algebraic structure. + +Sometimes you want to use matrices as coefficients for polynomials or +in other algebraic contexts. In this case, SquareMatrix should be +used. The domain SquareMatrix(n,R) gives the ring of n by n square +matrices over R. + +Since SquareMatrix is not normally exposed at the top level, you must +expose it before it can be used. + + )set expose add constructor SquareMatrix + +Once SQMATRIX has been exposed, values can be created using the +squareMatrix function. + + m := squareMatrix [ [1,-%i],[%i,4] ] + +1 - %i+ + | | + +%i 4 + + Type: SquareMatrix(2,Complex Integer) + +The usual arithmetic operations are available. + + m*m - m + + 1 - 4%i+ + | | + +4%i 13 + + Type: SquareMatrix(2,Complex Integer) + +Square matrices can be used where ring elements are required. +For example, here is a matrix with matrix entries. + + mm := squareMatrix [ [m, 1], [1-m, m**2] ] + ++1 - %i+ +1 0+ + + || | | | | + |+%i 4 + +0 1+ | + | | + |+ 0 %i + + 2 - 5%i+| + || | | || + ++- %i - 3+ +5%i 17 ++ + Type: SquareMatrix(2,SquareMatrix(2,Complex Integer)) + +Or you can construct a polynomial with square matrix coefficients. + + p := (x + m)**2 + 2 + 2 - 2%i+ + 2 - 5%i+ + x + | |x + | | + +2%i 8 + +5%i 17 + + Type: Polynomial SquareMatrix(2,Complex Integer) + +This value can be converted to a square matrix with polynomial coefficients. + + p::SquareMatrix(2, ?) + + 2 + + |x + 2x + 2 - 2%i x - 5%i| + | | + | 2 | + +2%i x + 5%i x + 8x + 17 + + Type: SquareMatrix(2,Polynomial Complex Integer) + +See Also: +o )help Matrix +o )show SquareMatrix +o $AXIOM/doc/src/algebra/matrix.spad.dvi + +@ <>= )abbrev domain SQMATRIX SquareMatrix ++ Author: Grabmeier, Gschnitzer, Williamson diff --git a/src/algebra/opalg.spad.pamphlet b/src/algebra/opalg.spad.pamphlet index 8eab785..d9ffc6d 100644 --- a/src/algebra/opalg.spad.pamphlet +++ b/src/algebra/opalg.spad.pamphlet @@ -263,7 +263,7 @@ t := operator("tilde") :: OP(R) --S 3 of 21 )set expose add constructor Operator --R ---R Operator is now explicitly exposed in frame frame0 +--I Operator is now explicitly exposed in frame frame0 --E 3 --S 4 of 21 diff --git a/src/algebra/poly.spad.pamphlet b/src/algebra/poly.spad.pamphlet index ad0206c..9f28927 100644 --- a/src/algebra/poly.spad.pamphlet +++ b/src/algebra/poly.spad.pamphlet @@ -766,6 +766,633 @@ SparseUnivariatePolynomialFunctions2(R:Ring, S:Ring): with @ \section{domain UP UnivariatePolynomial} +<>= +-- poly.spad.pamphlet UnivariatePolynomial.input +)spool UnivariatePolynomial.output +)set message test on +)set message auto off +)clear all +--S 1 of 35 +(p,q) : UP(x,INT) +--R +--R Type: Void +--E 1 + +--S 2 of 35 +p := (3*x-1)**2 * (2*x + 8) +--R +--R +--R 3 2 +--R (2) 18x + 60x - 46x + 8 +--R Type: UnivariatePolynomial(x,Integer) +--E 2 + +--S 3 of 35 +q := (1 - 6*x + 9*x**2)**2 +--R +--R +--R 4 3 2 +--R (3) 81x - 108x + 54x - 12x + 1 +--R Type: UnivariatePolynomial(x,Integer) +--E 3 + +--S 4 of 35 +p**2 + p*q +--R +--R +--R 7 6 5 4 3 2 +--R (4) 1458x + 3240x - 7074x + 10584x - 9282x + 4120x - 878x + 72 +--R Type: UnivariatePolynomial(x,Integer) +--E 4 + +--S 5 of 35 +leadingCoefficient p +--R +--R +--R (5) 18 +--R Type: PositiveInteger +--E 5 + +--S 6 of 35 +degree p +--R +--R +--R (6) 3 +--R Type: PositiveInteger +--E 6 + +--S 7 of 35 +reductum p +--R +--R +--R 2 +--R (7) 60x - 46x + 8 +--R Type: UnivariatePolynomial(x,Integer) +--E 7 + +--S 8 of 35 +gcd(p,q) +--R +--R +--R 2 +--R (8) 9x - 6x + 1 +--R Type: UnivariatePolynomial(x,Integer) +--E 8 + +--S 9 of 35 +lcm(p,q) +--R +--R +--R 5 4 3 2 +--R (9) 162x + 432x - 756x + 408x - 94x + 8 +--R Type: UnivariatePolynomial(x,Integer) +--E 9 + +--S 10 of 35 +resultant(p,q) +--R +--R +--R (10) 0 +--R Type: NonNegativeInteger +--E 10 + +--S 11 of 35 +D p +--R +--R +--R 2 +--R (11) 54x + 120x - 46 +--R Type: UnivariatePolynomial(x,Integer) +--E 11 + +--S 12 of 35 +p(2) +--R +--R +--R (12) 300 +--R Type: PositiveInteger +--E 12 + +--S 13 of 35 +p(q) +--R +--R +--R (13) +--R 12 11 10 9 8 +--R 9565938x - 38263752x + 70150212x - 77944680x + 58852170x +--R + +--R 7 6 5 4 3 2 +--R - 32227632x + 13349448x - 4280688x + 1058184x - 192672x + 23328x +--R + +--R - 1536x + 40 +--R Type: UnivariatePolynomial(x,Integer) +--E 13 + +--S 14 of 35 +q(p) +--R +--R +--R (14) +--R 12 11 10 9 8 +--R 8503056x + 113374080x + 479950272x + 404997408x - 1369516896x +--R + +--R 7 6 5 4 3 +--R - 626146848x + 2939858712x - 2780728704x + 1364312160x - 396838872x +--R + +--R 2 +--R 69205896x - 6716184x + 279841 +--R Type: UnivariatePolynomial(x,Integer) +--E 14 + +--S 15 of 35 +l := coefficients p +--R +--R +--R (15) [18,60,- 46,8] +--R Type: List Integer +--E 15 + +--S 16 of 35 +reduce(gcd,l) +--R +--R +--R (16) 2 +--R Type: PositiveInteger +--E 16 + +--S 17 of 35 +content p +--R +--R +--R (17) 2 +--R Type: PositiveInteger +--E 17 + +--S 18 of 35 +ux := (x**4+2*x+3)::UP(x,INT) +--R +--R +--R 4 +--R (18) x + 2x + 3 +--R Type: UnivariatePolynomial(x,Integer) +--E 18 + +--S 19 of 35 +vectorise(ux,5) +--R +--R +--R (19) [3,2,0,0,1] +--R Type: Vector Integer +--E 19 + +--S 20 of 35 +squareTerms(p) == reduce(+,[t**2 for t in monomials p]) +--R +--R Type: Void +--E 20 + +--S 21 of 35 +p +--R +--R +--R 3 2 +--R (21) 18x + 60x - 46x + 8 +--R Type: UnivariatePolynomial(x,Integer) +--E 21 + +--S 22 of 35 +squareTerms p +--R +--R Compiling function squareTerms with type UnivariatePolynomial(x, +--R Integer) -> UnivariatePolynomial(x,Integer) +--R +--R 6 4 2 +--R (22) 324x + 3600x + 2116x + 64 +--R Type: UnivariatePolynomial(x,Integer) +--E 22 + +--S 23 of 35 +(r,s) : UP(a1,FRAC INT) +--R +--R Type: Void +--E 23 + +--S 24 of 35 +r := a1**2 - 2/3 +--R +--R +--R 2 2 +--R (24) a1 - - +--R 3 +--R Type: UnivariatePolynomial(a1,Fraction Integer) +--E 24 + +--S 25 of 35 +s := a1 + 4 +--R +--R +--R (25) a1 + 4 +--R Type: UnivariatePolynomial(a1,Fraction Integer) +--E 25 + +--S 26 of 35 +r quo s +--R +--R +--R (26) a1 - 4 +--R Type: UnivariatePolynomial(a1,Fraction Integer) +--E 26 + +--S 27 of 35 +r rem s +--R +--R +--R 46 +--R (27) -- +--R 3 +--R Type: UnivariatePolynomial(a1,Fraction Integer) +--E 27 + +--S 28 of 35 +d := divide(r, s) +--R +--R +--R 46 +--R (28) [quotient= a1 - 4,remainder= --] +--R 3 +--RType: Record(quotient: UnivariatePolynomial(a1,Fraction Integer),remainder: UnivariatePolynomial(a1,Fraction Integer)) +--E 28 + +--S 29 of 35 +r - (d.quotient * s + d.remainder) +--R +--R +--R (29) 0 +--R Type: UnivariatePolynomial(a1,Fraction Integer) +--E 29 + +--S 30 of 35 +integrate r +--R +--R +--R 1 3 2 +--R (30) - a1 - - a1 +--R 3 3 +--R Type: UnivariatePolynomial(a1,Fraction Integer) +--E 30 + +--S 31 of 35 +integrate s +--R +--R +--R 1 2 +--R (31) - a1 + 4a1 +--R 2 +--R Type: UnivariatePolynomial(a1,Fraction Integer) +--E 31 + +--S 32 of 35 +t : UP(a1,FRAC POLY INT) +--R +--R Type: Void +--E 32 + +--S 33 of 35 +t := a1**2 - a1/b2 + (b1**2-b1)/(b2+3) +--R +--R +--R 2 +--R 2 1 b1 - b1 +--R (33) a1 - -- a1 + -------- +--R b2 b2 + 3 +--R Type: UnivariatePolynomial(a1,Fraction Polynomial Integer) +--E 33 + +--S 34 of 35 +u : FRAC POLY INT := t +--R +--R +--R 2 2 2 2 +--R a1 b2 + (b1 - b1 + 3a1 - a1)b2 - 3a1 +--R (34) --------------------------------------- +--R 2 +--R b2 + 3b2 +--R Type: Fraction Polynomial Integer +--E 34 + +--S 35 of 35 +u :: UP(b1,?) +--R +--R +--R 2 +--R 1 2 1 a1 b2 - a1 +--R (35) ------ b1 - ------ b1 + ---------- +--R b2 + 3 b2 + 3 b2 +--R Type: UnivariatePolynomial(b1,Fraction Polynomial Integer) +--E 35 +)spool +)lisp (bye) +@ +<>= +==================================================================== +UnivariatePolynomial examples +==================================================================== + +The domain constructor UnivariatePolynomial (abbreviated UP) creates +domains of univariate polynomials in a specified variable. For +example, the domain UP(a1,POLY FRAC INT) provides polynomials in the +single variable a1 whose coefficients are general polynomials with +rational number coefficients. + +Restriction: Axiom does not allow you to create types where +UnivariatePolynomial is contained in the coefficient type of +Polynomial. Therefore, UP(x,POLY INT) is legal but POLY UP(x,INT) +is not. + +UP(x,INT) is the domain of polynomials in the single variable x with +integer coefficients. + + (p,q) : UP(x,INT) + Type: Void + + p := (3*x-1)**2 * (2*x + 8) + 3 2 + 18x + 60x - 46x + 8 + Type: UnivariatePolynomial(x,Integer) + + q := (1 - 6*x + 9*x**2)**2 + 4 3 2 + 81x - 108x + 54x - 12x + 1 + Type: UnivariatePolynomial(x,Integer) + +The usual arithmetic operations are available for univariate polynomials. + + p**2 + p*q + 7 6 5 4 3 2 + 1458x + 3240x - 7074x + 10584x - 9282x + 4120x - 878x + 72 + Type: UnivariatePolynomial(x,Integer) + +The operation leadingCoefficient extracts the coefficient of the term +of highest degree. + + leadingCoefficient p + 18 + Type: PositiveInteger + +The operation degree returns the degree of the polynomial. Since the +polynomial has only one variable, the variable is not supplied to +operations like degree. + + degree p + 3 + Type: PositiveInteger + +The reductum of the polynomial, the polynomial obtained by subtracting +the term of highest order, is returned by reductum. + + reductum p + 2 + 60x - 46x + 8 + Type: UnivariatePolynomial(x,Integer) + +The operation gcd computes the greatest common divisor of two polynomials. + + gcd(p,q) + 2 + 9x - 6x + 1 + Type: UnivariatePolynomial(x,Integer) + +The operation lcm computes the least common multiple. + + lcm(p,q) + 5 4 3 2 + 162x + 432x - 756x + 408x - 94x + 8 + Type: UnivariatePolynomial(x,Integer) + +The operation resultant computes the resultant of two univariate +polynomials. In the case of p and q, the resultant is 0 because they +share a common root. + + resultant(p,q) + 0 + Type: NonNegativeInteger + +To compute the derivative of a univariate polynomial with respect to its +variable, use the function D. + + D p + 2 + 54x + 120x - 46 + Type: UnivariatePolynomial(x,Integer) + +Univariate polynomials can also be used as if they were functions. To +evaluate a univariate polynomial at some point, apply the polynomial +to the point. + + p(2) + 300 + Type: PositiveInteger + +The same syntax is used for composing two univariate polynomials, i.e. +substituting one polynomial for the variable in another. This substitutes +q for the variable in p. + + p(q) + 12 11 10 9 8 + 9565938x - 38263752x + 70150212x - 77944680x + 58852170x + + + 7 6 5 4 3 2 + - 32227632x + 13349448x - 4280688x + 1058184x - 192672x + 23328x + + + - 1536x + 40 + Type: UnivariatePolynomial(x,Integer) + +This substitutes p for the variable in q. + + q(p) + 12 11 10 9 8 + 8503056x + 113374080x + 479950272x + 404997408x - 1369516896x + + + 7 6 5 4 3 + - 626146848x + 2939858712x - 2780728704x + 1364312160x - 396838872x + + + 2 + 69205896x - 6716184x + 279841 + Type: UnivariatePolynomial(x,Integer) + +To obtain a list of coefficients of the polynomial, use coefficients. + + l := coefficients p + [18,60,- 46,8] + Type: List Integer + +From this you can use gcd and reduce to compute the content of the polynomial. + + reduce(gcd,l) + 2 + Type: PositiveInteger + +Alternatively (and more easily), you can just call content. + + content p + 2 + Type: PositiveInteger + +Note that the operation coefficients omits the zero coefficients from +the list. Sometimes it is useful to convert a univariate polynomial +to a vector whose i-th position contains the degree i-1 coefficient of +the polynomial. + + ux := (x**4+2*x+3)::UP(x,INT) + 4 + x + 2x + 3 + Type: UnivariatePolynomial(x,Integer) + +To get a complete vector of coefficients, use the operation vectorise, +which takes a univariate polynomial and an integer denoting the length +of the desired vector. + + vectorise(ux,5) + [3,2,0,0,1] + Type: Vector Integer + +It is common to want to do something to every term of a polynomial, +creating a new polynomial in the process. + +This is a function for iterating across the terms of a polynomial, +squaring each term. + + squareTerms(p) == reduce(+,[t**2 for t in monomials p]) + Type: Void + +Recall what p looked like. + + p + 3 2 + 18x + 60x - 46x + 8 + Type: UnivariatePolynomial(x,Integer) + +We can demonstrate squareTerms on p. + + squareTerms p + 6 4 2 + 324x + 3600x + 2116x + 64 + Type: UnivariatePolynomial(x,Integer) + +When the coefficients of the univariate polynomial belong to a field, +it is possible to compute quotients and remainders. For example, when +the coefficients are rational numbers, as opposed to integers. The +important property of a field is that non-zero elements can be divided +and produce another element. The quotient of the integers 2 and 3 is +not another integer. + + (r,s) : UP(a1,FRAC INT) + Type: Void + + r := a1**2 - 2/3 + 2 2 + a1 - - + 3 + Type: UnivariatePolynomial(a1,Fraction Integer) + + s := a1 + 4 + a1 + 4 + Type: UnivariatePolynomial(a1,Fraction Integer) + +When the coefficients are rational numbers or rational expressions, +the operation quo computes the quotient of two polynomials. + + r quo s + a1 - 4 + Type: UnivariatePolynomial(a1,Fraction Integer) + +The operation rem computes the remainder. + + r rem s + 46 + -- + 3 + Type: UnivariatePolynomial(a1,Fraction Integer) + +The operation divide can be used to return a record of both components. + + d := divide(r, s) + 46 + [quotient= a1 - 4,remainder= --] + 3 + Type: Record(quotient: UnivariatePolynomial(a1,Fraction Integer), + remainder: UnivariatePolynomial(a1,Fraction Integer)) + +Now we check the arithmetic! + + r - (d.quotient * s + d.remainder) + 0 + Type: UnivariatePolynomial(a1,Fraction Integer) + +It is also possible to integrate univariate polynomials when the +coefficients belong to a field. + + integrate r + 1 3 2 + - a1 - - a1 + 3 3 + Type: UnivariatePolynomial(a1,Fraction Integer) + + integrate s + 1 2 + - a1 + 4a1 + 2 + Type: UnivariatePolynomial(a1,Fraction Integer) + +One application of univariate polynomials is to see expressions in terms +of a specific variable. + +We start with a polynomial in a1 whose coefficients are quotients of +polynomials in b1 and b2. + + t : UP(a1,FRAC POLY INT) + Type: Void + +Since in this case we are not talking about using multivariate +polynomials in only two variables, we use Polynomial. We also use +Fraction because we want fractions. + + t := a1**2 - a1/b2 + (b1**2-b1)/(b2+3) + 2 + 2 1 b1 - b1 + a1 - -- a1 + -------- + b2 b2 + 3 + Type: UnivariatePolynomial(a1,Fraction Polynomial Integer) + +We push all the variables into a single quotient of polynomials. + + u : FRAC POLY INT := t + 2 2 2 2 + a1 b2 + (b1 - b1 + 3a1 - a1)b2 - 3a1 + --------------------------------------- + 2 + b2 + 3b2 + Type: Fraction Polynomial Integer + +Alternatively, we can view this as a polynomial in the variable This +is a mode-directed conversion: you indicate as much of the structure +as you care about and let Axiom decide on the full type and how to do +the transformation. + + u :: UP(b1,?) + 2 + 1 2 1 a1 b2 - a1 + ------ b1 - ------ b1 + ---------- + b2 + 3 b2 + 3 b2 + Type: UnivariatePolynomial(b1,Fraction Polynomial Integer) + +See Also: +o )help MultivariatePolynomial +o )help DistributedMultivariatePolynomial +o )show UnivariatePolynomial +o $AXIOM/doc/src/algebra/poly.spad.dvi + +@ <>= )abbrev domain UP UnivariatePolynomial ++ Author: diff --git a/src/algebra/seg.spad.pamphlet b/src/algebra/seg.spad.pamphlet index 7d6026b..31740f6 100644 --- a/src/algebra/seg.spad.pamphlet +++ b/src/algebra/seg.spad.pamphlet @@ -567,6 +567,148 @@ SegmentBindingFunctions2(R:Type, S:Type): with @ \section{domain UNISEG UniversalSegment} +<>= +-- seg.spad.pamphlet UniversalSegment.input +)spool UniversalSegment.output +)set message test on +)set message auto off +)clear all +--S 1 of 9 +pints := 1.. +--R +--R +--R (1) 1.. +--R Type: UniversalSegment PositiveInteger +--E 1 + +--S 2 of 9 +nevens := (0..) by -2 +--R +--R +--R (2) 0.. by - 2 +--R Type: UniversalSegment NonNegativeInteger +--E 2 + +--S 3 of 9 +useg: UniversalSegment(Integer) := 3..10 +--R +--R +--R (3) 3..10 +--R Type: UniversalSegment Integer +--E 3 + +--S 4 of 9 +hasHi pints +--R +--R +--R (4) false +--R Type: Boolean +--E 4 + +--S 5 of 9 +hasHi nevens +--R +--R +--R (5) false +--R Type: Boolean +--E 5 + +--S 6 of 9 +hasHi useg +--R +--R +--R (6) true +--R Type: Boolean +--E 6 + +--S 7 of 9 +expand pints +--R +--R +--R (7) [1,2,3,4,5,6,7,8,9,10,...] +--R Type: Stream Integer +--E 7 + +--S 8 of 9 +expand nevens +--R +--R +--R (8) [0,- 2,- 4,- 6,- 8,- 10,- 12,- 14,- 16,- 18,...] +--R Type: Stream Integer +--E 8 + +--S 9 of 9 +expand [1, 3, 10..15, 100..] +--R +--R +--R (9) [1,3,10,11,12,13,14,15,100,101,...] +--R Type: Stream Integer +--E 9 +)spool +)lisp (bye) +@ +<>= +==================================================================== +UniversalSegment examples +==================================================================== + +The UniversalSegment domain generalizes Segment by allowing segments +without a "hi" end point. + + pints := 1.. + 1.. + Type: UniversalSegment PositiveInteger + + nevens := (0..) by -2 + 0.. by - 2 + Type: UniversalSegment NonNegativeInteger + +Values of type Segment are automatically converted to type +UniversalSegment when appropriate. + + useg: UniversalSegment(Integer) := 3..10 + 3..10 + Type: UniversalSegment Integer + +The operation hasHi is used to test whether a segment has a hi end point. + + hasHi pints + false + Type: Boolean + + hasHi nevens + false + Type: Boolean + + hasHi useg + true + Type: Boolean + +All operations available on type Segment apply to UniversalSegment, with +the proviso that expansions produce streams rather than lists. This is +to accommodate infinite expansions. + + expand pints + [1,2,3,4,5,6,7,8,9,10,...] + Type: Stream Integer + + expand nevens + [0,- 2,- 4,- 6,- 8,- 10,- 12,- 14,- 16,- 18,...] + Type: Stream Integer + + expand [1, 3, 10..15, 100..] + [1,3,10,11,12,13,14,15,100,101,...] + Type: Stream Integer + +See Also: +o )help Segment +o )help SegmentBinding +o )help List +o )help Stream +o )show UniversalSegment +o $AXIOM/doc/src/algebra/seg.spad.dvi + +@ <>= )abbrev domain UNISEG UniversalSegment ++ Author: Robert S. Sutor diff --git a/src/algebra/si.spad.pamphlet b/src/algebra/si.spad.pamphlet index b7be18a..04d6d1f 100644 --- a/src/algebra/si.spad.pamphlet +++ b/src/algebra/si.spad.pamphlet @@ -651,6 +651,192 @@ This is eventually forcibly replaced by a recompiled version. The definition of {\bf one?} has been rewritten as it relies on calling {\bf ONEP} which is a function specific to Codemist Common Lisp but is not defined in Common Lisp. +<>= +-- si.spad.pamphlet SingleInteger.input +)spool SingleInteger.output +)set message test on +)set message auto off +)clear all +--S 1 +min()$SingleInteger +--R +--R +--R (1) - 2147483648 +--R Type: SingleInteger +--E 1 + +--S 2 +max()$SingleInteger +--R +--R +--R (2) 2147483647 +--R Type: SingleInteger +--E 2 + +--S 3 +a := 1234 :: SingleInteger +--R +--R +--R (3) 1234 +--R Type: SingleInteger +--E 3 + +--S 4 +b := 124$SingleInteger +--R +--R +--R (4) 124 +--R Type: SingleInteger +--E 4 + +--S 5 +gcd(a,b) +--R +--R +--R (5) 2 +--R Type: SingleInteger +--E 5 + +--S 6 +lcm(a,b) +--R +--R +--R (6) 76508 +--R Type: SingleInteger +--E 6 + +--S 7 +mulmod(5,6,13)$SingleInteger +--R +--R +--R (7) 4 +--R Type: SingleInteger +--E 7 + +--S 8 +positiveRemainder(37,13)$SingleInteger +--R +--R +--R (8) 11 +--R Type: SingleInteger +--E 8 + +--S 9 +And(3,4)$SingleInteger +--R +--R +--R (9) 0 +--R Type: SingleInteger +--E 9 + +--S 10 +shift(1,4)$SingleInteger +--R +--R +--R (10) 16 +--R Type: SingleInteger +--E 10 + +--S 11 +shift(31,-1)$SingleInteger +--R +--R +--R (11) 15 +--R Type: SingleInteger +--E 11 +)spool +)lisp (bye) +@ +<>= +==================================================================== +SingleInteger examples +==================================================================== + +The SingleInteger domain is intended to provide support in Axiom +for machine integer arithmetic. It is generally much faster than +(bignum) Integer arithmetic but suffers from a limited range of +values. Since Axiom can be implemented on top of various dialects of +Lisp, the actual representation of small integers may not correspond +exactly to the host machines integer representation. + +You can discover the minimum and maximum values in your implementation +by using min and max. + + min()$SingleInteger + - 2147483648 + Type: SingleInteger + + max()$SingleInteger + 2147483647 + Type: SingleInteger + +To avoid confusion with Integer, which is the default type for +integers, you usually need to work with declared variables. + + a := 1234 :: SingleInteger + 1234 + Type: SingleInteger + +or use package calling + + b := 124$SingleInteger + 124 + Type: SingleInteger + +You can add, multiply and subtract SingleInteger objects, and ask for +the greatest common divisor (gcd). + + gcd(a,b) + 2 + Type: SingleInteger + +The least common multiple (lcm) is also available. + + lcm(a,b) + 76508 + Type: SingleInteger + +Operations mulmod, addmod, submod, and invmod are similar - they provide +arithmetic modulo a given small integer. +Here is 5 * 6 mod 13. + + mulmod(5,6,13)$SingleInteger + 4 + Type: SingleInteger + +To reduce a small integer modulo a prime, use positiveRemainder. + + positiveRemainder(37,13)$SingleInteger + 11 + Type: SingleInteger + +Operations And, Or, xor, and Not provide bit level operations on small +integers. + + And(3,4)$SingleInteger + 0 + Type: SingleInteger + +Use shift(int,numToShift) to shift bits, where i is shifted left if +numToShift is positive, right if negative. + + shift(1,4)$SingleInteger + 16 + Type: SingleInteger + + shift(31,-1)$SingleInteger + 15 + Type: SingleInteger + +Many other operations are available for small integers, including many +of those provided for Integer. + +See Also: +o )help Integer +o )show SingleInteger +o $AXIOM/doc/src/algebra/si.spad.dvi + +@ <>= )abbrev domain SINT SingleInteger diff --git a/src/algebra/sregset.spad.pamphlet b/src/algebra/sregset.spad.pamphlet index 1988688..c0cdb44 100644 --- a/src/algebra/sregset.spad.pamphlet +++ b/src/algebra/sregset.spad.pamphlet @@ -1160,6 +1160,477 @@ SquareFreeRegularSetDecompositionPackage(R,E,V,P,TS): Exports == Implementation @ \section{domain SREGSET SquareFreeRegularTriangularSet} +<>= +-- sregset.spad.pamphlet SquareFreeRegularTriangularSet.input +)spool SquareFreeRegularTriangularSet.output +)set message test on +)set message auto off +)clear all +--S 1 of 23 +R := Integer +--R +--R +--R (1) Integer +--R Type: Domain +--E 1 + +--S 2 of 23 +ls : List Symbol := [x,y,z,t] +--R +--R +--R (2) [x,y,z,t] +--R Type: List Symbol +--E 2 + +--S 3 of 23 +V := OVAR(ls) +--R +--R +--R (3) OrderedVariableList [x,y,z,t] +--R Type: Domain +--E 3 + +--S 4 of 23 +E := IndexedExponents V +--R +--R +--R (4) IndexedExponents OrderedVariableList [x,y,z,t] +--R Type: Domain +--E 4 + +--S 5 of 23 +P := NSMP(R, V) +--R +--R +--R (5) NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t]) +--R Type: Domain +--E 5 + +--S 6 of 23 +x: P := 'x +--R +--R +--R (6) x +--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t]) +--E 6 + +--S 7 of 23 +y: P := 'y +--R +--R +--R (7) y +--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t]) +--E 7 + +--S 8 of 23 +z: P := 'z +--R +--R +--R (8) z +--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t]) +--E 8 + +--S 9 of 23 +t: P := 't +--R +--R +--R (9) t +--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t]) +--E 9 + +--S 10 of 23 +ST := SREGSET(R,E,V,P) +--R +--R +--R (10) +--R SquareFreeRegularTriangularSet(Integer,IndexedExponents OrderedVariableList [ +--R x,y,z,t],OrderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Intege +--R r,OrderedVariableList [x,y,z,t])) +--R Type: Domain +--E 10 + +--S 11 of 23 +p1 := x ** 31 - x ** 6 - x - y +--R +--R +--R 31 6 +--R (11) x - x - x - y +--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t]) +--E 11 + +--S 12 of 23 +p2 := x ** 8 - z +--R +--R +--R 8 +--R (12) x - z +--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t]) +--E 12 + +--S 13 of 23 +p3 := x ** 10 - t +--R +--R +--R 10 +--R (13) x - t +--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t]) +--E 13 + +--S 14 of 23 +lp := [p1, p2, p3] +--R +--R +--R 31 6 8 10 +--R (14) [x - x - x - y,x - z,x - t] +--RType: List NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t]) +--E 14 + +--S 15 of 23 +zeroSetSplit(lp)$ST +--R +--R +--R 5 4 2 3 8 5 3 2 4 2 +--R (15) [{z - t ,t z y + 2z y - t + 2t + t - t ,(t - t)x - t y - z }] +--RType: List SquareFreeRegularTriangularSet(Integer,IndexedExponents OrderedVariableList [x,y,z,t],OrderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])) +--E 15 + +--S 16 of 23 +zeroSetSplit(lp,false)$ST +--R +--R +--R (16) +--R 5 4 2 3 8 5 3 2 4 2 +--R [{z - t ,t z y + 2z y - t + 2t + t - t ,(t - t)x - t y - z }, +--R 3 5 2 2 +--R {t - 1,z - t,t y + z ,z x - t}, {t,z,y,x}] +--RType: List SquareFreeRegularTriangularSet(Integer,IndexedExponents OrderedVariableList [x,y,z,t],OrderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])) +--E 16 + +--S 17 of 23 +T := REGSET(R,E,V,P) +--R +--R +--R (17) +--R RegularTriangularSet(Integer,IndexedExponents OrderedVariableList [x,y,z,t],O +--R rderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Integer,OrderedV +--R ariableList [x,y,z,t])) +--R Type: Domain +--E 17 + +--S 18 of 23 +lts := zeroSetSplit(lp,false)$T +--R +--R +--R (18) +--R 5 4 2 3 8 5 3 2 4 2 +--R [{z - t ,t z y + 2z y - t + 2t + t - t ,(t - t)x - t y - z }, +--R 3 5 2 3 2 +--R {t - 1,z - t,t z y + 2z y + 1,z x - t}, {t,z,y,x}] +--RType: List RegularTriangularSet(Integer,IndexedExponents OrderedVariableList [x,y,z,t],OrderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])) +--E 18 + +--S 19 of 23 +ts := lts.2 +--R +--R +--R 3 5 2 3 2 +--R (19) {t - 1,z - t,t z y + 2z y + 1,z x - t} +--RType: RegularTriangularSet(Integer,IndexedExponents OrderedVariableList [x,y,z,t],OrderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])) +--E 19 + +--S 20 of 23 +pol := select(ts,'y)$T +--R +--R +--R 2 3 +--R (20) t z y + 2z y + 1 +--RType: Union(NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t]),...) +--E 20 + +--S 21 of 23 +tower := collectUnder(ts,'y)$T +--R +--R +--R 3 5 +--R (21) {t - 1,z - t} +--RType: RegularTriangularSet(Integer,IndexedExponents OrderedVariableList [x,y,z,t],OrderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])) +--E 21 + +--S 22 of 23 +pack := RegularTriangularSetGcdPackage(R,E,V,P,T) +--R +--R +--R (22) +--R RegularTriangularSetGcdPackage(Integer,IndexedExponents OrderedVariableList [ +--R x,y,z,t],OrderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Intege +--R r,OrderedVariableList [x,y,z,t]),RegularTriangularSet(Integer,IndexedExponent +--R s OrderedVariableList [x,y,z,t],OrderedVariableList [x,y,z,t],NewSparseMultiv +--R ariatePolynomial(Integer,OrderedVariableList [x,y,z,t]))) +--R Type: Domain +--E 22 + +--S 23 of 23 +toseSquareFreePart(pol,tower)$pack +--R +--R +--R 2 3 5 +--R (23) [[val= t y + z ,tower= {t - 1,z - t}]] +--RType: List Record(val: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t]),tower: RegularTriangularSet(Integer,IndexedExponents OrderedVariableList [x,y,z,t],OrderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t]))) +--E 23 +)spool +)lisp (bye) +@ +<>= +==================================================================== +SquareFreeRegularTriangularSet examples +==================================================================== + +The SquareFreeRegularTriangularSet domain constructor implements +square-free regular triangular sets. See the RegularTriangularSet +domain constructor for general regular triangular sets. Let T be a +regular triangular set consisting of polynomials t1, ..., tm ordered +by increasing main variables. The regular triangular set T is +square-free if T is empty or if t1, ..., tm-1 is square-free and if the +polynomial tm is square-free as a univariate polynomial with coefficients +in the tower of simple extensions associated with t1,...,tm-1. + +The main interest of square-free regular triangular sets is that their +associated towers of simple extensions are product of fields. +Consequently, the saturated ideal of a square-free regular triangular +set is radical. This property simplifies some of the operations +related to regular triangular sets. However, building square-free +regular triangular sets is generally more expensive than building +general regular triangular sets. + +As the RegularTriangularSet domain constructor, the +SquareFreeRegularTriangularSet domain constructor also implements a +method for solving polynomial systems by means of regular triangular +sets. This is in fact the same method with some adaptations to take +into account the fact that the computed regular chains are +square-free. Note that it is also possible to pass from a +decomposition into general regular triangular sets to a decomposition +into square-free regular triangular sets. This conversion is used +internally by the LazardSetSolvingPackage package constructor. + +N.B. When solving polynomial systems with the +SquareFreeRegularTriangularSet domain constructor or the +LazardSetSolvingPackage package constructor, decompositions have no +redundant components. See also LexTriangularPackage and +ZeroDimensionalSolvePackage for the case of algebraic systems with a +finite number of (complex) solutions. + +We shall explain now how to use the constructor SquareFreeRegularTriangularSet. + +This constructor takes four arguments. The first one, R, is the +coefficient ring of the polynomials; it must belong to the category +GcdDomain. The second one, E, is the exponent monoid of the +polynomials; it must belong to the category OrderedAbelianMonoidSup. +the third one, V, is the ordered set of variables; it must belong to +the category OrderedSet. The last one is the polynomial ring; it must +belong to the category RecursivePolynomialCategory(R,E,V). The +abbreviation for SquareFreeRegularTriangularSet} is SREGSET. + +Note that the way of understanding triangular decompositions +is detailed in the example of the RegularTriangularSet constructor. + +Let us illustrate the use of this constructor with one example +(Donati-Traverso). Define the coefficient ring. + + R := Integer + Integer + Type: Domain + +Define the list of variables, + + ls : List Symbol := [x,y,z,t] + [x,y,z,t] + Type: List Symbol + +and make it an ordered set; + + V := OVAR(ls) + OrderedVariableList [x,y,z,t] + Type: Domain + +then define the exponent monoid. + + E := IndexedExponents V + IndexedExponents OrderedVariableList [x,y,z,t] + Type: Domain + +Define the polynomial ring. + + P := NSMP(R, V) + NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t]) + Type: Domain + +Let the variables be polynomial. + + x: P := 'x + x + Type: NewSparseMultivariatePolynomial(Integer, + OrderedVariableList [x,y,z,t]) + + y: P := 'y + y + Type: NewSparseMultivariatePolynomial(Integer, + OrderedVariableList [x,y,z,t]) + + z: P := 'z + z + Type: NewSparseMultivariatePolynomial(Integer, + OrderedVariableList [x,y,z,t]) + + t: P := 't + t + Type: NewSparseMultivariatePolynomial(Integer, + OrderedVariableList [x,y,z,t]) + +Now call the SquareFreeRegularTriangularSet domain constructor. + + ST := SREGSET(R,E,V,P) + SquareFreeRegularTriangularSet(Integer,IndexedExponents OrderedVariableList [ + x,y,z,t],OrderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Intege + r,OrderedVariableList [x,y,z,t])) + Type: Domain + +Define a polynomial system. + + p1 := x ** 31 - x ** 6 - x - y + 31 6 + x - x - x - y + Type: NewSparseMultivariatePolynomial(Integer, + OrderedVariableList [x,y,z,t]) + + p2 := x ** 8 - z + 8 + x - z + Type: NewSparseMultivariatePolynomial(Integer, + OrderedVariableList [x,y,z,t]) + + p3 := x ** 10 - t + 10 + x - t + Type: NewSparseMultivariatePolynomial(Integer, + OrderedVariableList [x,y,z,t]) + + lp := [p1, p2, p3] + 31 6 8 10 + [x - x - x - y,x - z,x - t] + Type: List NewSparseMultivariatePolynomial(Integer, + OrderedVariableList [x,y,z,t]) + +First of all, let us solve this system in the sense of Kalkbrener. + + zeroSetSplit(lp)$ST + 5 4 2 3 8 5 3 2 4 2 + [{z - t ,t z y + 2z y - t + 2t + t - t ,(t - t)x - t y - z }] + Type: List SquareFreeRegularTriangularSet(Integer, + IndexedExponents OrderedVariableList [x,y,z,t], + OrderedVariableList [x,y,z,t], + NewSparseMultivariatePolynomial(Integer, + OrderedVariableList [x,y,z,t])) + +And now in the sense of Lazard (or Wu and other authors). + + zeroSetSplit(lp,false)$ST + 5 4 2 3 8 5 3 2 4 2 + [{z - t ,t z y + 2z y - t + 2t + t - t ,(t - t)x - t y - z }, + 3 5 2 2 + {t - 1,z - t,t y + z ,z x - t}, {t,z,y,x}] + Type: List SquareFreeRegularTriangularSet(Integer, + IndexedExponents OrderedVariableList [x,y,z,t], + OrderedVariableList [x,y,z,t], + NewSparseMultivariatePolynomial(Integer, + OrderedVariableList [x,y,z,t])) + +Now to see the difference with the RegularTriangularSet domain +constructor, we define: + + T := REGSET(R,E,V,P) + RegularTriangularSet(Integer,IndexedExponents OrderedVariableList [x,y,z,t],O + rderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Integer,OrderedV + ariableList [x,y,z,t])) + Type: Domain + +and compute: + + lts := zeroSetSplit(lp,false)$T + 5 4 2 3 8 5 3 2 4 2 + [{z - t ,t z y + 2z y - t + 2t + t - t ,(t - t)x - t y - z }, + 3 5 2 3 2 + {t - 1,z - t,t z y + 2z y + 1,z x - t}, {t,z,y,x}] + Type: List RegularTriangularSet(Integer, + IndexedExponents OrderedVariableList [x,y,z,t], + OrderedVariableList [x,y,z,t], + NewSparseMultivariatePolynomial(Integer, + OrderedVariableList [x,y,z,t])) + +If you look at the second set in both decompositions in the sense of Lazard, +you will see that the polynomial with main variable y is not the same. + +Let us understand what has happened. + +We define: + + ts := lts.2 + 3 5 2 3 2 + (19) {t - 1,z - t,t z y + 2z y + 1,z x - t} + Type: RegularTriangularSet(Integer, + IndexedExponents OrderedVariableList [x,y,z,t], + OrderedVariableList [x,y,z,t], + NewSparseMultivariatePolynomial(Integer, + OrderedVariableList [x,y,z,t])) + + pol := select(ts,'y)$T + 2 3 + t z y + 2z y + 1 + Type: Union(NewSparseMultivariatePolynomial(Integer, + OrderedVariableList [x,y,z,t]),...) + + tower := collectUnder(ts,'y)$T + 3 5 + {t - 1,z - t} + Type: RegularTriangularSet(Integer, + IndexedExponents OrderedVariableList [x,y,z,t], + OrderedVariableList [x,y,z,t], + NewSparseMultivariatePolynomial(Integer, + OrderedVariableList [x,y,z,t])) + + pack := RegularTriangularSetGcdPackage(R,E,V,P,T) + RegularTriangularSetGcdPackage(Integer,IndexedExponents OrderedVariableList [ + x,y,z,t],OrderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Intege + r,OrderedVariableList [x,y,z,t]),RegularTriangularSet(Integer,IndexedExponent + s OrderedVariableList [x,y,z,t],OrderedVariableList [x,y,z,t],NewSparseMultiv + ariatePolynomial(Integer,OrderedVariableList [x,y,z,t]))) + Type: Domain + +Then we compute: + + toseSquareFreePart(pol,tower)$pack + 2 3 5 + [[val= t y + z ,tower= {t - 1,z - t}]] + Type: List Record(val: NewSparseMultivariatePolynomial(Integer, + OrderedVariableList [x,y,z,t]), + tower: RegularTriangularSet(Integer, + IndexedExponents OrderedVariableList [x,y,z,t], + OrderedVariableList [x,y,z,t], + NewSparseMultivariatePolynomial(Integer, + OrderedVariableList [x,y,z,t]))) + +See Also: +o )help GcdDomain +o )help OrderedAbelianMonoidSup +o )help OrderedSet +o )help RecursivePolynomialCategory +o )help ZeroDimensionalSolvePackage +o )help LexTriangularPackage +o )help LazardSetSolvingPackage +o )help RegularTriangularSet +o )show SquareFreeRegularTriangularSet +o $AXIOM/doc/src/algebra/sregset.spad.dvi + +@ <>= )abbrev domain SREGSET SquareFreeRegularTriangularSet ++ Author: Marc Moreno Maza diff --git a/src/algebra/stream.spad.pamphlet b/src/algebra/stream.spad.pamphlet index 4edd850..1d68e08 100644 --- a/src/algebra/stream.spad.pamphlet +++ b/src/algebra/stream.spad.pamphlet @@ -539,6 +539,188 @@ CyclicStreamTools(S,ST): Exports == Implementation where @ \section{domain STREAM Stream} +<>= +-- stream.spad.pamphlet Stream.input +)spool Stream.output +)set message test on +)set message auto off +)clear all +--S 1 of 12 +ints := [i for i in 0..] +--R +--R +--R (1) [0,1,2,3,4,5,6,7,8,9,...] +--R Type: Stream NonNegativeInteger +--E 1 + +--S 2 of 12 +f : List INT -> List INT +--R +--R Type: Void +--E 2 + +--S 3 of 12 +f x == [x.1 + x.2, x.1] +--R +--R Type: Void +--E 3 + +--S 4 of 12 +fibs := [i.2 for i in [generate(f,[1,1])]] +--R +--R Compiling function f with type List Integer -> List Integer +--R +--R (4) [1,1,2,3,5,8,13,21,34,55,...] +--R Type: Stream Integer +--E 4 + +--S 5 of 12 +[i for i in ints | odd? i] +--R +--R +--R (5) [1,3,5,7,9,11,13,15,17,19,...] +--R Type: Stream NonNegativeInteger +--E 5 + +--S 6 of 12 +odds := [2*i+1 for i in ints] +--R +--R +--R (6) [1,3,5,7,9,11,13,15,17,19,...] +--R Type: Stream NonNegativeInteger +--E 6 + +--S 7 of 12 +scan(0,+,odds) +--R +--R +--R (7) [1,4,9,16,25,36,49,64,81,100,...] +--R Type: Stream NonNegativeInteger +--E 7 + +--S 8 of 12 +[i*j for i in ints for j in odds] +--R +--R +--R (8) [0,3,10,21,36,55,78,105,136,171,...] +--R Type: Stream NonNegativeInteger +--E 8 + +--S 9 of 12 +map(*,ints,odds) +--R +--R +--R (9) [0,3,10,21,36,55,78,105,136,171,...] +--R Type: Stream NonNegativeInteger +--E 9 + +--S 10 of 12 +first ints +--R +--R +--R (10) 0 +--R Type: NonNegativeInteger +--E 10 + +--S 11 of 12 +rest ints +--R +--R +--R (11) [1,2,3,4,5,6,7,8,9,10,...] +--R Type: Stream NonNegativeInteger +--E 11 + +--S 12 of 12 +fibs 20 +--R +--R +--R (12) 6765 +--R Type: PositiveInteger +--E 12 +)spool +)lisp (bye) +@ +<>= +==================================================================== +Stream examples +==================================================================== + +A Stream object is represented as a list whose last element contains +the wherewithal to create the next element, should it ever be required. + +Let ints be the infinite stream of non-negative integers. + + ints := [i for i in 0..] + [0,1,2,3,4,5,6,7,8,9,...] + Type: Stream NonNegativeInteger + +By default, ten stream elements are calculated. This number may be +changed to something else by the system command + )set streams calculate + +More generally, you can construct a stream by specifying its initial +value and a function which, when given an element, creates the next element. + + f : List INT -> List INT + Type: Void + + f x == [x.1 + x.2, x.1] + Type: Void + + fibs := [i.2 for i in [generate(f,[1,1])]] + [1,1,2,3,5,8,13,21,34,55,...] + Type: Stream Integer + +You can create the stream of odd non-negative integers by either filtering +them from the integers, or by evaluating an expression for each integer. + + [i for i in ints | odd? i] + [1,3,5,7,9,11,13,15,17,19,...] + Type: Stream NonNegativeInteger + + odds := [2*i+1 for i in ints] + [1,3,5,7,9,11,13,15,17,19,...] + Type: Stream NonNegativeInteger + +You can accumulate the initial segments of a stream using the scan operation. + + scan(0,+,odds) + [1,4,9,16,25,36,49,64,81,100,...] + Type: Stream NonNegativeInteger + +The corresponding elements of two or more streams can be combined in this way. + + [i*j for i in ints for j in odds] + [0,3,10,21,36,55,78,105,136,171,...] + Type: Stream NonNegativeInteger + + map(*,ints,odds) + [0,3,10,21,36,55,78,105,136,171,...] + Type: Stream NonNegativeInteger + +Many operations similar to those applicable to lists are available for +streams. + + first ints + 0 + Type: NonNegativeInteger + + rest ints + [1,2,3,4,5,6,7,8,9,10,...] + Type: Stream NonNegativeInteger + + fibs 20 + 6765 + Type: PositiveInteger + +See Also: +o )help StreamFunctions1 +o )help StreamFunctions2 +o )help StreamFunctions3 +o )show Stream +o $AXIOM/doc/src/algebra/stream.spad.dvi + +@ <>= )abbrev domain STREAM Stream ++ Implementation of streams via lazy evaluation diff --git a/src/algebra/string.spad.pamphlet b/src/algebra/string.spad.pamphlet index fe270fc..a7af939 100644 --- a/src/algebra/string.spad.pamphlet +++ b/src/algebra/string.spad.pamphlet @@ -1056,6 +1056,510 @@ Note that this code is not included in the generated catdef.spad file. (MAKEPROP (QUOTE |IndexedString|) (QUOTE |infovec|) (LIST (QUOTE #(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|NonNegativeInteger|) (|Character|) |ISTRING;new;NniC$;1| |ISTRING;empty;$;2| (|Boolean|) |ISTRING;empty?;$B;3| |ISTRING;#;$Nni;4| |ISTRING;=;2$B;5| |ISTRING;<;2$B;6| |ISTRING;concat;3$;7| |ISTRING;copy;2$;8| (|Integer|) (|UniversalSegment| 18) (0 . SEGMENT) |ISTRING;elt;$Us$;31| (6 . SEGMENT) |ISTRING;insert;2$I$;9| (|String|) (|OutputForm|) (11 . |outputForm|) |ISTRING;coerce;$Of;10| |ISTRING;minIndex;$I;11| (|CharacterClass|) (16 . |upperCase|) (20 . |upperCase|) (|Mapping| 8 8) (25 . |map!|) |ISTRING;upperCase!;2$;12| (31 . |lowerCase|) (35 . |lowerCase|) |ISTRING;lowerCase!;2$;13| |ISTRING;latex;$S;14| (40 . |lo|) (45 . |hasHi|) (50 . |hi|) (55 . |maxIndex|) (60 . |space|) |ISTRING;replace;$Us2$;15| |ISTRING;setelt;$I2C;16| |ISTRING;substring?;2$IB;17| |ISTRING;position;2$2I;18| |ISTRING;position;C$2I;19| (64 . |member?|) |ISTRING;position;Cc$2I;20| |ISTRING;suffix?;2$B;21| |ISTRING;elt;$IC;30| (70 . |=|) (|List| |$$|) (76 . |empty|) (80 . |concat|) (86 . |reverse!|) (|List| |$|) |ISTRING;split;$CL;22| |ISTRING;split;$CcL;23| |ISTRING;leftTrim;$C$;24| |ISTRING;leftTrim;$Cc$;25| |ISTRING;rightTrim;$C$;26| |ISTRING;rightTrim;$Cc$;27| |ISTRING;copyInto!;2$I$;29| |ISTRING;concat;L$;28| (91 . |ord|) |ISTRING;hash;$I;32| |ISTRING;match;2$CNni;33| (96 . |prefix?|) |ISTRING;match?;2$CB;34| (|List| 8) (|List| 74) (|Equation| 8) (|Mapping| 8 8 8) (|InputForm|) (|SingleInteger|) (|Mapping| 11 8) (|Mapping| 11 8 8) (|Void|) (|Union| 8 (QUOTE "failed")) (|List| 18))) (QUOTE #(|~=| 102 |upperCase!| 108 |upperCase| 113 |trim| 118 |swap!| 130 |suffix?| 137 |substring?| 143 |split| 150 |sorted?| 162 |sort!| 173 |sort| 184 |size?| 195 |setelt| 201 |select| 215 |sample| 221 |rightTrim| 225 |reverse!| 237 |reverse| 242 |replace| 247 |removeDuplicates| 254 |remove| 259 |reduce| 271 |qsetelt!| 292 |qelt| 299 |prefix?| 305 |position| 311 |parts| 344 |new| 349 |more?| 355 |minIndex| 361 |min| 366 |merge| 372 |members| 385 |member?| 390 |maxIndex| 396 |max| 401 |match?| 407 |match| 414 |map!| 421 |map| 427 |lowerCase!| 440 |lowerCase| 445 |less?| 450 |leftTrim| 456 |latex| 468 |insert| 473 |indices| 487 |index?| 492 |hash| 498 |first| 508 |find| 513 |fill!| 519 |every?| 525 |eval| 531 |eq?| 557 |entry?| 563 |entries| 569 |empty?| 574 |empty| 579 |elt| 583 |delete| 608 |count| 620 |copyInto!| 632 |copy| 639 |convert| 644 |construct| 649 |concat| 654 |coerce| 677 |any?| 687 |>=| 693 |>| 699 |=| 705 |<=| 711 |<| 717 |#| 723)) (QUOTE ((|shallowlyMutable| . 0) (|finiteAggregate| . 0))) (CONS (|makeByteWordVec2| 7 (QUOTE (0 0 0 0 0 0 0 3 0 0 7 4 0 0 7 1 2 4))) (CONS (QUOTE #(|StringAggregate&| |OneDimensionalArrayAggregate&| |FiniteLinearAggregate&| |LinearAggregate&| |IndexedAggregate&| |Collection&| |HomogeneousAggregate&| |OrderedSet&| |Aggregate&| |EltableAggregate&| |Evalable&| |SetCategory&| NIL NIL |InnerEvalable&| NIL NIL |BasicType&|)) (CONS (QUOTE #((|StringAggregate|) (|OneDimensionalArrayAggregate| 8) (|FiniteLinearAggregate| 8) (|LinearAggregate| 8) (|IndexedAggregate| 18 8) (|Collection| 8) (|HomogeneousAggregate| 8) (|OrderedSet|) (|Aggregate|) (|EltableAggregate| 18 8) (|Evalable| 8) (|SetCategory|) (|Type|) (|Eltable| 18 8) (|InnerEvalable| 8 8) (|CoercibleTo| 25) (|ConvertibleTo| 76) (|BasicType|))) (|makeByteWordVec2| 82 (QUOTE (2 19 0 18 18 20 1 19 0 18 22 1 25 0 24 26 0 29 0 30 1 8 0 0 31 2 0 0 32 0 33 0 29 0 35 1 8 0 0 36 1 19 18 0 39 1 19 11 0 40 1 19 18 0 41 1 0 18 0 42 0 8 0 43 2 29 11 8 0 49 2 8 11 0 0 53 0 54 0 55 2 54 0 2 0 56 1 54 0 0 57 1 8 18 0 67 2 0 11 0 0 70 2 1 11 0 0 1 1 0 0 0 34 1 0 0 0 1 2 0 0 0 8 1 2 0 0 0 29 1 3 0 80 0 18 18 1 2 0 11 0 0 51 3 0 11 0 0 18 46 2 0 58 0 29 60 2 0 58 0 8 59 1 3 11 0 1 2 0 11 79 0 1 1 3 0 0 1 2 0 0 79 0 1 1 3 0 0 1 2 0 0 79 0 1 2 0 11 0 7 1 3 0 8 0 19 8 1 3 0 8 0 18 8 45 2 0 0 78 0 1 0 0 0 1 2 0 0 0 8 63 2 0 0 0 29 64 1 0 0 0 1 1 0 0 0 1 3 0 0 0 19 0 44 1 1 0 0 1 2 1 0 8 0 1 2 0 0 78 0 1 4 1 8 75 0 8 8 1 3 0 8 75 0 8 1 2 0 8 75 0 1 3 0 8 0 18 8 1 2 0 8 0 18 1 2 0 11 0 0 70 3 1 18 8 0 18 48 2 1 18 8 0 1 3 0 18 29 0 18 50 3 0 18 0 0 18 47 2 0 18 78 0 1 1 0 72 0 1 2 0 0 7 8 9 2 0 11 0 7 1 1 5 18 0 28 2 3 0 0 0 1 2 3 0 0 0 1 3 0 0 79 0 0 1 1 0 72 0 1 2 1 11 8 0 1 1 5 18 0 42 2 3 0 0 0 1 3 0 11 0 0 8 71 3 0 7 0 0 8 69 2 0 0 32 0 33 3 0 0 75 0 0 1 2 0 0 32 0 1 1 0 0 0 37 1 0 0 0 1 2 0 11 0 7 1 2 0 0 0 8 61 2 0 0 0 29 62 1 1 24 0 38 3 0 0 8 0 18 1 3 0 0 0 0 18 23 1 0 82 0 1 2 0 11 18 0 1 1 1 77 0 1 1 0 18 0 68 1 5 8 0 1 2 0 81 78 0 1 2 0 0 0 8 1 2 0 11 78 0 1 3 6 0 0 72 72 1 3 6 0 0 8 8 1 2 6 0 0 73 1 2 6 0 0 74 1 2 0 11 0 0 1 2 1 11 8 0 1 1 0 72 0 1 1 0 11 0 12 0 0 0 10 2 0 0 0 0 1 2 0 0 0 19 21 2 0 8 0 18 52 3 0 8 0 18 8 1 2 0 0 0 18 1 2 0 0 0 19 1 2 1 7 8 0 1 2 0 7 78 0 1 3 0 0 0 0 18 65 1 0 0 0 17 1 2 76 0 1 1 0 0 72 1 1 0 0 58 66 2 0 0 0 0 16 2 0 0 0 8 1 2 0 0 8 0 1 1 1 25 0 27 1 0 0 8 1 2 0 11 78 0 1 2 3 11 0 0 1 2 3 11 0 0 1 2 1 11 0 0 14 2 3 11 0 0 1 2 3 11 0 0 15 1 0 7 0 13)))))) (QUOTE |lookupComplete|))) @ \section{domain STRING String} +<>= +-- string.spad.pamphlet String.input +)spool String.output +)set message test on +)set message auto off +)clear all +--S 1 of 35 +hello := "Hello, I'm AXIOM!" +--R +--R +--R (1) "Hello, I'm AXIOM!" +--R Type: String +--E 1 + +--S 2 of 35 +said := "Jane said, \_"Look!\_"" +--R +--R +--R (2) "Jane said, \"Look!\"" +--R Type: String +--E 2 + +--S 3 of 35 +saw := "She saw exactly one underscore: \_\_." +--R +--R +--R (3) "She saw exactly one underscore: \\." +--R Type: String +--E 3 + +--S 4 of 35 +gasp: String := new(32, char "x") +--R +--R +--R (4) "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" +--R Type: String +--E 4 + +--S 5 of 35 +#gasp +--R +--R +--R (5) 32 +--R Type: PositiveInteger +--E 5 + +--S 6 of 35 +hello.2 +--R +--R +--R (6) e +--R Type: Character +--E 6 + +--S 7 of 35 +hello 2 +--R +--R +--R (7) e +--R Type: Character +--E 7 + +--S 8 of 35 +hello(2) +--R +--R +--R (8) e +--R Type: Character +--E 8 + +--S 9 of 35 +hullo := copy hello +--R +--R +--R (9) "Hello, I'm AXIOM!" +--R Type: String +--E 9 + +--S 10 of 35 +hullo.2 := char "u"; [hello, hullo] +--R +--R +--R (10) ["Hello, I'm AXIOM!","Hullo, I'm AXIOM!"] +--R Type: List String +--E 10 + +--S 11 of 35 +saidsaw := concat ["alpha","---","omega"] +--R +--R +--R (11) "alpha---omega" +--R Type: String +--E 11 + +--S 12 of 35 +concat("hello ","goodbye") +--R +--R +--R (12) "hello goodbye" +--R Type: String +--E 12 + +--S 13 of 35 +"This " "is " "several " "strings " "concatenated." +--R +--R +--R (13) "This is several strings concatenated." +--R Type: String +--E 13 + +--S 14 of 35 +hello(1..5) +--R +--R +--R (14) "Hello" +--R Type: String +--E 14 + +--S 15 of 35 +hello(8..) +--R +--R +--R (15) "I'm AXIOM!" +--R Type: String +--E 15 + +--S 16 of 35 +split(hello, char " ") +--R +--R +--R (16) ["Hello,","I'm","AXIOM!"] +--R Type: List String +--E 16 + +--S 17 of 35 +other := complement alphanumeric(); +--R +--R Type: CharacterClass +--E 17 + +--S 18 of 35 +split(saidsaw, other) +--R +--R +--R (18) ["alpha","omega"] +--R Type: List String +--E 18 + +--S 19 of 35 +trim("## ++ relax ++ ##", char "#") +--R +--R +--R (19) " ++ relax ++ " +--R Type: String +--E 19 + +--S 20 of 35 +trim("## ++ relax ++ ##", other) +--R +--R +--R (20) "relax" +--R Type: String +--E 20 + +--S 21 of 35 +leftTrim("## ++ relax ++ ##", other) +--R +--R +--R (21) "relax ++ ##" +--R Type: String +--E 21 + +--S 22 of 35 +rightTrim("## ++ relax ++ ##", other) +--R +--R +--R (22) "## ++ relax" +--R Type: String +--E 22 + +--S 23 of 35 +upperCase hello +--R +--R +--R (23) "HELLO, I'M AXIOM!" +--R Type: String +--E 23 + +--S 24 of 35 +lowerCase hello +--R +--R +--R (24) "hello, i'm axiom!" +--R Type: String +--E 24 + +--S 25 of 35 +prefix?("He", "Hello") +--R +--R +--R (25) true +--R Type: Boolean +--E 25 + +--S 26 of 35 +prefix?("Her", "Hello") +--R +--R +--R (26) false +--R Type: Boolean +--E 26 + +--S 27 of 35 +suffix?("", "Hello") +--R +--R +--R (27) true +--R Type: Boolean +--E 27 + +--S 28 of 35 +suffix?("LO", "Hello") +--R +--R +--R (28) false +--R Type: Boolean +--E 28 + +--S 29 of 35 +substring?("ll", "Hello", 3) +--R +--R +--R (29) true +--R Type: Boolean +--E 29 + +--S 30 of 35 +substring?("ll", "Hello", 4) +--R +--R +--R (30) false +--R Type: Boolean +--E 30 + +--S 31 of 35 +n := position("nd", "underground", 1) +--R +--R +--R (31) 2 +--R Type: PositiveInteger +--E 31 + +--S 32 of 35 +n := position("nd", "underground", n+1) +--R +--R +--R (32) 10 +--R Type: PositiveInteger +--E 32 + +--S 33 of 35 +n := position("nd", "underground", n+1) +--R +--R +--R (33) 0 +--R Type: NonNegativeInteger +--E 33 + +--S 34 of 35 +position(char "d", "underground", 1) +--R +--R +--R (34) 3 +--R Type: PositiveInteger +--E 34 + +--S 35 of 35 +position(hexDigit(), "underground", 1) +--R +--R +--R (35) 3 +--R Type: PositiveInteger +--E 35 +)spool +)lisp (bye) +@ +<>= +==================================================================== +String examples +==================================================================== + +The type String provides character strings. Character strings +provide all the operations for a one-dimensional array of characters, +plus additional operations for manipulating text. + +String values can be created using double quotes. + + hello := "Hello, I'm AXIOM!" + "Hello, I'm AXIOM!" + Type: String + +Note, however, that double quotes and underscores must be preceded by +an extra underscore. + + said := "Jane said, \_"Look!\_"" + "Jane said, \"Look!\"" + Type: String + + saw := "She saw exactly one underscore: \_\_." + "She saw exactly one underscore: \\." + Type: String + +It is also possible to use new to create a string of any size filled +with a given character. Since there are many new functions it is +necessary to indicate the desired type. + + gasp: String := new(32, char "x") + "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" + Type: String + +The length of a string is given by #. + + #gasp + 32 + Type: PositiveInteger + +Indexing operations allow characters to be extracted or replaced in strings. +For any string s, indices lie in the range 1..#s. + + hello.2 + e + Type: Character + +Indexing is really just the application of a string to a subscript, so +any application syntax works. + + hello 2 + e + Type: Character + + hello(2) + e + Type: Character + +If it is important not to modify a given string, it should be copied +before any updating operations are used. + + hullo := copy hello + "Hello, I'm AXIOM!" + Type: String + + hullo.2 := char "u"; [hello, hullo] + ["Hello, I'm AXIOM!","Hullo, I'm AXIOM!"] + Type: List String + +Operations are provided to split and join strings. The concat +operation allows several strings to be joined together. + + saidsaw := concat ["alpha","---","omega"] + "alpha---omega" + Type: String + +There is a version of concat that works with two strings. + + concat("hello ","goodbye") + "hello goodbye" + Type: String + +Juxtaposition can also be used to concatenate strings. + + "This " "is " "several " "strings " "concatenated." + "This is several strings concatenated." + Type: String + +Substrings are obtained by giving an index range. + + hello(1..5) + "Hello" + Type: String + + hello(8..) + "I'm AXIOM!" + Type: String + +A string can be split into several substrings by giving a separation +character or character class. + + split(hello, char " ") + ["Hello,","I'm","AXIOM!"] + Type: List String + + other := complement alphanumeric(); + Type: CharacterClass + + split(saidsaw, other) + ["alpha","omega"] + Type: List String + +Unwanted characters can be trimmed from the beginning or end of a string +using the operations trim, leftTrim and rightTrim. + + trim("## ++ relax ++ ##", char "#") + " ++ relax ++ " + Type: String + +Each of these functions takes a string and a second argument to specify +the characters to be discarded. + + trim("## ++ relax ++ ##", other) + "relax" + Type: String + +The second argument can be given either as a single character or as a +character class. + + leftTrim("## ++ relax ++ ##", other) + "relax ++ ##" + Type: String + + rightTrim("## ++ relax ++ ##", other) + "## ++ relax" + Type: String + +Strings can be changed to upper case or lower case using the +operations upperCase and lowerCase. + + upperCase hello + "HELLO, I'M AXIOM!" + Type: String + +The versions with the exclamation mark change the original string, +while the others produce a copy. + + lowerCase hello + "hello, i'm axiom!" + Type: String + +Some basic string matching is provided. The function prefix? tests +whether one string is an initial prefix of another. + + prefix?("He", "Hello") + true + Type: Boolean + + prefix?("Her", "Hello") + false + Type: Boolean + +A similar function, suffix?, tests for suffixes. + + suffix?("", "Hello") + true + Type: Boolean + + suffix?("LO", "Hello") + false + Type: Boolean + +The function substring? tests for a substring given a starting position. + + substring?("ll", "Hello", 3) + true + Type: Boolean + + substring?("ll", "Hello", 4) + false + Type: Boolean + +A number of position functions locate things in strings. If the first +argument to position is a string, then position(s,t,i) finds the +location of s as a substring of t starting the search at position i. + + n := position("nd", "underground", 1) + 2 + Type: PositiveInteger + + n := position("nd", "underground", n+1) + 10 + Type: PositiveInteger + +If s is not found, then 0 is returned (minIndex(s)-1 in IndexedString). + + n := position("nd", "underground", n+1) + 0 + Type: NonNegativeInteger + +To search for a specific character or a member of a character class, +a different first argument is used. + + position(char "d", "underground", 1) + 3 + Type: PositiveInteger + + position(hexDigit(), "underground", 1) + 3 + Type: PositiveInteger + +See Also: +o )help Character +o )help CharacterClass +o )show String +o $AXIOM/doc/src/algebra/string.spad.dvi + +@ <>= )abbrev domain STRING String ++ Description: diff --git a/src/algebra/symbol.spad.pamphlet b/src/algebra/symbol.spad.pamphlet index 96382e7..69de307 100644 --- a/src/algebra/symbol.spad.pamphlet +++ b/src/algebra/symbol.spad.pamphlet @@ -10,6 +10,387 @@ \tableofcontents \eject \section{domain SYMBOL Symbol} +<>= +-- symbol.spad.pamphlet Symbol.input +)spool Symbol.output +)set message test on +)set message auto off +)clear all +--S 1 of 24 +X: Symbol := 'x +--R +--R +--R (1) x +--R Type: Symbol +--E 1 + +--S 2 of 24 +XX: Symbol := x +--R +--R +--R (2) x +--R Type: Symbol +--E 2 + +--S 3 of 24 +A := 'a +--R +--R +--R (3) a +--R Type: Variable a +--E 3 + +--S 4 of 24 +B := b +--R +--R +--R (4) b +--R Type: Variable b +--E 4 + +--S 5 of 24 +x**2 + 1 +--R +--R +--R 2 +--R (5) x + 1 +--R Type: Polynomial Integer +--E 5 + +--S 6 of 24 +"Hello"::Symbol +--R +--R +--R (6) Hello +--R Type: Symbol +--E 6 + +--S 7 of 24 +new()$Symbol +--R +--R +--R (7) %A +--R Type: Symbol +--E 7 + +--S 8 of 24 +new()$Symbol +--R +--R +--R (8) %B +--R Type: Symbol +--E 8 + +--S 9 of 24 +new("xyz")$Symbol +--R +--R +--R (9) %xyz0 +--R Type: Symbol +--E 9 + +--S 10 of 24 +X[i,j] +--R +--R +--R (10) x +--R i,j +--R Type: Symbol +--E 10 + +--S 11 of 24 +U := subscript(u, [1,2,1,2]) +--R +--R +--R (11) u +--R 1,2,1,2 +--R Type: Symbol +--E 11 + +--S 12 of 24 +V := superscript(v, [n]) +--R +--R +--R n +--R (12) v +--R Type: Symbol +--E 12 + +--S 13 of 24 +P := argscript(p, [t]) +--R +--R +--R (13) p(t) +--R Type: Symbol +--E 13 + +--S 14 of 24 +scripted? U +--R +--R +--R (14) true +--R Type: Boolean +--E 14 + +--S 15 of 24 +scripted? X +--R +--R +--R (15) false +--R Type: Boolean +--E 15 + +--S 16 of 24 +string X +--R +--R +--R (16) "x" +--R Type: String +--E 16 + +--S 17 of 24 +name U +--R +--R +--R (17) u +--R Type: Symbol +--E 17 + +--S 18 of 24 +scripts U +--R +--R +--R (18) [sub= [1,2,1,2],sup= [],presup= [],presub= [],args= []] +--RType: Record(sub: List OutputForm,sup: List OutputForm,presup: List OutputForm,presub: List OutputForm,args: List OutputForm) +--E 18 + +--S 19 of 24 +name X +--R +--R +--R (19) x +--R Type: Symbol +--E 19 + +--S 20 of 24 +scripts X +--R +--R +--R (20) [sub= [],sup= [],presup= [],presub= [],args= []] +--RType: Record(sub: List OutputForm,sup: List OutputForm,presup: List OutputForm,presub: List OutputForm,args: List OutputForm) +--E 20 + +--S 21 of 24 +M := script(Mammoth, [ [i,j],[k,l],[0,1],[2],[u,v,w] ]) +--R +--R +--R 0,1 k,l +--R (21) Mammoth (u,v,w) +--R 2 i,j +--R Type: Symbol +--E 21 + +--S 22 of 24 +scripts M +--R +--R +--R (22) [sub= [i,j],sup= [k,l],presup= [0,1],presub= [2],args= [u,v,w]] +--RType: Record(sub: List OutputForm,sup: List OutputForm,presup: List OutputForm,presub: List OutputForm,args: List OutputForm) +--E 22 + +--S 23 of 24 +N := script(Nut, [ [i,j],[k,l],[0,1] ]) +--R +--R +--R 0,1 k,l +--R (23) Nut +--R i,j +--R Type: Symbol +--E 23 + +--S 24 of 24 +scripts N +--R +--R +--R (24) [sub= [i,j],sup= [k,l],presup= [0,1],presub= [],args= []] +--RType: Record(sub: List OutputForm,sup: List OutputForm,presup: List OutputForm,presub: List OutputForm,args: List OutputForm) +--E 24 +)spool +)lisp (bye) +@ +<>= +==================================================================== +Symbol examples +==================================================================== + +Symbols are one of the basic types manipulated by Axiom. The +Symbol domain provides ways to create symbols of many varieties. + +The simplest way to create a symbol is to "single quote" an identifier. + + X: Symbol := 'x + x + Type: Symbol + +This gives the symbol even if x has been assigned a value. If x has +not been assigned a value, then it is possible to omit the quote. + + XX: Symbol := x + x + Type: Symbol + +Declarations must be used when working with symbols, because otherwise +the interpreter tries to place values in a more specialized type Variable. + + A := 'a + a + Type: Variable a + + B := b + b + Type: Variable b + +The normal way of entering polynomials uses this fact. + + x**2 + 1 + 2 + x + 1 + Type: Polynomial Integer + +Another convenient way to create symbols is to convert a string. +This is useful when the name is to be constructed by a program. + + "Hello"::Symbol + Hello + Type: Symbol + +Sometimes it is necessary to generate new unique symbols, for example, +to name constants of integration. The expression new() generates a +symbol starting with %. + + new()$Symbol + %A + Type: Symbol + +Successive calls to new produce different symbols. + + new()$Symbol + %B + Type: Symbol + +The expression new("s") produces a symbol starting with %s. + + new("xyz")$Symbol + %xyz0 + Type: Symbol + +A symbol can be adorned in various ways. The most basic thing is +applying a symbol to a list of subscripts. + + X[i,j] + x + i,j + Type: Symbol + +Somewhat less pretty is to attach subscripts, superscripts or arguments. + + U := subscript(u, [1,2,1,2]) + u + 1,2,1,2 + Type: Symbol + + V := superscript(v, [n]) + n + v + Type: Symbol + + P := argscript(p, [t]) + p(t) + Type: Symbol + +It is possible to test whether a symbol has scripts using the scripted? test. + + scripted? U + true + Type: Boolean + + scripted? X + false + Type: Boolean + +If a symbol is not scripted, then it may be converted to a string. + + string X + "x" + Type: String + +The basic parts can always be extracted using the name and scripts operations. + + name U + u + Type: Symbol + + scripts U + [sub= [1,2,1,2],sup= [],presup= [],presub= [],args= []] + Type: Record(sub: List OutputForm, + sup: List OutputForm, + presup: List OutputForm, + presub: List OutputForm, + args: List OutputForm) + + name X + x + Type: Symbol + + scripts X + [sub= [],sup= [],presup= [],presub= [],args= []] + Type: Record(sub: List OutputForm, + sup: List OutputForm, + presup: List OutputForm, + presub: List OutputForm, + args: List OutputForm) + +The most general form is obtained using the script operation. This +operation takes an argument which is a list containing, in this order, +lists of subscripts, superscripts, presuperscripts, presubscripts and +arguments to a symbol. + + M := script(Mammoth, [ [i,j],[k,l],[0,1],[2],[u,v,w] ]) + 0,1 k,l + Mammoth (u,v,w) + 2 i,j + Type: Symbol + + scripts M + [sub= [i,j],sup= [k,l],presup= [0,1],presub= [2],args= [u,v,w]] + Type: Record(sub: List OutputForm, + sup: List OutputForm, + presup: List OutputForm, + presub: List OutputForm, + args: List OutputForm) + +If trailing lists of scripts are omitted, they are assumed to be empty. + + N := script(Nut, [ [i,j],[k,l],[0,1] ]) + 0,1 k,l + Nut + i,j + Type: Symbol + + scripts N + [sub= [i,j],sup= [k,l],presup= [0,1],presub= [],args= []] + Type: Record(sub: List OutputForm, + sup: List OutputForm, + presup: List OutputForm, + presub: List OutputForm, + args: List OutputForm) + + +See Also: +o )show Symbol +o $AXIOM/doc/src/algebra/symbol.spad.dvi + +@ <>= )abbrev domain SYMBOL Symbol ++ Author: Stephen Watt diff --git a/src/algebra/table.spad.pamphlet b/src/algebra/table.spad.pamphlet index 11a0c2c..651950a 100644 --- a/src/algebra/table.spad.pamphlet +++ b/src/algebra/table.spad.pamphlet @@ -86,6 +86,307 @@ InnerTable(Key: SetCategory, Entry: SetCategory, addDom):Exports == Implementati @ \section{domain TABLE Table} +<>= +-- table.spad.pamphlet Table.input +)spool Table.output +)set message test on +)set message auto off +)clear all +--S 1 of 18 +t: Table(Polynomial Integer, String) := table() +--R +--R +--R (1) table() +--R Type: Table(Polynomial Integer,String) +--E 1 + +--S 2 of 18 +setelt(t, x**2 - 1, "Easy to factor") +--R +--R +--R (2) "Easy to factor" +--R Type: String +--E 2 + +--S 3 of 18 +t(x**3 + 1) := "Harder to factor" +--R +--R +--R (3) "Harder to factor" +--R Type: String +--E 3 + +--S 4 of 18 +t(x) := "The easiest to factor" +--R +--R +--R (4) "The easiest to factor" +--R Type: String +--E 4 + +--S 5 of 18 +elt(t, x) +--R +--R +--R (5) "The easiest to factor" +--R Type: String +--E 5 + +--S 6 of 18 +t.x +--R +--R +--R (6) "The easiest to factor" +--R Type: String +--E 6 + +--S 7 of 18 +t x +--R +--R +--R (7) "The easiest to factor" +--R Type: String +--E 7 + +--S 8 of 18 +t.(x**2 - 1) +--R +--R +--R (8) "Easy to factor" +--R Type: String +--E 8 + +--S 9 of 18 +t (x**3 + 1) +--R +--R +--R (9) "Harder to factor" +--R Type: String +--E 9 + +--S 10 of 18 +keys t +--R +--R +--R 3 2 +--R (10) [x,x + 1,x - 1] +--R Type: List Polynomial Integer +--E 10 + +--S 11 of 18 +search(x, t) +--R +--R +--R (11) "The easiest to factor" +--R Type: Union(String,...) +--E 11 + +--S 12 of 18 +search(x**2, t) +--R +--R +--R (12) "failed" +--R Type: Union("failed",...) +--E 12 + +--S 13 of 18 +search(x**2, t) case "failed" +--R +--R +--R (13) true +--R Type: Boolean +--E 13 + +--S 14 of 18 +remove!(x**2-1, t) +--R +--R +--R (14) "Easy to factor" +--R Type: Union(String,...) +--E 14 + +--S 15 of 18 +remove!(x-1, t) +--R +--R +--R (15) "failed" +--R Type: Union("failed",...) +--E 15 + +--S 16 of 18 +#t +--R +--R +--R (16) 2 +--R Type: PositiveInteger +--E 16 + +--S 17 of 18 +members t +--R +--R +--R (17) ["The easiest to factor","Harder to factor"] +--R Type: List String +--E 17 + +--S 18 of 18 +count(s: String +-> prefix?("Hard", s), t) +--R +--R +--R (18) 1 +--R Type: PositiveInteger +--E 18 +)spool +)lisp (bye) +@ +<>= +==================================================================== +Table examples +==================================================================== + +The Table constructor provides a general structure for associative +storage. This type provides hash tables in which data objects can be +saved according to keys of any type. For a given table, specific +types must be chosen for the keys and entries. + +In this example the keys to the table are polynomials with integer +coefficients. The entries in the table are strings. + + t: Table(Polynomial Integer, String) := table() + table() + Type: Table(Polynomial Integer,String) + +To save an entry in the table, the setelt operation is used. This can +be called directly, giving the table a key and an entry. + + setelt(t, x**2 - 1, "Easy to factor") + "Easy to factor" + Type: String + +Alternatively, you can use assignment syntax. + + t(x**3 + 1) := "Harder to factor" + "Harder to factor" + Type: String + + t(x) := "The easiest to factor" + "The easiest to factor" + Type: String + +Entries are retrieved from the table by calling the elt operation. + + elt(t, x) + "The easiest to factor" + Type: String + +This operation is called when a table is "applied" to a key using this +or the following syntax. + + t.x + "The easiest to factor" + Type: String + + t x + "The easiest to factor" + Type: String + +Parentheses are used only for grouping. They are needed if the key is +an infixed expression. + + t.(x**2 - 1) + "Easy to factor" + Type: String + +Note that the elt operation is used only when the key is known to be +in the table, otherwise an error is generated. + + t (x**3 + 1) + "Harder to factor" + Type: String + +You can get a list of all the keys to a table using the keys operation. + + keys t + 3 2 + [x,x + 1,x - 1] + Type: List Polynomial Integer + +If you wish to test whether a key is in a table, the search operation +is used. This operation returns either an entry or "failed". + + search(x, t) + "The easiest to factor" + Type: Union(String,...) + + search(x**2, t) + "failed" + Type: Union("failed",...) + +The return type is a union so the success of the search can be tested +using case. + + search(x**2, t) case "failed" + true + Type: Boolean + +The remove operation is used to delete values from a table. + + remove!(x**2-1, t) + "Easy to factor" + Type: Union(String,...) + +If an entry exists under the key, then it is returned. Otherwise +remove returns "failed". + + remove!(x-1, t) + "failed" + Type: Union("failed",...) + +The number of key-entry pairs can be found using the # operation. + + #t + 2 + Type: PositiveInteger + +Just as keys returns a list of keys to the table, a list of all the +entries can be obtained using the members operation. + + members t + (17) ["The easiest to factor","Harder to factor"] + Type: List String + +A number of useful operations take functions and map them on to the +table to compute the result. Here we count the entries which have +"Hard" as a prefix. + + count(s: String +-> prefix?("Hard", s), t) + 1 + Type: PositiveInteger + +Other table types are provided to support various needs. + o AssociationList gives a list with a table view. This allows new + entries to be appended onto the front of the list to cover up old + entries. This is useful when table entries need to be stacked or when + frequent list traversals are required. + o EqTable gives tables in which keys are considered equal only when + they are in fact the same instance of a structure. + o StringTable should be used when the keys are known to be strings. + o SparseTable provides tables with default entries, so lookup never fails. + The GeneralSparseTable constructor can be used to make any table type + behave this way. + o KeyedAccessFile allows values to be saved in a file, accessed as a table. + +See Also: +o )help AssociationList +o )help EqTable +o )help StringTable +o )help SparseTable +o )help GeneralSparseTable +o )help KeyedAccessFile +o )show Table +o $AXIOM/doc/src/algebra/table.spad.dvi + +@ <>= )abbrev domain TABLE Table ++ Author: Stephen M. Watt, Barry Trager @@ -239,6 +540,78 @@ EqTable(Key: SetCategory, Entry: SetCategory) == @ \section{domain STRTBL StringTable} +<>= +-- table.spad.pamphlet StringTable.input +)spool StringTable.output +)set message test on +)set message auto off +)clear all +--S 1 of 3 +t: StringTable(Integer) := table() +--R +--R +--R (1) table() +--R Type: StringTable Integer +--E 1 + +--S 2 of 3 +for s in split("My name is Ian Watt.",char " ") + repeat + t.s := #s +--R +--R Type: Void +--E 2 + +--S 3 of 3 +for key in keys t repeat output [key, t.key] +--R +--R ["Watt.",5] +--R ["Ian",3] +--R ["is",2] +--R ["name",4] +--R ["My",2] +--R Type: Void +--E 3 +)spool +)lisp (bye) +@ +<>= +==================================================================== +StringTable examples +==================================================================== + +This domain provides a table type in which the keys are known to be strings +so special techniques can be used. Other than performance, the type +StringTable(S) should behave exactly the same way as Table(String,S). + +This creates a new table whose keys are strings. + + t: StringTable(Integer) := table() + table() + Type: StringTable Integer + +The value associated with each string key is the number of characters +in the string. + +for s in split("My name is Ian Watt.",char " ") + repeat + t.s := #s + Type: Void + + for key in keys t repeat output [key, t.key] + ["Watt.",5] + ["Ian",3] + ["is",2] + ["name",4] + ["My",2] + Type: Void + +See Also: +o )help Table +o )show StringTable +o $AXIOM/doc/src/algebra/table.spad.dvi + +@ <>= )abbrev domain STRTBL StringTable ++ Author: Stephen M. Watt @@ -380,6 +753,128 @@ GeneralSparseTable(Key, Entry, Tbl, dent): TableAggregate(Key, Entry) == Impl @ \section{domain STBL SparseTable} +<>= +-- table.spad.pamphlet SparseTable.input +)spool SparseTable.output +)set message test on +)set message auto off +)clear all +--S 1 of 7 +t: SparseTable(Integer, String, "Try again!") := table() +--R +--R +--R (1) table() +--R Type: SparseTable(Integer,String,Try again!) +--E 1 + +--S 2 of 7 +t.3 := "Number three" +--R +--R +--R (2) "Number three" +--R Type: String +--E 2 + +--S 3 of 7 +t.4 := "Number four" +--R +--R +--R (3) "Number four" +--R Type: String +--E 3 + +--S 4 of 7 +t.3 +--R +--R +--R (4) "Number three" +--R Type: String +--E 4 + +--S 5 of 7 +t.2 +--R +--R +--R (5) "Try again!" +--R Type: String +--E 5 + +--S 6 of 7 +keys t +--R +--R +--R (6) [4,3] +--R Type: List Integer +--E 6 + +--S 7 of 7 +entries t +--R +--R +--R (7) ["Number four","Number three"] +--R Type: List String +--E 7 +)spool +)lisp (bye) +@ +<>= +==================================================================== +SparseTable examples +==================================================================== + +The SparseTable domain provides a general purpose table type with +default entries. + +Here we create a table to save strings under integer keys. The value +"Try again!" is returned if no other value has been stored for a key. + + t: SparseTable(Integer, String, "Try again!") := table() + table() + Type: SparseTable(Integer,String,Try again!) + +Entries can be stored in the table. + + t.3 := "Number three" + "Number three" + Type: String + + t.4 := "Number four" + "Number four" + Type: String + +These values can be retrieved as usual, but if a look up fails the +default entry will be returned. + + t.3 + "Number three" + Type: String + + t.2 + "Try again!" + Type: String + +To see which values are explicitly stored, the keys and entries +functions can be used. + + keys t + [4,3] + Type: List Integer + + entries t + ["Number four","Number three"] + Type: List String + +If a specific table representation is required, the GeneralSparseTable +constructor should be used. The domain SparseTable(K, E, dflt)} is +equivalent to GeneralSparseTable(K,E,Table(K,E), dflt). + +See Also: +o )help Table +o )help GeneralSparseTable +o )show SparseTable +o $AXIOM/doc/src/algebra/table.spad.dvi + +@ <>= )abbrev domain STBL SparseTable ++ Author: Stephen M. Watt diff --git a/src/algebra/triset.spad.pamphlet b/src/algebra/triset.spad.pamphlet index 2832762..7d51c02 100644 --- a/src/algebra/triset.spad.pamphlet +++ b/src/algebra/triset.spad.pamphlet @@ -1448,6 +1448,316 @@ PolynomialSetUtilitiesPackage (R,E,V,P) : Exports == Implementation where @ \section{domain WUTSET WuWenTsunTriangularSet} +<>= +-- triset.spad.pamphlet WuWenTsunTriangularSet.input +)spool WuWenTsunTriangularSet.output +)set message test on +)set message auto off +)clear all +--S 1 of 16 +R := Integer +--R +--R +--R (1) Integer +--R Type: Domain +--E 1 + +--S 2 of 16 +ls : List Symbol := [x,y,z,t] +--R +--R +--R (2) [x,y,z,t] +--R Type: List Symbol +--E 2 + +--S 3 of 16 +V := OVAR(ls) +--R +--R +--R (3) OrderedVariableList [x,y,z,t] +--R Type: Domain +--E 3 + +--S 4 of 16 +E := IndexedExponents V +--R +--R +--R (4) IndexedExponents OrderedVariableList [x,y,z,t] +--R Type: Domain +--E 4 + +--S 5 of 16 +P := NSMP(R, V) +--R +--R +--R (5) NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t]) +--R Type: Domain +--E 5 + +--S 6 of 16 +x: P := 'x +--R +--R +--R (6) x +--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t]) +--E 6 + +--S 7 of 16 +y: P := 'y +--R +--R +--R (7) y +--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t]) +--E 7 + +--S 8 of 16 +z: P := 'z +--R +--R +--R (8) z +--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t]) +--E 8 + +--S 9 of 16 +t: P := 't +--R +--R +--R (9) t +--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t]) +--E 9 + +--S 10 of 16 +T := WUTSET(R,E,V,P) +--R +--R +--R (10) +--R WuWenTsunTriangularSet(Integer,IndexedExponents OrderedVariableList [x,y,z,t] +--R ,OrderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Integer,Ordere +--R dVariableList [x,y,z,t])) +--R Type: Domain +--E 10 + +--S 11 of 16 +p1 := x ** 31 - x ** 6 - x - y +--R +--R +--R 31 6 +--R (11) x - x - x - y +--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t]) +--E 11 + +--S 12 of 16 +p2 := x ** 8 - z +--R +--R +--R 8 +--R (12) x - z +--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t]) +--E 12 + +--S 13 of 16 +p3 := x ** 10 - t +--R +--R +--R 10 +--R (13) x - t +--R Type: NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t]) +--E 13 + +--S 14 of 16 +lp := [p1, p2, p3] +--R +--R +--R 31 6 8 10 +--R (14) [x - x - x - y,x - z,x - t] +--RType: List NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t]) +--E 14 + +--S 15 of 16 +characteristicSet(lp)$T +--R +--R +--R (15) +--R 5 4 4 2 2 3 4 7 4 6 6 3 3 3 3 +--R {z - t ,t z y + 2t z y + (- t + 2t - t)z + t z,(t - 1)z x - z y - t } +--RType: Union(WuWenTsunTriangularSet(Integer,IndexedExponents OrderedVariableList [x,y,z,t],OrderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])),...) +--E 15 + +--S 16 of 16 +zeroSetSplit(lp)$T +--R +--R +--R (16) +--R 3 5 4 3 3 2 +--R [{t,z,y,x}, {t - 1,z - t ,z y + t ,z x - t}, +--R 5 4 4 2 2 3 4 7 4 6 6 3 3 3 3 +--R {z - t ,t z y + 2t z y + (- t + 2t - t)z + t z,(t - 1)z x - z y - t }] +--RType: List WuWenTsunTriangularSet(Integer,IndexedExponents OrderedVariableList [x,y,z,t],OrderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t])) +--E 16 +)spool +)lisp (bye) +@ +<>= +==================================================================== +WuWenTsunTriangularSet examples +==================================================================== + +The WuWenTsunTriangularSet domain constructor implements the +characteristic set method of Wu Wen Tsun. This algorithm computes a +list of triangular sets from a list of polynomials such that the +algebraic variety defined by the given list of polynomials decomposes +into the union of the regular-zero sets of the computed triangular +sets. The constructor takes four arguments. The first one, R, is the +coefficient ring of the polynomials; it must belong to the category +IntegralDomain. The second one, E, is the exponent monoid of the +polynomials; it must belong to the category OrderedAbelianMonoidSup. +The third one, V, is the ordered set of variables; it must belong to +the category OrderedSet. The last one is the polynomial ring; it must +belong to the category RecursivePolynomialCategory(R,E,V). The +abbreviation for WuWenTsunTriangularSet is WUTSET. + +Let us illustrate the facilities by an example. + +Define the coefficient ring. + + R := Integer + Integer + Type: Domain + +Define the list of variables, + + ls : List Symbol := [x,y,z,t] + [x,y,z,t] + Type: List Symbol + +and make it an ordered set; + + V := OVAR(ls) + OrderedVariableList [x,y,z,t] + Type: Domain + +then define the exponent monoid. + + E := IndexedExponents V + IndexedExponents OrderedVariableList [x,y,z,t] + Type: Domain + +Define the polynomial ring. + + P := NSMP(R, V) + NewSparseMultivariatePolynomial(Integer,OrderedVariableList [x,y,z,t]) + Type: Domain + +Let the variables be polynomial. + + x: P := 'x + x + Type: NewSparseMultivariatePolynomial(Integer, + OrderedVariableList [x,y,z,t]) + + y: P := 'y + y + Type: NewSparseMultivariatePolynomial(Integer, + OrderedVariableList [x,y,z,t]) + + z: P := 'z + z + Type: NewSparseMultivariatePolynomial(Integer, + OrderedVariableList [x,y,z,t]) + + t: P := 't + t + Type: NewSparseMultivariatePolynomial(Integer, + OrderedVariableList [x,y,z,t]) + +Now call the WuWenTsunTriangularSet domain constructor. + + T := WUTSET(R,E,V,P) + WuWenTsunTriangularSet(Integer,IndexedExponents OrderedVariableList [x,y,z,t] + ,OrderedVariableList [x,y,z,t],NewSparseMultivariatePolynomial(Integer,Ordere + dVariableList [x,y,z,t])) + Type: Domain + +Define a polynomial system. + + p1 := x ** 31 - x ** 6 - x - y + 31 6 + x - x - x - y + Type: NewSparseMultivariatePolynomial(Integer, + OrderedVariableList [x,y,z,t]) + + p2 := x ** 8 - z + 8 + x - z + Type: NewSparseMultivariatePolynomial(Integer, + OrderedVariableList [x,y,z,t]) + + p3 := x ** 10 - t + 10 + x - t + Type: NewSparseMultivariatePolynomial(Integer, + OrderedVariableList [x,y,z,t]) + + lp := [p1, p2, p3] + 31 6 8 10 + [x - x - x - y,x - z,x - t] + Type: List NewSparseMultivariatePolynomial(Integer, + OrderedVariableList [x,y,z,t]) + +Compute a characteristic set of the system. + + characteristicSet(lp)$T + 5 4 4 2 2 3 4 7 4 6 6 3 3 3 3 + {z - t ,t z y + 2t z y + (- t + 2t - t)z + t z,(t - 1)z x - z y - t } + Type: Union(WuWenTsunTriangularSet(Integer, + IndexedExponents OrderedVariableList [x,y,z,t], + OrderedVariableList [x,y,z,t], + NewSparseMultivariatePolynomial(Integer, + OrderedVariableList [x,y,z,t])),...) + +Solve the system. + + zeroSetSplit(lp)$T + 3 5 4 3 3 2 + [{t,z,y,x}, {t - 1,z - t ,z y + t ,z x - t}, + 5 4 4 2 2 3 4 7 4 6 6 3 3 3 3 + {z - t ,t z y + 2t z y + (- t + 2t - t)z + t z,(t - 1)z x - z y - t }] + Type: List WuWenTsunTriangularSet(Integer, + IndexedExponents OrderedVariableList [x,y,z,t], + OrderedVariableList [x,y,z,t], + NewSparseMultivariatePolynomial(Integer, + OrderedVariableList [x,y,z,t])) + +The RegularTriangularSet and SquareFreeRegularTriangularSet domain +constructors, the LazardSetSolvingPackage package constructors as well as, +SquareFreeRegularTriangularSet and ZeroDimensionalSolvePackage package +constructors also provide operations to compute triangular decompositions +of algebraic varieties. These five constructor use a special kind of +characteristic sets, called regular triangular sets. These special +characteristic sets have better properties than the general ones. +Regular triangular sets and their related concepts are presented in +the paper "On the Theories of Triangular sets" By P. Aubry, D. Lazard +and M. Moreno Maza (to appear in the Journal of Symbolic Computation). +The decomposition algorithm (due to the third author) available in the +four above constructors provide generally better timings than the +characteristic set method. In fact, the WUTSET constructor +remains interesting for the purpose of manipulating characteristic +sets whereas the other constructors are more convenient for solving +polynomial systems. + +Note that the way of understanding triangular decompositions is detailed +in the example of the RegularTriangularSet constructor. + +See Also: +o )help RecursivePolynomialCategory +o )help RegularTriangularSet +o )help SquareFreeRegularTriangularSet +o )help LazardSetSolvingPackage +o )help ZeroDimensionalSolvePackage +o )show WuWenTsunTriangularSet +o $AXIOM/doc/src/algebra/triset.spad.dvi + +@ <>= )abbrev domain WUTSET WuWenTsunTriangularSet ++ Author: Marc Moreno Maza (marc@nag.co.uk) diff --git a/src/algebra/vector.spad.pamphlet b/src/algebra/vector.spad.pamphlet index 0406479..9656917 100644 --- a/src/algebra/vector.spad.pamphlet +++ b/src/algebra/vector.spad.pamphlet @@ -124,6 +124,200 @@ IndexedVector(R:Type, mn:Integer): @ \section{domain VECTOR Vector} +<>= +-- vector.spad.pamphlet Vector.input +)spool Vector.output +)set message test on +)set message auto off +)clear all +--S 1 of 11 +u : VECTOR INT := new(5,12) +--R +--R +--R (1) [12,12,12,12,12] +--R Type: Vector Integer +--E 1 + +--S 2 of 11 +v : VECTOR INT := vector([1,2,3,4,5]) +--R +--R +--R (2) [1,2,3,4,5] +--R Type: Vector Integer +--E 2 + +--S 3 of 11 +#(v) +--R +--R +--R (3) 5 +--R Type: PositiveInteger +--E 3 + +--S 4 of 11 +v.2 +--R +--R +--R (4) 2 +--R Type: PositiveInteger +--E 4 + +--S 5 of 11 +v.3 := 99 +--R +--R +--R (5) 99 +--R Type: PositiveInteger +--E 5 + +--S 6 of 11 +v +--R +--R +--R (6) [1,2,99,4,5] +--R Type: Vector Integer +--E 6 + +--S 7 of 11 +5 * v +--R +--R +--R (7) [5,10,495,20,25] +--R Type: Vector Integer +--E 7 + +--S 8 of 11 +v * 7 +--R +--R +--R (8) [7,14,693,28,35] +--R Type: Vector Integer +--E 8 + +--S 9 of 11 +w : VECTOR INT := vector([2,3,4,5,6]) +--R +--R +--R (9) [2,3,4,5,6] +--R Type: Vector Integer +--E 9 + +--S 10 of 11 +v + w +--R +--R +--R (10) [3,5,103,9,11] +--R Type: Vector Integer +--E 10 + +--S 11 of 11 +v - w +--R +--R +--R (11) [- 1,- 1,95,- 1,- 1] +--R Type: Vector Integer +--E 11 +)spool +)lisp (bye) +@ +<>= +==================================================================== +Vector examples +==================================================================== + +The Vector domain is used for storing data in a one-dimensional +indexed data structure. A vector is a homogeneous data structure in +that all the components of the vector must belong to the same Axiom +domain. Each vector has a fixed length specified by the user; vectors +are not extensible. This domain is similar to the OneDimensionalArray +domain, except that when the components of a Vector belong to a Ring, +arithmetic operations are provided. + +As with the OneDimensionalArray domain, a Vector can be created by +calling the operation new, its components can be accessed by calling +the operations elt and qelt, and its components can be reset by +calling the operations setelt and qsetelt. + +This creates a vector of integers of length 5 all of whose components are 12. + + u : VECTOR INT := new(5,12) + [12,12,12,12,12] + Type: Vector Integer + +This is how you create a vector from a list of its components. + + v : VECTOR INT := vector([1,2,3,4,5]) + [1,2,3,4,5] + Type: Vector Integer + +Indexing for vectors begins at 1. The last element has index equal to +the length of the vector, which is computed by #. + + #(v) + 5 + Type: PositiveInteger + +This is the standard way to use elt to extract an element. +Functionally, it is the same as if you had typed elt(v,2). + + v.2 + 2 + Type: PositiveInteger + +This is the standard way to use setelt to change an element. It is +the same as if you had typed setelt(v,3,99). + + v.3 := 99 + 99 + Type: PositiveInteger + +Now look at v to see the change. You can use qelt and qsetelt +(instead of elt and setelt, respectively) but only when you know that +the index is within the valid range. + + v + [1,2,99,4,5] + Type: Vector Integer + +When the components belong to a Ring, Axiom provides arithmetic +operations for Vector. These include left and right scalar multiplication. + + 5 * v + [5,10,495,20,25] + Type: Vector Integer + + v * 7 + [7,14,693,28,35] + Type: Vector Integer + + w : VECTOR INT := vector([2,3,4,5,6]) + [2,3,4,5,6] + Type: Vector Integer + +Addition and subtraction are also available. + + v + w + [3,5,103,9,11] + Type: Vector Integer + +Of course, when adding or subtracting, the two vectors must have the same +length or an error message is displayed. + + v - w + [- 1,- 1,95,- 1,- 1] + Type: Vector Integer + +See Also: +o )help List +o )help Matrix +o )help OneDimensionalArray +o )help Set +o )help Table +o )help TwoDimensionalArray +o )show Vector +o $AXIOM/doc/src/algebra/vector.spad.dvi + +@ <>= )abbrev domain VECTOR Vector ++ Author: diff --git a/src/algebra/void.spad.pamphlet b/src/algebra/void.spad.pamphlet index 314b9a4..200d924 100644 --- a/src/algebra/void.spad.pamphlet +++ b/src/algebra/void.spad.pamphlet @@ -10,6 +10,101 @@ \tableofcontents \eject \section{domain VOID Void} +<>= +-- void.spad.pamphlet Void.input +)spool Void.output +)set message test on +)set message auto off +)clear all +--S 1 +r := (a; b; if c then d else e; f) +--R +--R +--RDaly Bug +--R An expression following if/when must evaluate to a Boolean and you +--R have written one that does not. +--E 1 + +--S 2 +a : Integer +--R +--R Type: Void +--E 2 + +)set message void on + +--S 3 +b : Fraction Integer +--R +--R +--R (2) "()" +--R Type: Void +--E 3 + +)set message void off + +--S 4 +3::Void +--R +--R Type: Void +--E 4 + +--S 5 +% :: PositiveInteger +--R +--R +--RDaly Bug +--R Cannot convert from type Void to PositiveInteger for value +--R "()" +--R +--E 5 +)spool +)lisp (bye) +@ +<>= +==================================================================== +Void examples +==================================================================== + +When an expression is not in a value context, it is given type Void. +For example, in the expression + + r := (a; b; if c then d else e; f) + +values are used only from the subexpressions c and f: all others are thrown +away. The subexpressions a, b, d and e are evaluated for side-effects only +and have type Void. There is a unique value of type Void. + +You will most often see results of type Void when you declare a variable. + + a : Integer + Type: Void + +Usually no output is displayed for Void results. You can force the +display of a rather ugly object by issuing + + )set message void on + + b : Fraction Integer + Type: Void + + )set message void off + +All values can be converted to type Void. + + 3::Void + Type: Void + +Once a value has been converted to Void, it cannot be recovered. + + % :: PositiveInteger + Cannot convert from type Void to PositiveInteger for value "()" + +See Also: +o )show Void +o $AXIOM/doc/src/algebra/void.spad.dvi + +@ <>= )abbrev domain VOID Void -- These types act as the top and bottom of the type lattice diff --git a/src/algebra/xlpoly.spad.pamphlet b/src/algebra/xlpoly.spad.pamphlet index 8faf7cb..44358c0 100644 --- a/src/algebra/xlpoly.spad.pamphlet +++ b/src/algebra/xlpoly.spad.pamphlet @@ -1827,6 +1827,844 @@ PoincareBirkhoffWittLyndonBasis(VarSet: OrderedSet): Public == Private where @ \section{domain XPBWPOLY XPBWPolynomial} +<>= +-- xlpoly.spad.pamphlet XPBWPolynomial.input +)spool XPBWPolynomial.output +)set message test on +)set message auto off +)clear all +--S 1 of 39 +a:Symbol := 'a +--R +--R +--R (1) a +--R Type: Symbol +--E 1 + +--S 2 of 39 +b:Symbol := 'b +--R +--R +--R (2) b +--R Type: Symbol +--E 2 + +--S 3 of 39 +RN := Fraction(Integer) +--R +--R +--R (3) Fraction Integer +--R Type: Domain +--E 3 + +--S 4 of 39 +word := OrderedFreeMonoid Symbol +--R +--R +--R (4) OrderedFreeMonoid Symbol +--R Type: Domain +--E 4 + +--S 5 of 39 +lword := LyndonWord(Symbol) +--R +--R +--R (5) LyndonWord Symbol +--R Type: Domain +--E 5 + +--S 6 of 39 +base := PoincareBirkhoffWittLyndonBasis Symbol +--R +--R +--R (6) PoincareBirkhoffWittLyndonBasis Symbol +--R Type: Domain +--E 6 + +--S 7 of 39 +dpoly := XDistributedPolynomial(Symbol, RN) +--R +--R +--R (7) XDistributedPolynomial(Symbol,Fraction Integer) +--R Type: Domain +--E 7 + +--S 8 of 39 +rpoly := XRecursivePolynomial(Symbol, RN) +--R +--R +--R (8) XRecursivePolynomial(Symbol,Fraction Integer) +--R Type: Domain +--E 8 + +--S 9 of 39 +lpoly := LiePolynomial(Symbol, RN) +--R +--R +--R (9) LiePolynomial(Symbol,Fraction Integer) +--R Type: Domain +--E 9 + +--S 10 of 39 +poly := XPBWPolynomial(Symbol, RN) +--R +--R +--R (10) XPBWPolynomial(Symbol,Fraction Integer) +--R Type: Domain +--E 10 + +--S 11 of 39 +liste : List lword := LyndonWordsList([a,b], 6) +--R +--R +--R (11) +--R 2 2 3 2 2 3 4 3 2 +--R [[a], [b], [a b], [a b], [a b ], [a b], [a b ], [a b ], [a b], [a b ], +--R 2 2 3 2 4 5 4 2 3 3 3 +--R [a b a b], [a b ], [a b a b ], [a b ], [a b], [a b ], [a b a b], [a b ], +--R 2 2 2 2 2 4 3 5 +--R [a b a b ], [a b a b], [a b ], [a b a b ], [a b ]] +--R Type: List LyndonWord Symbol +--E 11 + +--S 12 of 39 +0$poly +--R +--R +--R (12) 0 +--R Type: XPBWPolynomial(Symbol,Fraction Integer) +--E 12 + +--S 13 of 39 +1$poly +--R +--R +--R (13) 1 +--R Type: XPBWPolynomial(Symbol,Fraction Integer) +--E 13 + +--S 14 of 39 +p : poly := a +--R +--R +--R (14) [a] +--R Type: XPBWPolynomial(Symbol,Fraction Integer) +--E 14 + +--S 15 of 39 +q : poly := b +--R +--R +--R (15) [b] +--R Type: XPBWPolynomial(Symbol,Fraction Integer) +--E 15 + +--S 16 of 39 +pq: poly := p*q +--R +--R +--R (16) [a b] + [b][a] +--R Type: XPBWPolynomial(Symbol,Fraction Integer) +--E 16 + +--S 17 of 39 +pq :: dpoly +--R +--R +--R (17) a b +--R Type: XDistributedPolynomial(Symbol,Fraction Integer) +--E 17 + +--S 18 of 39 +mirror pq +--R +--R +--R (18) [b][a] +--R Type: XPBWPolynomial(Symbol,Fraction Integer) +--E 18 + +--S 19 of 39 +ListOfTerms pq +--R +--R +--R (19) [[k= [b][a],c= 1],[k= [a b],c= 1]] +--RType: List Record(k: PoincareBirkhoffWittLyndonBasis Symbol,c: Fraction Integer) +--E 19 + +--S 20 of 39 +reductum pq +--R +--R +--R (20) [a b] +--R Type: XPBWPolynomial(Symbol,Fraction Integer) +--E 20 + +--S 21 of 39 +leadingMonomial pq +--R +--R +--R (21) [b][a] +--R Type: PoincareBirkhoffWittLyndonBasis Symbol +--E 21 + +--S 22 of 39 +coefficients pq +--R +--R +--R (22) [1,1] +--R Type: List Fraction Integer +--E 22 + +--S 23 of 39 +leadingTerm pq +--R +--R +--R (23) [k= [b][a],c= 1] +--R Type: Record(k: PoincareBirkhoffWittLyndonBasis Symbol,c: Fraction Integer) +--E 23 + +--S 24 of 39 +degree pq +--R +--R +--R (24) 2 +--R Type: PositiveInteger +--E 24 + +--S 25 of 39 +pq4:=exp(pq,4) +--R +--R +--R (25) +--R 1 1 2 1 2 +--R 1 + [a b] + [b][a] + - [a b][a b] + - [a b ][a] + - [b][a b] +--R 2 2 2 +--R + +--R 3 1 +--R - [b][a b][a] + - [b][b][a][a] +--R 2 2 +--R Type: XPBWPolynomial(Symbol,Fraction Integer) +--E 25 + +--S 26 of 39 +log(pq4,4) - pq +--R +--R +--R (26) 0 +--R Type: XPBWPolynomial(Symbol,Fraction Integer) +--E 26 + +--S 27 of 39 +lp1 :lpoly := LiePoly liste.10 +--R +--R +--R 3 2 +--R (27) [a b ] +--R Type: LiePolynomial(Symbol,Fraction Integer) +--E 27 + +--S 28 of 39 +lp2 :lpoly := LiePoly liste.11 +--R +--R +--R 2 +--R (28) [a b a b] +--R Type: LiePolynomial(Symbol,Fraction Integer) +--E 28 + +--S 29 of 39 +lp :lpoly := [lp1, lp2] +--R +--R +--R 3 2 2 +--R (29) [a b a b a b] +--R Type: LiePolynomial(Symbol,Fraction Integer) +--E 29 + +--S 30 of 39 +lpd1: dpoly := lp1 +--R +--R +--R 3 2 2 2 2 2 2 2 2 3 +--R (30) a b - 2a b a b - a b a + 4a b a b a - a b a - 2b a b a + b a +--R Type: XDistributedPolynomial(Symbol,Fraction Integer) +--E 30 + +--S 31 of 39 +lpd2: dpoly := lp2 +--R +--R +--R (31) +--R 2 2 2 2 2 2 3 2 +--R a b a b - a b a - 3a b a b + 4a b a b a - a b a + 2b a b - 3b a b a +--R + +--R 2 +--R b a b a +--R Type: XDistributedPolynomial(Symbol,Fraction Integer) +--E 31 + +--S 32 of 39 +lpd : dpoly := lpd1 * lpd2 - lpd2 * lpd1 +--R +--R +--R (32) +--R 3 2 2 3 2 2 2 3 2 2 3 2 3 2 2 2 +--R a b a b a b - a b a b a - 3a b a b a b + 4a b a b a b a - a b a b a +--R + +--R 3 3 3 3 3 2 3 3 2 2 3 2 2 2 2 +--R 2a b a b - 3a b a b a + a b a b a - a b a b a b + 3a b a b a b a +--R + +--R 2 2 2 2 2 2 2 2 3 +--R 6a b a b a b a b - 12a b a b a b a b a + 3a b a b a b a - 4a b a b a b +--R + +--R 2 2 2 2 3 3 2 2 4 2 2 2 3 2 2 2 2 +--R 6a b a b a b a - a b a b a + a b a b - 3a b a b a b + 3a b a b a b +--R + +--R 2 2 3 2 2 2 2 2 2 2 2 2 3 +--R - 2a b a b a b + 3a b a b a b a - 3a b a b a b a + a b a b a +--R + +--R 2 3 2 2 2 2 2 2 2 +--R 3a b a b a b - 6a b a b a b a b - 3a b a b a b a + 12a b a b a b a b a +--R + +--R 2 2 2 2 2 2 2 3 3 4 2 +--R - 3a b a b a b a - 6a b a b a b a + 3a b a b a - 4a b a b a b +--R + +--R 3 2 2 3 +--R 12a b a b a b a b - 12a b a b a b a b + 8a b a b a b a b +--R + +--R 2 2 2 3 2 5 2 +--R - 12a b a b a b a b a + 12a b a b a b a b a - 4a b a b a b a + a b a b +--R + +--R 2 4 2 3 2 2 2 3 2 2 2 +--R - 3a b a b a b + 3a b a b a b - 2a b a b a b + 3a b a b a b a +--R + +--R 2 2 2 2 2 2 3 3 3 2 3 2 +--R - 3a b a b a b a + a b a b a - 2b a b a b + 4b a b a b a b +--R + +--R 3 2 2 3 3 2 2 3 2 2 3 3 3 +--R 2b a b a b a - 8b a b a b a b a + 2b a b a b a + 4b a b a b a - 2b a b a +--R + +--R 2 4 2 2 3 2 3 2 2 2 +--R 3b a b a b - 6b a b a b a b - 3b a b a b a + 12b a b a b a b a +--R + +--R 2 2 2 2 2 2 2 2 3 5 2 +--R - 3b a b a b a - 6b a b a b a b a + 3b a b a b a - b a b a b +--R + +--R 4 2 3 2 3 3 2 2 +--R 3b a b a b a + 6b a b a b a b - 12b a b a b a b a + 3b a b a b a +--R + +--R 2 3 2 2 2 2 3 2 5 2 5 2 +--R - 4b a b a b a b + 6b a b a b a b a - b a b a b a + b a b a b - b a b a +--R + +--R 2 4 2 2 4 2 4 2 2 2 3 3 2 3 2 +--R - 3b a b a b + 4b a b a b a - b a b a + 2b a b a b - 3b a b a b a +--R + +--R 2 3 2 +--R b a b a b a +--R Type: XDistributedPolynomial(Symbol,Fraction Integer) +--E 32 + +--S 33 of 39 +lp :: dpoly - lpd +--R +--R +--R (33) 0 +--R Type: XDistributedPolynomial(Symbol,Fraction Integer) +--E 33 + +--S 34 of 39 +p := 3 * lp +--R +--R +--R 3 2 2 +--R (34) 3[a b a b a b] +--R Type: XPBWPolynomial(Symbol,Fraction Integer) +--E 34 + +--S 35 of 39 +q := lp1 +--R +--R +--R 3 2 +--R (35) [a b ] +--R Type: XPBWPolynomial(Symbol,Fraction Integer) +--E 35 + +--S 36 of 39 +pq:= p * q +--R +--R +--R 3 2 2 3 2 +--R (36) 3[a b a b a b][a b ] +--R Type: XPBWPolynomial(Symbol,Fraction Integer) +--E 36 + +--S 37 of 39 +pr:rpoly := p :: rpoly +--R +--R +--R (37) +--R a +--R * +--R a +--R * +--R a b b +--R * +--R a(a b(a b 3 + b a(- 3)) + b(a(a b(- 9) + b a 12) + b a a(- 3))) +--R + +--R b a(a(a b 6 + b a(- 9)) + b a a 3) +--R + +--R b +--R * +--R a b +--R * +--R a +--R * +--R a(a b b(- 3) + b b a 9) +--R + +--R b(a(a b 18 + b a(- 36)) + b a a 9) +--R + +--R b(a a(a b(- 12) + b a 18) + b a a a(- 3)) +--R + +--R b a +--R * +--R a(a(a b b 3 + b a b(- 9)) + b a a b 9) +--R + +--R b(a(a(a b(- 6) + b a 9) + b a a(- 9)) + b a a a 3) +--R + +--R b +--R * +--R a +--R * +--R a b +--R * +--R a +--R * +--R a(a b b 9 + b(a b(- 18) + b a(- 9))) +--R + +--R b(a b a 36 + b a a(- 9)) +--R + +--R b(a b a a(- 18) + b a a a 9) +--R + +--R b a +--R * +--R a(a(a b b(- 12) + b a b 36) + b a a b(- 36)) +--R + +--R b(a(a(a b 24 + b a(- 36)) + b a a 36) + b a a a(- 12)) +--R + +--R b a a +--R * +--R a(a(a b b 3 + b a b(- 9)) + b a a b 9) +--R + +--R b(a(a(a b(- 6) + b a 9) + b a a(- 9)) + b a a a 3) +--R + +--R b +--R * +--R a +--R * +--R a +--R * +--R a b +--R * +--R a +--R * +--R a(a b b(- 6) + b(a b 12 + b a 6)) +--R + +--R b(a b a(- 24) + b a a 6) +--R + +--R b(a b a a 12 + b a a a(- 6)) +--R + +--R b a +--R * +--R a +--R * +--R a(a b b 9 + b(a b(- 18) + b a(- 9))) +--R + +--R b(a b a 36 + b a a(- 9)) +--R + +--R b(a b a a(- 18) + b a a a 9) +--R + +--R b a a +--R * +--R a(a(a b b(- 3) + b b a 9) + b(a(a b 18 + b a(- 36)) + b a a 9)) +--R + +--R b(a a(a b(- 12) + b a 18) + b a a a(- 3)) +--R + +--R b a a a +--R * +--R a(a b(a b 3 + b a(- 3)) + b(a(a b(- 9) + b a 12) + b a a(- 3))) +--R + +--R b a(a(a b 6 + b a(- 9)) + b a a 3) +--R Type: XRecursivePolynomial(Symbol,Fraction Integer) +--E 37 + +--S 38 of 39 +qr:rpoly := q :: rpoly +--R +--R +--R (38) +--R a(a(a b b 1 + b(a b(- 2) + b a(- 1))) + b(a b a 4 + b a a(- 1))) +--R + +--R b(a b a a(- 2) + b a a a 1) +--R Type: XRecursivePolynomial(Symbol,Fraction Integer) +--E 38 + +--S 39 of 39 +pq :: rpoly - pr*qr +--R +--R +--R (39) 0 +--R Type: XRecursivePolynomial(Symbol,Fraction Integer) +--E 39 +)spool +)lisp (bye) +@ +<>= +==================================================================== +XPBWPolynomial examples +==================================================================== + +Initialisations + + a:Symbol := 'a + a + Type: Symbol + + b:Symbol := 'b + b + Type: Symbol + + RN := Fraction(Integer) + Fraction Integer + Type: Domain + + word := OrderedFreeMonoid Symbol + OrderedFreeMonoid Symbol + Type: Domain + + lword := LyndonWord(Symbol) + LyndonWord Symbol + Type: Domain + + base := PoincareBirkhoffWittLyndonBasis Symbol + PoincareBirkhoffWittLyndonBasis Symbol + Type: Domain + + dpoly := XDistributedPolynomial(Symbol, RN) + XDistributedPolynomial(Symbol,Fraction Integer) + Type: Domain + + rpoly := XRecursivePolynomial(Symbol, RN) + XRecursivePolynomial(Symbol,Fraction Integer) + Type: Domain + + lpoly := LiePolynomial(Symbol, RN) + LiePolynomial(Symbol,Fraction Integer) + Type: Domain + + poly := XPBWPolynomial(Symbol, RN) + XPBWPolynomial(Symbol,Fraction Integer) + Type: Domain + + liste : List lword := LyndonWordsList([a,b], 6) + 2 2 3 2 2 3 4 3 2 + [[a], [b], [a b], [a b], [a b ], [a b], [a b ], [a b ], [a b], [a b ], + 2 2 3 2 4 5 4 2 3 3 3 + [a b a b], [a b ], [a b a b ], [a b ], [a b], [a b ], [a b a b], [a b ], + 2 2 2 2 2 4 3 5 + [a b a b ], [a b a b], [a b ], [a b a b ], [a b ]] + Type: List LyndonWord Symbol + +Let's make some polynomials + + 0$poly + 0 + Type: XPBWPolynomial(Symbol,Fraction Integer) + + 1$poly + 1 + Type: XPBWPolynomial(Symbol,Fraction Integer) + + p : poly := a + [a] + Type: XPBWPolynomial(Symbol,Fraction Integer) + + q : poly := b + [b] + Type: XPBWPolynomial(Symbol,Fraction Integer) + + pq: poly := p*q + [a b] + [b][a] + Type: XPBWPolynomial(Symbol,Fraction Integer) + +Coerce to distributed polynomial + + pq :: dpoly + a b + Type: XDistributedPolynomial(Symbol,Fraction Integer) + +Check some polynomial operations + + mirror pq + [b][a] + Type: XPBWPolynomial(Symbol,Fraction Integer) + + ListOfTerms pq + [[k= [b][a],c= 1],[k= [a b],c= 1]] + Type: List Record(k: PoincareBirkhoffWittLyndonBasis Symbol, + c: Fraction Integer) + + reductum pq + [a b] + Type: XPBWPolynomial(Symbol,Fraction Integer) + + leadingMonomial pq + [b][a] + Type: PoincareBirkhoffWittLyndonBasis Symbol + + coefficients pq + [1,1] + Type: List Fraction Integer + + leadingTerm pq + [k= [b][a],c= 1] + Type: Record(k: PoincareBirkhoffWittLyndonBasis Symbol, + c: Fraction Integer) + + degree pq + 2 + Type: PositiveInteger + + pq4:=exp(pq,4) + 1 1 2 1 2 + 1 + [a b] + [b][a] + - [a b][a b] + - [a b ][a] + - [b][a b] + 2 2 2 + + + 3 1 + - [b][a b][a] + - [b][b][a][a] + 2 2 + Type: XPBWPolynomial(Symbol,Fraction Integer) + + log(pq4,4) - pq + (26) 0 + Type: XPBWPolynomial(Symbol,Fraction Integer) + +Calculations with verification in XDistributedPolynomial. + + lp1 :lpoly := LiePoly liste.10 + 3 2 + [a b ] + Type: LiePolynomial(Symbol,Fraction Integer) + + lp2 :lpoly := LiePoly liste.11 + 2 + [a b a b] + Type: LiePolynomial(Symbol,Fraction Integer) + + lp :lpoly := [lp1, lp2] + 3 2 2 + [a b a b a b] + Type: LiePolynomial(Symbol,Fraction Integer) + + lpd1: dpoly := lp1 + 3 2 2 2 2 2 2 2 2 3 + a b - 2a b a b - a b a + 4a b a b a - a b a - 2b a b a + b a + Type: XDistributedPolynomial(Symbol,Fraction Integer) + + lpd2: dpoly := lp2 + 2 2 2 2 2 2 3 2 + a b a b - a b a - 3a b a b + 4a b a b a - a b a + 2b a b - 3b a b a + + + 2 + b a b a + Type: XDistributedPolynomial(Symbol,Fraction Integer) + + lpd : dpoly := lpd1 * lpd2 - lpd2 * lpd1 + 3 2 2 3 2 2 2 3 2 2 3 2 3 2 2 2 + a b a b a b - a b a b a - 3a b a b a b + 4a b a b a b a - a b a b a + + + 3 3 3 3 3 2 3 3 2 2 3 2 2 2 2 + 2a b a b - 3a b a b a + a b a b a - a b a b a b + 3a b a b a b a + + + 2 2 2 2 2 2 2 2 3 + 6a b a b a b a b - 12a b a b a b a b a + 3a b a b a b a - 4a b a b a b + + + 2 2 2 2 3 3 2 2 4 2 2 2 3 2 2 2 2 + 6a b a b a b a - a b a b a + a b a b - 3a b a b a b + 3a b a b a b + + + 2 2 3 2 2 2 2 2 2 2 2 2 3 + - 2a b a b a b + 3a b a b a b a - 3a b a b a b a + a b a b a + + + 2 3 2 2 2 2 2 2 2 + 3a b a b a b - 6a b a b a b a b - 3a b a b a b a + 12a b a b a b a b a + + + 2 2 2 2 2 2 2 3 3 4 2 + - 3a b a b a b a - 6a b a b a b a + 3a b a b a - 4a b a b a b + + + 3 2 2 3 + 12a b a b a b a b - 12a b a b a b a b + 8a b a b a b a b + + + 2 2 2 3 2 5 2 + - 12a b a b a b a b a + 12a b a b a b a b a - 4a b a b a b a + a b a b + + + 2 4 2 3 2 2 2 3 2 2 2 + - 3a b a b a b + 3a b a b a b - 2a b a b a b + 3a b a b a b a + + + 2 2 2 2 2 2 3 3 3 2 3 2 + - 3a b a b a b a + a b a b a - 2b a b a b + 4b a b a b a b + + + 3 2 2 3 3 2 2 3 2 2 3 3 3 + 2b a b a b a - 8b a b a b a b a + 2b a b a b a + 4b a b a b a - 2b a b a + + + 2 4 2 2 3 2 3 2 2 2 + 3b a b a b - 6b a b a b a b - 3b a b a b a + 12b a b a b a b a + + + 2 2 2 2 2 2 2 2 3 5 2 + - 3b a b a b a - 6b a b a b a b a + 3b a b a b a - b a b a b + + + 4 2 3 2 3 3 2 2 + 3b a b a b a + 6b a b a b a b - 12b a b a b a b a + 3b a b a b a + + + 2 3 2 2 2 2 3 2 5 2 5 2 + - 4b a b a b a b + 6b a b a b a b a - b a b a b a + b a b a b - b a b a + + + 2 4 2 2 4 2 4 2 2 2 3 3 2 3 2 + - 3b a b a b + 4b a b a b a - b a b a + 2b a b a b - 3b a b a b a + + + 2 3 2 + b a b a b a + Type: XDistributedPolynomial(Symbol,Fraction Integer) + + lp :: dpoly - lpd + 0 + Type: XDistributedPolynomial(Symbol,Fraction Integer) + +Calculations with verification in XRecursivePolynomial. + + p := 3 * lp + 3 2 2 + 3[a b a b a b] + Type: XPBWPolynomial(Symbol,Fraction Integer) + + q := lp1 + 3 2 + [a b ] + Type: XPBWPolynomial(Symbol,Fraction Integer) + + pq:= p * q + 3 2 2 3 2 + 3[a b a b a b][a b ] + Type: XPBWPolynomial(Symbol,Fraction Integer) + + pr:rpoly := p :: rpoly + a + * + a + * + a b b + * + a(a b(a b 3 + b a(- 3)) + b(a(a b(- 9) + b a 12) + b a a(- 3))) + + + b a(a(a b 6 + b a(- 9)) + b a a 3) + + + b + * + a b + * + a + * + a(a b b(- 3) + b b a 9) + + + b(a(a b 18 + b a(- 36)) + b a a 9) + + + b(a a(a b(- 12) + b a 18) + b a a a(- 3)) + + + b a + * + a(a(a b b 3 + b a b(- 9)) + b a a b 9) + + + b(a(a(a b(- 6) + b a 9) + b a a(- 9)) + b a a a 3) + + + b + * + a + * + a b + * + a + * + a(a b b 9 + b(a b(- 18) + b a(- 9))) + + + b(a b a 36 + b a a(- 9)) + + + b(a b a a(- 18) + b a a a 9) + + + b a + * + a(a(a b b(- 12) + b a b 36) + b a a b(- 36)) + + + b(a(a(a b 24 + b a(- 36)) + b a a 36) + b a a a(- 12)) + + + b a a + * + a(a(a b b 3 + b a b(- 9)) + b a a b 9) + + + b(a(a(a b(- 6) + b a 9) + b a a(- 9)) + b a a a 3) + + + b + * + a + * + a + * + a b + * + a + * + a(a b b(- 6) + b(a b 12 + b a 6)) + + + b(a b a(- 24) + b a a 6) + + + b(a b a a 12 + b a a a(- 6)) + + + b a + * + a + * + a(a b b 9 + b(a b(- 18) + b a(- 9))) + + + b(a b a 36 + b a a(- 9)) + + + b(a b a a(- 18) + b a a a 9) + + + b a a + * + a(a(a b b(- 3) + b b a 9) + b(a(a b 18 + b a(- 36)) + b a a 9)) + + + b(a a(a b(- 12) + b a 18) + b a a a(- 3)) + + + b a a a + * + a(a b(a b 3 + b a(- 3)) + b(a(a b(- 9) + b a 12) + b a a(- 3))) + + + b a(a(a b 6 + b a(- 9)) + b a a 3) + Type: XRecursivePolynomial(Symbol,Fraction Integer) + + qr:rpoly := q :: rpoly + a(a(a b b 1 + b(a b(- 2) + b a(- 1))) + b(a b a 4 + b a a(- 1))) + + + b(a b a a(- 2) + b a a a 1) + Type: XRecursivePolynomial(Symbol,Fraction Integer) + + pq :: rpoly - pr*qr + 0 + Type: XRecursivePolynomial(Symbol,Fraction Integer) + +See Also: +o )show XPBWPolynomial +o $AXIOM/doc/src/algebra/xlpoly.spad.dvi + +@ <>= )abbrev domain XPBWPOLY XPBWPolynomial ++ Author: Michel Petitot (petitot@lifl.fr). diff --git a/src/algebra/xpoly.spad.pamphlet b/src/algebra/xpoly.spad.pamphlet index 6ff416b..218c93f 100644 --- a/src/algebra/xpoly.spad.pamphlet +++ b/src/algebra/xpoly.spad.pamphlet @@ -486,6 +486,389 @@ XPolynomialsCat(vl:OrderedSet,R:Ring):Category == Export where @ \section{domain XPR XPolynomialRing} +<>= +-- xpoly.spad.pamphlet XPolynomialRing.input +)spool XPolynomialRing.output +)set message test on +)set message auto off +)clear all +--S 1 of 15 +Word := OrderedFreeMonoid(Symbol) +--R +--R +--R (1) OrderedFreeMonoid Symbol +--R Type: Domain +--E 1 + +--S 2 of 15 +poly:= XPR(Integer,Word) +--R +--R +--R (2) XPolynomialRing(Integer,OrderedFreeMonoid Symbol) +--R Type: Domain +--E 2 + +--S 3 of 15 +p:poly := 2 * x - 3 * y + 1 +--R +--R +--R (3) 1 + 2x - 3y +--R Type: XPolynomialRing(Integer,OrderedFreeMonoid Symbol) +--E 3 + +--S 4 of 15 +q:poly := 2 * x + 1 +--R +--R +--R (4) 1 + 2x +--R Type: XPolynomialRing(Integer,OrderedFreeMonoid Symbol) +--E 4 + +--S 5 of 15 +p + q +--R +--R +--R (5) 2 + 4x - 3y +--R Type: XPolynomialRing(Integer,OrderedFreeMonoid Symbol) +--E 5 + +--S 6 of 15 +p * q +--R +--R +--R 2 +--R (6) 1 + 4x - 3y + 4x - 6y x +--R Type: XPolynomialRing(Integer,OrderedFreeMonoid Symbol) +--E 6 + +--S 7 of 15 +(p+q)**2-p**2-q**2-2*p*q +--R +--R +--R (7) - 6x y + 6y x +--R Type: XPolynomialRing(Integer,OrderedFreeMonoid Symbol) +--E 7 + +--S 8 of 15 +M := SquareMatrix(2,Fraction Integer) +--R +--R +--R (8) SquareMatrix(2,Fraction Integer) +--R Type: Domain +--E 8 + +--S 9 of 15 +poly1:= XPR(M,Word) +--R +--R +--R (9) +--R XPolynomialRing(SquareMatrix(2,Fraction Integer),OrderedFreeMonoid Symbol) +--R Type: Domain +--E 9 + +--S 10 of 15 +m1:M := matrix [ [i*j**2 for i in 1..2] for j in 1..2] +--R +--R +--R +1 2+ +--R (10) | | +--R +4 8+ +--R Type: SquareMatrix(2,Fraction Integer) +--E 10 + +--S 11 of 15 +m2:M := m1 - 5/4 +--R +--R +--R + 1 + +--R |- - 2 | +--R | 4 | +--R (11) | | +--R | 27| +--R | 4 --| +--R + 4+ +--R Type: SquareMatrix(2,Fraction Integer) +--E 11 + +--S 12 of 15 +m3: M := m2**2 +--R +--R +--R +129 + +--R |--- 13 | +--R | 16 | +--R (12) | | +--R | 857| +--R |26 ---| +--R + 16+ +--R Type: SquareMatrix(2,Fraction Integer) +--E 12 + +--S 13 of 15 +pm:poly1 := m1*x + m2*y + m3*z - 2/3 +--R +--R +--R + 2 + + 1 + +129 + +--R |- - 0 | |- - 2 | |--- 13 | +--R | 3 | +1 2+ | 4 | | 16 | +--R (13) | | + | |x + | |y + | |z +--R | 2| +4 8+ | 27| | 857| +--R | 0 - -| | 4 --| |26 ---| +--R + 3+ + 4+ + 16+ +--RType: XPolynomialRing(SquareMatrix(2,Fraction Integer),OrderedFreeMonoid Symbol) +--E 13 + +--S 14 of 15 +qm:poly1 := pm - m1*x +--R +--R +--R + 2 + + 1 + +129 + +--R |- - 0 | |- - 2 | |--- 13 | +--R | 3 | | 4 | | 16 | +--R (14) | | + | |y + | |z +--R | 2| | 27| | 857| +--R | 0 - -| | 4 --| |26 ---| +--R + 3+ + 4+ + 16+ +--RType: XPolynomialRing(SquareMatrix(2,Fraction Integer),OrderedFreeMonoid Symbol) +--E 14 + +--S 15 of 15 +qm**3 +--R +--R +--R (15) +--R + 8 + + 1 8+ +43 52 + + 129 + +--R |- -- 0 | |- - -| |-- -- | |- --- - 26 | +--R | 27 | | 3 3| | 4 3 | | 8 | 2 +--R | | + | |y + | |z + | |y +--R | 8| |16 | |104 857| | 857| +--R | 0 - --| |-- 9| |--- ---| |- 52 - ---| +--R + 27+ + 3 + + 3 12+ + 8 + +--R + +--R + 3199 831 + + 3199 831 + + 103169 6409 + +--R |- ---- - --- | |- ---- - --- | |- ------ - ---- | +--R | 32 4 | | 32 4 | | 128 4 | 2 +--R | |y z + | |z y + | |z +--R | 831 26467| | 831 26467| | 6409 820977| +--R |- --- - -----| |- --- - -----| | - ---- - ------| +--R + 2 32 + + 2 32 + + 2 128 + +--R + +--R +3199 831 + +103169 6409 + +103169 6409 + +--R |---- --- | |------ ---- | |------ ---- | +--R | 64 8 | 3 | 256 8 | 2 | 256 8 | +--R | |y + | |y z + | |y z y +--R |831 26467| | 6409 820977| | 6409 820977| +--R |--- -----| | ---- ------| | ---- ------| +--R + 4 64 + + 4 256 + + 4 256 + +--R + +--R +3178239 795341 + +103169 6409 + +3178239 795341 + +--R |------- ------ | |------ ---- | |------- ------ | +--R | 1024 128 | 2 | 256 8 | 2 | 1024 128 | +--R | |y z + | |z y + | |z y z +--R |795341 25447787| | 6409 820977| |795341 25447787| +--R |------ --------| | ---- ------| |------ --------| +--R + 64 1024 + + 4 256 + + 64 1024 + +--R + +--R +3178239 795341 + +98625409 12326223 + +--R |------- ------ | |-------- -------- | +--R | 1024 128 | 2 | 4096 256 | 3 +--R | |z y + | |z +--R |795341 25447787| |12326223 788893897| +--R |------ --------| |-------- ---------| +--R + 64 1024 + + 128 4096 + +--RType: XPolynomialRing(SquareMatrix(2,Fraction Integer),OrderedFreeMonoid Symbol) +--E 15 +)spool +)lisp (bye) +@ +<>= +==================================================================== +XPolynomialRing examples +==================================================================== + +The XPolynomialRing domain constructor implements generalized +polynomials with coefficients from an arbitrary Ring (not necessarily +commutative) and whose exponents are words from an arbitrary +OrderedMonoid (not necessarily commutative too). Thus these +polynomials are (finite) linear combinations of words. + +This constructor takes two arguments. The first one is a Ring and the +second is an OrderedMonoid. The abbreviation for XPolynomialRing is XPR. + +Other constructors like XPolynomial, XRecursivePolynomial, +XDistributedPolynomial, LiePolynomial and XPBWPolynomial implement +multivariate polynomials in non-commutative variables. + +We illustrate now some of the facilities of the XPR domain constructor. + +Define the free ordered monoid generated by the symbols. + + Word := OrderedFreeMonoid(Symbol) + OrderedFreeMonoid Symbol + Type: Domain + +Define the linear combinations of these words with integer coefficients. + + poly:= XPR(Integer,Word) + XPolynomialRing(Integer,OrderedFreeMonoid Symbol) + Type: Domain + +Then we define a first element from poly. + + p:poly := 2 * x - 3 * y + 1 + 1 + 2x - 3y + Type: XPolynomialRing(Integer,OrderedFreeMonoid Symbol) + +And a second one. + + q:poly := 2 * x + 1 + 1 + 2x + Type: XPolynomialRing(Integer,OrderedFreeMonoid Symbol) + +We compute their sum, + + p + q + 2 + 4x - 3y + Type: XPolynomialRing(Integer,OrderedFreeMonoid Symbol) + +their product, + + p * q + 2 + 1 + 4x - 3y + 4x - 6y x + Type: XPolynomialRing(Integer,OrderedFreeMonoid Symbol) + +and see that variables do not commute. + + (p+q)**2-p**2-q**2-2*p*q + - 6x y + 6y x + Type: XPolynomialRing(Integer,OrderedFreeMonoid Symbol) + +Now we define a ring of square matrices, + + M := SquareMatrix(2,Fraction Integer) + SquareMatrix(2,Fraction Integer) + Type: Domain + +and the linear combinations of words with these matrices as coefficients. + + poly1:= XPR(M,Word) + XPolynomialRing(SquareMatrix(2,Fraction Integer),OrderedFreeMonoid Symbol) + Type: Domain + +Define a first matrix, + + m1:M := matrix [ [i*j**2 for i in 1..2] for j in 1..2] + +1 2+ + | | + +4 8+ + Type: SquareMatrix(2,Fraction Integer) + +a second one, + + m2:M := m1 - 5/4 + + 1 + + |- - 2 | + | 4 | + | | + | 27| + | 4 --| + + 4+ + Type: SquareMatrix(2,Fraction Integer) + +and a third one. + + m3: M := m2**2 + +129 + + |--- 13 | + | 16 | + | | + | 857| + |26 ---| + + 16+ + Type: SquareMatrix(2,Fraction Integer) + +Define a polynomial, + + pm:poly1 := m1*x + m2*y + m3*z - 2/3 + + 2 + + 1 + +129 + + |- - 0 | |- - 2 | |--- 13 | + | 3 | +1 2+ | 4 | | 16 | + | | + | |x + | |y + | |z + | 2| +4 8+ | 27| | 857| + | 0 - -| | 4 --| |26 ---| + + 3+ + 4+ + 16+ + Type: XPolynomialRing(SquareMatrix(2,Fraction Integer), + OrderedFreeMonoid Symbol) + +a second one, + + qm:poly1 := pm - m1*x + + 2 + + 1 + +129 + + |- - 0 | |- - 2 | |--- 13 | + | 3 | | 4 | | 16 | + | | + | |y + | |z + | 2| | 27| | 857| + | 0 - -| | 4 --| |26 ---| + + 3+ + 4+ + 16+ + Type: XPolynomialRing(SquareMatrix(2,Fraction Integer), + OrderedFreeMonoid Symbol) + +and the following power. + + qm**3 + + 8 + + 1 8+ +43 52 + + 129 + + |- -- 0 | |- - -| |-- -- | |- --- - 26 | + | 27 | | 3 3| | 4 3 | | 8 | 2 + | | + | |y + | |z + | |y + | 8| |16 | |104 857| | 857| + | 0 - --| |-- 9| |--- ---| |- 52 - ---| + + 27+ + 3 + + 3 12+ + 8 + + + + + 3199 831 + + 3199 831 + + 103169 6409 + + |- ---- - --- | |- ---- - --- | |- ------ - ---- | + | 32 4 | | 32 4 | | 128 4 | 2 + | |y z + | |z y + | |z + | 831 26467| | 831 26467| | 6409 820977| + |- --- - -----| |- --- - -----| | - ---- - ------| + + 2 32 + + 2 32 + + 2 128 + + + + +3199 831 + +103169 6409 + +103169 6409 + + |---- --- | |------ ---- | |------ ---- | + | 64 8 | 3 | 256 8 | 2 | 256 8 | + | |y + | |y z + | |y z y + |831 26467| | 6409 820977| | 6409 820977| + |--- -----| | ---- ------| | ---- ------| + + 4 64 + + 4 256 + + 4 256 + + + + +3178239 795341 + +103169 6409 + +3178239 795341 + + |------- ------ | |------ ---- | |------- ------ | + | 1024 128 | 2 | 256 8 | 2 | 1024 128 | + | |y z + | |z y + | |z y z + |795341 25447787| | 6409 820977| |795341 25447787| + |------ --------| | ---- ------| |------ --------| + + 64 1024 + + 4 256 + + 64 1024 + + + + +3178239 795341 + +98625409 12326223 + + |------- ------ | |-------- -------- | + | 1024 128 | 2 | 4096 256 | 3 + | |z y + | |z + |795341 25447787| |12326223 788893897| + |------ --------| |-------- ---------| + + 64 1024 + + 128 4096 + + Type: XPolynomialRing(SquareMatrix(2,Fraction Integer), + OrderedFreeMonoid Symbol) + +See Also: +o )help XPBWPolynomial +o )help LiePolynomial +o )help XDistributedPolynomial +o )help XRecursivePolynomial +o )help XPolynomial +o )show XPolynomialRing +o $AXIOM/doc/src/algebra/xpoly.spad.dvi + +@ <>= )abbrev domain XPR XPolynomialRing ++ Author: Michel Petitot petitot@lifl.fr @@ -1053,6 +1436,258 @@ XRecursivePolynomial(VarSet:OrderedSet,R:Ring): Xcat == Xdef where @ \section{domain XPOLY XPolynomial} +<>= +-- xpoly.spad.pamphlet XPolynomial.input +)spool XPolynomial.output +)set message test on +)set message auto off +)clear all +--S 1 of 14 +poly := XPolynomial(Integer) +--R +--R +--R (1) XPolynomial Integer +--R Type: Domain +--E 1 + +--S 2 of 14 +pr: poly := 2*x + 3*y-5 +--R +--R +--R (2) - 5 + x 2 + y 3 +--R Type: XPolynomial Integer +--E 2 + +--S 3 of 14 +pr2: poly := pr*pr +--R +--R +--R (3) 25 + x(- 20 + x 4 + y 6) + y(- 30 + x 6 + y 9) +--R Type: XPolynomial Integer +--E 3 + +--S 4 of 14 +pd := expand pr +--R +--R +--R (4) - 5 + 2x + 3y +--R Type: XDistributedPolynomial(Symbol,Integer) +--E 4 + +--S 5 of 14 +pd2 := pd*pd +--R +--R +--R 2 2 +--R (5) 25 - 20x - 30y + 4x + 6x y + 6y x + 9y +--R Type: XDistributedPolynomial(Symbol,Integer) +--E 5 + +--S 6 of 14 +expand(pr2) - pd2 +--R +--R +--R (6) 0 +--R Type: XDistributedPolynomial(Symbol,Integer) +--E 6 + +--S 7 of 14 +qr := pr**3 +--R +--R +--R (7) +--R - 125 + x(150 + x(- 60 + x 8 + y 12) + y(- 90 + x 12 + y 18)) +--R + +--R y(225 + x(- 90 + x 12 + y 18) + y(- 135 + x 18 + y 27)) +--R Type: XPolynomial Integer +--E 7 + +--S 8 of 14 +qd := pd**3 +--R +--R +--R (8) +--R 2 2 3 2 +--R - 125 + 150x + 225y - 60x - 90x y - 90y x - 135y + 8x + 12x y + 12x y x +--R + +--R 2 2 2 3 +--R 18x y + 12y x + 18y x y + 18y x + 27y +--R Type: XDistributedPolynomial(Symbol,Integer) +--E 8 + +--S 9 of 14 +trunc(qd,2) +--R +--R +--R 2 2 +--R (9) - 125 + 150x + 225y - 60x - 90x y - 90y x - 135y +--R Type: XDistributedPolynomial(Symbol,Integer) +--E 9 + +--S 10 of 14 +trunc(qr,2) +--R +--R +--R (10) - 125 + x(150 + x(- 60) + y(- 90)) + y(225 + x(- 90) + y(- 135)) +--R Type: XPolynomial Integer +--E 10 + +--S 11 of 14 +Word := OrderedFreeMonoid Symbol +--R +--R +--R (11) OrderedFreeMonoid Symbol +--R Type: Domain +--E 11 + +--S 12 of 14 +w: Word := x*y**2 +--R +--R +--R 2 +--R (12) x y +--R Type: OrderedFreeMonoid Symbol +--E 12 + +--S 13 of 14 +rquo(qr,w) +--R +--R +--R (13) 18 +--R Type: XPolynomial Integer +--E 13 + +--S 14 of 14 +sh(pr,w::poly) +--R +--R +--R (14) x(x y y 4 + y(x y 2 + y(- 5 + x 2 + y 9))) + y x y y 3 +--R Type: XPolynomial Integer +--E 14 +)spool +)lisp (bye) +@ +<>= +==================================================================== +XPolynomial examples +==================================================================== + +The XPolynomial domain constructor implements multivariate polynomials +whose set of variables is Symbol. These variables do not commute. +The only parameter of this construtor is the coefficient ring which +may be non-commutative. However, coefficients and variables commute. +The representation of the polynomials is recursive. The abbreviation +for XPolynomial is XPOLY. + +Other constructors like XPolynomialRing, XRecursivePolynomial as well +as XDistributedPolynomial, LiePolynomial and XPBWPolynomial implement +multivariate polynomials in non-commutative variables. + +We illustrate now some of the facilities of the XPOLY domain constructor. + +Define a polynomial ring over the integers. + + poly := XPolynomial(Integer) + XPolynomial Integer + Type: Domain + +Define a first polynomial, + + pr: poly := 2*x + 3*y-5 + - 5 + x 2 + y 3 + Type: XPolynomial Integer + +and a second one. + + pr2: poly := pr*pr + 25 + x(- 20 + x 4 + y 6) + y(- 30 + x 6 + y 9) + Type: XPolynomial Integer + +Rewrite pr in a distributive way, + + pd := expand pr + - 5 + 2x + 3y + Type: XDistributedPolynomial(Symbol,Integer) + +compute its square, + + pd2 := pd*pd + 2 2 + 25 - 20x - 30y + 4x + 6x y + 6y x + 9y + Type: XDistributedPolynomial(Symbol,Integer) + +and checks that: + + expand(pr2) - pd2 + 0 + Type: XDistributedPolynomial(Symbol,Integer) + +We define: + + qr := pr**3 + - 125 + x(150 + x(- 60 + x 8 + y 12) + y(- 90 + x 12 + y 18)) + + + y(225 + x(- 90 + x 12 + y 18) + y(- 135 + x 18 + y 27)) + Type: XPolynomial Integer + +and: + + qd := pd**3 + 2 2 3 2 + - 125 + 150x + 225y - 60x - 90x y - 90y x - 135y + 8x + 12x y + 12x y x + + + 2 2 2 3 + 18x y + 12y x + 18y x y + 18y x + 27y + Type: XDistributedPolynomial(Symbol,Integer) + +We truncate qd at degree 3. + + trunc(qd,2) + 2 2 + - 125 + 150x + 225y - 60x - 90x y - 90y x - 135y + Type: XDistributedPolynomial(Symbol,Integer) + +The same for qr: + + trunc(qr,2) + - 125 + x(150 + x(- 60) + y(- 90)) + y(225 + x(- 90) + y(- 135)) + Type: XPolynomial Integer + +We define: + + Word := OrderedFreeMonoid Symbol + OrderedFreeMonoid Symbol + Type: Domain + +and: + + w: Word := x*y**2 + 2 + x y + Type: OrderedFreeMonoid Symbol + +We can compute the right-quotient of qr by r: + + rquo(qr,w) + 18 + Type: XPolynomial Integer + +and the shuffle-product of pr by r: + + sh(pr,w::poly) + x(x y y 4 + y(x y 2 + y(- 5 + x 2 + y 9))) + y x y y 3 + Type: XPolynomial Integer + +See Also: +o )help XPBWPolynomial +o )help LiePolynomial +o )help XDistributedPolynomial +o )help XRecursivePolynomial +o )help XPolynomialRing +o )show XPolynomial +o $AXIOM/doc/src/algebra/xpoly.spad.dvi + +@ <>= )abbrev domain XPOLY XPolynomial ++ Author: Michel Petitot petitot@lifl.fr diff --git a/src/algebra/zerodim.spad.pamphlet b/src/algebra/zerodim.spad.pamphlet index 8e20563..26261e9 100644 --- a/src/algebra/zerodim.spad.pamphlet +++ b/src/algebra/zerodim.spad.pamphlet @@ -4125,6 +4125,3124 @@ Based on triangular decompositions and the {\bf RealClosure} constructor, the pacakge {\bf ZeroDimensionalSolvePackage} provides operations for computing symbolically the real or complex roots of polynomial systems with finitely many solutions. +<>= +-- zerodim.spad.pamphlet ZeroDimensionalSolvePackage.input +)spool ZeroDimensionalSolvePackage.output +)set message test on +)set message auto off +)clear all +--S 1 of 28 +R := Integer +--R +--R +--R (1) Integer +--R Type: Domain +--E 1 + +--S 2 of 28 +ls : List Symbol := [x,y,z,t] +--R +--R +--R (2) [x,y,z,t] +--R Type: List Symbol +--E 2 + +--S 3 of 28 +ls2 : List Symbol := [x,y,z,t,new()$Symbol] +--R +--R +--R (3) [x,y,z,t,%A] +--R Type: List Symbol +--E 3 + +--S 4 of 28 +pack := ZDSOLVE(R,ls,ls2) +--R +--R +--R (4) ZeroDimensionalSolvePackage(Integer,[x,y,z,t],[x,y,z,t,%A]) +--R Type: Domain +--E 4 + +--S 5 of 28 +p1 := x**2*y*z + x*y**2*z + x*y*z**2 + x*y*z + x*y + x*z + y*z +--R +--R +--R 2 2 2 +--R (5) x y z + (x y + (x + x + 1)y + x)z + x y +--R Type: Polynomial Integer +--E 5 + +--S 6 of 28 +p2 := x**2*y**2*z + x*y**2*z**2 + x**2*y*z + x*y*z + y*z + x + z +--R +--R +--R 2 2 2 2 2 +--R (6) x y z + (x y + (x + x + 1)y + 1)z + x +--R Type: Polynomial Integer +--E 6 + +--S 7 of 28 +p3 := x**2*y**2*z**2 + x**2*y**2*z + x*y**2*z + x*y*z + x*z + z + 1 +--R +--R +--R 2 2 2 2 2 +--R (7) x y z + ((x + x)y + x y + x + 1)z + 1 +--R Type: Polynomial Integer +--E 7 + +--S 8 of 28 +lp := [p1, p2, p3] +--R +--R +--R (8) +--R 2 2 2 +--R [x y z + (x y + (x + x + 1)y + x)z + x y, +--R 2 2 2 2 2 +--R x y z + (x y + (x + x + 1)y + 1)z + x, +--R 2 2 2 2 2 +--R x y z + ((x + x)y + x y + x + 1)z + 1] +--R Type: List Polynomial Integer +--E 8 + +--S 9 of 28 +triangSolve(lp)$pack +--R +--R +--R (9) +--R [ +--R { +--R 20 19 18 17 16 15 14 13 12 +--R z - 6z - 41z + 71z + 106z + 92z + 197z + 145z + 257z +--R + +--R 11 10 9 8 7 6 5 4 3 +--R 278z + 201z + 278z + 257z + 145z + 197z + 92z + 106z + 71z +--R + +--R 2 +--R - 41z - 6z + 1 +--R , +--R +--R 19 18 17 16 +--R 14745844z + 50357474z - 130948857z - 185261586z +--R + +--R 15 14 13 12 +--R - 180077775z - 338007307z - 275379623z - 453190404z +--R + +--R 11 10 9 8 +--R - 474597456z - 366147695z - 481433567z - 430613166z +--R + +--R 7 6 5 4 +--R - 261878358z - 326073537z - 163008796z - 177213227z +--R + +--R 3 2 +--R - 104356755z + 65241699z + 9237732z - 1567348 +--R * +--R y +--R + +--R 19 18 17 16 15 +--R 1917314z + 6508991z - 16973165z - 24000259z - 23349192z +--R + +--R 14 13 12 11 10 +--R - 43786426z - 35696474z - 58724172z - 61480792z - 47452440z +--R + +--R 9 8 7 6 5 +--R - 62378085z - 55776527z - 33940618z - 42233406z - 21122875z +--R + +--R 4 3 2 +--R - 22958177z - 13504569z + 8448317z + 1195888z - 202934 +--R , +--R 3 2 3 2 2 2 +--R ((z - 2z)y + (- z - z - 2z - 1)y - z - z + 1)x + z - 1} +--R ] +--R Type: List RegularChain(Integer,[x,y,z,t]) +--E 9 + +--S 10 of 28 +univariateSolve(lp)$pack +--R +--R +--R (10) +--R [ +--R [ +--R complexRoots = +--R 12 11 10 9 8 7 6 5 4 3 +--R ? - 12? + 24? + 4? - 9? + 27? - 21? + 27? - 9? + 4? +--R + +--R 2 +--R 24? - 12? + 1 +--R , +--R +--R coordinates = +--R [ +--R 11 10 9 8 7 6 +--R 63x + 62%A - 721%A + 1220%A + 705%A - 285%A + 1512%A +--R + +--R 5 4 3 2 +--R - 735%A + 1401%A - 21%A + 215%A + 1577%A - 142 +--R , +--R +--R 11 10 9 8 7 6 +--R 63y - 75%A + 890%A - 1682%A - 516%A + 588%A - 1953%A +--R + +--R 5 4 3 2 +--R 1323%A - 1815%A + 426%A - 243%A - 1801%A + 679 +--R , +--R z - %A] +--R ] +--R , +--R +--R 6 5 4 3 2 +--R [complexRoots= ? + ? + ? + ? + ? + ? + 1, +--R 5 3 +--R coordinates= [x - %A ,y - %A ,z - %A]] +--R , +--R 2 +--R [complexRoots= ? + 5? + 1,coordinates= [x - 1,y - 1,z - %A]]] +--RType: List Record(complexRoots: SparseUnivariatePolynomial Integer,coordinates: List Polynomial Integer) +--E 10 + +--S 11 of 28 +lr := realSolve(lp)$pack +--R +--R +--R (11) +--R [ +--R [%B1, +--R +--R 1184459 19 2335702 18 5460230 17 79900378 16 +--R ------- %B1 - ------- %B1 - ------- %B1 + -------- %B1 +--R 1645371 548457 182819 1645371 +--R + +--R 43953929 15 13420192 14 553986 13 193381378 12 +--R -------- %B1 + -------- %B1 + ------ %B1 + --------- %B1 +--R 548457 182819 3731 1645371 +--R + +--R 35978916 11 358660781 10 271667666 9 118784873 8 +--R -------- %B1 + --------- %B1 + --------- %B1 + --------- %B1 +--R 182819 1645371 1645371 548457 +--R + +--R 337505020 7 1389370 6 688291 5 3378002 4 +--R --------- %B1 + ------- %B1 + ------ %B1 + ------- %B1 +--R 1645371 11193 4459 42189 +--R + +--R 140671876 3 32325724 2 8270 9741532 +--R --------- %B1 + -------- %B1 - ---- %B1 - ------- +--R 1645371 548457 343 1645371 +--R , +--R +--R 91729 19 487915 18 4114333 17 1276987 16 +--R - ------ %B1 + ------ %B1 + ------- %B1 - ------- %B1 +--R 705159 705159 705159 235053 +--R + +--R 13243117 15 16292173 14 26536060 13 722714 12 +--R - -------- %B1 - -------- %B1 - -------- %B1 - ------ %B1 +--R 705159 705159 705159 18081 +--R + +--R 5382578 11 15449995 10 14279770 9 6603890 8 +--R - ------- %B1 - -------- %B1 - -------- %B1 - ------- %B1 +--R 100737 235053 235053 100737 +--R + +--R 409930 7 37340389 6 34893715 5 26686318 4 +--R - ------ %B1 - -------- %B1 - -------- %B1 - -------- %B1 +--R 6027 705159 705159 705159 +--R + +--R 801511 3 17206178 2 4406102 377534 +--R - ------ %B1 - -------- %B1 - ------- %B1 + ------ +--R 26117 705159 705159 705159 +--R ] +--R , +--R +--R [%B2, +--R +--R 1184459 19 2335702 18 5460230 17 79900378 16 +--R ------- %B2 - ------- %B2 - ------- %B2 + -------- %B2 +--R 1645371 548457 182819 1645371 +--R + +--R 43953929 15 13420192 14 553986 13 193381378 12 +--R -------- %B2 + -------- %B2 + ------ %B2 + --------- %B2 +--R 548457 182819 3731 1645371 +--R + +--R 35978916 11 358660781 10 271667666 9 118784873 8 +--R -------- %B2 + --------- %B2 + --------- %B2 + --------- %B2 +--R 182819 1645371 1645371 548457 +--R + +--R 337505020 7 1389370 6 688291 5 3378002 4 +--R --------- %B2 + ------- %B2 + ------ %B2 + ------- %B2 +--R 1645371 11193 4459 42189 +--R + +--R 140671876 3 32325724 2 8270 9741532 +--R --------- %B2 + -------- %B2 - ---- %B2 - ------- +--R 1645371 548457 343 1645371 +--R , +--R +--R 91729 19 487915 18 4114333 17 1276987 16 +--R - ------ %B2 + ------ %B2 + ------- %B2 - ------- %B2 +--R 705159 705159 705159 235053 +--R + +--R 13243117 15 16292173 14 26536060 13 722714 12 +--R - -------- %B2 - -------- %B2 - -------- %B2 - ------ %B2 +--R 705159 705159 705159 18081 +--R + +--R 5382578 11 15449995 10 14279770 9 6603890 8 +--R - ------- %B2 - -------- %B2 - -------- %B2 - ------- %B2 +--R 100737 235053 235053 100737 +--R + +--R 409930 7 37340389 6 34893715 5 26686318 4 +--R - ------ %B2 - -------- %B2 - -------- %B2 - -------- %B2 +--R 6027 705159 705159 705159 +--R + +--R 801511 3 17206178 2 4406102 377534 +--R - ------ %B2 - -------- %B2 - ------- %B2 + ------ +--R 26117 705159 705159 705159 +--R ] +--R , +--R +--R [%B3, +--R +--R 1184459 19 2335702 18 5460230 17 79900378 16 +--R ------- %B3 - ------- %B3 - ------- %B3 + -------- %B3 +--R 1645371 548457 182819 1645371 +--R + +--R 43953929 15 13420192 14 553986 13 193381378 12 +--R -------- %B3 + -------- %B3 + ------ %B3 + --------- %B3 +--R 548457 182819 3731 1645371 +--R + +--R 35978916 11 358660781 10 271667666 9 118784873 8 +--R -------- %B3 + --------- %B3 + --------- %B3 + --------- %B3 +--R 182819 1645371 1645371 548457 +--R + +--R 337505020 7 1389370 6 688291 5 3378002 4 +--R --------- %B3 + ------- %B3 + ------ %B3 + ------- %B3 +--R 1645371 11193 4459 42189 +--R + +--R 140671876 3 32325724 2 8270 9741532 +--R --------- %B3 + -------- %B3 - ---- %B3 - ------- +--R 1645371 548457 343 1645371 +--R , +--R +--R 91729 19 487915 18 4114333 17 1276987 16 +--R - ------ %B3 + ------ %B3 + ------- %B3 - ------- %B3 +--R 705159 705159 705159 235053 +--R + +--R 13243117 15 16292173 14 26536060 13 722714 12 +--R - -------- %B3 - -------- %B3 - -------- %B3 - ------ %B3 +--R 705159 705159 705159 18081 +--R + +--R 5382578 11 15449995 10 14279770 9 6603890 8 +--R - ------- %B3 - -------- %B3 - -------- %B3 - ------- %B3 +--R 100737 235053 235053 100737 +--R + +--R 409930 7 37340389 6 34893715 5 26686318 4 +--R - ------ %B3 - -------- %B3 - -------- %B3 - -------- %B3 +--R 6027 705159 705159 705159 +--R + +--R 801511 3 17206178 2 4406102 377534 +--R - ------ %B3 - -------- %B3 - ------- %B3 + ------ +--R 26117 705159 705159 705159 +--R ] +--R , +--R +--R [%B4, +--R +--R 1184459 19 2335702 18 5460230 17 79900378 16 +--R ------- %B4 - ------- %B4 - ------- %B4 + -------- %B4 +--R 1645371 548457 182819 1645371 +--R + +--R 43953929 15 13420192 14 553986 13 193381378 12 +--R -------- %B4 + -------- %B4 + ------ %B4 + --------- %B4 +--R 548457 182819 3731 1645371 +--R + +--R 35978916 11 358660781 10 271667666 9 118784873 8 +--R -------- %B4 + --------- %B4 + --------- %B4 + --------- %B4 +--R 182819 1645371 1645371 548457 +--R + +--R 337505020 7 1389370 6 688291 5 3378002 4 +--R --------- %B4 + ------- %B4 + ------ %B4 + ------- %B4 +--R 1645371 11193 4459 42189 +--R + +--R 140671876 3 32325724 2 8270 9741532 +--R --------- %B4 + -------- %B4 - ---- %B4 - ------- +--R 1645371 548457 343 1645371 +--R , +--R +--R 91729 19 487915 18 4114333 17 1276987 16 +--R - ------ %B4 + ------ %B4 + ------- %B4 - ------- %B4 +--R 705159 705159 705159 235053 +--R + +--R 13243117 15 16292173 14 26536060 13 722714 12 +--R - -------- %B4 - -------- %B4 - -------- %B4 - ------ %B4 +--R 705159 705159 705159 18081 +--R + +--R 5382578 11 15449995 10 14279770 9 6603890 8 +--R - ------- %B4 - -------- %B4 - -------- %B4 - ------- %B4 +--R 100737 235053 235053 100737 +--R + +--R 409930 7 37340389 6 34893715 5 26686318 4 +--R - ------ %B4 - -------- %B4 - -------- %B4 - -------- %B4 +--R 6027 705159 705159 705159 +--R + +--R 801511 3 17206178 2 4406102 377534 +--R - ------ %B4 - -------- %B4 - ------- %B4 + ------ +--R 26117 705159 705159 705159 +--R ] +--R , +--R +--R [%B5, +--R +--R 1184459 19 2335702 18 5460230 17 79900378 16 +--R ------- %B5 - ------- %B5 - ------- %B5 + -------- %B5 +--R 1645371 548457 182819 1645371 +--R + +--R 43953929 15 13420192 14 553986 13 193381378 12 +--R -------- %B5 + -------- %B5 + ------ %B5 + --------- %B5 +--R 548457 182819 3731 1645371 +--R + +--R 35978916 11 358660781 10 271667666 9 118784873 8 +--R -------- %B5 + --------- %B5 + --------- %B5 + --------- %B5 +--R 182819 1645371 1645371 548457 +--R + +--R 337505020 7 1389370 6 688291 5 3378002 4 +--R --------- %B5 + ------- %B5 + ------ %B5 + ------- %B5 +--R 1645371 11193 4459 42189 +--R + +--R 140671876 3 32325724 2 8270 9741532 +--R --------- %B5 + -------- %B5 - ---- %B5 - ------- +--R 1645371 548457 343 1645371 +--R , +--R +--R 91729 19 487915 18 4114333 17 1276987 16 +--R - ------ %B5 + ------ %B5 + ------- %B5 - ------- %B5 +--R 705159 705159 705159 235053 +--R + +--R 13243117 15 16292173 14 26536060 13 722714 12 +--R - -------- %B5 - -------- %B5 - -------- %B5 - ------ %B5 +--R 705159 705159 705159 18081 +--R + +--R 5382578 11 15449995 10 14279770 9 6603890 8 +--R - ------- %B5 - -------- %B5 - -------- %B5 - ------- %B5 +--R 100737 235053 235053 100737 +--R + +--R 409930 7 37340389 6 34893715 5 26686318 4 +--R - ------ %B5 - -------- %B5 - -------- %B5 - -------- %B5 +--R 6027 705159 705159 705159 +--R + +--R 801511 3 17206178 2 4406102 377534 +--R - ------ %B5 - -------- %B5 - ------- %B5 + ------ +--R 26117 705159 705159 705159 +--R ] +--R , +--R +--R [%B6, +--R +--R 1184459 19 2335702 18 5460230 17 79900378 16 +--R ------- %B6 - ------- %B6 - ------- %B6 + -------- %B6 +--R 1645371 548457 182819 1645371 +--R + +--R 43953929 15 13420192 14 553986 13 193381378 12 +--R -------- %B6 + -------- %B6 + ------ %B6 + --------- %B6 +--R 548457 182819 3731 1645371 +--R + +--R 35978916 11 358660781 10 271667666 9 118784873 8 +--R -------- %B6 + --------- %B6 + --------- %B6 + --------- %B6 +--R 182819 1645371 1645371 548457 +--R + +--R 337505020 7 1389370 6 688291 5 3378002 4 +--R --------- %B6 + ------- %B6 + ------ %B6 + ------- %B6 +--R 1645371 11193 4459 42189 +--R + +--R 140671876 3 32325724 2 8270 9741532 +--R --------- %B6 + -------- %B6 - ---- %B6 - ------- +--R 1645371 548457 343 1645371 +--R , +--R +--R 91729 19 487915 18 4114333 17 1276987 16 +--R - ------ %B6 + ------ %B6 + ------- %B6 - ------- %B6 +--R 705159 705159 705159 235053 +--R + +--R 13243117 15 16292173 14 26536060 13 722714 12 +--R - -------- %B6 - -------- %B6 - -------- %B6 - ------ %B6 +--R 705159 705159 705159 18081 +--R + +--R 5382578 11 15449995 10 14279770 9 6603890 8 +--R - ------- %B6 - -------- %B6 - -------- %B6 - ------- %B6 +--R 100737 235053 235053 100737 +--R + +--R 409930 7 37340389 6 34893715 5 26686318 4 +--R - ------ %B6 - -------- %B6 - -------- %B6 - -------- %B6 +--R 6027 705159 705159 705159 +--R + +--R 801511 3 17206178 2 4406102 377534 +--R - ------ %B6 - -------- %B6 - ------- %B6 + ------ +--R 26117 705159 705159 705159 +--R ] +--R , +--R +--R [%B7, +--R +--R 1184459 19 2335702 18 5460230 17 79900378 16 +--R ------- %B7 - ------- %B7 - ------- %B7 + -------- %B7 +--R 1645371 548457 182819 1645371 +--R + +--R 43953929 15 13420192 14 553986 13 193381378 12 +--R -------- %B7 + -------- %B7 + ------ %B7 + --------- %B7 +--R 548457 182819 3731 1645371 +--R + +--R 35978916 11 358660781 10 271667666 9 118784873 8 +--R -------- %B7 + --------- %B7 + --------- %B7 + --------- %B7 +--R 182819 1645371 1645371 548457 +--R + +--R 337505020 7 1389370 6 688291 5 3378002 4 +--R --------- %B7 + ------- %B7 + ------ %B7 + ------- %B7 +--R 1645371 11193 4459 42189 +--R + +--R 140671876 3 32325724 2 8270 9741532 +--R --------- %B7 + -------- %B7 - ---- %B7 - ------- +--R 1645371 548457 343 1645371 +--R , +--R +--R 91729 19 487915 18 4114333 17 1276987 16 +--R - ------ %B7 + ------ %B7 + ------- %B7 - ------- %B7 +--R 705159 705159 705159 235053 +--R + +--R 13243117 15 16292173 14 26536060 13 722714 12 +--R - -------- %B7 - -------- %B7 - -------- %B7 - ------ %B7 +--R 705159 705159 705159 18081 +--R + +--R 5382578 11 15449995 10 14279770 9 6603890 8 +--R - ------- %B7 - -------- %B7 - -------- %B7 - ------- %B7 +--R 100737 235053 235053 100737 +--R + +--R 409930 7 37340389 6 34893715 5 26686318 4 +--R - ------ %B7 - -------- %B7 - -------- %B7 - -------- %B7 +--R 6027 705159 705159 705159 +--R + +--R 801511 3 17206178 2 4406102 377534 +--R - ------ %B7 - -------- %B7 - ------- %B7 + ------ +--R 26117 705159 705159 705159 +--R ] +--R , +--R +--R [%B8, +--R +--R 1184459 19 2335702 18 5460230 17 79900378 16 +--R ------- %B8 - ------- %B8 - ------- %B8 + -------- %B8 +--R 1645371 548457 182819 1645371 +--R + +--R 43953929 15 13420192 14 553986 13 193381378 12 +--R -------- %B8 + -------- %B8 + ------ %B8 + --------- %B8 +--R 548457 182819 3731 1645371 +--R + +--R 35978916 11 358660781 10 271667666 9 118784873 8 +--R -------- %B8 + --------- %B8 + --------- %B8 + --------- %B8 +--R 182819 1645371 1645371 548457 +--R + +--R 337505020 7 1389370 6 688291 5 3378002 4 +--R --------- %B8 + ------- %B8 + ------ %B8 + ------- %B8 +--R 1645371 11193 4459 42189 +--R + +--R 140671876 3 32325724 2 8270 9741532 +--R --------- %B8 + -------- %B8 - ---- %B8 - ------- +--R 1645371 548457 343 1645371 +--R , +--R +--R 91729 19 487915 18 4114333 17 1276987 16 +--R - ------ %B8 + ------ %B8 + ------- %B8 - ------- %B8 +--R 705159 705159 705159 235053 +--R + +--R 13243117 15 16292173 14 26536060 13 722714 12 +--R - -------- %B8 - -------- %B8 - -------- %B8 - ------ %B8 +--R 705159 705159 705159 18081 +--R + +--R 5382578 11 15449995 10 14279770 9 6603890 8 +--R - ------- %B8 - -------- %B8 - -------- %B8 - ------- %B8 +--R 100737 235053 235053 100737 +--R + +--R 409930 7 37340389 6 34893715 5 26686318 4 +--R - ------ %B8 - -------- %B8 - -------- %B8 - -------- %B8 +--R 6027 705159 705159 705159 +--R + +--R 801511 3 17206178 2 4406102 377534 +--R - ------ %B8 - -------- %B8 - ------- %B8 + ------ +--R 26117 705159 705159 705159 +--R ] +--R ] +--R Type: List List RealClosure Fraction Integer +--E 11 + +--S 12 of 28 +# lr +--R +--R +--R (12) 8 +--R Type: PositiveInteger +--E 12 + +--S 13 of 28 +[ [approximate(r,1/1000000) for r in point] for point in lr] +--R +--R +--R (13) +--R [ +--R 10048059 +--R [- --------, +--R 2097152 +--R +--R 4503057316985387943524397913838966414596731976211768219335881208385516_ +--R 314058924567176091423629695777403099833360761048898228916578137094309_ +--R 838597331137202584846939132376157019506760357601165917454986815382098_ +--R 789094851523420392811293126141329856546977145464661495487825919941188_ +--R 447041722440491921567263542158028061437758844364634410045253024786561_ +--R 923163288214175 +--R / +--R 4503057283025245488516511806985826635083100693757320465280554706865644_ +--R 949577509916867201889438090408354817931718593862797624551518983570793_ +--R 048774424291488708829840324189200301436123314860200821443733790755311_ +--R 243632919864895421704228949571290016119498807957023663865443069392027_ +--R 148979688266712323356043491523434068924275280417338574817381189277066_ +--R 143312396681216 +--R , +--R +--R 2106260768823475073894798680486016596249607148690685538763683715020639_ +--R 680858649650790055889505646893309447097099937802187329095325898785247_ +--R 249020717504983660482075156618738724514685333060011202964635166381351_ +--R 543255982200250305283981086837110614842307026091211297929876896285681_ +--R 830479054760056380762664905618462055306047816191782011588703789138988_ +--R 1895 +--R / +--R 2106260609498464192472113804816474175341962953296434102413903142368757_ +--R 967685273888585590975965211778862189872881953943640246297357061959812_ +--R 326103659799025126863258676567202342106877031710184247484181423288921_ +--R 837681237062708470295706218485928867400771937828499200923760593314168_ +--R 901000666373896347598118228556731037072026474496776228383762993923280_ +--R 0768 +--R ] +--R , +--R +--R 2563013 +--R [- -------, +--R 2097152 +--R +--R - +--R 2611346176791927789698617693237757719238259963063541781922752330440_ +--R 189899668072928338490768623593207442125925986733815932243504809294_ +--R 837523030237337236806668167446173001727271353311571242897 +--R / +--R 1165225400505222530583981916004589143757226610276858990008790134819_ +--R 914940922413753983971394019523433320408139928153188829495755455163_ +--R 963417619308395977544797140231469234269034921938055593984 +--R , +--R +--R 3572594550275917221096588729615788272998517054675603239578198141006034_ +--R 091735282826590621902304466963941971038923304526273329316373757450061_ +--R 9789892286110976997087250466235373 +--R / +--R 1039548269345598936877071244834026055800814551120170592200522366591759_ +--R 409659486442339141029452950265179989960104811875822530205346505131581_ +--R 2439017247289173865014702966308864 +--R ] +--R , +--R +--R 1715967 +--R [- -------, +--R 2097152 +--R +--R - +--R 4213093533784303521084839517977082390377261503969586224828998436606_ +--R 030656076359374564813773498376603121267822565801436206939519951465_ +--R 18222580524697287410022543952491 +--R / +--R 9441814144185374458649692034349224052436597470966253663930641960795_ +--R 805882585493199840191699917659443264824641135187383583888147867340_ +--R 19307857605820364195856822304768 +--R , +--R +--R 7635833347112644222515625424410831225347475669008589338834162172501904_ +--R 994376346730876809042845208919919925302105720971453918982731389072591_ +--R 4035 +--R / +--R 2624188764086097199784297610478066633934230467895851602278580978503784_ +--R 549205788499019640602266966026891580103543567625039018629887141284916_ +--R 75648 +--R ] +--R , +--R +--R 437701 +--R [- -------, +--R 2097152 +--R +--R 1683106908638349588322172332654225913562986313181951031452750161441497_ +--R 473455328150721364868355579646781603507777199075077835213366484533654_ +--R 91383623741304759 +--R / +--R 1683106868095213389001709982705913638963077668731226111167785188004907_ +--R 425226298680325887810962614140298597366984264887998908377068799998454_ +--R 23381649008099328 +--R , +--R +--R 4961550109835010186422681013422108735958714801003760639707968096646912_ +--R 82670847283444311723917219104249213450966312411133 +--R / +--R 4961549872757738315509192078210209029852897118611097126236384040829376_ +--R 59261914313170254867464792718363492160482442215424 +--R ] +--R , +--R +--R 222801 +--R [-------, +--R 2097152 +--R +--R - +--R 8994884880402428265107595121970691427136045692541978275573001865213_ +--R 759921588137716696126349101655220195142994932299137183241705867672_ +--R 383477 +--R / +--R 1167889998665026372177765100691888582708969960229934769690835752457_ +--R 077779416435209473767866507769405888942764587718542434255625992456_ +--R 372224 +--R , +--R +--R - +--R 2389704888133156878320801544373808395612771509208491019847452991885_ +--R 509546519525467839016613593999693886640036283570552321155037871291_ +--R 458703265 +--R / +--R 5355487273645096326090403286689931905988225444685411433221593833681_ +--R 192957562833671468654290340746993656285925599117602120446183443145_ +--R 479421952 +--R ] +--R , +--R +--R 765693 +--R [-------, +--R 2097152 +--R +--R 8558969219816716267873244761178198088724698958616670140213765754322002_ +--R 303251685786118678330840203328837654339523418704917749518340772512899_ +--R 000391009630373148561 +--R / +--R 2941442445533010790976428411376393499815580215945856917906452535495723_ +--R 013856818941702330228779890141296236721138154231997238917322156711965_ +--R 2444639331719460159488 +--R , +--R +--R - +--R 2057618230582572101247650324860242561111302581543588808843923662767_ +--R 549382241659362712290777612800192921420574408948085193743688582762_ +--R 2246433251878894899015 +--R / +--R 2671598203325735538097952353501450220576313759890835097091722520642_ +--R 710198771902667183948906289863714759678360292483949204616471537777_ +--R 775324180661095366656 +--R ] +--R , +--R +--R 5743879 +--R [-------, +--R 2097152 +--R +--R 1076288816968906847955546394773570208171456724942618614023663123574768_ +--R 960850434263971398072546592772662158833449797698617455397887562900072_ +--R 984768000608343553189801693408727205047612559889232757563830528688953_ +--R 535421809482771058917542602890060941949620874083007858366669453501766_ +--R 24841488732463225 +--R / +--R 3131768957080317946648461940023552044190376613458584986228549631916196_ +--R 601616219781765615532532294746529648276430583810894079374566460757823_ +--R 146888581195556029208515218838883200318658407469399426063260589828612_ +--R 309231596669129707986481319851571942927230340622934023923486703042068_ +--R 1530440845099008 +--R , +--R +--R - +--R 2113286699185750918364120475565458437870172489865485994389828135335_ +--R 264444665284557526492734931691731407872701432935503473348172076098_ +--R 720545849008780077564160534317894688366119529739980502944162668550_ +--R 098127961950496210221942878089359674925850594427768502251789758706_ +--R 752831632503615 +--R / +--R 1627615584937987580242906624347104580889144466168459718043153839408_ +--R 372525533309808070363699585502216011211087103263609551026027769414_ +--R 087391148126221168139781682587438075322591466131939975457200522349_ +--R 838568964285634448018562038272378787354460106106141518010935617205_ +--R 1706396253618176 +--R ] +--R , +--R +--R 19739877 +--R [--------, +--R 2097152 +--R +--R - +--R 2997249936832703303799015804861520949215040387500707177701285766720_ +--R 192530579422478953566024359860143101547801638082771611160372212874_ +--R 847778035809872843149225484238365858013629341705321702582333350918_ +--R 009601789937023985935304900460493389873837030853410347089908880814_ +--R 853981132018464582458800615394770741699487295875960210750215891948_ +--R 814476854871031530931295467332190133702671098200902282300510751860_ +--R 7185928457030277807397796525813862762239286996106809728023675 +--R / +--R 2308433274852278590728910081191811023906504141321432646123936794873_ +--R 933319270608960702138193417647898360620229519176632937631786851455_ +--R 014766027206259022252505551741823688896883806636602574431760472240_ +--R 292093196729475160247268834121141893318848728661844434927287285112_ +--R 897080767552864895056585864033178565910387065006112801516403522741_ +--R 037360990556054476949527059227070809593049491257519554708879259595_ +--R 52929920110858560812556635485429471554031675979542656381353984 +--R , +--R +--R - +--R 5128189263548228489096276397868940080600938410663080459407966335845_ +--R 009264109490520459825316250084723010047035024497436523038925818959_ +--R 289312931584701353927621435434398674263047293909122850133851990696_ +--R 490231566094371994333795070782624011727587749989296611277318372294_ +--R 624207116537910436554574146082884701305543912620419354885410735940_ +--R 157775896602822364575864611831512943973974715166920465061850603762_ +--R 87516256195847052412587282839139194642913955 +--R / +--R 2288281939778439330531208793181290471183631092455368990386390824243_ +--R 509463644236249773080647438987739144921607794682653851741189091711_ +--R 741868145114978337284191822497675868358729486644730856622552687209_ +--R 203724411800481405702837198310642291275676195774614443815996713502_ +--R 629391749783590041470860127752372996488627742672487622480063268808_ +--R 889324891850842494934347337603075939980268208482904859678177751444_ +--R 65749979827872616963053217673201717237252096 +--R ] +--R ] +--R Type: List List Fraction Integer +--E 13 + +--S 14 of 28 +lpr := positiveSolve(lp)$pack +--R +--R +--R (14) [] +--R Type: List List RealClosure Fraction Integer +--E 14 + +--S 15 of 28 +f0 := x**3 + y + z + t- 1 +--R +--R +--R 3 +--R (15) z + y + x + t - 1 +--R Type: Polynomial Integer +--E 15 + +--S 16 of 28 +f1 := x + y**3 + z + t -1 +--R +--R +--R 3 +--R (16) z + y + x + t - 1 +--R Type: Polynomial Integer +--E 16 + +--S 17 of 28 +f2 := x + y + z**3 + t-1 +--R +--R +--R 3 +--R (17) z + y + x + t - 1 +--R Type: Polynomial Integer +--E 17 + +--S 18 of 28 +f3 := x + y + z + t**3 -1 +--R +--R +--R 3 +--R (18) z + y + x + t - 1 +--R Type: Polynomial Integer +--E 18 + +--S 19 of 28 +lf := [f0, f1, f2, f3] +--R +--R +--R (19) +--R 3 3 3 3 +--R [z + y + x + t - 1,z + y + x + t - 1,z + y + x + t - 1,z + y + x + t - 1] +--R Type: List Polynomial Integer +--E 19 + +--S 20 of 28 +lts := triangSolve(lf)$pack +--R +--R +--R (20) +--R [ +--R 2 3 3 +--R {t + t + 1, z - z - t + t, +--R +--R 3 2 2 3 6 3 3 2 +--R (3z + 3t - 3)y + (3z + (6t - 6)z + 3t - 6t + 3)y + (3t - 3)z +--R + +--R 6 3 9 6 3 +--R (3t - 6t + 3)z + t - 3t + 5t - 3t +--R , +--R x + y + z} +--R , +--R +--R 16 13 10 7 4 2 +--R {t - 6t + 9t + 4t + 15t - 54t + 27, +--R +--R 15 14 13 12 11 +--R 4907232t + 40893984t - 115013088t + 22805712t + 36330336t +--R + +--R 10 9 8 7 +--R 162959040t - 159859440t - 156802608t + 117168768t +--R + +--R 6 5 4 3 +--R 126282384t - 129351600t + 306646992t + 475302816t +--R + +--R 2 +--R - 1006837776t - 237269088t + 480716208 +--R * +--R z +--R + +--R 54 51 48 46 45 43 42 +--R 48t - 912t + 8232t - 72t - 46848t + 1152t + 186324t +--R + +--R 40 39 38 37 36 35 +--R - 3780t - 543144t - 3168t - 21384t + 1175251t + 41184t +--R + +--R 34 33 32 31 30 +--R 278003t - 1843242t - 301815t - 1440726t + 1912012t +--R + +--R 29 28 27 26 25 +--R 1442826t + 4696262t - 922481t - 4816188t - 10583524t +--R + +--R 24 23 22 21 20 +--R - 208751t + 11472138t + 16762859t - 857663t - 19328175t +--R + +--R 19 18 17 16 15 +--R - 18270421t + 4914903t + 22483044t + 12926517t - 8605511t +--R + +--R 14 13 12 11 10 +--R - 17455518t - 5014597t + 8108814t + 8465535t + 190542t +--R + +--R 9 8 7 6 5 4 +--R - 4305624t - 2226123t + 661905t + 1169775t + 226260t - 209952t +--R + +--R 3 +--R - 141183t + 27216t +--R , +--R +--R 3 2 2 3 6 3 3 2 +--R (3z + 3t - 3)y + (3z + (6t - 6)z + 3t - 6t + 3)y + (3t - 3)z +--R + +--R 6 3 9 6 3 +--R (3t - 6t + 3)z + t - 3t + 5t - 3t +--R , +--R 3 +--R x + y + z + t - 1} +--R , +--R 2 2 2 +--R {t,z - 1,y - 1,x + y}, {t - 1,z,y - 1,x + y}, {t - 1,z - 1,z y + 1,x}, +--R +--R 16 13 10 7 4 2 +--R {t - 6t + 9t + 4t + 15t - 54t + 27, +--R +--R 29 28 27 26 25 +--R 4907232t + 40893984t - 115013088t - 1730448t - 168139584t +--R + +--R 24 23 22 21 +--R 738024480t - 195372288t + 315849456t - 2567279232t +--R + +--R 20 19 18 17 +--R 937147968t + 1026357696t + 4780488240t - 2893767696t +--R + +--R 16 15 14 13 +--R - 5617160352t - 3427651728t + 5001100848t + 8720098416t +--R + +--R 12 11 10 9 +--R 2331732960t - 499046544t - 16243306272t - 9748123200t +--R + +--R 8 7 6 5 +--R 3927244320t + 25257280896t + 10348032096t - 17128672128t +--R + +--R 4 3 2 +--R - 14755488768t + 544086720t + 10848188736t + 1423614528t +--R + +--R - 2884297248 +--R * +--R z +--R + +--R 68 65 62 60 59 57 56 +--R - 48t + 1152t - 13560t + 360t + 103656t - 7560t - 572820t +--R + +--R 54 53 52 51 50 49 +--R 71316t + 2414556t + 2736t - 402876t - 7985131t - 49248t +--R + +--R 48 47 46 45 44 +--R 1431133t + 20977409t + 521487t - 2697635t - 43763654t +--R + +--R 43 42 41 40 39 +--R - 3756573t - 2093410t + 71546495t + 19699032t + 35025028t +--R + +--R 38 37 36 35 34 +--R - 89623786t - 77798760t - 138654191t + 87596128t + 235642497t +--R + +--R 33 32 31 30 29 +--R 349607642t - 93299834t - 551563167t - 630995176t + 186818962t +--R + +--R 28 27 26 25 +--R 995427468t + 828416204t - 393919231t - 1076617485t +--R + +--R 24 23 22 21 +--R - 1609479791t + 595738126t + 1198787136t + 4342832069t +--R + +--R 20 19 18 17 +--R - 2075938757t - 4390835799t - 4822843033t + 6932747678t +--R + +--R 16 15 14 13 +--R 6172196808t + 1141517740t - 4981677585t - 9819815280t +--R + +--R 12 11 10 9 +--R - 7404299976t - 157295760t + 29124027630t + 14856038208t +--R + +--R 8 7 6 5 +--R - 16184101410t - 26935440354t - 3574164258t + 10271338974t +--R + +--R 4 3 2 +--R 11191425264t + 6869861262t - 9780477840t - 3586674168t + 2884297248 +--R , +--R +--R 3 3 2 6 3 9 6 3 +--R (3z + (6t - 6)z + (6t - 12t + 3)z + 2t - 6t + t + 3t)y +--R + +--R 3 3 6 3 2 9 6 3 12 9 +--R (3t - 3)z + (6t - 12t + 6)z + (4t - 12t + 11t - 3)z + t - 4t +--R + +--R 6 3 +--R 5t - 2t +--R , +--R 3 +--R x + y + z + t - 1} +--R , +--R 2 +--R {t - 1,z - 1,y,x + z}, +--R +--R 8 7 6 5 4 3 2 +--R {t + t + t - 2t - 2t - 2t + 19t + 19t - 8, +--R +--R 7 6 5 4 3 +--R 2395770t + 3934440t - 3902067t - 10084164t - 1010448t +--R + +--R 2 +--R 32386932t + 22413225t - 10432368 +--R * +--R z +--R + +--R 7 6 5 4 3 +--R - 463519t + 3586833t + 9494955t - 8539305t - 33283098t +--R + +--R 2 +--R 35479377t + 46263256t - 17419896 +--R , +--R +--R 4 3 3 6 3 2 3 +--R 3z + (9t - 9)z + (12t - 24t + 9)z + (- 152t + 219t - 67)z +--R + +--R 6 4 3 +--R - 41t + 57t + 25t - 57t + 16 +--R * +--R y +--R + +--R 3 4 6 3 3 3 2 +--R (3t - 3)z + (9t - 18t + 9)z + (- 181t + 270t - 89)z +--R + +--R 6 4 3 7 6 4 3 +--R (- 92t + 135t + 49t - 135t + 43)z + 27t - 27t - 54t + 396t +--R + +--R - 486t + 144 +--R , +--R 3 +--R x + y + z + t - 1} +--R , +--R 3 +--R {t,z - t + 1,y - 1,x - 1}, {t - 1,z,y,x}, {t,z - 1,y,x}, {t,z,y - 1,x}, +--R {t,z,y,x - 1}] +--R Type: List RegularChain(Integer,[x,y,z,t]) +--E 20 + +--S 21 of 28 +univariateSolve(lf)$pack +--R +--R +--R (21) +--R [[complexRoots= ?,coordinates= [x - 1,y - 1,z + 1,t - %A]], +--R [complexRoots= ?,coordinates= [x,y - 1,z,t - %A]], +--R [complexRoots= ? - 1,coordinates= [x,y,z,t - %A]], +--R [complexRoots= ?,coordinates= [x - 1,y,z,t - %A]], +--R [complexRoots= ?,coordinates= [x,y,z - 1,t - %A]], +--R [complexRoots= ? - 2,coordinates= [x - 1,y + 1,z,t - 1]], +--R [complexRoots= ?,coordinates= [x + 1,y - 1,z,t - 1]], +--R [complexRoots= ? - 1,coordinates= [x - 1,y + 1,z - 1,t]], +--R [complexRoots= ? + 1,coordinates= [x + 1,y - 1,z - 1,t]], +--R +--R 6 3 2 +--R [complexRoots= ? - 2? + 3? - 3, +--R 3 3 +--R coordinates= [2x + %A + %A - 1,2y + %A + %A - 1,z - %A,t - %A]] +--R , +--R +--R 5 3 2 +--R [complexRoots= ? + 3? - 2? + 3? - 3, +--R 3 +--R coordinates= [x - %A,y - %A,z + %A + 2%A - 1,t - %A]] +--R , +--R +--R 4 3 2 +--R [complexRoots= ? - ? - 2? + 3, +--R 3 3 3 +--R coordinates= [x + %A - %A - 1,y + %A - %A - 1,z - %A + 2%A + 1,t - %A]] +--R , +--R [complexRoots= ? + 1,coordinates= [x - 1,y - 1,z,t - %A]], +--R +--R 6 3 2 +--R [complexRoots= ? + 2? + 3? - 3, +--R 3 3 +--R coordinates= [2x - %A - %A - 1,y + %A,2z - %A - %A - 1,t + %A]] +--R , +--R +--R 6 4 3 2 +--R [complexRoots= ? + 12? + 20? - 45? - 42? - 953, +--R +--R coordinates = +--R 5 4 3 2 +--R [12609x + 23%A + 49%A - 46%A + 362%A - 5015%A - 8239, +--R 5 4 3 2 +--R 25218y + 23%A + 49%A - 46%A + 362%A + 7594%A - 8239, +--R 5 4 3 2 +--R 25218z + 23%A + 49%A - 46%A + 362%A + 7594%A - 8239, +--R 5 4 3 2 +--R 12609t + 23%A + 49%A - 46%A + 362%A - 5015%A - 8239] +--R ] +--R , +--R +--R 5 3 2 +--R [complexRoots= ? + 12? - 16? + 48? - 96, +--R 3 +--R coordinates= [8x + %A + 8%A - 8,2y - %A,2z - %A,2t - %A]] +--R , +--R +--R 5 4 3 2 +--R [complexRoots= ? + ? - 5? - 3? + 9? + 3, +--R +--R coordinates = +--R 3 3 3 +--R [2x - %A + 2%A - 1, 2y + %A - 4%A + 1, 2z - %A + 2%A - 1, +--R 3 +--R 2t - %A + 2%A - 1] +--R ] +--R , +--R +--R 4 3 2 +--R [complexRoots= ? - 3? + 4? - 6? + 13, +--R +--R coordinates = +--R 3 2 3 2 +--R [9x - 2%A + 4%A - %A + 2, 9y + %A - 2%A + 5%A - 1, +--R 3 2 3 2 +--R 9z + %A - 2%A + 5%A - 1, 9t + %A - 2%A - 4%A - 1] +--R ] +--R , +--R +--R 4 2 +--R [complexRoots= ? - 11? + 37, +--R +--R coordinates = +--R 2 2 2 2 +--R [3x - %A + 7,6y + %A + 3%A - 7,3z - %A + 7,6t + %A - 3%A - 7] +--R ] +--R , +--R [complexRoots= ? + 1,coordinates= [x - 1,y,z - 1,t + 1]], +--R [complexRoots= ? + 2,coordinates= [x,y - 1,z - 1,t + 1]], +--R [complexRoots= ? - 2,coordinates= [x,y - 1,z + 1,t - 1]], +--R [complexRoots= ?,coordinates= [x,y + 1,z - 1,t - 1]], +--R [complexRoots= ? - 2,coordinates= [x - 1,y,z + 1,t - 1]], +--R [complexRoots= ?,coordinates= [x + 1,y,z - 1,t - 1]], +--R +--R 4 3 2 +--R [complexRoots= ? + 5? + 16? + 30? + 57, +--R +--R coordinates = +--R 3 2 3 2 +--R [151x + 15%A + 54%A + 104%A + 93, 151y - 10%A - 36%A - 19%A - 62, +--R 3 2 3 2 +--R 151z - 5%A - 18%A - 85%A - 31, 151t - 5%A - 18%A - 85%A - 31] +--R ] +--R , +--R +--R 4 3 2 +--R [complexRoots= ? - ? - 2? + 3, +--R 3 3 3 +--R coordinates= [x - %A + 2%A + 1,y + %A - %A - 1,z - %A,t + %A - %A - 1]] +--R , +--R +--R 4 3 2 +--R [complexRoots= ? + 2? - 8? + 48, +--R +--R coordinates = +--R 3 3 3 +--R [8x - %A + 4%A - 8,2y + %A,8z + %A - 8%A + 8,8t - %A + 4%A - 8] +--R ] +--R , +--R +--R 5 4 3 2 +--R [complexRoots= ? + ? - 2? - 4? + 5? + 8, +--R 3 3 3 +--R coordinates= [3x + %A - 1,3y + %A - 1,3z + %A - 1,t - %A]] +--R , +--R 3 +--R [complexRoots= ? + 3? - 1,coordinates= [x - %A,y - %A,z - %A,t - %A]]] +--RType: List Record(complexRoots: SparseUnivariatePolynomial Integer,coordinates: List Polynomial Integer) +--E 21 + +--S 22 of 28 +ts := lts.1 +--R +--R +--R (22) +--R 2 3 3 +--R {t + t + 1, z - z - t + t, +--R +--R 3 2 2 3 6 3 3 2 +--R (3z + 3t - 3)y + (3z + (6t - 6)z + 3t - 6t + 3)y + (3t - 3)z +--R + +--R 6 3 9 6 3 +--R (3t - 6t + 3)z + t - 3t + 5t - 3t +--R , +--R x + y + z} +--R Type: RegularChain(Integer,[x,y,z,t]) +--E 22 + +univariateSolve(ts)$pack +--S 23 of 28 +--R +--R +--R (23) +--R [ +--R 4 3 2 +--R [complexRoots= ? + 5? + 16? + 30? + 57, +--R +--R coordinates = +--R 3 2 3 2 +--R [151x + 15%A + 54%A + 104%A + 93, 151y - 10%A - 36%A - 19%A - 62, +--R 3 2 3 2 +--R 151z - 5%A - 18%A - 85%A - 31, 151t - 5%A - 18%A - 85%A - 31] +--R ] +--R , +--R +--R 4 3 2 +--R [complexRoots= ? - ? - 2? + 3, +--R 3 3 3 +--R coordinates= [x - %A + 2%A + 1,y + %A - %A - 1,z - %A,t + %A - %A - 1]] +--R , +--R +--R 4 3 2 +--R [complexRoots= ? + 2? - 8? + 48, +--R +--R coordinates = +--R 3 3 3 +--R [8x - %A + 4%A - 8,2y + %A,8z + %A - 8%A + 8,8t - %A + 4%A - 8] +--R ] +--R ] +--RType: List Record(complexRoots: SparseUnivariatePolynomial Integer,coordinates: List Polynomial Integer) +--E 23 + +--S 24 +realSolve(ts)$pack +--R +--R +--R (24) [] +--R Type: List List RealClosure Fraction Integer +--E 24 + +--S 25 of 28 +lr2 := realSolve(lf)$pack +--R +--R +--R (25) +--R [[0,- 1,1,1], [0,0,1,0], [1,0,0,0], [0,0,0,1], [0,1,0,0], [1,0,%B37,- %B37], +--R [1,0,%B38,- %B38], [0,1,%B35,- %B35], [0,1,%B36,- %B36], [- 1,0,1,1], +--R +--R [%B32, +--R +--R 1 15 2 14 1 13 4 12 11 11 4 10 +--R -- %B32 + -- %B32 + -- %B32 - -- %B32 - -- %B32 - -- %B32 +--R 27 27 27 27 27 27 +--R + +--R 1 9 14 8 1 7 2 6 1 5 2 4 3 +--R -- %B32 + -- %B32 + -- %B32 + - %B32 + - %B32 + - %B32 + %B32 +--R 27 27 27 9 3 9 +--R + +--R 4 2 +--R - %B32 - %B32 - 2 +--R 3 +--R , +--R +--R 1 15 1 14 1 13 2 12 11 11 2 10 +--R - -- %B32 - -- %B32 - -- %B32 + -- %B32 + -- %B32 + -- %B32 +--R 54 27 54 27 54 27 +--R + +--R 1 9 7 8 1 7 1 6 1 5 1 4 3 +--R - -- %B32 - -- %B32 - -- %B32 - - %B32 - - %B32 - - %B32 - %B32 +--R 54 27 54 9 6 9 +--R + +--R 2 2 1 3 +--R - - %B32 + - %B32 + - +--R 3 2 2 +--R , +--R +--R 1 15 1 14 1 13 2 12 11 11 2 10 +--R - -- %B32 - -- %B32 - -- %B32 + -- %B32 + -- %B32 + -- %B32 +--R 54 27 54 27 54 27 +--R + +--R 1 9 7 8 1 7 1 6 1 5 1 4 3 +--R - -- %B32 - -- %B32 - -- %B32 - - %B32 - - %B32 - - %B32 - %B32 +--R 54 27 54 9 6 9 +--R + +--R 2 2 1 3 +--R - - %B32 + - %B32 + - +--R 3 2 2 +--R ] +--R , +--R +--R [%B33, +--R +--R 1 15 2 14 1 13 4 12 11 11 4 10 +--R -- %B33 + -- %B33 + -- %B33 - -- %B33 - -- %B33 - -- %B33 +--R 27 27 27 27 27 27 +--R + +--R 1 9 14 8 1 7 2 6 1 5 2 4 3 +--R -- %B33 + -- %B33 + -- %B33 + - %B33 + - %B33 + - %B33 + %B33 +--R 27 27 27 9 3 9 +--R + +--R 4 2 +--R - %B33 - %B33 - 2 +--R 3 +--R , +--R +--R 1 15 1 14 1 13 2 12 11 11 2 10 +--R - -- %B33 - -- %B33 - -- %B33 + -- %B33 + -- %B33 + -- %B33 +--R 54 27 54 27 54 27 +--R + +--R 1 9 7 8 1 7 1 6 1 5 1 4 3 +--R - -- %B33 - -- %B33 - -- %B33 - - %B33 - - %B33 - - %B33 - %B33 +--R 54 27 54 9 6 9 +--R + +--R 2 2 1 3 +--R - - %B33 + - %B33 + - +--R 3 2 2 +--R , +--R +--R 1 15 1 14 1 13 2 12 11 11 2 10 +--R - -- %B33 - -- %B33 - -- %B33 + -- %B33 + -- %B33 + -- %B33 +--R 54 27 54 27 54 27 +--R + +--R 1 9 7 8 1 7 1 6 1 5 1 4 3 +--R - -- %B33 - -- %B33 - -- %B33 - - %B33 - - %B33 - - %B33 - %B33 +--R 54 27 54 9 6 9 +--R + +--R 2 2 1 3 +--R - - %B33 + - %B33 + - +--R 3 2 2 +--R ] +--R , +--R +--R [%B34, +--R +--R 1 15 2 14 1 13 4 12 11 11 4 10 +--R -- %B34 + -- %B34 + -- %B34 - -- %B34 - -- %B34 - -- %B34 +--R 27 27 27 27 27 27 +--R + +--R 1 9 14 8 1 7 2 6 1 5 2 4 3 +--R -- %B34 + -- %B34 + -- %B34 + - %B34 + - %B34 + - %B34 + %B34 +--R 27 27 27 9 3 9 +--R + +--R 4 2 +--R - %B34 - %B34 - 2 +--R 3 +--R , +--R +--R 1 15 1 14 1 13 2 12 11 11 2 10 +--R - -- %B34 - -- %B34 - -- %B34 + -- %B34 + -- %B34 + -- %B34 +--R 54 27 54 27 54 27 +--R + +--R 1 9 7 8 1 7 1 6 1 5 1 4 3 +--R - -- %B34 - -- %B34 - -- %B34 - - %B34 - - %B34 - - %B34 - %B34 +--R 54 27 54 9 6 9 +--R + +--R 2 2 1 3 +--R - - %B34 + - %B34 + - +--R 3 2 2 +--R , +--R +--R 1 15 1 14 1 13 2 12 11 11 2 10 +--R - -- %B34 - -- %B34 - -- %B34 + -- %B34 + -- %B34 + -- %B34 +--R 54 27 54 27 54 27 +--R + +--R 1 9 7 8 1 7 1 6 1 5 1 4 3 +--R - -- %B34 - -- %B34 - -- %B34 - - %B34 - - %B34 - - %B34 - %B34 +--R 54 27 54 9 6 9 +--R + +--R 2 2 1 3 +--R - - %B34 + - %B34 + - +--R 3 2 2 +--R ] +--R , +--R [- 1,1,0,1], [- 1,1,1,0], +--R +--R [%B23, +--R +--R 1 15 1 14 1 13 2 12 11 11 2 10 +--R - -- %B23 - -- %B23 - -- %B23 + -- %B23 + -- %B23 + -- %B23 +--R 54 27 54 27 54 27 +--R + +--R 1 9 7 8 1 7 1 6 1 5 1 4 3 +--R - -- %B23 - -- %B23 - -- %B23 - - %B23 - - %B23 - - %B23 - %B23 +--R 54 27 54 9 6 9 +--R + +--R 2 2 1 3 +--R - - %B23 + - %B23 + - +--R 3 2 2 +--R , +--R %B30, +--R +--R 1 15 1 14 1 13 2 12 11 11 +--R - %B30 + -- %B23 + -- %B23 + -- %B23 - -- %B23 - -- %B23 +--R 54 27 54 27 54 +--R + +--R 2 10 1 9 7 8 1 7 1 6 1 5 +--R - -- %B23 + -- %B23 + -- %B23 + -- %B23 + - %B23 + - %B23 +--R 27 54 27 54 9 6 +--R + +--R 1 4 2 2 1 1 +--R - %B23 + - %B23 - - %B23 - - +--R 9 3 2 2 +--R ] +--R , +--R +--R [%B23, +--R +--R 1 15 1 14 1 13 2 12 11 11 2 10 +--R - -- %B23 - -- %B23 - -- %B23 + -- %B23 + -- %B23 + -- %B23 +--R 54 27 54 27 54 27 +--R + +--R 1 9 7 8 1 7 1 6 1 5 1 4 3 +--R - -- %B23 - -- %B23 - -- %B23 - - %B23 - - %B23 - - %B23 - %B23 +--R 54 27 54 9 6 9 +--R + +--R 2 2 1 3 +--R - - %B23 + - %B23 + - +--R 3 2 2 +--R , +--R %B31, +--R +--R 1 15 1 14 1 13 2 12 11 11 +--R - %B31 + -- %B23 + -- %B23 + -- %B23 - -- %B23 - -- %B23 +--R 54 27 54 27 54 +--R + +--R 2 10 1 9 7 8 1 7 1 6 1 5 +--R - -- %B23 + -- %B23 + -- %B23 + -- %B23 + - %B23 + - %B23 +--R 27 54 27 54 9 6 +--R + +--R 1 4 2 2 1 1 +--R - %B23 + - %B23 - - %B23 - - +--R 9 3 2 2 +--R ] +--R , +--R +--R [%B24, +--R +--R 1 15 1 14 1 13 2 12 11 11 2 10 +--R - -- %B24 - -- %B24 - -- %B24 + -- %B24 + -- %B24 + -- %B24 +--R 54 27 54 27 54 27 +--R + +--R 1 9 7 8 1 7 1 6 1 5 1 4 3 +--R - -- %B24 - -- %B24 - -- %B24 - - %B24 - - %B24 - - %B24 - %B24 +--R 54 27 54 9 6 9 +--R + +--R 2 2 1 3 +--R - - %B24 + - %B24 + - +--R 3 2 2 +--R , +--R %B28, +--R +--R 1 15 1 14 1 13 2 12 11 11 +--R - %B28 + -- %B24 + -- %B24 + -- %B24 - -- %B24 - -- %B24 +--R 54 27 54 27 54 +--R + +--R 2 10 1 9 7 8 1 7 1 6 1 5 +--R - -- %B24 + -- %B24 + -- %B24 + -- %B24 + - %B24 + - %B24 +--R 27 54 27 54 9 6 +--R + +--R 1 4 2 2 1 1 +--R - %B24 + - %B24 - - %B24 - - +--R 9 3 2 2 +--R ] +--R , +--R +--R [%B24, +--R +--R 1 15 1 14 1 13 2 12 11 11 2 10 +--R - -- %B24 - -- %B24 - -- %B24 + -- %B24 + -- %B24 + -- %B24 +--R 54 27 54 27 54 27 +--R + +--R 1 9 7 8 1 7 1 6 1 5 1 4 3 +--R - -- %B24 - -- %B24 - -- %B24 - - %B24 - - %B24 - - %B24 - %B24 +--R 54 27 54 9 6 9 +--R + +--R 2 2 1 3 +--R - - %B24 + - %B24 + - +--R 3 2 2 +--R , +--R %B29, +--R +--R 1 15 1 14 1 13 2 12 11 11 +--R - %B29 + -- %B24 + -- %B24 + -- %B24 - -- %B24 - -- %B24 +--R 54 27 54 27 54 +--R + +--R 2 10 1 9 7 8 1 7 1 6 1 5 +--R - -- %B24 + -- %B24 + -- %B24 + -- %B24 + - %B24 + - %B24 +--R 27 54 27 54 9 6 +--R + +--R 1 4 2 2 1 1 +--R - %B24 + - %B24 - - %B24 - - +--R 9 3 2 2 +--R ] +--R , +--R +--R [%B25, +--R +--R 1 15 1 14 1 13 2 12 11 11 2 10 +--R - -- %B25 - -- %B25 - -- %B25 + -- %B25 + -- %B25 + -- %B25 +--R 54 27 54 27 54 27 +--R + +--R 1 9 7 8 1 7 1 6 1 5 1 4 3 +--R - -- %B25 - -- %B25 - -- %B25 - - %B25 - - %B25 - - %B25 - %B25 +--R 54 27 54 9 6 9 +--R + +--R 2 2 1 3 +--R - - %B25 + - %B25 + - +--R 3 2 2 +--R , +--R %B26, +--R +--R 1 15 1 14 1 13 2 12 11 11 +--R - %B26 + -- %B25 + -- %B25 + -- %B25 - -- %B25 - -- %B25 +--R 54 27 54 27 54 +--R + +--R 2 10 1 9 7 8 1 7 1 6 1 5 +--R - -- %B25 + -- %B25 + -- %B25 + -- %B25 + - %B25 + - %B25 +--R 27 54 27 54 9 6 +--R + +--R 1 4 2 2 1 1 +--R - %B25 + - %B25 - - %B25 - - +--R 9 3 2 2 +--R ] +--R , +--R +--R [%B25, +--R +--R 1 15 1 14 1 13 2 12 11 11 2 10 +--R - -- %B25 - -- %B25 - -- %B25 + -- %B25 + -- %B25 + -- %B25 +--R 54 27 54 27 54 27 +--R + +--R 1 9 7 8 1 7 1 6 1 5 1 4 3 +--R - -- %B25 - -- %B25 - -- %B25 - - %B25 - - %B25 - - %B25 - %B25 +--R 54 27 54 9 6 9 +--R + +--R 2 2 1 3 +--R - - %B25 + - %B25 + - +--R 3 2 2 +--R , +--R %B27, +--R +--R 1 15 1 14 1 13 2 12 11 11 +--R - %B27 + -- %B25 + -- %B25 + -- %B25 - -- %B25 - -- %B25 +--R 54 27 54 27 54 +--R + +--R 2 10 1 9 7 8 1 7 1 6 1 5 +--R - -- %B25 + -- %B25 + -- %B25 + -- %B25 + - %B25 + - %B25 +--R 27 54 27 54 9 6 +--R + +--R 1 4 2 2 1 1 +--R - %B25 + - %B25 - - %B25 - - +--R 9 3 2 2 +--R ] +--R , +--R [1,%B21,- %B21,0], [1,%B22,- %B22,0], [1,%B19,0,- %B19], [1,%B20,0,- %B20], +--R 1 3 1 1 3 1 1 3 1 +--R [%B17,- - %B17 + -,- - %B17 + -,- - %B17 + -], +--R 3 3 3 3 3 3 +--R 1 3 1 1 3 1 1 3 1 +--R [%B18,- - %B18 + -,- - %B18 + -,- - %B18 + -]] +--R 3 3 3 3 3 3 +--R Type: List List RealClosure Fraction Integer +--E 25 + +--S 26 of 28 +#lr2 +--R +--R +--R (26) 27 +--R Type: PositiveInteger +--E 26 + +--S 27 of 28 +lpr2 := positiveSolve(lf)$pack +--R +--R +--R 1 3 1 1 3 1 1 3 1 +--R (27) [[%B40,- - %B40 + -,- - %B40 + -,- - %B40 + -]] +--R 3 3 3 3 3 3 +--R Type: List List RealClosure Fraction Integer +--E 27 + +--S 28 of 28 +[approximate(r,1/10**21)::Float for r in lpr2.1] +--R +--R +--R (28) +--R [0.3221853546 2608559291, 0.3221853546 2608559291, 0.3221853546 2608559291, +--R 0.3221853546 2608559291] +--R Type: List Float +--E 28 +)spool +)lisp (bye) +@ +<>= +==================================================================== +ZeroDimensionalSolvePackage examples +==================================================================== + +The ZeroDimensionalSolvePackage package constructor provides +operations for computing symbolically the complex or real roots of +zero-dimensional algebraic systems. + +The package provides no multiplicity information (i.e. some returned +roots may be double or higher) but only distinct roots are returned. + +Complex roots are given by means of univariate representations of +irreducible regular chains. These representations are computed by the +univariateSolve operation (by calling the +InternalRationalUnivariateRepresentationPackage package constructor +which does the job). + +Real roots are given by means of tuples of coordinates lying in the +RealClosure of the coefficient ring. They are computed by the +realSolve and positiveSolve operations. The former computes all the +solutions of the input system with real coordinates whereas the later +concentrate on the solutions with (strictly) positive coordinates. In +both cases, the computations are performed by the RealClosure constructor. + +Both computations of complex roots and real roots rely on triangular +decompositions. These decompositions can be computed in two different +ways. First, by a applying the zeroSetSplit operation from the REGSET +domain constructor. In that case, no Groebner bases are computed. +This strategy is used by default. Secondly, by applying the zeroSetSplit +from LEXTRIPK. To use this later strategy with the operations +univariateSolve, realSolve and positiveSolve one just needs to use an +extra boolean argument. + +Note that the way of understanding triangular decompositions is +detailed in the example of the RegularTriangularSet constructor. + +The ZeroDimensionalSolvePackage constructor takes three arguments.The +first one R is the coefficient ring; it must belong to the categories +OrderedRing, EuclideanDomain, CharacteristicZero and RealConstant. This +means essentially that R is Integer or Fraction(Integer). The second +argument ls is the list of variables involved in the systems to solve. +The third one MUST BE concat(ls,s) where s is an additional symbol used +for the univariate representations. The abbreviation for +ZeroDimensionalSolvePackage is ZDSOLVE. + +We illustrate now how to use the constructor ZDSOLVE by two examples: +the Arnborg and Lazard system and the L-3 system (Aubry and Moreno +Maza). Note that the use of this package is also demonstrated in the +example of the LexTriangularPackage constructor. + +Define the coefficient ring. + + R := Integer + Integer + Type: Domain + +Define the lists of variables: + + ls : List Symbol := [x,y,z,t] + [x,y,z,t] + Type: List Symbol + +and: + + ls2 : List Symbol := [x,y,z,t,new()$Symbol] + [x,y,z,t,%A] + Type: List Symbol + +Call the package: + + pack := ZDSOLVE(R,ls,ls2) + ZeroDimensionalSolvePackage(Integer,[x,y,z,t],[x,y,z,t,%A]) + Type: Domain + +Define a polynomial system (Arnborg-Lazard) + + p1 := x**2*y*z + x*y**2*z + x*y*z**2 + x*y*z + x*y + x*z + y*z + 2 2 2 + x y z + (x y + (x + x + 1)y + x)z + x y + Type: Polynomial Integer + + p2 := x**2*y**2*z + x*y**2*z**2 + x**2*y*z + x*y*z + y*z + x + z + 2 2 2 2 2 + x y z + (x y + (x + x + 1)y + 1)z + x + Type: Polynomial Integer + + p3 := x**2*y**2*z**2 + x**2*y**2*z + x*y**2*z + x*y*z + x*z + z + 1 + 2 2 2 2 2 + x y z + ((x + x)y + x y + x + 1)z + 1 + Type: Polynomial Integer + + lp := [p1, p2, p3] + 2 2 2 + [x y z + (x y + (x + x + 1)y + x)z + x y, + 2 2 2 2 2 + x y z + (x y + (x + x + 1)y + 1)z + x, + 2 2 2 2 2 + x y z + ((x + x)y + x y + x + 1)z + 1] + Type: List Polynomial Integer + +Note that these polynomials do not involve the variable t; we will use +it in the second example. + +First compute a decomposition into regular chains (i.e. regular +triangular sets). + + triangSolve(lp)$pack + [ + { + 20 19 18 17 16 15 14 13 12 + z - 6z - 41z + 71z + 106z + 92z + 197z + 145z + 257z + + + 11 10 9 8 7 6 5 4 3 + 278z + 201z + 278z + 257z + 145z + 197z + 92z + 106z + 71z + + + 2 + - 41z - 6z + 1 + , + 19 18 17 16 + 14745844z + 50357474z - 130948857z - 185261586z + + + 15 14 13 12 + - 180077775z - 338007307z - 275379623z - 453190404z + + + 11 10 9 8 + - 474597456z - 366147695z - 481433567z - 430613166z + + + 7 6 5 4 + - 261878358z - 326073537z - 163008796z - 177213227z + + + 3 2 + - 104356755z + 65241699z + 9237732z - 1567348 + * + y + + + 19 18 17 16 15 + 1917314z + 6508991z - 16973165z - 24000259z - 23349192z + + + 14 13 12 11 10 + - 43786426z - 35696474z - 58724172z - 61480792z - 47452440z + + + 9 8 7 6 5 + - 62378085z - 55776527z - 33940618z - 42233406z - 21122875z + + + 4 3 2 + - 22958177z - 13504569z + 8448317z + 1195888z - 202934 + , + 3 2 3 2 2 2 + ((z - 2z)y + (- z - z - 2z - 1)y - z - z + 1)x + z - 1} + ] + Type: List RegularChain(Integer,[x,y,z,t]) + +We can see easily from this decomposition (consisting of a single +regular chain) that the input system has 20 complex roots. + +Then we compute a univariate representation of this regular chain. + + univariateSolve(lp)$pack + [ + [ + complexRoots = + 12 11 10 9 8 7 6 5 4 3 + ? - 12? + 24? + 4? - 9? + 27? - 21? + 27? - 9? + 4? + + + 2 + 24? - 12? + 1 + , + coordinates = + [ + 11 10 9 8 7 6 + 63x + 62%A - 721%A + 1220%A + 705%A - 285%A + 1512%A + + + 5 4 3 2 + - 735%A + 1401%A - 21%A + 215%A + 1577%A - 142 + , + 11 10 9 8 7 6 + 63y - 75%A + 890%A - 1682%A - 516%A + 588%A - 1953%A + + + 5 4 3 2 + 1323%A - 1815%A + 426%A - 243%A - 1801%A + 679 + , + z - %A] + ] + , + 6 5 4 3 2 + [complexRoots= ? + ? + ? + ? + ? + ? + 1, + 5 3 + coordinates= [x - %A ,y - %A ,z - %A]] + , + 2 + [complexRoots= ? + 5? + 1,coordinates= [x - 1,y - 1,z - %A]]] + Type: List Record(complexRoots: SparseUnivariatePolynomial Integer, + coordinates: List Polynomial Integer) + +We see that the zeros of our regular chain are split into three components. +This is due to the use of univariate polynomial factorization. + +Each of these components consist of two parts. The first one is an +irreducible univariate polynomial p(?) which defines a simple +algebraic extension of the field of fractions of R. The second one +consists of multivariate polynomials pol1(x,%A), pol2(y,%A) and +pol3(z,%A). Each of these polynomials involve two variables: one is +an indeterminate x, y or z of the input system lp and the other is %A +which represents any root of p(?). Recall that this %A is the last +element of the third parameter of ZDSOLVE. Thus any complex root ? of +p(?) leads to a solution of the input system lp by replacing %A by +this ? in pol1(x,%A), pol2(y,%A) and pol3(z,%A). Note that the +polynomials pol1(x,%A), pol2(y,%A) and pol3(z,%A) have degree one +w.r.t. x, y or z respectively. This is always the case for all +univariate representations. Hence the operation univariateSolve +replaces a system of multivariate polynomials by a list of univariate +polynomials, what justifies its name. Another example of univariate +representations illustrates the LexTriangularPackage package constructor. + +We now compute the solutions with real coordinates: + + lr := realSolve(lp)$pack + [ + [%B1, + 1184459 19 2335702 18 5460230 17 79900378 16 + ------- %B1 - ------- %B1 - ------- %B1 + -------- %B1 + 1645371 548457 182819 1645371 + + + 43953929 15 13420192 14 553986 13 193381378 12 + -------- %B1 + -------- %B1 + ------ %B1 + --------- %B1 + 548457 182819 3731 1645371 + + + 35978916 11 358660781 10 271667666 9 118784873 8 + -------- %B1 + --------- %B1 + --------- %B1 + --------- %B1 + 182819 1645371 1645371 548457 + + + 337505020 7 1389370 6 688291 5 3378002 4 + --------- %B1 + ------- %B1 + ------ %B1 + ------- %B1 + 1645371 11193 4459 42189 + + + 140671876 3 32325724 2 8270 9741532 + --------- %B1 + -------- %B1 - ---- %B1 - ------- + 1645371 548457 343 1645371 + , + 91729 19 487915 18 4114333 17 1276987 16 + - ------ %B1 + ------ %B1 + ------- %B1 - ------- %B1 + 705159 705159 705159 235053 + + + 13243117 15 16292173 14 26536060 13 722714 12 + - -------- %B1 - -------- %B1 - -------- %B1 - ------ %B1 + 705159 705159 705159 18081 + + + 5382578 11 15449995 10 14279770 9 6603890 8 + - ------- %B1 - -------- %B1 - -------- %B1 - ------- %B1 + 100737 235053 235053 100737 + + + 409930 7 37340389 6 34893715 5 26686318 4 + - ------ %B1 - -------- %B1 - -------- %B1 - -------- %B1 + 6027 705159 705159 705159 + + + 801511 3 17206178 2 4406102 377534 + - ------ %B1 - -------- %B1 - ------- %B1 + ------ + 26117 705159 705159 705159 + ] + , + [%B2, + 1184459 19 2335702 18 5460230 17 79900378 16 + ------- %B2 - ------- %B2 - ------- %B2 + -------- %B2 + 1645371 548457 182819 1645371 + + + 43953929 15 13420192 14 553986 13 193381378 12 + -------- %B2 + -------- %B2 + ------ %B2 + --------- %B2 + 548457 182819 3731 1645371 + + + 35978916 11 358660781 10 271667666 9 118784873 8 + -------- %B2 + --------- %B2 + --------- %B2 + --------- %B2 + 182819 1645371 1645371 548457 + + + 337505020 7 1389370 6 688291 5 3378002 4 + --------- %B2 + ------- %B2 + ------ %B2 + ------- %B2 + 1645371 11193 4459 42189 + + + 140671876 3 32325724 2 8270 9741532 + --------- %B2 + -------- %B2 - ---- %B2 - ------- + 1645371 548457 343 1645371 + , + 91729 19 487915 18 4114333 17 1276987 16 + - ------ %B2 + ------ %B2 + ------- %B2 - ------- %B2 + 705159 705159 705159 235053 + + + 13243117 15 16292173 14 26536060 13 722714 12 + - -------- %B2 - -------- %B2 - -------- %B2 - ------ %B2 + 705159 705159 705159 18081 + + + 5382578 11 15449995 10 14279770 9 6603890 8 + - ------- %B2 - -------- %B2 - -------- %B2 - ------- %B2 + 100737 235053 235053 100737 + + + 409930 7 37340389 6 34893715 5 26686318 4 + - ------ %B2 - -------- %B2 - -------- %B2 - -------- %B2 + 6027 705159 705159 705159 + + + 801511 3 17206178 2 4406102 377534 + - ------ %B2 - -------- %B2 - ------- %B2 + ------ + 26117 705159 705159 705159 + ] + , + [%B3, + 1184459 19 2335702 18 5460230 17 79900378 16 + ------- %B3 - ------- %B3 - ------- %B3 + -------- %B3 + 1645371 548457 182819 1645371 + + + 43953929 15 13420192 14 553986 13 193381378 12 + -------- %B3 + -------- %B3 + ------ %B3 + --------- %B3 + 548457 182819 3731 1645371 + + + 35978916 11 358660781 10 271667666 9 118784873 8 + -------- %B3 + --------- %B3 + --------- %B3 + --------- %B3 + 182819 1645371 1645371 548457 + + + 337505020 7 1389370 6 688291 5 3378002 4 + --------- %B3 + ------- %B3 + ------ %B3 + ------- %B3 + 1645371 11193 4459 42189 + + + 140671876 3 32325724 2 8270 9741532 + --------- %B3 + -------- %B3 - ---- %B3 - ------- + 1645371 548457 343 1645371 + , + 91729 19 487915 18 4114333 17 1276987 16 + - ------ %B3 + ------ %B3 + ------- %B3 - ------- %B3 + 705159 705159 705159 235053 + + + 13243117 15 16292173 14 26536060 13 722714 12 + - -------- %B3 - -------- %B3 - -------- %B3 - ------ %B3 + 705159 705159 705159 18081 + + + 5382578 11 15449995 10 14279770 9 6603890 8 + - ------- %B3 - -------- %B3 - -------- %B3 - ------- %B3 + 100737 235053 235053 100737 + + + 409930 7 37340389 6 34893715 5 26686318 4 + - ------ %B3 - -------- %B3 - -------- %B3 - -------- %B3 + 6027 705159 705159 705159 + + + 801511 3 17206178 2 4406102 377534 + - ------ %B3 - -------- %B3 - ------- %B3 + ------ + 26117 705159 705159 705159 + ] + , + [%B4, + 1184459 19 2335702 18 5460230 17 79900378 16 + ------- %B4 - ------- %B4 - ------- %B4 + -------- %B4 + 1645371 548457 182819 1645371 + + + 43953929 15 13420192 14 553986 13 193381378 12 + -------- %B4 + -------- %B4 + ------ %B4 + --------- %B4 + 548457 182819 3731 1645371 + + + 35978916 11 358660781 10 271667666 9 118784873 8 + -------- %B4 + --------- %B4 + --------- %B4 + --------- %B4 + 182819 1645371 1645371 548457 + + + 337505020 7 1389370 6 688291 5 3378002 4 + --------- %B4 + ------- %B4 + ------ %B4 + ------- %B4 + 1645371 11193 4459 42189 + + + 140671876 3 32325724 2 8270 9741532 + --------- %B4 + -------- %B4 - ---- %B4 - ------- + 1645371 548457 343 1645371 + , + 91729 19 487915 18 4114333 17 1276987 16 + - ------ %B4 + ------ %B4 + ------- %B4 - ------- %B4 + 705159 705159 705159 235053 + + + 13243117 15 16292173 14 26536060 13 722714 12 + - -------- %B4 - -------- %B4 - -------- %B4 - ------ %B4 + 705159 705159 705159 18081 + + + 5382578 11 15449995 10 14279770 9 6603890 8 + - ------- %B4 - -------- %B4 - -------- %B4 - ------- %B4 + 100737 235053 235053 100737 + + + 409930 7 37340389 6 34893715 5 26686318 4 + - ------ %B4 - -------- %B4 - -------- %B4 - -------- %B4 + 6027 705159 705159 705159 + + + 801511 3 17206178 2 4406102 377534 + - ------ %B4 - -------- %B4 - ------- %B4 + ------ + 26117 705159 705159 705159 + ] + , + [%B5, + 1184459 19 2335702 18 5460230 17 79900378 16 + ------- %B5 - ------- %B5 - ------- %B5 + -------- %B5 + 1645371 548457 182819 1645371 + + + 43953929 15 13420192 14 553986 13 193381378 12 + -------- %B5 + -------- %B5 + ------ %B5 + --------- %B5 + 548457 182819 3731 1645371 + + + 35978916 11 358660781 10 271667666 9 118784873 8 + -------- %B5 + --------- %B5 + --------- %B5 + --------- %B5 + 182819 1645371 1645371 548457 + + + 337505020 7 1389370 6 688291 5 3378002 4 + --------- %B5 + ------- %B5 + ------ %B5 + ------- %B5 + 1645371 11193 4459 42189 + + + 140671876 3 32325724 2 8270 9741532 + --------- %B5 + -------- %B5 - ---- %B5 - ------- + 1645371 548457 343 1645371 + , + 91729 19 487915 18 4114333 17 1276987 16 + - ------ %B5 + ------ %B5 + ------- %B5 - ------- %B5 + 705159 705159 705159 235053 + + + 13243117 15 16292173 14 26536060 13 722714 12 + - -------- %B5 - -------- %B5 - -------- %B5 - ------ %B5 + 705159 705159 705159 18081 + + + 5382578 11 15449995 10 14279770 9 6603890 8 + - ------- %B5 - -------- %B5 - -------- %B5 - ------- %B5 + 100737 235053 235053 100737 + + + 409930 7 37340389 6 34893715 5 26686318 4 + - ------ %B5 - -------- %B5 - -------- %B5 - -------- %B5 + 6027 705159 705159 705159 + + + 801511 3 17206178 2 4406102 377534 + - ------ %B5 - -------- %B5 - ------- %B5 + ------ + 26117 705159 705159 705159 + ] + , + [%B6, + 1184459 19 2335702 18 5460230 17 79900378 16 + ------- %B6 - ------- %B6 - ------- %B6 + -------- %B6 + 1645371 548457 182819 1645371 + + + 43953929 15 13420192 14 553986 13 193381378 12 + -------- %B6 + -------- %B6 + ------ %B6 + --------- %B6 + 548457 182819 3731 1645371 + + + 35978916 11 358660781 10 271667666 9 118784873 8 + -------- %B6 + --------- %B6 + --------- %B6 + --------- %B6 + 182819 1645371 1645371 548457 + + + 337505020 7 1389370 6 688291 5 3378002 4 + --------- %B6 + ------- %B6 + ------ %B6 + ------- %B6 + 1645371 11193 4459 42189 + + + 140671876 3 32325724 2 8270 9741532 + --------- %B6 + -------- %B6 - ---- %B6 - ------- + 1645371 548457 343 1645371 + , + 91729 19 487915 18 4114333 17 1276987 16 + - ------ %B6 + ------ %B6 + ------- %B6 - ------- %B6 + 705159 705159 705159 235053 + + + 13243117 15 16292173 14 26536060 13 722714 12 + - -------- %B6 - -------- %B6 - -------- %B6 - ------ %B6 + 705159 705159 705159 18081 + + + 5382578 11 15449995 10 14279770 9 6603890 8 + - ------- %B6 - -------- %B6 - -------- %B6 - ------- %B6 + 100737 235053 235053 100737 + + + 409930 7 37340389 6 34893715 5 26686318 4 + - ------ %B6 - -------- %B6 - -------- %B6 - -------- %B6 + 6027 705159 705159 705159 + + + 801511 3 17206178 2 4406102 377534 + - ------ %B6 - -------- %B6 - ------- %B6 + ------ + 26117 705159 705159 705159 + ] + , + [%B7, + 1184459 19 2335702 18 5460230 17 79900378 16 + ------- %B7 - ------- %B7 - ------- %B7 + -------- %B7 + 1645371 548457 182819 1645371 + + + 43953929 15 13420192 14 553986 13 193381378 12 + -------- %B7 + -------- %B7 + ------ %B7 + --------- %B7 + 548457 182819 3731 1645371 + + + 35978916 11 358660781 10 271667666 9 118784873 8 + -------- %B7 + --------- %B7 + --------- %B7 + --------- %B7 + 182819 1645371 1645371 548457 + + + 337505020 7 1389370 6 688291 5 3378002 4 + --------- %B7 + ------- %B7 + ------ %B7 + ------- %B7 + 1645371 11193 4459 42189 + + + 140671876 3 32325724 2 8270 9741532 + --------- %B7 + -------- %B7 - ---- %B7 - ------- + 1645371 548457 343 1645371 + , + 91729 19 487915 18 4114333 17 1276987 16 + - ------ %B7 + ------ %B7 + ------- %B7 - ------- %B7 + 705159 705159 705159 235053 + + + 13243117 15 16292173 14 26536060 13 722714 12 + - -------- %B7 - -------- %B7 - -------- %B7 - ------ %B7 + 705159 705159 705159 18081 + + + 5382578 11 15449995 10 14279770 9 6603890 8 + - ------- %B7 - -------- %B7 - -------- %B7 - ------- %B7 + 100737 235053 235053 100737 + + + 409930 7 37340389 6 34893715 5 26686318 4 + - ------ %B7 - -------- %B7 - -------- %B7 - -------- %B7 + 6027 705159 705159 705159 + + + 801511 3 17206178 2 4406102 377534 + - ------ %B7 - -------- %B7 - ------- %B7 + ------ + 26117 705159 705159 705159 + ] + , + [%B8, + 1184459 19 2335702 18 5460230 17 79900378 16 + ------- %B8 - ------- %B8 - ------- %B8 + -------- %B8 + 1645371 548457 182819 1645371 + + + 43953929 15 13420192 14 553986 13 193381378 12 + -------- %B8 + -------- %B8 + ------ %B8 + --------- %B8 + 548457 182819 3731 1645371 + + + 35978916 11 358660781 10 271667666 9 118784873 8 + -------- %B8 + --------- %B8 + --------- %B8 + --------- %B8 + 182819 1645371 1645371 548457 + + + 337505020 7 1389370 6 688291 5 3378002 4 + --------- %B8 + ------- %B8 + ------ %B8 + ------- %B8 + 1645371 11193 4459 42189 + + + 140671876 3 32325724 2 8270 9741532 + --------- %B8 + -------- %B8 - ---- %B8 - ------- + 1645371 548457 343 1645371 + , + 91729 19 487915 18 4114333 17 1276987 16 + - ------ %B8 + ------ %B8 + ------- %B8 - ------- %B8 + 705159 705159 705159 235053 + + + 13243117 15 16292173 14 26536060 13 722714 12 + - -------- %B8 - -------- %B8 - -------- %B8 - ------ %B8 + 705159 705159 705159 18081 + + + 5382578 11 15449995 10 14279770 9 6603890 8 + - ------- %B8 - -------- %B8 - -------- %B8 - ------- %B8 + 100737 235053 235053 100737 + + + 409930 7 37340389 6 34893715 5 26686318 4 + - ------ %B8 - -------- %B8 - -------- %B8 - -------- %B8 + 6027 705159 705159 705159 + + + 801511 3 17206178 2 4406102 377534 + - ------ %B8 - -------- %B8 - ------- %B8 + ------ + 26117 705159 705159 705159 + ] + ] + Type: List List RealClosure Fraction Integer + +The number of real solutions for the input system is: + + # lr + 8 + Type: PositiveInteger + +Each of these real solutions is given by a list of elements in +RealClosure(R). In these 8 lists, the first element is a value of z, +the second of y and the last of x. This is logical since by setting +the list of variables of the package to [x,y,z,t] we mean that the +elimination ordering on the variables is t < z < y < x. Note that +each system treated by the ZDSOLVE package constructor needs only to +be zero-dimensional w.r.t. the variables involved in the system it-self +and not necessarily w.r.t. all the variables used to define the package. + +We can approximate these real numbers as follows. This computation +takes between 30 sec. and 5 min, depending on your machine. + + [ [approximate(r,1/1000000) for r in point] for point in lr] + [ + 10048059 + [- --------, + 2097152 + + 4503057316985387943524397913838966414596731976211768219335881208385516_ + 314058924567176091423629695777403099833360761048898228916578137094309_ + 838597331137202584846939132376157019506760357601165917454986815382098_ + 789094851523420392811293126141329856546977145464661495487825919941188_ + 447041722440491921567263542158028061437758844364634410045253024786561_ + 923163288214175 + / + 4503057283025245488516511806985826635083100693757320465280554706865644_ + 949577509916867201889438090408354817931718593862797624551518983570793_ + 048774424291488708829840324189200301436123314860200821443733790755311_ + 243632919864895421704228949571290016119498807957023663865443069392027_ + 148979688266712323356043491523434068924275280417338574817381189277066_ + 143312396681216 + , + + 2106260768823475073894798680486016596249607148690685538763683715020639_ + 680858649650790055889505646893309447097099937802187329095325898785247_ + 249020717504983660482075156618738724514685333060011202964635166381351_ + 543255982200250305283981086837110614842307026091211297929876896285681_ + 830479054760056380762664905618462055306047816191782011588703789138988_ + 1895 + / + 2106260609498464192472113804816474175341962953296434102413903142368757_ + 967685273888585590975965211778862189872881953943640246297357061959812_ + 326103659799025126863258676567202342106877031710184247484181423288921_ + 837681237062708470295706218485928867400771937828499200923760593314168_ + 901000666373896347598118228556731037072026474496776228383762993923280_ + 0768 + ] + , + + 2563013 + [- -------, + 2097152 + + - + 2611346176791927789698617693237757719238259963063541781922752330440_ + 189899668072928338490768623593207442125925986733815932243504809294_ + 837523030237337236806668167446173001727271353311571242897 + / + 1165225400505222530583981916004589143757226610276858990008790134819_ + 914940922413753983971394019523433320408139928153188829495755455163_ + 963417619308395977544797140231469234269034921938055593984 + , + + 3572594550275917221096588729615788272998517054675603239578198141006034_ + 091735282826590621902304466963941971038923304526273329316373757450061_ + 9789892286110976997087250466235373 + / + 1039548269345598936877071244834026055800814551120170592200522366591759_ + 409659486442339141029452950265179989960104811875822530205346505131581_ + 2439017247289173865014702966308864 + ] + , + + 1715967 + [- -------, + 2097152 + + - + 4213093533784303521084839517977082390377261503969586224828998436606_ + 030656076359374564813773498376603121267822565801436206939519951465_ + 18222580524697287410022543952491 + / + 9441814144185374458649692034349224052436597470966253663930641960795_ + 805882585493199840191699917659443264824641135187383583888147867340_ + 19307857605820364195856822304768 + , + + 7635833347112644222515625424410831225347475669008589338834162172501904_ + 994376346730876809042845208919919925302105720971453918982731389072591_ + 4035 + / + 2624188764086097199784297610478066633934230467895851602278580978503784_ + 549205788499019640602266966026891580103543567625039018629887141284916_ + 75648 + ] + , + + 437701 + [- -------, + 2097152 + + 1683106908638349588322172332654225913562986313181951031452750161441497_ + 473455328150721364868355579646781603507777199075077835213366484533654_ + 91383623741304759 + / + 1683106868095213389001709982705913638963077668731226111167785188004907_ + 425226298680325887810962614140298597366984264887998908377068799998454_ + 23381649008099328 + , + + 4961550109835010186422681013422108735958714801003760639707968096646912_ + 82670847283444311723917219104249213450966312411133 + / + 4961549872757738315509192078210209029852897118611097126236384040829376_ + 59261914313170254867464792718363492160482442215424 + ] + , + + 222801 + [-------, + 2097152 + + - + 8994884880402428265107595121970691427136045692541978275573001865213_ + 759921588137716696126349101655220195142994932299137183241705867672_ + 383477 + / + 1167889998665026372177765100691888582708969960229934769690835752457_ + 077779416435209473767866507769405888942764587718542434255625992456_ + 372224 + , + + - + 2389704888133156878320801544373808395612771509208491019847452991885_ + 509546519525467839016613593999693886640036283570552321155037871291_ + 458703265 + / + 5355487273645096326090403286689931905988225444685411433221593833681_ + 192957562833671468654290340746993656285925599117602120446183443145_ + 479421952 + ] + , + + 765693 + [-------, + 2097152 + + 8558969219816716267873244761178198088724698958616670140213765754322002_ + 303251685786118678330840203328837654339523418704917749518340772512899_ + 000391009630373148561 + / + 2941442445533010790976428411376393499815580215945856917906452535495723_ + 013856818941702330228779890141296236721138154231997238917322156711965_ + 2444639331719460159488 + , + + - + 2057618230582572101247650324860242561111302581543588808843923662767_ + 549382241659362712290777612800192921420574408948085193743688582762_ + 2246433251878894899015 + / + 2671598203325735538097952353501450220576313759890835097091722520642_ + 710198771902667183948906289863714759678360292483949204616471537777_ + 775324180661095366656 + ] + , + + 5743879 + [-------, + 2097152 + + 1076288816968906847955546394773570208171456724942618614023663123574768_ + 960850434263971398072546592772662158833449797698617455397887562900072_ + 984768000608343553189801693408727205047612559889232757563830528688953_ + 535421809482771058917542602890060941949620874083007858366669453501766_ + 24841488732463225 + / + 3131768957080317946648461940023552044190376613458584986228549631916196_ + 601616219781765615532532294746529648276430583810894079374566460757823_ + 146888581195556029208515218838883200318658407469399426063260589828612_ + 309231596669129707986481319851571942927230340622934023923486703042068_ + 1530440845099008 + , + + - + 2113286699185750918364120475565458437870172489865485994389828135335_ + 264444665284557526492734931691731407872701432935503473348172076098_ + 720545849008780077564160534317894688366119529739980502944162668550_ + 098127961950496210221942878089359674925850594427768502251789758706_ + 752831632503615 + / + 1627615584937987580242906624347104580889144466168459718043153839408_ + 372525533309808070363699585502216011211087103263609551026027769414_ + 087391148126221168139781682587438075322591466131939975457200522349_ + 838568964285634448018562038272378787354460106106141518010935617205_ + 1706396253618176 + ] + , + + 19739877 + [--------, + 2097152 + + - + 2997249936832703303799015804861520949215040387500707177701285766720_ + 192530579422478953566024359860143101547801638082771611160372212874_ + 847778035809872843149225484238365858013629341705321702582333350918_ + 009601789937023985935304900460493389873837030853410347089908880814_ + 853981132018464582458800615394770741699487295875960210750215891948_ + 814476854871031530931295467332190133702671098200902282300510751860_ + 7185928457030277807397796525813862762239286996106809728023675 + / + 2308433274852278590728910081191811023906504141321432646123936794873_ + 933319270608960702138193417647898360620229519176632937631786851455_ + 014766027206259022252505551741823688896883806636602574431760472240_ + 292093196729475160247268834121141893318848728661844434927287285112_ + 897080767552864895056585864033178565910387065006112801516403522741_ + 037360990556054476949527059227070809593049491257519554708879259595_ + 52929920110858560812556635485429471554031675979542656381353984 + , + + - + 5128189263548228489096276397868940080600938410663080459407966335845_ + 009264109490520459825316250084723010047035024497436523038925818959_ + 289312931584701353927621435434398674263047293909122850133851990696_ + 490231566094371994333795070782624011727587749989296611277318372294_ + 624207116537910436554574146082884701305543912620419354885410735940_ + 157775896602822364575864611831512943973974715166920465061850603762_ + 87516256195847052412587282839139194642913955 + / + 2288281939778439330531208793181290471183631092455368990386390824243_ + 509463644236249773080647438987739144921607794682653851741189091711_ + 741868145114978337284191822497675868358729486644730856622552687209_ + 203724411800481405702837198310642291275676195774614443815996713502_ + 629391749783590041470860127752372996488627742672487622480063268808_ + 889324891850842494934347337603075939980268208482904859678177751444_ + 65749979827872616963053217673201717237252096 + ] + ] + Type: List List Fraction Integer + +We can also concentrate on the solutions with real (strictly) positive +coordinates: + + lpr := positiveSolve(lp)$pack + [] + Type: List List RealClosure Fraction Integer + +Thus we have checked that the input system has no solution with +strictly positive coordinates. + +Let us define another polynomial system (L-3). + + f0 := x**3 + y + z + t- 1 + 3 + z + y + x + t - 1 + Type: Polynomial Integer + + f1 := x + y**3 + z + t -1 + 3 + z + y + x + t - 1 + Type: Polynomial Integer + + f2 := x + y + z**3 + t-1 + 3 + z + y + x + t - 1 + Type: Polynomial Integer + + f3 := x + y + z + t**3 -1 + 3 + z + y + x + t - 1 + Type: Polynomial Integer + + lf := [f0, f1, f2, f3] + 3 3 3 3 + [z + y + x + t - 1,z + y + x + t - 1,z + y + x + t - 1,z + y + x + t - 1] + Type: List Polynomial Integer + +First compute a decomposition into regular chains (i.e. regular +triangular sets). + + lts := triangSolve(lf)$pack + [ + 2 3 3 + {t + t + 1, z - z - t + t, + 3 2 2 3 6 3 3 2 + (3z + 3t - 3)y + (3z + (6t - 6)z + 3t - 6t + 3)y + (3t - 3)z + + + 6 3 9 6 3 + (3t - 6t + 3)z + t - 3t + 5t - 3t + , + x + y + z} + , + 16 13 10 7 4 2 + {t - 6t + 9t + 4t + 15t - 54t + 27, + 15 14 13 12 11 + 4907232t + 40893984t - 115013088t + 22805712t + 36330336t + + + 10 9 8 7 + 162959040t - 159859440t - 156802608t + 117168768t + + + 6 5 4 3 + 126282384t - 129351600t + 306646992t + 475302816t + + + 2 + - 1006837776t - 237269088t + 480716208 + * + z + + + 54 51 48 46 45 43 42 + 48t - 912t + 8232t - 72t - 46848t + 1152t + 186324t + + + 40 39 38 37 36 35 + - 3780t - 543144t - 3168t - 21384t + 1175251t + 41184t + + + 34 33 32 31 30 + 278003t - 1843242t - 301815t - 1440726t + 1912012t + + + 29 28 27 26 25 + 1442826t + 4696262t - 922481t - 4816188t - 10583524t + + + 24 23 22 21 20 + - 208751t + 11472138t + 16762859t - 857663t - 19328175t + + + 19 18 17 16 15 + - 18270421t + 4914903t + 22483044t + 12926517t - 8605511t + + + 14 13 12 11 10 + - 17455518t - 5014597t + 8108814t + 8465535t + 190542t + + + 9 8 7 6 5 4 + - 4305624t - 2226123t + 661905t + 1169775t + 226260t - 209952t + + + 3 + - 141183t + 27216t + , + 3 2 2 3 6 3 3 2 + (3z + 3t - 3)y + (3z + (6t - 6)z + 3t - 6t + 3)y + (3t - 3)z + + + 6 3 9 6 3 + (3t - 6t + 3)z + t - 3t + 5t - 3t + , + 3 + x + y + z + t - 1} + , + 2 2 2 + {t,z - 1,y - 1,x + y}, {t - 1,z,y - 1,x + y}, {t - 1,z - 1,z y + 1,x}, + 16 13 10 7 4 2 + {t - 6t + 9t + 4t + 15t - 54t + 27, + 29 28 27 26 25 + 4907232t + 40893984t - 115013088t - 1730448t - 168139584t + + + 24 23 22 21 + 738024480t - 195372288t + 315849456t - 2567279232t + + + 20 19 18 17 + 937147968t + 1026357696t + 4780488240t - 2893767696t + + + 16 15 14 13 + - 5617160352t - 3427651728t + 5001100848t + 8720098416t + + + 12 11 10 9 + 2331732960t - 499046544t - 16243306272t - 9748123200t + + + 8 7 6 5 + 3927244320t + 25257280896t + 10348032096t - 17128672128t + + + 4 3 2 + - 14755488768t + 544086720t + 10848188736t + 1423614528t + + + - 2884297248 + * + z + + + 68 65 62 60 59 57 56 + - 48t + 1152t - 13560t + 360t + 103656t - 7560t - 572820t + + + 54 53 52 51 50 49 + 71316t + 2414556t + 2736t - 402876t - 7985131t - 49248t + + + 48 47 46 45 44 + 1431133t + 20977409t + 521487t - 2697635t - 43763654t + + + 43 42 41 40 39 + - 3756573t - 2093410t + 71546495t + 19699032t + 35025028t + + + 38 37 36 35 34 + - 89623786t - 77798760t - 138654191t + 87596128t + 235642497t + + + 33 32 31 30 29 + 349607642t - 93299834t - 551563167t - 630995176t + 186818962t + + + 28 27 26 25 + 995427468t + 828416204t - 393919231t - 1076617485t + + + 24 23 22 21 + - 1609479791t + 595738126t + 1198787136t + 4342832069t + + + 20 19 18 17 + - 2075938757t - 4390835799t - 4822843033t + 6932747678t + + + 16 15 14 13 + 6172196808t + 1141517740t - 4981677585t - 9819815280t + + + 12 11 10 9 + - 7404299976t - 157295760t + 29124027630t + 14856038208t + + + 8 7 6 5 + - 16184101410t - 26935440354t - 3574164258t + 10271338974t + + + 4 3 2 + 11191425264t + 6869861262t - 9780477840t - 3586674168t + 2884297248 + , + 3 3 2 6 3 9 6 3 + (3z + (6t - 6)z + (6t - 12t + 3)z + 2t - 6t + t + 3t)y + + + 3 3 6 3 2 9 6 3 12 9 + (3t - 3)z + (6t - 12t + 6)z + (4t - 12t + 11t - 3)z + t - 4t + + + 6 3 + 5t - 2t + , + 3 + x + y + z + t - 1} + , + 2 + {t - 1,z - 1,y,x + z}, + 8 7 6 5 4 3 2 + {t + t + t - 2t - 2t - 2t + 19t + 19t - 8, + 7 6 5 4 3 + 2395770t + 3934440t - 3902067t - 10084164t - 1010448t + + + 2 + 32386932t + 22413225t - 10432368 + * + z + + + 7 6 5 4 3 + - 463519t + 3586833t + 9494955t - 8539305t - 33283098t + + + 2 + 35479377t + 46263256t - 17419896 + , + 4 3 3 6 3 2 3 + 3z + (9t - 9)z + (12t - 24t + 9)z + (- 152t + 219t - 67)z + + + 6 4 3 + - 41t + 57t + 25t - 57t + 16 + * + y + + + 3 4 6 3 3 3 2 + (3t - 3)z + (9t - 18t + 9)z + (- 181t + 270t - 89)z + + + 6 4 3 7 6 4 3 + (- 92t + 135t + 49t - 135t + 43)z + 27t - 27t - 54t + 396t + + + - 486t + 144 + , + 3 + x + y + z + t - 1} + , + 3 + {t,z - t + 1,y - 1,x - 1}, {t - 1,z,y,x}, {t,z - 1,y,x}, {t,z,y - 1,x}, + {t,z,y,x - 1}] + Type: List RegularChain(Integer,[x,y,z,t]) + +Then we compute a univariate representation. + + univariateSolve(lf)$pack + [[complexRoots= ?,coordinates= [x - 1,y - 1,z + 1,t - %A]], + [complexRoots= ?,coordinates= [x,y - 1,z,t - %A]], + [complexRoots= ? - 1,coordinates= [x,y,z,t - %A]], + [complexRoots= ?,coordinates= [x - 1,y,z,t - %A]], + [complexRoots= ?,coordinates= [x,y,z - 1,t - %A]], + [complexRoots= ? - 2,coordinates= [x - 1,y + 1,z,t - 1]], + [complexRoots= ?,coordinates= [x + 1,y - 1,z,t - 1]], + [complexRoots= ? - 1,coordinates= [x - 1,y + 1,z - 1,t]], + [complexRoots= ? + 1,coordinates= [x + 1,y - 1,z - 1,t]], + + 6 3 2 + [complexRoots= ? - 2? + 3? - 3, + 3 3 + coordinates= [2x + %A + %A - 1,2y + %A + %A - 1,z - %A,t - %A]] + , + + 5 3 2 + [complexRoots= ? + 3? - 2? + 3? - 3, + 3 + coordinates= [x - %A,y - %A,z + %A + 2%A - 1,t - %A]] + , + + 4 3 2 + [complexRoots= ? - ? - 2? + 3, + 3 3 3 + coordinates= [x + %A - %A - 1,y + %A - %A - 1,z - %A + 2%A + 1,t - %A]] + , + [complexRoots= ? + 1,coordinates= [x - 1,y - 1,z,t - %A]], + + 6 3 2 + [complexRoots= ? + 2? + 3? - 3, + 3 3 + coordinates= [2x - %A - %A - 1,y + %A,2z - %A - %A - 1,t + %A]] + , + + 6 4 3 2 + [complexRoots= ? + 12? + 20? - 45? - 42? - 953, + + coordinates = + 5 4 3 2 + [12609x + 23%A + 49%A - 46%A + 362%A - 5015%A - 8239, + 5 4 3 2 + 25218y + 23%A + 49%A - 46%A + 362%A + 7594%A - 8239, + 5 4 3 2 + 25218z + 23%A + 49%A - 46%A + 362%A + 7594%A - 8239, + 5 4 3 2 + 12609t + 23%A + 49%A - 46%A + 362%A - 5015%A - 8239] + ] + , + + 5 3 2 + [complexRoots= ? + 12? - 16? + 48? - 96, + 3 + coordinates= [8x + %A + 8%A - 8,2y - %A,2z - %A,2t - %A]] + , + + 5 4 3 2 + [complexRoots= ? + ? - 5? - 3? + 9? + 3, + + coordinates = + 3 3 3 + [2x - %A + 2%A - 1, 2y + %A - 4%A + 1, 2z - %A + 2%A - 1, + 3 + 2t - %A + 2%A - 1] + ] + , + + 4 3 2 + [complexRoots= ? - 3? + 4? - 6? + 13, + + coordinates = + 3 2 3 2 + [9x - 2%A + 4%A - %A + 2, 9y + %A - 2%A + 5%A - 1, + 3 2 3 2 + 9z + %A - 2%A + 5%A - 1, 9t + %A - 2%A - 4%A - 1] + ] + , + + 4 2 + [complexRoots= ? - 11? + 37, + + coordinates = + 2 2 2 2 + [3x - %A + 7,6y + %A + 3%A - 7,3z - %A + 7,6t + %A - 3%A - 7] + ] + , + [complexRoots= ? + 1,coordinates= [x - 1,y,z - 1,t + 1]], + [complexRoots= ? + 2,coordinates= [x,y - 1,z - 1,t + 1]], + [complexRoots= ? - 2,coordinates= [x,y - 1,z + 1,t - 1]], + [complexRoots= ?,coordinates= [x,y + 1,z - 1,t - 1]], + [complexRoots= ? - 2,coordinates= [x - 1,y,z + 1,t - 1]], + [complexRoots= ?,coordinates= [x + 1,y,z - 1,t - 1]], + + 4 3 2 + [complexRoots= ? + 5? + 16? + 30? + 57, + + coordinates = + 3 2 3 2 + [151x + 15%A + 54%A + 104%A + 93, 151y - 10%A - 36%A - 19%A - 62, + 3 2 3 2 + 151z - 5%A - 18%A - 85%A - 31, 151t - 5%A - 18%A - 85%A - 31] + ] + , + + 4 3 2 + [complexRoots= ? - ? - 2? + 3, + 3 3 3 + coordinates= [x - %A + 2%A + 1,y + %A - %A - 1,z - %A,t + %A - %A - 1]] + , + + 4 3 2 + [complexRoots= ? + 2? - 8? + 48, + + coordinates = + 3 3 3 + [8x - %A + 4%A - 8,2y + %A,8z + %A - 8%A + 8,8t - %A + 4%A - 8] + ] + , + + 5 4 3 2 + [complexRoots= ? + ? - 2? - 4? + 5? + 8, + 3 3 3 + coordinates= [3x + %A - 1,3y + %A - 1,3z + %A - 1,t - %A]] + , + 3 + [complexRoots= ? + 3? - 1,coordinates= [x - %A,y - %A,z - %A,t - %A]]] + Type: List Record(complexRoots: SparseUnivariatePolynomial Integer, + coordinates: List Polynomial Integer) + +Note that this computation is made from the input system lf. + +However it is possible to reuse a pre-computed regular chain as follows: + + ts := lts.1 + 2 3 3 + {t + t + 1, z - z - t + t, + + 3 2 2 3 6 3 3 2 + (3z + 3t - 3)y + (3z + (6t - 6)z + 3t - 6t + 3)y + (3t - 3)z + + + 6 3 9 6 3 + (3t - 6t + 3)z + t - 3t + 5t - 3t + , + x + y + z} + Type: RegularChain(Integer,[x,y,z,t]) + + univariateSolve(ts)$pack + [ + 4 3 2 + [complexRoots= ? + 5? + 16? + 30? + 57, + coordinates = + 3 2 3 2 + [151x + 15%A + 54%A + 104%A + 93, 151y - 10%A - 36%A - 19%A - 62, + 3 2 3 2 + 151z - 5%A - 18%A - 85%A - 31, 151t - 5%A - 18%A - 85%A - 31] + ] + , + 4 3 2 + [complexRoots= ? - ? - 2? + 3, + 3 3 3 + coordinates= [x - %A + 2%A + 1,y + %A - %A - 1,z - %A,t + %A - %A - 1]] + , + 4 3 2 + [complexRoots= ? + 2? - 8? + 48, + coordinates = + 3 3 3 + [8x - %A + 4%A - 8,2y + %A,8z + %A - 8%A + 8,8t - %A + 4%A - 8] + ] + ] + Type: List Record(complexRoots: SparseUnivariatePolynomial Integer, + coordinates: List Polynomial Integer) + + realSolve(ts)$pack + [] + Type: List List RealClosure Fraction Integer + +We compute now the full set of points with real coordinates: + + lr2 := realSolve(lf)$pack + [[0,- 1,1,1], [0,0,1,0], [1,0,0,0], [0,0,0,1], [0,1,0,0], [1,0,%B37,- %B37], + [1,0,%B38,- %B38], [0,1,%B35,- %B35], [0,1,%B36,- %B36], [- 1,0,1,1], + [%B32, + 1 15 2 14 1 13 4 12 11 11 4 10 + -- %B32 + -- %B32 + -- %B32 - -- %B32 - -- %B32 - -- %B32 + 27 27 27 27 27 27 + + + 1 9 14 8 1 7 2 6 1 5 2 4 3 + -- %B32 + -- %B32 + -- %B32 + - %B32 + - %B32 + - %B32 + %B32 + 27 27 27 9 3 9 + + + 4 2 + - %B32 - %B32 - 2 + 3 + , + 1 15 1 14 1 13 2 12 11 11 2 10 + - -- %B32 - -- %B32 - -- %B32 + -- %B32 + -- %B32 + -- %B32 + 54 27 54 27 54 27 + + + 1 9 7 8 1 7 1 6 1 5 1 4 3 + - -- %B32 - -- %B32 - -- %B32 - - %B32 - - %B32 - - %B32 - %B32 + 54 27 54 9 6 9 + + + 2 2 1 3 + - - %B32 + - %B32 + - + 3 2 2 + , + 1 15 1 14 1 13 2 12 11 11 2 10 + - -- %B32 - -- %B32 - -- %B32 + -- %B32 + -- %B32 + -- %B32 + 54 27 54 27 54 27 + + + 1 9 7 8 1 7 1 6 1 5 1 4 3 + - -- %B32 - -- %B32 - -- %B32 - - %B32 - - %B32 - - %B32 - %B32 + 54 27 54 9 6 9 + + + 2 2 1 3 + - - %B32 + - %B32 + - + 3 2 2 + ] + , + [%B33, + 1 15 2 14 1 13 4 12 11 11 4 10 + -- %B33 + -- %B33 + -- %B33 - -- %B33 - -- %B33 - -- %B33 + 27 27 27 27 27 27 + + + 1 9 14 8 1 7 2 6 1 5 2 4 3 + -- %B33 + -- %B33 + -- %B33 + - %B33 + - %B33 + - %B33 + %B33 + 27 27 27 9 3 9 + + + 4 2 + - %B33 - %B33 - 2 + 3 + , + 1 15 1 14 1 13 2 12 11 11 2 10 + - -- %B33 - -- %B33 - -- %B33 + -- %B33 + -- %B33 + -- %B33 + 54 27 54 27 54 27 + + + 1 9 7 8 1 7 1 6 1 5 1 4 3 + - -- %B33 - -- %B33 - -- %B33 - - %B33 - - %B33 - - %B33 - %B33 + 54 27 54 9 6 9 + + + 2 2 1 3 + - - %B33 + - %B33 + - + 3 2 2 + , + 1 15 1 14 1 13 2 12 11 11 2 10 + - -- %B33 - -- %B33 - -- %B33 + -- %B33 + -- %B33 + -- %B33 + 54 27 54 27 54 27 + + + 1 9 7 8 1 7 1 6 1 5 1 4 3 + - -- %B33 - -- %B33 - -- %B33 - - %B33 - - %B33 - - %B33 - %B33 + 54 27 54 9 6 9 + + + 2 2 1 3 + - - %B33 + - %B33 + - + 3 2 2 + ] + , + [%B34, + 1 15 2 14 1 13 4 12 11 11 4 10 + -- %B34 + -- %B34 + -- %B34 - -- %B34 - -- %B34 - -- %B34 + 27 27 27 27 27 27 + + + 1 9 14 8 1 7 2 6 1 5 2 4 3 + -- %B34 + -- %B34 + -- %B34 + - %B34 + - %B34 + - %B34 + %B34 + 27 27 27 9 3 9 + + + 4 2 + - %B34 - %B34 - 2 + 3 + , + 1 15 1 14 1 13 2 12 11 11 2 10 + - -- %B34 - -- %B34 - -- %B34 + -- %B34 + -- %B34 + -- %B34 + 54 27 54 27 54 27 + + + 1 9 7 8 1 7 1 6 1 5 1 4 3 + - -- %B34 - -- %B34 - -- %B34 - - %B34 - - %B34 - - %B34 - %B34 + 54 27 54 9 6 9 + + + 2 2 1 3 + - - %B34 + - %B34 + - + 3 2 2 + , + 1 15 1 14 1 13 2 12 11 11 2 10 + - -- %B34 - -- %B34 - -- %B34 + -- %B34 + -- %B34 + -- %B34 + 54 27 54 27 54 27 + + + 1 9 7 8 1 7 1 6 1 5 1 4 3 + - -- %B34 - -- %B34 - -- %B34 - - %B34 - - %B34 - - %B34 - %B34 + 54 27 54 9 6 9 + + + 2 2 1 3 + - - %B34 + - %B34 + - + 3 2 2 + ] + , + [- 1,1,0,1], [- 1,1,1,0], + [%B23, + 1 15 1 14 1 13 2 12 11 11 2 10 + - -- %B23 - -- %B23 - -- %B23 + -- %B23 + -- %B23 + -- %B23 + 54 27 54 27 54 27 + + + 1 9 7 8 1 7 1 6 1 5 1 4 3 + - -- %B23 - -- %B23 - -- %B23 - - %B23 - - %B23 - - %B23 - %B23 + 54 27 54 9 6 9 + + + 2 2 1 3 + - - %B23 + - %B23 + - + 3 2 2 + , + %B30, + 1 15 1 14 1 13 2 12 11 11 + - %B30 + -- %B23 + -- %B23 + -- %B23 - -- %B23 - -- %B23 + 54 27 54 27 54 + + + 2 10 1 9 7 8 1 7 1 6 1 5 + - -- %B23 + -- %B23 + -- %B23 + -- %B23 + - %B23 + - %B23 + 27 54 27 54 9 6 + + + 1 4 2 2 1 1 + - %B23 + - %B23 - - %B23 - - + 9 3 2 2 + ] + , + [%B23, + 1 15 1 14 1 13 2 12 11 11 2 10 + - -- %B23 - -- %B23 - -- %B23 + -- %B23 + -- %B23 + -- %B23 + 54 27 54 27 54 27 + + + 1 9 7 8 1 7 1 6 1 5 1 4 3 + - -- %B23 - -- %B23 - -- %B23 - - %B23 - - %B23 - - %B23 - %B23 + 54 27 54 9 6 9 + + + 2 2 1 3 + - - %B23 + - %B23 + - + 3 2 2 + , + %B31, + 1 15 1 14 1 13 2 12 11 11 + - %B31 + -- %B23 + -- %B23 + -- %B23 - -- %B23 - -- %B23 + 54 27 54 27 54 + + + 2 10 1 9 7 8 1 7 1 6 1 5 + - -- %B23 + -- %B23 + -- %B23 + -- %B23 + - %B23 + - %B23 + 27 54 27 54 9 6 + + + 1 4 2 2 1 1 + - %B23 + - %B23 - - %B23 - - + 9 3 2 2 + ] + , + [%B24, + 1 15 1 14 1 13 2 12 11 11 2 10 + - -- %B24 - -- %B24 - -- %B24 + -- %B24 + -- %B24 + -- %B24 + 54 27 54 27 54 27 + + + 1 9 7 8 1 7 1 6 1 5 1 4 3 + - -- %B24 - -- %B24 - -- %B24 - - %B24 - - %B24 - - %B24 - %B24 + 54 27 54 9 6 9 + + + 2 2 1 3 + - - %B24 + - %B24 + - + 3 2 2 + , + %B28, + 1 15 1 14 1 13 2 12 11 11 + - %B28 + -- %B24 + -- %B24 + -- %B24 - -- %B24 - -- %B24 + 54 27 54 27 54 + + + 2 10 1 9 7 8 1 7 1 6 1 5 + - -- %B24 + -- %B24 + -- %B24 + -- %B24 + - %B24 + - %B24 + 27 54 27 54 9 6 + + + 1 4 2 2 1 1 + - %B24 + - %B24 - - %B24 - - + 9 3 2 2 + ] + , + [%B24, + 1 15 1 14 1 13 2 12 11 11 2 10 + - -- %B24 - -- %B24 - -- %B24 + -- %B24 + -- %B24 + -- %B24 + 54 27 54 27 54 27 + + + 1 9 7 8 1 7 1 6 1 5 1 4 3 + - -- %B24 - -- %B24 - -- %B24 - - %B24 - - %B24 - - %B24 - %B24 + 54 27 54 9 6 9 + + + 2 2 1 3 + - - %B24 + - %B24 + - + 3 2 2 + , + %B29, + 1 15 1 14 1 13 2 12 11 11 + - %B29 + -- %B24 + -- %B24 + -- %B24 - -- %B24 - -- %B24 + 54 27 54 27 54 + + + 2 10 1 9 7 8 1 7 1 6 1 5 + - -- %B24 + -- %B24 + -- %B24 + -- %B24 + - %B24 + - %B24 + 27 54 27 54 9 6 + + + 1 4 2 2 1 1 + - %B24 + - %B24 - - %B24 - - + 9 3 2 2 + ] + , + [%B25, + 1 15 1 14 1 13 2 12 11 11 2 10 + - -- %B25 - -- %B25 - -- %B25 + -- %B25 + -- %B25 + -- %B25 + 54 27 54 27 54 27 + + + 1 9 7 8 1 7 1 6 1 5 1 4 3 + - -- %B25 - -- %B25 - -- %B25 - - %B25 - - %B25 - - %B25 - %B25 + 54 27 54 9 6 9 + + + 2 2 1 3 + - - %B25 + - %B25 + - + 3 2 2 + , + %B26, + 1 15 1 14 1 13 2 12 11 11 + - %B26 + -- %B25 + -- %B25 + -- %B25 - -- %B25 - -- %B25 + 54 27 54 27 54 + + + 2 10 1 9 7 8 1 7 1 6 1 5 + - -- %B25 + -- %B25 + -- %B25 + -- %B25 + - %B25 + - %B25 + 27 54 27 54 9 6 + + + 1 4 2 2 1 1 + - %B25 + - %B25 - - %B25 - - + 9 3 2 2 + ] + , + [%B25, + 1 15 1 14 1 13 2 12 11 11 2 10 + - -- %B25 - -- %B25 - -- %B25 + -- %B25 + -- %B25 + -- %B25 + 54 27 54 27 54 27 + + + 1 9 7 8 1 7 1 6 1 5 1 4 3 + - -- %B25 - -- %B25 - -- %B25 - - %B25 - - %B25 - - %B25 - %B25 + 54 27 54 9 6 9 + + + 2 2 1 3 + - - %B25 + - %B25 + - + 3 2 2 + , + %B27, + 1 15 1 14 1 13 2 12 11 11 + - %B27 + -- %B25 + -- %B25 + -- %B25 - -- %B25 - -- %B25 + 54 27 54 27 54 + + + 2 10 1 9 7 8 1 7 1 6 1 5 + - -- %B25 + -- %B25 + -- %B25 + -- %B25 + - %B25 + - %B25 + 27 54 27 54 9 6 + + + 1 4 2 2 1 1 + - %B25 + - %B25 - - %B25 - - + 9 3 2 2 + ] + , + [1,%B21,- %B21,0], [1,%B22,- %B22,0], [1,%B19,0,- %B19], [1,%B20,0,- %B20], + 1 3 1 1 3 1 1 3 1 + [%B17,- - %B17 + -,- - %B17 + -,- - %B17 + -], + 3 3 3 3 3 3 + 1 3 1 1 3 1 1 3 1 + [%B18,- - %B18 + -,- - %B18 + -,- - %B18 + -]] + 3 3 3 3 3 3 + Type: List List RealClosure Fraction Integer + +The number of real solutions for the input system is: + + #lr2 + 27 + Type: PositiveInteger + +Another example of computation of real solutions illustrates the +LexTriangularPackage package constructor. + +We concentrate now on the solutions with real (strictly) positive +coordinates: + + lpr2 := positiveSolve(lf)$pack + 1 3 1 1 3 1 1 3 1 + [[%B40,- - %B40 + -,- - %B40 + -,- - %B40 + -]] + 3 3 3 3 3 3 + Type: List List RealClosure Fraction Integer + +Finally, we approximate the coordinates of this point with 20 exact digits: + + [approximate(r,1/10**21)::Float for r in lpr2.1] + [0.3221853546 2608559291, 0.3221853546 2608559291, 0.3221853546 2608559291, + 0.3221853546 2608559291] + Type: List Float + +See Also: +o )show ZeroDimensionalSolvePackage +o $AXIOM/doc/src/algebra/zerodim.spad.dvi + +@ <>= )abbrev package ZDSOLVE ZeroDimensionalSolvePackage ++ Author: Marc Moreno Maza diff --git a/src/doc/book.pamphlet b/src/doc/book.pamphlet index a113b73..377d5c6 100644 --- a/src/doc/book.pamphlet +++ b/src/doc/book.pamphlet @@ -47667,8 +47667,7 @@ $$ \returnType{Type: String} Strings can be changed to upper case or lower case using the -operations \spadfunFrom{upperCase}{String}, -\spadfunFrom{upperCase}{String}, \spadfunFrom{lowerCase}{String} and +operations \spadfunFrom{upperCase}{String}, and \spadfunFrom{lowerCase}{String}. \spadcommand{upperCase hello } @@ -50596,7 +50595,7 @@ x \ {y \sp 2} $$ \returnType{Type: OrderedFreeMonoid Symbol} -The we can compute the right-quotient of {\bf qr} by {\bf r}: +We can compute the right-quotient of {\bf qr} by {\bf r}: \spadcommand{rquo(qr,w) } $$ diff --git a/src/doc/spadhelp.pamphlet b/src/doc/spadhelp.pamphlet index 3275622..21925ae 100644 --- a/src/doc/spadhelp.pamphlet +++ b/src/doc/spadhelp.pamphlet @@ -1504,7 +1504,8 @@ Integer (INT) IntegerLinearDependence (ZLINDEP) IntegerNumberTheoryFunctions (INTHEORY) Kernel (KERNEL) KeyedAccessFile (KAFILE) LexTriangularPackage (LEXTRIPK) Library (LIB) -LieExponentials (LEXP) LinearOrdinaryDifferentialOperator (LODO) +LieExponentials (LEXP) LiePolynomial (LPOLY) +LinearOrdinaryDifferentialOperator (LODO) LinearOrdinaryDifferentialOperator1 (LODO1) LinearOrdinaryDifferentialOperator2 (LODO2) List (LIST) LyndonWord (LWORD) @@ -1516,12 +1517,23 @@ None (NONE) Octonion (OCT) OneDimensionalArray (ARRAY1) Operator (OP) OrderedVariableList (OVAR) OrderlyDifferentialPolynomial (ODPOL) PartialFraction (PFR) Permanent (PERMAN) -Polynomial (POLY) Quaternion (QUAT) -RadixExpansion (RADIX) RealClosure (RECLOS) -PlaneAlgebraicCurvePlot (ACPLOT) RealSolvePackage (REALSOLV) +PlaneAlgebraicCurvePlot (ACPLOT) Polynomial (POLY) +Quaternion (QUAT) RadixExpansion (RADIX) +RealClosure (RECLOS) RealSolvePackage (REALSOLV) RegularTriangularSet (REGSET) RomanNumeral (ROMAN) Segment (SEG) SegmentBinding (SEGBIND) -Set (SET) TwoDimensionalViewport (VIEW2D) +Set (SET) SingleInteger (SINT) +SparseTable (STBL) SquareMatrix (SQMATRIX) +SquareFreeRegularTriangularSet (SREGSET) +Stream (STREAM) String (STRING) +StringTable (STRTBL) Symbol (SYMBOL) +Table (TABLE) TextFile (TEXTFILE) +TwoDimensionalArray (ARRAY2) TwoDimensionalViewport (VIEW2D) +UnivariatePolynomial (UP) UniversalSegment (UNISEG) +Vector (VECTOR) Void (VOID) +WuWenTsunTriangularSet (WUTSET) XPBWPolynomial (XPBWPOLY) +XPolynomial (XPOLY) XPolynomialRing (XPR) +ZeroDimensionalSolvePackage (ZDSOLVE) @