Groups

Homomorphisms and isomorphism

A homomorphism is a map between groups that respects products. It is how one group is seen inside, or projected onto, another, and an isomorphism, one that can be reversed, says two groups are the same group in different clothes.

Homomorphisms

A map f:G→Hf : G \to H is a homomorphism when f(ab)=f(a)f(b)f(ab) = f(a)f(b) for all a,ba, b. Its kernel ker⁡f={x:f(x)=e}\ker f = \{x : f(x) = e\} is a normal subgroup of GG and its image is a subgroup of HH. The sign of a permutation is a homomorphism Sn→C2S_n \to C_2 with kernel AnA_n; the determinant is a homomorphism from GL(n,p)GL(n,p) to the nonzero numbers mod pp with kernel SL(n,p)SL(n,p).

A homomorphism is fixed by where it sends a set of generators, but not every choice of images works: the images must satisfy every relation the generators do. homomorphism(G, H, images) walks through GG from the identity, setting f(xs)=f(x)f(s)f(xs) = f(x)f(s) for each generator ss, and refuses if this ever gives an element two different images. When no clash appears the map is a homomorphism, because every element is a product of generators.

import { homomorphism, tryHomomorphism, cyclic, symmetric, cycleType } from "@ratmath/structures";

// C6 → C3 sending a to a: well defined, since a⁶ = e and a⁶ ↦ a⁶ = e in C3
const f = homomorphism(cyclic(6), cyclic(3), [1]);
f.kernel().order;                 // 2
tryHomomorphism(cyclic(4), cyclic(3), [1]);   // null: a⁴ = e but a⁴ = a in C3

// the sign of a permutation, from a function
const sign = homomorphism(symmetric(4), cyclic(2), (p) => cycleType(p).reduce((s, c) => s + c - 1, 0) % 2);
String(sign);                     // "S4 → C2, (1 2) ↦ a, (1 2 3 4) ↦ a"
sign.kernel().order;              // 12: the kernel is A4

The isomorphism theorems

The three isomorphism theorems say which quotients are which. The library builds the isomorphism each one promises and checks it.

  • First: for f:G→Hf : G \to H, G/ker⁡f≅im⁡fG/\ker f \cong \operatorname{im} f by xker⁡f↦f(x)x \ker f \mapsto f(x). firstIsomorphism(f).
  • Second: for H≤GH \le G and N⊴GN \trianglelefteq G, HNHN is a subgroup and H/(H∩N)≅HN/NH/(H\cap N) \cong HN/N. secondIsomorphism(G, H, N).
  • Third: for normal N⊆KN \subseteq K, (G/N)/(K/N)≅G/K(G/N)/(K/N) \cong G/K. thirdIsomorphism(G, N, K).
import { firstIsomorphism, secondIsomorphism, symmetric, alternating, homomorphism, cyclic, cycleType } from "@ratmath/structures";

const S = symmetric(4);
const sign = homomorphism(S, cyclic(2), (p) => cycleType(p).reduce((s, c) => s + c - 1, 0) % 2);
const { quotient, image, iso } = firstIsomorphism(sign);
[quotient.order, image.order, iso.isIsomorphism];   // [2, 2, true]

const V = S.subgroup(["(1 2)(3 4)", "(1 3)(2 4)"]);
const H = S.subgroup(["(1 2 3)", "(1 2)"]);         // a copy of S3
const second = secondIsomorphism(S, H, V);
[second.HN.order, second.HcapN.order];              // [24, 1]: S3 ≅ S4/V4

Is it the same group?

isomorphism(G, H) returns an isomorphism or null. It first compares invariants (orders, element orders and class sizes, the centre, the commutator subgroup), then searches: it picks a few generators of GG, tries for each generator the elements of HH with the same order and class size, and abandons a partial choice as soon as it fails to be a one-to-one homomorphism on the subgroup generated so far. Every isomorphism it returns has been checked from scratch.

import { isomorphism, isIsomorphic, PSL, alternating, GL, dihedral, quaternion, symmetric, SL } from "@ratmath/structures";

isIsomorphic(PSL(2, 5), alternating(5));     // true
isIsomorphic(PSL(2, 7), GL(3, 2));           // true: the simple group of order 168, twice
isIsomorphic(dihedral(4), quaternion());     // false, though both have order 8 and 5 classes
isIsomorphic(SL(2, 3), symmetric(4));        // false
String(isomorphism(symmetric(3), dihedral(3)));
// "S3 → D3, (1 2) ↦ s, (1 2 3) ↦ r"

Automorphisms

An isomorphism from a group to itself is an automorphism; together they form the group Aut⁡(G)\operatorname{Aut}(G). Conjugation by any gg is one, an inner automorphism, and these form a normal subgroup Inn⁡(G)≅G/Z(G)\operatorname{Inn}(G) \cong G/Z(G).

import { automorphisms, automorphismGroup, cyclic, quaternion, directProduct, GL, symmetric, isIsomorphic } from "@ratmath/structures";

automorphisms(cyclic(12)).length;              // 4 = φ(12): a ↦ a, a⁵, a⁷, a¹¹
automorphisms(quaternion()).length;            // 24
const A = automorphismGroup(directProduct(cyclic(2), cyclic(2), cyclic(2)));
isIsomorphic(A, GL(3, 2));                     // true: Aut(C2³) is GL(3, 2), order 168
automorphismGroup(symmetric(4)).inner.order;   // 24: every automorphism of S4 is inner

The groups of order at most 20

Up to isomorphism there are only a few groups of each small order: 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5 for orders 1 to 20. smallGroups(n) gives one of each, built from the constructions on the first page, and identify(G) says which one a group is. The tests check that the groups listed for each order are pairwise non-isomorphic, and that every subgroup of order at most 20 of S5S_5, GL(2,3)GL(2,3), PSL(2,7)PSL(2,7) and two groups of order 32 is isomorphic to one of them. In the explorer, SmallGroup(n, i) is the i-th group of order n in this list (the order is this library's, not GAP's).

import { smallGroups, identify, directProduct, cyclic, GL, metacyclic } from "@ratmath/structures";

smallGroups(8).map(String);        // ["C8", "C4 × C2", "C2 × C2 × C2", "D4", "Q8"]
smallGroups(16).length;            // 14
identify(GL(2, 3).sylowSubgroup(2)).name;    // "SD16"
identify(metacyclic(5, 4, 2)).name;          // "C5 ⋊ C4", the Frobenius group of order 20
Try itEdit the code and run it with @ratmath/structures and Core's Rational in scope. The last line's value is shown; PRINT(…) adds lines, TEX(…) typesets math.
Ctrl/⌘ + Enter runs