Hacker News new | ask | show | jobs
by twotwotwo 1 day ago
It is true soundness bugs have been found, and the Lean community spends effort on it. But this page doesn't convey the gap between one incorrect verification and successfully misleading mathematicians about what is true: there are multiple checkers and you need bugs in all of them, without the input looking implausible on informal review.

(For example, a DeepMind researcher created a 'proof' that passed Lean and (a then-week-old version of) nanoda by exploiting a different bug in each. But if you fed that into a regular old LLM (or to a human expert, but I mention LLMs b/c they can be assigned to review even very large volumes of Lean code) it would immediately say "no, this isn't real math.")

The increase in soundness bugs found this year is notable, because LLMs are good at finding ways to their assigned goals, and they found some funny ones. And, besides fixes for the specific bugs, it led to broader work on hardening and alternative and verified kernels: https://leodemoura.github.io/blog/2026-10-15-lean-now-ships-...

So you have fewer avenues than at the start of the year to get a proof of False OK'd by one proof-checker kernel, and it's much much harder to get one through the gauntlet invoked by `lake check --paranoid`.

(This is also interesting as a(nother) example of the difficulty of making truly correct software -- you'd hope for proof-checker kernels to be pretty high on the correctness scale but seems like we've found 16-32 soundness bugs in a bunch of these.)

4 comments

Would it be possible to formally verify lean and friends? If SeL4 can be formally verified, it should be possible, right?
Not just possible, it's already done with the con-leche lean kernel.

Of course, it's turtles all the way down. There could be CPU exploits exploiting a broad range of CPUs but also so obfuscated that humans and LLMs cannot spot it in the thousands of lines of lean. Exploits that survive multiple lean kernels and lean kernels that verify each other.

In practice: I had fun this year figuring out some lean exploits. But they were all immediately and obviously detectable. These million line lean proofs just don't contain anything remotely to the nonsense of an exploit.

Wasn't there a very complex bug found in raft? What is the upper bound on bug complexity? Shouldn't big proofs be suspicious? The bigger they are the more likely they are to exploit the verifier in increasingly complex ways.
I believe there is a version of the Lean kernel that is itself formalized in Lean.
How much of the kernels is written by Claude et al? You need both diversity in implementations and contributors, I suppose.
Lean was created 13 years ago, Claude didn't exist yet. Besides, kernels are relatively small, e.g. nanoda is less than 10k lines. They are small enough that independent humans can review them.
Why is the creation date relevant? People are using the current versions to verify.

In fact Lean is bloated hipster software that has no backwards compatibility whatsoever and forces you to use the latest version.

Not if Claude is able to write underhanded C++.
The C++ Lean kernel and Rust nanoda were mostly written before they could be LLM-written, and by different people. Two recent LLM-written kernels, con-leche and con-ron, are interesting partly because there are proofs that go with the code.

Maybe what's most interesting is from a page about a bug hunt: https://leodemoura.github.io/blog/2026-8-24-postmortem-for-t... -- at the time they shipped four kernels (C++ Lean, nanoda, lean4lean, and ind-models); most listed bugs only bit the first, and one bit two.

The article mentions that sometimes, multiple checkers happen to share soundness bugs; I wonder if one could devise a prompt that multiple LLMs consistently fail to find the flaw in. It'd be quite interesting if two models of entirely different families fell for the same very particular mistake.
I think it'd be similar to writing a flawed argument (or buggy code, etc.) that would pass review with a lot of people. I bet just having a really subtle flaw is more robust than trying to find a quirky, specific chink in LLM armor that survives different models, angles on the prompt, etc.

One thing I didn't spell out about why non-proof-checker 'informal' review is interesting is it means any exploits have to be hidden. Proof checkers don't care if the code they're looking at is weird in context, and it probably will be weird if it's a refcount-overflow exploit rather than a proof (to use an actual runtime-soundness bug from the August post on C++ Lean). But to an expert or LLM, exploit code and real math reasoning can look different. So the result is the challenge is no longer just 'exploit the bug(s)' but now also 1) make the exploit not suspicious to the informal reader and 2) make the argument also make sense to them.

