[Top][All Lists]

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

Re: [Axiom-developer] Eval in Axiom/Aldor

From: Martin Rubey
Subject: Re: [Axiom-developer] Eval in Axiom/Aldor
Date: 14 Nov 2006 09:18:48 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Dear Antoine,

great to see you here!

"Antoine Hersen" <address@hidden> writes:

>     test(a:Fraction UnivariatePolynomial(x,F)):Fraction
> UnivariatePolynomial(x,F) == {
>         eval(a, x, 1)
>     }

I also had problems with that. In general, I think it is better to avoid UP
whenever possible and use SUP instead.

For your problem, one workaround is to use elt instead:

     test(a:Fraction UnivariatePolynomial(x,F)):Fraction
 UnivariatePolynomial(x,F) == elt(a, 1)

(Note that 1 refers to a Fraction UP here...)

I can only guess why 

 eval : (%,Symbol,UnivariatePolynomial(x,Integer)) -> %

does not work: it seems that it is not implemented. "Fraction" takes it from
"QuotientFieldCategory", which exports it unconditionally:

QuotientFieldCategory(S: IntegralDomain): Category ==
  Join(Field, Algebra S, RetractableTo S, FullyEvalableOver S,
         DifferentialExtension S, FullyLinearlyExplicitRingOver S,
           Patternable S, FullyPatternMatchable S)

However, "QuotientFieldCategory" doesn't provide a default definition... I
guess this should be reported on issueTracker. Currently I don't have the time
to check this more thoroughly, it would be interesting to see whether the
compiler issues a warning when compiling "Fraction".

In any case, the fix is probably very easy, since QuotientFieldCategory has
numer and denom. However, we should to check which definitions of "eval" should
be provided. There are so many defaults...


reply via email to

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