Trail of Bits 'proves' Fermat's Last Theorem in 20 lines via a Lean 4 bug
CatAstro_Piyush · x · 2026-09-09
Weeks after Anthropic formalized Fermat's Last Theorem in 13 million lines of Lean, Trail of Bits 'proved' the same theorem in 20 lines by exploiting a bug in Lean 4.
Key facts:
- The flaw lives in String.Pos.Raw.extract: extracting a one-byte slice at an astronomically large position returns the empty string under Lean's logical definition, but the compiled native code returns the entire original string. Combining both evaluations manufactures a contradiction, letting nonsense get a green checkmark.
- All stable Lean versions up to 4.33.1 are affected; the patch landed in v4.34.0-rc1.
- Trail of Bits stresses it is not a kernel soundness issue; they stumbled on it while using GPT-5.6 to test a new code-review skill.
Their punchline: Fermat's 'truly marvelous proof' really did fit in the margin.
More from Fun
- Biochemist says ChatGPT-designed schizophrenia drug was synthesized in his garage — examachine · 2026-09-10
- Sheryl Crow posts AI doom acrostic as celebrities join the safety chorus — Miles_Brundage · 2026-09-10
- Can satire defeat AI doomers? One South Park episode may be all it takes — beffjezos · 2026-09-10
- Six years later, a blogger unboxes a brand-new-in-box Microsoft Surface Duo — revodavid · 2026-09-10
- @ai on X jokes it won't be 'born' for another 36 weeks at its deceleration rate — ai · 2026-09-10
- Flova's AI Video Turns an iPhone Unboxing Into an Apple-Commercial Lookalike — iamfakhrealam · 2026-09-10