[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] [Axiom-mail] Type of Expression Problem
From: |
Martin Rubey |
Subject: |
[Axiom-developer] [Axiom-mail] Type of Expression Problem |
Date: |
Wed, 16 Nov 2005 02:03:27 -0600 |
Changes http://page.axiom-developer.org/zope/mathaction/AxiomMail/diff
--
Hans Peter W�rmli <address@hidden> writes:
> (1) -> e2:=binomial(n-1,k)/binomial(n,k)
>
> n - 1
> ( )
> k
> (1) -------
> n
> ( )
> k
> Type: Expression Integer
> (2) -> retractIfCan(e2)@Union(Fraction Polynomial Integer, "failed")
>
> (2) "failed"
> Type: Union("failed",...)
> (3) -> retractIfCan(normalize(e2))@Union(Fraction Polynomial Integer,
> "failed")
>
> n - k
> (3) -----
> n
> Type: Union(Fraction Polynomial Integer,...)
this follows the documentation: binomial(n-1,k)/binomial(n,k) is not a rational
function, but normalize(e2) is:
n - k
(3) -----
n
Type: Expression Integer
Note the type information: it is still EXPR INT. After retraction it becomes
Fraction Integer!
> I manage now, but then my naive approach was to take a polynomial, say, p[n],
> and substitute n for N: subst(p,n=N) or eval(p,n=N), something that fails
> miserably. Nevertheless, the idea of substitution is so general that one
> would expect that Axiom would allow it.
I hope you use HyperDoc:
browse POLY
select operations
notice that there is no subst, but there is eval
select eval
select descriptions...
So what you want is eval(p,n,N) where N has to be of Type Poly. For example, it
could be N::POLY INT
(In the interpreter you don't have to specify anything, it does all the type
coercions for you)
> my primary goal would not be to have some representation, but to be able to
> represent the recurrences as naturally as possibly, natural meaning as close
> to standard math language as possible.
This is a different matter. I think that you should decide what you want to
implement: Zeilbergers algorithm or coercion of holonomic functions to
expressions. The latter might be more tricky, but I don't know.
> But as an aside: maybe 3 years ago when I encountered by chance Aldor I
> became
> quite enthusiastic about it, but stayed off really using it, because the
> project was not free. Nevertheless, as some of my colleagues knew Manuel
> Bronstein from his time in Zurich, I approached him and asked whether the
> Algebra library would remain closed source. He answered very positively that
> he only needed to brush up (to clean some sins, as I understood), before he
> was going to publish the source. It seemed to me at the time that Stephen
> Watt "owned" the compiler and Manuel the Algebra libraries, but with much
> more openness on. Are they really lost with INRIA?
I don't know about Algebra, but SumIt is said to be open source in the near
future.
Martin
_______________________________________________
Axiom-mail mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/axiom-mail
--
forwarded from http://page.axiom-developer.org/zope/mathaction/address@hidden