Permutation group homomorphisms - Groups

Skip to content
Back to top
View this page
Edit this page

# Permutation group homomorphisms

AUTHORS:

- David Joyner (2006-03-21): first version

- David Joyner (2008-06): fixed kernel and image to return a group, instead of a string.

EXAMPLES:

Sage

    sage: G = CyclicPermutationGroup(4)
    sage: H = DihedralGroup(4)
    sage: g = G([(1,2,3,4)])
    sage: phi = PermutationGroupMorphism_im_gens(G, H, map(H, G.gens()))
    sage: phi.image(G)
    Subgroup generated by [(1,2,3,4)] of
     (Dihedral group of order 8 as a permutation group)
    sage: phi.kernel()
    Subgroup generated by [()] of (Cyclic group of order 4 as a permutation group)
    sage: phi.image(g)
    (1,2,3,4)
    sage: phi(g)
    (1,2,3,4)
    sage: phi.codomain()
    Dihedral group of order 8 as a permutation group
    sage: phi.codomain()
    Dihedral group of order 8 as a permutation group
    sage: phi.domain()
    Cyclic group of order 4 as a permutation group

Python

    >>> from sage.all import *
    >>> G = CyclicPermutationGroup(Integer(4))
    >>> H = DihedralGroup(Integer(4))
    >>> g = G([(Integer(1),Integer(2),Integer(3),Integer(4))])
    >>> phi = PermutationGroupMorphism_im_gens(G, H, map(H, G.gens()))
    >>> phi.image(G)
    Subgroup generated by [(1,2,3,4)] of
     (Dihedral group of order 8 as a permutation group)
    >>> phi.kernel()
    Subgroup generated by [()] of (Cyclic group of order 4 as a permutation group)
    >>> phi.image(g)
    (1,2,3,4)
    >>> phi(g)
    (1,2,3,4)
    >>> phi.codomain()
    Dihedral group of order 8 as a permutation group
    >>> phi.codomain()
    Dihedral group of order 8 as a permutation group
    >>> phi.domain()
    Cyclic group of order 4 as a permutation group

