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.
In fact Lean is bloated hipster software that has no backwards compatibility whatsoever and forces you to use the latest version.
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.
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.
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.
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.
Errors in ordinary social proofs are completely common, after all.
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/...
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.
There are only greedy business morons left here.
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.
In the case of Metamath, yes, soundness bugs have been found in the original "metamath" proof verifier, written in C. But to be accepted into the main proof databases (set.mm and iset.mm), proofs must pass "5 independently-created verifiers in 5 different programming languages: metamath (a C verifier by Norm Megill), mmj2 (a Java verifier by Mel O'Cat and Mario Carneiro), smetamath-rs (a high-speed Rust verifier by Stefan O'Rear), checkmm (a C++ verifier by Eric Schmidt), and mmverify.py a Python verifier by Raph Levien)." - https://us.metamath.org/
To me, that's a key countermeasure to the problem.
Of course, once you introduce a few common axioms (choice, but even something simple like functional extensionality IIRC) a lot of non constructive proofs become possible
Comfortably more than good enough for 99.9% of software, especially considering you'd still need to exploit such a soundness bug in a way that hides a further issue in the program being verified.
But if you look at the trend. It's on logarithmic scale. With all the lines being curved up. Amount of bugs found was already growing exponentially years before being accelerated by current AI trends. To me a more likely explanation seems not that there were barely any bugs in previous decades, but that barely anyone was looking for them or considering it serious problem.
If you want a scare, take a look at how many soundness bugs the borrow checker has had. Nobody would deny its usefulness for correctness.
With that said the combo of con-leche, con-ron, and con-agua that has emerged since the summer is quite confidence inspiring, and I do expect that we will probably flush the vast majority of soundness bugs out of the major systems over the next year or two.
It has become much less plausible that there is a soundness bug being tickled.
I found it amusing in that case l, that even if it had supplied me with a formal proof of correctness, the proof would also have passed, and the implementation would still have been completely useless! Because the LLM's understanding of what it was supposed to be doing in the first place was wrong.
Communication is hard!
So expressing myself in the strictest mathematical terms is for the human, and being creative and trying a bunch of stuff out is for the machine.
Who is responsible for this mess!
Going from "we need to write code to reach unambiguity" to "we can explain it like we'd explain it to a human if we want to be very clear" is already a huge step.
Of course you'd still have to manually verify the formal problem statement that was generated. I guess somewhere, the turtles have to stop.
You could make this into a more general workflow for working with LLMs:
1) First spend some iterations with the model to nail down what you want and have it produce mock-ups, test cases, verifiers, etc. Anything that you can check for correctness easily and that the LLM can then in turn use to check for itself.
2) Then let the LLM run wild and produce the actual thing, using the verifier from step 1 as a guide.
In the mid 2000's I was trying out a bunch of stuff and learned that making it easy to test code was more important than completeness because if it was hard dev wouldn't test at all. The fact that a dev can take AI and make some lean even if crude and incomplete is world better than not and I have been watching the steady stream of blogs for the last 18 months and in each case they find issues. Maybe important, maybe not, but they find stuff and they learn how to do it for next time.
There are other parts of the code that matter for correctness, such as parsers, memory allocators, OS code, etc.. But the mathematical faults are restricted to the kernel. The math in the kernel is complex, since it needs to be able to encode all of math and deal with concepts like infinity.
It would be nice to see this webpage update with what soundness failures were mathematical errors about the kernel, mistakes writing the kernel, or bugs in other code.
us.metamath.org
Kevin Buzzard was working on formalizing (partially modernized) version of Wiles' purported proof.
Independently Anthropic finds a purported proof for Fermat's last theorem.
Anthropic invites Kevin Buzzard to verify it. Kevin is compute poor: it appears running the Lean proof requires a 500 GB RAM machine. So they gave Kevin access to the compute. 13 million lines.
sign up to the metamath mailing list and you should soon see a succinct human-discovered human-readable and essentially highschool-level proof of FLT in metamath
It's not my task to justify the poor decisions of others.
This is (was? it predates Lean 4 by several years) an issue with `example` checking, which isn't relevant to soundness.
Cross verifying proof checkers with different implementations, different algorithms is also important.
Also, what exactly do you mean by simplicity? The core of nanoda_lib is about 7,000 lines of code, much smaller than HOL Light as far as I can tell.
HOL Light defines only 10 primitive inference rules.
HOL Light's maximizes trustworthiness and manual auditability by humans or machines (YOU CAN DO IT). The kernel itself has been formally verified inside HOL Light.
There are at least 3 separate HOL light implementations: HOL Light, CakeML, HOLZero that implement the exactly same logic.
Lean's kernel extends its primitive environment every time an inductive type or quotient primitive is declared. Once you import all of Mathlib it's very large. That's why you want to use something like HOL to verify those.
This is why Riemann proof only used a tiny bit of mathlib. An I think the formalization of Fermat's Last Theorem didn't use it at all.
Roqc/Coq is a research tool. Its team has less resources and they are supposed to push the boundaries. I would expect it to have more soundness issues.
> it was later clarified that the person who originally posted the proof was already aware that it was buggy, and chose not to be clear about this up front, as a humorous way to file a bug
So not quite an accident. In the aftermath of this one of the Lean maintainers wrote a verified kernel, con-leche, that comparator uses.
There may be an important difference of regime from the kind of proofs mathematicians have cared about, to AI-coded proofs of correctness of very ambitious and consequential programs that no human has even read.
There are a lot of cases nowadays when someone points at what they claim to be 'irrefutable proof' and demand that you believe it; but essentially nobody fully understands the mechanism which makes the proof correct... And really, people are just trusting the system and trusting projections of what looks like real data.
Moreover, the people demanding you to "trust the data" or "trust the process" often have questionable motives and questionable moral character.
I started feeling this way when I first got into crypto. People who knew nothing about cryptography or coding kept boasting about Bitcoin's "cryptographically verifiable" ledger; but such people had literally never even met a single person in their lives who had ever read enough of Bitcoin's code to be able to independently support that conclusion. From the proponent's perspective, it was pure faith disguised as mathematics.
I think now we're seeing a lot of that... And clearly, we're heading into a future where humans will lose this knowledge. Soon, our trust in data, science and mathematics will be based on absolutely nothing and nobody.
It will be like a deity which we're not allowed to question and there will be no way for anyone to prove otherwise anyway.
That's what the proverbial "Singularity" actually is.
In other words, yes, it's intentional and the AI bros did it because of their fringe religious beliefs.
I maintain multiple large authentication packages and this is the reason I reject almost all feature requests. Not because I am an d*ck, but I need to be able to verify their safety and I am only human.
I recently checked if this rabbit hole bottoms out and it kinda does?
ARM appears to be publishing a formal language specification of their ISA as the normative version, but Intel's version is only nonnormative. For CakeML, the semantic correspondance for ARMv8 was proven.
So you have ARMv8 -> CakeML -> Candle (i.e. HOL Light) fully certified supposedly.
Not freestanding though, so OS shenanigans may still bite. Even in freestanding, UEFI shenanigans might too, not sure.
If anyone knows the remaining gaps (excl. the virtual <-> physical boundary), would be happy to hear.
1. The number of bugs in unverified programs of similat complexity. By average and good coders. Think CompCert's middle end having no bugs in the evaluation against other compilers.
2. The number of bugs in those vs verification tools in general. If proof and simplicity works, we should see a huge drop vs larger provers or solvers.
3. How much the proof helped prevent bugs in verified software and their severity vs the number and severity of bugs in the provers.
4. An empirical argument where common, coding strategies in battle-tested compilers normally run withiut errors. Therefore, a verified checker implemented with those patterns in a simple, coding style will probably run correctly or with few bugs. But, he just says a large binary checking a large binary which makes both programs sound equally reliable.
So, I support developing and using these tools. We should have them tested on many, small programs and properties like we do static analyzers. Then, use David A. Wheeler's diverse, double compilation on their checkers with GCC and LLVM. Run other verified tools through that.
Because CompCert is proprietary, I wonder if we could ask that team to do the same for CakeML. They could move MLton-style optimizations into the higher passes while moving Rust- or C-like optimizations into the lower passes.
I prefer to see it as a failure of the specification. Tax avoidance isn't illegal, tax evasion is. Getting acquitted on a "loophole" still means you're free to go.
But rust programs are full of bugs unrelated to memory safety, if you go down this argument line you are furthering the argument that the programming language's safety mechanism prevents all bugs, it doesn't there can still be bugs in the application code, not in the compiler.
I don't know, either, but history suggests that when djb claims X and other experts disagree, the safer bet is usually on X being right.
But the sole person, or the person who is closer than anyone else? I wouldn't really agree with that, on the simple grounds that there are other people taking the same approach to systems architecture. Look up Laurent Bercot, for starters.
There are many programs written by DJB, which I have been using continuously 24/7 for several decades, day and night, year after year, on many kinds of server computers and many successive generations of computer hardware, and they have always worked perfectly, without the slightest problem.
There are no programs written by any other individual that I have seen in continuous use for so many years, without having to be replaced with other versions or with other completely different programs, if not for fixing bugs in them, at least because of the need to enhance them with new features.
So I am certainly very grateful for his high-quality work shared publicly.
And Laurent Bercot did not keep the code to xyrself. Famously so.
Hint: If you are using a Bernstein program, you are likely using one of my patches to it, such as the ones that went into netqmail, or the stuff that I did for djbdns and ucspi-tcp. Or one of Felix von Leitner's or Wayne Marshall's. It is probably unwise to argue with us about perfection and zero problems. We're the people who made your experience this smooth, almost a quarter of a century ago.
Bruce Schneier doesn't need to write secure C code, any vulnerabilities fix themselves out of embarrassment.
DJB is incapable of writing insecure C code, any vulnerabilities you think you may have found are because you're using it wrong.
3/5
(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.)