Researchers Use AI and Lean Programming to Audit US Tax Code for Hidden Loopholes
Developers have formalized Title 26 of the US Code using the Lean proof assistant and AI agents, uncovering 138 real structural faults and dead cross-references.
⚖️Regulation & PolicyPhoto: Hacker News Front Page
Key points
- Title 26 of the US Code was formalized using the Lean programming language and AI.
- The system identified 138 real faults, including dead cross-references, supported by verification certificates.
- Model outputs were validated against 5,000 test households and compared with tools like PolicyEngine-US.
A development team has applied artificial intelligence and the Lean programming language to formalize the entire US Internal Revenue Code, aiming to hunt down mechanical errors, contradictions, and unknown legal loopholes. Operating under the global-law repository, the project translates legislative text into Lean—a language whose type checker verifies mathematical proofs without human trust. By processing the official structured data of Title 26 current to November 3, 2026, the automated setup cross-references every text-based statutory pointer to ensure it connects to an active provision.
The automated test suite flagged 257 total findings, which were subsequently checked by an AI agent against the official text. Out of these, 98 were determined to be intended provisions or past-period rules, 21 were false alarms originating from official editorial hyperlinks, and 138 were classified as real faults. Each of the 138 issues comes with a Lean-verified certificate that traces the error back through a git history reaching to 1994. The tool requires only about two and a half minutes to re-check all 138 discrepancies.
Moving beyond cross-references, the project mapped out 2025 federal income tax calculations for households, incorporating updates from the July 2025 One Big Beautiful Bill Act. Because AI translation of statutes can introduce lossy steps, the developers validated their logic against 5,000 sample households—including 3,000 edge cases—and compared the outputs with independent tax software like PolicyEngine-US and Tax-Calculator. The comparisons successfully exposed logical flaws in existing tools, such as missing schedule attachments and misapplied credits, while proving that specific deductions remain stable across every income level.
What to watch next: Continuous integration checks running against future releases of the US Code to catch legislative drafting errors the moment new laws are enacted.
Source Hacker News Front Page — lexifina.com/blog/formalizing-the-us-tax-code ↗
Read next
🌐Work & SocietyAmbience Healthcare Expands Clinical AI Suite for Hospital Operations
Ambience Healthcare has launched new AI tools designed to assist hospital staff with patient rounding and discharge planning, aiming to improve both clinical efficiency a…
🧠AI AnalysisAI Models Vulnerable to Manipulation in Simulated Warfare Scenarios, Research Shows
New research reveals that leading AI models from firms like OpenAI and Anthropic can be manipulated into identifying civilian targets when prompted with game scenarios.
🏢Big TechLoanPro Integrates Amazon Bedrock to Automate Loan Servicing Workflows
LoanPro has deployed a multi-agent AI assistant using Amazon Bedrock and Anthropic's Claude models to help lenders manage borrower accounts, resulting in a 15% reduction …
🏢Big TechGoogle Brings Wallet App to iOS Users Across the United States
Google has expanded the availability of its Wallet application to iOS devices in the U.S., allowing Apple users to store digital passes, tickets, and receipts.
🧠AI AnalysisAWS Outlines Phased Roadmap for Responsible Agentic AI Governance
Amazon Web Services has published a phased roadmap to help platform and application teams implement responsible AI guardrails for agentic systems.
🧠AI AnalysisGoogle updates Gemini settings to separate chat history from AI model training
Google is rolling out new controls for its Gemini app that allow users to maintain their chat history while opting out of data collection for AI model training.