There is function is_isomorphic in Sage, but there is not is_conjugate. For curiosity I looked source, and it seems to be an oneliner to write one:

    def are_conjugates(self, g1, g2):
        """
        Returns ``True`` if ``g1`` and ``g2`` are conjugates under the
        action of ``self``.

        EXAMPLES::

            sage: G = SymmetricGroup(4)
            sage: G1 = PermutationGroup(['(1,2)(3,4)', '(1,3)(2,4)'])
            sage: G2 = PermutationGroup(['(1,2)', '(3,4)'])
            sage: G3 = PermutationGroup(['(1,3)', '(2,4)'])
            sage: G1.is_isomorphic(G2)
            True
            sage: G.are_conjugates(G1, G2)
            False
            sage: G.are_conjugates(G2, G3)
            True
        """
# Add check for types here
        return gap.IsConjugate(self, g1, g2).bool()

However, I have never before modified the source code of Sage itself. At least two question came in mind:

- What is naming policy? Should this be is_conjugate? What is best order for arguments?

- Should there be a function that only looks to cycle structure? I mean something like

sage: G1 = PermutationGroup(['(1,2)'])
sage: G2 = PermutationGroup(['(2,3)'])
sage: G1.is_conjugate(G2)
True

? I.e. in this example assuming group S_3 as acting group.

and a third one is, of course:

- Is this stupid idea at beginning, and if not, is this oneliner going to blow up when trying with real examples?

--
Jori Mäntysalo

--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to