Team ports US tax code to Lean, finds 138 legislative bugs in 2.5 minutes
prasanna_says · x · 2026-11-25
The Lexifina team (Alan Yahya) translated Volume 26 of the US Code (the federal tax code) clause by clause into the Lean theorem prover, using mathematical proofs instead of sampled tests. In two and a half minutes, the compiler surfaced 138 mechanical drafting errors plus blind-searched legal tax loopholes:
- 67 dead references to repealed, moved, or rewritten provisions
- 30 unclosed parentheses (17 missed even by the Congressional editorial office)
- 9 duplicate section numbers and 24 spelling/hierarchy reference errors
After formalizing the 2025 Form 1040 (including the new law) as a provable Lean model, they derived 5 counterintuitive logical truths: the same act truncates in opposite directions (tips/overtime deductions shrink per full $1,000 — earning $1 more can instantly cost $100 of deduction — while car-loan interest rounds up, exhausting the cap $999 early); filing separately can yield $15k more in deductions, as the SALT cap phases down above $500k joint income.
More from Fun
- AI Agent Thread Tells Another Thread to Pause Itself to Free Up Compute — gabriel1 · 2026-11-25
- Two giant integers posted on X claim to refute the Caiolo–Ferroni–Hoster conjecture — PMinervini · 2026-11-25
- Grok's ASCII beetle poem goes viral as an 'ode to Sonnet 3' — repligate · 2026-11-25
- Grok's 'aura vs rich' quadrant chart of tech goes viral, puts Factory with Cursor — matanSF · 2026-11-25
- You're probably capable of writing the canonical text on a topic you know well — AndyMasley · 2026-11-25
- Frontier AI reviewing economics: 'None of this is identified, what are you even doing?' — shakoistsLog · 2026-11-25