[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] Eval in Axiom/Aldor
From: |
Ralf Hemmecke |
Subject: |
Re: [Axiom-developer] Eval in Axiom/Aldor |
Date: |
Wed, 15 Nov 2006 13:25:40 +0100 |
User-agent: |
Thunderbird 1.5.0.8 (X11/20061025) |
On 11/15/2006 07:44 AM, Page, Bill wrote:
On Tuesday, November 14, 2006 6:20 PM Antoine Hersen wrote:
I get nasty FOAM run time error with Ralf solution (I used it
in a more involved context)
Ralf wrote:
Replace "eval(a, x, 1)" by
z: SingletonAsOrderedSet := create();
eval(numer a, z, 1)/eval(denom a, z, 1);
I don't understand why Ralf introduces a new variable z. But
I think that is the right idea.
Since I worked backwards to find where "eval" is implemented. That
compiled and I was in a rush. I don't claim it is the way to go.
[snip]
However
UnivariatePolynomial(x, F) has
InnerEvalable(UnivariatePolynomial(x,F),
UnivariatePolynomial(x,F))
is true so one way that does work is:
import from UnivariatePolynomial(x, F);
import from NonNegativeInteger;
test1(a:Fraction UnivariatePolynomial(x,F)):Fraction
UnivariatePolynomial(x,F) == {
eval(numer a, monomial(1$F,1),1)/eval(denom a,
monomial(1$F,1),1)
};
monomial(1$F,1) is just one way to get x in the right form.
(Perhaps Ralf missed this possibility.)
I hope you see that the eval from above is not the same function as the
eval here.
I considered the definitions ...
UnivariatePolynomial(x:Symbol, R:Ring):
UnivariatePolynomialCategory(R) with ...
UnivariatePolynomialCategory(R:Ring): Category ==
Join(PolynomialCategory(R, NonNegativeInteger, SingletonAsOrderedSet),
Eltable(R, R), Eltable(%, %), DifferentialRing,
DifferentialExtension R) with ...
PolynomialCategory(R:Ring, E:OrderedAbelianMonoidSup, VarSet:OrderedSet):
Category ==
Join(PartialDifferentialRing VarSet, FiniteAbelianMonoidRing(R, E),
Evalable %, InnerEvalable(VarSet, R),
InnerEvalable(VarSet, %), RetractableTo VarSet,
FullyLinearlyExplicitRingOver R) with
while I am using InnerEvalable(VarSet, R) (which has nothing to do with
the symbol x from UnivariatePolynomial, you suggested
InnerEvalable(%, %)
from UnivariatePolynomial(x,F) where I must say, that I would have to
dig deeper in the category hierarchy of UP in order to find that signature.
Two different "eval"s, where yours is probably a bit more general. I
don't believe that they end up in the same implementation.
Ralf
- Re: [Axiom-developer] Eval in Axiom/Aldor, (continued)
- Re: [Axiom-developer] Eval in Axiom/Aldor, Ralf Hemmecke, 2006/11/13
- Re: [Axiom-developer] Eval in Axiom/Aldor, Martin Rubey, 2006/11/14
- Re: [Axiom-developer] Eval in Axiom/Aldor, Antoine Hersen, 2006/11/14
- RE: [Axiom-developer] Eval in Axiom/Aldor, Page, Bill, 2006/11/15
- Re: [Axiom-developer] Eval in Axiom/Aldor, Ralf Hemmecke, 2006/11/15
- RE: [Axiom-developer] Eval in Axiom/Aldor, Page, Bill, 2006/11/15
- Re: [Axiom-developer] Eval in Axiom/Aldor, Ralf Hemmecke, 2006/11/15
- Re: [Axiom-developer] Eval in Axiom/Aldor, Gabriel Dos Reis, 2006/11/15
- Re: [Axiom-developer] Eval in Axiom/Aldor, Ralf Hemmecke, 2006/11/16
- Re: [Axiom-developer] Eval in Axiom/Aldor, Gabriel Dos Reis, 2006/11/16
- Re: [Axiom-developer] Eval in Axiom/Aldor,
Ralf Hemmecke <=