[{"data":1,"prerenderedAt":4},["ShallowReactive",2],{"zvpMg9EFnO":3},"# Kummer's Criterion\n\nA [Lean 4](https://leanprover.github.io/) formalisation of **Kummer's criterion**,\nthe Bernoulli-number characterisation of *regular* primes.\n\nA [blueprint](https://riccardobrasca.github.io/KummerCriterion/blueprint/) describing\nthe mathematical structure of the proof is available.\n\n## What this project proves\n\nAn odd prime `p` is **regular** when it does not divide the class number of the\n`p`-th cyclotomic field `ℚ(ζ_p)`. This number-theoretic condition is notoriously\nhard to check directly. Kummer's criterion replaces it with a finite, purely\narithmetic test on Bernoulli numbers.\n\nThe main theorem lives in\n[`KummerCriterion/Main.lean`](KummerCriterion/Main.lean):\n\n```lean\n/-- **Kummer's criterion.**\n\nAn odd prime `p` is regular iff `p` does not divide the numerator of any\nBernoulli number `B_2, B_4, ..., B_{p-3}`. -/\ntheorem _root_.KummerCriterion\n    {p : ℕ} [hp : Fact p.Prime] (hp_odd : p ≠ 2) :\n    IsRegularPrime p ↔\n      ∀ k, 1 ≤ k → 2 * k ≤ p - 3 → ¬ (p : ℤ) ∣ (bernoulli (2 * k)).num\n```\n\nIn words: regularity of `p` is equivalent to `p` not dividing the numerator of\nany of the Bernoulli numbers `B₂, B₄, …, B_{p-3}` — a condition one can verify by\na finite computation.\n\n## Why it matters: Fermat's Last Theorem for exponents below 100\n\nKummer's celebrated result is that **Fermat's Last Theorem holds for every\nregular prime exponent**. That direction is formalised separately in the\n[`flt-regular`](https://github.com/leanprover-community/flt-regular) project, on\nwhich this development is built.\n\nKummer's criterion is the missing computational ingredient: it turns \"is `p`\nregular?\" into an explicit Bernoulli-number check. Running that check on the\nsmall primes shows that the only irregular primes below 100 are\n\n```\n37, 59, 67,\n```\n\nso every other odd prime under 100 is regular. Combined with `flt-regular`, this\nyields Fermat's Last Theorem for all those exponents — i.e. for the overwhelming\nmajority of exponents below 100 directly from regularity (the three irregular\nexponents 37, 59, 67 being handled by other means).\n\nThis is packaged as a self-contained theorem in\n[`KummerCriterion/BernoulliFast/FermatLastTheoremUpTo100.lean`](KummerCriterion/BernoulliFast/FermatLastTheoremUpTo100.lean):\n\n```lean\n/-- Fermat's Last Theorem for every exponent up to `100` except `2`, the\nthree irregular primes below `100`, and `74 = 2 * 37`. -/\ntheorem fermatLastTheoremFor_le100_of_ne_irregular\n    (n : ℕ) (hn_two : 2 \u003C n) (hn_le100 : n ≤ 100)\n    (hn37 : n ≠ 37) (hn59 : n ≠ 59) (hn67 : n ≠ 67) (hn74 : n ≠ 74) :\n    FermatLastTheoremFor n\n```\n\nThe composite exponent `74 = 2 · 37` is excluded because reducing it by divisor\nmonotonicity would route through the irregular exponent `37`.\n",1780846779824]