upvote
>> The statement being asserted in lean is analogous to my code compiled.

No, it's not.

https://xenaproject.wordpress.com/2026/11/12/and-the-proof-i...

reply
This article is saying the same thing I said with more words. To someone who does not understand what formal verification is, this detail is unnecessary.

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).

reply
I want to write a sorting predicate in Prolog (sorry, that's what I'm using now). I write it like this:

  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?
reply
This is a false equivalence, you seem to be missing the analogy.

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.

reply
in lean proof checking and type checking are exactly one and the same.
reply
In Lean, as in anything else, the program you write can do something else than what you think it does. "Your program" in Lean is a proof.
reply
That is incorrect.
reply
Until opus exploits a bug in my compiler to smuggle in invalid code
reply
I wish, but the proof is verified by another kernel ("con-leche") that is itself formally verified, Lean's own kernel, and two other kernels ("nanoda", "pestka") so far. Joachim Breitner who's a Lean developer: "The high level summary is that this proof is now very very thoroughly checked."
reply
It’s turtles all the way down here. At some point you’re trusting a program and some human or bootstrapped verification of it.

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…

reply
Yes, my code compiled too, but there was still a bug in it.
reply
I'll try to make it simpler, in formal verification (at the most base level): code compiles = the proof of the statement you have posed is correct, by definition.

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.

reply
Genuine question: if I make 250k pages of lean that compiles, how do we know what it proved?

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?

reply
The result proved is not 250k pages. The theorem should be much smaller and a formal version of RH.
reply
Among those who have experience with lean there is consensus that it is correct and the Riemann theorem is proven.
reply
The "there is a consensus" standard of proof isn't strong when it comes to maths. People are generally looking for a rigorous argument why something must be true.
reply
> The "there is a consensus" standard of proof isn't strong when it comes to maths.

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?

reply
I'll try to make it simpler: code compiles = the proof of the encoded statement is correct, by definition. Whether the encoded statement and the one you have posed are the same -- at 250k pages that remains to be seen.
reply
No. The lean statement itself is maybe half a page (I don’t know the exact amount but in this order). Checking that the lean statement is the GRH is elementary. The 250K pages are a ‘path’ from the statement (GRH) to the axioms encoded in Lean. The fact that is ‘compiles’ means the path is correct.
reply
Yep, fair point. Someone else has posted a link to the GRH statement. It's complete gibberish to me but for someone qualified checking half a page of code should be straightforward.
reply
It doesn’t matter because you don’t run it. If it type checks it is proven, by definition.
reply
> If it type checks it is proven, by definition.

Try to explicitly spell out what "it" is and you might learn something -- just for the hell of it, ya know.

reply