Well, you kind of don’t, as it’s beyond human comprehension (in theory you could trace everything down to a certain level) but there are layers and layers of build abstraction that you assume are correct, compilers, runtime environments, and mature libraries that are checked and validated. Not a perfect analogy but that’s kind of the gist of it.
Ah, so it's similar to something like Merkle trees, where each leaf must be cryptographically valid up to the root otherwise the whole branch is invalid?
So you start with a simple definition that then evolves?
Different type theories correspond to different systems of formal logic with different levels of power and expression.
Simply Typed Lambda Calculus corresponds to intuitionistic propositional logic. If you lay out the typing judgements of STLC in natural deduction style and then physically erase the terms (leaving the types) then you literally have the rules of intuitionistic propositional logic.
So if you can write a term that typechecks at a type, that term is a proof of the corresponding proposition.
The easiest example is modus ponens, which is exactly the typing rule for function application:
G |- M : A -> B G |- N : A
-------------------------------- (App)
G |- M N : B
"Given a function from A to B and a value of A, you get a value of B."So then in a proof checker you prove the proposition P => (P => Q) => Q by writing a program of that type:
apply :: a -> (a -> b) -> b
apply x f = f x
`apply` is demonstrated in haskell which does not have a rich enough type theory to give you more then an intuition (no pun intended) for how this all works. Things like `undefined` and general recursion let you "prove" any type, so it isn't a consistent logic. Languages like Lean and Agda are built on richer dependent type theories that give you far more expressive power for writing proofs (quantifiers, induction, etc.), and they won't let you cheat the type theory.So to answer your question, no not a merkle tree but a tree none-the-less. You end up with a literal computer program which is a tree of expressions all of which must type check. If they type check then program itself is a proof for whatever proposition is encoded in the type of the program.
A 250k pages proof is massive, even if correct, there is almost certainly something extremely inefficient or weird in there.
I cannot imagine that a fundamental proof like this will require hundred of thousand of logic steps.
Unless some part of the proof is about brute-force checking that something holds for a huge number of literal cases.
It's pretty easy to imagine that, given a starting language, there are facts that require an arbitrary minimum number of words to prove. The only reason the proofs most people learn are short is because:
- There isn't time in a math course to teach arbitrarily long proofs
- Humans don't live long enough to construct arbitrarily long proofs.
- Human minds are turning out to be pretty feeble and they probably couldn't reliably construct and verify anything more than trivially short proofs in the era before computer assistance.
Yes, actually! Well, one of the kernels is, con-leche: https://github.com/leanprover/con-leche
"This is an external checker for the Lean theorem prover that is proven (in Lean) to be consistent in that it does not accept a proof of False."
Or you mean one implementation is used to prove another? In that case, you have a mutual (or circular) recursion of proofs
Then if it constructs a valid proof in Lean, how could it be reward hacking? I suppose it could have found a Lean compiler bug, or a mistake in the formalization of the hypothesis. I would expect that those problems would be found and fixed reasonably quickly, and we would need to see if the proof could be fixed. Other than that, I suppose it could find a contradiction in ZFC, but that would be an even more incredible result than proving RH.
I don't really see the possibility for reward hacking with the stipulation that the proof is ultimately verified by compiling the Lean program.
You have in Lean a headline statement of "given X, then Y is true". Where X and Y and precise statements in code. So the mathematical assumptions are upfront.
If you trust the lean compiler and are very careful to vet that the headline statement is what you expect, then you know the theorem is true.
How well the human language mechanics of the proof corresponds to what the actual lean mechanics of the proof is very much up on the air.
The GRH is a bit too long to paste (but i encourage you to read it: https://github.com/google-deepmind/formal-conjectures/blob/m...), but for a sense of scale, here is the entire ABC conjecture:
def radical (n : ℕ) : ℕ := n.primeFactors.prod id
@[category research open, AMS 11]
theorem abc (ε : ℝ) (hε : 0 < ε) :
{(a, b, c) : ℕ × ℕ × ℕ | 0 < a ∧ 0 < b ∧ 0 < c ∧ ({a, b, c} : Set ℕ).Pairwise Nat.Coprime ∧
a + b = c ∧ (radical <| a * b * c : ℝ)^(1 + ε) < c}.Finite := by
sorry
not exactly beyond the realm of human reviewIn other words the system is designed, by construction, to only rely on a very small "trusted" set of axioms, code, and mathematical ideas. This is a very engineering-oriented design principle! Actually, a pretty significant amount of the theoretical research in theorem proving over the past 2 decades has been in "automating proofs", ie tools and methods of making those proofs as easy as possible to write. Entire book chapters have been written about how to replace a 20 line inductive proof in Rocq with a single line "function call" that can automatically discharge the proof for you, because the idea is that this "trusted kernel", the tiny and sound mathematical language, will reject invalid proofs by design. So "who cares" what the proof is, in a sense? In many ways simply writing the theorems and whatnot down requires you to understand the problem well enough already. So in a way LLMs are just taking this idea to the absolute limit.
So all this means is that the difficulty really is in specifying the theorems. Which was kind of the whole problem all along! Except now you have a computer that can check your actual proof. You can write a theorem in Lean that isn't the theorem you want, and then write a type checked proof of it, but you still need the theorem to be accurate.
Unless Claude is either 1) finding bugs in the Lean kernel to exploit them, 2) using 'sorry' (a very convenient tool in Lean used as a placeholder for proofs, but it can literally allow you to prove False), then it mostly comes down to: are all the theorems stated correctly? This is trickier than it sounds, of course, so some skepticism is certainly warranted in my opinion!
There are also other various engineering principles applied to help try to reduce bugs and ensure correctness like any other engineering project, and there are various other "things" regarding dependently typed programming language design and the impact of those design decisions on proofs (and why they are notoriously hard to read and write), but they aren't germane to my point here.
It's not the proposition (i.e. the theorem) you need to worry about but the proof. I'm sorry to say but the comments on here (and everywhere on the internets) that assure each other that "if it's veified by Lean, then it's true" misunderstand what they're even trying to claim.
Here's a good article on the subject that was recently posted on HN:
https://xenaproject.wordpress.com/2026/11/12/and-the-proof-i...
And here's the tl;dr:
>> This post is an attempt to explain in simple terms how to interpret claims of the form “this theorem is correct because it was checked in Lean”. The summary is: there is an important signal that can be extracted from Lean code, but if this code is AI-generated then you need to do some tests first. We explain the tests, and note that in many cases (such as the OpenAI theorem dump) these tests have not yet been systematically done.
Lean works based on this: https://en.wikipedia.org/wiki/Curry%E2%80%93Howard_correspon...
No, it's not.
https://xenaproject.wordpress.com/2026/11/12/and-the-proof-i...
Lean certificates of this magnitude come with comparator. They are checked independently on different kernels to avoid kernel bugs.
See the zulip thread: https://leanprover.zulipchat.com/#narrow/channel/113488-gene...
This is exactly analogous to my code compiles (albeit with some extra flags on the compiler).
sort(Xs, Ys) :-
sort(Xs, Ys, [], Ys).
sort([], [], Ys, Ys).
sort([X|Xs], [_|Bound], Rs, Ys) :-
sort(Xs, Bound, [X|Rs], Ys).
My code compiles. I try my predicate at the repl: 110 ?- sort([2,3,1,5,6], Sorted).
Sorted = [6, 5, 1, 3, 2].
What went wrong?There is no specification in your prolog example, in lean we explicitly check that the expression in lean is GRH (and this is about half a page of lean and has been checked by many many mathematicians), and then can arrive at a formal proof for that specification.
You are confusing the issue for people who don't understand what a formal proof means with this non-sequitur.
And then you’re trusting that the lean proves what it set out to prove and not something else. That’s another thing you have to prove…
The statement you are trying to prove is: This is compilable code. Since your code compiled, you know your code is compilable code. Therefore your initial statement is correct.
That's at the very basic level what a formal proof does. The expression you want to prove (in this case GRH) is stated in such a way that if your code compiles, you have proved the statement.
If it was as trivial as stating the expression and compiling then there would be easy verification and consensus as soon as it compiles on multiple kernels?
Says who? I don't mean that in a rude way, it's a genuine question. Is that the opinion of the community of mathematicians who are capable of understanding these type of proofs, or software engineers who believe nothing can be true unless you can read the code yourself and understand it?
Try to explicitly spell out what "it" is and you might learn something -- just for the hell of it, ya know.
Makes me wonder if general programming languages are too expressive for AI making it too easy to express conflicting or incorrect ideas, we might need something like Lean but for general purpose programming. I'm aware there are some formal systems for that but I think more along the lines of general purpose programming.
Proof checkers like Lean are already what you describe, as Lean is also a programming language, but yes, there will be more general purpose tools for writing code that is correct by construction.
The remaining hurdle is that you cannot actually verify correctness of many programs as you don’t know their full spec. But that is a very different problem to what we had before.
Proof can be total bunk but underestimating the labs is silly.