On 26/08/2008, at 2:50 AM, William Stein wrote:

> Burcin -- I did actually mostly implement pattern matching in Pynac.

Is there documentation?  A bit of google turned up nothing.

>            sage: sin(1+sin(x)).subs(sin(w0)==cos(w0))
>            cos(cos(x) + 1)

In Mathematica, the result would be cos(sin(x) + 1), since having  
matched the outer expression, the replacement algorithm moves on  
rather than in.

One would obtain cos(cos(x) + 1) by making the substitution rule  
sin==cos.  Can you do that?  Can you evaluate code during the matching  
of your patterns?  Can you nest patterns?  I think these are highly  
desirable, even if they are suitably carefully hidden from the casual  
user.

On 26/08/2008, at 1:24 AM, in a different thread, Burcin Erocal wrote:
> We already have a pretty good "symbolic engine" in Sage, maxima does
> quite a good job of solving integrals, limits, etc. The main problem
> with Maxima is that we cannot extend it.

Is "not extending of Maxima" a concrete policy?  I understand that  
maxima sucks in some circumstances, but it seems quite the beast here.

I am quite confused about a lot of the pattern matching discussion.   
AFAICT, that is the problem for which lisp rocks, and the best way to  
do it is probably to write maxima code for it.  And the best way to  
make it accessible from python is to provide pretty python methods to  
call lisp.

Any other suitably general form of pattern mathematical matching will  
involve the proverbial reimplementation of lisp.

D

p.s. this is obviously from my fairly basic "lisp is more or less  
mathematica" understanding of lisp.

==================================
David J Philp
Postdoctoral Fellow
National Centre for Epidemiology and Population Health
Building 62, cnr Mills Rd & Eggleston Rd
The Australian National University
Canberra ACT 0200 Australia

T: +61 2 6125 8260
F: +61 2 6125 0740
M: 0423 535 397
W: http://nceph.anu.edu.au/

CRICOS Provider #00120C



--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to