Hacker News new | ask | show | jobs
by kmoser 92 days ago
Serious question: how do you prove that the Lean interpreter itself (not to mention the toolchain built around it) is error-free? Isn't this turtles all the way down to some degree?
4 comments

You haven't thought that through. The regress obviously isn't infinite, and it bottoms out in things that are immediately true by inspection. And seriously, how likely is it that you have stumbled upon a fundamental problem with the whole notion of automated proof that no one in the field has thought of?

https://www.youtube.com/watch?v=RxV4PQcJ1fw ("The Proof in the Code: How Lean Is Quietly Rewriting Trust in Math")

You can only do so in another framework that might itself have bugs.

Lean is called that because the hope is the part that has to be correct by inspection ("the kernel") is small or "lean".

The kernel does have bugs sometimes.

I consider Metamath a lot more lean than "Lean", calling something such and so doesn't make it so in comparison to its peers.
In addition to what others added below you might be interested in this postmortem https://leodemoura.github.io/blog/2026-8-24-postmortem-for-t...
You write your Lean4 type-checker in a way that is amenable to formal proof. And then verify properties of your type-checker. Like Lean4Lean.

https://arxiv.org/html/2403.14064v3

https://github.com/digama0/lean4lean/tree/master