Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • $\begingroup$ Please clarify: do you want evaluate to permute arguments of f(or any function?) to a form for which term rewriting finds a rule for arguments of f? What if there are multiple permutations which are permissible? $\endgroup$ Commented May 31, 2019 at 17:35
  • $\begingroup$ @kirma I didn't understand your first question. I want evaluate to permute arguments of only the function f. It is supposed there are no multiple permutations which are permissible. I can add the requirement that if multiple permutations are permissible, return False. $\endgroup$ Commented May 31, 2019 at 17:39
  • $\begingroup$ OK. What if no permutation matches? $\endgroup$ Commented May 31, 2019 at 17:48
  • $\begingroup$ @kirma It may return False. Let me edit the question $\endgroup$ Commented May 31, 2019 at 17:55
  • $\begingroup$ In addition to my accepted answer, I would suggest taking a look at Orderless, that is SetAttribute[f, Orderless] for f. This doesn't handle no-matches or multiple-matches cases, but can auto-permute arguments when evaluating the function. $\endgroup$ Commented Jun 1, 2019 at 7:37