Hello,

I get nasty FOAM run time error with Ralf solution( I used it in a
more involved context)

And I cant compile Martin one, maybe I should not assume that a Field
is an INTDOM ...




On 14 Nov 2006 09:18:48 +0100, Martin Rubey <[EMAIL PROTECTED]> wrote:
Dear Antoine,

great to see you here!

"Antoine Hersen" <[EMAIL PROTECTED]> 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...



Martin




_______________________________________________
Axiom-developer mailing list
Axiom-developer@nongnu.org
http://lists.nongnu.org/mailman/listinfo/axiom-developer

Reply via email to