TLDR.
1. The difference between an if-then-else tree and "pattern matching"
is two-fold.
 (a) The "pattern matching" is probably referring to a purely rule-driven
algorithm, where each time there is a transformation, the rule set is
re-applied again.   A clever system will only look at the rules that are
(probably) applicable, but starting with thousands of rules can be
time-consuming.
(b) The if-then-else tree does use a local kind of pattern matching,
but this may actually be programmed as segmenting of an expression.
For example, you know that you got to a place in the program because
there is something of the form  W^Z.  Pick off the Z and --- if Z is
an integer then do P1  else do P2.      Where P1 and P2 are if-then-else...

So is this pattern matching?  Sort of.  Depends on how you pick off
pieces. e.g,  e=part(S,2)   or   match(S, b^e).
If your match program is simple enough, it could be about as fast.
If your match program is hairy like Mathematica's not so much.



2. A program that automatically converts rule-sets to if-then-else is
presumably what Albert Rich has done, and probably could be done
every time the rule set changes.  I suppose the target could be a sympy
compatible if-then-else tree,  since he apparently already targets
Maxima and Maple.

3. Rewriting the Lisp code for MockMMA in python is presumably something
that could be done.  I am available if someone needs to ask a question.
However, the person should obviously know Common Lisp as well as
Mathematica.  I am personally only superficially familiar with python.
There may be reasons other than Rubi to do this.  For example, if
you do a good job of this (a parser+enough semantics to
mimick the user-programming level of the language, currently
called "The Wolfram Language")  you could snarf down huge
piles of "application" code -- at least at some superficial level --
and then cut in the sympy alternatives as necessary for the
application,.


-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/d61c643a-31ab-4d13-895a-355305393e73%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to