axiom-developer
[Top][All Lists]

## [Axiom-developer] 20081221.01.tpd.patch (bookvol10.3 add domains)

 From: daly Subject: [Axiom-developer] 20081221.01.tpd.patch (bookvol10.3 add domains) Date: Mon, 22 Dec 2008 20:12:27 -0600

```Break out MYEXPR, MYUP from GUESSF
========================================================================
diff --git a/books/bookvol10.3.pamphlet b/books/bookvol10.3.pamphlet
index 7d78657..453e0e2 100644
--- a/books/bookvol10.3.pamphlet
+++ b/books/bookvol10.3.pamphlet
@@ -47664,6 +47664,100 @@ MultivariatePolynomial(vl:List Symbol, R:Ring)

@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain MYEXPR MyExpression}
+\pagepic{ps/v103myexpression.ps}{MYEXPR}{1.00}
+\refto{MyUnivariatePolynomial}{MYUP}
+<<domain MYEXPR MyExpression>>=
+)abbrev domain MYEXPR MyExpression
+MyExpression(q: Symbol, R): Exports == Implementation where
+
+  R: Join(Ring, OrderedSet, IntegralDomain)
+  UP ==> MyUnivariatePolynomial(q, R)
+
+  Exports == Join(FunctionSpace R, IntegralDomain,
+                RetractableTo UP, RetractableTo Symbol,
+                RetractableTo Integer, CombinatorialOpsCategory,
+                PartialDifferentialRing Symbol) with
+              _* : (%,%) -> %
+              _/ : (%,%) -> %
+              _*_* : (%,%) -> %
+              numerator : % -> %
+              denominator : % -> %
+              ground? : % -> Boolean
+
+              coerce: Fraction UP -> %
+              retract: % -> Fraction UP
+
+  Implementation == Expression R add
+    Rep := Expression R
+
+    iunivariate(p: Polynomial R): UP ==
+        poly: SparseUnivariatePolynomial(Polynomial R)
+             := univariate(p, q)\$(Polynomial R)
+        map(retract(#1),
poly)\$UnivariatePolynomialCategoryFunctions2(Polynomial R,
+                    SparseUnivariatePolynomial Polynomial R,
+                    R, UP)
+
+    retract(p: %): Fraction UP ==
+        poly: Fraction Polynomial R := retract p
+        upoly: UP := iunivariate numer poly
+        vpoly: UP := iunivariate denom poly
+
+        upoly / vpoly
+
+    retract(p: %): UP == iunivariate retract p
+
+    coerce(r: Fraction UP): % ==
+       num: SparseUnivariatePolynomial R := makeSUP numer r
+       den: SparseUnivariatePolynomial R := makeSUP denom r
+       u: Polynomial R := multivariate(num, q)
+       v: Polynomial R := multivariate(den, q)
+
+       quot: Fraction Polynomial R := u/v
+
+       quot::(Expression R)
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\section{domain MYUP MyUnivariatePolynomial}
+\pagepic{ps/v103myunivariatepolynomial.ps}{MYUP}{1.00}
+\refto{MyExpression}{MYEXPR}
+<<domain MYUP MyUnivariatePolynomial>>=
+)abbrev domain MYUP MyUnivariatePolynomial
+MyUnivariatePolynomial(x:Symbol, R:Ring):
+  UnivariatePolynomialCategory(R) with
+    RetractableTo Symbol;
+    coerce: Variable(x) -> %
+      ++ coerce(x) converts the variable x to a univariate polynomial.
+    fmecg: (%,NonNegativeInteger,R,%) -> %
+        ++ fmecg(p1,e,r,p2) finds X : p1 - r * X**e * p2
+    if R has univariate: (R, Symbol) -> SparseUnivariatePolynomial R
+    then coerce: R -> %
+    coerce: Polynomial R -> %
+    Rep := SparseUnivariatePolynomial(R)
+    coerce(p: %):OutputForm  == outputForm(p, outputForm x)
+    coerce(x: Symbol): % == monomial(1, 1)
+    coerce(v: Variable(x)):% == monomial(1, 1)
+    retract(p: %): Symbol ==
+        retract(p)@SingletonAsOrderedSet
+        x
+    if R has univariate: (R, Symbol) -> SparseUnivariatePolynomial R
+    then coerce(p: R): % == univariate(p, x)\$R
+
+    coerce(p: Polynomial R): % ==
+        poly: SparseUnivariatePolynomial(Polynomial R)
+             := univariate(p, x)\$(Polynomial R)
+        map(retract(#1),
poly)\$UnivariatePolynomialCategoryFunctions2(Polynomial R,
+                    SparseUnivariatePolynomial Polynomial R,
+                    R, %)
+
+@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Chapter N}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{domain NSMP NewSparseMultivariatePolynomial}
@@ -91347,6 +91441,8 @@ Note that this code is not included in the generated
<<domain MRING MonoidRing>>
<<domain MSET Multiset>>
<<domain MPOLY MultivariatePolynomial>>
+<<domain MYEXPR MyExpression>>
+<<domain MYUP MyUnivariatePolynomial>>

<<domain NSMP NewSparseMultivariatePolynomial>>
<<domain NSUP NewSparseUnivariatePolynomial>>
diff --git a/changelog b/changelog
index f491f42..fcdd260 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,11 @@
+20081221 tpd src/axiom-website/patches.html 20081221.01.tpd.patch
+20081221 tpd src/algebra/Makefile.pamphlet
+20081221 tpd src/algebra/mantepse.spad move domains to bookvol10.3
20081219 tpd src/axiom-website/patches.html 20081219.01.wxh.patch
20081219 wxh src/interp/nrunfast.boot Float has exp : Float -> Float
20081217 tpd src/axiom-website/patches.html 20081217.02.tpd.patch
index c8f1a1c..ae718f3 100644
@@ -1,3 +1,5 @@
+"What matters the most is what you do for free" -- John Gorka
+
You've unpacked the Axiom source code to some directory. In this
document we'll call that directory /home/me/axiom. Note that the path
cannot contain uppercase characters or spaces. This is a porting
diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet
index ce9ddba..e15ac4b 100644
--- a/src/algebra/Makefile.pamphlet
+++ b/src/algebra/Makefile.pamphlet
@@ -878,7 +878,8 @@ LAYER20=\
\${OUT}/INTHERAL.o \${OUT}/INTPAF.o   \${OUT}/INTPM.o    \${OUT}/INTTOOLS.o \
\${OUT}/ITRIGMNP.o \${OUT}/JORDAN.o   \${OUT}/KOVACIC.o  \${OUT}/LF.o       \
\${OUT}/LIE.o      \${OUT}/LODOF.o    \${OUT}/LSQM.o     \${OUT}/OMEXPR.o   \
-  \${OUT}/MCMPLX.o   \${OUT}/MULTFACT.o \${OUT}/NAGD01.o   \${OUT}/NAGD02.o   \
+  \${OUT}/MCMPLX.o   \${OUT}/MULTFACT.o \${OUT}/MYEXPR.o  \
+  \${OUT}/NAGD01.o   \${OUT}/NAGD02.o   \
\${OUT}/NAGF01.o   \${OUT}/NAGF02.o   \${OUT}/NAGF04.o   \${OUT}/NCEP.o     \
\${OUT}/NLINSOL.o  \${OUT}/NSMP.o     \${OUT}/NUMERIC.o  \${OUT}/OCT.o      \
@@ -931,6 +932,7 @@ LAYER21=\
\${OUT}/FDIV.o     \${OUT}/FSCINT.o   \${OUT}/FSINT.o    \${OUT}/FS2EXPXP.o \
\${OUT}/GSERIES.o  \${OUT}/HELLFDIV.o \${OUT}/INVLAPLA.o \${OUT}/IR2F.o     \
\${OUT}/IRRF2F.o   \${OUT}/LAPLACE.o  \${OUT}/LIMITPS.o  \${OUT}/LODEEF.o   \
+  \${OUT}/MYUP.o \
\${OUT}/NODE1.o    \${OUT}/ODECONST.o \${OUT}/ODEINT.o   \${OUT}/RECOP.o    \
\${OUT}/REP.o      \
@@ -1181,7 +1183,7 @@ \${MID}/GUESSAN.nrlib/code.o: \${MID}/GUESSAN.spad
fi )

GUESSUPDEPS = NEWTON FAMR2 FFFG FFFGF SUPEXPR UTSSOL EXPRSOL GOPT GOPT0 \
-            UFPS RECOP UFPS1 GUESS
+            UFPS RECOP UFPS1 GUESS MYEXPR MYUP

@echo S1 making \${MID}/GUESSUP.nrlib/code.o from \${MID}/GUESSUP.spad
@@ -3242,6 +3244,7 @@ \${HELP}/ZeroDimensionalSolvePackage.help:
<<layer21>>
<<layer22>>
<<layer23>>
+<<layer24>>
<<USERLAYER>>
<<order>>

@@ -2587,91 +2587,8 @@ GuessAlgebraicNumber() == Guess(AlgebraicNumber,
AlgebraicNumber,
coerce\$Expression(Integer))

@
-
-
\section{package GUESSUP GuessUnivariatePolynomial}
<<package GUESSUP GuessUnivariatePolynomial>>=
-)abbrev domain MYUP MyUnivariatePolynomial
-MyUnivariatePolynomial(x:Symbol, R:Ring):
-  UnivariatePolynomialCategory(R) with
-    RetractableTo Symbol;
-    coerce: Variable(x) -> %
-      ++ coerce(x) converts the variable x to a univariate polynomial.
-    fmecg: (%,NonNegativeInteger,R,%) -> %
-        ++ fmecg(p1,e,r,p2) finds X : p1 - r * X**e * p2
-    if R has univariate: (R, Symbol) -> SparseUnivariatePolynomial R
-    then coerce: R -> %
-    coerce: Polynomial R -> %
-    Rep := SparseUnivariatePolynomial(R)
-    coerce(p: %):OutputForm  == outputForm(p, outputForm x)
-    coerce(x: Symbol): % == monomial(1, 1)
-    coerce(v: Variable(x)):% == monomial(1, 1)
-    retract(p: %): Symbol ==
-        retract(p)@SingletonAsOrderedSet
-        x
-    if R has univariate: (R, Symbol) -> SparseUnivariatePolynomial R
-    then coerce(p: R): % == univariate(p, x)\$R
-
-    coerce(p: Polynomial R): % ==
-        poly: SparseUnivariatePolynomial(Polynomial R)
-             := univariate(p, x)\$(Polynomial R)
-        map(retract(#1),
poly)\$UnivariatePolynomialCategoryFunctions2(Polynomial R,
-                    SparseUnivariatePolynomial Polynomial R,
-                    R, %)
-
-
-)abbrev domain MYEXPR MyExpression
-MyExpression(q: Symbol, R): Exports == Implementation where
-
-  R: Join(Ring, OrderedSet, IntegralDomain)
-  UP ==> MyUnivariatePolynomial(q, R)
-
-  Exports == Join(FunctionSpace R, IntegralDomain,
-                RetractableTo UP, RetractableTo Symbol,
-                RetractableTo Integer, CombinatorialOpsCategory,
-                PartialDifferentialRing Symbol) with
-              _* : (%,%) -> %
-              _/ : (%,%) -> %
-              _*_* : (%,%) -> %
-              numerator : % -> %
-              denominator : % -> %
-              ground? : % -> Boolean
-
-              coerce: Fraction UP -> %
-              retract: % -> Fraction UP
-
-  Implementation == Expression R add
-    Rep := Expression R
-
-    iunivariate(p: Polynomial R): UP ==
-        poly: SparseUnivariatePolynomial(Polynomial R)
-             := univariate(p, q)\$(Polynomial R)
-        map(retract(#1),
poly)\$UnivariatePolynomialCategoryFunctions2(Polynomial R,
-                    SparseUnivariatePolynomial Polynomial R,
-                    R, UP)
-
-    retract(p: %): Fraction UP ==
-        poly: Fraction Polynomial R := retract p
-        upoly: UP := iunivariate numer poly
-        vpoly: UP := iunivariate denom poly
-
-        upoly / vpoly
-
-    retract(p: %): UP == iunivariate retract p
-
-    coerce(r: Fraction UP): % ==
-       num: SparseUnivariatePolynomial R := makeSUP numer r
-       den: SparseUnivariatePolynomial R := makeSUP denom r
-       u: Polynomial R := multivariate(num, q)
-       v: Polynomial R := multivariate(den, q)
-
-       quot: Fraction Polynomial R := u/v
-
-       quot::(Expression R)
-
-
-
)abbrev package GUESSUP GuessUnivariatePolynomial
++ Description:
++ This package exports guessing of sequences of univariate rational functions
index 6576df9..875d2d3 100644
@@ -1001,6 +1001,11 @@ cd axiom
export AXIOM=`pwd`/mnt/ubuntu
export PATH=\$AXIOM/bin:\$PATH
make
+
+Also note that Ubuntu ships a broken xterm setting for the emacs alt key
+where alt is supposed to be meta. Add the following line
+  XTerm*metaSendsEscape: true
</pre>

<h3>OpenSuSE</h3>
diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html
index c8f6886..16f1537 100644
--- a/src/axiom-website/patches.html
+++ b/src/axiom-website/patches.html
<a href="patches/20081219.01.wxh.patch">20081219.01.wxh.patch</a>
Float has exp: Float -> Float<br/>
+<a href="patches/20081221.01.wxh.patch">20081221.01.wxh.patch</a>