class sage.groups.perm_gps.permgroup_morphism.PermutationGroupMorphism

  Bases: `Morphism`

  A set-theoretic map between PermutationGroups.

  image(J)

    Compute the subgroup of the codomain \(H\) which is the image of \(J\).

    \(J\) must be a subgroup of the domain \(G\).

    EXAMPLES:

    Sage

        sage: G = CyclicPermutationGroup(4)
        sage: H = DihedralGroup(4)
        sage: g = G([(1,2,3,4)])
        sage: phi = PermutationGroupMorphism_im_gens(G, H, map(H, G.gens()))
        sage: phi.image(G)
        Subgroup generated by [(1,2,3,4)] of
         (Dihedral group of order 8 as a permutation group)
        sage: phi.image(g)
        (1,2,3,4)

    Python

        >>> from sage.all import *
        >>> G = CyclicPermutationGroup(Integer(4))
        >>> H = DihedralGroup(Integer(4))
        >>> g = G([(Integer(1),Integer(2),Integer(3),Integer(4))])
        >>> phi = PermutationGroupMorphism_im_gens(G, H, map(H, G.gens()))
        >>> phi.image(G)
        Subgroup generated by [(1,2,3,4)] of
         (Dihedral group of order 8 as a permutation group)
        >>> phi.image(g)
        (1,2,3,4)

    Sage

        sage: G = PSL(2,7)
        sage: D = G.direct_product(G)
        sage: H = D[0]
        sage: pr1 = D[3]
        sage: pr1.image(G)
        Subgroup generated by [(3,7,5)(4,8,6), (1,2,6)(3,4,8)] of
         (The projective special linear group of degree 2 over Finite Field of size 7)
        sage: G.is_isomorphic(pr1.image(G))
        True

    [Python]

        >>> from sage.all import *
        >>> G = PSL(Integer(2),Integer(7))
        >>> D = G.direct_product(G)
        >>> H = D[Integer(0)]
        >>> pr1 = D[Integer(3)]
        >>> pr1.image(G)
        Subgroup generated by [(3,7,5)(4,8,6), (1,2,6)(3,4,8)] of
         (The projective special linear group of degree 2 over Finite Field of size 7)
        >>> G.is_isomorphic(pr1.image(G))
        True

    Check that Issue #28324 is fixed:

    Sage

        sage: # needs sage.rings.number_field
        sage: R.<x> = QQ[]
        sage: f = x^4 + x^2 - 3
        sage: L.<a> = f.splitting_field()
        sage: G = L.galois_group()
        sage: D4 = DihedralGroup(4)
        sage: h = D4.isomorphism_to(G)
        sage: h.image(D4).is_isomorphic(G)
        True
        sage: all(h.image(g) in G for g in D4.gens())
        True

    Python

        >>> from sage.all import *
        >>> # needs sage.rings.number_field
        >>> R = QQ['x']; (x,) = R._first_ngens(1)
        >>> f = x**Integer(4) + x**Integer(2) - Integer(3)
        >>> L = f.splitting_field(names=('a',)); (a,) = L._first_ngens(1)
        >>> G = L.galois_group()
        >>> D4 = DihedralGroup(Integer(4))
        >>> h = D4.isomorphism_to(G)
        >>> h.image(D4).is_isomorphic(G)
        True
        >>> all(h.image(g) in G for g in D4.gens())
        True

  kernel()

    Return the kernel of this homomorphism as a permutation group.

    EXAMPLES:

    Sage

        sage: G = CyclicPermutationGroup(4)
        sage: H = DihedralGroup(4)
        sage: g = G([(1,2,3,4)])
        sage: phi = PermutationGroupMorphism_im_gens(G, H, [1])
        sage: phi.kernel()
        Subgroup generated by [(1,2,3,4)] of
         (Cyclic group of order 4 as a permutation group)

    Python

        >>> from sage.all import *
        >>> G = CyclicPermutationGroup(Integer(4))
        >>> H = DihedralGroup(Integer(4))
        >>> g = G([(Integer(1),Integer(2),Integer(3),Integer(4))])
        >>> phi = PermutationGroupMorphism_im_gens(G, H, [Integer(1)])
        >>> phi.kernel()
        Subgroup generated by [(1,2,3,4)] of
         (Cyclic group of order 4 as a permutation group)

    Sage

        sage: G = PSL(2,7)
        sage: D = G.direct_product(G)
        sage: H = D[0]
        sage: pr1 = D[3]
        sage: G.is_isomorphic(pr1.kernel())
        True

    [Python]

        >>> from sage.all import *
        >>> G = PSL(Integer(2),Integer(7))
        >>> D = G.direct_product(G)
        >>> H = D[Integer(0)]
        >>> pr1 = D[Integer(3)]
        >>> G.is_isomorphic(pr1.kernel())
        True

class sage.groups.perm_gps.permgroup_morphism.PermutationGroupMorphism_from_gap(G, H, gap_hom)

  Bases: `PermutationGroupMorphism`

  This is a Python trick to allow Sage programmers to create a group homomorphism using GAP using very general constructions. An example of its usage is in the direct_product instance method of the `PermutationGroup_generic` class in permgroup.py.

  Basic syntax:

  `PermutationGroupMorphism_from_gap(domain_group, range_group, 'phi:=gap_hom_command;', 'phi')`. And don’t forget the line: `from sage.groups.perm_gps.permgroup_morphism import PermutationGroupMorphism_from_gap` in your program.

  EXAMPLES:

  Sage

      sage: from sage.groups.perm_gps.permgroup_morphism import PermutationGroupMorphism_from_gap
      sage: G = PermutationGroup([[(1,2),(3,4)], [(1,2,3,4)]])
      sage: H = G.subgroup([G([(1,2,3,4)])])
      sage: PermutationGroupMorphism_from_gap(H, G, gap.Identity)
      Permutation group morphism:
        From: Subgroup generated by [(1,2,3,4)] of
              (Permutation Group with generators [(1,2)(3,4), (1,2,3,4)])
        To:   Permutation Group with generators [(1,2)(3,4), (1,2,3,4)]
        Defn: Identity

  Python

      >>> from sage.all import *
      >>> from sage.groups.perm_gps.permgroup_morphism import PermutationGroupMorphism_from_gap
      >>> G = PermutationGroup([[(Integer(1),Integer(2)),(Integer(3),Integer(4))], [(Integer(1),Integer(2),Integer(3),Integer(4))]])
      >>> H = G.subgroup([G([(Integer(1),Integer(2),Integer(3),Integer(4))])])
      >>> PermutationGroupMorphism_from_gap(H, G, gap.Identity)
      Permutation group morphism:
        From: Subgroup generated by [(1,2,3,4)] of
              (Permutation Group with generators [(1,2)(3,4), (1,2,3,4)])
        To:   Permutation Group with generators [(1,2)(3,4), (1,2,3,4)]
        Defn: Identity

