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.