I really don't understand rules and patterns



On 04/02/2013 02:09 PM, Richard Fateman wrote:
> Basically, On 4/2/2013 1:25 PM, Daniel Lakeland wrote:
>> What is going on here? I want to find sums involving x,y, or z, and an
>> index variable, i, j, k and a symbol dq and do something to them. I
>> have rules like:
>>
> 1.  Of all the names you could choose, perhaps you should not use x twice.
> You could say  lambda([daniel], member(daniel,'[x,y,z]).
> Not that it matters here, I think.

Yes, this was quick and dirty, but as you say, it shouldn't matter here 
(I quote the list).

> 2. The big issue is you are expecting Maxima to do some kind of
> exponential exhaustive search
> to try to match something you have in mind.  It doesn't.
>
> If you want to partition sums and products, you can do so but not the
> way you wrote it.

This bites me every time, having programmed in prolog a bit I know that 
maxima is not doing exhaustive backtracking unification matching, but 
the problem I always have is that I can never figure out what it *IS* 
doing.

> See the paper I wrote and posted a link to, about partitions.

This sounds very good, and perhaps we can make it part of the 
documentation of maxima. I will search the archives to see if I can find 
it. When I go to the pattern matching docs it never seems to help me 
with this kind of issue, it doesn't really describe the process that 
maxima is willing to carry out.