declare(A,outative)



Thank you Robert.
*
matchdeclare(s,constantp);
defrule(a1, A(x(a),s*y(a)),s*A(x(a),y(a)));
apply1(A(x(a),%i*y(a)),a1);
*
works correctly.
Marek.
_________________
U?ytkownik Robert Dodier napisa?:
> On 9/5/10, Marek Pietrow<mrk at kft.umcs.lublin.pl>  wrote:
>
>    
>> notone(x):=if x=1 then true else false;
>>      
> Well, this is a typographical error. Should be:
>   notone(x) := if x#1 then true else false
> Or more briefly, notone(x) := x#1;
> Or matchdeclare(n1, lambda([x], x#1));
> Or still more briefly, matchdeclare(n1, "#"(1));
>
>    
>> How to tell maxima that the rule should be applied to any constant?
>>      
> Something like
>
>   matchdeclare (whatever, lambda ([x], x#1 and constantp(x)));
>
> HTH
>
> Robert Dodier
>
>