1 | initial version |

The link you provide explains how to allow using `g * f`

to let `g`

act on `f`

.

Here is a way to define the action that does not use that.

It requires typing `act(g, f)`

rather than `g * f`

.

Define the action:

```
def act(g, f):
r"""
Act by this invertible matrix ``g`` on this polynomial ``f``
by ``g⋅f(x) = f(h(x))`` where ``h`` is the inverse of ``g``.
"""
M = f.parent()
return f(*(g.inverse() * vector(M, M.gens())))
```

Use it:

```
sage: R.<x, y> = QQ['x, y']
sage: G = GL(2, QQ)
sage: act = GeneralLinearGroupAction(G, R)
sage: f = x + y
sage: g = G([1, 2, 3, 5])
sage: act(g, f)
-2*x + y
```

Hope someone can say more on registering the group action
so that `g * f`

returns the same as `act(g, f)`

.

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.