declare(A,outative)



  I think you can do  apply1(expres,r1,r2), to save some typing..

You may need more rules like

notone(x):=if x=1 then true else false

matchdeclare(n1, notone);

defrule (r3, A(x(a), n1*y(a)),    n1* A(x(a),y(a)))


RJF