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.

5
  • 1
    $\begingroup$ You should be able to do Attributes[CirclePlus]=Flat, and then your first definition should do the trick $\endgroup$ Commented Oct 19, 2022 at 18:49
  • 1
    $\begingroup$ Why not use CircleMinus instead? It already has left grouping. $\endgroup$ Commented Oct 19, 2022 at 21:58
  • $\begingroup$ @CarlWoll That's strange. Why should CircleMinus be automatically left-associative but CirclePlus not? Who made that choice and why? Is it just to make it more consistent with Subtract, which is non-associative and therefore requires a choice or left or right associativity by default? $\endgroup$ Commented Oct 19, 2022 at 22:10
  • $\begingroup$ @ Lukas Lang Now I try ``` Clear[CircleDot, CirclePlus, CircleMinus, CircleTimes]; a_[CirclePlus]b_ := a + b^2; Attributes[CirclePlus] = Flat; ``` But it gave ``` CirclePlus[a]+(CirclePlus[b]+CirclePlus[c]^2)^2 ``` $\endgroup$ Commented Oct 19, 2022 at 22:57
  • $\begingroup$ @CarlWoll Yes, the CircleMinus works. However I need to define more than two different operators. So I need to fix it $\endgroup$ Commented Oct 19, 2022 at 23:05