I think hardening the kernels and their diversity are the main defenses, but the informal-review thing is fun to think about because it's such a different challenge from the others.

The other thing that would be interesting to know is how often the bugs show up in actual "real" proofs in the wild, rather than artificially constructed inputs, and when the bugs are fixed how many of the real proofs are invalidated. I suspect the answer is never and zero, although as AIs expend large efforts to search for proofs they may end up stimulating some bug (but the differential testing with all the kernels would then catch it.)
The latest "thing" in some circles is denying that the recent proofs, e.g. of the Riemann hypothesis, are proofs of anything. People point out pointless or tautological sections of these proofs as evidence that the proof itself might be ill-formed, but Lean and similar systems don't work that way: absent a kernel bug, introducing unnecessary noise to a proof cannot make it prove something false.

Others are looking hard for kernel bugs. They exist, but there are good reasons (including multi-kernel validation) to be confident they don't impair these recent proofs.

In a situation in which you have a cohort of people who "want to believe" in some unlikely thing, you have to take the evidence they present with a grain of salt. So it is, today: people "want to believe" we haven't basically solved automated theorem proving when we have.

> are proofs of anything

They literally aren't proofs.

Proofs are verified truths built from axioms.

None of that applies to Lean. Lean is a program that generates C code that is compiled and run on a CPU. None of that stack is verified.

The probability is errors in Lean is likely very small, but math isn't about finding solutions that are unlikely to fail. Math is about proofs. You don't prove a theorem by demonstrating that the probability of it being false is very small.

That seems like an unreasonable standard to hold Lean to without holding ordinary mathematics to it as well?

Errors in ordinary social proofs are completely common, after all.

By any standard that rejects Lean proofs, we also must reject many, perhaps all, human proofs.
Here's a formalised C compiler for you: https://compcert.org/

As for RTL design, here's an article from 2003 citing "a great deal of experience" I'll leave it to you to extrapolate to modern systems: https://www.microsoft.com/en-us/research/wp-content/uploads/...

You don't need to compile Lean code. You can also read and follow the proof manually, without any computer assistance, if you so desire.

Mathematics has always been about convincing people that your argument is true. There's no magic green check mark bestowed by god. If "compiles in lean" is good enough for most folks, then that's what it's gonna be. The field will move on with or without you.

Okay, name one actual proof that fits your definition.
Wankers who have never used Lean and only hype formal verification since it is fashionable downvote a reasonable objection.

There are only greedy business morons left here.

So much motivated reasoning from people who desperately don’t want to believe what is happening is real, even from smart folks like the musl implementer.
It's real, but it isn't math.
That's a matter of taste and I won't argue, but it's silly for this guy to assure his fellow AI-haters (some of whom might regard him as an authority because of his impressive but irrelevant accomplishments in systems programming) that the proof isn't real, when even the most anti-AI top mathematicians (like Peter Scholze) aren't claiming that. I really wonder how much of this is sincere belief and how much is just signaling.
I don't know anything about the diversity of the code in solvers, but if it's anything like browsers (besides Firefox) "multiple" doesn't give you much given that they're all just Chrome in a trench coat.
They're (almost all?) independently written kernels, not forked from each other. There's ongoing work developing a complete specification of Lean's type theory so the de Bruijn criterion can be truly satisfied.
This s a valid point, especially since the type theory lean does not have a clear specification. They do have a large collection of tests though.
Someone mentioned elsewhere in these comments that bugs that have been found at mostly affected just one kernel implementation; there was one that affected two. So empirically it appears the diversity has done its job.

My bigger (but still small) concern is that the type theory may be found to be unsound, so there should be some effort on translating Lean proofs down to a weaker theory (something on the level of ZFC, maybe) when that is possible. Such downscaling of assumptions would be useful anyway for Reverse Mathematics.