Lean proof to search for US tax loopholes A team behind the CC0-licensed global-law repository of versioned legislation and caselaw encoded a corner of the US Internal Revenue Code in Lean and ran an automated search over every permitted sequence of seven account moves, with a theorem prover checking the results, to test whether AI pointed at a versioned legal record can surface contradictions and loopholes. The model used 2025 limits — including the $150,000–$165,000 modified adjusted gross income phase-out for single-filer Roth IRA contributions and the $70,000 overall 401(k) additions limit — and started from a single filer earning $250,000 with $100,000 in pre-tax IRA savings. The search reproduced the known backdoor Roth route, in which a non-deductible traditional IRA contribution is converted the next day, and the mega backdoor route through after-tax 401(k) contributions, on a provision set where the answer was already known so the method could be judged. Lean proof to search for US tax loopholes Navier stokes? That will never make money. Instead, we compiled a Lean proof to find loopholes in the US tax code. But first, a step back. This example is part of the vulnerability monitoring work we do at global law https://github.com/lexifina/global-law , a CC0 repo of versioned legislation and caselaw. Our argument is that we can point AI at a versioned record of the law to find contradictions and other key logical mistakes in our system of legislation and interpretation. Loopholes are usually found by someone who knows two provisions well and sees that together they allow what neither allows alone. That depends on who is looking, and nobody can say whether their route is the best one. We wrote the rules down with no strategy built in, let a search try every sequence of moves they permit, and had a theorem prover check the result, on a corner of the Internal Revenue Code where the answer is already known, so that the method could be judged. The routes around the rules A Roth IRA is taxed at the front and never again, which makes it valuable to people with a long time to save. Congress limits who may contribute to one. The amount a single filer may put in shrinks between $150,000 and $165,000 of modified adjusted gross income and is zero above that.