Bases: sage.structure.coerce_actions.GenericAction
Class for actions defined via the _act_on_ method.
Bases: sage.structure.coerce_actions.GenericAction
Class for actions defined via the _acted_upon_ method.
Bases: sage.categories.action.Action
Returns the “codomain” of this action, i.e. the Parent in which the result elements live. Typically, this should be the same as the acted upon set.
EXAMPLES:
sage: A = sage.structure.coerce_actions.ActedUponAction(MatrixSpace(ZZ, 2), Cusps, True)
sage: A.codomain()
Set P^1(QQ) of all cusps
sage: A = sage.structure.coerce_actions.ActOnAction(SymmetricGroup(3), QQ['x,y,z'], False)
sage: A.codomain()
Multivariate Polynomial Ring in x, y, z over Rational Field
Bases: sage.categories.action.Action
The codomain of self, which may or may not be equal to the domain.
EXAMPLES:
sage: from sage.structure.coerce_actions import LeftModuleAction
sage: A = LeftModuleAction(QQ, ZZ['x,y,z'])
sage: A.codomain()
Multivariate Polynomial Ring in x, y, z over Rational Field
The domain of self, which is the module that is being acted on.
EXAMPLES:
sage: from sage.structure.coerce_actions import LeftModuleAction
sage: A = LeftModuleAction(QQ, ZZ['x,y,z'])
sage: A.domain()
Multivariate Polynomial Ring in x, y, z over Integer Ring
Bases: sage.structure.coerce_actions.ModuleAction
Returns an action of X on Y or Y on X as defined by elements X, if any.
EXAMPLES:
sage: from sage.structure.coerce_actions import detect_element_action
sage: detect_element_action(ZZ['x'], ZZ, False)
Left scalar multiplication by Integer Ring on Univariate Polynomial Ring in x over Integer Ring
sage: detect_element_action(ZZ['x'], QQ, True)
Right scalar multiplication by Rational Field on Univariate Polynomial Ring in x over Integer Ring
sage: detect_element_action(Cusps, MatrixSpace(ZZ, 2), False)
Left action by Full MatrixSpace of 2 by 2 dense matrices over Integer Ring on Set P^1(QQ) of all cusps
sage: detect_element_action(Cusps, MatrixSpace(ZZ, 2), True),
(None,)
sage: detect_element_action(ZZ, QQ, True),
(None,)
TESTS:
This test checks that the issue in Trac #7718 has been fixed:
sage: class MyParent(Parent):
... def an_element(self):
... pass
...
sage: A = MyParent()
sage: detect_element_action(A, ZZ, True)
...
RuntimeError: an_element() returned None