News for hackers. Stuff that matters.
Re:Yes, 17M lines of Lean is a lot by _flag on Monday November 23, 2026 @01:26PM (#50616598)
There seem to be a lot comments in this thread about how the amount of lines of code is indicative of the proof's incomprehensibility, or suggesting that codegolfing would help make it easier to understand. This is a misunderstanding.

Lean is roughly analogous to compiled math. Just like your complier might turn a few simple statements in a high-level language into thousands of assembly instructions, the process of formalising a natural language mathematical proof can turn sentences into thousands of lines of code. One does not try to understand this code, but instead tries to understand the argument using mathematical language and higher-level abstractions that are specifically designed for this purpose. And such "decompilations" of the Lean are currently being written by mathematicians, and already provide significant understanding to experts who understand the language (eg. [1]).

1. https://www.ihes.fr/%7Erzhang/files/GRH%20note.pdf

Re:Yes, 17M lines of Lean is a lot by dullcrisp on Monday November 23, 2026 @02:00PM (#50617190)
Is there any progress on “higher level” languages that are still formal like Lean but can be more easily read by humans?
Re:Yes, 17M lines of Lean is a lot by _flag on Monday November 23, 2026 @02:20PM (#50617559)
My impression is that Lean is popular precisely because it is the most "high level" out of all the formal ways of encoding math that have been put forward. So there are currently no better alternatives in this respect, and I expect that one cannot avoid learning to understand informal mathematical language if one wants to truly understand mathematical proofs.
Re:Yes, 17M lines of Lean is a lot by burnerRhodov3 on Monday November 23, 2026 @02:54PM (#50618163)
yeah, lean it top of stack. If you want to go lower, you use con-leche.
Re:Yes, 17M lines of Lean is a lot by solomonb on Monday November 23, 2026 @03:03PM (#50618318)
This isn't really true. Lean is an extremely high level language and using tactics you can even get your proofs to look almost identical to handwritten proofs.
Re:Yes, 17M lines of Lean is a lot by _flag on Monday November 23, 2026 @04:05PM (#50619264)
Identical to proofs that one would see in an undergraduate class, maybe. Identical to proofs in professional mathematics papers, certainly not.
Re:Yes, 17M lines of Lean is a lot by solomonb on Monday November 23, 2026 @04:34PM (#50619687)
Regardless of how effective tactics are at making proofs read like traditional ones, I still disagree with your original point that Lean code is analogous to a compilation artifact that one does not try to understand.

It is intended to be written and understood by humans, and it's only very recently that we've started outsourcing that work to LLMs. The new thing here is the size and scope achieved via LLM code gen.

For a large, human-centric formalization project (in a fork of Agda), check out the 1lab: https://1lab.dev

Re:Yes, 17M lines of Lean is a lot by _flag on Monday November 23, 2026 @04:46PM (#50619842)
Okay, let me be more precise. Yes, one can try to understand the Lean code, and it can in some cases be fruitful to do so. I also think that one can try to understand compiled assembly, and it can in some cases be fruitful to do so. One can also choose to write assembly without a compiler, and it can be fruitful to do so.

But for something like the proof of the Riemann hypothesis, you will not achieve a meaningful high-level understanding of what is happening in the argument without understanding informal mathematical language, and efforts aimed at clarifying the proof of the Riemann hypothesis should be primarily focused on producing such descriptions. Once the argument is refactored at the informal level one will inevitably obtain a better, more readable formalisation as well.

Re:Yes, 17M lines of Lean is a lot by hashmap on Monday November 23, 2026 @03:14PM (#50618504)
if you took a moment to look at the repo and code yourself you could easily see that what you are saying is not true. there are millions of lines of unused, dead, and duplicated code in there, before any kind of actual simplification. filling up anything with garbage makes it harder to understand.
Re:Yes, 17M lines of Lean is a lot by _flag on Monday November 23, 2026 @04:06PM (#50619278)
That the "compilation" is done inefficiently and can be improved is not in any way in conflict with what I said.
Re:Yes, 17M lines of Lean is a lot by hashmap on Monday November 23, 2026 @05:07PM (#50620087)
> the amount of lines of code is indicative of the proof's incomprehensibility <

> This is a misunderstanding. <

lmao

Re:Yes, 17M lines of Lean is a lot by mpyne on Monday November 23, 2026 @05:23PM (#50620258)
They didn’t say the proof was comprehensible.

They said the proof’s length is not the thing that necessarily makes it incomprehensible.

Dead code that you have to decipher before you can decide you don’t need it is a comprehensibility problem, yes. And dead code leads to longer proofs. But just because A implies B does not mean that B implies A: the proof being long doesn’t necessarily mean it is filled with dead code and therefore incomprehensible.

It might be. You might even say the odds are high, but “proof” should mean something in math.