Anthropic formalized Fermat's Last Theorem in 13M lines of Lean. We "proved" it ...

@trailofbits@infosec.exchange

Anthropic formalized Fermat's Last Theorem in 13M lines of Lean. We "proved" it in 20 lines by exploiting a bug we found in Lean.

Root cause: Lean's string slicing has two implementations, the logical definition and the compiled C++. At position 2^63 they disagree: one returns "", the other the whole input. This bug causes Lean to accept two contradictory facts, which then lets you "prove" anything, including FLT. blog.trailofbits.com/2026/09/0

#lean