A “proof” of Fermat’s Last Theorem that fits the margin
Trail of Bits reported a Lean bug affecting String.Pos.Raw.extract, Lean's low-level string-slicing function, in all stable versions up to 4.33.1, with a patch in v4.34.0-rc1. When asked to extract a one-byte slice at an astronomically large position, Lean's logical definition returns the empty string while compiled native code returns the entire original string, allowing a contradiction that yields a "checked" proof of Fermat's Last Theorem. The issue was found while using GPT-5.6 to experiment with a code-review skill.
Developers relying on Lean proofs should note that native_decide adds the compiler to the trusted boundary, so proofs can be accepted through tooling issues rather than kernel soundness.


