On Mar 16, 2009, at 2:46 PM, John H Palmieri wrote: > On Mar 16, 2:40 pm, John H Palmieri <jhpalmier...@gmail.com> wrote: >> On Mar 16, 2:26 pm, Robert Bradshaw <rober...@math.washington.edu> >> wrote: >> >>> On Mar 16, 2009, at 2:25 PM, epple wrote: >> >>>> Actually I am getting the same result for other permutations, like: >> >>>> sage: h=PermutationGroupElement('(1,3,2)') >>>> sage: k=PermutationGroupElement('(1,2,3),(4,5)') >>>> sage: k^2==h,h==k^2 >>>> (False, True) >> >>> Hmm... looks like permutation groups aren't being properly coerced >>> from one Parent to another. >> >> Should they be? I mean, should h and k^2 be equal, or not, in this >> case? > > In particular, I wouldn't mind this behavior: > > sage: h = PermutationGroupElement('(1,3,2)') # in S(3) > sage: k = PermutationGroupElement('(1,2,3),(4,5)') # in S(5) > sage: k^2 == h, h == k^2 > (False, False) > sage: S5 = k.parent() > sage: h5 = S5(h) > sage: k^2 == h5, h5 == k^2 > (True, True)
There's a whole thread on this topic... In any case, as the "Parent" has not been specified, I wouldn't want it to prevent them being equal. But the current asymmetric behavior is particularly bad. - 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 -~----------~----~----~----~------~----~------~--~---