Non-exclusive pattern matching? e.g. distributiveness of a function, was: Predictable pattern matching?
Subject: Non-exclusive pattern matching? e.g. distributiveness of a function, was: Predictable pattern matching?
From: Richard Fateman
Date: Tue, 23 Dec 2008 13:26:15 -0800
Richard Fateman wrote:
> You can get all the properties you want by doing this:
>
> declare(int,linear);
> matchdeclare(aa,true);
> tellsimpafter(int(1,aa),aa);
>
>
>
> that's all.
>
> RJF
>
>
>
One reason your patterns don't do the right thing is that the expression
x^2+y matches the
pattern
a1+a2 with the assignment
a1=x^2+y, a2=0
RJF