MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Transformation rule problem


> Brute force to the rescue!
> 
>     rulen[a_, b_][d_] = a^n_*b^m_ :> d*(a^(n - 1)*b^(m - 1));
>     rulea[a_, b_][d_] = a*b^m_ :> d*b^(m - 1);
>     ruleb[a_, b_][d_] = a^n_*b :> d*a^(n - 1);
> 
>     mySimplify[expr_, a_ b_ -> d_] :=
>         (expr //. rulen[a, b][d]) /. {rulea[a, b][d], ruleb[a, b][d]}
> 
> This only works when a and b are not "mixable", i.e. they are immediately
> identifiable by sheer pattern matching.

What do you mean by this?

Oliver


  • Prev by Date: Re: lists of variables
  • Next by Date: Re: lists of variables
  • Previous by thread: Re: Transformation rule problem
  • Next by thread: Re: Transformation rule problem