r/ProgrammingLanguages • u/mttd • Mar 17 '26
Who Watches the Provers?
https://leodemoura.github.io/blog/2026-3-16-who-watches-the-provers/
66
Upvotes
r/ProgrammingLanguages • u/mttd • Mar 17 '26
18
u/Skepfyr Mar 17 '26
Has anyone tried to formally verify a Lean kernel? It sounds like a small enough piece of code that it would be feasible. I ask mostly because it sounds funny to have a program that can verify itself.
10
u/oa74 Mar 18 '26
Interesting article. I think it's well-understood that large TCB is a problem in the current "state of the art" in verified programming. In this regard, I think that CakeML is really worth mentioning: the entire thing is written in HOL4, and verified—including the extraction to ML. If you write a HOL4 proof and extract the program it proves things about through CakeML, the TCB is only the HOL4 kernel.
The point about multiple implementations of the Lean4 kernel is well taken, however. It reminds me of the strategy of "diverse double compilation." I think that more broadly, however, the lesson is that we (as language designers) should (1) never rush to self-host and (2) actively encoruage third-party reimplementations. If trust is something we value, in any case :)
7
u/Arthur-Grandi Mar 18 '26
This is basically the classic “trusting trust” problem (Ken Thompson).
Even if you formally verify a kernel or a prover, you still rely on the correctness of the compiler, hardware, and the initial trusted base. So in practice you don’t eliminate trust — you just try to minimize and make it explicit.
That’s why many systems aim for a very small trusted computing base rather than true self-verification.
1
u/[deleted] Mar 18 '26
This is why these things should be used to prove their own checkers correct.