Nice! The more readable 300kloc proof even has a clear "known math" vs "new math" split and human-readable documentation all over the place. This should greatly aid with digesting it.
> it's super absurdly funny how much time and resources have been put into tiny incremental gains to reducing the proof and Anthropic can just throw compute and better internal models at it and get a reduction of this magnitude in days
I'm actually a little bit miffed about this announcement, because I was working on this in parallel. I'm about 70% done with the proof and it's at 35k lines of Lean right now. However, Anthropic beat me to the punch.
This is PURELY with GPT-6.2 Sol, by the way. On a $100 ChatGPT plan, using only one agent, no subagents. My implementation plan could use subagents, but it ate up my weekly usage too quickly.
Anthropic engineers with access to {way more usage, fast mode, and can afford to use subagents} obviously can move a lot faster than me.
Also, CLEARLY 17 million lines is overkill. At my current rate of progress, I'm pretty sure that I can do it in even less lines of Lean than Anthropic. This is about 80% of the work being done by AI, with me give it nudges in ways that helps avoid the common pitfalls that happen if you fully give AI the reins.
If I write a blog post, it will probably just be me feeding a bunch of bullet points of what lessons I learnt into an AI, and having the AI write it for me.
The most important thing is to take Software Engineering skills and apply it to Lean. The basic concepts like DRY still holds.
When you formalize a proof with Lean, you want to start off with the Challenge.lean statement file, obviously. Make sure that's correct, and just replace the proof with a `sorry` statement. If your Challenge.lean is correct, then that means nobody can complain about you "proving the wrong thing". Then, counterintuitively, you want to liberally use `sorry` statements in your proof as you go. For software engineers, just think of `sorry` statements as NotImplemented exceptions. Track all the sorry statements in a centralized location, and have the AI build out the proof with breadth first search, not depth first. That's the biggest rookie mistake; most people tell their AI to do one component at a time, DFS style. You will get a much cleaner codebase if you do BFS.
2. I disagree with the methods used by the Lean community repo, which is to try and shrink the original 17 million line Lean proof down. Instead, I believe it was much better to try and formalize the proof from scratch.
I was in the process of doing that greenfield formalization by myself. I am about 70% done, and I am currently at ~35k lines of Lean right now. Unfortunately, I do not have access to Anthropic's compute; this is all done with a $100 ChatGPT plan running GPT-6.2 Sol. Since Anthropic has the resources to beat me to the punch, so I will just publish my current progress here: https://github.com/jamesyc/riemann-hypothesis
The "obvious" thing is a mathematician with a proper understanding of both the tooling, math in itself, and good strategies.
Useful tactics and thought processes are still a helpful skill. Maybe the model can come up with those, but if you already have a strategy with high chances of success then you can already do that!
That's interesting. If the method used to reduce is applicable to arbitrary software libraries, we could be able to simplify a lot of cruft that may help making some systems easier to understand.
Does anyone have any tips for simplifying llm output like this using LLMs? I’ve never had any luck getting Claude to simplify code unless I just reprompt.
Also relevant are the topic-specific comments from the Lean Zulip thread (linked elsewhere here) on how this was done:
Luke Sernau:
> Yes, it's based on the same proof. I'm not able to say very much about methods, unfortunately, but I had some luck with unrolling definitions to get a long, flat proof, looking for simplifications there, and then rolling them back up again. That way I could simplify across boundaries. Some stuff just needed entirely new arguments though, like getting rid of Vandiver.
Devin Watson:
> For RH I took the millions of lines of Lean from Alpöge and fully decomposed it into atomic binary math functions. Decomposing it to the atomic functions enabled structural deduplication, hash-consing, direct binary term reduction, DAG theorem inlining, and shift-aliasing and binary packing. I am sure there are other strategies for essentially compression that could be applied. Using a custom framework on top of Lean I have gotten it down to 528,681 lines of Lean since starting around lunch yesterday. Obviously I haven't been dumping this directly into the main GitHub repo but it has been guiding my work. I was hoping to have a fully condensed RH Lean package and paper some time tomorrow.
Luke Sernau:
> sounds cool! And way more aggressive than what I was doing. I would bet that there are some big wins still to be had doing that on the shorter version.
Clearly the 17M lines was just because we're once again measuring productivity by lines of code output (don't tell the managers that you just reverted almost all of that progress by optimizing the proof!)
Literally every word here has a precise definition. Probability takes forever to get an intuition for all of that. But that's always the problem with math.
Besides this being the compact version, a decent chunk of it (typically everything after the first `by` in each declaration) is proof tactics, which are not really needed to verify that it's correct because they're mechanically checked by the compiler.
The grh-compact version is not very readable (it is deliberately minimized), I'd read the 300kloc version in the grh folder instead, which looks fairly clean to me.
It‘s really interesting. I just want to add that if there’s any bug with Lean or any library, AI would be as good in finding it as finding the proof. I don’t think so, but would be a nice plot twist.
Does this challenge Tao's point from a month ago that getting huge proofs with no insight is a problem? Are we already past that with smarter LLMs that can golf the proofs and explain them?
Why doesn't [the proved capability of reducing the proof size (by 99%!) to make it more likely that insights are possible] reduce the criticism of [no insights are possible from huge proofs]?
That was never a serious take to begin with. If there's one thing that LLMs are good at, it's taking stuff at any level of difficulty and explaining it to an audience with any level of expertise. It's just a matter of whether someone puts in the effort to produce a prettified version, which the big AI labs seem to have deprioritized against being first so far. My guess is that as soon as the list of impressive, open problems (like Millennium problems) is exhausted, we'll see more and more beautiful explanations of the results.
> If there's one thing that LLMs are good at, it's taking stuff at any level of difficulty and explaining it to an audience with any level of expertise.
I don't agree with this, personally. They're a great research tool, I certainly appreciate having them, but they can't compare to a well-written document or video. And interestingly this doesn't really seem to be getting better, while they're much better these days at writing code, retrieving information, etc. their ability to communicate that information is still about where it was a year ago. Claudlish sucks to read, it's better than nothing, but I certainly wouldn't say it's the one thing they're good at.
The username resolves to Luke Sernau. His GitHub seems lively, but all his activity is constrained to private repos, all the way back to 2013, so it's not possible to check what he works on. On his LinkedIn, without being logged in, I can see Anthropic in the "current company" section, though most everywhere else I see him to be associated with Google DeepMind. Fed the repo to Astra and told it to hunt for malware concerns, came up clean.
Definitely a thing to watch out for though, Lean is just arbitrary code after all, with metaprogramming facilities.
I know this is circumstantial. It is not possible to prove identity matching like this, and the repo may contain novel prompt injection attacks to defend against LLM security audits (though I'm pretty sure Astra just ran some well directed rg commands). I did not have it sanitize the code before it ran its scan.
If real, using the original 14.7M lines to 250K pages metric, this would imply a <1300 page exposition being well possible.
This just proves my previous point that this is how it should have been released not the nonsense memo and 17M line proof and claim.
I feel like actual understanding be damned, we will ship slop as fast as possible until everyone who cared has drowned in it. Is basically the subtext of all AI companies now.
I don't even understand what people mean when they say this. Prompting ChatGPT to tackle more interesting, richer problems? We couldn't even solve the ones that ChatGPT got, what meaningful contributions are we expected to make over it?
Until LLM's can find the problems themselves, someone has to do that, I really hope science isn't done and we're just waiting for what we have so far to be solved.
Do you understand that this represents something like a 500x reduction in size and is part of a continuing effort? Why would you be snarky and dismissive about this?
No, the 250,000 pages he mentioned in his GHR announcement referred to an alleged natural language proof PDF extracted from Lean by Claude. Everyone took it seriously, including the press. There wasn't really any indication in the announcement that it was a joke.
> I of course amused myself, and hit 250, 000+ pages.
> Claude cutely called it the GRH..."book" — I looked at Theorem 1 and it began by noting that because the reals are totally ordered if σ̸ = 1/2 then σ > 1/2 or σ < 1/2.
He said he literally did it to amuse himself and that the natural language proof starts with restating that the reals are totally ordered. So not only did he ask Claude to create it on a whim, he noted that the proof is clearly way too detailed to be useful.
That's it. I'm experiencing postmodern collapse, I can't tell what's real from what's fiction anymore. Was it actually a joke? What's funny in wasting everyone's time in examining millions of lines of bloated slop?
He told no jokes that were not true, the joke was how silly the result of asking Claude to make it a natural language proof was.
He and Claude really did prove RH with a massive amount of Lean, he really did ask Claude to make a natural language proof on a whim, it really did come out to more than 250,000 pages, and he thought that number was funny.
That's what people are calling a "joke", which I would argue is worse communication than anything Levent said, which I thought was very clear.
Now the massive amount of Lean has been pruned way down. There will be a natural language proof that is also much smaller at some point.
Nobody owes you a short proof - you're free to wait for a shorter one to appear if you find a long proof particularly objectionable for some reason. Speaking for myself, I'm glad that I got to know about the existence of the long proof on Nov 20 and the short proof on Nov 25, rather than nothing happening on Nov 20 and a short proof appearing on Nov 25.
One of the complaints about AI solving math problems is that it "wastes the effort" of people who were trying to solve the problem. In that case there is no reason to delay and waste even more effort.
> it's super absurdly funny how much time and resources have been put into tiny incremental gains to reducing the proof and Anthropic can just throw compute and better internal models at it and get a reduction of this magnitude in days
This is PURELY with GPT-6.2 Sol, by the way. On a $100 ChatGPT plan, using only one agent, no subagents. My implementation plan could use subagents, but it ate up my weekly usage too quickly.
Anthropic engineers with access to {way more usage, fast mode, and can afford to use subagents} obviously can move a lot faster than me.
Also, CLEARLY 17 million lines is overkill. At my current rate of progress, I'm pretty sure that I can do it in even less lines of Lean than Anthropic. This is about 80% of the work being done by AI, with me give it nudges in ways that helps avoid the common pitfalls that happen if you fully give AI the reins.
The most important thing is to take Software Engineering skills and apply it to Lean. The basic concepts like DRY still holds.
When you formalize a proof with Lean, you want to start off with the Challenge.lean statement file, obviously. Make sure that's correct, and just replace the proof with a `sorry` statement. If your Challenge.lean is correct, then that means nobody can complain about you "proving the wrong thing". Then, counterintuitively, you want to liberally use `sorry` statements in your proof as you go. For software engineers, just think of `sorry` statements as NotImplemented exceptions. Track all the sorry statements in a centralized location, and have the AI build out the proof with breadth first search, not depth first. That's the biggest rookie mistake; most people tell their AI to do one component at a time, DFS style. You will get a much cleaner codebase if you do BFS.
You did a great job and you should be proud regardless
Why this huge discrepancy?
https://riemann.verifytask.cn/
2. I disagree with the methods used by the Lean community repo, which is to try and shrink the original 17 million line Lean proof down. Instead, I believe it was much better to try and formalize the proof from scratch.
I was in the process of doing that greenfield formalization by myself. I am about 70% done, and I am currently at ~35k lines of Lean right now. Unfortunately, I do not have access to Anthropic's compute; this is all done with a $100 ChatGPT plan running GPT-6.2 Sol. Since Anthropic has the resources to beat me to the punch, so I will just publish my current progress here: https://github.com/jamesyc/riemann-hypothesis
Note that this is not my first rodeo; I have previously formalized a proof of the smallest Turing Machine that cannot be proven to halt in ZFC https://github.com/jamesyc/BusyBeaver/tree/main/ZF192
Useful tactics and thought processes are still a helpful skill. Maybe the model can come up with those, but if you already have a strategy with high chances of success then you can already do that!
These hill climb-y tasks tends to hit a limit based on model capability (and getting stuck making tiny improvements in bad directions)
Left a comment under it that may be more directly relevant for you: https://news.ycombinator.com/item?id=50648003
Also relevant are the topic-specific comments from the Lean Zulip thread (linked elsewhere here) on how this was done:
Luke Sernau:
> Yes, it's based on the same proof. I'm not able to say very much about methods, unfortunately, but I had some luck with unrolling definitions to get a long, flat proof, looking for simplifications there, and then rolling them back up again. That way I could simplify across boundaries. Some stuff just needed entirely new arguments though, like getting rid of Vandiver.
Devin Watson:
> For RH I took the millions of lines of Lean from Alpöge and fully decomposed it into atomic binary math functions. Decomposing it to the atomic functions enabled structural deduplication, hash-consing, direct binary term reduction, DAG theorem inlining, and shift-aliasing and binary packing. I am sure there are other strategies for essentially compression that could be applied. Using a custom framework on top of Lean I have gotten it down to 528,681 lines of Lean since starting around lunch yesterday. Obviously I haven't been dumping this directly into the main GitHub repo but it has been guiding my work. I was hoping to have a fully condensed RH Lean package and paper some time tomorrow.
Luke Sernau:
> sounds cool! And way more aggressive than what I was doing. I would bet that there are some big wins still to be had doing that on the shorter version.
But looking at the code, I can't help but wonder:
Who on Earth can understand that ?
Random example: https://github.com/lsernau/grh-lean/blob/main/grh-compact/sr...
Genuine question for people who know Lean: How realistic is it for a human to read this code, 'grok' it and verify that it is correct ?
> Scaled Hecke operators repair divisibility at inert primes pairing tops
Literally every word here has a precise definition. Probability takes forever to get an intuition for all of that. But that's always the problem with math.
>How realistic is it for a human to read this code, 'grok' it and verify that it is correct ?
Data presented this way isn't simply read and understood, it often has to be studied.
It's reducing the proof to make it more likely that insights are possible.
But no it doesn't reduce Tao's point.
Why doesn't [the proved capability of reducing the proof size (by 99%!) to make it more likely that insights are possible] reduce the criticism of [no insights are possible from huge proofs]?
I don't agree with this, personally. They're a great research tool, I certainly appreciate having them, but they can't compare to a well-written document or video. And interestingly this doesn't really seem to be getting better, while they're much better these days at writing code, retrieving information, etc. their ability to communicate that information is still about where it was a year ago. Claudlish sucks to read, it's better than nothing, but I certainly wouldn't say it's the one thing they're good at.
How difficult is it to learn to use Lean?
Any similar example to see the level of difficulty?
Lean is like a universal DSL. Learning the syntax is one thing, but learning the background domains of a Lean proof is another.
Depending on what you want to use Lean for. Do you want to prove math, or do you want to do software with some theorems sprinkled in?
I'm guessing you can get pretty far just using the models as almost a translator to/from Lean.
(ofc it can still can be interesting to learn, I'd just treat it more like learning Latin)
It looks like a miserable job; reading LLM produced code is bad enough but I feel lean could have been named 'thick'.
[1] https://github.com/lsernau/grh-lean/blob/main/grh-compact/sr...
If this were “from Anthropic” surely it would be hosted on an Anthropic account?
Definitely a thing to watch out for though, Lean is just arbitrary code after all, with metaprogramming facilities.
I know this is circumstantial. It is not possible to prove identity matching like this, and the repo may contain novel prompt injection attacks to defend against LLM security audits (though I'm pretty sure Astra just ran some well directed rg commands). I did not have it sanitize the code before it ran its scan.
If real, using the original 14.7M lines to 250K pages metric, this would imply a <1300 page exposition being well possible.
I feel like actual understanding be damned, we will ship slop as fast as possible until everyone who cared has drowned in it. Is basically the subtext of all AI companies now.
He and Claude really did prove RH with a massive amount of Lean, he really did ask Claude to make a natural language proof on a whim, it really did come out to more than 250,000 pages, and he thought that number was funny.
That's what people are calling a "joke", which I would argue is worse communication than anything Levent said, which I thought was very clear.
Now the massive amount of Lean has been pruned way down. There will be a natural language proof that is also much smaller at some point.