On 5/7/07, Stavros Macrakis <macrakis at alum.mit.edu> wrote:
> matchdeclare([a1,a2],atom)$
> tellsimpafter(ppp(a1+a2),ppx(a1,a2));
> a2 + a1 partitions `sum'
> ppp(x+y) => ppx(0, y + x) <<<<<<<<< ignores matchdeclare of a1
> and a2 as atoms!!!
> (perhaps this is just a simple bug)
That's a feature of PART+ . a2 sweeps up all the atoms in the sum,
and then PART+ tries to match 0 to any match variables not yet
assigned anything.
I'm not saying this is the best possible design, but it is intentional
from what i can tell.
By the way, "foo + bar partitions sum" is just an informational
message. It doesn't mean there's anything wrong.
> > Sorry to be vague; the code is confusing.
>
> Exactly, the user shouldn't have to care about any of that. If you, looking
> at the code, can't tell what is going on, how is the poor mathematical user
> supposed to understand it?
Well, I didn't mean to say I'm happy with this situation.
> It would be nice to have a pattern-matching package that was both powerful
> and easy to use. Unfortunately, that is not currently the case. In the
> meantime, it often turns out to be easier to write one's own matching
> code... regrettably.
Yeah. It's really too bad about that.
Robert