#10911: inverse() method for permutation group elements
----------------------------+-----------------------------------------------
Reporter: rbeezer | Owner: joyner
Type: defect | Status: needs_review
Priority: minor | Milestone: sage-4.7
Component: group theory | Keywords:
Author: Rob Beezer | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
----------------------------+-----------------------------------------------
Changes (by rbeezer):
* status: needs_work => needs_review
Old description:
> Patch aims to resolve the following inconsistency, by providing a
> `.inverse()` method for permutation group elements.
>
> {{{
> sage: S = SymmetricGroup(4)
> sage: s = S("(1,2,3)")
> sage: type(s)
> <type
> 'sage.groups.perm_gps.permgroup_element.PermutationGroupElement'>
> sage: s^-1
> (1,3,2)
> sage: s.inverse()
> (1,3,2)
>
> sage: A = AlternatingGroup(4)
> sage: a = A("(1,2,3)")
> sage: type(a)
> <type
> 'sage.groups.perm_gps.permgroup_element.PermutationGroupElement'>
> sage: a^-1
> (1,3,2)
> sage: a.inverse()
> ---------------------------------------------------------------------------
> AttributeError Traceback (most recent call
> last)
> <snip>
> AttributeError:
> 'sage.groups.perm_gps.permgroup_element.PermutationGroupElement' object
> has no attribute 'inverse'
> }}}
>
> Some discussion at http://groups.google.com/group/sage-
> devel/browse_thread/thread/683315261a6c6def
New description:
Patch aims to resolve the following inconsistency, by providing a
`.inverse()` method for permutation group elements.
{{{
sage: S = SymmetricGroup(4)
sage: s = S("(1,2,3)")
sage: type(s)
<type
'sage.groups.perm_gps.permgroup_element.PermutationGroupElement'>
sage: s^-1
(1,3,2)
sage: s.inverse()
(1,3,2)
sage: A = AlternatingGroup(4)
sage: a = A("(1,2,3)")
sage: type(a)
<type
'sage.groups.perm_gps.permgroup_element.PermutationGroupElement'>
sage: a^-1
(1,3,2)
sage: a.inverse()
---------------------------------------------------------------------------
AttributeError Traceback (most recent call
last)
<snip>
AttributeError:
'sage.groups.perm_gps.permgroup_element.PermutationGroupElement' object
has no attribute 'inverse'
}}}
Some discussion at http://groups.google.com/group/sage-
devel/browse_thread/thread/683315261a6c6def
Apply trac_10911-inverses-permutation-group-v2.patch
--
Comment:
Replying to [comment:3 robertwb]:
> Calling {{{self.__invert__()}}} is slow, use {{{~self}}} instead.
Thanks, Robert. v2 patch has the suggested change.
Rob
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10911#comment:4>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.