155 points · by dnw · 3w ago · 106 comments
It would be interesting to require laws to be compilable. Charles Stross wrote a couple of books that include that idea.
In practice you usually get screwed in one of the following ways: a) the law makes it impossible to do X without breaking the law, even though X is a normal thing and neither law was supposed to be a total ban on X, but you could comply by not doing X at all, b) the inconsistent laws are imposed by different jurisdictions and then they each insist you follow theirs, often a special case of the first one where X is "be in two different jurisdictions" but sometimes the even stupider one where a jurisdiction demands that you follow its laws even when you're not in it, c) it's impossible for you to follow both laws at once so you followed only one of them and then they decide after the fact that you should have followed only the other one.
"When a law of a State is inconsistent with a law of the Commonwealth, the latter shall prevail, and the former shall, to the extent of the inconsistency, be invalid."
Hmmm, just googled, and it would seem that Article VI Clause 2 of the US constitution, aka the Supremacy Clause, is basically equivalent.
If you follow federal law over state law, but then a federal judge holds that the federal law you followed was an unconstitutional overstep in a domain that the Constitution reserves to the states, you are SOL
One of the more recent fun absurdities is some jurisdictions claiming that if you have a service accessible over the internet then you're subject to their (i.e. every) jurisdiction.
Laws are designed to give law enforcement latitude to pursue the charges they seem fit, subject to the taste of a judge.
“A married couple can deduct more state and local tax by filing separately. The deduction for state and local taxes (SALT) is capped, and the cap shrinks as income rises: by 30 cents for each dollar over $500,000 on a joint return. On a separate return, the law halves the cap after shrinking it, so it shrinks by only 15 cents a dollar. A couple earning $300,000 each can deduct up to $25,000 on two separate returns, but only $10,000 on one joint return.”
This is non-trivial impact to joint returns if this is true, and I won’t be surprised if there are multiple appeals for refunds and more people filling separately going towards.
The number of married couples where each partner is making $300K each is a very, very small percentage of the population. Not sure this is a big deal to be concerned about in the grand scheme of things. For instance, only a few %age of households have an income over 300K in the first place, much less coming from 2 earners of that amount.
The law was specifically designed to punish these people. Remember, at first they wanted to drop the SALT deduction completely to punish blue states.
Edit: It seems that people are assuming I'm against removing the SALT deduction. Far from it. I am glad they got it done despite being a political third rail for a long time. And despite being a huge beneficiary of the SALT deductions myself.
I don't think people choosing to live in high tax states should get to save on their federal income taxes.
The SALT deduction is nonsense. Why should high tax states effectively be able to take money from the federal government?
Tax law is supposed to be consistent and fair in general, and the introduction of the Big Beautiful Bill created a weird quirk here, that gets quirkier that you can file separately and correct to jointly but not the other way around legally right now. From 2018–2024, the tax code was consistent on SALT, then in 2025 and looking forward to 2029 SALT taxation becomes inconsistent under certain joint filing conditions that impact a non-trivial number of households especially when it starts at $250k each, or a lopsided earnings of that combined amount and peaks at the $600k.
This team is identifying a pretty big quirk that goes against the principle of consistency in tax law and did a very good job of it applying formal logic to law if they prove this to be correct. Others have done too before AI (which is what your tax software is conservatively doing), but it’s just easier now with AI.
The top 1% have a significant portion of high-income W2 earners who basically have been forced into the standard deduction since the TCJA. It definitely impacts them because that's exactly what the SALT cap was designed to do.
The business owners (lawyers, dentists, investment bankers) are the ones that have all the fun tax breaks, and they're probably more like top-0.1%.
$300k in NYC is $115k in Alabama.
Saying that loopholes are bugs is a political statement that a particular allocation of resources is inherently fraudulent. There is no data that Lean code could use to decide whether a result is intentional or not.
It's like deciding that any tax provision that increases income inequality is illegitimate, and writing code to identify them. That could be a useful exercise, but it isn't a way to justify a human value with math. It may be a formalization of an ethic as applied to a tax code, but not of the tax code.
Either they are intentional things that have unintended consequences or they are unintentional things that people didn't realize what they meant.
Sometimes they are just laws that are working as intended but somebody doesn't like them so they are labelled as a loophole.
I think there are very few loopholes that people intended to create by intentionally phrasing it weirdly.
From The Blind Spot: How Oligarchs Dominate Our Democracy by Jeffrey Winters: "When it comes to winning advantages for wealthy and powerful clients, lobbyists focus in on micro-details no one else is paying attention to but which could mean millions or billions saved by clients. 'Sometimes we were changing a word and that's all that we needed,' one lobbyist admitted."
and https://github.com/CatalaLang/catala-examples
French government seems to actually use it in one of their web services, see https://docs.aides.beta.gouv.fr/03_mutualiser/02_outils.html (page in French)
They are also left there so there is wiggle room for interpretation if it comes in front of an auditor or a judge.
And also, it's important to remember that in tax matters, the final arbiter of interpretation is a judge. Judges are humans, not machines. You can't "Trick" them by saying "well technically this is allowed!". Because they rule on the sprit of the law, not as it was written. Judges aren't amused when you try to be cute with how you interpret a law. And some Judges have biases, where you get a different ruling depending on if you play at their golf club or not.
Laws aren't computer code. They are vague on purpose.
Law is basically a representation of societal judgement. While criminal law is intended to be clear enough to know when you've violated it, that is not the same as beimg logical or consistent. Civil law is even less logical and consistent. Formalizing it into logic generally does not make sense overall - it isn't really broken in most cases because it was never intended to be totally consistent. There are certainly areas that could use cleaner rewriting but courts are generally well equipped to figure out what it means. Congress and the states can always overturn interpretations of law, but the rate at which they rewrite laws because they thought courts interpreted it wrong is very, very low.
They are intentional.
They aren’t loopholes. They are just laws.
Some people just call them loopholes because they dont like them.
There are quotes from at least Madison, Hamilton, and Jefferson that support the idea that this was intentional.
I do agree with the main point though: laws shouldn't be vague and also case law tends to refine the meaning.
Anyone with a few hundred dollars of liquidity can afford a CPA-filed tax return, and it's only worth if it saves you more on taxes than its cost anyway, so it's practically free (paid for) from that standpoint. It's not lack of access to CPA that is critical here. It's lack of access to the loopholes themselves: carried interest, RE depreciation, self-employment, etc.
> Laws aren't computer code. They are vague on purpose.
Yes... but. Tax law is a bit different because it is similar to an equation: you put in your inputs and you get your outputs.
There have been famous cases where the courts have said in essence, "yes you completely and exactly and precisely followed the law, but we're not going to allow you to do that anyway." Those rulings have become less frequent.
https://taxfoundation.org/data/all/federal/latest-federal-in...
And yes I'm aware that the wealthy pay most of the taxes. I'm fine with that. I'm just pointing out that these laws are made so they still pay less than they would otherwise.
The tax code benefits certain types of income, but it does not uniformly benefit high earners, as you say.
I feel like this attitude is responsible for the modern destruction of the rule of law.
It doesn't matter what the law says, the only thing that matters is vibes! And whether you play golf with the right government officials.
> You can't "Trick" them by saying "well technically this is allowed!".
The obvious problem being that sometimes it is allowed. And then do you want that being decided by democratically elected representatives and specified ahead of time so the public can know what's expected of them and of others, or decided ex post facto on the basis of feels and discrimination?
Extremely funny to say that about US law when it is entirely based on precedent, and a single judge having vibes on a particular day changes how your entire country works for the next 50 years.
US law is explicitly made to be skirted, as is every common law system in the world and they are all irrevocably flawed.
All human systems are flawed because humans are flawed.
The thing about insurance fraud is that the major thing that will cause it to be fraud is when you set the fire on purpose.
The tax code doesn't really have that. You'll often even see confused people inserting nonsense language in various places to the effect that doing something to avoid taxes isn't allowed, but meanwhile "doing something to avoid taxes" is the expected mechanism of operation for tax incentives meant to get people to do something they otherwise wouldn't have done.
And then because of that you need to actually care about what the tax code says and what the unnecessarily complicated nonsense allows someone to get away with without breaking the law, instead of pretending that it's all common sense and people can be punished for being "bad" without ever actually specifying what that means.
I don't know much about Lean, but I assume that beyond proving things it functions as a truth graph you could walk to calculate things...
Edit, it might also be (someday) useful when drafting tax law to make sure the law is actually sound (e.g. isn't contradicting something else) or to see what it's overlapping with?
"The comparison caught ... mistakes in our own model too. We had not counted self-employment profit toward the 20% deduction for small-business income"
This seems like a pretty big oversight? Makes it feel like there might be a lot more low-hanging fruit, much less subtitles to explore?