#18756: Use coerce actions in the category framework
-------------------------------------+-------------------------------------
       Reporter:  SimonKing          |        Owner:
           Type:  defect             |       Status:  new
       Priority:  major              |    Milestone:  sage-6.8
      Component:  coercion           |   Resolution:
       Keywords:  cython, coercion,  |    Merged in:
  actions, categories                |    Reviewers:
        Authors:                     |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  e1111c346a82639bb41161469754d45008117801
  u/SimonKing/combinatorial_free_module_cython_coercion|     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------

Comment (by SimonKing):

 Today I had a discussion with Nicolas, and the plan now is to connect
 category and action framework more tightly.

 To define an action of G on S, either `S._get_action_(G, op,
 self_on_left=...)` should return an action (which is not an action in the
 mathematical sense; it is just something that is callable on a pair of
 elements) or `G._get_action_(S,op,self_on_left=...)` should return
 something.

 It would be good to make it easier for the category framework to override
 that method. But methods inherited from Parent have precedence over
 !ParentMethods. Hence, `Parent._get_action_` (which just returns None)
 should be moved to `Sets.ParentMethods._get_action_`. Concrete parents can
 still override _get_action_, and sub-categories could override it as well.

 In addition to that, `Magmas.ParentMethods.__init_extra__` could use
 `Parent.register_action` to register actions.

 However, all that would require that actions of a parent on ITSELF are
 possible. I guess technically they are possible. However,
 `ModuleElement.__mul__` would refuse to use them: It raises an error, if
 both elements have the same parents, which means that a ring structure can
 really only be implemented by either inheriting from Element and providing
 a custom `__mul__`, or by inheriting from !RingElement.

 The framework for "actions on self" should be provided on a new ticket.

--
Ticket URL: <http://trac.sagemath.org/ticket/18756#comment:18>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to