[sage-support] Re: How do I find the inverse of an element in an Alternating Group?

2009-05-06 Thread Robert Bradshaw

On May 6, 2009, at 7:44 PM, jimfar wrote:

 After generating
 sage: B=AlternatingGroup(5)

 and verifying an element is in it,
 sage: c=(1,2,3)
 sage: c in B
 True

 How do I find the inverse of c in B?

Your c here isn't really a permutation element, it's just a tuple. To  
create (and manipulate) the actual permutation element do:

sage: c = B((1,2,3)); c
(1,2,3)
sage: c^-1
(1,3,2)
sage: c^2
(1,3,2)
sage: parent(c)
Alternating group of order 5!/2 as a permutation group

- Robert


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



[sage-support] Re: How do I find the inverse of an element in an Alternating Group?

2009-05-06 Thread jimfar

Thank you very much

On May 6, 7:47 pm, Robert Bradshaw rober...@math.washington.edu
wrote:
 On May 6, 2009, at 7:44 PM, jimfar wrote:

  After generating
  sage: B=AlternatingGroup(5)

  and verifying an element is in it,
  sage: c=(1,2,3)
  sage: c in B
  True

  How do I find the inverse of c in B?

 Your c here isn't really a permutation element, it's just a tuple. To  
 create (and manipulate) the actual permutation element do:

 sage: c = B((1,2,3)); c
 (1,2,3)
 sage: c^-1
 (1,3,2)
 sage: c^2
 (1,3,2)
 sage: parent(c)
 Alternating group of order 5!/2 as a permutation group

 - Robert
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---