non/spire — pull request #278 by denisrosset (2014-07-11 14:08:34+00:00)
Title: Left/right action laws not implemented correctly now

A left action satisfies the law: (gh).x = g.(h.x), while a right action satisfies x.(gh) = (x.g).h.

To go from one to the other, the action needs to be composed with the inverse operation. In the GroupAction type class however, this is not done yet. And because now GroupAction scalar derives from Semigroup, this cannot be corrected.

I propose thus to remove the automatic call of the left action from the right, because it does not follow the mathematical laws and will surprise the user. Note that the current pull request does not compile because actr is missing in e.g. Sign.

I see three solutions:

1. leave the code as it is and let the user define its left and right actions,
2. split GroupAction into LeftGroupAction and RightGroupAction, and the same for AdditiveGroupAction, MultiplicativeGroupAction,
3. reintroduce val scalar: Group[G].

I dislike 3. because I like the group action syntax when dealing with semigroups - and would have to redefine it myself, which is a pain because I then have to cherry pick Spire syntax imports.