The Spectrum Dispatch News

technology

Researchers Find 138 Drafting Errors in US Tax Code Using Lean Proof Checker

A formalization project identified cross-reference mistakes, typos, and contradictions in Title 26 of the US Code and recreated 2025 income tax rules as computable code.

Researchers Find 138 Drafting Errors in US Tax Code Using Lean Proof Checker

Researchers at Lexifina have completed a systematic formalization of the US Internal Revenue Code using Lean, a programming language with a type checker that verifies mathematical proofs. The project identified 138 genuine faults in the tax code’s text, along with unexpected complexities in how tax rules interact.

Researchers Find 138 Drafting Errors in US Tax Code Using Lean Proof Checker

The researchers translated Title 26 of the US Code—the official tax law—into Lean, which parses every cross-reference, including those written in plain language like “paragraph (2) of subsection (b).” The tool then verifies whether each cited provision exists, remains in force, and is correctly referenced. A test suite analyzing the code’s current version as of November 3, 2026, reported 257 findings; after human review by AI agents, 138 were confirmed as real faults.

The documented errors include 67 references to provisions that have been repealed, moved, or rewritten without conforming changes; 24 typos or wrong subdivisions; 8 instances of incorrect terminology (like calling a subsection a paragraph); 9 cases of duplicate section numbers; and 30 instances of unclosed parentheses. Each fault includes a Lean certificate documenting the evidence from official XML.

Beyond identifying errors, the team formalized the 2025 federal income tax calculation for a single household, covering income through credits. They translated the statute into Lean using AI assistance, then tested the resulting model against IRS published figures and three independent tax software tools across 5,000 sample households.

The formalization process uncovered five significant issues: the published Code mixes 2025 and 2026 law in six places; the One Big Beautiful Bill Act rounds deductions inconsistently; married couples can deduct more state and local tax by filing separately; the IRS Tax Table differs from the statutory formula by up to $6; and some benefits contain “cliffs” where a single dollar of additional income can eliminate thousands in credits.

Comparison with other tax software revealed bugs beyond the model itself. Tax-Calculator grants the Earned Income Tax Credit to separate filers without verifying spouses lived apart; UsTaxes fails to attach Schedule C to 2025 returns, causing self-employment income to disappear.

The researchers maintain a git history of the US Code with one commit per public law, allowing each fault to be traced to the legislation that introduced it. The verification check runs in approximately two and a half minutes and can be repeated against each new Code release to flag newly introduced mistakes.

Key facts

  • Formalization of US tax code using Lean identified 138 drafting errors in Title 26 of the US Code
  • Errors include 67 dead references to repealed/moved provisions, 24 typos, 30 unclosed parentheses, and duplicate section numbers
  • Formalizing 2025 income tax revealed that one dollar of income can cost $8,046 in lost EITC benefits due to hard income cliffs
  • Married couples can deduct up to $25,000 in state and local taxes filing separately but only $10,000 filing jointly at $300,000 income each
  • Comparison with three independent tax software tools found bugs including missing Schedule C attachment and incorrect EITC eligibility checks

Sources

← All posts