[Top][All Lists]

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

[Axiom-developer] [Axiom-mail] Type of Expression Problem

From: Hans Peter Würmli
Subject: [Axiom-developer] [Axiom-mail] Type of Expression Problem
Date: Tue, 15 Nov 2005 15:57:02 -0600

Hi Martin

I am a bit tired, so my response might be make not make sense.

> > F(n-1,k)/F(n,k) ,
> >
> > primarily given by an Expression Integer could be "coerced" / "converted"
> > / "retracted" (certainly not) to, say, a
> >
> > Fraction Polynomial Integer.
> Indeed, "retractIfCan(argument)@Domain" is your friend. What it does is to
> check whether "argument" can be regarded as an element of "Domain".

I don't understand. Wouldn't argument have to be in a Domain' which is a 
target of an injection from Domain, like INT -> FRAC INT. But for that you 
would have to inject rational functions into the Domain of expressions. I 
admit that I don't understand yet enough. 

I tried to apply your advice, but I am still where I was before, meaning that 
only good look brings me to the right answer, e.g.

(1) -> e2:=binomial(n-1,k)/binomial(n,k)

         n - 1
        (     )
   (1)  -------
          ( )
                                                     Type: Expression Integer
(2) -> retractIfCan(e2)@Union(Fraction Polynomial Integer, "failed")

   (2)  "failed"
                                                    Type: Union("failed",...)
(3) -> retractIfCan(normalize(e2))@Union(Fraction Polynomial Integer, 

        n - k
   (3)  -----
                                 Type: Union(Fraction Polynomial Integer,...)

> To see how it is done see the function notRF? in combfunc.spad.pamphlet.

Thank you. I will study it.

> A suggestion: as you probably know, Gospers method is already implemented
> in Axiom. 

Yes, I know. I had bought the Zeilberger-Wilf-Petkovsek A=B book, when the sum 
problem was discussed some time ago on this list. My first try then was to 
check whether I could play with polynomials of forward difference operators. 
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.

> Maybe you could implement a simple version of Zeilbergers 
> algorithm? 

I still don't master the simplest first steps of programming in Axiom, but 
comes times, comes success ... 

> If you do, you will need to have a method of representing recurrences, with
> which I can help.

Yes, I am interested (as I remember you pointed the list once to it, haven't 
you?), though 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. I am just as much 
interested in Axiom as a language as in Axiom as a tool to manipulate 
expressions and do some Algebra (and to occasionally solve a problem).

I have followed to some extent the discussion on Lisp, Boot and Axiom. As a 
heretic I would prefer Haskell as the underlying language anyway. Axiom 
itself has a nice foundation, but I wonder whether some of the understanding 
of typed functional languages that devoloped during the last 20 years would 
not help to make Axiom even better.

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?

Cheers, H.P.

Axiom-mail mailing list

forwarded from

reply via email to

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