Hi Robert!

On 27 Dez., 22:26, Robert Bradshaw <rober...@math.washington.edu>
wrote:
> sage: M = matrix(ZZ, 2, 2)
> sage: space = M.parent(); space
> Full MatrixSpace of 2 by 2 dense matrices over Integer Ring
> sage: space.get_act
> space.get_action       space.get_action_c     space.get_action_impl
> sage: space.get_action??
>
> If get_action (and discover_action) are not overridden, the default is
> to look for element._act_on, etc.

Is this how it does work or how it should work?

I ask since space.get_action is inherited from
sage.structure.parent.Parent, where it says:
   "To provide additional actions, override :meth:`_get_action_`."

However, space._get_action_ is not overridden but inherited from
sage.structure.parent_old.Parent, and since space._element_constructor
is None, the call is forwarded to space._get_action_c, which again is
inherited from sage.structure.parent_old.Parent.

Since space has a __dict__, eventually the action is obtained from
space.get_action_impl, which has no documentation. Confusing, and the
call forwarding is probably time consuming.

So, what should one do in the new Parent/coercion/category framework?
I guess that one has to override
sage.structure.parent.Parent._get_action_, correct? But how does one
define an action? I guess that one is supposed to use
sage.categories.action, but so far it has no example at all.

sage.categories.action.Action.__init__ tells that an action of G on S
is a functor from the category Groupoid(G) to S.category(), and the
documentation states "A group action $G \times S \rightarrow S$ is a
functor from $G$ to Sets."

That is rather obscure to me. Moreover,
sage.categories.action.Action.__call__ overrides the call method of
sage.categories.functor.Functor.__call__. So, I don't see a proper
relation between action and functor.

Isn't a group action A:GxS->S simply a homomorphism from G to Aut(S)?
How are these two definitions related? And is Aut(S) implemented in
Sage? At least it isn't under that name. Sometimes Aut(S) is called
Sym(S), but SymmetricGroup won't work in this context.

But apart from _get_action_: Isn't it possible to implement an action
by providing _r_action/_l_action or acts_upon/acted_upon? Which of the
many ways is preferred?

Cconclusion: For the moment, beyond acts_upon/acted_upon, I wouldn't
even know what to do in order to implement a simple action of, say,
Sym(n) on QQ[x_1,...,x_n] by variable permutation.

Cheers,
Simon

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to