1 What is a group?
1.1 Definition of a group
A group is a pair \((G,\ \cdot )\) — a set \(G\) with a binary operation \(\cdot : G \times G \to G\) — satisfying:
Associativity: \(\forall a, b, c \in G, (a \cdot b) \cdot c = a \cdot (b \cdot c)\).
Identity: \(\exists \, 1 \in G,\ \forall a \in G, 1 \cdot a = a\). The \(\exists \) is outside the \(\forall \) — one element acts as identity for every \(a\).
Inverse: \(\forall a \in G,\ \exists \, a^{-1} \in G, a^{-1} \cdot a = 1\). The \(\exists \) is inside the \(\forall \) — each \(a\) has its own inverse.
The Lean class below packages the existential witnesses \(1\) and \((-)^{-1}\) as named fields via the One and Inv typeclasses. Mathematically this is the same definition (a chosen witness in place of "some element exists"); the named-witness form lets us write \(1\) and \(a^{-1}\) directly, without extracting them from existentials.
A type \(G\) with \(\cdot : G \times G \to G\), identity \(1\), and inverse \((-)^{-1}\) satisfying associativity, left identity \(1 \cdot a = a\), and left inverse \(a^{-1} \cdot a = 1\). The right-handed duals follow as theorems.
Associativity: \(\forall a, b, c,\; (a \cdot b) \cdot c = a \cdot (b \cdot c)\).
Left identity: \(\forall a,\; 1 \cdot a = a\).
Left inverse: \(\forall a,\; a^{-1} \cdot a = 1\).
1.2 Examples
The trivial group: Unit with its single element.
\(\mathbb {Z}/2\mathbb {Z}\): Bool under XOR, identity false, every element self-inverse.
1.3 Cancellation, right inverse, right identity
\(a \cdot b = a \cdot c \; \Longrightarrow \; b = c\).
Left-multiply both sides by \(a^{-1}\), then re-associate.
\(\forall a,\; a \cdot a^{-1} = 1\).
\(\forall a,\; a \cdot 1 = a\).
\(b \cdot a = c \cdot a \; \Longrightarrow \; b = c\).
Right-multiplying both sides of \(h\) by \(a^{-1}\) and re-associating, both sides reduce to \(b\) and \(c\):
using 9, 8, 2, and the hypothesis \(h\) at the middle equality.
\(a \cdot b = a \; \Longleftrightarrow \; b = 1\) (the second form of the cancellation law).
\(b \cdot a = a \; \Longleftrightarrow \; b = 1\) (the dual cancellation statement on the left).
1.4 Uniqueness and rearrangement
\((\forall a,\; e \cdot a = a) \; \Longrightarrow \; e = 1\).
Specialize the hypothesis \(h\) at \(a = 1\) to get \(e \cdot 1 = 1\). The right-identity lemma 9 gives \(e \cdot 1 = e\). The two equalities together force \(e = e \cdot 1 = 1\).
A left inverse and a right inverse of the same element are equal: if \(\ell \cdot a = 1\) and \(a \cdot r = 1\), then \(\ell = r\).
\(b \cdot a = 1 \; \Longrightarrow \; b = a^{-1}\).
Starting from \(b\), insert \(1 = a \cdot a^{-1}\) (8) and re-associate to expose the hypothesis \(b \cdot a = 1\):
using 9 for the first equality, 2 for re-association, the hypothesis \(h\) in the middle, and 3 at the end.
\(a \cdot b = c \; \Longleftrightarrow \; a = c \cdot b^{-1}\) — the basic rearrangement move.
The two directions are symmetric right-multiplications.
\((\Rightarrow )\) Suppose \(a \cdot b = c\). Right-multiplying both sides by \(b^{-1}\) and re-associating:
\((\Leftarrow )\) Suppose \(a = c \cdot b^{-1}\). Right-multiplying both sides by \(b\) and re-associating:
1.5 Inverses of inverses and of products
\((a^{-1})^{-1} = a\).
The identity is its own inverse: \(1^{-1} = 1\).
The inverse map is injective: \(a^{-1} = b^{-1} \; \Longrightarrow \; a = b\).
Take the inverse of both sides of \(h\) to get \((a^{-1})^{-1} = (b^{-1})^{-1}\). By 17 applied twice, \((a^{-1})^{-1} = a\) and \((b^{-1})^{-1} = b\), so \(a = b\).
\((a \cdot b)^{-1} = b^{-1} \cdot a^{-1}\).
We show \(b^{-1} \cdot a^{-1}\) is a left inverse of \(a \cdot b\), then apply uniqueness of inverses. Re-associating (2) to expose the middle cancellation \(a^{-1} \cdot a = 1\) (4), then dropping the identity (3):
Apply 15 with \(a \mapsto a \cdot b\) and \(b \mapsto b^{-1} \cdot a^{-1}\): from \(b \cdot a = 1\) it concludes \(b = a^{-1}\), here giving \(b^{-1} \cdot a^{-1} = (a \cdot b)^{-1}\).
\((\forall x,\; x \cdot x = 1) \; \Longrightarrow \; G\) abelian. (Equivalently: a group of exponent \(2\) is commutative.)
Fix \(a, b \in G\). The proof applies the hypothesis \(h\) in three places.
First, at the product \(a \cdot b\): \((a \cdot b) \cdot (a \cdot b) = 1\). By 15, the product is its own inverse: \(a \cdot b = (a \cdot b)^{-1}\).
By 20, \((a \cdot b)^{-1} = b^{-1} \cdot a^{-1}\), so \(a \cdot b = b^{-1} \cdot a^{-1}\).
Next, apply \(h\) at \(a\) alone: \(a \cdot a = 1\), so by 15, \(a = a^{-1}\). Similarly, \(h\) at \(b\) yields \(b = b^{-1}\).
Combining the three: \(a \cdot b = b^{-1} \cdot a^{-1} = b \cdot a\).
1.6 Natural-number powers
Recursively: \(g^0 := 1\) and \(g^{n+1} := g^n \cdot g\).
\(g^n\): product of \(n\) copies of \(g\) on the right of \(1\).
\(g^0 = 1\).
\(g^{n+1} = g^n \cdot g\).
\(g^{m+n} = g^m \cdot g^n\).
Induction on \(n\). Base: \(g^{m+0} = g^m = g^m \cdot 1 = g^m \cdot g^0\). Step: \(g^{m+(n+1)} = g^{(m+n)+1} = g^{m+n} \cdot g = (g^m \cdot g^n) \cdot g = g^m \cdot (g^n \cdot g) = g^m \cdot g^{n+1}\).
\((g^m)^n = g^{m \cdot n}\).
Induction on \(n\). Base: \((g^m)^0 = 1 = g^0 = g^{m \cdot 0}\). Step: \((g^m)^{n+1} = (g^m)^n \cdot g^m = g^{mn} \cdot g^m = g^{mn + m} = g^{m(n+1)}\), using 25.
1.7 Order of an element
The order of \(g\) is the least positive \(n\) with \(g^n = 1\). We phrase it as a predicate to avoid committing to a function.
\(n {\gt} 0 \; \wedge \; g^n = 1 \; \wedge \; (\forall k,\; 0 {\lt} k {\lt} n \Longrightarrow g^k \neq 1)\).
\(\mathrm{IsOrderOf}\, 1\, 1\).
\(\mathrm{IsOrderOf}\, g\, m \; \wedge \; \mathrm{IsOrderOf}\, g\, n \; \Longrightarrow \; m = n\).
By trichotomy. If \(m {\lt} n\), then \(m\) is a positive \(k {\lt} n\) with \(g^k = 1\), contradicting the minimality clause of \(hn\). Symmetric for \(n {\lt} m\). So \(m = n\).
If \(n\) is the order of \(g\), then \(g^m = 1 \; \Longleftrightarrow \; n \mid m\).
\((\Leftarrow )\) Suppose \(n \mid m\), write \(m = kn\). Then \(g^m = g^{kn} = (g^n)^k\) by 26, and \((g^n)^k = 1^k\) since \(g^n = 1\) by the second clause of \(hn\). Finally \(1^k = 1\) for every \(k : \mathbb {N}\), which is a small induction using 23, 24, and 9.
\((\Rightarrow )\) Conversely, suppose \(g^m = 1\). By division with remainder, write \(m = qn + r\) with \(0 \leq r {\lt} n\). Then
using 25, 26, and \(g^n = 1\). So \(g^r = 1\). By the minimality clause of \(hn\) (no positive \(k {\lt} n\) has \(g^k = 1\)), and the bound \(r {\lt} n\), the only possibility is \(r = 0\). Hence \(m = qn\), i.e. \(n \mid m\).
Proposition 1.3.6(b) (Nat form): for \(k \leq \ell \), \(g^k = g^\ell \; \Longleftrightarrow \; \mathrm{ord}(g) \mid (\ell - k)\).
Write \(\ell = k + (\ell - k)\); since \(k \leq \ell \), the subtraction \(\ell - k\) takes the natural value in \(\mathbb {N}\). By 25,
Therefore \(g^k = g^\ell \) holds iff \(g^k = g^k \cdot g^{\ell - k}\), and by 11 that simplifies to \(g^{\ell - k} = 1\). Apply 30 to get the equivalent condition \(n \mid (\ell - k)\).
Proposition 1.3.11: if \(\mathrm{ord}(g) = n\), then \(\mathrm{ord}(g^k) = n / \gcd (n, k)\).
Let \(d := \gcd (n, k)\), \(n' := n / d\), \(k' := k / d\). Then \(n = d n'\), \(k = d k'\), and \(\gcd (n', k') = 1\). We must verify the three clauses of \(\mathrm{IsOrderOf}\, (g^k)\, n'\).
Positivity. \(n' {\gt} 0\) since \(n {\gt} 0\) (the first clause of \(hn\)) and \(d \mid n\).
Vanishing power. Using 26 and \(g^n = 1\) (from \(hn\)):
Equivalently, by 30, \(n \mid k n'\), which is immediate since \(k n' = k' n\).
Minimality. Suppose \((g^k)^j = 1\) with \(0 {\lt} j\). By 26 and 30, \(g^{kj} = 1\) gives \(n \mid kj\), i.e. \(d n' \mid d k' j\), i.e. \(n' \mid k' j\). Since \(\gcd (n', k') = 1\) (Euclid’s coprime argument, 89), we conclude \(n' \mid j\), so \(j \geq n'\).
Corollary 1.3.12: in \(\langle g \rangle \) with \(\mathrm{ord}(g) = n\), the power \(g^k\) has the same order \(n\) — i.e. generates the same cyclic subgroup — iff \(\gcd (n, k) = 1\).
1.8 Permutations
A permutation of \(\alpha \) is a bijection \(\alpha \to \alpha \). Permutations form a group under composition, non-abelian for \(|\alpha | \geq 3\).
A bijection \(\alpha \to \alpha \): a forward function paired with a two-sided inverse.
\(\sigma \cdot \tau := \sigma \circ \tau \) on \(\mathrm{Perm}\ \alpha \).
\(1 := \mathrm{id}\) on \(\mathrm{Perm}\ \alpha \).
\(\sigma ^{-1}\): swap \(\sigma .\mathrm{toFun}\) and \(\sigma .\mathrm{invFun}\).
\(\sigma .\mathrm{toFun} = \tau .\mathrm{toFun} \; \Longrightarrow \; \sigma = \tau \).
Destructure both, substitute \(h\), then show \(\sigma .\mathrm{invFun} = \tau .\mathrm{invFun}\) pointwise: \(\tau .\mathrm{invFun}\, y = \tau .\mathrm{invFun}(\sigma .\mathrm{toFun} (\sigma .\mathrm{invFun}\, y)) = \sigma .\mathrm{invFun}\, y\).
\(\mathrm{Perm}\, \alpha \) is a group under composition.
The swap on Bool: a concrete permutation exchanging true and false.
\(\mathrm{swap} \cdot \mathrm{swap} = 1\).
Both sides have forward function \(\mathrm{not} \circ \mathrm{not} = \mathrm{id}\); apply 38.
1.9 Sign of a permutation
Every permutation of a finite set is a product of transpositions (swaps of two elements, fixing the rest). The number of transpositions in such a decomposition is not unique, but its parity is. The sign of \(\sigma \), written \(\mathrm{sgn}(\sigma )\), is \(+1\) when \(\sigma \) is a product of an even number of transpositions (even), and \(-1\) otherwise (odd).
Sign is a group homomorphism \(\mathrm{sgn} : S_n \to \{ \pm 1\} \cong \mathbb {Z}/2\mathbb {Z}\). Its kernel is the alternating group \(A_n\), the subgroup of even permutations. For \(n \geq 5\), \(A_n\) is simple — the technical heart of the proof that the quintic is unsolvable by radicals.
A general definition needs finite types and cycle decomposition, deferred to a later chapter. Here we work out the smallest non-trivial case: \(\mathrm{Perm}(\mathrm{Bool})\), valued in the Bool group (false \(\leftrightarrow +1\), true \(\leftrightarrow -1\)).
Sign of a permutation of Bool, valued in Bool_group: identity \(\mapsto \) false (\(+1\)); swap \(\mapsto \) true (\(-1\)).
\(\mathrm{sgn}(1) = +1\).
\(\mathrm{sgn}(\mathrm{swap}) = -1\).
Sign is a group homomorphism on \(\mathrm{Perm}(\mathrm{Bool})\): \(\mathrm{sgn}(\sigma \cdot \tau ) = \mathrm{sgn}(\sigma ) \cdot \mathrm{sgn}(\tau )\) (the right-hand multiplication is XOR in Bool_group).
\((\sigma \cdot \tau ).\mathrm{toFun} = \sigma .\mathrm{toFun} \circ \tau .\mathrm{toFun}\) definitionally. Case-split on \(\tau .\mathrm{toFun}\, \mathrm{true}\). If \(\mathrm{true}\), identity is direct. If \(\mathrm{false}\), use that \(\sigma .\mathrm{toFun}\) is injective on Bool (via \(\sigma .\mathrm{left\_ inv}\)) to conclude \(\sigma .\mathrm{toFun}\, \mathrm{false} = !(\sigma .\mathrm{toFun}\, \mathrm{true})\).
1.10 Dihedral groups
For \(n \geq 1\), the dihedral group \(D_n\) is the group of rigid symmetries of a regular \(n\)-gon. It has \(2n\) elements: \(n\) rotations \(1, r, r^2, \ldots , r^{n-1}\) and \(n\) reflections \(s, rs, r^2 s, \ldots , r^{n-1} s\), where \(r\) is rotation by \(2\pi /n\) and \(s\) is a fixed reflection. The generators satisfy
and these three relations characterize \(D_n\) up to isomorphism: every element is uniquely of the form \(r^k s^{\varepsilon }\) with \(0 \leq k {\lt} n\) and \(\varepsilon \in \{ 0, 1\} \). \(D_n\) is non-abelian for \(n \geq 3\).
Rather than constructing a concrete model, we abstract the presentation as a typeclass IsDihedral: distinguished generators \((r, s)\) in a group \(G\) satisfying the three relations.
A dihedral presentation of degree \(n\) on \(G\): distinguished generators \(r, s\) with \(r^n = 1\), \(s^2 = 1\), and \(s \cdot r = r^{-1} \cdot s\).
Distinguished rotation \(r \in G\).
Distinguished reflection \(s \in G\).
\(r^n = 1\).
\(s^2 = 1\).
\(s \cdot r = r^{-1} \cdot s\).
\(s = s^{-1}\): the reflection is an involution.
1.11 Abelian groups
A group is abelian if \(\forall a, b,\; a \cdot b = b \cdot a\). Contrast with \(\mathrm{Perm}(\alpha )\) above, non-abelian for \(|\alpha | \geq 3\).
A group with \(\forall a, b,\; a \cdot b = b \cdot a\).
Commutativity: \(\forall a, b,\; a \cdot b = b \cdot a\).
Bool is abelian (the smallest non-trivial abelian group, \(\mathbb {Z}/2\mathbb {Z}\)).
\((a \cdot b)^{-1} = a^{-1} \cdot b^{-1}\) in an abelian group.
\(g \cdot h \cdot g^{-1} = h\) in an abelian group (conjugation is trivial).
Commute \(g\) past \(h\), re-associate, then \(g \cdot g^{-1} = 1\) and \(h \cdot 1 = h\).
\((g \cdot h)^n = g^n \cdot h^n\) in an abelian group.
Induction on \(n\); the step uses commutativity to slide a single \(g\) past \(h^n\).
1.12 Subgroups
A subgroup of \(G\) is a subset \(H \subseteq G\) that is a group under the operation of \(G\): \(1 \in H\), \(H\) is closed under \(\cdot \) and under \((-)^{-1}\). We package \(H\) as a predicate carrier with these three closure conditions.
A predicate \(H : G \to \mathrm{Prop}\) with \(1 \in H\), closed under \(\cdot \) and \((-)^{-1}\).
\(\top := G\) (the whole group as a subgroup of itself).
\(\bot := \{ 1\} \) (the trivial subgroup).
\(H \cap K\) is a subgroup.
Subgroup criterion: a non-empty \(P : G \to \mathrm{Prop}\) closed under \(a, b \mapsto a \cdot b^{-1}\) is a subgroup. (One-shot test in place of checking \(1 \in P\), closure under \(\cdot \), closure under \((-)^{-1}\) separately.)
1.13 Subgroups generated by a subset
Given \(U \subseteq G\), the subgroup generated by \(U\), written \(\langle U \rangle \), is the smallest subgroup of \(G\) containing \(U\). We build it inductively as the closure of \(U\) under \(1\), \(\cdot \), and \((-)^{-1}\), then check the universal property: any subgroup of \(G\) containing \(U\) contains \(\langle U \rangle \). Equivalently, \(\langle U \rangle \) is the intersection of all subgroups of \(G\) containing \(U\). The single-element case \(\langle \{ g\} \rangle \) specializes to 70.
Closure of \(U\) under \(1\), \(\cdot \) and \((-)^{-1}\) — the underlying predicate of \(\langle U \rangle \).
\(\langle U \rangle \): the subgroup generated by \(U \subseteq G\).
\(U \subseteq \langle U \rangle \).
\(\langle U \rangle \) is the smallest subgroup containing \(U\): \(U \subseteq H \; \Longrightarrow \; \langle U \rangle \subseteq H\).
Induction on the inductive predicate \(\mathrm{Closure}\, U\): the four constructors match exactly the four closure conditions of MySubgroup.
The intersection of an arbitrary family of subgroups is a subgroup.
1.14 Cyclic subgroups
The cyclic subgroup generated by \(g\), written \(\langle g \rangle \), is the smallest subgroup of \(G\) containing \(g\); equivalently it is \(\{ \, g^n : n \in \mathbb {Z} \, \} \). We build \(\langle g \rangle \) inductively as the closure of \(\{ g\} \) under \(1\), \(\cdot \), and \((-)^{-1}\). A group is cyclic if \(G = \langle g \rangle \) for some \(g\).
The closure of \(\{ g\} \) under \(1\), \(\cdot \), and \((-)^{-1}\) — the underlying predicate of \(\langle g \rangle \).
\(\langle g \rangle \): the cyclic subgroup generated by \(g\).
\(g \in \langle g \rangle \).
\(\forall n : \mathbb {N},\; g^n \in \langle g \rangle \).
Induction on \(n\). Base: \(g^0 = 1 \in \langle g \rangle \). Step: \(g^{n+1} = g^n \cdot g\) with \(g^n, g \in \langle g \rangle \).
Proposition 1.3.3: \(\langle g \rangle \) is the smallest subgroup containing \(g\). Concretely: any subgroup \(H\) containing \(g\) also contains \(\langle g \rangle \).
Induction on \((\mathrm{cyclic}\, g).\mathrm{carrier}\, x\), i.e. on the inductive predicate \(\mathrm{Generated}\, g\). The four constructors of \(\mathrm{Generated}\, g\) correspond exactly to the four closure conditions of \(H\):
\(g \in H\) is the hypothesis \(hg\);
\(1 \in H\) by \(H.\mathrm{one\_ mem}\);
closure under \(\cdot \) by \(H.\mathrm{mul\_ mem}\);
closure under \((-)^{-1}\) by \(H.\mathrm{inv\_ mem}\).
So each step of the induction stays inside \(H\).
\(\exists g \in G,\; \forall x \in G,\; x \in \langle g \rangle \) (i.e. \(G = \langle g \rangle \) for some \(g\)).
Proposition 1.3.14(a): every subgroup of a cyclic group is cyclic.
Stated for a subgroup \(H \subseteq \langle g \rangle \) of an ambient cyclic-style subgroup: there exists \(g' \in H\) such that \(H = \langle g' \rangle \) — i.e. \(H\) is itself cyclic, generated by some element of \(H\).
Two cases on whether \(H\) is trivial.
Case 1: \(H = \{ 1\} \). Take \(g' := 1\). Then \(g' \in H\) by MySubgroup.one_mem, and \(\langle 1 \rangle = \{ 1\} \) (the inductive closure of \(\{ 1\} \) is generated only by \(1\)), which agrees with \(H\).
Case 2: \(H \neq \{ 1\} \). Since \(H \subseteq \langle g \rangle \), every \(h \in H\) has the form \(h = g^m\) for some \(m \in \mathbb {Z}\) (informally; or some \(g^m \cdot g^{-m'}\) via the inductive \(\mathrm{Generated}\)). \(H\) contains some non-identity element, hence some \(g^m\) with \(m \neq 0\); closure of \(H\) under \((-)^{-1}\) produces a positive-exponent element. Let \(k\) be the smallest positive integer with \(g^k \in H\) (well-ordering). Take \(g' := g^k\).
Closure of \(H\) under \(\cdot \) and \((-)^{-1}\) gives every \(g^{jk} \in H\) for \(j \in \mathbb {Z}\), so \(\langle g^k \rangle \subseteq H\). Conversely, fix any \(h = g^m \in H\) and divide \(m = qk + r\) with \(0 \leq r {\lt} k\). Then \(g^r = g^m \cdot (g^k)^{-q}\) is a product of elements of \(H\), hence in \(H\). Minimality of \(k\) and \(0 \leq r {\lt} k\) force \(r = 0\), so \(g^m = (g^k)^q \in \langle g^k \rangle \).
1.15 Subgroups of \((\mathbb {Z}, +)\)
The additive group \((\mathbb {Z}, +)\) has a particularly transparent subgroup structure: every subgroup equals \(a\mathbb {Z} := \{ \, ka : k \in \mathbb {Z} \, \} \) for a unique \(a \geq 0\). This single classification underwrites \(\gcd \), \(\mathrm{lcm}\), Bézout’s identity, and the elementary divisibility theory of \(\mathbb {Z}\).
We have only developed the multiplicative MyGroup, so we spell out the closure conditions for \((\mathbb {Z}, +)\) directly as a predicate IsAddSubgroupZ.
\(S \subseteq \mathbb {Z}\) is an additive subgroup of \((\mathbb {Z}, +)\): closed under \(0\), \(+\), and negation.
\(a\mathbb {Z} := \{ \, ka : k \in \mathbb {Z} \, \} \).
\(a\mathbb {Z}\) is an additive subgroup of \((\mathbb {Z}, +)\).
\((ka) + (k'a) = (k + k') a\).
\(-(ka) = (-k) a\).
Classification of subgroups of \((\mathbb {Z}, +)\): every additive subgroup equals \(a\mathbb {Z}\) for some \(a \geq 0\).
If \(S = \{ 0\} \), take \(a = 0\). Otherwise \(S\) contains some nonzero \(n\); closure under negation gives \(|n| {\gt} 0 \in S\), so \(\{ n \in S : n {\gt} 0\} \) is non-empty. Let \(a\) be its least element (well-ordering). Closure under \(+\) and negation gives \(a\mathbb {Z} \subseteq S\). For \(S \subseteq a\mathbb {Z}\), take \(n \in S\) and write \(n = qa + r\) with \(0 \leq r {\lt} a\) (division with remainder); then \(r = n - qa \in S\), and by minimality \(r = 0\), so \(a \mid n\).
1.16 gcd and lcm
Two additive subgroups built from \(a, b \in \mathbb {Z}\) carry most of elementary number theory:
Applying 79, each equals \(d\mathbb {Z}\) for a unique \(d \geq 0\); the two values are \(\gcd (a, b)\) and \(\mathrm{lcm}(a, b)\) respectively. From this characterization, divisibility properties, Bézout’s identity, and the formula \(\gcd (a, b) \cdot \mathrm{lcm}(a, b) = |ab|\) are immediate.
\(a\mathbb {Z} + b\mathbb {Z} := \{ \, ra + sb : r, s \in \mathbb {Z} \, \} \).
\(a\mathbb {Z} + b\mathbb {Z}\) is an additive subgroup of \((\mathbb {Z}, +)\).
\(a\mathbb {Z} \cap b\mathbb {Z}\) is an additive subgroup of \((\mathbb {Z}, +)\).
\(d\) is a \(\gcd \) of \(a, b\): \(d \geq 0\) and \(d\mathbb {Z} = a\mathbb {Z} + b\mathbb {Z}\).
\(m\) is an \(\mathrm{lcm}\) of \(a, b\): \(m \geq 0\) and \(m\mathbb {Z} = a\mathbb {Z} \cap b\mathbb {Z}\).
Bézout: \(d = \gcd (a, b) \; \Longrightarrow \; \exists r, s : ra + sb = d\).
\(d = 1 \cdot d \in d\mathbb {Z} = a\mathbb {Z} + b\mathbb {Z}\) gives the desired \(r, s\).
\(d = \gcd (a, b) \; \Longrightarrow \; d \mid a \; \wedge \; d \mid b\).
\(a = 1 \cdot a + 0 \cdot b \in a\mathbb {Z} + b\mathbb {Z} = d\mathbb {Z}\), so \(d \mid a\); symmetrically \(d \mid b\).
Universality of \(\gcd \): any common divisor of \(a, b\) divides \(\gcd (a, b)\).
85: \(\exists r, s : ra + sb = d\). \(e \mid a \; \wedge \; e \mid b \; \Longrightarrow \; e \mid ra + sb = d\).
\(a, b\) are coprime if \(\gcd (a, b) = 1\).
\(a, b\) coprime \(\; \Longleftrightarrow \; \exists r, s : ra + sb = 1\).
\((\Rightarrow )\) 85 with \(d = 1\). \((\Leftarrow )\) \(ra + sb = 1\) puts \(1\) in \(a\mathbb {Z} + b\mathbb {Z}\); so \(\mathbb {Z} = 1\mathbb {Z} \subseteq a\mathbb {Z} + b\mathbb {Z}\); the reverse inclusion is automatic.
Euclid’s lemma: \(p\) prime, \(p \mid ab \; \Longrightarrow \; p \mid a \; \vee \; p \mid b\).
Suppose \(p \nmid a\). Since the only positive divisors of \(p\) are \(1\) and \(p\), \(\gcd (a, p) = 1\). By 89, \(\exists r, s : ra + sp = 1\); multiplying by \(b\) yields \(rab + spb = b\), and \(p\) divides both summands, hence \(b\).
If \(m = \mathrm{lcm}(a, b)\), then both \(a\) and \(b\) divide \(m\) (Proposition 1.2.7(a)).
By definition of \(\mathrm{IsLcm}\), \(m\mathbb {Z} = a\mathbb {Z} \cap b\mathbb {Z}\), and \(m \in m\mathbb {Z}\) (via \(m = 1 \cdot m\)). So \(m \in a\mathbb {Z}\), meaning there is some \(k\) with \(m = ka\); this is precisely \(a \mid m\). Symmetrically, \(m \in b\mathbb {Z}\) gives \(b \mid m\).
Universality of \(\mathrm{lcm}\): if \(a \mid n\) and \(b \mid n\), then \(\mathrm{lcm}(a, b) \mid n\) (Proposition 1.2.7(b)).
\(a \mid n\) says \(n \in a\mathbb {Z}\) and \(b \mid n\) says \(n \in b\mathbb {Z}\), so \(n \in a\mathbb {Z} \cap b\mathbb {Z} = m\mathbb {Z}\), which is precisely \(m \mid n\).
\(\gcd (a, b) \cdot \mathrm{lcm}(a, b) = |a \cdot b|\) for \(a, b\) both nonzero (Corollary 1.2.8).
By 86, \(d \mid a\) and \(d \mid b\), so \(a / d\) and \(b / d\) are integers and \(ab/d\) is a common multiple of \(a\) and \(b\). By the universality of \(\mathrm{lcm}\) (92), \(m \mid ab/d\), hence \(dm \mid ab\).
Conversely, write \(d = ra + sb\) (85). By 91, \(a \mid m\) and \(b \mid m\), so \(m = at = bu\) for some integers \(t, u\). Then
so \(ab \mid dm\).
Each of \(dm\) and \(ab\) divides the other, so they agree up to sign: \(|dm| = |ab|\). Since \(d, m \geq 0\) (definitions of \(\mathrm{IsGcd}\), \(\mathrm{IsLcm}\)), \(dm \geq 0\), and we conclude \(d \cdot m = |a \cdot b|\).
1.17 Group homomorphisms
A group homomorphism \(\varphi : G \to G'\) is a function compatible with multiplication: \(\forall a, b \in G,\; \varphi (a \cdot b) = \varphi (a) \cdot \varphi (b)\). Two consequences follow from this single axiom: \(\varphi (1) = 1\) (97) and \(\varphi (a^{-1}) = \varphi (a)^{-1}\) (98).
Standard examples (left informal here for lack of infrastructure): \(\det : \mathrm{GL}_n(\mathbb {R}) \to \mathbb {R}^\times \), \(\mathrm{sgn} : S_n \to \{ \pm 1\} \), \(\exp : (\mathbb {R}, +) \to (\mathbb {R}^\times , \cdot )\), the power map \(\psi _a : (\mathbb {Z}, +) \to (G, \cdot ),\; n \mapsto a^n\), and \(|\cdot | : (\mathbb {R}^\times , \cdot ) \to (\mathbb {R}^\times , \cdot )\).
A group homomorphism \(\varphi : G \to G'\).
Underlying function \(G \to G'\).
Multiplicativity: \(\forall a, b,\; \varphi (a \cdot b) = \varphi (a) \cdot \varphi (b)\).
\(\varphi (1) = 1\): homomorphisms preserve the identity.
Start from the identity \(1 = 1 \cdot 1\) in \(G\) (3). Applying \(\varphi \) and using multiplicativity 96 gives
Rewriting the left-hand side as \(\varphi (1) = \varphi (1) \cdot 1\) (9):
Cancelling \(\varphi (1)\) on the left (7) yields \(\varphi (1) = 1\).
\(\varphi (a^{-1}) = \varphi (a)^{-1}\): homomorphisms preserve inverses.
We show \(\varphi (a^{-1})\) is a left inverse of \(\varphi (a)\), then apply uniqueness of inverses. Using multiplicativity 96, the left-inverse axiom 4, and identity preservation 97:
Now 15 (with \(a \mapsto \varphi (a)\) and \(b \mapsto \varphi (a^{-1})\)) concludes \(\varphi (a^{-1}) = \varphi (a)^{-1}\).
\(\varphi (a^n) = \varphi (a)^n\) for \(n : \mathbb {N}\): homomorphisms preserve natural-number powers.
Induction on \(n\).
Base (\(n = 0\)): by 23 both sides reduce to the identity:
using 97 for the middle equality.
Step (\(n \mapsto n + 1\)): assume \(\varphi (a^n) = \varphi (a)^n\). By 24, \(a^{n+1} = a^n \cdot a\); multiplicativity 96 and the inductive hypothesis yield
with the last equality again by 24.
The trivial homomorphism \(\tau : G \to G',\; x \mapsto 1\).
The identity homomorphism \(\mathrm{id}_G : G \to G\).
1.18 Image, kernel, and the kernel test
Two subgroups attached to \(\varphi : G \to G'\):
The kernel is more than a subgroup — it is normal in \(G\) (118). Injectivity of \(\varphi \) reduces to triviality of the kernel (105).
\(\mathrm{im}\, \varphi \) as a subgroup of \(G'\).
\(\ker \varphi \) as a subgroup of \(G\).
Kernel test: \(\varphi (a) = \varphi (b) \; \Longleftrightarrow \; a^{-1} \cdot b \in \ker \varphi \).
A chain of equivalences. The first is cancellation in \(G'\): \(\varphi (a) = \varphi (b)\) holds iff multiplying both sides on the left by \(\varphi (a)^{-1}\) gives the same thing, i.e. iff \(\varphi (a)^{-1} \cdot \varphi (b) = 1\). The second uses 98 to rewrite \(\varphi (a)^{-1} = \varphi (a^{-1})\). The third uses multiplicativity 96 to combine the two factors into one application of \(\varphi \):
The last condition is exactly \(a^{-1} \cdot b \in \ker \varphi \).
\(\varphi \) injective \(\; \Longleftrightarrow \; \ker \varphi = \{ 1\} \).
\((\Rightarrow )\) Assume \(\varphi \) is injective and let \(a \in \ker \varphi \), i.e. \(\varphi (a) = 1\). Since \(\varphi (1) = 1\) (97), \(\varphi (a) = \varphi (1)\). Injectivity gives \(a = 1\).
\((\Leftarrow )\) Assume \(\ker \varphi = \{ 1\} \) and let \(a, b \in G\) with \(\varphi (a) = \varphi (b)\). By the kernel test 104, \(a^{-1} \cdot b \in \ker \varphi \), so \(a^{-1} \cdot b = 1\). Left-multiplying by \(a\) and simplifying with 8 and 3 (or via \(\mathrm{mul\_ eq\_ iff\_ eq\_ mul\_ inv}\) rearrangements): \(b = a\).
Composition of homomorphisms is a homomorphism: \((\psi \circ \varphi )(a) := \psi (\varphi (a))\).
Image of a subgroup \(H \leq G\) under \(\varphi \): \(\varphi (H) := \{ \, \varphi (h) : h \in H \, \} \leq G'\). Specializes to 102 at \(H = \top \).
Preimage of a subgroup \(K \leq G'\) under \(\varphi \): \(\varphi ^{-1}(K) := \{ \, x \in G : \varphi (x) \in K \, \} \leq G\). Specializes to 103 at \(K = \bot \).
1.19 Isomorphisms
A group isomorphism \(\varphi : G \xrightarrow {\sim } G'\) is a bijective homomorphism. Two groups are isomorphic, written \(G \cong G'\), if there exists an isomorphism between them. Isomorphism is an equivalence relation on groups: reflexive via 113, symmetric by swapping \(\mathrm{toFun}\) and \(\mathrm{invFun}\), and transitive by composing the underlying homomorphisms.
A group isomorphism: a homomorphism bundled with a two-sided inverse function.
Two-sided inverse function \(G' \to G\).
Left inverse: \(\forall x,\; \mathrm{invFun}(\mathrm{toFun}\, x) = x\).
Right inverse: \(\forall y,\; \mathrm{toFun}(\mathrm{invFun}\, y) = y\).
The identity isomorphism \(\mathrm{id}_G : G \xrightarrow {\sim } G\).
The inverse isomorphism \(e^{-1} : G' \xrightarrow {\sim } G\).
Composition of isomorphisms is an isomorphism.
1.20 Normal subgroups
A subgroup \(H \leq G\) is normal, written \(H \triangleleft G\), if \(\forall g \in G,\, h \in H,\; g \cdot h \cdot g^{-1} \in H\). Two key facts: every kernel is normal (118), and in an abelian group every subgroup is normal (117). The converse to the first — every normal subgroup is the kernel of a homomorphism \(G \to G/N\) — is true but requires quotient groups, deferred to a later chapter.
\(H \triangleleft G\): \(\forall g \in G,\, h \in H,\; g \cdot h \cdot g^{-1} \in H\).
In an abelian group, every subgroup is normal.
\(g \cdot h \cdot g^{-1} = h\) in an abelian group (57).
Kernels are normal: \(\ker \varphi \triangleleft G\).
Fix \(g \in G\) and \(h \in \ker \varphi \) (so \(\varphi (h) = 1\)). We show \(g \cdot h \cdot g^{-1} \in \ker \varphi \) by direct computation. Multiplicativity 96 and the inverse-preservation lemma 98 give
Substituting \(\varphi (h) = 1\) and simplifying with 3 (or 9) and 8:
Hence \(g \cdot h \cdot g^{-1} \in \ker \varphi \).
Preimage of a normal subgroup under a homomorphism is normal: \(K \triangleleft G' \; \Longrightarrow \; \varphi ^{-1}(K) \triangleleft G\).
For \(g \in G\) and \(h \in \varphi ^{-1}(K)\) (i.e. \(\varphi (h) \in K\)), \(\varphi (g h g^{-1}) = \varphi (g) \cdot \varphi (h) \cdot \varphi (g)^{-1} \in K\) by \(K \triangleleft G'\), so \(g h g^{-1} \in \varphi ^{-1}(K)\).
The trivial subgroup is normal.
The whole group is normal in itself.
Membership in \(\top \) is trivially True.
Intersection of two normal subgroups is normal.
\(h \in H \cap K \Longrightarrow h \in H \text{ and } h \in K\), so \(g h g^{-1} \in H\) and \(g h g^{-1} \in K\), hence \(g h g^{-1} \in H \cap K\).
1.21 The center
The center of \(G\) is the set of elements that commute with every element of \(G\):
The center captures the "abelian part" of \(G\): by inspection, \(G\) is abelian if and only if \(Z(G) = G\) (124). Beyond this, \(Z(G)\) is always a normal subgroup of \(G\) (125), which makes it a natural source of structure information about non-abelian groups. Its construction is the prototype for the centralizer of a single element (126), since unwinding definitions gives \(Z(G) = \bigcap _{a \in G} C_G(a)\).
\(Z(G) := \{ \, z : \forall x,\; z \cdot x = x \cdot z \, \} \), the center of \(G\), as a subgroup.
\(G\) is abelian \(\; \Longleftrightarrow \; Z(G) = G\).
Unfolding \((z \in Z(G))\) to \(\forall x,\; z x = x z\), both sides are literally the same statement \(\forall z, x \in G,\; z \cdot x = x \cdot z\) — the first quantified over \(z\) first, the second over \(a\) first, but the underlying universal statement is the same.
The center is a normal subgroup: \(Z(G) \triangleleft G\).
Fix \(z \in Z(G)\) and \(g \in G\); we must show that \(g z g^{-1}\) commutes with every element of \(G\). Let \(x \in G\) be arbitrary.
The key step is to insert \(1 = g^{-1} g\) in the middle of \((g z g^{-1}) \cdot x\), then commute \(z\) past \(g^{-1} x g\) using \(z \in Z(G)\):
The first and last lines use 2, 4, 8, 3, and 9 to perform the insertion and cancellation. Hence \(g z g^{-1} \in Z(G)\).
1.22 Centralizer, normalizer, and inner automorphisms
Generalizing the center, we attach two subgroups and one homomorphism to a given element or subgroup of \(G\).
The centralizer of \(a \in G\) is the set of elements that commute with \(a\),
This is a subgroup of \(G\), and unfolding definitions shows that the center is the intersection of all centralizers: \(Z(G) = \bigcap _{a \in G} C_G(a)\).
The normalizer of a subgroup \(H \leq G\) is the set of elements whose conjugation action stabilizes \(H\) as a set,
This is again a subgroup of \(G\). Every element of \(H\) already satisfies the condition — conjugation by \(h \in H\) keeps things inside the subgroup — so \(H \subseteq N_G(H)\) (129). The normalizer characterizes normality:
(130).
For each fixed \(g \in G\), the conjugation map
is a group homomorphism — an inner automorphism of \(G\).
\(C_G(a) := \{ \, g \in G : g \cdot a = a \cdot g \, \} \), the centralizer of \(a\), as a subgroup of \(G\).
For each \(g \in G\), conjugation by \(g\), \(\mathrm{conj}_g : G \to G,\; x \mapsto g \cdot x \cdot g^{-1}\), is a group homomorphism (an inner automorphism of \(G\)).
\(N_G(H) := \{ \, g : \forall h,\; h \in H \iff g h g^{-1} \in H \, \} \), the normalizer of \(H\) in \(G\), as a subgroup.
Every subgroup is contained in its own normalizer: \(H \subseteq N_G(H)\).
Fix \(h \in H\) and an arbitrary \(h' \in G\); we show \(h' \in H \iff h \cdot h' \cdot h^{-1} \in H\).
\((\Rightarrow )\) If \(h' \in H\), then since \(h \in H\), \(h^{-1} \in H\) (by MySubgroup.inv_mem), and \(H\) is closed under multiplication (by MySubgroup.mul_mem), the product \(h \cdot h' \cdot h^{-1}\) lies in \(H\).
\((\Leftarrow )\) Conversely, suppose \(h \cdot h' \cdot h^{-1} \in H\). Conjugating by \(h^{-1}\) — which also lies in \(H\) — and using 17 to identify \((h^{-1})^{-1}\) with \(h\):
again by closure of \(H\) under multiplication.
\(H\) is normal in \(G\) iff its normalizer is all of \(G\): \(H \triangleleft G \; \Longleftrightarrow \; \forall g \in G,\; g \in N_G(H)\).
Both sides assert: \(\forall g, h,\; h \in H \iff g h g^{-1} \in H\).
\((\Rightarrow )\) Assume \(H \triangleleft G\). Fix \(g \in G\) and \(h \in G\). The forward implication \(h \in H \Longrightarrow g h g^{-1} \in H\) is the definition of \(H \triangleleft G\). For the reverse, suppose \(g h g^{-1} \in H\). Apply normality with \(g^{-1}\) in place of \(g\) to the element \(g h g^{-1}\):
using 17 to rewrite \((g^{-1})^{-1} = g\).
\((\Leftarrow )\) Conversely, if every \(g \in G\) lies in \(N_G(H)\), then in particular the forward direction of the biconditional gives \(h \in H \Longrightarrow g h g^{-1} \in H\) for every \(g \in G\) — which is exactly \(H \triangleleft G\).