Trouble with the pattern matcher ...



Hello,

I've stumpled upon the following behavior:

(%i1) matchdeclare(f, true);
       defmatch(df_over_f, diff(f, x) / f);
       defmatch(df_times_f, diff(f, x) * f);
       df_over_f(cos(x) / sin(x));
       df_times_f(cos(x) * sin(x));
(%o1) done
(%o2) df_over_f
(%o3) df_times_f
(%o4) [f=sin(x)]
(%o5) false

In other words:
The pattern matcher correctly recognizes cos(x)/sin(x), but fails to 
recognize cos(x)*sin(x) - the only difference being the operator.

It also fails for the very simple case of 1 and x:

(%i2) df_over_f(1 / x);
       df_times_f(1 * x);
(%o6) [f=x]
(%o7) false

Am I doing something wrong here?

Regards,
David