## Section11.6Sage

Sage is able to create homomorphisms (and by extension, isomorphisms and automorphisms) between finite permutation groups. There is a limited supply of commands then available to manipulate these functions, but we can still illustrate many of the ideas in this chapter.

### SubsectionHomomorphisms

The principal device for creating a homomorphism is to specify the specific images of the set of generators for the domain. Consider cyclic groups of order $$12$$ and $$20\text{:}$$

\begin{align*} G &= \{a^i\vert a^{12}=e\} & H &= \{x^i\vert x^{20}=e\} \end{align*}

and define a homomorphism by just defining the image of the generator of $$G\text{,}$$ and define the rest of the mapping by extending the mapping via the operation-preserving property of a homomorphism.

\begin{align*} \phi: G\rightarrow H, &\quad\phi(a)=x^5\\ \Rightarrow &\quad\phi(a^i) = \phi(a)^i = (x^5)^i = x ^{5i} \end{align*}

The constructor PermutationGroupMorphism requires the two groups, then a list of images for each generator (in order!), and then will create the homomorphism. Note that we can then use the result as a function. In the example below, we first verify that C12 has a single generator (no surprise there), which we then send to a particular element of order $$4$$ in the codomain. Sage then constructs the unique homomorphism that is consistent with this requirement.

C12 = CyclicPermutationGroup(12)
C20 = CyclicPermutationGroup(20)
domain_gens = C12.gens()
[g.order() for g in domain_gens]

x = C20.gen(0)
y = x^5
y.order()

phi = PermutationGroupMorphism(C12, C20, [y])
phi

a = C12("(1,6,11,4,9,2,7,12,5,10,3,8)")
phi(a)

b = C12("(1,3,5,7,9,11)(2,4,6,8,10,12)")
phi(b)

c = C12("(1,9,5)(2,10,6)(3,11,7)(4,12,8)")
phi(c)


Note that the element c must therefore be in the kernel of phi.

We can then compute the subgroup of the domain that is the kernel, in this case a cyclic group of order $$3$$ inside the cyclic group of order $$12\text{.}$$ We can compute the image of any subgroup, but here we will build the whole homomorphic image by supplying the whole domain to the .image() method. Here the image is a cyclic subgroup of order $$4$$ inside the cyclic group of order $$20\text{.}$$ Then we can verify the First Isomorphism Theorem.

K = phi.kernel(); K

Im = phi.image(C12); Im

Im.is_isomorphic(C12.quotient(K))


Here is a slightly more complicated example. The dihedral group $$D_{20}$$ is the symmetry group of a $$20$$-gon. Inside this group is a subgroup that is isomorphic to the symmetry group of a $$5$$-gon (pentagon). Is this a surprise, or is this obvious? Here is a way to make precise the statement “$$D_{20}$$ contains a copy of $$D_{5}\text{.}$$

We build the domain and find its generators, so we know how many images to supply in the definition of the homomorphism. Then we construct the codomain, from which we will construct images. Our choice here is to send a reflection to a reflection, and a rotation to a rotation. But the rotations will both have order $$5\text{,}$$ and both are a rotation by $$72$$ degrees.

G = DihedralGroup(5)
H = DihedralGroup(20)
G.gens()

H.gens()

x = H.gen(0)^4
y = H.gen(1)
rho = PermutationGroupMorphism(G, H, [x, y])
rho.kernel()


Since the kernel is trivial, rho is a one-to-one function (see Exercise 11.4.18). But more importantly, by the First Isomorphishm Theorem, G is isomorphic to the image of the homomorphism. We compute the image and check the claim.

Im = rho.image(G); Im

Im.is_subgroup(H)

Im.is_isomorphic(G)


Just providing a list of images for the generators of the domain is no guarantee that the function will extend to a homomorphism. For starters, the order of each image must divide the order of the corresponding preimage. (Can you prove this?) And similarly, if the domain is abelian, then the image must also be abelian, so in this case the list of images should not generate a non-abelian subgroup. Here is an example. There are no homomorphisms from a cyclic group of order $$7$$ to a cyclic group of order $$4$$ (other than the trivial function that takes every element to the identity). To see this, consider the possible orders of the kernel, and of the two possibilities, see that one is impossible and the other arises with the trivial homomorphism. Unfortunately, Sage acts as if nothing is wrong in creating a homomorphism between these groups, but what Sage builds is useless and raises errors when you try to use it.

G = CyclicPermutationGroup(7)
H = CyclicPermutationGroup(4)
tau = PermutationGroupMorphism_im_gens(G, H, H.gens())
tau

tau.kernel()


Rather than creating homomorphisms ourselves, in certain situations Sage knows of the existence of natural homomorphisms and will create them for you. One such case is a direct product construction. Given a group G, the method .direct_product(H) will create the direct product $$G\times H\text{.}$$ (This is not the same command as the function direct_product_permgroups() from before.) Not only does this command create the direct product, but it also builds four homomorphisms, one with domain $$G\text{,}$$ one with domain $$H$$ and two with domain $$G\times H\text{.}$$ So the output consists of five objects, the first being the actual group, and the remainder are homomorphisms. We will demonstrate the call here, and leave a more thorough investigation for the exercises.

G = CyclicPermutationGroup(3)
H = DihedralGroup(4)
results = G.direct_product(H)
results[0]

results[1]

results[2]

results[3]

results[4]