Basic Examples (5)

Embed CyclicGroup[2] in CyclicGroup[4] via (12)↦(13)(24):

ϕ=({{"[◼]", "GroupHomomorphism" }})[CyclicGroup[2],CyclicGroup[4],{Cycles[{{1,3},{2,4}}]}]

Click on + to reveal more information about the homomorphism. For example, ϕ is injective but not surjective. Obtain the underlying mapping:

Normal[ϕ]

Retrieve the domain or co-domain of a homomorphism:

ϕ["Domain"]

ϕ["CoDomain"]

Find the kernel of this homomorphism, indeed the kernel is singleton thus ϕ is an embedding:

ϕ["Kernel"]

This is the trivial group:

GroupElements[%]

Find the image group:

ϕ["Image"]

Try to specify an invalid homomorphism:

({{"[◼]", "GroupHomomorphism" }})[CyclicGroup[2],CyclicGroup[3],<|Cycles[{{1,2}}]->Cycles[{{1,2,3}}]|>]

The package efficiently works with large groups. For example, here is the identity homomorphism from SymmetricGroup[10] to itself:

id=AbsoluteTiming@({{"[◼]", "GroupHomomorphism" }})[SymmetricGroup[20],SymmetricGroup[20],GroupGenerators[SymmetricGroup[20]]]

Its image and kernel groups:

AbsoluteTiming@id[[2]]["Image"]

AbsoluteTiming@id[[2]]["Kernel"]

Scope (2)

Specify the homomorphism using an association:

gens=GroupGenerators[SymmetricGroup[4]]

assoc=AssociationThread[gens->gens]

Build the homomorphism:

({{"[◼]", "GroupHomomorphism" }})[SymmetricGroup[4],SymmetricGroup[4],assoc]

This is the identity homomorphism (an isomorphism, since it is both injective and surjective):

Select[Normal[%],%[[1]]!=%[[2]]]

Specify an endomorphism (from G to itself):

({{"[◼]", "GroupHomomorphism" }})[CyclicGroup[2],{Cycles[{{1,2}}]}]

Applications (3)

Construct the sign homomorphism from SymmetricGroup[4] to CyclicGroup[2]:

S4=SymmetricGroup[4];
C2=CyclicGroup[2];

Odd generators must map to (12):

GroupGenerators[S4]

sgn=({{"[◼]", "GroupHomomorphism" }})[S4,C2,{Cycles[{{1,2}}],Cycles[{{1,2}}]}]

Find all even permutations:

sgn["Kernel"]//GroupElements

Confirm that there are exactly 12 even permutations:

Length[%]

Quotient DihedralGroup[3] by CyclicGroup[2] sending all rotations to ϵ and reflections to (12):

GroupGenerators[DihedralGroup[3]]

quo=({{"[◼]", "GroupHomomorphism" }})[DihedralGroup[3],CyclicGroup[2],<|Cycles[{{2,3}}]->Cycles[{{1,2}}],Cycles[{{1,2,3}}]->Cycles[{{}}]|>]

Again, kernel is all 3 rotations:

quo["Kernel"]//GroupOrder

For an AbelianGroup to itself, the map x↦(x^k) is a homomorphism:

GroupGenerators[Ab=AbelianGroup[{2,2,3}]]

pow=({{"[◼]", "GroupHomomorphism" }})[Ab,
AssociationMap[PermutationPower[#,3]&,GroupGenerators[Ab]]]

Its kernel:

pow["Kernel"]

Properties and Relations (4)

GroupHomomorphism preserves operation:

{c1,c2}=RandomChoice[GroupElements[S4],2]

sgn[c1\[PermutationProduct]c2]==sgn[c1]\[PermutationProduct]sgn[c2]

GroupHomomorphism preserves inverses:

sgn@PermutationPower[c1,-1]==PermutationPower[sgn[c1],-1]

The specified images of generators must belong to (Subscript[G, 2]):

({{"[◼]", "GroupHomomorphism" }})[CyclicGroup[2],{Cycles[{{1,2,3}}]}]

Applying the homomorphism to an arbitrary object returns unevaluated:

sgn[x]

Replace x by an element:

%/.x->Cycles[{{}}]

Possible Issues (3)

Consider the homomorphism from SymmetricGroup[3] to CyclicGroup[6]:

bad=({{"[◼]", "GroupHomomorphism" }})[SymmetricGroup[3],CyclicGroup[6],
{PermutationPower[Cycles[{{1,2,3,4,5,6}}],3],PermutationPower[Cycles[{{1,2,3,4,5,6}}],2]}]

We mapped an order 2 generator to order 2 element, and 3 to 3. This violates the group relations of SymmetricGroup[3]. Consider for example:

bad[PermutationProduct[Cycles[{{1,2}}],Cycles[{{1,2,3}}]]]

But:

PermutationProduct[bad[Cycles[{{1,2}}]],bad[Cycles[{{1,2,3}}]]]