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 is a homomorphism when for all . Its kernel is a normal subgroup of and its image is a subgroup of . The sign of a permutation is a homomorphism with kernel ; the determinant is a homomorphism from to the nonzero numbers mod with kernel .
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 from the identity, setting for each generator , 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 , by .
firstIsomorphism(f). - Second: for and , is a subgroup and .
secondIsomorphism(G, H, N). - Third: for normal , .
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 , tries for each generator the elements of 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 . Conjugation by any is one, an inner automorphism, and these form a normal subgroup .
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 , , 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
@ratmath/structures and Core's Rational in scope. The last line's value is shown; PRINT(…) adds lines, TEX(…) typesets math.