Lagrange's Theorem

lean4-proofgroup-theoryvisualization
H  divides  G|H| \;\text{divides}\; |G|

Statement

Let GG be a finite group and HGH \leq G a subgroup. Then H|H| divides G|G|, and the quotient G/H|G|/|H| equals the number of left cosets of HH in GG — the index [G:H][G:H].

G=H[G:H]|G| = |H| \cdot [G : H]

Visualization

Take G=D4G = D_4, the dihedral group of symmetries of a square, with D4=8|D_4| = 8.

D_4  (order 8)
 ├─ Z/4  (order 4, index 2)  — rotations {1, r, r², r³}
 ├─ Z/2 × Z/2  (order 4, index 2)  — {1, r², s, sr²} where s is a reflection
 ├─ Z/2  (order 2, index 4)  — {1, r²}
 ├─ Z/2  (order 2, index 4)  — {1, s}
 ├─ Z/2  (order 2, index 4)  — {1, sr}
 └─ {1}  (order 1, index 8)

Every subgroup order — 1, 2, 4 — divides D4=8|D_4| = 8. The cosets of H={1,r2}H = \{1, r²\} in D4D_4 are:

CosetElements
HH{1,r2}\{1, r^2\}
rHrH{r,r3}\{r, r^3\}
sHsH{s,sr2}\{s, sr^2\}
srHsrH{sr,sr3}\{sr, sr^3\}

Four cosets, each of size 2: 8=2×48 = 2 \times 4. Cosets partition GG — they are either identical or disjoint.

Proof Sketch

  1. Left cosets gHgH and gHg'H are either equal or disjoint (proven by showing gH=gH    g1gHgH = g'H \iff g^{-1}g' \in H).
  2. Each coset has exactly H|H| elements (left multiplication by gg is a bijection HgHH \to gH).
  3. The cosets partition GG into [G:H][G:H] equal pieces, so G=H[G:H]|G| = |H| \cdot [G:H].

Connections

Lagrange's theorem is the gateway to Sylow TheoremsSylow TheoremspkG    HG,  H=pkp^k \mid |G| \implies \exists H \leq G,\; |H| = p^kPrime-power subgroups always exist, are conjugate, and their count is constrainedRead more →, which ask the converse: for which divisors pkp^k of G|G| does a subgroup of that order actually exist? It also underpins Cauchy's Theorem (Groups)Cauchy's Theorem (Groups)pG    gG,  ord(g)=pp \mid |G| \implies \exists g \in G,\; \operatorname{ord}(g) = pIf a prime p divides |G| then G has an element of order pRead more → (every prime divisor of G|G| yields an element of that order) and the counting in the First Isomorphism TheoremFirst Isomorphism TheoremG/ker(f)im(f)G / \ker(f) \cong \operatorname{im}(f)The image of a homomorphism is isomorphic to the domain modulo the kernelRead more →. More broadly it echoes through Fundamental Theorem of Galois TheoryFundamental Theorem of Galois Theory{intermediate fields}{subgroups of Gal(K/F)}\{\text{intermediate fields}\} \longleftrightarrow \{\text{subgroups of } \text{Gal}(K/F)\}Bijection between intermediate fields and subgroups of the Galois groupRead more → — subgroup indices equal field extension degrees — and appears in the proof of the Impossibility of the Quintic FormulaImpossibility of the Quintic FormulaS5 is not solvable    no radical formula for degree 5S_5 \text{ is not solvable} \implies \text{no radical formula for degree } \geq 5No general algebraic formula exists for polynomials of degree 5 or higherRead more → via solvable group chains.

Lean4 Proof

/-- **Lagrange's Theorem**: the cardinality of any subgroup divides the cardinality
    of the ambient group.
    Mathlib: `Subgroup.card_subgroup_dvd_card` in `Mathlib.GroupTheory.Coset.Card`.
    Note: uses `Nat.card` (works for infinite groups too, giving 0 ∣ 0). -/
theorem lagrange {G : Type*} [Group G] (H : Subgroup G) :
    Nat.card H  Nat.card G :=
  H.card_subgroup_dvd_card