class sage.groups.perm_gps.permgroup_morphism.PermutationGroupMorphism_id

  Bases: `PermutationGroupMorphism`

class sage.groups.perm_gps.permgroup_morphism.PermutationGroupMorphism_im_gens(G, H, gens=None)

  Bases: `PermutationGroupMorphism`

  Some python code for wrapping GAP’s `GroupHomomorphismByImages` function but only for permutation groups. Can be expensive if G is large. This returns “fail” if gens does not generate `self` or if the map does not extend to a group homomorphism, `self` - `other`.

  EXAMPLES:

  Sage

      sage: G = CyclicPermutationGroup(4)
      sage: H = DihedralGroup(4)
      sage: phi = PermutationGroupMorphism_im_gens(G, H, map(H, G.gens())); phi
      Permutation group morphism:
        From: Cyclic group of order 4 as a permutation group
        To:   Dihedral group of order 8 as a permutation group
        Defn: [(1,2,3,4)] -> [(1,2,3,4)]
      sage: g = G([(1,3),(2,4)]); g
      (1,3)(2,4)
      sage: phi(g)
      (1,3)(2,4)
      sage: images = ((4,3,2,1),)
      sage: phi = PermutationGroupMorphism_im_gens(G, G, images)
      sage: g = G([(1,2,3,4)]); g
      (1,2,3,4)
      sage: phi(g)
      (1,4,3,2)

  Python

      >>> from sage.all import *
      >>> G = CyclicPermutationGroup(Integer(4))
      >>> H = DihedralGroup(Integer(4))
      >>> phi = PermutationGroupMorphism_im_gens(G, H, map(H, G.gens())); phi
      Permutation group morphism:
        From: Cyclic group of order 4 as a permutation group
        To:   Dihedral group of order 8 as a permutation group
        Defn: [(1,2,3,4)] -> [(1,2,3,4)]
      >>> g = G([(Integer(1),Integer(3)),(Integer(2),Integer(4))]); g
      (1,3)(2,4)
      >>> phi(g)
      (1,3)(2,4)
      >>> images = ((Integer(4),Integer(3),Integer(2),Integer(1)),)
      >>> phi = PermutationGroupMorphism_im_gens(G, G, images)
      >>> g = G([(Integer(1),Integer(2),Integer(3),Integer(4))]); g
      (1,2,3,4)
      >>> phi(g)
      (1,4,3,2)

  AUTHORS:

  - David Joyner (2006-02)

sage.groups.perm_gps.permgroup_morphism.is_PermutationGroupMorphism(f)

  Return `True` if the argument `f` is a `PermutationGroupMorphism`.

  EXAMPLES:

  Sage

      sage: from sage.groups.perm_gps.permgroup_morphism import is_PermutationGroupMorphism
      sage: G = CyclicPermutationGroup(4)
      sage: H = DihedralGroup(4)
      sage: phi = PermutationGroupMorphism_im_gens(G, H, map(H, G.gens()))
      sage: is_PermutationGroupMorphism(phi)
      doctest:warning...
      DeprecationWarning: The function is_PermutationGroupMorphism is deprecated;
      use 'isinstance(..., PermutationGroupMorphism)' instead.
      See https://github.com/sagemath/sage/issues/38103 for details.
      True

  Python

      >>> from sage.all import *
      >>> from sage.groups.perm_gps.permgroup_morphism import is_PermutationGroupMorphism
      >>> G = CyclicPermutationGroup(Integer(4))
      >>> H = DihedralGroup(Integer(4))
      >>> phi = PermutationGroupMorphism_im_gens(G, H, map(H, G.gens()))
      >>> is_PermutationGroupMorphism(phi)
      doctest:warning...
      DeprecationWarning: The function is_PermutationGroupMorphism is deprecated;
      use 'isinstance(..., PermutationGroupMorphism)' instead.
      See https://github.com/sagemath/sage/issues/38103 for details.
      True