News for hackers. Stuff that matters.
Re:Lean Verification of the Riemann Hypothesis by tomaskafka on Saturday November 21, 2026 @03:16PM (#50593212)
Our legal systems across the planet desperately need this.
Re:Lean Verification of the Riemann Hypothesis by MOARDONGZPLZ on Saturday November 21, 2026 @03:24PM (#50593282)
Not at all. What an anti pattern that would be.
Re:Lean Verification of the Riemann Hypothesis by senko on Saturday November 21, 2026 @04:20PM (#50593758)
Lawmakers often make laws and regulations that aren't consistent with existing body of law, but it's sometimes hard to see (esp. if they're doing a tight schedule, like having a 500-page document dropped in their lap over the weekend).

Having a way to say "here, this new bill you're proposing is provably in conflict with those three" would maaaybe nudge some people to take a second look or raise concerns?

Re:Lean Verification of the Riemann Hypothesis by goodmythical on Saturday November 21, 2026 @04:48PM (#50593974)
It would also be nice at the judiciary appelate level if you could ask "does this particular finding conflict with law" directly as opposed to "do you, judge, as a fallable human being, agree with this/these other judge/s" in a turtles all the way down to the supreme court which is just a group of fallable humans rather than an individual.
Re:Lean Verification of the Riemann Hypothesis by thaumasiotes on Saturday November 21, 2026 @05:51PM (#50594435)
> It would also be nice at the judiciary appelate level if you could ask "does this particular finding conflict with law" directly

That wouldn't get you very far. The answer is almost always "yes".

Re:Lean Verification of the Riemann Hypothesis by __MatrixMan__ on Saturday November 21, 2026 @06:09PM (#50594557)
Quickly knowing which existing laws you're treading on while writing a new one, and then mapping them to precedents... that sounds like it might be useful feedback for somebody embarking on a legal refactor.
Re:Lean Verification of the Riemann Hypothesis by pishpash on Saturday November 21, 2026 @08:05PM (#50595220)
This all misses the point. Lawyers have jobs exactly because laws are intentionally written to be vague and have loopholes, even contradictions. That field wants human in the loop.
Re:Lean Verification of the Riemann Hypothesis by gnabgib on Saturday November 21, 2026 @08:07PM (#50595227)
Laws are written to be the opposite. At the expense of understanding for everyone else.
Re:Lean Verification of the Riemann Hypothesis by __MatrixMan__ on Saturday November 21, 2026 @11:49PM (#50596355)
Sure, but if you're drafting legislation you want to write with an understanding of how the human in the loop is likely to behave. What moves are going to be within easy reach? What other moves are going to be a stretch? They're going to do the research to discover their options, why make that research any more difficult than it needs to be? Why not associate it with a hotkey?

The outcome will be the same in either case, so you might as well make it quicker and easier.

Re:Lean Verification of the Riemann Hypothesis by vector_spaces on Sunday November 22, 2026 @05:39AM (#50598296)
> The outcome will be the same in either case, so you might as well make it quicker and easier.

This is a tremendous leap.

Re:Lean Verification of the Riemann Hypothesis by alethic on Saturday November 21, 2026 @11:52PM (#50596375)
Depends on the legal system. This is not true of the French tax code. https://dl.acm.org/doi/10.1145/3446804.3446850
Re:Lean Verification of the Riemann Hypothesis by daynthelife on Saturday November 21, 2026 @08:54PM (#50595469)
Unfortunately, principle of explosion means that if the legal system has a single contradiction, then every law both contradicts and agrees with every other law.
Re:Lean Verification of the Riemann Hypothesis by __MatrixMan__ on Sunday November 22, 2026 @02:14AM (#50597076)
That's what precedent is for. At any given time the courts ignore some subset or another to make sense of the mess.
Re:Lean Verification of the Riemann Hypothesis by keybrd-intrrpt on Saturday November 21, 2026 @10:06PM (#50595808)
Leading to the worst trolley problem outcomes.

"Yes, you avoided running over a family, but you crossed over the yellow line, didn't signal properly, that also counts as reckless driving and a number of other violations. You'll be fined thousands of dollars, your license taken, and you'll spend one week in jail"

"I guess next time I'll run them over"

Re:Lean Verification of the Riemann Hypothesis by LudwigNagasena on Saturday November 21, 2026 @10:38PM (#50595998)
Why would it lead to that? There are many structural errors, inconsistent terms, unintended gaps. Fixing them doesn’t mean that judges will be less flexible in circumstances where the law was supposed to rely on their judgment.

We are talking about people seriously arguing over how to interpret a comma, or the lack thereof [1], or claiming that obstructing guards outside a military base is a crime, while doing it inside the base is completely legal [2].

[1] O'Connor v. Oakhurst Dairy (1st Cir. 2017)

[2] Adler v. George [1964] 2 QB 7

Re:Lean Verification of the Riemann Hypothesis by PopePompus on Saturday November 21, 2026 @03:46PM (#50593472)
It's going to be fun when legal systems are analyzed by LLMs. The chances that hundreds of thousands (millions?) of laws and regulations written by legislators, judges and bureaucrats over hundreds of years are self consistent and contain no internal contradictions is very, very, very close to zero.
Re:Lean Verification of the Riemann Hypothesis by krapp on Saturday November 21, 2026 @03:52PM (#50593525)
Laws aren't supposed to be strict logical statements that contain no internal contradictions. Laws are intended to be interpreted by judges for a reason.
Re:Lean Verification of the Riemann Hypothesis by FartyMcFarter on Saturday November 21, 2026 @08:33PM (#50595355)
Why would contradictions be beneficial though? Seems to me like they're harmless at best, and more likely they'd be harmful.
Re:Lean Verification of the Riemann Hypothesis by RunSet on Sunday November 22, 2026 @07:41AM (#50599141)
> Why would contradictions be beneficial though?

It benefits the police to have a population composed of people who are breaking the law, even unknowingly, since that means any inhumane action by police is still "fighting criminals".

On the other hand police unions have obtained "qualified immunity" which means ignorance of the law is a defense for police.

Which is itself a demonstration of how contradictions can be beneficial.

Re:Lean Verification of the Riemann Hypothesis by NetMageSCW on Sunday November 22, 2026 @04:56PM (#50604337)
I would say it is a demonstration of how contradictions can be incredibly bad, and possibly even self destructive.
Re:Lean Verification of the Riemann Hypothesis by krapp on Sunday November 22, 2026 @07:14PM (#50605630)
Contradictions that actually matter can be dealt with through the legal process. Contraditions that don't matter, don't matter.

It isn't necessary to have law be defined as strictly as a mathematical proof or a statement of formal logic because we have human beings interpreting those laws who understand things like context and precedent, to allow for fairness and mercy when necessary, and to be able to handle edge cases.

We want humans to create, debate and interpret laws rather than machines because we value humans more than machines.

Re:Lean Verification of the Riemann Hypothesis by baq on Saturday November 21, 2026 @03:54PM (#50593546)
Imagine the volume of exploits we have in software, but in the law. It’s happening in the law world, just slower and we barely hear about it here on HN.

It’s going to be a proper mess before it gets better.

Re:Lean Verification of the Riemann Hypothesis by skissane on Saturday November 21, 2026 @10:29PM (#50595943)
Laws are supposed to be applied (by judges, bureaucrats, etc) with discretion and common sense, not mechanically. Of course, that can sometimes result in injustices – exceptions being made for some people not others for reasons of political or societal biases – but it also avoids a lot of injustices: thoughtless/mechanical application of the law can result in outcomes which the legislator never intended and few would consider just or fair or reasonable.

I think, if we actually started applying laws in such a mechanical way, we'd end up with laws changing a lot more frequently, and with a lot more special cases written in to them – now, if applying a law in a certain situation seems unreasonable, judges will often choose not to apply it; with mechanical application, they'd have no choice, and then the people negatively impacted would lobby the legislature for a change in the legal text, and they'd probably get it. It could also see increased use of executive clemency (the power of pardon), or its legislative equivalent (legislation retroactively declaring certain convictions null and void).

Re:Lean Verification of the Riemann Hypothesis by Dylan16807 on Sunday November 22, 2026 @01:32AM (#50596883)
It wouldn't be about replacing judges and judgement with computers, but about having laws that are clear and minimally ambiguous as a starting point.

Laws can't even consistently get "and" and "or" right.

Re:Lean Verification of the Riemann Hypothesis by vector_spaces on Sunday November 22, 2026 @05:31AM (#50598256)
Again, I think you are missing the point that many instances the ambiguity in law is entirely intentional and by design, either with the intent to defer these ambiguous cases to the discretion of judges / admin agencies or as a part of political compromises or because those exact ambiguous/edge cases can't be agreed upon, or with the intent of future proofing. The specific example you gave is potentially exemplary. Don't assume that there aren't any lawmakers that have not taken a formal logic course

So the clarity you are proposing would in many instances have rather brutal and likely unintended impacts if broadly applied.

Not to mention that rewriting that verbiage probably wouldn't even have the intended effect as the semantics may already be determined by years of caselaw. But regardless, the dominating factor here is that the ambiguity is (usually or at least very often) baked in and that is in part meant as a stopgap against the particular kinds of injustices that arise when laws are applied purely procedurally without regard for the situational reality

See also Chesterton's Fence

Re:Lean Verification of the Riemann Hypothesis by Dylan16807 on Sunday November 22, 2026 @07:08AM (#50598891)
Ambiguous "and" versus "or" is not future proofing and causes nothing but pain.

If they actually couldn't decide on such a thing, they would need to suck it up and do their job. Your idea of brutal consequences is ridiculous in a situation like that.

Re:Lean Verification of the Riemann Hypothesis by skissane on Sunday November 22, 2026 @07:20AM (#50598966)
> Ambiguous "and" versus "or" is not future proofing and causes nothing but pain.

We don't need formalising law in something like Lean to get this.

All we need is better legislative drafting. Indeed, many jurisdictions now have drafting guidelines which recommend using constructs such as "At least one of the following", "All of the following", etc, to remove the ambiguity of plain "and"/"or". Those jurisdictions which don't have such guidance should adopt it.

Re:Lean Verification of the Riemann Hypothesis by 0x445442 on Sunday November 22, 2026 @07:55AM (#50599272)
"law can result in outcomes which the legislator never intended"

But what has always baffled me, AFAIK, the original legislators don't file Amicus Briefs when the meaning of laws are argued in court. I mean in situations where the original legislator is still alive and of good mind, why doesn't the Judge just ask them what the spirt of the law is?

Re:Lean Verification of the Riemann Hypothesis by mik1998 on Sunday November 22, 2026 @10:50AM (#50600752)
[delayed]
Re:Lean Verification of the Riemann Hypothesis by 0x445442 on Sunday November 22, 2026 @05:26PM (#50604600)
Of course, but still perplexing from a pragmatic perspective.
Re:Lean Verification of the Riemann Hypothesis by skissane on Monday November 23, 2026 @02:18AM (#50608498)
> But what has always baffled me, AFAIK, the original legislators don't file Amicus Briefs when the meaning of laws are argued in court. I mean in situations where the original legislator is still alive and of good mind, why doesn't the Judge just ask them what the spirt of the law is?

In a parliamentary system such as the UK, Canada or Australia, this tends to be less of an issue – the executive government is under the direct control of the legislature, so if the Attorney-General or Solicitor-General submits a brief arguing for a particular interpretation of legislation, the current legislative majority (which might not necessarily be the majority which enacted that legislation to begin with) can be understood as effectively endorsing it.

In a presidential system such as the US, where there is a strong separation between the executive and legislative branches, legislator amicus briefs make somewhat more sense – and members of US Congress submitting amicus briefs to appellate courts actually does happen reasonably frequently; however, the courts tend not to put much weight on them.

Re:Lean Verification of the Riemann Hypothesis by tim333 on Sunday November 22, 2026 @07:37AM (#50599096)
You could probably use AI to reform legal systems but it's very different from mathematical proofs, being fundamentally about human behaviour.