Classifying the Groups of Order $p^3$ in Lean
The classification of groups of order p^3 is a classical result in finite group theory, but had not been completely formalized in any proof assistant.
The author constructs all five canonical groups (three abelian, two non-abelian) as Lean 4 structures and builds explicit isomorphisms showing any group of order p^3 falls into one of these classes. The Heisenberg group and semidirect product Z/p^2Z rtimes Z/pZ are defined with custom multiplication, and structural lemmas on centers, commutators, and exponents drive the classification.
First complete formalization of the p^3 classification in any proof assistant: approximately 3,000 lines of Lean 4 code across six files, depending on Mathlib for Sylow theory and the structure theorem for finite abelian groups.
| File | Content |
|---|---|
| P3Group/Defs.lean | Concrete models and P3Classification type |
| P3Group/Structural.lean | Center, quotient, commutator, nilpotency lemmas |
| P3Group/AbelianCase.lean | Abelian classification via structure theorem |
| P3Group/NonAbelianCase.lean | Non-abelian classification |
| P3Group/Classification.lean | Main theorem and pairwise non-isomorphism |
| P3Group.lean | Top-level import file |
