Hacker News new | ask | show | jobs
by YeGoblynQueenne 13 days ago
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?
1 comments

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.

This is the "specification": sort([2,3,1,5,6], Sorted). It's a question asking whether that statement is a theorem of the theory in the sort/2 program. The Prolog interpreter constructs the proof, unlike in Lean so there's not an exact analogy, but the point I'm making is that you can't trust the correctness of a program, unless you understand the program. A Lean proof is a program and there's no reason to trust it any more than any other program.

See the comment here for more examples why; note that the comment is not mine and I don't believe that Claude gamed the kernel(s) in this or earlier cases, but the possibility exists:

https://terrytao.wordpress.com/2026/11/20/unforced-euler-sin...

The general point is that unless you fully understand the process by which an automated proof is generated, there is no good reason to trust the proof and this is what we have here.

In any case, it's not just me:

https://www.scientificamerican.com/article/the-ai-riemann-hy...

https://leanprover-community.github.io/blog/posts/riemann-hy...

Nobody accepts a Lean proof just because someone posted it somewhere. The Lean community did their due diligence. Or rather they did the due diligence of everyone in this thread claiming that a Lean proof can be trusted as long as it compiles. Note that the Lean community's acceptance of the proof doesn't rest on that fact alone.