Answer by Mr.Wizard for Rule for orderless function Times
Everything Jens wrote is valid, but perhaps you merely want to restrict your z pattern a bit.Consider:ruleex = Times[q___, f[x__][y__], z : f[__][___] ..] :> Times[-1, q, y, f[x][z]];expr =...
View ArticleAnswer by Jens for Rule for orderless function Times
The reason why your rule doesn't work is that Times is orderless so that the two multiplicative factors at the beginning and end of the expression 5 expr are not considered distinct. Your goal seems to...
View ArticleRule for orderless function Times
I have problems extending a replacement rule. Schematically, this is the situation: I have an expression and a rule, and they work perfectly together.In[1] = result = expr /.ruleOut[1] = ...Now I want...
View Article
More Pages to Explore .....